@zeniai/web-cockpit-ui 1.15.62-prod → 1.15.63-dev

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 (284) hide show
  1. package/dist/assets/{ACHDetailsPage-iiVBlQka-Cg1oUPUX.js → ACHDetailsPage-B5qIuZya-DMQRF8PE.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-MBAB5kgB-DUXKNLGP.js → AIPerformancePage-BHB45mP--C-dHKl4F.js} +18 -18
  3. package/dist/assets/{AccountInfoPage-Cz9yoVl8-D1N_z0nU.js → AccountInfoPage-Cd5xYT1g-CNmpoFMD.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-j85psx_A-CYJvBqw8.js → AccountInfoPageContent-CJ7ycVIK-zgc9u2MF.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-B1JxHllU-DeuZYeNv.js → AccountLockedInfoModal-Dox7IuAX-Bd2lveLQ.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-DF-X46_u-BHjX20SJ.js → AccountReconDetailsDrawerPage-Bqty08m0-CFQ6A8a0.js} +1 -1
  7. package/dist/assets/{AccountRow-DEtntSrL-DjQGfh-3.js → AccountRow-D1cjRJJD--C24H47s.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-Cvixqb_6-D8hOdXOY.js → AccountsPromoCardStack-Bs3naJHM-C0F0RQHK.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-B1Qfn44J-D06_kvdw.js → AddAddressForCardDrawer-DZkBMJfp-NUnwpiBH.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-BLxUsh1Y-BGSTAdvc.js → AddToWalletPage-CyRfqVDB-DwZBuzaI.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-XIzuLRE4-ZwAiZJoz.js → AgingReportsPage-xBFff3BM-Dc0ndLrv.js} +1 -1
  12. package/dist/assets/{AllUserItems-BGMZCYUO-C1Z_VBx7.js → AllUserItems-BJf6WPDo-DrRMiZwu.js} +1 -1
  13. package/dist/assets/ApAgingDetailPage-CjBrPyi8-C9SbUGEE.js +46 -0
  14. package/dist/assets/{AppBasePage-CYjdUgY4-DiEqAH7k.js → AppBasePage-CqDm-hnV-BMQKy0pD.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-CbF8TOjd-fa977cdP.js → AppDrawerContent-CVVWj66i-zwhuzKtW.js} +22 -22
  16. package/dist/assets/{ApprovalRulesSettingsPage-RCtygkuw-D2zRSh8-.js → ApprovalRulesSettingsPage-Cckd2uVA-DMXkXJiF.js} +1 -1
  17. package/dist/assets/{ArAgingChart-ZwWwEBJ3-ONEwLgWB.js → ArAgingChart-CBsqOd-4-DwOeXEEU.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-DtqyngrA-ChIKWjqA.js → ArAgingDetailPage-i7JObt60-CMGpLU1f.js} +1 -1
  19. package/dist/assets/{AttachmentView-UxkSFZmq-DzQG4PG1.js → AttachmentView-CzC4skJ3-BrTw0uGW.js} +1 -1
  20. package/dist/assets/{BalancesInsightWithToolTip-Co6ZUc5x-UMuZaO_a.js → BalancesInsightWithToolTip-B6umvmgL-DPjkyoui.js} +6 -6
  21. package/dist/assets/{BankAccountSection-DnBVOkJC-BRm78vt2.js → BankAccountSection-Di4sF52j-DFIAi88L.js} +1 -1
  22. package/dist/assets/{BankAccountWarningSection-D7OuLiLz-o-zTEqGg.js → BankAccountWarningSection-Cled-2cR-C1C6Vjrm.js} +1 -1
  23. package/dist/assets/{BankConnectionsSettingsPage-BDLTuNLu-BxoygeIH.js → BankConnectionsSettingsPage-Ccnzq7st-DHgh69DN.js} +1 -1
  24. package/dist/assets/{BillDetailPage-V8us93cj-B5Hi-hOd.js → BillDetailPage-XXOwBfO1-CGDRib2O.js} +6 -6
  25. package/dist/assets/{BillPayApprovalRuleDetailPage-C_REwEVS-BICLLIOg.js → BillPayApprovalRuleDetailPage-DFZ0csaT-Ds0gyJKG.js} +1 -1
  26. package/dist/assets/{BillPayApprovalRulesPage-C6G_eDX9-W3aMv1vt.js → BillPayApprovalRulesPage-COCypDcS-DDBfv-HQ.js} +1 -1
  27. package/dist/assets/{BillPayPromoPage-CTQSknOB-CgvOk82J.js → BillPayPromoPage-DOE2YIqC-Dt0PySwZ.js} +11 -11
  28. package/dist/assets/{BillPaySetUpPage-BmgMLaf--CwweZk8l.js → BillPaySetUpPage-BCJbZDsV-7RphGKjA.js} +1 -1
  29. package/dist/assets/{BillingSettingsPage-IHY3ak0N-h__Jrih5.js → BillingSettingsPage-iImtlEmO-CLpZtYzE.js} +1 -1
  30. package/dist/assets/{BillsBulkReviewDrawerPage-ZoFahXYa-wLElnWxG.js → BillsBulkReviewDrawerPage-B11GWM_0-Dp1GR0TH.js} +1 -1
  31. package/dist/assets/{BoxItem-XoWq-tnh-CWlKsdye.js → BoxItem-Bxa1M4QU-CuNypviZ.js} +11 -11
  32. package/dist/assets/{BusinessVerificationPage-D9HtnNOu-CYgC3Mc9.js → BusinessVerificationPage-DSuJFoW1-BKZUF9ME.js} +1 -1
  33. package/dist/assets/{CardNumberSubText-Cn0EZrNE-UdqTHAA8.js → CardNumberSubText-_ZZbaz_k-CJI-nsfm.js} +1 -1
  34. package/dist/assets/{CashbackDetailPage-Bk5ssPnj-jr0Z3Ort.js → CashbackDetailPage-DAZXitLt-CWZ113JI.js} +1 -1
  35. package/dist/assets/{ChargeCardDetailPage-Ge9Aw7PA-9xCpbXUj.js → ChargeCardDetailPage-B1VIpASk-BeNDm67T.js} +26 -26
  36. package/dist/assets/{ChargeCardListPage-BNLOoSv3-BFqxfn09.js → ChargeCardListPage-BOBepN-x-BYYlZgmW.js} +1 -1
  37. package/dist/assets/{ChargeCardListTable-BoufojYF-71if8UPV.js → ChargeCardListTable-YznzSsJo-_dDAhS8L.js} +1 -1
  38. package/dist/assets/{ChargeCardPaymentHistoryPage-5lUxK8pF-E8V2M0xb.js → ChargeCardPaymentHistoryPage--jOwsMla-C2DbRPI5.js} +1 -1
  39. package/dist/assets/ChargeCardPromoPage-DIfakIOK-CvlZUe5W.js +222 -0
  40. package/dist/assets/{ChargeCardSetupPage-Dqoel2Do-ImdFHxlV.js → ChargeCardSetupPage-0bpVkeJs-B4o9rj4Y.js} +3 -3
  41. package/dist/assets/{ChargeCardStatementsPage-Dalrj66w-CLFQKle4.js → ChargeCardStatementsPage-ChWyQlw6-BnvGhpGm.js} +2 -2
  42. package/dist/assets/{CheckDepositDrawerPage-mYjv1H0f-eq13oTOf.js → CheckDepositDrawerPage-BS7hnyZn-CxSRctwS.js} +1 -1
  43. package/dist/assets/{CollapsableReportTable-CIaa7SIH-CnDLtSkq.js → CollapsableReportTable-DNfFkAts-DG-tRdjC.js} +10 -1
  44. package/dist/assets/{CompanyOfficerDetailsSection-BSFNYauO-y6AUPGnC.js → CompanyOfficerDetailsSection-CrOIN4IW-B6nLDxWF.js} +1 -1
  45. package/dist/assets/{CompanyPassportCard-B-mBb9Q5-B7YukNIl.js → CompanyPassportCard-CkzYFTrp-D0eepAjO.js} +3 -3
  46. package/dist/assets/{CompanyPassportPage-Blyl_Z-c-DcoEh3fw.js → CompanyPassportPage-FE6yli6h-DmnPa-EO.js} +1 -1
  47. package/dist/assets/{CompleteProfile-ySk9I1Ut-DL_Ucngh.js → CompleteProfile-Cb8i1XgZ-BNMBzO6J.js} +1 -1
  48. package/dist/assets/{ConfettiBurst-CeAc4Ily-BpvE8sE3.js → ConfettiBurst-BZCXEGYA-yCtyyeGJ.js} +1 -1
  49. package/dist/assets/{ConstrainedInnerElement-CgdnMeoA-eTG6w_zj.js → ConstrainedInnerElement-CgdnMeoA-Bu2DG2lc.js} +1 -1
  50. package/dist/assets/{CreateOrEditVendorPage-BRkqkhfw-Ma-hiTKp.js → CreateOrEditVendorPage-CzpSgxbO-JCKju4xk.js} +1 -1
  51. package/dist/assets/{CreditCardPaymentDrawerPage-oUIakAtz-DRFawYl_.js → CreditCardPaymentDrawerPage-c_q0MsSO-B0hLCMJ3.js} +1 -1
  52. package/dist/assets/{CurrencySelectField-CSPhUjwG-pmwOFla5.js → CurrencySelectField-BAh7SHrG-BkshITI1.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingActivationPage-CoOyWe6_-wtGf6EX0.js → CustomerOnboardingActivationPage-f3Aa6E5r-BN-u2_Er.js} +1 -1
  54. package/dist/assets/CustomerOnboardingContainerPage-CWAtSu08-2m0tglN7.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-CWNyUuRp-BVtMtHa9.js → CustomerOnboardingDetailPageSkeleton-DYuiWn8s-DyEj0_PK.js} +1 -1
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-DWx46Z6R-BwSLIFkW.js → CustomerOnboardingNoStepsPage-Bh_F0-oC-B4pkaivG.js} +1 -1
  57. package/dist/assets/{CustomerOnboardingPage-D86Sj2KP-BtBYr2x0.js → CustomerOnboardingPage-B9hSO88_-FAzWwrV2.js} +1 -1
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-Bo0LFveG-CEfo2zub.js → CustomerOnboardingProductSuitePage-CG0HKCpQ-BhS5AEWe.js} +9 -9
  59. package/dist/assets/{Dashboard-DQLJzr16-DN3HKc3Z.js → Dashboard-BJ_oIHab-D3CSikiX.js} +1 -1
  60. package/dist/assets/{DashboardReportPage-CwfTMXY5-C_5j15IF.js → DashboardReportPage-BemzMw2e-BO_R5QNZ.js} +1 -1
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-CUZGIAxW-DPRdbzyg.js → DashboardSidebarBackgroundAnimation-BtA5oEGG-CpVhfdj6.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-Ci-LxLsk-CVASC-9z.js → DepositAccTransactionItem-CyFi1P_L-B05Q3yKt.js} +1 -1
  63. package/dist/assets/{DepositAccTransactionListPage-RG7P8vQS-f6_CxcW6.js → DepositAccTransactionListPage-DvBRRUdZ-BsXx3hkv.js} +2 -2
  64. package/dist/assets/{DomesticWireDetailsPage-DsPFUOcE-kUCz2PJe.js → DomesticWireDetailsPage-DCDo3aHI-CCdp0z2J.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-BjTf50Dz-Boj9wMkq.js → DownloadOverlay-D_lL1sPW-k0Gho_wZ.js} +1 -1
  66. package/dist/assets/{DrawerPage-0OFinUxM-B5nkeVIH.js → DrawerPage-DesxXhZk-OWoJW-0F.js} +1 -1
  67. package/dist/assets/{EditPeoplePage-BKcOmYVv-Ck0Z2EZi.js → EditPeoplePage-QvPy_Six-qGCX3LOk.js} +1 -1
  68. package/dist/assets/{EditReimbursementDetailPage-BFIHhQbx-Cwo_as3z.js → EditReimbursementDetailPage-C0ZDkboO-8rvb6BkJ.js} +1 -1
  69. package/dist/assets/EntityDetailPage-l7nXIsyF-D_7lbYbC.js +18 -0
  70. package/dist/assets/{EntitySummarySection-ORJ2pE_k-BSMGA0nT.js → EntitySummarySection-BwX0a4JL-CLikGCHh.js} +1 -1
  71. package/dist/assets/{ExpenseAutomationOverviewPage-Dzf7j2zV-CDO8vhiq.js → ExpenseAutomationOverviewPage-EdyHjbff-CJUmXhDL.js} +1 -1
  72. package/dist/assets/{ExpenseAutomationPage-BRsKGeoM-dgp4CthB.js → ExpenseAutomationPage-DA22Qofw-CbU14QhC.js} +1 -1
  73. package/dist/assets/{ExpressPayPage-DlBFtMaR-BrPvYO7P.js → ExpressPayPage-EMP6inpX-BQEnIOd1.js} +1 -1
  74. package/dist/assets/{FeaturePreviewPage-C31F3Gmz-gVQvqxMS.js → FeaturePreviewPage-SYJm-3aR-DJMj_gDm.js} +1 -1
  75. package/dist/assets/{FollowStepsSection-BVT2K7mu-AlvyE5So.js → FollowStepsSection-BxESVqJD-92yEFObK.js} +1 -1
  76. package/dist/assets/{GlobalReviewListPage-0cZe1hh0-Bt8sh97J.js → GlobalReviewListPage-D5_ACa-q-D2Ov8eqV.js} +1 -1
  77. package/dist/assets/{InformationCardStack-t8eELRLU-Dy4Hqrxi.js → InformationCardStack-B_qQUEYD-Dj7LkhKh.js} +2 -2
  78. package/dist/assets/{InsightsCardStack-CJBPZbzD-z1OlCa4_.js → InsightsCardStack-BsQzoVzj-CqL35YGm.js} +1 -1
  79. package/dist/assets/{InsightsSection-tUBzsCix-CLqpVsk2.js → InsightsSection-B6CNlTNH-DSISPSz5.js} +2 -2
  80. package/dist/assets/{IntegrationsSettingsPage-Ce0yKUWI-BgRv8EyO.js → IntegrationsSettingsPage-DP6fAccq-yTNOiOsu.js} +1 -1
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-BzR-rKaL-B3gTDn_N.js → InternationalWireSwiftDetailsPage-VdG7bDZi-C9ew1LgC.js} +1 -1
  82. package/dist/assets/{InternationalWireVerificationPage-7tCXdJ3Y-bWRy9DoF.js → InternationalWireVerificationPage-COC6lZml-mSWqYjiQ.js} +1 -1
  83. package/dist/assets/{InviteFormPage-DePVC0CH-CJQ8Gd7j.js → InviteFormPage-DN02jRy5-Bst7RGZg.js} +1 -1
  84. package/dist/assets/{InvitePageListView-ChbvDKgQ-PjffYLGq.js → InvitePageListView-CP4K9tJi-CurBS3_6.js} +1 -1
  85. package/dist/assets/{InvitePeoplePage-DJiEzIeY-BPFJqA_I.js → InvitePeoplePage-VTM6kM1u-Bam_HxL4.js} +1 -1
  86. package/dist/assets/{InvoiceUploadSection-BjNMjhQR-DiJd5U8P.js → InvoiceUploadSection-it-ZYl1N-DpsU9s1b.js} +1 -1
  87. package/dist/assets/{IssueChargeCardPage-4xbGf5Ut-CZogDoKz.js → IssueChargeCardPage-CVfuvGey-Dkn1Y55k.js} +1 -1
  88. package/dist/assets/{LabeledAddressValue-Czt7QvSJ-FRk7cg6V.js → LabeledAddressValue-DDrQcHIE-DVUytAM2.js} +1 -1
  89. package/dist/assets/{LabeledAddressValueField-Dl3atH92-CnlLWFav.js → LabeledAddressValueField-BgWwd5Gw-1_bA2P1A.js} +1 -1
  90. package/dist/assets/{LabeledControlledCheckBoxField-DT_nxhPN-rV5vnpiF.js → LabeledControlledCheckBoxField-CcPO1k23-euLgngZd.js} +1 -1
  91. package/dist/assets/{LabeledCountryMultiSelectField-BnljZpX0-pSdf65es.js → LabeledCountryMultiSelectField-BYYjzwUG-ByFpwxRF.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-CiInq9yD-CG7y4qr7.js → LabeledCreatableSingleSelectField-CISYMojq-Ds5ZDmF8.js} +1 -1
  93. package/dist/assets/{LabeledDocumentField-Ceb8vgVH-BEhYBMbS.js → LabeledDocumentField-C_bcFxdY-DPVXpSNP.js} +1 -1
  94. package/dist/assets/{LabeledDropDownFormattedTextField-B98gNWTE-D2T9Rb2B.js → LabeledDropDownFormattedTextField-ScGGCap8-Bx7TgIhB.js} +1 -1
  95. package/dist/assets/{LabeledText-CFJSoGtK-Cxmt68DI.js → LabeledText-C8Y7EOsX-YfcyRj6r.js} +1 -1
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CDiG37rQ-BmGjXcuq.js → LabeledUserSingleSelectWithSubtitlesField-C8JxAcOT-bisy62U6.js} +3 -3
  97. package/dist/assets/{LabeledZeniRolesDropDownField-CQiP2rEh-D6KC1rAp.js → LabeledZeniRolesDropDownField-BZtreVpj-B922kPSV.js} +1 -1
  98. package/dist/assets/{LinkJETransactionPage-ANY7Ns42-8thYhnWl.js → LinkJETransactionPage-CKq4oiX9-DqF42vDK.js} +1 -1
  99. package/dist/assets/{LockCardPage-0piclOz3-DLHcJlLm.js → LockCardPage-CZENNby7-DRVoRjI2.js} +1 -1
  100. package/dist/assets/{LowBalancePopup-CplxkRHP-UExHFvGM.js → LowBalancePopup-1727S1ri-BotZCdZD.js} +1 -1
  101. package/dist/assets/MagicLinkACHDetailsPage-BSOlSfNu-Ck7Yx728.js +1 -0
  102. package/dist/assets/MagicLinkDomesticWireDetailsPage-D1DTPo0E-DzmVNJrM.js +1 -0
  103. package/dist/assets/MagicLinkInternationalWireDetailsPage-D_wo_2nm-_HUl3VhW.js +1 -0
  104. package/dist/assets/{MagicLinkSuccessPage-BA1LfhVb-B9oKErD8.js → MagicLinkSuccessPage-QMkZgQLG-Dtoovrbg.js} +1 -1
  105. package/dist/assets/{MagicLinkTitleSection-DLdaV8WG-BnnuDmev.js → MagicLinkTitleSection-CARU1oLQ-BDQbOyHj.js} +1 -1
  106. package/dist/assets/{MailingDetailsSection-BNVPaGFt-DRbnv-E-.js → MailingDetailsSection-ByOPaJ05-BUTtoyYk.js} +6 -6
  107. package/dist/assets/{MyBankConnectionsSettingsPage-BiDvyO_G-BxfkaLSi.js → MyBankConnectionsSettingsPage-BdgIIhL1-jbAanX2l.js} +1 -1
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-Bb4_b9o6-D_AxRnpH.js → MyPendingActivationChargeCardListPage-CX38bDdq-BXFJnqht.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-nY_eDqfm-CruZAkTU.js → MyProfileSettingsPage-DYu0Fx6I-CcKml1T5.js} +1 -1
  110. package/dist/assets/{NavBarWithPicker-Dr5XHgP5-DZR5yxw2.js → NavBarWithPicker-CGGEvLwe-BKxrf_8f.js} +1 -1
  111. package/dist/assets/{NavigationArrow-DT82hMh--Bxjxfzgu.js → NavigationArrow-CTNkKUtV-2iSw8vB0.js} +1 -1
  112. package/dist/assets/{NavigationDots-CwCZ9EAa-jVLSmzI3.js → NavigationDots-Dvce3gHt-DDCP-WPR.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-D1lxnByE-BFVs6Gpv.js → NewGlobalMerchantPage-D_f7z47T-6Ai8ePEI.js} +1 -1
  114. package/dist/assets/{NoDataChart-DCTRXLc7-D5LF3INw.js → NoDataChart-CrKeqWSr-CAkfwHDx.js} +1 -1
  115. package/dist/assets/{NoDataTable-D8Xw5pAY-BgZLVDvg.js → NoDataTable-4vPXmPYF-B_AEofEo.js} +1 -1
  116. package/dist/assets/{NotFoundPage-B_zPUigU-D8lJ4flr.js → NotFoundPage-BLWPU1wU-DwBFIS27.js} +6 -6
  117. package/dist/assets/{NotificationSettingsPage-aKLRiMp--Cp-2qZ_k.js → NotificationSettingsPage-CDiDLX3A-DbdZrkYX.js} +1 -1
  118. package/dist/assets/{NotificationsListConfig-CVEetkBc-Bhff30Ks.js → NotificationsListConfig-B5pDa4cJ-CJvglMha.js} +1 -1
  119. package/dist/assets/{NotificationsPage-DEw6V83J-CxHoLpSk.js → NotificationsPage-Ccl7Dny1-DkOfM7pn.js} +1 -1
  120. package/dist/assets/{OpExByVendorPage-DJMov6Ux-CdOPZnLv.js → OpExByVendorPage-spd-nKV4-gro5HZnt.js} +1 -1
  121. package/dist/assets/{OverlayContainerPage-BG9y5C0t-CYXMPFM7.js → OverlayContainerPage-BG9y5C0t-DQ7U2dYB.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-RBTh1bFk-D0NH3KgV.js → PandLWithForecastPage-TSoe4Z7F-B5IOZhui.js} +1 -1
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-D-kQI4nd-C0_R1ayg.js → PaymentAccountSetupBillingAddressSection-9ma8SpIa-Dp7MlqYC.js} +1 -1
  124. package/dist/assets/{PeoplePage-BEc-Oss7-CShSUyyH.js → PeoplePage-b5_I0qOw-BdZ-JULF.js} +1 -1
  125. package/dist/assets/{Preview-CX5T2DcP.js → Preview-CskSI0Y2.js} +1 -1
  126. package/dist/assets/{ProductsCarousel-BRo0P4GW-SDc6mLnO.js → ProductsCarousel-C3M0ocdF-Cxvmq7ks.js} +1 -1
  127. package/dist/assets/{PromoBaseCards-BrXJEufN-DAnzz-Hq.js → PromoBaseCards-BOGJI2ws-BJ7KS-Ne.js} +1 -1
  128. package/dist/assets/{QBOConnectionDialog-BIg9Iais-4dl6uJJ-.js → QBOConnectionDialog-CmpnnuzP-N5FQpary.js} +1 -1
  129. package/dist/assets/{QBOSetupSection-DDoUJ7L6-3j-67IlN.js → QBOSetupSection-DjnN9dgv-Ci7ynToC.js} +1 -1
  130. package/dist/assets/{ReimbursementApprovalRuleDetailPage-CP0muUGK-RxT1KMUp.js → ReimbursementApprovalRuleDetailPage-D5NXjrO9-G7FD03RU.js} +1 -1
  131. package/dist/assets/{ReimbursementApprovalRulesPage-BpVWq3rk-CR9aTQnl.js → ReimbursementApprovalRulesPage-BsCTIqUJ-DYnf8ClJ.js} +1 -1
  132. package/dist/assets/{ReimbursementDetailPage-pCg86_Ty-BwhcfBe1.js → ReimbursementDetailPage-BbyxE2uL-CxSDUpfx.js} +1 -1
  133. package/dist/assets/{ReimbursementPromoPage-BW6icjG5-mcLOoT_E.js → ReimbursementPromoPage-CyEgwqcf-BAxRR7yW.js} +4 -4
  134. package/dist/assets/{ReimbursementSetUpPage-B6OhWEWH-DIMlAkpI.js → ReimbursementSetUpPage-RETPkEQd-BfC97OkK.js} +4 -4
  135. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-DmDoqEZh-DqiaJS-g.js → ReimbursementsBulkReviewDrawerPage-DnmYl0FM-Cd74ACVd.js} +1 -1
  136. package/dist/assets/{ReloadCard-DIFXZM9U-DiSA6wjy.js → ReloadCard-Bdoo0XiI-CbU6AKcU.js} +1 -1
  137. package/dist/assets/{ReportTableViewSelector-BsIDwouQ-BYIcesly.js → ReportTableViewSelector-Bc1K7mU_-NN_XQWpz.js} +3 -3
  138. package/dist/assets/{ReportsPage-BFTuYQt2-CqrYhEmL.js → ReportsPage-BOTHMLWh-DdFE1MGv.js} +1 -1
  139. package/dist/assets/{RevenueChart-BoFq3ebd-Bff-oH-Y.js → RevenueChart-DvyZ3aO7-DHPO_wEA.js} +1 -1
  140. package/dist/assets/{ReviewDetailsPage-6kCQzaHm-DKGelT35.js → ReviewDetailsPage-BIMg1n2e-CkA1ITE_.js} +1 -1
  141. package/dist/assets/{ReviewOverlay-Dhb-kL6G-DzVZKp1R.js → ReviewOverlay-CxwoiOLC-Bnq-l2FH.js} +1 -1
  142. package/dist/assets/{RoleWithToolTip-BfM8Ltz4-iiSlTQz9.js → RoleWithToolTip-Ct3_VuDM-_iITsTgs.js} +1 -1
  143. package/dist/assets/{ScheduleDetailsFixedAssetsPage-Ccewwmwc-DCelIq8m.js → ScheduleDetailsFixedAssetsPage-DiL5Dozk-D-sJkv0I.js} +3 -3
  144. package/dist/assets/{ScheduleDetailsPage-D4LK83qQ-CvkrnpWB.js → ScheduleDetailsPage-5FWpLRtd-BR7PDtvG.js} +3 -3
  145. package/dist/assets/{ScheduleSequenceTable-BZR2cL6z-DvMvfRpB.js → ScheduleSequenceTable-R3-PsXES-B704swZh.js} +1 -1
  146. package/dist/assets/{ScreenRoutes-BGawIPce.js → ScreenRoutes-BNgKjo0e.js} +1 -1
  147. package/dist/assets/{SetUpAccountSection-CxjYbrXu-CtMlCNu-.js → SetUpAccountSection-CctbMmoK-D5qM49W4.js} +1 -1
  148. package/dist/assets/{SignIn-CVmtPGKL-lMaeYDDV.js → SignIn-CmgmnRm4-DJ-8k4sd.js} +1 -1
  149. package/dist/assets/{SignInScreen-Brs5JZL3.js → SignInScreen-DP9hLXz4.js} +1 -1
  150. package/dist/assets/{SpendManagementListViewPage-BLjP9T8h-BnFTO4D4.js → SpendManagementListViewPage-CFUxCqkU-BytzTuq3.js} +3 -3
  151. package/dist/assets/{SpendManagementPerTabPage-Ck4brjun-DltY6E6W.js → SpendManagementPerTabPage-C-kqNTci-Byg7duEy.js} +1 -1
  152. package/dist/assets/{SpendManagementSection-DAqR2c98-D3bsfefY.js → SpendManagementSection-CIz4nE_w-BLIe7E_T.js} +1 -1
  153. package/dist/assets/StatementItem-vVtoBN2w-H5lMjfJF.js +31 -0
  154. package/dist/assets/{StatementsPage-DcKziEfZ-CGukv1A0.js → StatementsPage-As5WOnMR-DYr-27Vm.js} +1 -1
  155. package/dist/assets/{StatusSwitcher-BI-dgnrK-D28HGb7p.js → StatusSwitcher-Bv-ozN6U-lU56jlZg.js} +1 -1
  156. package/dist/assets/{SubTabSwitcher-BpNI5Wke-ByUqTUrc.js → SubTabSwitcher-D7QeM6nb-4PmLMj94.js} +1 -1
  157. package/dist/assets/SummaryCard-C2qoTsAY-hpn_xEhm.js +1 -0
  158. package/dist/assets/{TaskManagementPage-Bz1uP5hK-BTOSRUmD.js → TaskManagementPage-BJwp32Ph-g3CZaUE9.js} +8 -8
  159. package/dist/assets/{TimeRangeSwitcher-oORYeFzN-DKdPFD--.js → TimeRangeSwitcher-D00bDDhP-Crh2YYPY.js} +1 -1
  160. package/dist/assets/{TimeframeSwitcher-JcJSbn0--CcoqjfKK.js → TimeframeSwitcher-DA99HdHt-Du77XkCa.js} +1 -1
  161. package/dist/assets/{TimeframeSwitcherWithToggle-BEZU-KDj--L6gnxWh.js → TimeframeSwitcherWithToggle-DyggDIQj-DaQpWxtk.js} +2 -2
  162. package/dist/assets/{TopExCard-CF6z0JWk-DhtwacDM.js → TopExCard-Z1WabZ8c-CV-g2xZM.js} +1 -1
  163. package/dist/assets/{TopExDetailPage-DrcKlFuy-l4qqxVxW.js → TopExDetailPage-CzHG4f9E-_r1hd5Zf.js} +6 -6
  164. package/dist/assets/{TransactionActivityLogPage-BB4q0jan-D-0tv-kK.js → TransactionActivityLogPage-CGKnjNfU-CJd8ynVA.js} +1 -1
  165. package/dist/assets/{TransactionDetailPage-DRG_qosz-CP5I3ayE.js → TransactionDetailPage-1-mLOWSz-T4S9c_1A.js} +1 -1
  166. package/dist/assets/{TransactionList-iw4pyMYF-CyZl4b_a.js → TransactionList-BB-xoIGm-B8RHzauJ.js} +1 -1
  167. package/dist/assets/{TransactionListBig-BljAUwAB-DEyq2pmx.js → TransactionListBig-C5Sf5Xh--BB10zRNq.js} +1 -1
  168. package/dist/assets/{TransactionListPage-ReGTmF43-DWJ4i2EV.js → TransactionListPage-Cj7h1Ros-CR24GYSI.js} +1 -1
  169. package/dist/assets/{TransactionVendorDetailPage-DXuYIj-p-DHoN9r-0.js → TransactionVendorDetailPage-SsrSOk3O-CMSt7oTu.js} +1 -1
  170. package/dist/assets/{TransferDrawerPage-C3q8h8Zy-Ci732h-D.js → TransferDrawerPage-BvKZ7vHF-CuCcqZk-.js} +1 -1
  171. package/dist/assets/{TreasuryOverviewPage-DqjFEV9B-DEhPIb9t.js → TreasuryOverviewPage-DwvjMR4_-DJuXDQF6.js} +1 -1
  172. package/dist/assets/{TreasuryPromoPage-ByeK0W_5-BlcmbMLB.js → TreasuryPromoPage-CtTFvSQW-3OarQ2S5.js} +9 -9
  173. package/dist/assets/TreasuryStatementsPage-Catz8shX-vU5UesID.js +58 -0
  174. package/dist/assets/{TreasuryTaxLetterPage-DwLyqS86-ByYY-8mz.js → TreasuryTaxLetterPage-D8hzCL5o-B_tFsKHc.js} +2 -2
  175. package/dist/assets/{TrendChart-Dgh_21FN--kwzHL_J.js → TrendChart-Bnp4Pcdf-DVelkGmA.js} +1 -1
  176. package/dist/assets/{TrendWithTransactions-BgIPapHk-CrdCa3XC.js → TrendWithTransactions-3D1FvM8G-CSo4InzM.js} +1 -1
  177. package/dist/assets/{UncategorizedAccountsMappingPage-DIIJcGrj-5nu10o5v.js → UncategorizedAccountsMappingPage-DbyY-dYB-BA44ympu.js} +1 -1
  178. package/dist/assets/{UnitIntegrationPage-DIOZhQOZ-CSw0hlrX.js → UnitIntegrationPage-CTzme1te-CkMH9YKQ.js} +1 -1
  179. package/dist/assets/{UploadAdditionalDocumentOverlay-qrcEQmkz-BcDGNs5r.js → UploadAdditionalDocumentOverlay-Wl4Spdpn-D59nwhG6.js} +1 -1
  180. package/dist/assets/{Vendor2FAPopup-C58w6vC7-BF3JsPa2.js → Vendor2FAPopup-D0zYKkIv-B3WxVVEB.js} +1 -1
  181. package/dist/assets/VendorACHDetailsPage-YYX9aQdw-UL8mKQvf.js +1 -0
  182. package/dist/assets/{VendorDetailPage-CEQFcNHr-Bd7VSPmb.js → VendorDetailPage-Br9wIOnI-MiPypEL_.js} +1 -1
  183. package/dist/assets/VendorDomesticWireDetailsPage-BpPgQRHI-Doixu70d.js +1 -0
  184. package/dist/assets/{VendorFiling1099EditablePage-Dl7jZYBV-0lRgJr-n.js → VendorFiling1099EditablePage-himC7iD3-aK-FBD-o.js} +1 -1
  185. package/dist/assets/{VendorFirstReviewPage-yVbtg_tG-CqOvdGf3.js → VendorFirstReviewPage-BbknTCBD-RpSPDveD.js} +1 -1
  186. package/dist/assets/{VendorInternationalWireDetailsPage-DNDv_s8G-DQjciQSb.js → VendorInternationalWireDetailsPage-CS595Xgc-BFwPNTjE.js} +1 -1
  187. package/dist/assets/VendorInternationalWireSwiftDetailsPage-yhTjWXvw-D8lZKLu0.js +1 -0
  188. package/dist/assets/{VendorsAccountsSection-Cscbgqrx-C1RHlvPz.js → VendorsAccountsSection-CgSJu8wq-CcmStoDy.js} +1 -1
  189. package/dist/assets/{VerifyDevice-D1vsUSdJ-BBkN3s70.js → VerifyDevice-Dvf0JsNN-DTrHqfeh.js} +1 -1
  190. package/dist/assets/{VideoPlayer-TlEy-oD0-DPajHNBJ.js → VideoPlayer-VAzOGCDL-Dcpb5Ypp.js} +2 -2
  191. package/dist/assets/{VideoPopup-3DD646kG-DcWerFCQ.js → VideoPopup-BqvZ-XIh-EN-DDLM7.js} +4 -4
  192. package/dist/assets/{WarningsDrawerPage-Fj5zTXdi-flkoMF6L.js → WarningsDrawerPage-DeNonoNp-D09UQplv.js} +1 -1
  193. package/dist/assets/{ZeniAccountDetailPage-BbsXzuHD-9QRb-G6q.js → ZeniAccountDetailPage-GcwTJdB8-Dd8t1-yB.js} +1 -1
  194. package/dist/assets/{ZeniAccountListViewPage-lmuVUpKS-CuGYg-R2.js → ZeniAccountListViewPage-CdwO0Duy-BO2aQzFc.js} +1 -1
  195. package/dist/assets/{ZeniAccountNavBarPieces-CQhwBKXD-CXrBS44d.js → ZeniAccountNavBarPieces-BrSIfL36-BX20H3cn.js} +1 -1
  196. package/dist/assets/{ZeniAccountPromoPage-CXEb9tRE-3JGhoGmA.js → ZeniAccountPromoPage-JrcedQYB-yS--HdV-.js} +1 -1
  197. package/dist/assets/{ZeniAccountSetupPage-DPhYQu6u-Cj4QNcEI.js → ZeniAccountSetupPage-TKBfbgzJ-BgxZZ70U.js} +1 -1
  198. package/dist/assets/{ZeniCopyright-pvaggW6x-BqjkqJsc.js → ZeniCopyright-DglqrTpl-5K7hWC6N.js} +1 -1
  199. package/dist/assets/{ZeniTransferAmountSlider-Dlyom9dD-DkUIp6PD.js → ZeniTransferAmountSlider-BcaZZuAw-CNzhTlHz.js} +1 -1
  200. package/dist/assets/{add-to-wallet-DgdBD8_G-DUoHYHL7.js → add-to-wallet-DgdBD8_G-BFk5zTW3.js} +1 -1
  201. package/dist/assets/{analytics-BewK2g0S.js → analytics-uGzTqGx1.js} +1 -1
  202. package/dist/assets/{analyticsHelper-AeOsAjMK-Ci2hren8.js → analyticsHelper-CAYdbjhS-CbXlhF0X.js} +1 -1
  203. package/dist/assets/{analyticsHelper-Du1RmyHh.js → analyticsHelper-CJT_EkQg.js} +1 -1
  204. package/dist/assets/{arrow-south-east-round-PEovUgvH-IVgPuzbG.js → arrow-south-east-round-PEovUgvH-D4OZgj3r.js} +1 -1
  205. package/dist/assets/{auto-transfer-rule-mbafm5D3-B6OVEsNZ.js → auto-transfer-rule-mbafm5D3-Divy6cES.js} +1 -1
  206. package/dist/assets/{chartTypes-BLsP7rGF-CqVdxH4Z.js → chartTypes-CD3vrBsI-CvXENNfl.js} +1 -1
  207. package/dist/assets/{commonDimensions-DIm7kTtR-vEiJGtqA.js → commonDimensions-Oz1tdAcx-BJKhGsnL.js} +1 -1
  208. package/dist/assets/{commonTypes-B3mnx2x_-BJwPTlX8.js → commonTypes-5tEXwrX4-BvhObQ7j.js} +1 -1
  209. package/dist/assets/{constants-BfTj_HfY.js → constants-DhUwwCD7.js} +1 -1
  210. package/dist/assets/{core-pNImhQEZ.js → core-gc5ND_yy.js} +1 -1
  211. package/dist/assets/{dash.all.min-BXTeE7c6.js → dash.all.min-CzlxgLf2.js} +1 -1
  212. package/dist/assets/{downloadPdf-B5WrL0K1-C-zT0Hsb.js → downloadPdf-Dsuxeias-A2bbtbVa.js} +1 -1
  213. package/dist/assets/{empty-DAqaP3I7.js → empty-CDyK13UU.js} +1 -1
  214. package/dist/assets/{empty-Blhza4DW.js → empty-CcGTwUPn.js} +1 -1
  215. package/dist/assets/{epic-u9zN-ile.js → epic-BSSEFpHM.js} +1 -1
  216. package/dist/assets/{gift-box-Cmt9OgIZ-DPkpZVRO.js → gift-box-Cmt9OgIZ-DR9Akjs9.js} +1 -1
  217. package/dist/assets/{graphic-no-data-l-DU4J8fDt-DGfMOe4J.js → graphic-no-data-l-DU4J8fDt-1A69LwX-.js} +1 -1
  218. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-pdP8fLN0.js → graphic-no-data-net-burn-l-CzmycA0m-hemyIa-W.js} +1 -1
  219. package/dist/assets/{handshake-BPg58FML-DUpb1X9A.js → handshake-BPg58FML-DJU2g1k7.js} +1 -1
  220. package/dist/assets/{helper-BVESv00--CvIet0PS.js → helper-Ckm10Uko-D-gLYGRP.js} +1 -1
  221. package/dist/assets/{index-CIISShoa.js → index-7x2_8U2Z.js} +1 -1
  222. package/dist/assets/{index-DJBjO3h6.js → index-BXszvLP6.js} +1 -1
  223. package/dist/assets/{index-lSeuN6he.js → index-C85N4mmE.js} +1 -1
  224. package/dist/assets/{index-BPaR2lvP.js → index-CUxbisrq.js} +7 -7
  225. package/dist/assets/{index-C0614m_b.js → index-DJJ-8bYf.js} +1 -1
  226. package/dist/assets/{index-DdijllDO.js → index-DmEInPYU.js} +1 -1
  227. package/dist/assets/{index-Crg8G4Oy.js → index-Dns-GxvR.js} +1 -1
  228. package/dist/assets/{lexical-BUygpfI7.js → lexical-zfv1-tRH.js} +1 -1
  229. package/dist/assets/{liveblocks-C4DKHbPz.js → liveblocks-DTtNefcp.js} +1 -1
  230. package/dist/assets/{lottie-CsNuSf0J.js → lottie-BctA_6Pz.js} +1 -1
  231. package/dist/assets/mapLoadingInProgressToTreeNode-jcHEi-mv-CuAQ3LfH.js +1 -0
  232. package/dist/assets/mapSectionWithAcOnlyToTreeNode-Cgyt68f3-CwLJBfzm.js +1 -0
  233. package/dist/assets/mapSpacerToTreeNode-XgUp1xUb-B2q1ZmG3.js +1 -0
  234. package/dist/assets/mapTimeframeBalancesToTreeNode-Bre8FfBF-DhXKj6L8.js +1 -0
  235. package/dist/assets/mapTimeframeBalancesToTreeNode-DOyCX6ij-Cc0ArlOT.js +1 -0
  236. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-D2IvFyR5-eZfXMDx3.js +1 -0
  237. package/dist/assets/{mui-Bxat3ZJX.js → mui-CW7vGIKQ.js} +1 -1
  238. package/dist/assets/{page-detail-CWX5S47F-BOoV26hp.js → page-detail-CWX5S47F-CURtp-Kt.js} +1 -1
  239. package/dist/assets/{panelSelectedMixin-Cddsb26L-BjB1AJvP.js → panelSelectedMixin-Cddsb26L-270aHsWR.js} +1 -1
  240. package/dist/assets/{radio-default-CiSgisfh-BmOKc6LH.js → radio-default-CiSgisfh-NpjFGVm3.js} +1 -1
  241. package/dist/assets/{react-D5yO6y1s.js → react-4IaoU2Ar.js} +1 -1
  242. package/dist/assets/{react-CNEw58lh.js → react-BxD6EI1V.js} +2 -2
  243. package/dist/assets/{react-Cm6WQ6_v.js → react-C2Rg6f-G.js} +1 -1
  244. package/dist/assets/{react-D_lAXSty.js → react-C6o_c0l9.js} +1 -1
  245. package/dist/assets/{react-BOEG9dGs.js → react-ClMWdYr1.js} +1 -1
  246. package/dist/assets/{react-C7fLwcbQ.js → react-Cp9-IfdP.js} +1 -1
  247. package/dist/assets/{react-DueUee8t.js → react-tSlc14NL.js} +1 -1
  248. package/dist/assets/{react-U6Tf1But.js → react-zfCjE7gH.js} +1 -1
  249. package/dist/assets/{recharts-BNNpZjq4.js → recharts-CUzMVol9.js} +1 -1
  250. package/dist/assets/{sentry-BLwIhkwX.js → sentry-tsfGilE0.js} +1 -1
  251. package/dist/assets/{shield-DOlUxcFf-Cc6VP7oN.js → shield-DOlUxcFf-D2WjmHlw.js} +1 -1
  252. package/dist/assets/toCOABalancesWithID-aLNB35t7-SXHRhJKA.js +1 -0
  253. package/dist/assets/{toChartData-BkubFDq8-B4V-ZeX3.js → toChartData-DUL6vnzJ-BytIs-si.js} +1 -1
  254. package/dist/assets/{upload-reimbursement-receipt-O2N8vcO7-CQrVRWqf.js → upload-reimbursement-receipt-O2N8vcO7-BD8zTKik.js} +1 -1
  255. package/dist/assets/{uploadAttachment-CzgakLtr-FUE9ukdA.js → uploadAttachment-Ck4wivBR-ChZLp45S.js} +1 -1
  256. package/dist/assets/{uploadReceipts-CIgkuVpu-BlYUkFyf.js → uploadReceipts-CIgkuVpu-DyKGxWBD.js} +1 -1
  257. package/dist/assets/{url-Buh6q1yH.js → url-CdkVWkur.js} +1 -1
  258. package/dist/assets/{url-D-StvbsH.js → url-hxlOC5jn.js} +1 -1
  259. package/dist/assets/{useLongPress-GCK2COYQ-BMYHxmnu.js → useLongPress-GCK2COYQ-Bs1ArQdX.js} +1 -1
  260. package/dist/assets/{usp-line-BBd1wKwW-D7JQFCiS.js → usp-line-BBd1wKwW-C0cfP0ma.js} +1 -1
  261. package/dist/assets/{utils--7vqVVLA.js → utils-yWIuTv4c.js} +1 -1
  262. package/dist/assets/{zeni-epic-state-BFw7CFlI.js → zeni-epic-state-DGV_6n4t.js} +3 -3
  263. package/dist/index.html +1 -1
  264. package/package.json +2 -2
  265. package/dist/assets/ApAgingDetailPage-B-1gVAu6-w7sdpjRB.js +0 -46
  266. package/dist/assets/ChargeCardPromoPage-CKl6K-nr-COCFmmiU.js +0 -222
  267. package/dist/assets/CustomerOnboardingContainerPage-B4YFIOQJ-DdbOtAcj.js +0 -1
  268. package/dist/assets/EntityDetailPage-D8FzsqNk-CG3MehFe.js +0 -18
  269. package/dist/assets/MagicLinkACHDetailsPage-BKh8WrCR-CJTPXF_W.js +0 -1
  270. package/dist/assets/MagicLinkDomesticWireDetailsPage-Cv19HbKi-eRBr2jDq.js +0 -1
  271. package/dist/assets/MagicLinkInternationalWireDetailsPage-DbFxpWOg-5Vd_zD2R.js +0 -1
  272. package/dist/assets/StatementItem-B_iG99XI-DShgH8Uj.js +0 -31
  273. package/dist/assets/SummaryCard-HW-1WXN9-DgoIvjKG.js +0 -1
  274. package/dist/assets/TreasuryStatementsPage-BjGwvMFL-D5A922Fc.js +0 -58
  275. package/dist/assets/VendorACHDetailsPage-BbxRwrEv-X-7CEh7O.js +0 -1
  276. package/dist/assets/VendorDomesticWireDetailsPage-C02ZhGg3-DqNaULem.js +0 -1
  277. package/dist/assets/VendorInternationalWireSwiftDetailsPage-Bdt0UR_b-BhVAEsXP.js +0 -1
  278. package/dist/assets/mapLoadingInProgressToTreeNode-DJxRl0X1-BzVEhFHM.js +0 -1
  279. package/dist/assets/mapSectionWithAcOnlyToTreeNode-BIiMj0sc-DyRqPtzX.js +0 -1
  280. package/dist/assets/mapSpacerToTreeNode-Bj3f2irs-pY4MxoTp.js +0 -1
  281. package/dist/assets/mapTimeframeBalancesToTreeNode-AI17uMHa-DIcj-r1q.js +0 -1
  282. package/dist/assets/mapTimeframeBalancesToTreeNode-CyO5pm8k-DatRVo4t.js +0 -1
  283. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-NKafOEXu-DczrPoPI.js +0 -1
  284. package/dist/assets/toCOABalancesWithID-BWMF0py6-CZsR1gS6.js +0 -1
@@ -1,23 +1,23 @@
1
- import{e as x,V as e,ac as p,aq as $,b_ as g,o as i,bu as y,bM as b,x as c,an as S,u as h}from"./index-BPaR2lvP.js";import{a as z}from"./sentry-BLwIhkwX.js";import{n as t,c as j}from"./mui-Bxat3ZJX.js";import{J as v}from"./CollapsableReportTable-CIaa7SIH-CnDLtSkq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="5fd919e5-37f9-4873-b69b-ba7a25a2eb47",o._sentryDebugIdIdentifier="sentry-dbid-5fd919e5-37f9-4873-b69b-ba7a25a2eb47")}catch{}})();const w={tooltipLeftPosition:new c(h[0],-156),tooltipTopPosition:new c(h[3],h[4]),tooltipWidth:new c(300,350)},u=j`
1
+ import{e as x,V as e,ac as c,aq as $,b_ as g,o as i,bu as y,bM as u,x as p,an as S,u as h}from"./index-CUxbisrq.js";import{a as z}from"./sentry-tsfGilE0.js";import{n as t,c as j}from"./mui-CW7vGIKQ.js";import{J as v}from"./CollapsableReportTable-DNfFkAts-DG-tRdjC.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="01ca30d2-0b24-41e4-ae44-5a6b3fa4c062",o._sentryDebugIdIdentifier="sentry-dbid-01ca30d2-0b24-41e4-ae44-5a6b3fa4c062")}catch{}})();const w={tooltipLeftPosition:new p(h[0],-156),tooltipTopPosition:new p(h[3],h[4]),tooltipWidth:new p(300,350)},b=j`
2
2
  position: relative;
3
3
  `,T=t.div`
4
4
  color: ${o=>o.theme.colors.primary};
5
- ${o=>o.windowSize==="small"?u:null}
5
+ ${o=>o.windowSize==="small"?b:null}
6
6
  `,k=t(g)``,D=t.div`
7
7
  display: inline-block;
8
8
  padding-left: ${i.sp2};
9
9
  vertical-align: middle;
10
- ${o=>o.windowSize!=="small"?u:null}
10
+ ${o=>o.windowSize!=="small"?b:null}
11
11
  `,P=t(y)`
12
12
  padding-left: ${i.sp3};
13
- `,I=t(b)`
13
+ `,I=t(u)`
14
14
  width: ${i.sp4};
15
15
  height: ${i.sp4};
16
16
  color: ${o=>o.theme.colors.grey1};
17
17
  &:hover {
18
18
  color: ${o=>o.theme.colors.champion};
19
19
  }
20
- `,_=t(b)`
20
+ `,_=t(u)`
21
21
  width: ${i.sp4};
22
22
  height: ${i.sp4};
23
23
 
@@ -35,4 +35,4 @@ import{e as x,V as e,ac as p,aq as $,b_ as g,o as i,bu as y,bM as b,x as c,an as
35
35
  top: calc(100% + ${o=>w.tooltipTopPosition.valuePx(o.windowSize)});
36
36
  `,E=t(S)`
37
37
  color: ${o=>o.theme.colors.hero};
38
- `,V=o=>{const{infotipDescription:s,windowSize:n,isToolTipOpen:l}=o;return l===!1?null:e.jsx(C,{windowSize:n,children:e.jsx(E,{children:s})})};function O({balance:o,dateText:s,showInfotip:n,infotipDescription:l}){const a=x(),[f,d]=z.useState(!1),m=()=>f?e.jsx(_,{onClick:()=>{d(r=>!r)}}):e.jsx(I,{onClick:()=>{d(r=>!r)}});return e.jsxs(T,{windowSize:a,"data-testid":p("balances-insight"),children:[e.jsx(k,{"data-testid":p("balances-insight","amount"),children:v(o)}),e.jsx(P,{"data-testid":p("balances-insight","date"),children:s}),n===!0?e.jsx($,{onClickAway:()=>d(!1),children:e.jsxs(D,{windowSize:a,children:[e.jsx(m,{}),e.jsx(V,{isToolTipOpen:f,infotipDescription:l,windowSize:a})]})}):null]})}export{O as H};
38
+ `,V=o=>{const{infotipDescription:s,windowSize:n,isToolTipOpen:l}=o;return l===!1?null:e.jsx(C,{windowSize:n,children:e.jsx(E,{children:s})})};function O({balance:o,dateText:s,showInfotip:n,infotipDescription:l}){const a=x(),[f,d]=z.useState(!1),m=()=>f?e.jsx(_,{onClick:()=>{d(r=>!r)}}):e.jsx(I,{onClick:()=>{d(r=>!r)}});return e.jsxs(T,{windowSize:a,"data-testid":c("balances-insight"),children:[e.jsx(k,{"data-testid":c("balances-insight","amount"),children:v(o)}),e.jsx(P,{"data-testid":c("balances-insight","date"),children:s}),n===!0?e.jsx($,{onClickAway:()=>d(!1),children:e.jsxs(D,{windowSize:a,children:[e.jsx(m,{}),e.jsx(V,{isToolTipOpen:f,infotipDescription:l,windowSize:a})]})}):null]})}export{O as H};
@@ -1,4 +1,4 @@
1
- import{e as T,cU as B,aS as A,eJ as P,O as S,x as n,V as t,cV as f,cX as w,cZ as R,b3 as L,o as g,fa as D,fb as V,ac as z,u as a,L as q,an as H}from"./index-BPaR2lvP.js";import{a as C}from"./sentry-BLwIhkwX.js";import{n as b}from"./mui-Bxat3ZJX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="aa29e2d3-4d5f-41ba-a80b-e7d476917eeb",e._sentryDebugIdIdentifier="sentry-dbid-aa29e2d3-4d5f-41ba-a80b-e7d476917eeb")}catch{}})();const E=b.div`
1
+ import{e as T,cU as B,aS as A,eJ as P,O as S,x as n,V as t,cV as f,cX as w,cZ as R,b3 as L,o as g,fa as D,fb as V,ac as z,u as a,L as q,an as H}from"./index-CUxbisrq.js";import{a as C}from"./sentry-tsfGilE0.js";import{n as b}from"./mui-CW7vGIKQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="aa29e2d3-4d5f-41ba-a80b-e7d476917eeb",e._sentryDebugIdIdentifier="sentry-dbid-aa29e2d3-4d5f-41ba-a80b-e7d476917eeb")}catch{}})();const E=b.div`
2
2
  color: ${e=>e.theme.colors.primary};
3
3
  align-items: center;
4
4
  justify-content: flex-end;
@@ -1,4 +1,4 @@
1
- import{e as $,V as n,ac as u,c1 as f,o as i,x as t,cc as x,N as b,M as y,O as k,d as s,p as v,an as z,u as o}from"./index-BPaR2lvP.js";import{n as a}from"./mui-Bxat3ZJX.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="760b84b1-75e3-498f-9e53-36def03f1ae3",e._sentryDebugIdIdentifier="sentry-dbid-760b84b1-75e3-498f-9e53-36def03f1ae3")}catch{}})();const{common:{navBar:{back:j}}}=k.getLocalizedStrings(),d={navBarContainerPadding:new t(10,o[3]),customTitleMarginBottom:new t(o[0],o[3]),customTitleMarginLeft:new t(o[3],o[6]),customTitleMarginRight:new t(o[5],o[8])},P={formTitle:new b("h6Medium","h5Medium")},R=({header:e,isDirty:r,isMagicLink:c,onBackClick:m,setShowConfirmationPopup:p})=>{const l=$();return n.jsxs(n.Fragment,{children:[l==="small"?n.jsxs(S,{windowSize:l,children:[c?null:n.jsx(w,{onClick:()=>r?p?.(!0):m?.(),"data-testid":u("bank-account-page-back-click-mobile")}),n.jsx(h,{windowSize:l,children:e})]}):n.jsx(M,{children:c?null:n.jsx(f,{title:j,enterDelay:600,placement:"bottom",children:n.jsx(w,{onClick:()=>r?p?.(!0):m?.(),"data-testid":u("bank-account-page-back-click")})})}),l!=="small"?n.jsx(h,{windowSize:l,children:e}):null]})},h=a(y)`
1
+ import{e as $,V as n,ac as u,c1 as f,o as i,x as t,cc as x,N as b,M as y,O as k,d as s,p as v,an as z,u as o}from"./index-CUxbisrq.js";import{n as a}from"./mui-CW7vGIKQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="760b84b1-75e3-498f-9e53-36def03f1ae3",e._sentryDebugIdIdentifier="sentry-dbid-760b84b1-75e3-498f-9e53-36def03f1ae3")}catch{}})();const{common:{navBar:{back:j}}}=k.getLocalizedStrings(),d={navBarContainerPadding:new t(10,o[3]),customTitleMarginBottom:new t(o[0],o[3]),customTitleMarginLeft:new t(o[3],o[6]),customTitleMarginRight:new t(o[5],o[8])},P={formTitle:new b("h6Medium","h5Medium")},R=({header:e,isDirty:r,isMagicLink:c,onBackClick:m,setShowConfirmationPopup:p})=>{const l=$();return n.jsxs(n.Fragment,{children:[l==="small"?n.jsxs(S,{windowSize:l,children:[c?null:n.jsx(w,{onClick:()=>r?p?.(!0):m?.(),"data-testid":u("bank-account-page-back-click-mobile")}),n.jsx(h,{windowSize:l,children:e})]}):n.jsx(M,{children:c?null:n.jsx(f,{title:j,enterDelay:600,placement:"bottom",children:n.jsx(w,{onClick:()=>r?p?.(!0):m?.(),"data-testid":u("bank-account-page-back-click")})})}),l!=="small"?n.jsx(h,{windowSize:l,children:e}):null]})},h=a(y)`
2
2
  ${e=>`${P.formTitle.style(e.windowSize)}`};
3
3
  color: ${e=>e.theme.colors.primary};
4
4
  margin-bottom: ${e=>d.customTitleMarginBottom.valuePx(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{g as be,e as je,aa as Ye,cQ as Qe,V as t,bE as Ze,o as i,O as re,x as I,ao as et,an as D,L as se,cu as tt,ae as nt,c1 as it,u as v,bb as ot,w as Ne,N as at,a9 as ze,cU as ct,aS as J,aX as fe,fO as Te,eJ as lt,by as He,fP as _e,fQ as st,fR as qe,c9 as Oe,fS as rt,fT as dt,fU as ge,fV as we,fW as Pe,aQ as Se,cm as xe,ac as ut,bM as pt,d_ as Je,d as ne,ak as B,fX as ht,fY as mt,fZ as ft,bk as gt,f_ as wt}from"./index-BPaR2lvP.js";import{a as r}from"./sentry-BLwIhkwX.js";import{n}from"./mui-Bxat3ZJX.js";import{r as Ie}from"./core-pNImhQEZ.js";import{bJ as St,bK as ie,bL as Ee}from"./zeni-epic-state-BFw7CFlI.js";import{a as xt}from"./SetUpAccountSection-CxjYbrXu-CtMlCNu-.js";import"./liveblocks-C4DKHbPz.js";import"./recharts-BNNpZjq4.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="7fdb8ee6-c6a6-4934-8467-d054129dd802",e._sentryDebugIdIdentifier="sentry-dbid-7fdb8ee6-c6a6-4934-8467-d054129dd802")}catch{}})();const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,yt={value:de.productType,width:new I(100,19)},bt={value:de.primaryAccount,width:new I(100,36)},vt={value:de.linkAccount,width:new I(100,22)},kt={value:de.status,width:new I(12,12)},$t={value:de.balance,width:new I(12,13)},N=[yt,bt,vt,kt,$t],{common:{settings:Fe,strings:{hyphen:ve}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(v[3],v[4]),containerRightPadding:new I(v[3],v[8]),iconContainerMaxWidthHeight:new I(v[6],v[7]),iconWidthHeight:new I(20,v[4]),iconPadding:new I(v[1],12),productTypeContainerMarginBottom:new I(v[3],v[0]),linkAccountContainerMarginTop:new I(v[3],v[0]),productTypeIconSize:new I(v[3],v[4])},At="bankConnectionsSettingsPage",Ct=({productType:e,windowSize:d})=>{switch(e){case"bill_pay":return t.jsx(Ht,{windowSize:d,children:t.jsx(gt,{})});case"reimbursement":return t.jsx(qt,{windowSize:d,children:t.jsx(ft,{})});case"zeni_accounts":return t.jsx(Jt,{windowSize:d,children:t.jsx(He,{})});case"zeni_treasury":return t.jsx(Kt,{windowSize:d,children:t.jsx(mt,{})});case"charge_cards":default:return t.jsx(Gt,{windowSize:d,children:t.jsx(ht,{})})}},jt=({allBankAccounts:e,setupView:d,connectedAccountProvider:H,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:V})=>{const A=be(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:M}}=ct(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=d,m=U.link_account,k=U.update_account,[p,C]=r.useState(void 0),[q,b]=r.useState(!1),W=()=>{b(!0)},u=p==="update_account"?k:m,[S,L]=r.useState(u.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let h,O,s,j=!1;o!=null&&(o.accType==="depositAccount"?h={code:"verified",name:"Verified"}:(h=o.providerVerificationStatus,O=o?.institutionDetails,s=h?.code,j=o?.isLoginRequired??!1));const X=J(m.updateStatus.fetchState),Y=J(k.updateStatus.fetchState),Z=J(k.fetchStatus.fetchState),E=A.mode==="light"?new fe(A.colors.brandColorJadeLight):new fe(A.colors.brandColorJadeDark),G=r.useCallback((x,K)=>{f.trackConnectBankSuccess(l,"Settings");const Le=K.accounts.find(Xe=>Xe.id===o?.providerAccountId)??K.accounts[0];o?.id!=null&&p==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),C(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,p,j,_,P]),ee=r.useCallback((x,K)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,K)),C(void 0),z(!1)},[f,l,o?.id,_]),{open:Q,ready:ue}=Te({token:S,onSuccess:G,onExit:ee});r.useEffect(()=>{(X==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Y==="In-Progress"&&k.updateStatus.fetchState==="Completed")&&(St(s??"")||(R("link_account",y(l)),V(y(l),l)))},[m.updateStatus.fetchState,V,R,o?.providerVerificationStatus?.code,o?.id,X,Y,k.updateStatus.fetchState,s,l]),r.useEffect(()=>{(ie(s??"")||s==="verification_failed")&&!$&&p!=null&&u.linkToken===S&&u.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,u.fetchStatus.fetchState,u.linkToken,s,p,$]);const oe=$e(At,"primaryAccountSection"),F=lt(M,oe);r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==S&&L(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,S]),r.useEffect(()=>{$&&Q()},[$,Q]),r.useEffect(()=>{!o?.zeniAccountId&&!F&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||ie(s))&&(Ee(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const te=()=>{f.trackConnectBankGetBalance(l,"Settings"),C("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Ke={element:t.jsx(He,{width:T.iconWidthHeight.valuePx(c)}),color:E};return t.jsxs(zt,{windowSize:c,children:[q===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:H,action:{onBackClick:()=>b(!1)}}),document.body):null,t.jsxs(Tt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Pt,{windowSize:c,isDarkMode:A.mode==="dark",children:t.jsx(Ct,{productType:l,windowSize:c})}),t.jsx(_t,{children:Fe.productNameByType[l]})]}),t.jsx(It,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Rt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Bt,{isDisabled:j,children:st(Ke,c,A.mode==="dark",o,Ge,!1)}):null,t.jsxs(Vt,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:A.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:v[4],fontWeight:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:A.colors.hero,weight:Oe.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,K)=>dt(a,x,K),valueToSubLabels:(x,K)=>rt(a,x,K,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),C("link_account"),m.linkToken==null||Ee(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Q():z(!0)}}),t.jsxs(Lt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(Ot,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Ft,{}):null]}):null,c==="small"&&h!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:h.name,textColor:we(h.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:l,isUpdateLinkClicked:p==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:k.fetchStatus,updateStatus:k.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:Z,prevUpdateState:Y},onUpdateLinkTokenClick:te,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Ut,{children:[o?.accountBalance?.available?t.jsx(Re,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(ke,{children:ve}),o?.accountBalance?.lastRefreshTime?t.jsx(Ve,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Dt,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":ut("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Et,{children:Fe.bankConnectionHeader.linkAccount}):null,t.jsx(Nt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Wt,{windowSize:c,wrapperWidth:N[3].width,children:h!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:h.name,textColor:we(h.code)}):t.jsx(ke,{children:ve})}):null,c!=="small"?t.jsxs(Mt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Re,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(ke,{children:ve}),o?.accountBalance?.lastRefreshTime?t.jsx(Ve,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},zt=n.div`
1
+ import{g as be,e as je,aa as Ye,cQ as Qe,V as t,bE as Ze,o as i,O as re,x as I,ao as et,an as D,L as se,cu as tt,ae as nt,c1 as it,u as v,bb as ot,w as Ne,N as at,a9 as ze,cU as ct,aS as J,aX as fe,fO as Te,eJ as lt,by as He,fP as _e,fQ as st,fR as qe,c9 as Oe,fS as rt,fT as dt,fU as ge,fV as we,fW as Pe,aQ as Se,cm as xe,ac as ut,bM as pt,d_ as Je,d as ne,ak as B,fX as ht,fY as mt,fZ as ft,bk as gt,f_ as wt}from"./index-CUxbisrq.js";import{a as r}from"./sentry-tsfGilE0.js";import{n}from"./mui-CW7vGIKQ.js";import{r as Ie}from"./core-gc5ND_yy.js";import{bJ as St,bK as ie,bL as Ee}from"./zeni-epic-state-DGV_6n4t.js";import{a as xt}from"./SetUpAccountSection-CctbMmoK-D5qM49W4.js";import"./liveblocks-DTtNefcp.js";import"./recharts-CUzMVol9.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="4a2f8c30-f059-419d-b01b-2f5375c75914",e._sentryDebugIdIdentifier="sentry-dbid-4a2f8c30-f059-419d-b01b-2f5375c75914")}catch{}})();const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,yt={value:de.productType,width:new I(100,19)},bt={value:de.primaryAccount,width:new I(100,36)},vt={value:de.linkAccount,width:new I(100,22)},kt={value:de.status,width:new I(12,12)},$t={value:de.balance,width:new I(12,13)},N=[yt,bt,vt,kt,$t],{common:{settings:Fe,strings:{hyphen:ve}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(v[3],v[4]),containerRightPadding:new I(v[3],v[8]),iconContainerMaxWidthHeight:new I(v[6],v[7]),iconWidthHeight:new I(20,v[4]),iconPadding:new I(v[1],12),productTypeContainerMarginBottom:new I(v[3],v[0]),linkAccountContainerMarginTop:new I(v[3],v[0]),productTypeIconSize:new I(v[3],v[4])},At="bankConnectionsSettingsPage",Ct=({productType:e,windowSize:d})=>{switch(e){case"bill_pay":return t.jsx(Ht,{windowSize:d,children:t.jsx(gt,{})});case"reimbursement":return t.jsx(qt,{windowSize:d,children:t.jsx(ft,{})});case"zeni_accounts":return t.jsx(Jt,{windowSize:d,children:t.jsx(He,{})});case"zeni_treasury":return t.jsx(Kt,{windowSize:d,children:t.jsx(mt,{})});case"charge_cards":default:return t.jsx(Gt,{windowSize:d,children:t.jsx(ht,{})})}},jt=({allBankAccounts:e,setupView:d,connectedAccountProvider:H,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:V})=>{const A=be(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:M}}=ct(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=d,m=U.link_account,k=U.update_account,[p,C]=r.useState(void 0),[q,b]=r.useState(!1),W=()=>{b(!0)},u=p==="update_account"?k:m,[S,L]=r.useState(u.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let h,O,s,j=!1;o!=null&&(o.accType==="depositAccount"?h={code:"verified",name:"Verified"}:(h=o.providerVerificationStatus,O=o?.institutionDetails,s=h?.code,j=o?.isLoginRequired??!1));const X=J(m.updateStatus.fetchState),Y=J(k.updateStatus.fetchState),Z=J(k.fetchStatus.fetchState),E=A.mode==="light"?new fe(A.colors.brandColorJadeLight):new fe(A.colors.brandColorJadeDark),G=r.useCallback((x,K)=>{f.trackConnectBankSuccess(l,"Settings");const Le=K.accounts.find(Xe=>Xe.id===o?.providerAccountId)??K.accounts[0];o?.id!=null&&p==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),C(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,p,j,_,P]),ee=r.useCallback((x,K)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,K)),C(void 0),z(!1)},[f,l,o?.id,_]),{open:Q,ready:ue}=Te({token:S,onSuccess:G,onExit:ee});r.useEffect(()=>{(X==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Y==="In-Progress"&&k.updateStatus.fetchState==="Completed")&&(St(s??"")||(R("link_account",y(l)),V(y(l),l)))},[m.updateStatus.fetchState,V,R,o?.providerVerificationStatus?.code,o?.id,X,Y,k.updateStatus.fetchState,s,l]),r.useEffect(()=>{(ie(s??"")||s==="verification_failed")&&!$&&p!=null&&u.linkToken===S&&u.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,u.fetchStatus.fetchState,u.linkToken,s,p,$]);const oe=$e(At,"primaryAccountSection"),F=lt(M,oe);r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==S&&L(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,S]),r.useEffect(()=>{$&&Q()},[$,Q]),r.useEffect(()=>{!o?.zeniAccountId&&!F&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||ie(s))&&(Ee(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const te=()=>{f.trackConnectBankGetBalance(l,"Settings"),C("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Ke={element:t.jsx(He,{width:T.iconWidthHeight.valuePx(c)}),color:E};return t.jsxs(zt,{windowSize:c,children:[q===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:H,action:{onBackClick:()=>b(!1)}}),document.body):null,t.jsxs(Tt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Pt,{windowSize:c,isDarkMode:A.mode==="dark",children:t.jsx(Ct,{productType:l,windowSize:c})}),t.jsx(_t,{children:Fe.productNameByType[l]})]}),t.jsx(It,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Rt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Bt,{isDisabled:j,children:st(Ke,c,A.mode==="dark",o,Ge,!1)}):null,t.jsxs(Vt,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:A.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:v[4],fontWeight:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:A.colors.hero,weight:Oe.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,K)=>dt(a,x,K),valueToSubLabels:(x,K)=>rt(a,x,K,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),C("link_account"),m.linkToken==null||Ee(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Q():z(!0)}}),t.jsxs(Lt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(Ot,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Ft,{}):null]}):null,c==="small"&&h!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:h.name,textColor:we(h.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:l,isUpdateLinkClicked:p==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:k.fetchStatus,updateStatus:k.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:Z,prevUpdateState:Y},onUpdateLinkTokenClick:te,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Ut,{children:[o?.accountBalance?.available?t.jsx(Re,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(ke,{children:ve}),o?.accountBalance?.lastRefreshTime?t.jsx(Ve,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Dt,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":ut("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Et,{children:Fe.bankConnectionHeader.linkAccount}):null,t.jsx(Nt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Wt,{windowSize:c,wrapperWidth:N[3].width,children:h!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:h.name,textColor:we(h.code)}):t.jsx(ke,{children:ve})}):null,c!=="small"?t.jsxs(Mt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Re,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(ke,{children:ve}),o?.accountBalance?.lastRefreshTime?t.jsx(Ve,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},zt=n.div`
2
2
  display: flex;
3
3
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
4
4
  align-items: ${e=>e.windowSize==="small"?"flex-start":"center"};
@@ -1,5 +1,5 @@
1
- import{ay as Ft,V as t,gv as Un,e as Kn,g as Hn,bQ as qn,bR as Xn,gw as Gn,gx as Yn,cl as Jn,aS as Qn,x as y,fo as pt,fp as ea,o as a,fq as ta,fr as na,fs as aa,aQ as Ce,ft as ia,ac as f,bE as mt,bq as ut,dE as yt,cy as ht,cz as bt,cA as gt,gy as la,gz as oa,gA as ra,gB as sa,dN as j,gC as $,fz as A,dT as k,fx as da,w as ft,d as re,fy as _t,fF as ca,fA as pa,fB as ma,gD as ua,gE as ya,aT as ha,aq as xt,c1 as De,bU as ba,gF as L,O as ga,u as s,ai as fa,cc as xa,bV as wa,b as Ta,gG as va,fG as wt,N as Da,de as Ia,cq as ja,gH as Tt,b9 as $a,bb as Aa,n as ka,c3 as Wt,df as Sa,gI as Ca,ak as Zt,ax as Pa,b7 as Ba,bv as Ra,gJ as za,an as Ma}from"./index-BPaR2lvP.js";import{a as p}from"./sentry-BLwIhkwX.js";import{n as i}from"./mui-Bxat3ZJX.js";import{bY as Na,bL as La,bZ as Ea,GD as Oa,bX as Fa,bH as _a,bh as Wa}from"./zeni-epic-state-BFw7CFlI.js";import{o as Za,t as Va}from"./LowBalancePopup-CplxkRHP-UExHFvGM.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new e.Error().stack;b&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[b]="71e4a8e4-f4bc-4db0-a501-18bfbb70160a",e._sentryDebugIdIdentifier="sentry-dbid-71e4a8e4-f4bc-4db0-a501-18bfbb70160a")}catch{}})();const Ua=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ka={formTitle:new Da("h6Medium","h5Medium")},m={containerPaddingLeft:new y(s[3],s[6],s[6]),containerPaddingRight:new y(s[3],s[6],s[8]),marginBottom:new y(s[3],s[3]),labelWidth:new y(120,160,160),formTitlePaddingLeftRight:new y(30,0),marginTop:new y(s[1],0),rightIconsGap:new y(s[4],s[5]),closeContainerMarginTop:new y(s[1],0),formTitleMarginTopBottom:new y(0,0),footerButtonWidth:new y(120,120,120,165,165),right:new y(s[3],s[0]),actionsContainerRight:new y(s[0],s[3],s[3],s[6],s[6]),otherActionsIconContainerMarginLeft:new y(s[5],s[4],s[4],s[5]),otherActionsContainerBottom:new y(58,44),iconContainerMarginTop:new y(2,s[1]),recurringSchedulePaddingLeft:new y(s[2],0),paddingRight:new y(s[2],s[3]),labelMarginRight:new y(s[0],s[3]),textPadding:new y(s[0],s[3]),additionalTextMarginTop:new y(-4,0),refundPopupWidth:new y(300,420,420),drawerSectionPaddingLeftRight:new y(s[4],s[5]),infoLabelPaddingRight:new y(s[3],s[3]),infoLabelMarginTop:new y(s[1],s[0]),navBarHeight:new y(0,0,s[8]),navBarContainerWidth:new y(100,58)},{dateFormat:Ha,common:{noText:C,strings:{empty:c},currency:vt,via:qa,more:Xa,edit:Ga},spendManagement:{billPay:{billDetails:n,billsByTabs:Pe,bulkActions:Dt,vendorCreation:Ie,insufficientFunds:Vt}},collaboration:{threads:{placeholder:It,tooltip:jt,title:{comments:Ya}}}}=ga.getLocalizedStrings(),je=Ha.visual.MMMDCommaYYYYformat,$t=({billDetails:e,currentTenant:b,showApproveRejectBtns:h,isShowDeletedBillsEnabled:F,signedInUser:_,isAdmin:se,isRealTimeApprovalEnabled:Ut,isInternationalPaymentShaVsOurEnabled:Kt,hasZeniAssistAccess:Ht,analytics:M,showMarkAsPaidButtonToCreator:U,showMarkAsPaidButtonToApprover:Be,isBillPayCommentingEnabled:Re,isZeniUser:qt,showBackButton:ze=!0,isDetectInsufficientFundsEnabled:Xt,redirectToEditableBillScreen:Gt,redirectToBillsScreen:J,discardBillDetailsFromLocalStore:Me,deleteBill:Yt,cancelAndDeleteBill:Ne,approveOrRejectBill:Le,onAddNewRule:Jt,onAttachmentClick:Ee,saveBillDetails:Qt,discardOutsideZeniPaymentData:en,onBackClick:Oe,updateEditRealTimeApproverClicked:tn,onSaveRealTimeApprovals:nn,onRetryPaymentClick:an,onRefundPaymentClick:ln,initialOpenThreadRequest:K})=>{const l=Kn(),o=Ft(),Fe=Hn(),[on,H]=p.useState(!1),[_e,de]=p.useState(!1),[ce,pe]=p.useState(!1),[We,me]=p.useState(!1),[rn,ue]=p.useState(!1),[Ze,Q]=p.useState(!1),g=e.transactionDetails?.id,sn=qt?qn:Xn,{requestToOpenThread:ye,setRequestToOpenThread:ee,setOpenThread:te}=p.useContext(sn);p.useEffect(()=>{K?.threadId!=null&&K?.companyId!=null&&K?.entityType!=null&&ee(K)},[K,ee]);const[dn,q]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:g,isGlobalComment:!1},x=Re&&g!=null,{threads:X,isLoading:P}=Gn(),Ve=p.useMemo(()=>g==null?[]:X.filter(r=>r.resolved===!1&&!r.id.includes(Yn)),[X,g]).length,D=`dashboard_${o.currentTenant?.companyId}`,cn=p.useCallback((r,u)=>{te(u),q(!1)},[te,q]);p.useEffect(()=>{ye?.threadId!=null&&X.length>0&&!P&&(te(ye.threadId),ee(null))},[ye,X,P,te,ee]);const Ue=p.useRef(!1),[pn,mn]=p.useState(!1),un=p.useRef(r=>{r&&!Ue.current&&(Ue.current=!0,mn(!0))});Jn({componentName:"bill.details",enabled:pn});const[N,ne]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ke,He]=p.useState("approved"),[yn,qe]=p.useState(!1),[hn,Xe]=p.useState(!1),[Ge,Ye]=p.useState(!1),Je=()=>qe(!1),bn=()=>qe(!0),Qe=Qn(e.zeniAssist?.refundStatus.fetchState),ae=p.useCallback(()=>{J()},[J]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Me(),J())},[e,J,Me]),p.useEffect(()=>{Qe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(pe(!1),ae())},[Qe,e.zeniAssist?.refundStatus,ae]);const w=e.transactionDetails?.billPayInfo.stage,ie=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,gn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,he=w?.code==="paid",v=he?w:ie?.code=="approved"&&G?.code?G:ie,S=Ja(v,e.transactionDetails),E=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?gn:G?.code!=null&&(ie?.code=="approved"||G.code==="mark_as_paid")?G:ie,be=e.transactionDetails?.vendor?.name,B=e.isRecurring,et=()=>{e.transactionDetails?.id!=null&&Gt(e.transactionDetails?.id??"")},fn=()=>{ne({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),H(!0)},xn=()=>{ne({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),H(!0)},wn=()=>{ne({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),H(!0)},Tn=()=>{M.trackRefundClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ne({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),pe(!0)},vn={onOkClick:()=>{H(!1),N.primaryButtonText===n.delete?Yt?.(e.isRecurring):N.title===n.cancelBillTitle?Ne?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Ne?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ln())},onCancelClick:()=>{H(!1),pe(!1)}},Dn={onOkClick:r=>{ue(!1),Le({billId:e.transactionDetails?.id??"",type:"rejected",description:r})},onCancelClick:()=>{ue(!1)}},In=()=>{const[r]=Pa("ZeniAssist");return r!=null?t.jsx(Ba,{"data-testid":f("bill-details-zeni-assist-icon",g),onClick:()=>{me(!We),M.trackZeniAssistClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:r,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},le={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??vt.currencyCode},ge=e.transactionDetails?.lines?.map((r,u)=>{const R=r;return{lineIndex:u,lineId:R.id,account:R.account,class:R.class,amount:R.amount.amount,billable:R.billable,customer:R.customer,lineDescription:R.lineDescription,recipientAmount:R.recipientAmount?.amount}})??[],jn=e.transactionDetails?.recipientTotalAmount.amount??0,fe=e.transactionDetails?.recipientTotalAmount,d={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},I=m.labelWidth.value(l),$n=r=>r==="billable"||r==="has_been_billed"?n.yes:n.no,An=d.paymentToBankAccount?.bankAccountNumber?d.paymentToBankAccount?.bankAccountNumber?.slice(d.paymentToBankAccount?.bankAccountNumber?.length-4):d.paymentType?.method?.includes("international")&&d.paymentToBankAccount?.bankAccountIban?d.paymentToBankAccount?.bankAccountIban?.slice(d.paymentToBankAccount?.bankAccountIban.length-4):"",kn=d.paymentToBankAccount?.bankAccountName!=null&&d.paymentToBankAccount?.bankAccountName!=""?d.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${d.paymentToBankAccount?.bankName} XXXX${An}`,Sn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx($i,{windowSize:l,children:t.jsx(ji,{})})]}):void 0,tt=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Cn=()=>{const r=d?.paymentToBankAccount?.bankAccountType,u=r!=null&&r!==""?Sa(r.toLowerCase()):r??"";return`${Ie.achDetails.bankRoutingNumber} ${d?.paymentToBankAccount?.bankRoutingNumberAch}, ${d?.paymentToBankAccount?.bankName}
2
- ${Ie.achDetails.bankAccountNumber} ${d?.paymentToBankAccount?.bankAccountNumber}, ${Ie.achDetails.accountTypeLabel} ${u}`},oe=e.transactionDetails?.billPayInfo!=null?Na(e.transactionDetails?.billPayInfo):void 0,Pn=oe!=null&&e.paymentMethodType?.maxPeriod?.value!=null?La(Ea(oe?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,nt=e.transactionDetails?.billPayInfo.expectedDepositDate??Pn,at=pt(d?.paymentType?.method??"").replace("Same Day",""),Bn=(d?.paymentToBankAccount!=null||d?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(ea,{paymentTypeLabel:at,onClick:bn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,Rn=()=>d?.paymentToBankAccount==null&&d?.paymentToPI==null&&d?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Ca,{paymentType:d?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,it=e.transactionDetails?.lines?.some(r=>{const u=r.account;return u?.isDeleted===!0&&u?.isBillEditableCoaAccountType===!1})??!1,xe=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&it),lt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&it),we=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,Te=e.zeniAssist?.isEligibleForRefund===!0,zn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Mn=Ht&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(we||Te)&&zn===!1,ve=we||Te,Nn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,W=v?.code,Ln=!Nn&&(!tt||v?.code==="processing"&&!B),ot=!tt,rt=["small","medium-compact","medium-regular"].includes(l),Y=Oa(e.transactionDetails?.bulkProcessingDetail?.type),O=Fa(e.paymentMethodType?.method),En=!Y&&(W!=="processing"&&lt||W==="processing"&&!B||W==="processing"&&ot||h&&O&&Be),On=r=>{M.trackBillPayMarkAsPaidSubmit(r.paymentMode??"other",w?.code??"",v?.code??""),Qt(!0,Ge,r)},st=()=>{Xe(!0),M.trackBillPayMarkAsPaid(w?.code??"",v?.code??"")},Fn=()=>{Ye(!0),st()},_n=()=>{en(),Xe(!1),Ge&&Ye(!1)},Wn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,entityType:"bill.details",entityId:g??c,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,g]),Z=Xt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?ta(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,d.paymentDate):void 0,dt=()=>{He("approved"),Ze===!0&&Q(!1),Z!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",wt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Le({billId:e.transactionDetails?.id??"",type:"approved"})},Zn=()=>{He("rejected"),Z!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",wt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ue(!0)},ct=p.useRef(null);return t.jsxs(mi,{windowSize:l,ref:ct,children:[t.jsx(na,{anchor:"right",open:yn,onClose:Je,transitionDuration:250,"data-testid":f("vendor-email-preview-drawer"),children:t.jsx(aa,{companyName:ia(b.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:d.paymentDate?.format(je)??"",paymentType:at,amount:Ce("0,0.[00]",fe),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Je})}),t.jsxs(bi,{ref:un.current,windowSize:l,children:[t.jsx(Si,{windowSize:l,children:l==="small"?t.jsx(mt,{"data-testid":f("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[be,e.isRecurring?t.jsx(Se,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Fe.colors.grey4,rightSideComponent:t.jsxs(Bt,{windowSize:l,children:[x?t.jsxs(Et,{isDisabled:P,"data-testid":f("bill-comment-button"),onClick:P?()=>null:r=>{r.preventDefault(),r.stopPropagation(),q(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(u=>yt(u)),void 0,void 0,"page icon")},children:[t.jsx(ut,{count:P?void 0:Ve,isLoading:P,style:{left:"12px"}}),t.jsx(Ot,{})]}):null,t.jsx(Rt,{onClick:()=>ae(),"data-testid":f("bill-detail-nav-bar-small-close-button"),children:t.jsx(Pt,{})})]}),leftSideComponent:t.jsx(Ct,{windowSize:l,onClick:Oe,"data-testid":f("bill-detail-nav-bar-small-back-button"),style:{visibility:`${ze?"visible":"hidden"}`},children:t.jsx(St,{})}),source:"BillDetailPage"}):t.jsx(mt,{"data-testid":f("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[be,e.isRecurring?t.jsx(Se,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(Bt,{windowSize:l,children:[x?t.jsxs(Et,{isDisabled:P,"data-testid":f("bill-comment-button"),onClick:P?()=>null:r=>{r.preventDefault(),r.stopPropagation(),q(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(u=>yt(u)),void 0,void 0,"page icon")},children:[t.jsx(ut,{count:P?void 0:Ve,isLoading:P,style:{left:"12px"}}),t.jsx(Ot,{})]}):null,t.jsx(Rt,{onClick:()=>ae(),"data-testid":f("bill-detail-nav-bar-close-button"),children:t.jsx(Pt,{})})]}),leftSideComponent:t.jsx(Ct,{windowSize:l,onClick:Oe,"data-testid":f("bill-detail-nav-bar-back-button"),style:{visibility:`${ze?"visible":"hidden"}`},children:t.jsx(St,{})}),enableTitleOnScroll:!0,scrollableContent:ct,source:"BillDetailPage"})}),t.jsxs(gi,{windowSize:l,children:[Ze?t.jsx(Za,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:dt,onCancelClick:()=>{Q(!1),et()},onClickAway:()=>{Q(!1)}}):null,hn?t.jsx(Va,{onCancel:_n,onProceedForMarkAsPaid:On,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,on||ce?t.jsx(ht,{titleComponent:t.jsx(gt,{children:N.title}),descriptionComponent:t.jsx(bt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:ce?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:vn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:ce?Qa(l,e):null}):null,rn?t.jsx(ht,{titleComponent:t.jsx(gt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(bt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:Dn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(xi,{windowSize:l,children:[l!=="small"?t.jsxs(wi,{windowSize:l,children:[be,e.isRecurring?t.jsx(Se,{height:a.sp5,width:a.sp5}):null]}):null,F&&S!=null&&S.code==="deleted"?t.jsx(zt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===Pe.tabsById.overdue?t.jsx(zt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,E!=null&&E.code?l==="small"?t.jsx(la,{progressSectionObj:E,createDate:e.transactionDetails?.createTime,paymentDate:nt,scheduleDate:oe,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(oa,{progressSectionObj:E,createDate:e.transactionDetails?.createTime,paymentDate:nt,scheduleDate:oe,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,ni(Y,e,Z),t.jsx(ra,{sectionId:sa,currentVendorOption:{defaultOptions:[]},billId:g,isBillPayCommentingEnabled:Re,isBillPaid:he,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Ee,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),d.paymentType?.method?.includes("ach"),t.jsxs(Ae,{children:[t.jsx(ke,{children:n.whatForTitle}),t.jsxs($e,{children:[t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"invoiceNumber"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("invoiceNumber")}`},children:t.jsx($,{label:{label:n.invoiceNumber,width:I},text:le.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"invoiceDate"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("invoiceDate")}`},children:t.jsx($,{label:{label:n.invoiceDate,width:I},text:le.invoiceDate?.format(je)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"billDueDate"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("billDueDate")}`},children:t.jsx($,{label:{label:n.billDueDate,width:I},text:le.billDueDate?.format(je)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"memo"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("memo")}`},children:t.jsx($,{label:{label:n.memo,width:I},text:le.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(Ae,{children:[t.jsx(fi,{windowSize:l,children:t.jsx(ke,{children:n.lineItemsTitle})}),ge.length>0?ge.map((r,u)=>{const R=e?.transactionDetails?.lines?.find(Vn=>Vn.id===r.lineId)?.recipientAmount;return t.jsxs(ui,{children:[ge.length>1?t.jsx(yi,{windowSize:l,children:t.jsx(hi,{windowSize:l,children:`${n.line} # ${u+1}`})}):null,t.jsxs($e,{children:[t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.recipientAmount`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("recipientAmount",u)}`},children:t.jsx($,{label:{label:n.amount,width:I},text:R!=null?Ce("0,0[.]00",R):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.lineDescription`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("lineDescription",u)}`},children:t.jsx($,{label:{label:n.description,width:I},text:r.lineDescription??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.account`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("account",u)}`},children:t.jsx($,{label:{label:n.category,width:I},text:r.account?.accountName??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.class`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("class",u)}`},children:t.jsx($,{label:{label:n.class,width:I},text:r.class?.className??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.billable`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("billable",u)}`},children:t.jsx($,{label:{label:n.billable,width:I},text:r.billable!=null?$n(r.billable):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.customer`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("customer",u)}`},children:t.jsx($,{label:{label:n.customer,width:I},text:r.customer?.name??C,style:{width:"auto"}})})]})]},u)}):null]}),t.jsxs(Ti,{windowSize:l,children:[t.jsx(vi,{children:n.total}),t.jsx(Di,{children:fe!=null?t.jsx(da,{amount:fe,integerStyles:ft.h6Medium.cssObject,decimalStyles:ft.standardMedium.cssObject}):C})]}),t.jsxs(Ae,{children:[t.jsx(ke,{children:n.paymentDetailsTitle}),t.jsxs($e,{children:[O?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"withdrawFrom"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("withdrawFrom")}`},children:t.jsx($,{label:{label:n.withdrawFrom,width:I},text:e.withdrawFrom!=null?_t(e.withdrawFrom,l):c,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:re.brandColorGoldDark},additionalInfoLabel:Z!=null&&w?.code==="pending_approval"?Vt.addMoney:Z})}),t.jsx(z,{})]}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"paymentType"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("paymentType")}`},children:t.jsx($,{additionalInfoLabel:d.paymentType?.method!=null&&d.paymentType.method.includes(_a)&&Kt&&d.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(ii,{children:ca(d.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:I},text:O&&e.outsideZeniPaymentInfo!=null?ti(e.outsideZeniPaymentInfo):pt(d.paymentType?.method??""),style:{width:"auto"}})}),O?null:t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"paymentTo"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx($,{label:{label:n.paymentTo,width:I},text:d.paymentToBankAccount!=null?kn:d.paymentToPI!=null?d.paymentToPI.displayText:Sn,style:{width:"auto"},showEyeIcon:d.paymentToBankAccount!=null&&!!d.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||d.paymentType?.method?.includes("ach"),tooltipText:Cn(),additionalInfoLabel:t.jsx(ai,{children:Bn})}),Rn()]})})]}),O||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:x,entityId:g,dashboardTabKey:k({type:"details",key:"recurringPaymentType"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx($,{label:{label:n.paymentType,width:I},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ma(e.isRecurring,O,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:pa(l,e.isRecurring,O,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(Ai,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(ua,{onAttachmentClick:Ee,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??vt.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(ya,{amount:jn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Jt,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:se,signedInUserId:_?.userId,showRealTimeApproval:Ut,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:tn,onSaveRealTimeApprovals:nn},historicActivities:e.billHistory.activities}),t.jsx(Ii,{})]}),e.transactionDetails?.vendor!=null&&!he&&!e.transactionDetails.isDeleted?t.jsx(ha,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:U||h,showCancel:!U&&h,cancelBtn:{label:rt?n.buttons.reject:n.buttons.rejectBill,isLoading:Ke==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:ei(U,rt),isLoading:Ke==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:U?st:()=>{Z!=null?Q(!0):dt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:U?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(li,{children:t.jsxs(pi,{windowSize:l,children:[!Y&&_e?t.jsx(xt,{onClickAway:()=>{de(!1),me(!1)},children:t.jsxs(kt,{windowSize:l,"data-testid":f("bill-actions-container"),children:[W!=="processing"&&lt?t.jsx(V,{onClick:fn,"data-testid":f("delete-bill-action-item"),children:n.buttons.deleteBill}):null,W==="processing"&&!B?t.jsx(V,{onClick:xn,"data-testid":f("cancel-bill-action-item"),children:n.buttons.cancel}):null,W==="processing"&&ot?t.jsx(V,{onClick:wn,"data-testid":f("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,h&&O&&Be?t.jsx(V,{onClick:Fn,"data-testid":f("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,We?t.jsx(xt,{onClickAway:()=>{de(!1),me(!1)},children:t.jsxs(kt,{windowSize:l,"data-testid":f("bill-actions-with-zeni-assist-container"),children:[we?t.jsx(V,{onClick:()=>{M.trackRetryClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),an()},"data-testid":f("retry-bill-action-item"),children:n.buttons.retry}):null,Te?t.jsx(V,{onClick:Tn,"data-testid":f("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(ci,{windowSize:l,children:[Mn===!0?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:ve?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(At,{windowSize:l,showEditIcon:xe,isIconClickable:ve,"data-testid":f("other-actions-icon-container"),children:ve?t.jsx(In,{}):t.jsx(ri,{})})}):null,!Y&&xe===!0?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ga,placement:"top",children:t.jsx(di,{onClick:et,"data-testid":f("edit-bill-icon-container"),children:t.jsx(si,{})})}):null,!Y&&Ln===!0&&En?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Xa,placement:"top",children:t.jsx(At,{windowSize:l,showEditIcon:xe,isIconClickable:!0,"data-testid":f("more-details-icon-container"),children:t.jsx(oi,{onClick:()=>de(!_e)})})}):null]})]})}),style:{minHeight:62}}):null]}),x?t.jsx(ba,{isDrawerOpen:dn,allowComposer:!0,drawerTitle:Ya,threads:X,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:It.addANewComment,replyComposerPlaceholder:It.replyAComment,threadResolve:jt.resolveComment,threadUnResolve:jt.unResolveComment},threadMetadata:Wn,onThreadClick:cn,onCloseAllThreadsDrawer:()=>q(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Fe.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}}):null]})},Wi=e=>{const b=Ft(),h=e.billDetails.transactionDetails?.id,F=e.isBillPayCommentingEnabled&&h!=null,_=b.currentTenant?.companyId;if(!(F&&_!=null&&h!=null))return t.jsx($t,{...e});const se=`dashboard_${_}`;return t.jsx(Un,{roomId:se,filter:{application:"dashboard",companyId:_,entityId:h,tab:"bill",isGlobalComment:!1},children:t.jsx($t,{...e})})},Ja=(e,b)=>{const h=e?.code;if(e!=null&&h!=null)return b?.isDeleted===!0?{value:Pe.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:h==="pending_approval"&&b?.dueDate?.isBefore(Wa(),"date")===!0?{value:Pe.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[h].color,bgColor:L[h].bgColor,borderColor:L[h].borderColor}},Qa=(e,b)=>{const h=b.transactionDetails?.recipientTotalAmount;return t.jsxs(ki,{windowSize:e,children:[t.jsxs(Mt,{windowSize:e,children:[t.jsx(Nt,{children:n.zeniAssist.accountNumber}),t.jsx(Lt,{children:b.withdrawFrom!=null?_t(b.withdrawFrom,e):c})]}),t.jsxs(Mt,{windowSize:e,children:[t.jsx(Nt,{children:n.zeniAssist.amount}),t.jsx(Lt,{children:h!=null?Ce("0,0[.]00",h):C})]})]})},ei=(e,b)=>e?n.paymentOutsideZeni.markAsPaid:b?n.buttons.approve:n.buttons.approveBill,ti=e=>{const b=e.paymentMode,h=n.paymentOutsideZeni.offline;if(b==null||b==="other")return h;const F=n.paymentOutsideZeni.paymentModeOptions.find(_=>_.value===b)?.label;return`${h} ${qa} ${F}`},ni=(e,b,h)=>{if(e)return t.jsx(Tt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:Dt.duplicateWarning.title,description:Dt.duplicateWarning.description});if(h!=null){const F=`${b.withdrawFrom?.label??""} ${b.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(Tt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Vt.lowBalanceIn.replace("__account__",F)}`,description:h.replace("Low balance! ","")})}else return null},ai=i.div``,ii=i.div``,li=i.div`
1
+ import{ay as Ft,V as t,gv as Un,e as Kn,g as Hn,bQ as qn,bR as Xn,gw as Gn,gx as Yn,cl as Jn,aS as Qn,x as y,fo as pt,fp as ea,o as a,fq as ta,fr as na,fs as aa,aQ as Ce,ft as ia,ac as x,bE as mt,bq as ut,dE as yt,cy as ht,cz as bt,cA as gt,gy as la,gz as oa,gA as ra,gB as sa,dN as j,gC as $,fz as A,dT as k,fx as da,w as xt,d as re,fy as _t,fF as ca,fA as pa,fB as ma,gD as ua,gE as ya,aT as ha,aq as ft,c1 as De,bU as ba,gF as L,O as ga,u as s,ai as xa,cc as fa,bV as wa,b as Ta,gG as va,fG as wt,N as Da,de as Ia,cq as ja,gH as Tt,b9 as $a,bb as Aa,n as ka,c3 as Wt,df as Sa,gI as Ca,ak as Zt,ax as Pa,b7 as Ba,bv as Ra,gJ as za,an as Ma}from"./index-CUxbisrq.js";import{a as p}from"./sentry-tsfGilE0.js";import{n as i}from"./mui-CW7vGIKQ.js";import{bY as Na,bL as La,bZ as Ea,GD as Oa,bX as Fa,bH as _a,bh as Wa}from"./zeni-epic-state-DGV_6n4t.js";import{o as Za,t as Va}from"./LowBalancePopup-1727S1ri-BotZCdZD.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},b=new e.Error().stack;b&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[b]="b2308c82-616a-4742-ae06-1dbd85df0d02",e._sentryDebugIdIdentifier="sentry-dbid-b2308c82-616a-4742-ae06-1dbd85df0d02")}catch{}})();const Ua=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ka={formTitle:new Da("h6Medium","h5Medium")},m={containerPaddingLeft:new y(s[3],s[6],s[6]),containerPaddingRight:new y(s[3],s[6],s[8]),marginBottom:new y(s[3],s[3]),labelWidth:new y(120,160,160),formTitlePaddingLeftRight:new y(30,0),marginTop:new y(s[1],0),rightIconsGap:new y(s[4],s[5]),closeContainerMarginTop:new y(s[1],0),formTitleMarginTopBottom:new y(0,0),footerButtonWidth:new y(120,120,120,165,165),right:new y(s[3],s[0]),actionsContainerRight:new y(s[0],s[3],s[3],s[6],s[6]),otherActionsIconContainerMarginLeft:new y(s[5],s[4],s[4],s[5]),otherActionsContainerBottom:new y(58,44),iconContainerMarginTop:new y(2,s[1]),recurringSchedulePaddingLeft:new y(s[2],0),paddingRight:new y(s[2],s[3]),labelMarginRight:new y(s[0],s[3]),textPadding:new y(s[0],s[3]),additionalTextMarginTop:new y(-4,0),refundPopupWidth:new y(300,420,420),drawerSectionPaddingLeftRight:new y(s[4],s[5]),infoLabelPaddingRight:new y(s[3],s[3]),infoLabelMarginTop:new y(s[1],s[0]),navBarHeight:new y(0,0,s[8]),navBarContainerWidth:new y(100,58)},{dateFormat:Ha,common:{noText:C,strings:{empty:c},currency:vt,via:qa,more:Xa,edit:Ga},spendManagement:{billPay:{billDetails:n,billsByTabs:Pe,bulkActions:Dt,vendorCreation:Ie,insufficientFunds:Vt}},collaboration:{threads:{placeholder:It,tooltip:jt,title:{comments:Ya}}}}=ga.getLocalizedStrings(),je=Ha.visual.MMMDCommaYYYYformat,$t=({billDetails:e,currentTenant:b,showApproveRejectBtns:h,isShowDeletedBillsEnabled:F,signedInUser:_,isAdmin:se,isRealTimeApprovalEnabled:Ut,isInternationalPaymentShaVsOurEnabled:Kt,hasZeniAssistAccess:Ht,analytics:M,showMarkAsPaidButtonToCreator:U,showMarkAsPaidButtonToApprover:Be,isBillPayCommentingEnabled:Re,isZeniUser:qt,showBackButton:ze=!0,isDetectInsufficientFundsEnabled:Xt,redirectToEditableBillScreen:Gt,redirectToBillsScreen:J,discardBillDetailsFromLocalStore:Me,deleteBill:Yt,cancelAndDeleteBill:Ne,approveOrRejectBill:Le,onAddNewRule:Jt,onAttachmentClick:Ee,saveBillDetails:Qt,discardOutsideZeniPaymentData:en,onBackClick:Oe,updateEditRealTimeApproverClicked:tn,onSaveRealTimeApprovals:nn,onRetryPaymentClick:an,onRefundPaymentClick:ln,initialOpenThreadRequest:K})=>{const l=Kn(),o=Ft(),Fe=Hn(),[on,H]=p.useState(!1),[_e,de]=p.useState(!1),[ce,pe]=p.useState(!1),[We,me]=p.useState(!1),[rn,ue]=p.useState(!1),[Ze,Q]=p.useState(!1),g=e.transactionDetails?.id,sn=qt?qn:Xn,{requestToOpenThread:ye,setRequestToOpenThread:ee,setOpenThread:te}=p.useContext(sn);p.useEffect(()=>{K?.threadId!=null&&K?.companyId!=null&&K?.entityType!=null&&ee(K)},[K,ee]);const[dn,q]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:g,isGlobalComment:!1},f=Re&&g!=null,{threads:X,isLoading:P}=Gn(),Ve=p.useMemo(()=>g==null?[]:X.filter(r=>r.resolved===!1&&!r.id.includes(Yn)),[X,g]).length,D=`dashboard_${o.currentTenant?.companyId}`,cn=p.useCallback((r,u)=>{te(u),q(!1)},[te,q]);p.useEffect(()=>{ye?.threadId!=null&&X.length>0&&!P&&(te(ye.threadId),ee(null))},[ye,X,P,te,ee]);const Ue=p.useRef(!1),[pn,mn]=p.useState(!1),un=p.useRef(r=>{r&&!Ue.current&&(Ue.current=!0,mn(!0))});Jn({componentName:"bill.details",enabled:pn});const[N,ne]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ke,He]=p.useState("approved"),[yn,qe]=p.useState(!1),[hn,Xe]=p.useState(!1),[Ge,Ye]=p.useState(!1),Je=()=>qe(!1),bn=()=>qe(!0),Qe=Qn(e.zeniAssist?.refundStatus.fetchState),ae=p.useCallback(()=>{J()},[J]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Me(),J())},[e,J,Me]),p.useEffect(()=>{Qe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(pe(!1),ae())},[Qe,e.zeniAssist?.refundStatus,ae]);const w=e.transactionDetails?.billPayInfo.stage,ie=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,gn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,he=w?.code==="paid",v=he?w:ie?.code=="approved"&&G?.code?G:ie,S=Ja(v,e.transactionDetails),E=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?gn:G?.code!=null&&(ie?.code=="approved"||G.code==="mark_as_paid")?G:ie,be=e.transactionDetails?.vendor?.name,B=e.isRecurring,et=()=>{e.transactionDetails?.id!=null&&Gt(e.transactionDetails?.id??"")},xn=()=>{ne({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),H(!0)},fn=()=>{ne({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),H(!0)},wn=()=>{ne({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),H(!0)},Tn=()=>{M.trackRefundClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ne({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),pe(!0)},vn={onOkClick:()=>{H(!1),N.primaryButtonText===n.delete?Yt?.(e.isRecurring):N.title===n.cancelBillTitle?Ne?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Ne?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ln())},onCancelClick:()=>{H(!1),pe(!1)}},Dn={onOkClick:r=>{ue(!1),Le({billId:e.transactionDetails?.id??"",type:"rejected",description:r})},onCancelClick:()=>{ue(!1)}},In=()=>{const[r]=Pa("ZeniAssist");return r!=null?t.jsx(Ba,{"data-testid":x("bill-details-zeni-assist-icon",g),onClick:()=>{me(!We),M.trackZeniAssistClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:r,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},le={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??vt.currencyCode},ge=e.transactionDetails?.lines?.map((r,u)=>{const R=r;return{lineIndex:u,lineId:R.id,account:R.account,class:R.class,amount:R.amount.amount,billable:R.billable,customer:R.customer,lineDescription:R.lineDescription,recipientAmount:R.recipientAmount?.amount}})??[],jn=e.transactionDetails?.recipientTotalAmount.amount??0,xe=e.transactionDetails?.recipientTotalAmount,d={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},I=m.labelWidth.value(l),$n=r=>r==="billable"||r==="has_been_billed"?n.yes:n.no,An=d.paymentToBankAccount?.bankAccountNumber?d.paymentToBankAccount?.bankAccountNumber?.slice(d.paymentToBankAccount?.bankAccountNumber?.length-4):d.paymentType?.method?.includes("international")&&d.paymentToBankAccount?.bankAccountIban?d.paymentToBankAccount?.bankAccountIban?.slice(d.paymentToBankAccount?.bankAccountIban.length-4):"",kn=d.paymentToBankAccount?.bankAccountName!=null&&d.paymentToBankAccount?.bankAccountName!=""?d.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${d.paymentToBankAccount?.bankName} XXXX${An}`,Sn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx($i,{windowSize:l,children:t.jsx(ji,{})})]}):void 0,tt=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Cn=()=>{const r=d?.paymentToBankAccount?.bankAccountType,u=r!=null&&r!==""?Sa(r.toLowerCase()):r??"";return`${Ie.achDetails.bankRoutingNumber} ${d?.paymentToBankAccount?.bankRoutingNumberAch}, ${d?.paymentToBankAccount?.bankName}
2
+ ${Ie.achDetails.bankAccountNumber} ${d?.paymentToBankAccount?.bankAccountNumber}, ${Ie.achDetails.accountTypeLabel} ${u}`},oe=e.transactionDetails?.billPayInfo!=null?Na(e.transactionDetails?.billPayInfo):void 0,Pn=oe!=null&&e.paymentMethodType?.maxPeriod?.value!=null?La(Ea(oe?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,nt=e.transactionDetails?.billPayInfo.expectedDepositDate??Pn,at=pt(d?.paymentType?.method??"").replace("Same Day",""),Bn=(d?.paymentToBankAccount!=null||d?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(ea,{paymentTypeLabel:at,onClick:bn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,Rn=()=>d?.paymentToBankAccount==null&&d?.paymentToPI==null&&d?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Ca,{paymentType:d?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,it=e.transactionDetails?.lines?.some(r=>{const u=r.account;return u?.isDeleted===!0&&u?.isBillEditableCoaAccountType===!1})??!1,fe=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&it),lt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&it),we=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,Te=e.zeniAssist?.isEligibleForRefund===!0,zn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Mn=Ht&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(we||Te)&&zn===!1,ve=we||Te,Nn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,W=v?.code,Ln=!Nn&&(!tt||v?.code==="processing"&&!B),ot=!tt,rt=["small","medium-compact","medium-regular"].includes(l),Y=Oa(e.transactionDetails?.bulkProcessingDetail?.type),O=Fa(e.paymentMethodType?.method),En=!Y&&(W!=="processing"&&lt||W==="processing"&&!B||W==="processing"&&ot||h&&O&&Be),On=r=>{M.trackBillPayMarkAsPaidSubmit(r.paymentMode??"other",w?.code??"",v?.code??""),Qt(!0,Ge,r)},st=()=>{Xe(!0),M.trackBillPayMarkAsPaid(w?.code??"",v?.code??"")},Fn=()=>{Ye(!0),st()},_n=()=>{en(),Xe(!1),Ge&&Ye(!1)},Wn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,entityType:"bill.details",entityId:g??c,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,g]),Z=Xt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?ta(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,d.paymentDate):void 0,dt=()=>{He("approved"),Ze===!0&&Q(!1),Z!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",wt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Le({billId:e.transactionDetails?.id??"",type:"approved"})},Zn=()=>{He("rejected"),Z!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",wt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ue(!0)},ct=p.useRef(null);return t.jsxs(mi,{windowSize:l,ref:ct,children:[t.jsx(na,{anchor:"right",open:yn,onClose:Je,transitionDuration:250,"data-testid":x("vendor-email-preview-drawer"),children:t.jsx(aa,{companyName:ia(b.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:d.paymentDate?.format(je)??"",paymentType:at,amount:Ce("0,0.[00]",xe),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Je})}),t.jsxs(bi,{ref:un.current,windowSize:l,children:[t.jsx(Si,{windowSize:l,children:l==="small"?t.jsx(mt,{"data-testid":x("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[be,e.isRecurring?t.jsx(Se,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Fe.colors.grey4,rightSideComponent:t.jsxs(Bt,{windowSize:l,children:[f?t.jsxs(Et,{isDisabled:P,"data-testid":x("bill-comment-button"),onClick:P?()=>null:r=>{r.preventDefault(),r.stopPropagation(),q(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(u=>yt(u)),void 0,void 0,"page icon")},children:[t.jsx(ut,{count:P?void 0:Ve,isLoading:P,style:{left:"12px"}}),t.jsx(Ot,{})]}):null,t.jsx(Rt,{onClick:()=>ae(),"data-testid":x("bill-detail-nav-bar-small-close-button"),children:t.jsx(Pt,{})})]}),leftSideComponent:t.jsx(Ct,{windowSize:l,onClick:Oe,"data-testid":x("bill-detail-nav-bar-small-back-button"),style:{visibility:`${ze?"visible":"hidden"}`},children:t.jsx(St,{})}),source:"BillDetailPage"}):t.jsx(mt,{"data-testid":x("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[be,e.isRecurring?t.jsx(Se,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(Bt,{windowSize:l,children:[f?t.jsxs(Et,{isDisabled:P,"data-testid":x("bill-comment-button"),onClick:P?()=>null:r=>{r.preventDefault(),r.stopPropagation(),q(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(u=>yt(u)),void 0,void 0,"page icon")},children:[t.jsx(ut,{count:P?void 0:Ve,isLoading:P,style:{left:"12px"}}),t.jsx(Ot,{})]}):null,t.jsx(Rt,{onClick:()=>ae(),"data-testid":x("bill-detail-nav-bar-close-button"),children:t.jsx(Pt,{})})]}),leftSideComponent:t.jsx(Ct,{windowSize:l,onClick:Oe,"data-testid":x("bill-detail-nav-bar-back-button"),style:{visibility:`${ze?"visible":"hidden"}`},children:t.jsx(St,{})}),enableTitleOnScroll:!0,scrollableContent:ct,source:"BillDetailPage"})}),t.jsxs(gi,{windowSize:l,children:[Ze?t.jsx(Za,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:dt,onCancelClick:()=>{Q(!1),et()},onClickAway:()=>{Q(!1)}}):null,hn?t.jsx(Va,{onCancel:_n,onProceedForMarkAsPaid:On,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,on||ce?t.jsx(ht,{titleComponent:t.jsx(gt,{children:N.title}),descriptionComponent:t.jsx(bt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:ce?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:vn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:ce?Qa(l,e):null}):null,rn?t.jsx(ht,{titleComponent:t.jsx(gt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(bt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:Dn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(fi,{windowSize:l,children:[l!=="small"?t.jsxs(wi,{windowSize:l,children:[be,e.isRecurring?t.jsx(Se,{height:a.sp5,width:a.sp5}):null]}):null,F&&S!=null&&S.code==="deleted"?t.jsx(zt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===Pe.tabsById.overdue?t.jsx(zt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,E!=null&&E.code?l==="small"?t.jsx(la,{progressSectionObj:E,createDate:e.transactionDetails?.createTime,paymentDate:nt,scheduleDate:oe,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(oa,{progressSectionObj:E,createDate:e.transactionDetails?.createTime,paymentDate:nt,scheduleDate:oe,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,ni(Y,e,Z),t.jsx(ra,{sectionId:sa,currentVendorOption:{defaultOptions:[]},billId:g,isBillPayCommentingEnabled:Re,isBillPaid:he,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Ee,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),d.paymentType?.method?.includes("ach"),t.jsxs(Ae,{children:[t.jsx(ke,{children:n.whatForTitle}),t.jsxs($e,{children:[t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"invoiceNumber"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("invoiceNumber")}`},children:t.jsx($,{label:{label:n.invoiceNumber,width:I},text:le.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"invoiceDate"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("invoiceDate")}`},children:t.jsx($,{label:{label:n.invoiceDate,width:I},text:le.invoiceDate?.format(je)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"billDueDate"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("billDueDate")}`},children:t.jsx($,{label:{label:n.billDueDate,width:I},text:le.billDueDate?.format(je)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"memo"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("memo")}`},children:t.jsx($,{label:{label:n.memo,width:I},text:le.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(Ae,{children:[t.jsx(xi,{windowSize:l,children:t.jsx(ke,{children:n.lineItemsTitle})}),ge.length>0?ge.map((r,u)=>{const R=e?.transactionDetails?.lines?.find(Vn=>Vn.id===r.lineId)?.recipientAmount;return t.jsxs(ui,{children:[ge.length>1?t.jsx(yi,{windowSize:l,children:t.jsx(hi,{windowSize:l,children:`${n.line} # ${u+1}`})}):null,t.jsxs($e,{children:[t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.recipientAmount`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("recipientAmount",u)}`},children:t.jsx($,{label:{label:n.amount,width:I},text:R!=null?Ce("0,0[.]00",R):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.lineDescription`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("lineDescription",u)}`},children:t.jsx($,{label:{label:n.description,width:I},text:r.lineDescription??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.account`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("account",u)}`},children:t.jsx($,{label:{label:n.category,width:I},text:r.account?.accountName??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.class`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("class",u)}`},children:t.jsx($,{label:{label:n.class,width:I},text:r.class?.className??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.billable`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("billable",u)}`},children:t.jsx($,{label:{label:n.billable,width:I},text:r.billable!=null?$n(r.billable):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:`${u}.customer`}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("customer",u)}`},children:t.jsx($,{label:{label:n.customer,width:I},text:r.customer?.name??C,style:{width:"auto"}})})]})]},u)}):null]}),t.jsxs(Ti,{windowSize:l,children:[t.jsx(vi,{children:n.total}),t.jsx(Di,{children:xe!=null?t.jsx(da,{amount:xe,integerStyles:xt.h6Medium.cssObject,decimalStyles:xt.standardMedium.cssObject}):C})]}),t.jsxs(Ae,{children:[t.jsx(ke,{children:n.paymentDetailsTitle}),t.jsxs($e,{children:[O?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"withdrawFrom"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("withdrawFrom")}`},children:t.jsx($,{label:{label:n.withdrawFrom,width:I},text:e.withdrawFrom!=null?_t(e.withdrawFrom,l):c,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:re.brandColorGoldDark},additionalInfoLabel:Z!=null&&w?.code==="pending_approval"?Vt.addMoney:Z})}),t.jsx(z,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"paymentType"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("paymentType")}`},children:t.jsx($,{additionalInfoLabel:d.paymentType?.method!=null&&d.paymentType.method.includes(_a)&&Kt&&d.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(ii,{children:ca(d.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:I},text:O&&e.outsideZeniPaymentInfo!=null?ti(e.outsideZeniPaymentInfo):pt(d.paymentType?.method??""),style:{width:"auto"}})}),O?null:t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"paymentTo"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx($,{label:{label:n.paymentTo,width:I},text:d.paymentToBankAccount!=null?kn:d.paymentToPI!=null?d.paymentToPI.displayText:Sn,style:{width:"auto"},showEyeIcon:d.paymentToBankAccount!=null&&!!d.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||d.paymentType?.method?.includes("ach"),tooltipText:Cn(),additionalInfoLabel:t.jsx(ai,{children:Bn})}),Rn()]})})]}),O||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:g,dashboardTabKey:k({type:"details",key:"recurringPaymentType"}),roomId:D,companyId:o.currentTenant?.companyId??c,companyName:o.currentTenant?.companyName??c,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${A("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx($,{label:{label:n.paymentType,width:I},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ma(e.isRecurring,O,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:pa(l,e.isRecurring,O,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(Ai,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(ua,{onAttachmentClick:Ee,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??vt.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(ya,{amount:jn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Jt,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:se,signedInUserId:_?.userId,showRealTimeApproval:Ut,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:tn,onSaveRealTimeApprovals:nn},historicActivities:e.billHistory.activities}),t.jsx(Ii,{})]}),e.transactionDetails?.vendor!=null&&!he&&!e.transactionDetails.isDeleted?t.jsx(ha,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:U||h,showCancel:!U&&h,cancelBtn:{label:rt?n.buttons.reject:n.buttons.rejectBill,isLoading:Ke==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:ei(U,rt),isLoading:Ke==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:U?st:()=>{Z!=null?Q(!0):dt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:U?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(li,{children:t.jsxs(pi,{windowSize:l,children:[!Y&&_e?t.jsx(ft,{onClickAway:()=>{de(!1),me(!1)},children:t.jsxs(kt,{windowSize:l,"data-testid":x("bill-actions-container"),children:[W!=="processing"&&lt?t.jsx(V,{onClick:xn,"data-testid":x("delete-bill-action-item"),children:n.buttons.deleteBill}):null,W==="processing"&&!B?t.jsx(V,{onClick:fn,"data-testid":x("cancel-bill-action-item"),children:n.buttons.cancel}):null,W==="processing"&&ot?t.jsx(V,{onClick:wn,"data-testid":x("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,h&&O&&Be?t.jsx(V,{onClick:Fn,"data-testid":x("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,We?t.jsx(ft,{onClickAway:()=>{de(!1),me(!1)},children:t.jsxs(kt,{windowSize:l,"data-testid":x("bill-actions-with-zeni-assist-container"),children:[we?t.jsx(V,{onClick:()=>{M.trackRetryClick(v?.code??"",w?.code??"",E?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),an()},"data-testid":x("retry-bill-action-item"),children:n.buttons.retry}):null,Te?t.jsx(V,{onClick:Tn,"data-testid":x("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(ci,{windowSize:l,children:[Mn===!0?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:ve?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(At,{windowSize:l,showEditIcon:fe,isIconClickable:ve,"data-testid":x("other-actions-icon-container"),children:ve?t.jsx(In,{}):t.jsx(ri,{})})}):null,!Y&&fe===!0?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ga,placement:"top",children:t.jsx(di,{onClick:et,"data-testid":x("edit-bill-icon-container"),children:t.jsx(si,{})})}):null,!Y&&Ln===!0&&En?t.jsx(De,{enterDelay:600,style:{color:re.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Xa,placement:"top",children:t.jsx(At,{windowSize:l,showEditIcon:fe,isIconClickable:!0,"data-testid":x("more-details-icon-container"),children:t.jsx(oi,{onClick:()=>de(!_e)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(ba,{isDrawerOpen:dn,allowComposer:!0,drawerTitle:Ya,threads:X,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:It.addANewComment,replyComposerPlaceholder:It.replyAComment,threadResolve:jt.resolveComment,threadUnResolve:jt.unResolveComment},threadMetadata:Wn,onThreadClick:cn,onCloseAllThreadsDrawer:()=>q(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Fe.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}}):null]})},Wi=e=>{const b=Ft(),h=e.billDetails.transactionDetails?.id,F=e.isBillPayCommentingEnabled&&h!=null,_=b.currentTenant?.companyId;if(!(F&&_!=null&&h!=null))return t.jsx($t,{...e});const se=`dashboard_${_}`;return t.jsx(Un,{roomId:se,filter:{application:"dashboard",companyId:_,entityId:h,tab:"bill",isGlobalComment:!1},children:t.jsx($t,{...e})})},Ja=(e,b)=>{const h=e?.code;if(e!=null&&h!=null)return b?.isDeleted===!0?{value:Pe.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:h==="pending_approval"&&b?.dueDate?.isBefore(Wa(),"date")===!0?{value:Pe.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[h].color,bgColor:L[h].bgColor,borderColor:L[h].borderColor}},Qa=(e,b)=>{const h=b.transactionDetails?.recipientTotalAmount;return t.jsxs(ki,{windowSize:e,children:[t.jsxs(Mt,{windowSize:e,children:[t.jsx(Nt,{children:n.zeniAssist.accountNumber}),t.jsx(Lt,{children:b.withdrawFrom!=null?_t(b.withdrawFrom,e):c})]}),t.jsxs(Mt,{windowSize:e,children:[t.jsx(Nt,{children:n.zeniAssist.amount}),t.jsx(Lt,{children:h!=null?Ce("0,0[.]00",h):C})]})]})},ei=(e,b)=>e?n.paymentOutsideZeni.markAsPaid:b?n.buttons.approve:n.buttons.approveBill,ti=e=>{const b=e.paymentMode,h=n.paymentOutsideZeni.offline;if(b==null||b==="other")return h;const F=n.paymentOutsideZeni.paymentModeOptions.find(_=>_.value===b)?.label;return`${h} ${qa} ${F}`},ni=(e,b,h)=>{if(e)return t.jsx(Tt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:Dt.duplicateWarning.title,description:Dt.duplicateWarning.description});if(h!=null){const F=`${b.withdrawFrom?.label??""} ${b.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(Tt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Vt.lowBalanceIn.replace("__account__",F)}`,description:h.replace("Low balance! ","")})}else return null},ai=i.div``,ii=i.div``,li=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
5
  `,oi=i(za)`
@@ -82,7 +82,7 @@ import{ay as Ft,V as t,gv as Un,e as Kn,g as Hn,bQ as qn,bR as Xn,gw as Gn,gx as
82
82
  &:hover {
83
83
  background-color: ${e=>e.theme.colors.background};
84
84
  }
85
- `,St=i(xa)`
85
+ `,St=i(fa)`
86
86
  cursor: pointer;
87
87
  color: ${e=>e.theme.colors.hero};
88
88
  width: 20px;
@@ -156,12 +156,12 @@ import{ay as Ft,V as t,gv as Un,e as Kn,g as Hn,bQ as qn,bR as Xn,gw as Gn,gx as
156
156
  padding-right: ${e=>m.containerPaddingRight.valuePx(e.windowSize)};
157
157
  overflow-x: hidden;
158
158
  margin-top: ${e=>m.navBarHeight.valuePx(e.windowSize)};
159
- `,fi=i.div`
159
+ `,xi=i.div`
160
160
  display: flex;
161
161
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
162
162
  align-items: ${e=>e.windowSize==="small"?"unset":"center"};
163
163
  width: ${e=>e.windowSize==="small"?"fit-content":"unset"};
164
- `,xi=i.div`
164
+ `,fi=i.div`
165
165
  display: flex;
166
166
  margin-bottom: ${a.sp3};
167
167
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
@@ -209,7 +209,7 @@ import{ay as Ft,V as t,gv as Un,e as Kn,g as Hn,bQ as qn,bR as Xn,gw as Gn,gx as
209
209
  display: flex;
210
210
  flex-direction: column;
211
211
  height: ${a.sp11};
212
- `,ji=i(fa)`
212
+ `,ji=i(xa)`
213
213
  height: ${a.sp3};
214
214
  width: ${a.sp3};
215
215
  color: ${e=>e.theme.colors.hero};
@@ -1,4 +1,4 @@
1
- import{x as F,u as L,e as M,O as T,aa as W,aS as G,aM as H,cQ as Q,V as r,bE as X,ae as J,aT as K,o as u,gl as Y}from"./index-BPaR2lvP.js";import{a as U}from"./sentry-BLwIhkwX.js";import{n as h}from"./mui-Bxat3ZJX.js";import{b as Z,f as ee,o as _,l as R}from"./FollowStepsSection-BVT2K7mu-AlvyE5So.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./zeni-epic-state-BFw7CFlI.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="da3997f3-7c89-4d03-9550-97716c49c364",e._sentryDebugIdIdentifier="sentry-dbid-da3997f3-7c89-4d03-9550-97716c49c364")}catch{}})();const j="billPayApprovalRuleDetailPage",C="lowerBound",E="upperBound",w="steps",b="applyToExistingBills",le={footerPadding:new F(L[2],L[2])};function Ae({localData:e,approvalUpdateActionType:l,onBackClick:a,onApprovalRuleDataUpdated:s,onResetClick:n,isLowerBoundDisabled:o=!1,isUpperBoundDisabled:g=!0,hideUpperBoundField:A=!1,onSaveRuleClick:N,onSaveRuleSuccess:I}){const S=M(),t=T.getLocalizedStrings().commonSetUp.approval,P=T.getLocalizedStrings().spendManagement.billPay.billPayApproval,y=ae(e,l==="approval_create"&&!o),x=W({mode:"all",reValidateMode:"onChange",defaultValues:y}),c=e.billPaySetupApproverViewUpdateData?.updateStatus,B=G(c?.fetchState),{upperBound:D}=y,{allApprovalRules:p,allAccountingClasses:V,billPaySetupApproverViewUpdateData:f}=e;let m=p.length>1?p.length-1:0,v=p.length>0?p[m].criteria[0].range.min.amount:0;if(f!=null&&f.type==="approval_update"&&f.data!=null){const{approvalRuleId:i}=f.data;m=p.findIndex(d=>d.approvalRuleId===i),v=m>0?p[m-1].criteria[0].range.min.amount:0}const O=x.handleSubmit(()=>{N()}),q=async(i,d)=>{s(d)};return U.useEffect(()=>{const i=x.watch((d,{name:$})=>{if($!=null&&d!=null){const z=H(d);Q(()=>q($,z))}});return()=>{i.unsubscribe()}}),U.useEffect(()=>{B==="In-Progress"&&c?.fetchState==="Completed"&&I()},[B,c?.fetchState,I]),r.jsxs(se,{children:[r.jsx(X,{title:l==="approval_create"?t.newApproval:t.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),r.jsxs(J,{...x,children:[r.jsx(ne,{children:r.jsx("form",{id:k(j),onSubmit:O,children:r.jsxs(ie,{children:[r.jsx(Z,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:C,placeholder:"$0",options:{required:!0,max:D===1/0?Number.MAX_SAFE_INTEGER-1:D-1,min:v,validate:i=>o?!0:i!=null&&i>v},isDisabled:o,additionalInfoLabel:t.firstRuleLowerBoundInfoLabel,additionalErrorLabel:t.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:g,hideField:A,additionalInfoLabel:t.upperBoundInfoLabel}}),r.jsx(pe,{}),r.jsx(ee,{sectionId:w,label:{label:t.followStepsLabel},approversPlaceholder:t.approversPlaceholder,notifiersPlaceholder:t.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:V,stepsInfo:y[w],userSelectPlaceholder:t.userSelectPlaceholder,approveNotifyPlaceholder:t.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})}),r.jsx(K,{formId:k(j),primaryBtn:{label:t.saveBtnText,isLoading:c?.fetchState==="In-Progress",isDisabled:c?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},topComponent:l==="approval_create"&&p.length===0?null:r.jsx(Y,{name:b,mode:"always_on",checkBoxes:[{value:b,label:t.applyToExistingBills,defaultChecked:!0,groupLabel:!1}],style:{width:"100%"}}),showCancel:!0,cancelBtn:{label:t.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:n},containerStyle:{justifyContent:S==="small"?"space-between":"center"},style:{padding:le.footerPadding.valuePx(S)},separatorStyle:{marginRight:u.sp4}})]})]})}const ae=(e,l)=>{const{criteria:a,steps:s}=e.billPaySetupApproverViewUpdateData?.data??{},n=e.allApprovalRules.length===0;return{[b]:n?[]:[b],[w]:te(e.allApprovers.map(o=>o.user),e.filteredApprovers.map(o=>o.user),_(e.allAttributes),_(e.filteredAttributes),s??[])??[],[C]:l?void 0:a!=null?a.range.min.amount??0:0,[E]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},te=(e,l,a,s,n)=>n&&n.length>0?n.map((o,g)=>({stepIndex:g,stepType:{selectedOption:o.action,allOptions:R},actors:{allUsers:l,selectedUsers:oe(e,o.actors),allNonUsers:s,selectedNonUsers:re(a,o.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:l,selectedUsers:[],allNonUsers:s,selectedNonUsers:[]}}],oe=(e,l)=>e.filter(a=>a.userId!=null&&l.findIndex(s=>s.userId===a.userId)>-1),re=(e,l)=>e.filter(a=>l.findIndex(s=>s.subType===a.value)>-1),k=e=>`${e}_form`,Ie=e=>`${e}`,se=h.div`
1
+ import{x as F,u as L,e as M,O as T,aa as W,aS as G,aM as H,cQ as Q,V as r,bE as X,ae as J,aT as K,o as u,gl as Y}from"./index-CUxbisrq.js";import{a as U}from"./sentry-tsfGilE0.js";import{n as h}from"./mui-CW7vGIKQ.js";import{b as Z,f as ee,o as _,l as R}from"./FollowStepsSection-BxESVqJD-92yEFObK.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./zeni-epic-state-DGV_6n4t.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="b97046b6-44fa-498f-80b7-80a8a31cbc84",e._sentryDebugIdIdentifier="sentry-dbid-b97046b6-44fa-498f-80b7-80a8a31cbc84")}catch{}})();const j="billPayApprovalRuleDetailPage",C="lowerBound",E="upperBound",w="steps",m="applyToExistingBills",le={footerPadding:new F(L[2],L[2])};function Ae({localData:e,approvalUpdateActionType:l,onBackClick:a,onApprovalRuleDataUpdated:s,onResetClick:n,isLowerBoundDisabled:o=!1,isUpperBoundDisabled:g=!0,hideUpperBoundField:A=!1,onSaveRuleClick:N,onSaveRuleSuccess:I}){const S=M(),t=T.getLocalizedStrings().commonSetUp.approval,P=T.getLocalizedStrings().spendManagement.billPay.billPayApproval,y=ae(e,l==="approval_create"&&!o),x=W({mode:"all",reValidateMode:"onChange",defaultValues:y}),c=e.billPaySetupApproverViewUpdateData?.updateStatus,B=G(c?.fetchState),{upperBound:D}=y,{allApprovalRules:p,allAccountingClasses:V,billPaySetupApproverViewUpdateData:f}=e;let b=p.length>1?p.length-1:0,v=p.length>0?p[b].criteria[0].range.min.amount:0;if(f!=null&&f.type==="approval_update"&&f.data!=null){const{approvalRuleId:i}=f.data;b=p.findIndex(d=>d.approvalRuleId===i),v=b>0?p[b-1].criteria[0].range.min.amount:0}const O=x.handleSubmit(()=>{N()}),q=async(i,d)=>{s(d)};return U.useEffect(()=>{const i=x.watch((d,{name:$})=>{if($!=null&&d!=null){const z=H(d);Q(()=>q($,z))}});return()=>{i.unsubscribe()}}),U.useEffect(()=>{B==="In-Progress"&&c?.fetchState==="Completed"&&I()},[B,c?.fetchState,I]),r.jsxs(se,{children:[r.jsx(X,{title:l==="approval_create"?t.newApproval:t.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),r.jsxs(J,{...x,children:[r.jsx(ne,{children:r.jsx("form",{id:k(j),onSubmit:O,children:r.jsxs(ie,{children:[r.jsx(Z,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:C,placeholder:"$0",options:{required:!0,max:D===1/0?Number.MAX_SAFE_INTEGER-1:D-1,min:v,validate:i=>o?!0:i!=null&&i>v},isDisabled:o,additionalInfoLabel:t.firstRuleLowerBoundInfoLabel,additionalErrorLabel:t.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:g,hideField:A,additionalInfoLabel:t.upperBoundInfoLabel}}),r.jsx(pe,{}),r.jsx(ee,{sectionId:w,label:{label:t.followStepsLabel},approversPlaceholder:t.approversPlaceholder,notifiersPlaceholder:t.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:V,stepsInfo:y[w],userSelectPlaceholder:t.userSelectPlaceholder,approveNotifyPlaceholder:t.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})}),r.jsx(K,{formId:k(j),primaryBtn:{label:t.saveBtnText,isLoading:c?.fetchState==="In-Progress",isDisabled:c?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},topComponent:l==="approval_create"&&p.length===0?null:r.jsx(Y,{name:m,mode:"always_on",checkBoxes:[{value:m,label:t.applyToExistingBills,defaultChecked:!0,groupLabel:!1}],style:{width:"100%"}}),showCancel:!0,cancelBtn:{label:t.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:n},containerStyle:{justifyContent:S==="small"?"space-between":"center"},style:{padding:le.footerPadding.valuePx(S)},separatorStyle:{marginRight:u.sp4}})]})]})}const ae=(e,l)=>{const{criteria:a,steps:s}=e.billPaySetupApproverViewUpdateData?.data??{},n=e.allApprovalRules.length===0;return{[m]:n?[]:[m],[w]:te(e.allApprovers.map(o=>o.user),e.filteredApprovers.map(o=>o.user),_(e.allAttributes),_(e.filteredAttributes),s??[])??[],[C]:l?void 0:a!=null?a.range.min.amount??0:0,[E]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},te=(e,l,a,s,n)=>n&&n.length>0?n.map((o,g)=>({stepIndex:g,stepType:{selectedOption:o.action,allOptions:R},actors:{allUsers:l,selectedUsers:oe(e,o.actors),allNonUsers:s,selectedNonUsers:re(a,o.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:l,selectedUsers:[],allNonUsers:s,selectedNonUsers:[]}}],oe=(e,l)=>e.filter(a=>a.userId!=null&&l.findIndex(s=>s.userId===a.userId)>-1),re=(e,l)=>e.filter(a=>l.findIndex(s=>s.subType===a.value)>-1),k=e=>`${e}_form`,Ie=e=>`${e}`,se=h.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{e as W,O as S,V as t,bE as G,L as V,ac as b,x as r,an as N,o as i,aQ as z,c1 as P,cy as q,cz as F,cA as O,da as J,u as l,bb as K,N as k,ba as Q,d as j,d9 as X,bv as Y,w as Z}from"./index-BPaR2lvP.js";import{n as o}from"./mui-Bxat3ZJX.js";import{a as ee}from"./sentry-BLwIhkwX.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./zeni-epic-state-BFw7CFlI.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="598f0075-8dbb-4899-9e22-c8bd471156bf",e._sentryDebugIdIdentifier="sentry-dbid-598f0075-8dbb-4899-9e22-c8bd471156bf")}catch{}})();const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},E={stepper:new k("smallRegular","standardRegular"),amount:new k("standardRegular","largeMedium")},te=({showDeleteBtn:e=!1,disableButtons:d=!1,isLastSection:w=!1,approvalRule:c,onEditRuleClick:y,onDeleteRuleClick:g})=>{const[v,h]=ee.useState(!1),n=W(),{range:m}=c.criteria[0],{steps:$,approvalRuleId:x}=c,a=S.getLocalizedStrings().commonSetUp.approval,M=()=>{h(!0)},U={onOkClick:()=>{h(!1),g?.(x)},onCancelClick:()=>{h(!1)}};return t.jsxs(oe,{windowSize:n,isLastSection:w,isUpdatingApprovalRules:d,children:[t.jsxs(ie,{windowSize:n,children:[t.jsxs(ce,{children:[t.jsxs(L,{windowSize:n,children:[a.from," ",z("0,0",m.min)]}),t.jsxs(re,{children:[t.jsx(T,{}),t.jsx(le,{}),t.jsx(T,{})]}),m.max==null?t.jsx(he,{}):t.jsx(L,{windowSize:n,children:z("0,0",{...m.min,amount:m.max.amount})})]}),t.jsxs(ue,{className:"icons",children:[e===!0?d===!0?t.jsx(P,{title:a.approvalRulesUpdatingTooltip,placement:"top",children:t.jsx(D,{children:t.jsx(I,{$isDisabled:!0,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)})})}):t.jsx(I,{onClick:M,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}):null,d===!0?t.jsx(P,{title:a.approvalRulesUpdatingTooltip,placement:"top",children:t.jsx(D,{children:t.jsx(C,{$isDisabled:!0,"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})})}):t.jsx(C,{onClick:()=>{y(x)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(se,{windowSize:n,children:t.jsx(ae,{isSingleStep:$.length===1,windowSize:n,children:$.map((u,H)=>t.jsxs(ne,{isSingleStep:$.length===1,className:"stepperItem",windowSize:n,children:[u.action==="require_approval"?t.jsx(pe,{children:a.requireText}):t.jsx(de,{children:a.notifyText}),u.nonUserActors!=null&&u.nonUserActors.filter(p=>p.subType!=null).map((p,_)=>t.jsxs(A,{children:[t.jsx(R,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),u.operator!="is"?t.jsx(B,{className:"operator",children:u.operator}):null]},`${p.subType}_${_}`)),u.actors.map(p=>t.jsxs(A,{children:[t.jsxs(R,{children:[p.firstName," ",p.lastName]}),u.operator!="is"?t.jsx(B,{className:"operator",children:u.operator}):null]},p.userId))]},H))})}),v?t.jsx(q,{titleComponent:t.jsx(O,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(F,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:U}):null]})},oe=o.div`
1
+ import{e as W,O as S,V as t,bE as G,L as V,ac as b,x as r,an as N,o as i,aQ as z,c1 as P,cy as q,cz as F,cA as O,da as J,u as l,bb as K,N as k,ba as Q,d as j,d9 as X,bv as Y,w as Z}from"./index-CUxbisrq.js";import{n as o}from"./mui-CW7vGIKQ.js";import{a as ee}from"./sentry-tsfGilE0.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./zeni-epic-state-DGV_6n4t.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="598f0075-8dbb-4899-9e22-c8bd471156bf",e._sentryDebugIdIdentifier="sentry-dbid-598f0075-8dbb-4899-9e22-c8bd471156bf")}catch{}})();const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},E={stepper:new k("smallRegular","standardRegular"),amount:new k("standardRegular","largeMedium")},te=({showDeleteBtn:e=!1,disableButtons:d=!1,isLastSection:w=!1,approvalRule:c,onEditRuleClick:y,onDeleteRuleClick:g})=>{const[v,h]=ee.useState(!1),n=W(),{range:m}=c.criteria[0],{steps:$,approvalRuleId:x}=c,a=S.getLocalizedStrings().commonSetUp.approval,M=()=>{h(!0)},U={onOkClick:()=>{h(!1),g?.(x)},onCancelClick:()=>{h(!1)}};return t.jsxs(oe,{windowSize:n,isLastSection:w,isUpdatingApprovalRules:d,children:[t.jsxs(ie,{windowSize:n,children:[t.jsxs(ce,{children:[t.jsxs(L,{windowSize:n,children:[a.from," ",z("0,0",m.min)]}),t.jsxs(re,{children:[t.jsx(T,{}),t.jsx(le,{}),t.jsx(T,{})]}),m.max==null?t.jsx(he,{}):t.jsx(L,{windowSize:n,children:z("0,0",{...m.min,amount:m.max.amount})})]}),t.jsxs(ue,{className:"icons",children:[e===!0?d===!0?t.jsx(P,{title:a.approvalRulesUpdatingTooltip,placement:"top",children:t.jsx(D,{children:t.jsx(I,{$isDisabled:!0,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)})})}):t.jsx(I,{onClick:M,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}):null,d===!0?t.jsx(P,{title:a.approvalRulesUpdatingTooltip,placement:"top",children:t.jsx(D,{children:t.jsx(C,{$isDisabled:!0,"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})})}):t.jsx(C,{onClick:()=>{y(x)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(se,{windowSize:n,children:t.jsx(ae,{isSingleStep:$.length===1,windowSize:n,children:$.map((u,H)=>t.jsxs(ne,{isSingleStep:$.length===1,className:"stepperItem",windowSize:n,children:[u.action==="require_approval"?t.jsx(pe,{children:a.requireText}):t.jsx(de,{children:a.notifyText}),u.nonUserActors!=null&&u.nonUserActors.filter(p=>p.subType!=null).map((p,_)=>t.jsxs(A,{children:[t.jsx(R,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),u.operator!="is"?t.jsx(B,{className:"operator",children:u.operator}):null]},`${p.subType}_${_}`)),u.actors.map(p=>t.jsxs(A,{children:[t.jsxs(R,{children:[p.firstName," ",p.lastName]}),u.operator!="is"?t.jsx(B,{className:"operator",children:u.operator}):null]},p.userId))]},H))})}),v?t.jsx(q,{titleComponent:t.jsx(O,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(F,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:U}):null]})},oe=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{ay as F,e as j,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O as I,o as s,as as se,c as le,g as M,aV as U,ao as oe,x as te,d as $,cN as re,aW as ae,bc as ne,u as de}from"./index-BPaR2lvP.js";import{a as g}from"./sentry-BLwIhkwX.js";import{n as l}from"./mui-Bxat3ZJX.js";import{Gs as ce,bP as pe,Gt as xe}from"./zeni-epic-state-BFw7CFlI.js";import{C as me}from"./VideoPopup-3DD646kG-DcWerFCQ.js";import{M as S}from"./usp-line-BBd1wKwW-D7JQFCiS.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";import"./VideoPlayer-TlEy-oD0-DPajHNBJ.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new i.Error().stack;o&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[o]="ee2ee72d-08ff-4ffd-a268-cec53dd92994",i._sentryDebugIdIdentifier="sentry-dbid-ee2ee72d-08ff-4ffd-a268-cec53dd92994")}catch{}})();const D="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",he={midContainerMarginBottom:new te(de[5],44)},ge=l.div`
1
+ import{ay as F,e as f,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O as I,o as s,as as se,c as le,g as M,aV as U,ao as oe,x as te,d as $,cN as re,aW as ae,bc as ne,u as de}from"./index-CUxbisrq.js";import{a as g}from"./sentry-tsfGilE0.js";import{n as l}from"./mui-CW7vGIKQ.js";import{Gs as ce,bP as pe,Gt as xe}from"./zeni-epic-state-DGV_6n4t.js";import{C as me}from"./VideoPopup-BqvZ-XIh-EN-DDLM7.js";import{M as b}from"./usp-line-BBd1wKwW-C0cfP0ma.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";import"./VideoPlayer-VAzOGCDL-Dcpb5Ypp.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new i.Error().stack;o&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[o]="7045a340-d485-41fd-9782-aab649e7a921",i._sentryDebugIdIdentifier="sentry-dbid-7045a340-d485-41fd-9782-aab649e7a921")}catch{}})();const D="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",he={midContainerMarginBottom:new te(de[5],44)},ge=l.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -12,7 +12,7 @@ import{ay as F,e as j,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O
12
12
  margin: auto;
13
13
  padding: ${s.sp7} ${s.sp0};
14
14
  color: ${i=>i.theme.colors.primary};
15
- `,fe=l(se)`
15
+ `,ye=l(se)`
16
16
  max-width: 600px;
17
17
  margin: auto;
18
18
  padding: ${s.sp5} ${s.sp0};
@@ -23,7 +23,7 @@ import{ay as F,e as j,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O
23
23
  align-items: center;
24
24
  justify-content: center;
25
25
  margin-bottom: ${i=>he.midContainerMarginBottom.valuePx(i.windowSize)};
26
- `,ye=l.div``,m=l.img``,V=l.div`
26
+ `,je=l.div``,m=l.img``,V=l.div`
27
27
  width: ${i=>i.windowSize==="small"?"auto":"376px"};
28
28
  display: flex;
29
29
  flex-direction: column;
@@ -57,19 +57,19 @@ import{ay as F,e as j,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O
57
57
  color: ${i=>i.theme.colors.champion};
58
58
  `,w=l(ae)`
59
59
  color: ${i=>i.theme.colors.champion};
60
- `,f=l(U)`
60
+ `,y=l(U)`
61
61
  color: ${i=>i.theme.colors.champion};
62
- `,y=l(re)`
62
+ `,j=l(re)`
63
63
  color: ${i=>i.theme.colors.champion};
64
64
  `,d=l.div``,c=l.div`
65
65
  padding-left: ${s.sp3};
66
- `,_=l(S)`
66
+ `,_=l(b)`
67
67
  color: ${$.graphColor16Dark};
68
- `,R=l(S)`
68
+ `,R=l(b)`
69
69
  color: ${$.graphColor09Dark};
70
- `,G=l(S)`
70
+ `,G=l(b)`
71
71
  color: ${$.graphColor28Dark};
72
- `,je=l(oe)`
72
+ `,fe=l(oe)`
73
73
  margin: ${s.sp3} auto;
74
74
  max-width: 719px;
75
75
  color: ${i=>i.theme.colors.hero};
@@ -78,7 +78,7 @@ import{ay as F,e as j,aS as Y,V as e,fH as ee,bE as ie,a as C,ac as B,ag as x,O
78
78
  flex-direction: ${i=>i.windowSize==="small"?"column":"row"};
79
79
  align-items: center;
80
80
  justify-content: center;
81
- `,Se=l(U)`
81
+ `,be=l(U)`
82
82
  margin: ${i=>i.windowSize==="small"?s.sp1:`auto ${s.sp5}`};
83
83
  color: ${i=>i.theme.colors.grey1};
84
- `,t=I.getLocalizedStrings().spendManagement.billPay.billPayPromo,r=I.getLocalizedStrings().commonSetUp.businessVerification.terms,Oe=({billPaySetupView:i,analytics:o,meetingUrl:b,videoUrl:H,onButtonClick:Z,onBackClick:N,onSetupBillPaySuccess:z,onClickMenuIcon:q})=>{const h=F(),a=j(),{billPayTermsDetails:p}=i,[J,K]=g.useState(!1),[Q,v]=g.useState(!1),k=Y(p?.fetchStatus.fetchState);g.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&z?.()},[k,z,p?.fetchStatus]);const W=()=>{o?.trackBillPayPromoScheduleDemo(),v(!0)},X=ce(h.loggedInUserRoleMap),P=pe(h.loggedInUserRoleMap)&&!X,T=P?t.setupNonAccessableUsersPromoText:t.promoText;return e.jsxs(ge,{children:[J===!0?e.jsx(me,{onCancelClick:()=>{K(!1)},videoUrl:H}):null,Q===!0?e.jsx(ee,{onCancelClick:()=>{v(!1)},meetingUrl:b}):null,e.jsx(ie,{title:t.title,onBackClick:N,showBackButton:!xe(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:q,source:"BillPayPromoPage"}),e.jsxs(ue,{windowSize:a,children:[a==="small"?e.jsx(fe,{children:T}):e.jsx(we,{children:T}),a==="small"?e.jsx(be,{}):e.jsx(ze,{}),P===!1?e.jsxs(ye,{children:[e.jsxs($e,{windowSize:a,children:[e.jsx(C,{variant:"secondary",label:t.scheduleDemoButton,onClick:W,"data-testid":B("billpay-schedule-demo-button")}),e.jsx(Se,{windowSize:a,children:t.orText}),e.jsx(C,{variant:"primary",label:t.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:Z,"data-testid":B("billpay-setup-button")})]}),e.jsxs(je,{children:[t.terms.terms1,e.jsx(x,{href:r.consentUrl,linkText:r.consent}),r.term2,e.jsx(x,{href:r.depositUrl,linkText:r.depositTerms}),r.term3,e.jsx(x,{href:r.privacyPolicyUrl,onZeniLinkClick:()=>(o?.trackBillPayPrivacyPolicy(),!0),linkText:r.privacy}),r.term4,e.jsx(x,{href:r.tosUrl,onZeniLinkClick:()=>(o?.trackBillPayAgreement(),!0),linkText:r.tos}),r.term5,t.terms.terms3]})]}):null]})]})},be=()=>{const i=M(),o=j();return e.jsxs(L,{windowSize:o,children:[e.jsx(E,{windowSize:o,children:e.jsx(O,{windowSize:o,children:i.mode==="dark"?e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(V,{windowSize:o,children:[e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(G,{})}),e.jsxs(c,{children:[e.jsx(y,{children:t.fullyManagedText.bold}),e.jsx(f,{children:t.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(y,{children:t.multiLevelApprovalText.bold}),e.jsx(f,{children:t.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(_,{})}),e.jsxs(c,{children:[e.jsx(y,{children:t.aiPoweredText.bold}),e.jsx(f,{children:t.aiPoweredText.regular})]})]})]})]})},ze=()=>{const i=M(),o=j();return e.jsxs(L,{windowSize:o,children:[e.jsxs(V,{windowSize:o,children:[e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(G,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.fullyManagedText.bold}),e.jsx(u,{children:t.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.multiLevelApprovalText.bold}),e.jsx(u,{children:t.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(_,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.aiPoweredText.bold}),e.jsx(u,{children:t.aiPoweredText.regular})]})]})]}),e.jsx(E,{windowSize:o,children:e.jsx(O,{windowSize:o,children:i.mode==="dark"?e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{Oe as default};
84
+ `,t=I.getLocalizedStrings().spendManagement.billPay.billPayPromo,r=I.getLocalizedStrings().commonSetUp.businessVerification.terms,Oe=({billPaySetupView:i,analytics:o,meetingUrl:S,videoUrl:H,onButtonClick:Z,onBackClick:N,onSetupBillPaySuccess:z,onClickMenuIcon:q})=>{const h=F(),a=f(),{billPayTermsDetails:p}=i,[J,K]=g.useState(!1),[Q,v]=g.useState(!1),k=Y(p?.fetchStatus.fetchState);g.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&z?.()},[k,z,p?.fetchStatus]);const W=()=>{o?.trackBillPayPromoScheduleDemo(),v(!0)},X=ce(h.loggedInUserRoleMap),P=pe(h.loggedInUserRoleMap)&&!X,T=P?t.setupNonAccessableUsersPromoText:t.promoText;return e.jsxs(ge,{children:[J===!0?e.jsx(me,{onCancelClick:()=>{K(!1)},videoUrl:H}):null,Q===!0?e.jsx(ee,{onCancelClick:()=>{v(!1)},meetingUrl:S}):null,e.jsx(ie,{title:t.title,onBackClick:N,showBackButton:!xe(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:q,source:"BillPayPromoPage"}),e.jsxs(ue,{windowSize:a,children:[a==="small"?e.jsx(ye,{children:T}):e.jsx(we,{children:T}),a==="small"?e.jsx(Se,{}):e.jsx(ze,{}),P===!1?e.jsxs(je,{children:[e.jsxs($e,{windowSize:a,children:[e.jsx(C,{variant:"secondary",label:t.scheduleDemoButton,onClick:W,"data-testid":B("billpay-schedule-demo-button")}),e.jsx(be,{windowSize:a,children:t.orText}),e.jsx(C,{variant:"primary",label:t.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:Z,"data-testid":B("billpay-setup-button")})]}),e.jsxs(fe,{children:[t.terms.terms1,e.jsx(x,{href:r.consentUrl,linkText:r.consent}),r.term2,e.jsx(x,{href:r.depositUrl,linkText:r.depositTerms}),r.term3,e.jsx(x,{href:r.privacyPolicyUrl,onZeniLinkClick:()=>(o?.trackBillPayPrivacyPolicy(),!0),linkText:r.privacy}),r.term4,e.jsx(x,{href:r.tosUrl,onZeniLinkClick:()=>(o?.trackBillPayAgreement(),!0),linkText:r.tos}),r.term5,t.terms.terms3]})]}):null]})]})},Se=()=>{const i=M(),o=f();return e.jsxs(L,{windowSize:o,children:[e.jsx(E,{windowSize:o,children:e.jsx(O,{windowSize:o,children:i.mode==="dark"?e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(V,{windowSize:o,children:[e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(G,{})}),e.jsxs(c,{children:[e.jsx(j,{children:t.fullyManagedText.bold}),e.jsx(y,{children:t.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(j,{children:t.multiLevelApprovalText.bold}),e.jsx(y,{children:t.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:o,children:[e.jsx(d,{children:e.jsx(_,{})}),e.jsxs(c,{children:[e.jsx(j,{children:t.aiPoweredText.bold}),e.jsx(y,{children:t.aiPoweredText.regular})]})]})]})]})},ze=()=>{const i=M(),o=f();return e.jsxs(L,{windowSize:o,children:[e.jsxs(V,{windowSize:o,children:[e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(G,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.fullyManagedText.bold}),e.jsx(u,{children:t.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.multiLevelApprovalText.bold}),e.jsx(u,{children:t.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:o,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(_,{})}),e.jsxs(c,{children:[e.jsx(w,{children:t.aiPoweredText.bold}),e.jsx(u,{children:t.aiPoweredText.regular})]})]})]}),e.jsx(E,{windowSize:o,children:e.jsx(O,{windowSize:o,children:i.mode==="dark"?e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{Oe as default};
@@ -1,4 +1,4 @@
1
- import{g as De,e as Oe,aS as F,aa as $e,cQ as Ue,O as Re,aX as K,V as t,fr as Le,d as He,ac as ze,x as u,bE as Ne,L as qe,ae as Me,fI as L,e1 as Ge,fJ as Je,by as Qe,dS as Ze,c1 as Ke,fK as Xe,aT as Ye,o as z,fL as et,u as a,an as tt,bM as it}from"./index-BPaR2lvP.js";import{a as m}from"./sentry-BLwIhkwX.js";import{n as b}from"./mui-Bxat3ZJX.js";import{bJ as nt}from"./zeni-epic-state-BFw7CFlI.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-qrcEQmkz-BcDGNs5r.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="57bc46e0-e24d-4084-a351-6ba63778c28c",e._sentryDebugIdIdentifier="sentry-dbid-57bc46e0-e24d-4084-a351-6ba63778c28c")}catch{}})();const n={titleWidth:new u(343,580,726,826),setupDetailsRowGap:new u(12,a[5],a[5]),sectionRowGap:new u(a[5],a[9],a[9]),lastSectionPaddingBottom:new u(a[7],a[10],a[10]),iconWidthHeight:new u(20,a[4]),subTitlePaddingTop:new u(12,a[3]),subTitlePaddingBottom:new u(a[3],a[3]),overlayWidth:new u(100,100,59)},X="billPaySetUpPage",W="billPayAccount",Ct=({billPaySetupView:e,isDisabled:p,billpayApprovalView:v,meetingUrl:C,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:y,filesEndPoint:ne,authParams:oe,accountsPromoConfig:ae,onBackClick:le,onBusinessVerificationSectionClick:ce,onSetupApprovalRulesSectionClick:se,onFetchLinkTokenClick:de,onEstablishConnectionClick:re,onEstablishConnectionSuccess:ue,onUpdatePrimaryFundingAccount:pe,onUpdateAccountClick:fe,onUpdatePaymentAccountStatus:he,onUpdatePaymentAccountLoginStatus:ge,onEnableBillPayClick:me,onEnableBillPaySuccess:N,onClickMenuIcon:be,onInternationPaymentSetUpClick:ye,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:we,onCompanyOfficerUpdated:xe,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const k=De(),i=Oe(),[A,S]=m.useState(!1),q=m.useRef(null),{fetchState:f,updateStatus:P,accountUpdateStatus:ke,plaidConnectionDetails:_,allBankAccounts:Ae,companyBillPayInfo:T,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:d,allFundingAccounts:M}=e,h=T?.internationalWireOnboardingStatus,I=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:V,approvalRulesStatus:Ie}=v,D=_.link_account.updateStatus,O=_.update_account.updateStatus,j=F(f),J=F(P.fetchState),Q=F(D.fetchState),Z=F(O.fetchState),w=$e({mode:"all",reValidateMode:"onChange",defaultValues:m.useMemo(()=>H(e),[e]),values:H(e)});m.useEffect(()=>{!A&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&S(!0),A&&j==="In-Progress"&&f==="Completed"&&S(!1)},[c,f,j]),m.useEffect(()=>{(j==="In-Progress"&&f==="Completed"||Q==="In-Progress"&&D.fetchState==="Completed"||Z==="In-Progress"&&O.fetchState==="Completed")&&w.reset(H(e))},[j,f,w,e,Q,D.fetchState,Z,O.fetchState]);const Ve=w.handleSubmit(x=>{y.trackEnableBillPay(),me()}),je=async(x,E)=>{const o=E[W];if(x.includes(W)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&d?.id!=o.fundingAccount.selectedOption){const g=M.find(R=>R.id===o.fundingAccount.selectedOption);g!=null&&pe(o.fundingAccount.selectedOption,g.accType)}}else if(o.account.selectedOption!=null&&d?.id!=null&&d?.zeniAccountId!=o.account.selectedOption){const g=o.account.allOptions.find(R=>R.value===o.account.selectedOption);g!=null&&typeof g.label=="string"&&y.trackConnectBankLink(g.value,g.label,"bill_pay"),fe(o.account.selectedOption,d.id,d.accType)}}};m.useEffect(()=>{const x=w.watch((E,{name:o})=>{o!=null&&E!=null&&Ue(()=>je(o,E))});return()=>{x.unsubscribe()}}),m.useEffect(()=>{J==="In-Progress"&&P.fetchState==="Completed"&&N()},[N,J,P.fetchState]);const{commonSetUp:Be,spendManagement:Ee}=Re.getLocalizedStrings(),{setUp:r}=Be,{billPaySetup:l}=Ee.billPay,$=T?.isBusinessVerified===!0&&(d?.accType==="depositAccount"||nt(d?.providerVerificationStatus?.code??"")),U=T?.isBillPayEnabled===!0,Fe=$?r.setupVerifiedSubTitle:l.setupSubTitle,We=f==="In-Progress"||f==="Not-Started"||G==="In-Progress"||G==="Not-Started",B=k.mode==="light"?new K(k.colors.brandColorJadeLight):new K(k.colors.brandColorJadeDark),_e=()=>{!A&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?S(!0):ce?.()};return t.jsxs(lt,{ref:q,children:[t.jsx(Le,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:A,onClose:()=>S(!1),style:{backgroundColor:He.drawerBackground},transitionDuration:250,"data-testid":ze("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:P,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:we,companyOfficer:c,onClose:()=>S(!1),onCompanyOfficerUpdated:xe,onSendForVerificationClick:ve})}),t.jsx(Ne,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!U&&(i==="medium-compact"||i==="small"),onClickMenuIcon:be,scrollableContent:q,backgroundColor:k.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(dt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:Fe}),We?t.jsx(rt,{children:t.jsx(qe,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(Me,{...w,children:t.jsx("form",{id:Y(X),onSubmit:Ve,children:t.jsxs(ut,{windowSize:i,children:[t.jsx(L,{onClick:_e,title:r.businessVerificationTitle,subTitle:r.businessVerificationSubTitle,header:r.businessVerificationHeader,icon:{element:t.jsx(Ge,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},status:T?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(Je,{connectedAccountProvider:ee,primaryFundingAccount:d,allFundingAccounts:M,plaidConnectionDetails:_,allBankAccounts:Ae,sectionId:W,isDisabled:p,onFetchLinkTokenClick:de,onEstablishConnectionClick:re,onUpdatePaymentAccountStatus:he,onUpdatePaymentAccountLoginStatus:ge,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},analytics:y,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(L,{title:V.length>0?r.approvalTitle:r.createApprovalTitle,subTitle:l.approvalSubTitle,header:V.length>0?r.approvalHeader:r.setupApprovalHeader,icon:{element:t.jsx(Ze,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:V.length>0?Ie:void 0})]})})}),s===!0?t.jsx(L,{title:I?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Xe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{I&&y.trackEnableIntlWire(ie),ye?.()},status:I?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Ke,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:I}):null]})]}),$&&!U&&V.length>0?t.jsx(Ye,{formId:Y(X),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:P.fetchState==="In-Progress"||ke.fetchState==="In-Progress",isDisabled:p!=null},showCancel:!1,helperText:l.terms,cancelBtn:{label:""},style:{padding:`12px ${z.sp3}`}}):null,t.jsx(et,{isFooterRendered:$&&!U,meetingUrl:C,analytics:y,productType:"bill_pay"})]})},at=b.div``,lt=b.div`
1
+ import{g as De,e as Oe,aS as F,aa as $e,cQ as Ue,O as Re,aX as K,V as t,fr as Le,d as He,ac as ze,x as u,bE as Ne,L as qe,ae as Me,fI as L,e1 as Ge,fJ as Je,by as Qe,dS as Ze,c1 as Ke,fK as Xe,aT as Ye,o as z,fL as et,u as a,an as tt,bM as it}from"./index-CUxbisrq.js";import{a as m}from"./sentry-tsfGilE0.js";import{n as b}from"./mui-CW7vGIKQ.js";import{bJ as nt}from"./zeni-epic-state-DGV_6n4t.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-Wl4Spdpn-D59nwhG6.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="98b3ea1e-cd61-43a9-a83d-957591abe646",e._sentryDebugIdIdentifier="sentry-dbid-98b3ea1e-cd61-43a9-a83d-957591abe646")}catch{}})();const n={titleWidth:new u(343,580,726,826),setupDetailsRowGap:new u(12,a[5],a[5]),sectionRowGap:new u(a[5],a[9],a[9]),lastSectionPaddingBottom:new u(a[7],a[10],a[10]),iconWidthHeight:new u(20,a[4]),subTitlePaddingTop:new u(12,a[3]),subTitlePaddingBottom:new u(a[3],a[3]),overlayWidth:new u(100,100,59)},X="billPaySetUpPage",W="billPayAccount",Ct=({billPaySetupView:e,isDisabled:p,billpayApprovalView:v,meetingUrl:C,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:y,filesEndPoint:ne,authParams:oe,accountsPromoConfig:ae,onBackClick:le,onBusinessVerificationSectionClick:ce,onSetupApprovalRulesSectionClick:se,onFetchLinkTokenClick:de,onEstablishConnectionClick:re,onEstablishConnectionSuccess:ue,onUpdatePrimaryFundingAccount:pe,onUpdateAccountClick:fe,onUpdatePaymentAccountStatus:he,onUpdatePaymentAccountLoginStatus:ge,onEnableBillPayClick:me,onEnableBillPaySuccess:N,onClickMenuIcon:be,onInternationPaymentSetUpClick:ye,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:we,onCompanyOfficerUpdated:xe,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const k=De(),i=Oe(),[A,S]=m.useState(!1),q=m.useRef(null),{fetchState:f,updateStatus:P,accountUpdateStatus:ke,plaidConnectionDetails:_,allBankAccounts:Ae,companyBillPayInfo:T,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:d,allFundingAccounts:M}=e,h=T?.internationalWireOnboardingStatus,I=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:V,approvalRulesStatus:Ie}=v,D=_.link_account.updateStatus,O=_.update_account.updateStatus,j=F(f),J=F(P.fetchState),Q=F(D.fetchState),Z=F(O.fetchState),w=$e({mode:"all",reValidateMode:"onChange",defaultValues:m.useMemo(()=>H(e),[e]),values:H(e)});m.useEffect(()=>{!A&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&S(!0),A&&j==="In-Progress"&&f==="Completed"&&S(!1)},[c,f,j]),m.useEffect(()=>{(j==="In-Progress"&&f==="Completed"||Q==="In-Progress"&&D.fetchState==="Completed"||Z==="In-Progress"&&O.fetchState==="Completed")&&w.reset(H(e))},[j,f,w,e,Q,D.fetchState,Z,O.fetchState]);const Ve=w.handleSubmit(x=>{y.trackEnableBillPay(),me()}),je=async(x,E)=>{const o=E[W];if(x.includes(W)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&d?.id!=o.fundingAccount.selectedOption){const g=M.find(R=>R.id===o.fundingAccount.selectedOption);g!=null&&pe(o.fundingAccount.selectedOption,g.accType)}}else if(o.account.selectedOption!=null&&d?.id!=null&&d?.zeniAccountId!=o.account.selectedOption){const g=o.account.allOptions.find(R=>R.value===o.account.selectedOption);g!=null&&typeof g.label=="string"&&y.trackConnectBankLink(g.value,g.label,"bill_pay"),fe(o.account.selectedOption,d.id,d.accType)}}};m.useEffect(()=>{const x=w.watch((E,{name:o})=>{o!=null&&E!=null&&Ue(()=>je(o,E))});return()=>{x.unsubscribe()}}),m.useEffect(()=>{J==="In-Progress"&&P.fetchState==="Completed"&&N()},[N,J,P.fetchState]);const{commonSetUp:Be,spendManagement:Ee}=Re.getLocalizedStrings(),{setUp:r}=Be,{billPaySetup:l}=Ee.billPay,$=T?.isBusinessVerified===!0&&(d?.accType==="depositAccount"||nt(d?.providerVerificationStatus?.code??"")),U=T?.isBillPayEnabled===!0,Fe=$?r.setupVerifiedSubTitle:l.setupSubTitle,We=f==="In-Progress"||f==="Not-Started"||G==="In-Progress"||G==="Not-Started",B=k.mode==="light"?new K(k.colors.brandColorJadeLight):new K(k.colors.brandColorJadeDark),_e=()=>{!A&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?S(!0):ce?.()};return t.jsxs(lt,{ref:q,children:[t.jsx(Le,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:A,onClose:()=>S(!1),style:{backgroundColor:He.drawerBackground},transitionDuration:250,"data-testid":ze("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:P,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:we,companyOfficer:c,onClose:()=>S(!1),onCompanyOfficerUpdated:xe,onSendForVerificationClick:ve})}),t.jsx(Ne,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!U&&(i==="medium-compact"||i==="small"),onClickMenuIcon:be,scrollableContent:q,backgroundColor:k.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(dt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:Fe}),We?t.jsx(rt,{children:t.jsx(qe,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(Me,{...w,children:t.jsx("form",{id:Y(X),onSubmit:Ve,children:t.jsxs(ut,{windowSize:i,children:[t.jsx(L,{onClick:_e,title:r.businessVerificationTitle,subTitle:r.businessVerificationSubTitle,header:r.businessVerificationHeader,icon:{element:t.jsx(Ge,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},status:T?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(Je,{connectedAccountProvider:ee,primaryFundingAccount:d,allFundingAccounts:M,plaidConnectionDetails:_,allBankAccounts:Ae,sectionId:W,isDisabled:p,onFetchLinkTokenClick:de,onEstablishConnectionClick:re,onUpdatePaymentAccountStatus:he,onUpdatePaymentAccountLoginStatus:ge,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},analytics:y,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(L,{title:V.length>0?r.approvalTitle:r.createApprovalTitle,subTitle:l.approvalSubTitle,header:V.length>0?r.approvalHeader:r.setupApprovalHeader,icon:{element:t.jsx(Ze,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:V.length>0?Ie:void 0})]})})}),s===!0?t.jsx(L,{title:I?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Xe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{I&&y.trackEnableIntlWire(ie),ye?.()},status:I?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Ke,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:I}):null]})]}),$&&!U&&V.length>0?t.jsx(Ye,{formId:Y(X),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:P.fetchState==="In-Progress"||ke.fetchState==="In-Progress",isDisabled:p!=null},showCancel:!1,helperText:l.terms,cancelBtn:{label:""},style:{padding:`12px ${z.sp3}`}}):null,t.jsx(et,{isFooterRendered:$&&!U,meetingUrl:C,analytics:y,productType:"bill_pay"})]})},at=b.div``,lt=b.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{g as we,e as be,aa as Ce,cQ as Pe,aX as k,O as xe,V as t,x as P,bE as Ie,L as Ae,ae as ve,by as je,cR as ke,aT as $e,o as s,i1 as Te,fd as De,fe as Ve,u as x,an as Ee,h6 as Be,d as Le,N as ze}from"./index-BPaR2lvP.js";import{a as F}from"./sentry-BLwIhkwX.js";import{n as d}from"./mui-Bxat3ZJX.js";import{F as Oe,o as R,t as _e}from"./PaymentAccountSetupBillingAddressSection-D-kQI4nd-C0_R1ayg.js";import{F as Me}from"./SetUpAccountSection-CxjYbrXu-CtMlCNu-.js";import"./liveblocks-C4DKHbPz.js";import"./core-pNImhQEZ.js";import"./recharts-BNNpZjq4.js";import"./zeni-epic-state-BFw7CFlI.js";import"./lottie-CsNuSf0J.js";import"./analytics-BewK2g0S.js";import"./lexical-BUygpfI7.js";import"./utils--7vqVVLA.js";import"./commonTypes-B3mnx2x_-BJwPTlX8.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="6dc5b613-643a-43f3-a2d4-7cdfe0f0fbd4",e._sentryDebugIdIdentifier="sentry-dbid-6dc5b613-643a-43f3-a2d4-7cdfe0f0fbd4")}catch{}})();const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,x[5],x[5]),iconWidthHeight:new P(20,x[4]),subTitlePaddingTop:new P(12,x[3])},Fe={title:new ze("standardSemiBold","largeSemiBold")},H="billingSetupPage",I="payAccountSectionId",n="subscriptionBillingAddressSectionId",ct=({analytics:e,billingSetupView:i,connectedAccountProvider:m,isDisabled:r,onClickMenuIcon:A,uiState:U,stripeKey:K,googleAPIKey:q,companyId:G,onUpdateAccountClick:J,onFetchLinkTokenClick:Q,onUpdatePaymentAccountStatus:Z,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:de})=>{const b=we(),o=be(),{setupView:{paymentAccount:y,plaidConnectionDetails:re,allBankAccounts:le,accountFetchStatus:T},cardPaymentView:h}=i,ce=i.subscriptionBillingAddress,D=y?.providerVerificationStatus,ue=T.fetchState==="In-Progress"||T.fetchState==="Not-Started",f=Ce({mode:"onSubmit",reValidateMode:"onChange",defaultValues:W(i),values:W(i),resetOptions:{keepDirtyValues:!0}}),pe=f.handleSubmit(c=>{se(G)}),V=i.subscriptionBillingAddressSaveStatus,me=async(c,a)=>{const g=a[I];if(c.includes(n)&&a[n]!=null){const v=f.getValues(`${n}`).country;let u=a[n];if(c.includes(`${n}.street`)&&a[n].street!=null){const{addressValue:w}=a[n].street,j=De(w?.country);u={street:a[n].street??l.strings.empty,city:w?.locality??l.strings.empty,state:w?.administrativeAreaLevel1??l.strings.empty,country:j,countryCode:w?.countryCode??l.strings.empty,postalCode:w?.postalCode??l.strings.empty,secondaryInfo:a[n].secondaryInfo,suite:a[n].suite},v.selectedOption!==j.selectedOption&&(u={...u,country:j})}else c===`${n}.country`&&v.selectedOption!=null&&(u={...u,countryCode:Ve(v.selectedOption)});u!=null&&de(u)}else c.includes(I)&&g.account.selectedOption!=null&&y?.paymentAccountId!=null&&y.zeniAccountId!==g.account.selectedOption&&J(g.account.selectedOption,y.paymentAccountId)};F.useEffect(()=>{const c=f.watch((a,{name:g})=>{g!=null&&a!=null&&Pe(()=>me(g,a))});return()=>{c.unsubscribe()}});const E=b.mode==="light"?new k(b.colors.brandColorJadeLight):new k(b.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:S}},common:l,billingSetupPage:B}=xe.getLocalizedStrings(),ge=B.section.subTitle,{text:ye,subText:fe}=he,L=h.cardsList.length>0,z=h?.cardsList[0]?.brand??"other",O=h?.addCardPaymentSourceStatus.fetchState,C=Oe(S.header,S.titleText,S.protectedCardNo,h);let _;L&&(_={header:C.header,title:C.title,subtitle:C.subtitle,status:C.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:L===!0,icon:{element:t.jsx("img",{src:R(z).iconURL,width:p.iconWidthHeight.valuePx(o),height:p.iconWidthHeight.valuePx(o),alt:R(z).name}),color:new k(E)},showCompletedIcon:!1,isError:O==="Error",isLoading:O==="In-Progress",isCompleted:!0,showRightArrow:!1});const[M,Se]=F.useState(!1);return t.jsxs(He,{children:[t.jsx(Ie,{source:"BillingSettingsPage",title:B.section.title,backgroundColor:b.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:o==="medium-compact"||o==="small",onClickMenuIcon:A}),t.jsxs(Re,{windowSize:o,children:[t.jsx(We,{windowSize:o,children:ge}),ue?t.jsx(Ne,{children:t.jsx(Ae,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...f,children:t.jsx(Je,{children:t.jsx("form",{id:N(H),onSubmit:pe,children:t.jsxs(Ue,{windowSize:o,children:[t.jsx(Me,{connectedAccountProvider:m,paymentAccount:y,plaidConnectionDetails:re,allBankAccounts:le,header:S.header,sectionTitle:S.header,defaultSectionTitle:ye,defaultSectionSubTitle:fe,sectionId:I,isDisabled:r,onFetchLinkTokenClick:Q,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Z,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionSuccess:ee,isError:D?.code==="require_info"||D?.code==="failed",icon:{element:t.jsx(je,{width:p.iconWidthHeight.valuePx(o),height:p.iconWidthHeight.valuePx(o)}),color:E},analytics:e,productType:"billing",updateCardPaymentModalState:$,cardPaymentSectionValues:_,cardPaymentView:h,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:M}),Ke(o,l.headers.billingAddress,ce,q,r)]})})})}),ke(f.formState.dirtyFields)?t.jsx($e,{formId:N(H),style:{width:o==="small"?"auto":"100%",paddingTop:s.sp2,paddingBottom:s.sp2,height:s.sp8},primaryBtn:{label:l.footer.save,isLoading:V?.fetchState==="In-Progress",isDisabled:V?.fetchState==="In-Progress",style:{height:s.sp6}},showCancel:!1,containerStyle:{width:"auto",justifyContent:"center"}}):null]}),t.jsx(_e,{handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:h,isCardPaymentOpen:U.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:K,cardSetupInProgress:M,setCardSetupInProgress:Se})]})},W=e=>{const{paymentAccount:i,allBankAccounts:m}=e.setupView;return{[I]:{account:{selectedOption:i?.zeniAccountId,allOptions:m.map(r=>({label:r.accountName,value:r.accountId}))}},[n]:Te(n,e.subscriptionBillingAddress)[n]}},Re=d.div`
1
+ import{g as we,e as be,aa as Ce,cQ as Pe,aX as k,O as xe,V as t,x as P,bE as Ie,L as Ae,ae as ve,by as je,cR as ke,aT as $e,o as s,i1 as Te,fd as De,fe as Ve,u as x,an as Ee,h6 as Be,d as Le,N as ze}from"./index-CUxbisrq.js";import{a as F}from"./sentry-tsfGilE0.js";import{n as d}from"./mui-CW7vGIKQ.js";import{F as Oe,o as R,t as _e}from"./PaymentAccountSetupBillingAddressSection-9ma8SpIa-Dp7MlqYC.js";import{F as Me}from"./SetUpAccountSection-CctbMmoK-D5qM49W4.js";import"./liveblocks-DTtNefcp.js";import"./core-gc5ND_yy.js";import"./recharts-CUzMVol9.js";import"./zeni-epic-state-DGV_6n4t.js";import"./lottie-BctA_6Pz.js";import"./analytics-uGzTqGx1.js";import"./lexical-zfv1-tRH.js";import"./utils-yWIuTv4c.js";import"./commonTypes-5tEXwrX4-BvhObQ7j.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="8fcb78dd-9a6f-45fa-aed0-8b6ca7f24741",e._sentryDebugIdIdentifier="sentry-dbid-8fcb78dd-9a6f-45fa-aed0-8b6ca7f24741")}catch{}})();const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,x[5],x[5]),iconWidthHeight:new P(20,x[4]),subTitlePaddingTop:new P(12,x[3])},Fe={title:new ze("standardSemiBold","largeSemiBold")},H="billingSetupPage",I="payAccountSectionId",n="subscriptionBillingAddressSectionId",ct=({analytics:e,billingSetupView:i,connectedAccountProvider:m,isDisabled:r,onClickMenuIcon:A,uiState:U,stripeKey:K,googleAPIKey:q,companyId:G,onUpdateAccountClick:J,onFetchLinkTokenClick:Q,onUpdatePaymentAccountStatus:Z,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:de})=>{const b=we(),o=be(),{setupView:{paymentAccount:y,plaidConnectionDetails:re,allBankAccounts:le,accountFetchStatus:T},cardPaymentView:h}=i,ce=i.subscriptionBillingAddress,D=y?.providerVerificationStatus,ue=T.fetchState==="In-Progress"||T.fetchState==="Not-Started",f=Ce({mode:"onSubmit",reValidateMode:"onChange",defaultValues:W(i),values:W(i),resetOptions:{keepDirtyValues:!0}}),pe=f.handleSubmit(c=>{se(G)}),V=i.subscriptionBillingAddressSaveStatus,me=async(c,a)=>{const g=a[I];if(c.includes(n)&&a[n]!=null){const v=f.getValues(`${n}`).country;let u=a[n];if(c.includes(`${n}.street`)&&a[n].street!=null){const{addressValue:w}=a[n].street,j=De(w?.country);u={street:a[n].street??l.strings.empty,city:w?.locality??l.strings.empty,state:w?.administrativeAreaLevel1??l.strings.empty,country:j,countryCode:w?.countryCode??l.strings.empty,postalCode:w?.postalCode??l.strings.empty,secondaryInfo:a[n].secondaryInfo,suite:a[n].suite},v.selectedOption!==j.selectedOption&&(u={...u,country:j})}else c===`${n}.country`&&v.selectedOption!=null&&(u={...u,countryCode:Ve(v.selectedOption)});u!=null&&de(u)}else c.includes(I)&&g.account.selectedOption!=null&&y?.paymentAccountId!=null&&y.zeniAccountId!==g.account.selectedOption&&J(g.account.selectedOption,y.paymentAccountId)};F.useEffect(()=>{const c=f.watch((a,{name:g})=>{g!=null&&a!=null&&Pe(()=>me(g,a))});return()=>{c.unsubscribe()}});const E=b.mode==="light"?new k(b.colors.brandColorJadeLight):new k(b.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:S}},common:l,billingSetupPage:B}=xe.getLocalizedStrings(),ge=B.section.subTitle,{text:ye,subText:fe}=he,L=h.cardsList.length>0,z=h?.cardsList[0]?.brand??"other",O=h?.addCardPaymentSourceStatus.fetchState,C=Oe(S.header,S.titleText,S.protectedCardNo,h);let _;L&&(_={header:C.header,title:C.title,subtitle:C.subtitle,status:C.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:L===!0,icon:{element:t.jsx("img",{src:R(z).iconURL,width:p.iconWidthHeight.valuePx(o),height:p.iconWidthHeight.valuePx(o),alt:R(z).name}),color:new k(E)},showCompletedIcon:!1,isError:O==="Error",isLoading:O==="In-Progress",isCompleted:!0,showRightArrow:!1});const[M,Se]=F.useState(!1);return t.jsxs(He,{children:[t.jsx(Ie,{source:"BillingSettingsPage",title:B.section.title,backgroundColor:b.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:o==="medium-compact"||o==="small",onClickMenuIcon:A}),t.jsxs(Re,{windowSize:o,children:[t.jsx(We,{windowSize:o,children:ge}),ue?t.jsx(Ne,{children:t.jsx(Ae,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...f,children:t.jsx(Je,{children:t.jsx("form",{id:N(H),onSubmit:pe,children:t.jsxs(Ue,{windowSize:o,children:[t.jsx(Me,{connectedAccountProvider:m,paymentAccount:y,plaidConnectionDetails:re,allBankAccounts:le,header:S.header,sectionTitle:S.header,defaultSectionTitle:ye,defaultSectionSubTitle:fe,sectionId:I,isDisabled:r,onFetchLinkTokenClick:Q,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Z,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionSuccess:ee,isError:D?.code==="require_info"||D?.code==="failed",icon:{element:t.jsx(je,{width:p.iconWidthHeight.valuePx(o),height:p.iconWidthHeight.valuePx(o)}),color:E},analytics:e,productType:"billing",updateCardPaymentModalState:$,cardPaymentSectionValues:_,cardPaymentView:h,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:M}),Ke(o,l.headers.billingAddress,ce,q,r)]})})})}),ke(f.formState.dirtyFields)?t.jsx($e,{formId:N(H),style:{width:o==="small"?"auto":"100%",paddingTop:s.sp2,paddingBottom:s.sp2,height:s.sp8},primaryBtn:{label:l.footer.save,isLoading:V?.fetchState==="In-Progress",isDisabled:V?.fetchState==="In-Progress",style:{height:s.sp6}},showCancel:!1,containerStyle:{width:"auto",justifyContent:"center"}}):null]}),t.jsx(_e,{handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:h,isCardPaymentOpen:U.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:K,cardSetupInProgress:M,setCardSetupInProgress:Se})]})},W=e=>{const{paymentAccount:i,allBankAccounts:m}=e.setupView;return{[I]:{account:{selectedOption:i?.zeniAccountId,allOptions:m.map(r=>({label:r.accountName,value:r.accountId}))}},[n]:Te(n,e.subscriptionBillingAddress)[n]}},Re=d.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  height: 100%;