@zeniai/web-cockpit-ui 1.15.49-dev → 1.15.49-qa

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 (219) hide show
  1. package/dist/assets/{ACHDetailsPage-CXIFSMnN-Coq6wI87.js → ACHDetailsPage-CXIFSMnN-rOa7ijtO.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-DgrMh-mY-Bylt20RS.js → AIPerformancePage-DgrMh-mY-K_L0-Eq5.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-WkSEcWJL-CkOnNoKS.js → AccountInfoPage-WkSEcWJL-B7y1ofU7.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-DeptuP1q-CsYE_k70.js → AccountInfoPageContent-DeptuP1q-CXFDiEu_.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-CYYkjr3Y-BcAzzzM4.js → AccountLockedInfoModal-CYYkjr3Y-DobFgDty.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-jN8KgM4V-yAl3_OHe.js → AccountReconDetailsDrawerPage-jN8KgM4V-B7FCaNrh.js} +1 -1
  7. package/dist/assets/{AccountRow-C7_pSX9U-C_uj4ob-.js → AccountRow-C7_pSX9U-B9KvLBQA.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-CB2gPVUw-D3B_FWzu.js → AccountsPromoCardStack-CB2gPVUw-C_-RQv2p.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-BiaLjcnj-DwcRtJ6c.js → AddAddressForCardDrawer-BiaLjcnj-CxC9pVAA.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-BlExjuu4-B196FBl9.js → AddToWalletPage-BlExjuu4-B6fSUfMX.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-D9UyMHCS-CUKIok_T.js → AgingReportsPage-D9UyMHCS-DwJTo92G.js} +1 -1
  12. package/dist/assets/{AllUserItems-DGGAZCTH-DA8Osx0t.js → AllUserItems-DGGAZCTH-D2KumUmr.js} +1 -1
  13. package/dist/assets/{ApAgingDetailPage-C-whdj9K-JXlpGLx8.js → ApAgingDetailPage-C-whdj9K-99rW7Quf.js} +1 -1
  14. package/dist/assets/{AppBasePage-ANWa38-v-Dui1Sxci.js → AppBasePage-ANWa38-v-bkvKH45R.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-UhQJdUmA-CkRUhLQ3.js → AppDrawerContent-UhQJdUmA-AZHQCyJQ.js} +1 -1
  16. package/dist/assets/{ApprovalRulesSettingsPage-BdNNS-TS-C1VrdMxf.js → ApprovalRulesSettingsPage-BdNNS-TS-Bk9WTj_a.js} +1 -1
  17. package/dist/assets/{ArAgingChart-CuFQTCRF-BBoOHiTE.js → ArAgingChart-CuFQTCRF-DN9J_Y2h.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-CQRhI5Z_-Db-Z6Fvw.js → ArAgingDetailPage-CQRhI5Z_-CMEQ607R.js} +1 -1
  19. package/dist/assets/{AttachmentView-D6K3YHdZ-Bap3B_dh.js → AttachmentView-D6K3YHdZ-CQhf5_2O.js} +1 -1
  20. package/dist/assets/{BankAccountSection-B51-Hpnt-BDzmY8Fy.js → BankAccountSection-B51-Hpnt-zQcAknrg.js} +1 -1
  21. package/dist/assets/{BankAccountWarningSection-Bqrm3j-y-DAe6VsjZ.js → BankAccountWarningSection-Bqrm3j-y-Bfp1n-_2.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-BeTdU1D7-CvYt_ADS.js → BankConnectionsSettingsPage-BeTdU1D7-1ZwaPu34.js} +1 -1
  23. package/dist/assets/{BillDetailPage-GenRHQg3-fgN7wk2K.js → BillDetailPage-GenRHQg3-BhstXZdv.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-CVBTvKC--CjXFb5TX.js → BillPayApprovalRuleDetailPage-CVBTvKC--CoclrGTY.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-COiOi09y-D-B4gYTJ.js → BillPayApprovalRulesPage-COiOi09y-e7auJ9tU.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-C-lZ36kT-Cmn31Ydv.js → BillPayPromoPage-C-lZ36kT-DlFLTpoA.js} +1 -1
  27. package/dist/assets/{BillPaySetUpPage-3O1UBtgm-Dsg0n8rt.js → BillPaySetUpPage-3O1UBtgm-Ba2SvBp2.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-ButDt4sV-CDAA93m9.js → BillingSettingsPage-ButDt4sV-J3WU4lbz.js} +1 -1
  29. package/dist/assets/{BillsBulkReviewDrawerPage-DngjFR3H-BSt2ez3P.js → BillsBulkReviewDrawerPage-DngjFR3H-S5q_PCw7.js} +1 -1
  30. package/dist/assets/{BoxItem-C-VST523-DMPXmLe8.js → BoxItem-C-VST523-Dpmj8AX-.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-CnF2Rkda-BxUtCmxb.js → BusinessVerificationPage-CnF2Rkda-TzwiG42-.js} +1 -1
  32. package/dist/assets/{CardNumberSubText-BUvXykSn-DR27wA6E.js → CardNumberSubText-BUvXykSn-C8s1v8Jm.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-BhHWEtnP-BIMVCNfp.js → CashbackDetailPage-BhHWEtnP-C6PNQJTo.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-BGqaGwV3-AFT-HAkP.js → ChargeCardDetailPage-BGqaGwV3-DJU0Ct0_.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-D5H9U0h8-DeNsZOzv.js → ChargeCardListPage-D5H9U0h8-4pci3Gf7.js} +1 -1
  36. package/dist/assets/{ChargeCardListTable-Byme0rAu-ych_Qx-x.js → ChargeCardListTable-Byme0rAu-CupMRMua.js} +1 -1
  37. package/dist/assets/{ChargeCardPaymentHistoryPage-DKW98ipI-DfncT-JI.js → ChargeCardPaymentHistoryPage-DKW98ipI-jJA3c2mF.js} +1 -1
  38. package/dist/assets/{ChargeCardPromoPage-VSqN0247-7AKJMP0k.js → ChargeCardPromoPage-VSqN0247-DaYS7DGH.js} +1 -1
  39. package/dist/assets/{ChargeCardSetupPage-BMitkkOv-DqB6_gbE.js → ChargeCardSetupPage-BMitkkOv-CRc-ExOo.js} +1 -1
  40. package/dist/assets/{ChargeCardStatementsPage-C_iQ5kBD-CzlgcFfP.js → ChargeCardStatementsPage-C_iQ5kBD-DltkFcMb.js} +1 -1
  41. package/dist/assets/{CheckDepositDrawerPage-BaRz0MD0-fXpFUSD5.js → CheckDepositDrawerPage-BaRz0MD0-BM0_uKdc.js} +1 -1
  42. package/dist/assets/{CollapsableReportTable-C4hqC6Uj-CeOhK0qJ.js → CollapsableReportTable-C4hqC6Uj-5tFXuNTR.js} +1 -1
  43. package/dist/assets/{CompanyOfficerDetailsSection-DA62JWZF-28wXvrh9.js → CompanyOfficerDetailsSection-DA62JWZF-C0vBARr1.js} +1 -1
  44. package/dist/assets/{CompanyPassportCard-CDQgqgtJ-Cs-zlaQi.js → CompanyPassportCard-CDQgqgtJ-BbKcIlw1.js} +1 -1
  45. package/dist/assets/{CompanyPassportPage-DoOtHRwj-7bnAHUeu.js → CompanyPassportPage-DoOtHRwj-B2NN3Eii.js} +1 -1
  46. package/dist/assets/{CompleteProfile-DsEoizlG-DOegmHNH.js → CompleteProfile-DsEoizlG-CilawSZI.js} +1 -1
  47. package/dist/assets/{ConfettiBurst-D_bNA5jm-AxnjtqGp.js → ConfettiBurst-D_bNA5jm-C0pC4igq.js} +1 -1
  48. package/dist/assets/{ConstrainedInnerElement-BeIpAPjB-yhWFdRSc.js → ConstrainedInnerElement-BeIpAPjB-C-KqGnDU.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-CQGF8m1c-Km9d2S1Z.js → CreateOrEditVendorPage-CQGF8m1c-5DtlSJTb.js} +1 -1
  50. package/dist/assets/{CreditCardPaymentDrawerPage-DK_T0qbN-Bvmfy85N.js → CreditCardPaymentDrawerPage-DK_T0qbN-D_WRlOld.js} +1 -1
  51. package/dist/assets/{CurrencySelectField-7to_rmTp-D1r0SB0Y.js → CurrencySelectField-7to_rmTp-BXuKlnEM.js} +1 -1
  52. package/dist/assets/{CustomerOnboardingActivationPage-DCQ_KqzB-DJtTHAcy.js → CustomerOnboardingActivationPage-DCQ_KqzB-DRjyVNkZ.js} +1 -1
  53. package/dist/assets/CustomerOnboardingContainerPage-DMF9BtF3-BKj6CME5.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-ZTBIaml1-DBfEZVdM.js → CustomerOnboardingDetailPageSkeleton-ZTBIaml1-Cke6Qj94.js} +1 -1
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-DEq1Mm1I-Dp_05KKK.js → CustomerOnboardingNoStepsPage-DEq1Mm1I-BEgi-y28.js} +1 -1
  56. package/dist/assets/{CustomerOnboardingPage-BXch3GVe-Ba_gMD_F.js → CustomerOnboardingPage-BXch3GVe-Bpbomk3V.js} +1 -1
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-D7PFi42F-C_seXYMG.js → CustomerOnboardingProductSuitePage-D7PFi42F-Pj81dacI.js} +1 -1
  58. package/dist/assets/{Dashboard-BcjA6DTL-B8wtUrMY.js → Dashboard-BcjA6DTL-D6_dfU2g.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-Ce-jnQbs-CfmLV1Yt.js → DashboardReportPage-Ce-jnQbs-CWUPUukI.js} +1 -1
  60. package/dist/assets/{DashboardSidebarBackgroundAnimation-JT601qzy-CkG1z_mx.js → DashboardSidebarBackgroundAnimation-JT601qzy-CSYlyL6N.js} +1 -1
  61. package/dist/assets/{DepositAccTransactionItem-COgr8Xw5-NWAgf7bV.js → DepositAccTransactionItem-COgr8Xw5-CNQ4dSd1.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionListPage-zhPDzJoK-AejpnIWF.js → DepositAccTransactionListPage-zhPDzJoK-DKW1fuzv.js} +1 -1
  63. package/dist/assets/{DomesticWireDetailsPage-2MqIFQbM-BGwsfDe-.js → DomesticWireDetailsPage-2MqIFQbM-Db5kbpdd.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-CfWDWIbC-DcGZOT8A.js → DownloadOverlay-CfWDWIbC-Cl0cCm4g.js} +1 -1
  65. package/dist/assets/{DrawerPage-CfIhiBhn-A5CC3xdl.js → DrawerPage-CfIhiBhn-DE7vhkIA.js} +1 -1
  66. package/dist/assets/{EditPeoplePage-D25vo51x-BKCEnPp5.js → EditPeoplePage-D25vo51x-Zcjec459.js} +1 -1
  67. package/dist/assets/{EditReimbursementDetailPage-DnFC_tCw-Cr7fsauQ.js → EditReimbursementDetailPage-DnFC_tCw-DMOHN7Vj.js} +1 -1
  68. package/dist/assets/{EntityDetailPage-C9vgxsh4-Dg0LhTdP.js → EntityDetailPage-C9vgxsh4-pW11Yyxw.js} +1 -1
  69. package/dist/assets/{EntitySummarySection-Bie5ZOV3-BZu2b-HP.js → EntitySummarySection-Bie5ZOV3-SIl_FvB7.js} +1 -1
  70. package/dist/assets/{ExpenseAutomationOverviewPage-BEKF8mo3-DI5Un6My.js → ExpenseAutomationOverviewPage-BEKF8mo3-DmM0K3iX.js} +1 -1
  71. package/dist/assets/{ExpenseAutomationPage-DiJoZGeD-lfenglhX.js → ExpenseAutomationPage-DiJoZGeD-CMMBSd3y.js} +1 -1
  72. package/dist/assets/{ExpressPayPage-C6Jb6WrN-BeqBD08K.js → ExpressPayPage-C6Jb6WrN-e8VRvHCK.js} +1 -1
  73. package/dist/assets/{FeaturePreviewPage-ev9V1Riy-BV3fE1G1.js → FeaturePreviewPage-ev9V1Riy-DoZuV57C.js} +1 -1
  74. package/dist/assets/{FollowStepsSection-BlgHPyvL-BhwHykaB.js → FollowStepsSection-BlgHPyvL-D8EbsWxY.js} +1 -1
  75. package/dist/assets/{GlobalReviewListPage-Ck-LItUj-B8rLujq7.js → GlobalReviewListPage-Ck-LItUj-CLBJIe4f.js} +1 -1
  76. package/dist/assets/{InformationCardStack-BkuCjydF-ClSDOapP.js → InformationCardStack-BkuCjydF-DnNJwPwk.js} +1 -1
  77. package/dist/assets/{InsightsCardStack-BFrwV0PC-CZ45PRa1.js → InsightsCardStack-BFrwV0PC-CW70d0la.js} +1 -1
  78. package/dist/assets/{InsightsSection-BdLDesVF-oVNFlqx0.js → InsightsSection-BdLDesVF-CpQJT4QH.js} +1 -1
  79. package/dist/assets/{IntegrationsSettingsPage-skBb_52w-D47eLHv2.js → IntegrationsSettingsPage-skBb_52w-BiiqyfDj.js} +1 -1
  80. package/dist/assets/{InternationalWireSwiftDetailsPage-DUNu57zU-B6FHq7_F.js → InternationalWireSwiftDetailsPage-DUNu57zU-Usl58Zxp.js} +1 -1
  81. package/dist/assets/{InternationalWireVerificationPage-D1_fj0MG-Bu9SiBen.js → InternationalWireVerificationPage-D1_fj0MG-CJEK7is5.js} +1 -1
  82. package/dist/assets/{InviteFormPage-D8zySzlG-B662YNtS.js → InviteFormPage-D8zySzlG-BYE2Ux8Q.js} +1 -1
  83. package/dist/assets/{InvitePageListView-DUng4fOl-Bw5RtSsX.js → InvitePageListView-DUng4fOl-CBGNglbo.js} +1 -1
  84. package/dist/assets/{InvitePeoplePage-C0bQFMoO-C-nWyYL8.js → InvitePeoplePage-C0bQFMoO-BOaaBAKR.js} +1 -1
  85. package/dist/assets/{InvoiceUploadSection-CVOHcfdx-FSNHIS5V.js → InvoiceUploadSection-CVOHcfdx-DqakS9w6.js} +1 -1
  86. package/dist/assets/{IssueChargeCardPage-Vzj9appY-09K43VT7.js → IssueChargeCardPage-Vzj9appY-C2H0BZle.js} +1 -1
  87. package/dist/assets/{LabeledAddressValue-inaQliHs-Dg9xTHiz.js → LabeledAddressValue-inaQliHs-mNEyJAJu.js} +1 -1
  88. package/dist/assets/{LabeledAddressValueField-B6IDZIGK-SXi-bQ86.js → LabeledAddressValueField-B6IDZIGK-63I3yM9l.js} +1 -1
  89. package/dist/assets/{LabeledControlledCheckBoxField-DNMqJzBC-BPs_pf7S.js → LabeledControlledCheckBoxField-DNMqJzBC-CuRveHGl.js} +1 -1
  90. package/dist/assets/{LabeledCountryMultiSelectField--JYMnWIw-Dm5jwrCs.js → LabeledCountryMultiSelectField--JYMnWIw-BjiEaEDi.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-C5A14hjp-Dp3zoxD2.js → LabeledCreatableSingleSelectField-C5A14hjp-Cu6_9o8r.js} +1 -1
  92. package/dist/assets/{LabeledDocumentField-DXd7BAH7-EzfLYbDV.js → LabeledDocumentField-DXd7BAH7-mBB2Rq0Q.js} +1 -1
  93. package/dist/assets/{LabeledDropDownFormattedTextField-BVtRyAo1-706o2HXB.js → LabeledDropDownFormattedTextField-BVtRyAo1-BmIAsd6l.js} +1 -1
  94. package/dist/assets/{LabeledText-B0bwznDi-CbaJVeOz.js → LabeledText-B0bwznDi-DpPCDPqS.js} +1 -1
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DXTzXLuP-C7ZxqrMf.js → LabeledUserSingleSelectWithSubtitlesField-DXTzXLuP-B5dPNNrn.js} +1 -1
  96. package/dist/assets/{LabeledZeniRolesDropDownField-C0AamFZX-DtH7B1QB.js → LabeledZeniRolesDropDownField-C0AamFZX-Cg8mUfNU.js} +1 -1
  97. package/dist/assets/{LinkJETransactionPage-DWjs72Wp-CUQI1Z1j.js → LinkJETransactionPage-DWjs72Wp-Iy5FetNU.js} +1 -1
  98. package/dist/assets/{LockCardPage-CPUbpfrv-3LEgf1Eq.js → LockCardPage-CPUbpfrv-CNWonFPi.js} +1 -1
  99. package/dist/assets/{LowBalancePopup-Cg-JRo7A-zj6pzOkP.js → LowBalancePopup-Cg-JRo7A-BHBzAYDh.js} +1 -1
  100. package/dist/assets/{MagicLinkACHDetailsPage-CUhe4LF8-C2tbOI9Z.js → MagicLinkACHDetailsPage-CUhe4LF8-CBnwrY74.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-DRiOxSts-fgdDLLEw.js → MagicLinkDomesticWireDetailsPage-DRiOxSts-CIge5ZMg.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-DwCrgk9X-BJyrM3xf.js → MagicLinkInternationalWireDetailsPage-DwCrgk9X-BZW_YI_x.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-UOywm1sp-BBCToRwV.js → MagicLinkSuccessPage-UOywm1sp-CkgyVaZM.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-D5RIlimx-5X1vjx5k.js → MagicLinkTitleSection-D5RIlimx-BVAtTe_l.js} +1 -1
  105. package/dist/assets/{MailingDetailsSection-OYOVCPaq-B5APfdaG.js → MailingDetailsSection-OYOVCPaq-DqkyPuP0.js} +1 -1
  106. package/dist/assets/{MyBankConnectionsSettingsPage-D55M4Yo6-DWI72gIp.js → MyBankConnectionsSettingsPage-D55M4Yo6-OCw2ThY5.js} +1 -1
  107. package/dist/assets/{MyPendingActivationChargeCardListPage-SxpMobOC-QJU8xHLH.js → MyPendingActivationChargeCardListPage-SxpMobOC-BNVGLNxT.js} +1 -1
  108. package/dist/assets/{MyProfileSettingsPage-DLvCW9dl-3UYEbBEM.js → MyProfileSettingsPage-DLvCW9dl-Bwlj22pi.js} +1 -1
  109. package/dist/assets/{NavBarWithPicker-zd1BopIw-dYFUtFeu.js → NavBarWithPicker-zd1BopIw-Ci9g5FBV.js} +1 -1
  110. package/dist/assets/{NavigationArrow-CqK2Gxhj-JoTM067o.js → NavigationArrow-CqK2Gxhj-ChCXbTpI.js} +1 -1
  111. package/dist/assets/{NavigationDots-C7DGhAsk-BigsWf2H.js → NavigationDots-C7DGhAsk-ZkX74p-H.js} +1 -1
  112. package/dist/assets/{NewGlobalMerchantPage-BH4SIY-b-IspkGBWL.js → NewGlobalMerchantPage-BH4SIY-b-B1FKYnoe.js} +1 -1
  113. package/dist/assets/{NoDataChart-Vz2Z_iIL-BHz7pPoV.js → NoDataChart-Vz2Z_iIL-y0n0-Ndo.js} +1 -1
  114. package/dist/assets/{NoDataTable-B355xDAT-DcAZ4j4d.js → NoDataTable-B355xDAT-tSo-HWiz.js} +1 -1
  115. package/dist/assets/{NotFoundPage-Bfp9Pyxw-DVJn2b4k.js → NotFoundPage-Bfp9Pyxw-DcEF6VdC.js} +1 -1
  116. package/dist/assets/{NotificationSettingsPage-1OEolmCL-DbOSpAhH.js → NotificationSettingsPage-1OEolmCL-DxmYYmXs.js} +1 -1
  117. package/dist/assets/{NotificationsListConfig-B5Ei8fVY-6YLjvq8F.js → NotificationsListConfig-B5Ei8fVY-C_r4NQMn.js} +1 -1
  118. package/dist/assets/{NotificationsPage-ChGr8-XF-VM1F0z8s.js → NotificationsPage-ChGr8-XF-BQJBO-ev.js} +1 -1
  119. package/dist/assets/{OpExByVendorPage-ae4FK1p6-CuNG361W.js → OpExByVendorPage-ae4FK1p6-T75QXMPm.js} +1 -1
  120. package/dist/assets/{OverlayContainerPage-D4QU0p4o-CR2TYg0o.js → OverlayContainerPage-D4QU0p4o-WQn5Bks3.js} +1 -1
  121. package/dist/assets/{PandLWithForecastPage-ChIPvp4R-qyv7RUis.js → PandLWithForecastPage-ChIPvp4R-DeuoueIT.js} +1 -1
  122. package/dist/assets/{PaymentAccountSetupBillingAddressSection-CnpmZxaM-COq_RoPw.js → PaymentAccountSetupBillingAddressSection-CnpmZxaM-D7u1H9wQ.js} +1 -1
  123. package/dist/assets/{PeoplePage-D8pfeVRK-n6UzH76T.js → PeoplePage-D8pfeVRK-Bs-NUrG0.js} +1 -1
  124. package/dist/assets/{ProductsCarousel-eVPl5t0I-BGcfqmV6.js → ProductsCarousel-eVPl5t0I-C9jtas3-.js} +1 -1
  125. package/dist/assets/{PromoBaseCards-HrcAWM4W-BKT0vHPP.js → PromoBaseCards-HrcAWM4W-C9b9Z-hO.js} +1 -1
  126. package/dist/assets/{QBOConnectionDialog-DgyYkEYY-Cpn7NAss.js → QBOConnectionDialog-DgyYkEYY-khuxBSC1.js} +1 -1
  127. package/dist/assets/{QBOSetupSection-C4KJ5iyA-DQVhDTXa.js → QBOSetupSection-C4KJ5iyA-DKEfehSp.js} +1 -1
  128. package/dist/assets/{ReimbursementApprovalRuleDetailPage-BbEMTVlp-CzXU9rgb.js → ReimbursementApprovalRuleDetailPage-BbEMTVlp-DcCvaDKG.js} +1 -1
  129. package/dist/assets/{ReimbursementApprovalRulesPage-B_1m9CBx-CabMdysS.js → ReimbursementApprovalRulesPage-B_1m9CBx-CqYcCinV.js} +1 -1
  130. package/dist/assets/{ReimbursementDetailPage-8i30hIr0-Dsm2Dpy8.js → ReimbursementDetailPage-8i30hIr0-BMaB2_33.js} +1 -1
  131. package/dist/assets/{ReimbursementPromoPage-C4bxCDcc-yn3a9m-2.js → ReimbursementPromoPage-C4bxCDcc-DQidouOl.js} +1 -1
  132. package/dist/assets/{ReimbursementSetUpPage-BkJ1-eNw-DtguijtQ.js → ReimbursementSetUpPage-BkJ1-eNw-CkFu5bNO.js} +1 -1
  133. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-CYZGBUms--1POKdZc.js → ReimbursementsBulkReviewDrawerPage-CYZGBUms-DSJsTy3L.js} +1 -1
  134. package/dist/assets/{ReloadCard-DrAfrMOy-Dp01MRiJ.js → ReloadCard-DrAfrMOy-DF5vomen.js} +1 -1
  135. package/dist/assets/{ReportTableViewSelector-DM_Em4lI-DVoP-nO6.js → ReportTableViewSelector-DM_Em4lI-BV_CwmkV.js} +1 -1
  136. package/dist/assets/{ReportsPage-E9MU25NS-BG-K0aaI.js → ReportsPage-E9MU25NS-DptYNHIB.js} +1 -1
  137. package/dist/assets/{RevenueChart-CzVs6lFB-CetzZFOl.js → RevenueChart-CzVs6lFB-CJ-sH0BH.js} +1 -1
  138. package/dist/assets/{ReviewDetailsPage-DR0MCIgO-DeTv48zq.js → ReviewDetailsPage-DR0MCIgO-DnPwmDI4.js} +1 -1
  139. package/dist/assets/{ReviewOverlay-jDgQyzfL-CrHwzWa9.js → ReviewOverlay-jDgQyzfL-CfH6EFVz.js} +1 -1
  140. package/dist/assets/{RoleWithToolTip-zLU58xb1-CSAiI1iT.js → RoleWithToolTip-zLU58xb1-cBZpJZzg.js} +1 -1
  141. package/dist/assets/{ScheduleDetailsFixedAssetsPage-D47R-Lyr-CZpPEcr2.js → ScheduleDetailsFixedAssetsPage-D47R-Lyr-CRrnUaPf.js} +1 -1
  142. package/dist/assets/{ScheduleDetailsPage-DYNnVOEv-D18lxUWs.js → ScheduleDetailsPage-DYNnVOEv-3WVqotcd.js} +1 -1
  143. package/dist/assets/{ScheduleSequenceTable-CCHqmNhS-C5vei5ej.js → ScheduleSequenceTable-CCHqmNhS-DXJD_R5L.js} +1 -1
  144. package/dist/assets/{ScreenRoutes-CyJpBFvr.js → ScreenRoutes-DUTrRKTm.js} +1 -1
  145. package/dist/assets/{SetUpAccountSection-Bq2qSGml-DouG9J1c.js → SetUpAccountSection-Bq2qSGml-BkofzoQI.js} +1 -1
  146. package/dist/assets/{SignIn-Lqp6Uw4I--saqLsOx.js → SignIn-Lqp6Uw4I-0z412pCf.js} +1 -1
  147. package/dist/assets/{SignInScreen-Crh_lnSg.js → SignInScreen-Be5T3t3_.js} +1 -1
  148. package/dist/assets/{SpendManagementListViewPage-DUBWXnF--DVg116ep.js → SpendManagementListViewPage-DUBWXnF--DIh0EuS8.js} +3 -3
  149. package/dist/assets/{SpendManagementPerTabPage-RLv6LS-z-CYo8kes0.js → SpendManagementPerTabPage-RLv6LS-z-k8zZTrW8.js} +1 -1
  150. package/dist/assets/{SpendManagementSection-DJfAJzAL-ig4GL1ZT.js → SpendManagementSection-DJfAJzAL-wSpPjYzJ.js} +1 -1
  151. package/dist/assets/{StatementItem-DWaejUx_-C8v9F3EQ.js → StatementItem-DWaejUx_-6KabBr7v.js} +1 -1
  152. package/dist/assets/{StatementsPage-BgYeg1T4-C88dmgbV.js → StatementsPage-BgYeg1T4-Cd0P-8PR.js} +1 -1
  153. package/dist/assets/{StatusSwitcher-C4MmXvmy-xYxIiuBt.js → StatusSwitcher-C4MmXvmy-evJfeJy0.js} +1 -1
  154. package/dist/assets/{SubTabSwitcher-UW2b0f3g-Dn63h3aS.js → SubTabSwitcher-UW2b0f3g-CNOF9M5r.js} +1 -1
  155. package/dist/assets/{SummaryCard-BLqrfWMN-BoOQqfaJ.js → SummaryCard-BLqrfWMN-B7lRCfHv.js} +1 -1
  156. package/dist/assets/{TaskManagementPage-BmOv6jb0-DMzDUJnW.js → TaskManagementPage-BmOv6jb0-DtdEtJiC.js} +1 -1
  157. package/dist/assets/{TimeRangeSwitcher-NHpll2Zg-Dr20odtf.js → TimeRangeSwitcher-NHpll2Zg-DESlkXFJ.js} +1 -1
  158. package/dist/assets/{TimeframeSwitcher-DR4B6ENA-CD0Ac63k.js → TimeframeSwitcher-DR4B6ENA-C32GEGxC.js} +1 -1
  159. package/dist/assets/{TimeframeSwitcherWithToggle-DlZ34Erl-BkLOXZy3.js → TimeframeSwitcherWithToggle-DlZ34Erl-DlGIs5fl.js} +1 -1
  160. package/dist/assets/{TopExCard-BKUm1fVu-CdS4qfxw.js → TopExCard-BKUm1fVu-Dkgq81Or.js} +1 -1
  161. package/dist/assets/{TopExDetailPage-BpaKGiXB-_eDwMn8-.js → TopExDetailPage-BpaKGiXB-BRpojzic.js} +1 -1
  162. package/dist/assets/{TransactionActivityLogPage-C4oS0b8d-5ZoA1pgW.js → TransactionActivityLogPage-C4oS0b8d-K0IXutYe.js} +1 -1
  163. package/dist/assets/{TransactionDetailPage-Dz5UCI7c-DCbRyu-c.js → TransactionDetailPage-Dz5UCI7c-CO5TPMx8.js} +1 -1
  164. package/dist/assets/{TransactionList-7sC4Vvux-BdQNJsG3.js → TransactionList-7sC4Vvux-C5k3jDlJ.js} +1 -1
  165. package/dist/assets/{TransactionListBig-C1i2HOEm-BoHPxhV4.js → TransactionListBig-C1i2HOEm-BCSNHtty.js} +1 -1
  166. package/dist/assets/{TransactionListPage-CTzZTWJh-rMP8UEHn.js → TransactionListPage-CTzZTWJh-CkJUb0f2.js} +1 -1
  167. package/dist/assets/{TransactionVendorDetailPage-BhEUsSHE-DWkVZWnN.js → TransactionVendorDetailPage-BhEUsSHE-BaEFfZJ8.js} +1 -1
  168. package/dist/assets/{TransferDrawerPage-enFS8KsH-pWKe3GIV.js → TransferDrawerPage-enFS8KsH-B4bSUV5D.js} +1 -1
  169. package/dist/assets/{TreasuryOverviewPage-BT--Br6F-DZD_F62z.js → TreasuryOverviewPage-BT--Br6F-CDlrco1N.js} +1 -1
  170. package/dist/assets/{TreasuryPromoPage-DsUxXGv2-CbCXpGfI.js → TreasuryPromoPage-DsUxXGv2-v85UX9AS.js} +1 -1
  171. package/dist/assets/{TreasuryStatementsPage-D7NeRKLM-FnJOs5A5.js → TreasuryStatementsPage-D7NeRKLM-UJOmxDUF.js} +1 -1
  172. package/dist/assets/{TreasuryTaxLetterPage-Cj6nJmhq-eRbAIBG9.js → TreasuryTaxLetterPage-Cj6nJmhq-vWgzz_Cz.js} +1 -1
  173. package/dist/assets/{TrendChart-CWaL1-sD-jHXMg1Jt.js → TrendChart-CWaL1-sD-CtjAjIjX.js} +1 -1
  174. package/dist/assets/{TrendWithTransactions-ULrBa2b0-DV504Izy.js → TrendWithTransactions-ULrBa2b0-CUXV5EUz.js} +1 -1
  175. package/dist/assets/{UncategorizedAccountsMappingPage-D8b01XUy-DqqC0SGI.js → UncategorizedAccountsMappingPage-D8b01XUy-BCG_ctYT.js} +1 -1
  176. package/dist/assets/{UnitIntegrationPage-KbEwifey-DfbiDH3c.js → UnitIntegrationPage-KbEwifey-BkPFx-7g.js} +1 -1
  177. package/dist/assets/{UploadAdditionalDocumentOverlay-Cxxuws-w-q1izSlj8.js → UploadAdditionalDocumentOverlay-Cxxuws-w-h9Zcn0UL.js} +1 -1
  178. package/dist/assets/{Vendor2FAPopup-Dm6Ot_5k-CeyePLNN.js → Vendor2FAPopup-Dm6Ot_5k-Cyyx0pBR.js} +1 -1
  179. package/dist/assets/{VendorACHDetailsPage-DMhwUboX-DW77y7-e.js → VendorACHDetailsPage-DMhwUboX-BIV25eTJ.js} +1 -1
  180. package/dist/assets/{VendorDetailPage-BwbESVFq-BHZW_2ez.js → VendorDetailPage-BwbESVFq-DZF-YGzI.js} +1 -1
  181. package/dist/assets/{VendorDomesticWireDetailsPage-DU47133D-BNz0vLWP.js → VendorDomesticWireDetailsPage-DU47133D-D98d-Dy4.js} +1 -1
  182. package/dist/assets/{VendorFiling1099EditablePage-Dycvl3IG-DtHtcSbL.js → VendorFiling1099EditablePage-Dycvl3IG-n-plHQrw.js} +1 -1
  183. package/dist/assets/{VendorFirstReviewPage-COk5-4Mm-BUPA8fWX.js → VendorFirstReviewPage-COk5-4Mm-Bdi-813c.js} +1 -1
  184. package/dist/assets/{VendorInternationalWireDetailsPage-Di0TU5Db-B1HiqwDL.js → VendorInternationalWireDetailsPage-Di0TU5Db-BZNEzlNG.js} +1 -1
  185. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Do345R_v-M_TSksW9.js → VendorInternationalWireSwiftDetailsPage-Do345R_v-CpFyt48-.js} +1 -1
  186. package/dist/assets/{VendorsAccountsSection-BPuqPLC8-CD6vaKdE.js → VendorsAccountsSection-BPuqPLC8-CIyz6AOI.js} +1 -1
  187. package/dist/assets/{VerifyDevice-BRCRNTf1-Dw4vKeVk.js → VerifyDevice-BRCRNTf1-D94fImMB.js} +1 -1
  188. package/dist/assets/{VideoPlayer-BgWCDJp3-CbPNc--2.js → VideoPlayer-BgWCDJp3-BDiNl4C5.js} +1 -1
  189. package/dist/assets/{VideoPopup-ckAw3yZZ-CPBR9ffY.js → VideoPopup-ckAw3yZZ-DVrSl0i_.js} +1 -1
  190. package/dist/assets/{WarningsDrawerPage-D0VOjlPL-Cmk9Gclc.js → WarningsDrawerPage-D0VOjlPL-C48hH2Qn.js} +1 -1
  191. package/dist/assets/{ZeniAccountDetailPage-DxdKUJ_i-8Rps5gMW.js → ZeniAccountDetailPage-DxdKUJ_i-Bck9KH5c.js} +1 -1
  192. package/dist/assets/{ZeniAccountListViewPage-DxCB40sG-D7wpBJpb.js → ZeniAccountListViewPage-DxCB40sG-BFpbbj_1.js} +1 -1
  193. package/dist/assets/{ZeniAccountNavBarPieces-D7o4_8jk-DU75NHos.js → ZeniAccountNavBarPieces-D7o4_8jk-DDdjPhKO.js} +1 -1
  194. package/dist/assets/{ZeniAccountPromoPage-BlfBjcVV-D8slteBQ.js → ZeniAccountPromoPage-BlfBjcVV-C5NBoHzD.js} +1 -1
  195. package/dist/assets/{ZeniAccountSetupPage-akgqrbmw-xtslv-BN.js → ZeniAccountSetupPage-akgqrbmw-DHT4vlFP.js} +1 -1
  196. package/dist/assets/{ZeniCopyright-BrtqzLbb-BE2v7OcH.js → ZeniCopyright-BrtqzLbb-5B18vRE0.js} +1 -1
  197. package/dist/assets/{ZeniTransferAmountSlider-yfG_RSE5-Chw30zZt.js → ZeniTransferAmountSlider-yfG_RSE5-C_ktMTOg.js} +1 -1
  198. package/dist/assets/{analyticsHelper-BROaWFlP.js → analyticsHelper-DmCNU5zy.js} +1 -1
  199. package/dist/assets/{analyticsHelper-YXL3oVeL-st_q3oRE.js → analyticsHelper-YXL3oVeL-BPAS52dh.js} +1 -1
  200. package/dist/assets/{chartTypes-BPQ65VEE-6yZpeJsO.js → chartTypes-BPQ65VEE-Cay7MVWd.js} +1 -1
  201. package/dist/assets/{commonDimensions-DY0eA-Tl-D8wklKVF.js → commonDimensions-DY0eA-Tl-DnpccLz6.js} +1 -1
  202. package/dist/assets/{commonTypes-WZYufpaN-dYh7B5Qi.js → commonTypes-WZYufpaN-jpwsOBFw.js} +1 -1
  203. package/dist/assets/{detailCommon-cqZF9ZV8-CcqFhiCw.js → detailCommon-cqZF9ZV8-CUfVqa9M.js} +1 -1
  204. package/dist/assets/{downloadPdf-3uDsBfRK-CGEKdVDQ.js → downloadPdf-3uDsBfRK-DRCC0Q19.js} +1 -1
  205. package/dist/assets/{helper-GwFcgf4f-QTj7P4Bk.js → helper-GwFcgf4f-DS4f5iLr.js} +1 -1
  206. package/dist/assets/{index-Cq3X29cS.js → index-B3hQ50EY.js} +5 -5
  207. package/dist/assets/{mapLoadingInProgressToTreeNode-CkbJ6R1I-DIVOAa5P.js → mapLoadingInProgressToTreeNode-CkbJ6R1I-CGGhBBTF.js} +1 -1
  208. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BR34hkWh-Dcg0Ex62.js → mapSectionWithAcOnlyToTreeNode-BR34hkWh-CdyWokMa.js} +1 -1
  209. package/dist/assets/{mapSpacerToTreeNode-BDHpjDEs-DAaIJCY0.js → mapSpacerToTreeNode-BDHpjDEs-7pQZWO_w.js} +1 -1
  210. package/dist/assets/{mapTimeframeBalancesToTreeNode-B-58xc9r-DNQTilLS.js → mapTimeframeBalancesToTreeNode-B-58xc9r-jnXKaloA.js} +1 -1
  211. package/dist/assets/{mapTimeframeBalancesToTreeNode-DNryKtmS-D24Y9ZFz.js → mapTimeframeBalancesToTreeNode-DNryKtmS-DUg0cGGx.js} +1 -1
  212. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-6kNSnV0m-BkRLjeRM.js → mapTimeframeHeaderLoadingInProgressToTreeNode-6kNSnV0m-BiaSXpyk.js} +1 -1
  213. package/dist/assets/{toCOABalancesWithID-CU-N01Ne-BfeZ-0De.js → toCOABalancesWithID-CU-N01Ne-CsSiVXKO.js} +1 -1
  214. package/dist/assets/{toChartData-BIERIIE--CxJg6nKe.js → toChartData-BIERIIE--CUOhP7c-.js} +1 -1
  215. package/dist/assets/{uploadAttachment-htF-2xC2-BK-WmHcD.js → uploadAttachment-htF-2xC2-BpIX7dVX.js} +1 -1
  216. package/dist/assets/{uploadReceipts-Dge0cNF1-DNapZCC1.js → uploadReceipts-Dge0cNF1-DLu-JEaF.js} +1 -1
  217. package/dist/index.html +1 -1
  218. package/package.json +1 -1
  219. package/dist/assets/CustomerOnboardingContainerPage-DMF9BtF3-COJ-Wyve.js +0 -1
@@ -1,4 +1,4 @@
1
- import{ay as tt,V as t,gm as Bt,a9 as Pt,J as Nt,y as _t,cf as Lt,x as m,b as it,gn as Ot,gp as Et,gq as Wt,cs as Ae,ct as Me,cu as Re,bE as Be,ac as f,bq as Kt,dx as Ut,gr as Vt,gC as Pe,o as a,gs as Ne,fn as b,gv as g,fq as w,aQ as _e,fm as Le,w as q,gx as Oe,aT as Ft,aq as Gt,gy as qt,gz as ne,bz as Yt,gA as Ht,d as Xt,c as Jt,M as Zt,an as at,bb as rt,p as Y,ao as Qt,bX as ei,ak as ti,gX as ii,gR as ai,u as c,ck as ri,d0 as oi}from"./index-Cq3X29cS.js";import{a as u}from"./sentry-DQ_HstYV.js";import{n as r}from"./mui-DzE-7sTl.js";import{bL as ni,bZ as li,Gy as si}from"./zeni-epic-state-B4gyGBI3.js";import di from"./InvoiceUploadSection-CVOHcfdx-FSNHIS5V.js";import{r as ci,h as x,u as mi}from"./types-DyvtCprH-NFPm5TaG.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./AttachmentView-D6K3YHdZ-Bap3B_dh.js";import"./uploadReceipts-Dge0cNF1-DNapZCC1.js";import"./upload-reimbursement-receipt-O2N8vcO7-DWftVCta.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},v=new e.Error().stack;v&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[v]="28f7472c-231f-4db9-a899-ec1f4eedadf1",e._sentryDebugIdIdentifier="sentry-dbid-28f7472c-231f-4db9-a899-ec1f4eedadf1")}catch{}})();const s={labelWidth:new m(120,160,160),largeLabelWidth:new m(150,235,235),rightMargin:new m(c[3],c[8]),leftMargin:new m(c[3],c[6]),invoiceRightMargin:new m(c[3],c[6]),invoiceLeftMargin:new m(c[3],c[8]),topMargin:new m(c[3],0),bottomMargin:new m(c[4],27),activityBottomMargin:new m(96,0),totalBottomMargin:new m(c[5],c[3]),formBottomMargin:new m(c[5],c[3]),navBarHeight:new m(44,62),closeMarginTop:new m(0,0),rightSectionWidth:new m(100,58),leftSectionWidth:new m(100,42),footerButtonWidth:new m(120,165),right:new m(c[3],c[0]),actionsContainerRight:new m(c[0],c[6]),otherActionsContainerBottom:new m(58,44),duplicateBannerWrapperMarginTop:new m(c[5],c[3]),duplicateBannerWrapperMarginRight:new m(c[3],c[8]),duplicateBannerWrapperMarginBottom:new m(c[5],c[3]),duplicateBannerWrapperMarginLeft:new m(c[3],c[6])},pi={formTitle:new Jt("h6Regular","h5Regular")},Ee=({remiDetails:e,uploadInvoiceEndPoint:v,authParams:z,isAdmin:_,signedInUser:se,showApproveRejectBtns:de,isRealTimeApprovalEnabled:ce,isReimbursementCommentingEnabled:p,isShowDeletedReimbursementEnabled:me,isSignedInUserReimbursementCreator:ot,updateEditRealTimeApproverClicked:pe,onSaveRealTimeApprovals:ue,redirectToReimbursementListScreen:H,redirectToEditableReimbursementScreen:nt,onDuplicateLineClick:lt,approveOrRejectRemi:he,deleteReimbursement:st,cancelAndDeleteReport:ye,handleZeniLogoClick:dt,onAddNewRule:be,initialOpenThreadRequest:A})=>{const d=tt(),ct=Pt().analytics,n=Nt(),ge=_t(),[mt,M]=u.useState(!1),[X,J]=u.useState(!1),[pt,Z]=u.useState(!1),[Q,ee]=u.useState("approved"),L=u.useRef(null),[D,te]=u.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[C,ut]=u.useState(null),[ht,O]=u.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,we=u.useRef({}),xe=l=>{const o=we.current[l];o!=null&&setTimeout(()=>mi(o,L.current),100)};u.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&H()},[e,H]),u.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const o=l.substring(1);xe(o)}},[]);const yt=()=>{H()};Lt({componentName:"reimbursement.details"});const bt={onOkClick:()=>{M(!1),D.primaryButtonText===i.buttons.delete?st?.():D.title===i.cancelReportTitle?ye?.():D.title===i.cancelAndDeleteReportTitle&&ye?.(!0)},onCancelClick:()=>{M(!1)}},S=s.labelWidth.value(n),R=s.largeLabelWidth.value(n),fe=it.getLocalizedStrings(),{common:{texts:{comments:gt},strings:{empty:$e}},collaboration:{threads:{placeholder:{addANewComment:wt,replyAComment:xt},tooltip:{resolveComment:ft,unResolveComment:$t}}},dateFormat:ve}=fe,{reimbursementDetail:i,bulkActions:E}=fe.spendManagement.reimbursement,ie=e.remiDetails?.reportTitle,I=e.remiDetails?.lines??[],W=e.remiDetails?.reimbursementInfo.stage,K=e.remiDetails?.reimbursementInfo.billStatus,U=e.remiDetails?.reimbursementInfo.billPaymentStatus,Te=W?.code==="paid",vt=Te?W:K?.code=="approved"&&U?.code?U:K,T=ui(e.remiDetails),B=K?.code=="approved"&&U?.code?U:K,V=e.remiDetails?.isDeleted??!1,je=e.remiDetails?.amount,Se=e.remiDetails?.amount.amount??0,Ie=()=>{te({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),M(!0)},Tt=()=>{te({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),M(!0)},jt=()=>{te({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),M(!0)},De=()=>{nt()},St={onOkClick:l=>{Z(!1),he({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{Z(!1)}},It=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?De():(ee("approved"),he({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},Dt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(ee("delete"),Ie()):(ee("rejected"),Z(!0))},kt=e.remiDetails?.reimbursementInfo.paymentDate!=null?ni(li(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,ae=e.remiDetails?.reimbursementInfo.expectedDepositDate??kt,Ct=e.remiDetails?.lines?.some(l=>{const o=l.lineDetail;return o?.account?.isDeleted===!0&&o?.account?.isBillEditableCoaAccountType===!1})??!1,ke=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&ot&&!Ct,zt=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",re=vt?.code,At=ci(e.duplicateLineByLineId),Ce=e.duplicateReimbursementStatus.fetchState==="Completed"&&At>0,{requestToOpenThread:oe,setRequestToOpenThread:F,setOpenThread:G}=u.useContext(Ot);u.useEffect(()=>{A?.threadId!=null&&A?.companyId!=null&&A?.entityType!=null&&F(A)},[A,F]);const{threads:P,isLoading:k}=Et(),Mt=u.useMemo(()=>P.filter(l=>l.resolved===!1&&!l.id.includes(Wt)),[P]).length,Rt=u.useCallback((l,o)=>{G(o),O(!1)},[G,O]);u.useEffect(()=>{oe?.threadId!=null&&P.length>0&&!k&&(G(oe.threadId),F(null))},[oe,P,k,G,F]);const y={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},N=si(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(Ei,{windowSize:n,ref:L,children:[mt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:D.title}),descriptionComponent:t.jsx(Me,{children:D.description}),primaryButtonText:D.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:D.secondaryButtonText,action:bt}):null,pt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Me,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:St,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Ri,{windowSize:n,"data-testid":f("reimbursement-detail-page-nav-bar-container"),children:[n!=="small"?t.jsx(Be,{"data-testid":f("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Bi,{onClick:()=>dt?.(),"data-testid":f("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:ge.colors.background,keepBackgroundOnScroll:!0,scrollableContent:L,source:"ReimbursementDetailPage"}):null,n!=="small"?t.jsx(zi,{}):null,t.jsx(Be,{"data-testid":f("reimbursement-detail-page-nav-bar-right"),title:ie??$e,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:n!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Ni,{children:[p?t.jsxs(_i,{isDisabled:k,onClick:k?()=>null:l=>{l.preventDefault(),l.stopPropagation(),ut({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),O(!0),ct.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(o=>Ut(o)),void 0,void 0,"page icon")},"data-testid":f("remi-comments-section"),children:[t.jsx(Kt,{count:k?void 0:Mt,isLoading:k,style:{left:"12px"}}),t.jsx(Li,{})]}):null,t.jsx(Oi,{size:n,onClick:()=>yt(),"data-testid":f("remi-detail-page-close"),children:t.jsx(Pi,{})})]}),scrollableContent:L,enableTitleOnScroll:n!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(qi,{children:[n==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Xe,{windowSize:n,children:t.jsx(Je,{windowsSize:n,children:ie})}),e.createdBy?.userId!=null?t.jsx(Ge,{windowSize:n,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,me&&T!=null?t.jsx(qe,{color:T.color,bgColor:T.bgColor,borderColor:T.borderColor,children:T.value}):null,B?.code!=null?n==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vt,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V}),N?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:E.duplicateWarning.title,description:E.duplicateWarning.description}):Ce?t.jsxs(We,{size:n,children:[t.jsx(Fe,{}),t.jsxs(Ue,{children:[t.jsx(Ke,{children:i.thereSeems}),t.jsx(Ve,{children:i.pleaseFind})]})]}):null]}):t.jsx(He,{windowSize:n,children:t.jsx(Ne,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V})}):null]}):null,I.map((l,o)=>{const j=e.duplicateLineByLineId[l.lineId];return t.jsxs(et,{windowSize:n,children:[t.jsx(Vi,{windowSize:n,children:t.jsx(Fi,{bottomSeperator:I.length!==1,windowSize:n,children:t.jsx(di,{showAutofill:!1,uploadInvoiceEndPoint:v,authParams:z,entityId:e.remiDetails?.id,file:l.file,showTitlebar:!0,showTitlebarIcon:!1,pdfTitle:I.length>1?`#${o+1} Receipt`:"Receipt",style:{width:"auto",padding:0,height:I.length-1===o||o===0?760:451},onInvoiceUpload:()=>{console.log("onInvoiceUpload")},noAttachmentText:i.noReceiptAttached,type:"reimbursement"})})}),t.jsxs(Ui,{windowSize:n,children:[o===0&&n!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(Xe,{windowSize:n,children:[t.jsx(Je,{windowsSize:n,children:ie}),me&&T!=null?t.jsx(qe,{color:T.color,bgColor:T.bgColor,borderColor:T.borderColor,children:T.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ge,{windowSize:n,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,B?.code!=null?t.jsx(He,{windowSize:n,children:t.jsx(Ne,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V})}):null,N?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:E.duplicateWarning.title,description:E.duplicateWarning.description}):Ce?t.jsxs(We,{size:n,children:[t.jsx(Fe,{}),t.jsxs(Ue,{children:[t.jsx(Ke,{children:i.thereSeems}),t.jsx(Ve,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(xi,{windowSize:n,ref:ze=>{ze!=null&&(we.current[`L${l.lineId}`]=ze)},children:[n!=="small"?t.jsx(wi,{children:t.jsx(fi,{children:I.length>1?`#${o+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs($i,{windowSize:n,children:[j?.duplicateLineId!=null?t.jsxs(bi,{children:[i.thisExpenseReview," ",t.jsx(gi,{onClick:()=>{if(j.isDuplicateWithinTransaction&&j.duplicateLineId!=null)return xe(`L${j.duplicateLineId}`);j.duplicateTransactionId!=null&&j.duplicateLineId!=null&&lt(j.duplicateTransactionId,j.duplicateLineId)},"data-testid":f("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:l.type===i.mileageKey?`${o}.mileage.reimbursementType`:`${o}.out_of_pocket.reimbursementType`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("reimbursementType",o,l.type===i.mileageKey?"mileage":"out_of_pocket")}`},style:{borderRadius:j?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(g,{label:{label:i.reimbursementType,width:R},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:j?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"}})}),t.jsx($,{}),l.type===i.mileageKey?t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("transactionDate",o,"mileage")}`},children:t.jsx(g,{label:{label:i.transactionDate,width:R},text:l.transactionDate?.format(ve.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.distanceInMiles`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("distanceInMiles",o,"mileage")}`},children:t.jsx(g,{label:{label:i.distanceInMiles,width:R},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("amount",o,"mileage")}`},children:t.jsx(g,{label:{label:i.amount,width:S},text:l.homeCurrencyConversions!=null?_e("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("memo",o,"mileage")}`},children:t.jsx(g,{label:{label:i.memo,width:S},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("class",o,"mileage")}`},children:t.jsx(g,{label:{label:i.department,width:S},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.customer`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("customer",o,"mileage")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(g,{label:{label:i.customer,width:S},text:l.lineDetail.customer?.name??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]}):t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.merchant`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("merchant",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.merchant,width:R},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("transactionDate",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.transactionDate,width:R},text:l.transactionDate?.format(ve.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("amount",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.amount,width:S},text:l.homeCurrencyConversions!=null?_e("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("memo",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.memo,width:S},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.account`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("account",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.category,width:S},text:l.lineDetail.account?.accountName??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("class",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.department,width:S},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.customer`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("customer",o,"out_of_pocket")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(g,{label:{label:i.customer,width:S},text:l.lineDetail.customer?.name??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]})]})]}),I.length!==1&&I.length===o+1&&t.jsxs(Ki,{windowSize:n,children:[t.jsxs(Ze,{windowSize:n,children:[t.jsx(Qe,{children:i.total}),t.jsx(Le,{amount:je,integerStyles:q.h6Regular.cssObject,decimalStyles:q.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(Oe,{amount:Se,activities:e.remiActivities,stage:W?.code??"draft",onAddNewRule:be,entity:"reimbursement",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,allAccountingClass:e.allAccountingClasses,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:_,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),I.length===1&&t.jsxs(et,{windowSize:n,children:[t.jsx(Ye,{}),t.jsxs(hi,{windowSize:n,children:[t.jsx(Wi,{windowSize:n,children:t.jsxs(Ze,{windowSize:n,children:[t.jsx(Qe,{children:i.total}),t.jsx(Le,{amount:je,integerStyles:q.h6Regular.cssObject,decimalStyles:q.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(yi,{windowSize:n,children:t.jsx(Oe,{amount:Se,activities:e.remiActivities,stage:W?.code??"draft",onAddNewRule:be,entity:"reimbursement",historicActivities:e.remiHistory.activities,realTimeApproval:{allApprovers:e.filteredApprovers,allAccountingClass:e.allAccountingClasses,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:_,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue}})})]})]}),t.jsx(Gi,{})]}),Te||V===!0?null:t.jsxs(Mi,{children:[n!=="small"?t.jsx(Ye,{}):null,t.jsx(Ti,{windowSize:n,"data-testid":f("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),X===!0&&J(!1)},children:t.jsx(Ft,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,cancelBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?n==="small"?i.buttons.delete:i.buttons.deleteReport:n==="small"?i.buttons.reject:i.buttons.rejectReport,isLoading:Q==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||Q==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:Dt,style:{width:s.footerButtonWidth.value(n)},reverseSpinnerColor:!1},primaryBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?n==="small"?i.buttons.edit:i.buttons.editAndResubmit:n==="small"?i.buttons.approve:i.buttons.approveReport,isLoading:Q==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:It,style:{width:s.footerButtonWidth.value(n)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(vi,{children:t.jsxs(Ai,{windowSize:n,children:[!N&&X?t.jsx(Gt,{onClickAway:()=>J(!1),children:t.jsxs(Ci,{windowSize:n,children:[re!=="processing"?t.jsx(le,{onClick:Ie,"data-testid":f("remi-delete-action"),children:i.buttons.deleteReport}):null,re==="processing"?t.jsx(le,{onClick:Tt,"data-testid":f("remi-cancel-action"),children:i.buttons.cancel}):null,re==="processing"?t.jsx(le,{onClick:jt,"data-testid":f("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(ki,{windowSize:n,children:[!N&&ke?t.jsx(Di,{onClick:De,"data-testid":f("remi-edit-button"),children:t.jsx(Ii,{})}):null,!N&&zt===!0?t.jsx(Si,{windowSize:n,showEditIcon:ke,children:t.jsx(ji,{onClick:()=>J(!X),"data-testid":f("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),p?t.jsx(qt,{isDrawerOpen:ht,allowComposer:!0,drawerTitle:gt,threads:P,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:C?.companyId??$e,isGlobalComment:!1,tab:"reimbursement"},isLoading:k,threadMetadata:C?{companyName:C.companyName,companyId:C.companyId,entityId:C.entityId,entityType:C.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:wt,replyComposerPlaceholder:xt,threadResolve:ft,threadUnResolve:$t},onThreadClick:(l,o)=>Rt(l,o),onCloseAllThreadsDrawer:()=>O(!1),drawerSectionStyle:{width:"400px",backgroundColor:ge.colors.background}}):null]})},ca=e=>{const v=tt().currentTenant?.companyId,z=e.remiDetails.remiDetails?.id;if(!(e.isReimbursementCommentingEnabled&&z!=null&&v!=null))return t.jsx(Ee,{...e});const _=`dashboard_${v}`;return t.jsx(Bt,{roomId:_,filter:{application:"dashboard",companyId:v,entityId:z,tab:"reimbursement",isGlobalComment:!1},children:t.jsx(Ee,{...e})})},ui=e=>{const v=it.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:v.tabsById.deleted,color:ne.deleted.color,bgColor:ne.deleted.bgColor,borderColor:ne.deleted.borderColor,code:"deleted"}},hi=r.div`
1
+ import{ay as tt,V as t,gm as Bt,a9 as Pt,J as Nt,y as _t,cf as Lt,x as m,b as it,gn as Ot,gp as Et,gq as Wt,cs as Ae,ct as Me,cu as Re,bE as Be,ac as f,bq as Kt,dx as Ut,gr as Vt,gC as Pe,o as a,gs as Ne,fn as b,gv as g,fq as w,aQ as _e,fm as Le,w as q,gx as Oe,aT as Ft,aq as Gt,gy as qt,gz as ne,bz as Yt,gA as Ht,d as Xt,c as Jt,M as Zt,an as at,bb as rt,p as Y,ao as Qt,bX as ei,ak as ti,gX as ii,gR as ai,u as c,ck as ri,d0 as oi}from"./index-B3hQ50EY.js";import{a as u}from"./sentry-DQ_HstYV.js";import{n as r}from"./mui-DzE-7sTl.js";import{bL as ni,bZ as li,Gy as si}from"./zeni-epic-state-B4gyGBI3.js";import di from"./InvoiceUploadSection-CVOHcfdx-DqakS9w6.js";import{r as ci,h as x,u as mi}from"./types-DyvtCprH-NFPm5TaG.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./AttachmentView-D6K3YHdZ-CQhf5_2O.js";import"./uploadReceipts-Dge0cNF1-DLu-JEaF.js";import"./upload-reimbursement-receipt-O2N8vcO7-DWftVCta.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},v=new e.Error().stack;v&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[v]="28f7472c-231f-4db9-a899-ec1f4eedadf1",e._sentryDebugIdIdentifier="sentry-dbid-28f7472c-231f-4db9-a899-ec1f4eedadf1")}catch{}})();const s={labelWidth:new m(120,160,160),largeLabelWidth:new m(150,235,235),rightMargin:new m(c[3],c[8]),leftMargin:new m(c[3],c[6]),invoiceRightMargin:new m(c[3],c[6]),invoiceLeftMargin:new m(c[3],c[8]),topMargin:new m(c[3],0),bottomMargin:new m(c[4],27),activityBottomMargin:new m(96,0),totalBottomMargin:new m(c[5],c[3]),formBottomMargin:new m(c[5],c[3]),navBarHeight:new m(44,62),closeMarginTop:new m(0,0),rightSectionWidth:new m(100,58),leftSectionWidth:new m(100,42),footerButtonWidth:new m(120,165),right:new m(c[3],c[0]),actionsContainerRight:new m(c[0],c[6]),otherActionsContainerBottom:new m(58,44),duplicateBannerWrapperMarginTop:new m(c[5],c[3]),duplicateBannerWrapperMarginRight:new m(c[3],c[8]),duplicateBannerWrapperMarginBottom:new m(c[5],c[3]),duplicateBannerWrapperMarginLeft:new m(c[3],c[6])},pi={formTitle:new Jt("h6Regular","h5Regular")},Ee=({remiDetails:e,uploadInvoiceEndPoint:v,authParams:z,isAdmin:_,signedInUser:se,showApproveRejectBtns:de,isRealTimeApprovalEnabled:ce,isReimbursementCommentingEnabled:p,isShowDeletedReimbursementEnabled:me,isSignedInUserReimbursementCreator:ot,updateEditRealTimeApproverClicked:pe,onSaveRealTimeApprovals:ue,redirectToReimbursementListScreen:H,redirectToEditableReimbursementScreen:nt,onDuplicateLineClick:lt,approveOrRejectRemi:he,deleteReimbursement:st,cancelAndDeleteReport:ye,handleZeniLogoClick:dt,onAddNewRule:be,initialOpenThreadRequest:A})=>{const d=tt(),ct=Pt().analytics,n=Nt(),ge=_t(),[mt,M]=u.useState(!1),[X,J]=u.useState(!1),[pt,Z]=u.useState(!1),[Q,ee]=u.useState("approved"),L=u.useRef(null),[D,te]=u.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[C,ut]=u.useState(null),[ht,O]=u.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,we=u.useRef({}),xe=l=>{const o=we.current[l];o!=null&&setTimeout(()=>mi(o,L.current),100)};u.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&H()},[e,H]),u.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const o=l.substring(1);xe(o)}},[]);const yt=()=>{H()};Lt({componentName:"reimbursement.details"});const bt={onOkClick:()=>{M(!1),D.primaryButtonText===i.buttons.delete?st?.():D.title===i.cancelReportTitle?ye?.():D.title===i.cancelAndDeleteReportTitle&&ye?.(!0)},onCancelClick:()=>{M(!1)}},S=s.labelWidth.value(n),R=s.largeLabelWidth.value(n),fe=it.getLocalizedStrings(),{common:{texts:{comments:gt},strings:{empty:$e}},collaboration:{threads:{placeholder:{addANewComment:wt,replyAComment:xt},tooltip:{resolveComment:ft,unResolveComment:$t}}},dateFormat:ve}=fe,{reimbursementDetail:i,bulkActions:E}=fe.spendManagement.reimbursement,ie=e.remiDetails?.reportTitle,I=e.remiDetails?.lines??[],W=e.remiDetails?.reimbursementInfo.stage,K=e.remiDetails?.reimbursementInfo.billStatus,U=e.remiDetails?.reimbursementInfo.billPaymentStatus,Te=W?.code==="paid",vt=Te?W:K?.code=="approved"&&U?.code?U:K,T=ui(e.remiDetails),B=K?.code=="approved"&&U?.code?U:K,V=e.remiDetails?.isDeleted??!1,je=e.remiDetails?.amount,Se=e.remiDetails?.amount.amount??0,Ie=()=>{te({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),M(!0)},Tt=()=>{te({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),M(!0)},jt=()=>{te({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),M(!0)},De=()=>{nt()},St={onOkClick:l=>{Z(!1),he({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{Z(!1)}},It=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?De():(ee("approved"),he({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},Dt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(ee("delete"),Ie()):(ee("rejected"),Z(!0))},kt=e.remiDetails?.reimbursementInfo.paymentDate!=null?ni(li(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,ae=e.remiDetails?.reimbursementInfo.expectedDepositDate??kt,Ct=e.remiDetails?.lines?.some(l=>{const o=l.lineDetail;return o?.account?.isDeleted===!0&&o?.account?.isBillEditableCoaAccountType===!1})??!1,ke=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&ot&&!Ct,zt=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",re=vt?.code,At=ci(e.duplicateLineByLineId),Ce=e.duplicateReimbursementStatus.fetchState==="Completed"&&At>0,{requestToOpenThread:oe,setRequestToOpenThread:F,setOpenThread:G}=u.useContext(Ot);u.useEffect(()=>{A?.threadId!=null&&A?.companyId!=null&&A?.entityType!=null&&F(A)},[A,F]);const{threads:P,isLoading:k}=Et(),Mt=u.useMemo(()=>P.filter(l=>l.resolved===!1&&!l.id.includes(Wt)),[P]).length,Rt=u.useCallback((l,o)=>{G(o),O(!1)},[G,O]);u.useEffect(()=>{oe?.threadId!=null&&P.length>0&&!k&&(G(oe.threadId),F(null))},[oe,P,k,G,F]);const y={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},N=si(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(Ei,{windowSize:n,ref:L,children:[mt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:D.title}),descriptionComponent:t.jsx(Me,{children:D.description}),primaryButtonText:D.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:D.secondaryButtonText,action:bt}):null,pt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Me,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:St,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Ri,{windowSize:n,"data-testid":f("reimbursement-detail-page-nav-bar-container"),children:[n!=="small"?t.jsx(Be,{"data-testid":f("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Bi,{onClick:()=>dt?.(),"data-testid":f("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:ge.colors.background,keepBackgroundOnScroll:!0,scrollableContent:L,source:"ReimbursementDetailPage"}):null,n!=="small"?t.jsx(zi,{}):null,t.jsx(Be,{"data-testid":f("reimbursement-detail-page-nav-bar-right"),title:ie??$e,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:n!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Ni,{children:[p?t.jsxs(_i,{isDisabled:k,onClick:k?()=>null:l=>{l.preventDefault(),l.stopPropagation(),ut({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),O(!0),ct.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(o=>Ut(o)),void 0,void 0,"page icon")},"data-testid":f("remi-comments-section"),children:[t.jsx(Kt,{count:k?void 0:Mt,isLoading:k,style:{left:"12px"}}),t.jsx(Li,{})]}):null,t.jsx(Oi,{size:n,onClick:()=>yt(),"data-testid":f("remi-detail-page-close"),children:t.jsx(Pi,{})})]}),scrollableContent:L,enableTitleOnScroll:n!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(qi,{children:[n==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Xe,{windowSize:n,children:t.jsx(Je,{windowsSize:n,children:ie})}),e.createdBy?.userId!=null?t.jsx(Ge,{windowSize:n,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,me&&T!=null?t.jsx(qe,{color:T.color,bgColor:T.bgColor,borderColor:T.borderColor,children:T.value}):null,B?.code!=null?n==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vt,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V}),N?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:E.duplicateWarning.title,description:E.duplicateWarning.description}):Ce?t.jsxs(We,{size:n,children:[t.jsx(Fe,{}),t.jsxs(Ue,{children:[t.jsx(Ke,{children:i.thereSeems}),t.jsx(Ve,{children:i.pleaseFind})]})]}):null]}):t.jsx(He,{windowSize:n,children:t.jsx(Ne,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V})}):null]}):null,I.map((l,o)=>{const j=e.duplicateLineByLineId[l.lineId];return t.jsxs(et,{windowSize:n,children:[t.jsx(Vi,{windowSize:n,children:t.jsx(Fi,{bottomSeperator:I.length!==1,windowSize:n,children:t.jsx(di,{showAutofill:!1,uploadInvoiceEndPoint:v,authParams:z,entityId:e.remiDetails?.id,file:l.file,showTitlebar:!0,showTitlebarIcon:!1,pdfTitle:I.length>1?`#${o+1} Receipt`:"Receipt",style:{width:"auto",padding:0,height:I.length-1===o||o===0?760:451},onInvoiceUpload:()=>{console.log("onInvoiceUpload")},noAttachmentText:i.noReceiptAttached,type:"reimbursement"})})}),t.jsxs(Ui,{windowSize:n,children:[o===0&&n!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(Xe,{windowSize:n,children:[t.jsx(Je,{windowsSize:n,children:ie}),me&&T!=null?t.jsx(qe,{color:T.color,bgColor:T.bgColor,borderColor:T.borderColor,children:T.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ge,{windowSize:n,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,B?.code!=null?t.jsx(He,{windowSize:n,children:t.jsx(Ne,{progressSectionObj:B,createDate:e.remiDetails?.createTime,paymentDate:ae,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:V})}):null,N?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:E.duplicateWarning.title,description:E.duplicateWarning.description}):Ce?t.jsxs(We,{size:n,children:[t.jsx(Fe,{}),t.jsxs(Ue,{children:[t.jsx(Ke,{children:i.thereSeems}),t.jsx(Ve,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(xi,{windowSize:n,ref:ze=>{ze!=null&&(we.current[`L${l.lineId}`]=ze)},children:[n!=="small"?t.jsx(wi,{children:t.jsx(fi,{children:I.length>1?`#${o+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs($i,{windowSize:n,children:[j?.duplicateLineId!=null?t.jsxs(bi,{children:[i.thisExpenseReview," ",t.jsx(gi,{onClick:()=>{if(j.isDuplicateWithinTransaction&&j.duplicateLineId!=null)return xe(`L${j.duplicateLineId}`);j.duplicateTransactionId!=null&&j.duplicateLineId!=null&&lt(j.duplicateTransactionId,j.duplicateLineId)},"data-testid":f("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:l.type===i.mileageKey?`${o}.mileage.reimbursementType`:`${o}.out_of_pocket.reimbursementType`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("reimbursementType",o,l.type===i.mileageKey?"mileage":"out_of_pocket")}`},style:{borderRadius:j?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(g,{label:{label:i.reimbursementType,width:R},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:j?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"}})}),t.jsx($,{}),l.type===i.mileageKey?t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("transactionDate",o,"mileage")}`},children:t.jsx(g,{label:{label:i.transactionDate,width:R},text:l.transactionDate?.format(ve.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.distanceInMiles`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("distanceInMiles",o,"mileage")}`},children:t.jsx(g,{label:{label:i.distanceInMiles,width:R},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("amount",o,"mileage")}`},children:t.jsx(g,{label:{label:i.amount,width:S},text:l.homeCurrencyConversions!=null?_e("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("memo",o,"mileage")}`},children:t.jsx(g,{label:{label:i.memo,width:S},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("class",o,"mileage")}`},children:t.jsx(g,{label:{label:i.department,width:S},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.mileage.customer`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("customer",o,"mileage")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(g,{label:{label:i.customer,width:S},text:l.lineDetail.customer?.name??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]}):t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.merchant`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("merchant",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.merchant,width:R},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("transactionDate",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.transactionDate,width:R},text:l.transactionDate?.format(ve.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("amount",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.amount,width:S},text:l.homeCurrencyConversions!=null?_e("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("memo",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.memo,width:S},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.account`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("account",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.category,width:S},text:l.lineDetail.account?.accountName??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("class",o,"out_of_pocket")}`},children:t.jsx(g,{label:{label:i.department,width:S},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto"}})}),t.jsx($,{}),t.jsx(b,{isThreadAllowed:p,dashboardTabKey:w({type:"details",key:`${o}.out_of_pocket.customer`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...y,entityType:`reimbursement.details.${x("customer",o,"out_of_pocket")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(g,{label:{label:i.customer,width:S},text:l.lineDetail.customer?.name??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]})]})]}),I.length!==1&&I.length===o+1&&t.jsxs(Ki,{windowSize:n,children:[t.jsxs(Ze,{windowSize:n,children:[t.jsx(Qe,{children:i.total}),t.jsx(Le,{amount:je,integerStyles:q.h6Regular.cssObject,decimalStyles:q.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(Oe,{amount:Se,activities:e.remiActivities,stage:W?.code??"draft",onAddNewRule:be,entity:"reimbursement",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,allAccountingClass:e.allAccountingClasses,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:_,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),I.length===1&&t.jsxs(et,{windowSize:n,children:[t.jsx(Ye,{}),t.jsxs(hi,{windowSize:n,children:[t.jsx(Wi,{windowSize:n,children:t.jsxs(Ze,{windowSize:n,children:[t.jsx(Qe,{children:i.total}),t.jsx(Le,{amount:je,integerStyles:q.h6Regular.cssObject,decimalStyles:q.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(yi,{windowSize:n,children:t.jsx(Oe,{amount:Se,activities:e.remiActivities,stage:W?.code??"draft",onAddNewRule:be,entity:"reimbursement",historicActivities:e.remiHistory.activities,realTimeApproval:{allApprovers:e.filteredApprovers,allAccountingClass:e.allAccountingClasses,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:_,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue}})})]})]}),t.jsx(Gi,{})]}),Te||V===!0?null:t.jsxs(Mi,{children:[n!=="small"?t.jsx(Ye,{}):null,t.jsx(Ti,{windowSize:n,"data-testid":f("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),X===!0&&J(!1)},children:t.jsx(Ft,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,cancelBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?n==="small"?i.buttons.delete:i.buttons.deleteReport:n==="small"?i.buttons.reject:i.buttons.rejectReport,isLoading:Q==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||Q==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:Dt,style:{width:s.footerButtonWidth.value(n)},reverseSpinnerColor:!1},primaryBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?n==="small"?i.buttons.edit:i.buttons.editAndResubmit:n==="small"?i.buttons.approve:i.buttons.approveReport,isLoading:Q==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:It,style:{width:s.footerButtonWidth.value(n)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(vi,{children:t.jsxs(Ai,{windowSize:n,children:[!N&&X?t.jsx(Gt,{onClickAway:()=>J(!1),children:t.jsxs(Ci,{windowSize:n,children:[re!=="processing"?t.jsx(le,{onClick:Ie,"data-testid":f("remi-delete-action"),children:i.buttons.deleteReport}):null,re==="processing"?t.jsx(le,{onClick:Tt,"data-testid":f("remi-cancel-action"),children:i.buttons.cancel}):null,re==="processing"?t.jsx(le,{onClick:jt,"data-testid":f("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(ki,{windowSize:n,children:[!N&&ke?t.jsx(Di,{onClick:De,"data-testid":f("remi-edit-button"),children:t.jsx(Ii,{})}):null,!N&&zt===!0?t.jsx(Si,{windowSize:n,showEditIcon:ke,children:t.jsx(ji,{onClick:()=>J(!X),"data-testid":f("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),p?t.jsx(qt,{isDrawerOpen:ht,allowComposer:!0,drawerTitle:gt,threads:P,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:C?.companyId??$e,isGlobalComment:!1,tab:"reimbursement"},isLoading:k,threadMetadata:C?{companyName:C.companyName,companyId:C.companyId,entityId:C.entityId,entityType:C.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:wt,replyComposerPlaceholder:xt,threadResolve:ft,threadUnResolve:$t},onThreadClick:(l,o)=>Rt(l,o),onCloseAllThreadsDrawer:()=>O(!1),drawerSectionStyle:{width:"400px",backgroundColor:ge.colors.background}}):null]})},ca=e=>{const v=tt().currentTenant?.companyId,z=e.remiDetails.remiDetails?.id;if(!(e.isReimbursementCommentingEnabled&&z!=null&&v!=null))return t.jsx(Ee,{...e});const _=`dashboard_${v}`;return t.jsx(Bt,{roomId:_,filter:{application:"dashboard",companyId:v,entityId:z,tab:"reimbursement",isGlobalComment:!1},children:t.jsx(Ee,{...e})})},ui=e=>{const v=it.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:v.tabsById.deleted,color:ne.deleted.color,bgColor:ne.deleted.bgColor,borderColor:ne.deleted.borderColor,code:"deleted"}},hi=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: ${e=>s.rightSectionWidth.valuePercentage(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{ay as ne,y as S,J as k,aS as le,V as e,ac as a,fy as ae,bE as de,a as u,ag as d,b as V,o as s,as as ce,e as me,aV as E,ao as pe,x as xe,p as z,cH as he,aW as ue,bc as ge,u as we}from"./index-Cq3X29cS.js";import{a as j}from"./sentry-DQ_HstYV.js";import{n as r}from"./mui-DzE-7sTl.js";import{Gx as je,bQ as be}from"./zeni-epic-state-B4gyGBI3.js";import{C as fe}from"./VideoPopup-ckAw3yZZ-CPBR9ffY.js";import{M as v}from"./usp-line-BBd1wKwW-R5RCG5WU.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./VideoPlayer-BgWCDJp3-CbPNc--2.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]="a619a7d9-c168-431e-bc0b-415d8ded6bb1",i._sentryDebugIdIdentifier="sentry-dbid-a619a7d9-c168-431e-bc0b-415d8ded6bb1")}catch{}})();const Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",_="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-dark.png",ye={midContainerMarginBottom:new xe(we[5],44)},$e=r.div`
1
+ import{ay as ne,y as S,J as k,aS as le,V as e,ac as a,fy as ae,bE as de,a as u,ag as d,b as V,o as s,as as ce,e as me,aV as E,ao as pe,x as xe,p as z,cH as he,aW as ue,bc as ge,u as we}from"./index-B3hQ50EY.js";import{a as j}from"./sentry-DQ_HstYV.js";import{n as r}from"./mui-DzE-7sTl.js";import{Gx as je,bQ as be}from"./zeni-epic-state-B4gyGBI3.js";import{C as fe}from"./VideoPopup-ckAw3yZZ-DVrSl0i_.js";import{M as v}from"./usp-line-BBd1wKwW-R5RCG5WU.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./VideoPlayer-BgWCDJp3-BDiNl4C5.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]="a619a7d9-c168-431e-bc0b-415d8ded6bb1",i._sentryDebugIdIdentifier="sentry-dbid-a619a7d9-c168-431e-bc0b-415d8ded6bb1")}catch{}})();const Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",_="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-dark.png",ye={midContainerMarginBottom:new xe(we[5],44)},$e=r.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1,4 +1,4 @@
1
- import{y as Ee,J as Ie,aS as N,aa as qe,cI as Ge,b as Ve,aX as Ce,V as t,fg as Je,p as J,x as s,bE as Ze,L as Ye,ae as Qe,fz as ve,dS as Xe,fA as Ke,by as et,dI as tt,aT as it,o as a,fC as nt,u as n,ck as ot,cM as at,ey as lt,fL as ke,fM as $e,gl as st,a as rt,ac as Pe,c as Ae,bO as ct,ak as dt,bv as ut}from"./index-Cq3X29cS.js";import{a as o}from"./sentry-DQ_HstYV.js";import{n as i}from"./mui-DzE-7sTl.js";import{bJ as mt}from"./zeni-epic-state-B4gyGBI3.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-Cxxuws-w-q1izSlj8.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.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]="67ac3c1f-3960-4089-88e7-aff0bf60b419",e._sentryDebugIdIdentifier="sentry-dbid-67ac3c1f-3960-4089-88e7-aff0bf60b419")}catch{}})();const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new s(343,580,726),iconContainerMaxWidthHeight:new s(n[6],n[7]),iconContainerMarginRight:new s(12,n[3]),infoLabelPaddingLeft:new s(n[0],n[3]),iconPadding:new s(10,12),iconWidthHeight:new s(20,n[4]),rowGap:new s(n[2],n[3]),containerPadding:new s(n[3],n[4])},ge={title:new Ae("standardSemiBold","largeSemiBold"),infoLabel:new Ae("extraSmallRegular","smallRegular")};function ft({companyMileageConfigInfo:e,mileageDetails:p,analytics:$,style:j,sectionId:P,isActive:d=!0,isDisabled:r,onSaveMileageClick:Z}){const l=Ie(),D=Ee(),{formState:{errors:Y},trigger:Q}=at(),E=ht(P,"mileageAmountInDenomination"),x=lt(Y,E),{localData:c,updateStatus:F,mileageStatus:w}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:X,spendManagement:K}=Ve.getLocalizedStrings(),{reimbursement:ee}=K,[S,I]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Q(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&I(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=X,ne=S===!1||F.fetchState==="In-Progress"?"readonly":r,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:j,isActive:d&&r==null,children:[t.jsxs(Pt,{windowSize:l,children:[y.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(yt,{children:[t.jsxs($t,{children:[t.jsxs(At,{children:[t.jsxs(jt,{children:[t.jsx(wt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),w!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:w.name,textColor:$e(w.code)}):null]}),t.jsxs(bt,{children:[w!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:w.name,textColor:$e(w.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Et,{children:[t.jsxs(It,{children:[t.jsx(st,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:x?void 0:D.colors.background,color:S||x?void 0:D.colors.grey1},isFieldError:x,type:"number",autoFocus:!1,focus:te,name:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:V=>V!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Lt,{children:S?t.jsx(rt,{label:y.save,"data-testid":Pe("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!x&&Z?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:r!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:F.fetchState==="In-Progress"}):t.jsx(Tt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:V=>{V.stopPropagation(),I(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Vt,{size:l,hasError:x,children:x&&e?.defaultMileageUnitAmount!=null?y.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ht=(e,p)=>`${e}.${p}`,xt=i.div`
1
+ import{y as Ee,J as Ie,aS as N,aa as qe,cI as Ge,b as Ve,aX as Ce,V as t,fg as Je,p as J,x as s,bE as Ze,L as Ye,ae as Qe,fz as ve,dS as Xe,fA as Ke,by as et,dI as tt,aT as it,o as a,fC as nt,u as n,ck as ot,cM as at,ey as lt,fL as ke,fM as $e,gl as st,a as rt,ac as Pe,c as Ae,bO as ct,ak as dt,bv as ut}from"./index-B3hQ50EY.js";import{a as o}from"./sentry-DQ_HstYV.js";import{n as i}from"./mui-DzE-7sTl.js";import{bJ as mt}from"./zeni-epic-state-B4gyGBI3.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-Cxxuws-w-h9Zcn0UL.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.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]="67ac3c1f-3960-4089-88e7-aff0bf60b419",e._sentryDebugIdIdentifier="sentry-dbid-67ac3c1f-3960-4089-88e7-aff0bf60b419")}catch{}})();const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new s(343,580,726),iconContainerMaxWidthHeight:new s(n[6],n[7]),iconContainerMarginRight:new s(12,n[3]),infoLabelPaddingLeft:new s(n[0],n[3]),iconPadding:new s(10,12),iconWidthHeight:new s(20,n[4]),rowGap:new s(n[2],n[3]),containerPadding:new s(n[3],n[4])},ge={title:new Ae("standardSemiBold","largeSemiBold"),infoLabel:new Ae("extraSmallRegular","smallRegular")};function ft({companyMileageConfigInfo:e,mileageDetails:p,analytics:$,style:j,sectionId:P,isActive:d=!0,isDisabled:r,onSaveMileageClick:Z}){const l=Ie(),D=Ee(),{formState:{errors:Y},trigger:Q}=at(),E=ht(P,"mileageAmountInDenomination"),x=lt(Y,E),{localData:c,updateStatus:F,mileageStatus:w}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:X,spendManagement:K}=Ve.getLocalizedStrings(),{reimbursement:ee}=K,[S,I]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Q(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&I(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=X,ne=S===!1||F.fetchState==="In-Progress"?"readonly":r,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:j,isActive:d&&r==null,children:[t.jsxs(Pt,{windowSize:l,children:[y.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(yt,{children:[t.jsxs($t,{children:[t.jsxs(At,{children:[t.jsxs(jt,{children:[t.jsx(wt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),w!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:w.name,textColor:$e(w.code)}):null]}),t.jsxs(bt,{children:[w!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:w.name,textColor:$e(w.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Et,{children:[t.jsxs(It,{children:[t.jsx(st,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:x?void 0:D.colors.background,color:S||x?void 0:D.colors.grey1},isFieldError:x,type:"number",autoFocus:!1,focus:te,name:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:V=>V!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Lt,{children:S?t.jsx(rt,{label:y.save,"data-testid":Pe("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!x&&Z?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:r!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:F.fetchState==="In-Progress"}):t.jsx(Tt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:V=>{V.stopPropagation(),I(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Vt,{size:l,hasError:x,children:x&&e?.defaultMileageUnitAmount!=null?y.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ht=(e,p)=>`${e}.${p}`,xt=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  pointer-events: ${e=>e.isLoading===!0||e.isActive===!1?"none":"initial"};
@@ -1 +1 @@
1
- import{ay as W,fZ as J,V as _,cs as q,ct as z,cu as H,kj as K,a_ as Z,b as G}from"./index-Cq3X29cS.js";import{a as f}from"./sentry-DQ_HstYV.js";import{H5 as Q}from"./zeni-epic-state-B4gyGBI3.js";import{u as X}from"./ReviewOverlay-jDgQyzfL-CrHwzWa9.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./mui-DzE-7sTl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="e1ffa4e4-3507-492f-ab2a-9ddb4693417b",e._sentryDebugIdIdentifier="sentry-dbid-e1ffa4e4-3507-492f-ab2a-9ddb4693417b")}catch{}})();const{common:a,spendManagement:{reimbursement:B}}=G.getLocalizedStrings(),n=B.bulkActions;let R;const _e=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:u,onCloseOverlay:t})=>{const{fetchState:s,bulkSubmissionFetchState:p,bulkOperationTypeSelected:r,currentTab:b,currentSubTab:y}=e,g=!1,T=W(),l=J(T),[v,m]=f.useState(!1),[h,A]=f.useState(j(e,g,o,l)),[w,D]=f.useState(g),[P,te]=f.useState(0),[S,$]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.useEffect(()=>(P===h.length&&w&&(D(!1),clearInterval(R)),e.fetchState==="Completed"&&A(j(e,!1,o,l)),()=>{clearInterval(R)}),[h.length,P,w,e.fetchState,g,e,o,l]);const E=h.length,x=h.filter(c=>c.reviewStatus.code!=="error").length,F=()=>{const{title:c,description:k}=Y(x);$({type:"reject",title:c,description:k,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(r,b,y),m(!0)},L={onOkClick:c=>{m(!1);const k=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(r,b,y,Q(k.map(I=>I?.reimbursementTypesIncluded??[]))),d("reject",c)},onCancelClick:()=>{m(!1)}},{title:O,description:U}=ee(s,x,E,w),C=e.fetchState==="Completed"&&x===0,N=()=>{i.trackReimbursementBulkSubmit(r,b,y),d(r)},V=()=>{let c=a.footer.approve;return C?c=a.texts.close:r==="send_for_approval"&&(c=a.footer.submit),{label:c,isDisabled:s!=="Completed"||r==="reject"&&p==="In-Progress",isLoading:p==="In-Progress"&&(r==="send_for_approval"||r==="approve"),onClick:C?t:N,style:r==="send_for_approval"?{minWidth:"92px"}:{}}},M={label:r==="send_for_approval"?a.texts.goBack:a.footer.reject,isDisabled:r!=="reject"&&p==="In-Progress",isLoading:r==="reject"&&p==="In-Progress",reverseSpinnerColor:!1,onClick:r==="send_for_approval"?t:F,style:r==="approve"?{minWidth:"92px"}:{}};return _.jsxs(_.Fragment,{children:[v?_.jsx(q,{titleComponent:_.jsx(H,{children:S.title}),descriptionComponent:_.jsx(z,{children:S.description}),primaryButtonText:S.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:S.secondaryButtonText,action:L,isNotesIncluded:!0,isEditPopup:!0}):null,_.jsx(X,{title:O,description:{content:U,isError:e.fetchState==="Completed"&&x===0},reviewItems:h,onCloseReviewItem:u,onCloseOverlay:t,showFooter:e.fetchState==="Completed"&&!w,footerProps:{primaryButton:V(),cancelButton:M,hideCancel:C}})]})},j=(e,o,i,d)=>{const u=e.fetchState==="In-Progress";return e.remisForReview.map(t=>{const s=K(i,t.submittedBy,d);return{id:t.transactionId,leftSideText:{title:t.reimbursement?.reportTitle!=null?t.reimbursement.reportTitle:B.reimbursementDetail.newReimbursementTitle,subTitle:s!=null?`${a.by} ${s?.firstName} ${s?.lastName}`:a.strings.empty},rightSideText:{title:Z("0,0.[00]",t.reimbursement?.amount?.amount,t.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:t.reviewInfoMessage??""},reviewStatus:{isLoading:u,code:t.reviewStatus??""}}})},Y=e=>{const{this_:o,these:i,report:d,reports:u,payment:t,payments:s}=a.texts;return e>1?{title:n.popUps.reject.title.replace("__report__",n.reports),description:n.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",s).replaceAll("__report__",u)}:{title:n.popUps.reject.title.replace("__report__",n.report),description:n.popUps.reject.description.replaceAll("<_this_>",o).replaceAll("<_payment_>",t).replaceAll("__report__",d)}},ee=(e,o,i,d)=>{const{has:u,have:t,report:s,reports:p,are:r,is:b,do_:y,does:g}=a.texts,T=o>1,l=i>1;let v="",m="";return e==="Completed"&&!d?(v=n.reviewPage.reportsReviewed.title.replace("__report__",l?B.bulkActions.reports:n.report).replace("<_has_>",l?t:u),o===0?m=n.reviewPage.reportsReviewed.descriptionError.replace("__report__",l?p:s).replace("<_do_>",l?y:g):m=`${o}/${i} ${n.reviewPage.reportsReviewed.description.replace("__report__",i>1?p:s).replace("<_is_>",T?r:b)}`):(v=n.reviewPage.reportsReviewing.title.replace("__report__",l?p:s),m=n.reviewPage.reportsReviewing.description.replace("__report__",l?p:s)),{title:v,description:m}};export{_e as default};
1
+ import{ay as W,fZ as J,V as _,cs as q,ct as z,cu as H,kj as K,a_ as Z,b as G}from"./index-B3hQ50EY.js";import{a as f}from"./sentry-DQ_HstYV.js";import{H5 as Q}from"./zeni-epic-state-B4gyGBI3.js";import{u as X}from"./ReviewOverlay-jDgQyzfL-CfH6EFVz.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./mui-DzE-7sTl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="e1ffa4e4-3507-492f-ab2a-9ddb4693417b",e._sentryDebugIdIdentifier="sentry-dbid-e1ffa4e4-3507-492f-ab2a-9ddb4693417b")}catch{}})();const{common:a,spendManagement:{reimbursement:B}}=G.getLocalizedStrings(),n=B.bulkActions;let R;const _e=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:u,onCloseOverlay:t})=>{const{fetchState:s,bulkSubmissionFetchState:p,bulkOperationTypeSelected:r,currentTab:b,currentSubTab:y}=e,g=!1,T=W(),l=J(T),[v,m]=f.useState(!1),[h,A]=f.useState(j(e,g,o,l)),[w,D]=f.useState(g),[P,te]=f.useState(0),[S,$]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.useEffect(()=>(P===h.length&&w&&(D(!1),clearInterval(R)),e.fetchState==="Completed"&&A(j(e,!1,o,l)),()=>{clearInterval(R)}),[h.length,P,w,e.fetchState,g,e,o,l]);const E=h.length,x=h.filter(c=>c.reviewStatus.code!=="error").length,F=()=>{const{title:c,description:k}=Y(x);$({type:"reject",title:c,description:k,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(r,b,y),m(!0)},L={onOkClick:c=>{m(!1);const k=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(r,b,y,Q(k.map(I=>I?.reimbursementTypesIncluded??[]))),d("reject",c)},onCancelClick:()=>{m(!1)}},{title:O,description:U}=ee(s,x,E,w),C=e.fetchState==="Completed"&&x===0,N=()=>{i.trackReimbursementBulkSubmit(r,b,y),d(r)},V=()=>{let c=a.footer.approve;return C?c=a.texts.close:r==="send_for_approval"&&(c=a.footer.submit),{label:c,isDisabled:s!=="Completed"||r==="reject"&&p==="In-Progress",isLoading:p==="In-Progress"&&(r==="send_for_approval"||r==="approve"),onClick:C?t:N,style:r==="send_for_approval"?{minWidth:"92px"}:{}}},M={label:r==="send_for_approval"?a.texts.goBack:a.footer.reject,isDisabled:r!=="reject"&&p==="In-Progress",isLoading:r==="reject"&&p==="In-Progress",reverseSpinnerColor:!1,onClick:r==="send_for_approval"?t:F,style:r==="approve"?{minWidth:"92px"}:{}};return _.jsxs(_.Fragment,{children:[v?_.jsx(q,{titleComponent:_.jsx(H,{children:S.title}),descriptionComponent:_.jsx(z,{children:S.description}),primaryButtonText:S.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:S.secondaryButtonText,action:L,isNotesIncluded:!0,isEditPopup:!0}):null,_.jsx(X,{title:O,description:{content:U,isError:e.fetchState==="Completed"&&x===0},reviewItems:h,onCloseReviewItem:u,onCloseOverlay:t,showFooter:e.fetchState==="Completed"&&!w,footerProps:{primaryButton:V(),cancelButton:M,hideCancel:C}})]})},j=(e,o,i,d)=>{const u=e.fetchState==="In-Progress";return e.remisForReview.map(t=>{const s=K(i,t.submittedBy,d);return{id:t.transactionId,leftSideText:{title:t.reimbursement?.reportTitle!=null?t.reimbursement.reportTitle:B.reimbursementDetail.newReimbursementTitle,subTitle:s!=null?`${a.by} ${s?.firstName} ${s?.lastName}`:a.strings.empty},rightSideText:{title:Z("0,0.[00]",t.reimbursement?.amount?.amount,t.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:t.reviewInfoMessage??""},reviewStatus:{isLoading:u,code:t.reviewStatus??""}}})},Y=e=>{const{this_:o,these:i,report:d,reports:u,payment:t,payments:s}=a.texts;return e>1?{title:n.popUps.reject.title.replace("__report__",n.reports),description:n.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",s).replaceAll("__report__",u)}:{title:n.popUps.reject.title.replace("__report__",n.report),description:n.popUps.reject.description.replaceAll("<_this_>",o).replaceAll("<_payment_>",t).replaceAll("__report__",d)}},ee=(e,o,i,d)=>{const{has:u,have:t,report:s,reports:p,are:r,is:b,do_:y,does:g}=a.texts,T=o>1,l=i>1;let v="",m="";return e==="Completed"&&!d?(v=n.reviewPage.reportsReviewed.title.replace("__report__",l?B.bulkActions.reports:n.report).replace("<_has_>",l?t:u),o===0?m=n.reviewPage.reportsReviewed.descriptionError.replace("__report__",l?p:s).replace("<_do_>",l?y:g):m=`${o}/${i} ${n.reviewPage.reportsReviewed.description.replace("__report__",i>1?p:s).replace("<_is_>",T?r:b)}`):(v=n.reviewPage.reportsReviewing.title.replace("__report__",l?p:s),m=n.reviewPage.reportsReviewing.description.replace("__report__",l?p:s)),{title:v,description:m}};export{_e as default};
@@ -1,4 +1,4 @@
1
- import{y as l,V as r,aP as a,b4 as x,b as y,ac as m,aU as h,bG as g,ak as f,o as c,b5 as b}from"./index-Cq3X29cS.js";import{n as d}from"./mui-DzE-7sTl.js";import{a as s}from"./sentry-DQ_HstYV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5f1cbb62-3102-4a9e-a11f-ad1cfc921ed2",e._sentryDebugIdIdentifier="sentry-dbid-5f1cbb62-3102-4a9e-a11f-ad1cfc921ed2")}catch{}})();function w({backgroundColor:e,foregroundColor:o,animated:t,width:n,height:i}){return r.jsxs(g,{speed:2,width:n,height:i,viewBox:`0 0 ${n} ${i}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${n-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${n-48}`,height:"228"})]})}function p({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(g,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const u=d(h)`
1
+ import{y as l,V as r,aP as a,b4 as x,b as y,ac as m,aU as h,bG as g,ak as f,o as c,b5 as b}from"./index-B3hQ50EY.js";import{n as d}from"./mui-DzE-7sTl.js";import{a as s}from"./sentry-DQ_HstYV.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5f1cbb62-3102-4a9e-a11f-ad1cfc921ed2",e._sentryDebugIdIdentifier="sentry-dbid-5f1cbb62-3102-4a9e-a11f-ad1cfc921ed2")}catch{}})();function w({backgroundColor:e,foregroundColor:o,animated:t,width:n,height:i}){return r.jsxs(g,{speed:2,width:n,height:i,viewBox:`0 0 ${n} ${i}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${n-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${n-48}`,height:"228"})]})}function p({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(g,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const u=d(h)`
2
2
  justify-content: flex-start;
3
3
  `;function T({dimension:e,animated:o}){const t=l();return r.jsx(a,{dimension:e,children:r.jsx(u,{children:r.jsx(p,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o})})})}function D({dimension:e,animated:o}){const t=l();return r.jsx(a,{dimension:e,children:r.jsx(u,{children:r.jsx("div",{style:{width:"100%",height:"100%"},children:r.jsx(b,{children:({height:n,width:i})=>r.jsx(w,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o,width:i,height:n})})})})})}const j=e=>s.createElement("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{opacity:.2,width:72,height:72,rx:36,fill:"#97C3B9"}),s.createElement("path",{d:"M46.7755 32.5635L43.8368 36.9716L40.4082 33.0533",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M34.5307 44.8163C32.6902 44.8163 30.8909 44.2705 29.3605 43.248C27.8301 42.2254 26.6374 40.772 25.933 39.0715C25.2286 37.3711 25.0443 35.4999 25.4034 33.6947C25.7625 31.8895 26.6488 30.2313 27.9503 28.9298C29.2518 27.6283 30.91 26.742 32.7152 26.3829C34.5204 26.0238 36.3916 26.2081 38.092 26.9125C39.7925 27.6169 41.2459 28.8096 42.2685 30.34C43.291 31.8704 43.8369 33.6697 43.8369 35.5102V36.9737",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),C=d(h)`
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{y as ee,J as de,cf as xe,aa as ye,V as o,aq as _e,cg as te,ae as we,x as P,aT as $e,o as a,b as oe,ch as ve,ci as ke,cj as Ce,ck as je,cl as Ie,ao as he,cm as Se,ak as Ne,aG as X,bG as Pe,u as f,aX as Oe,an as De,av as Fe}from"./index-Cq3X29cS.js";import{a as u,P as ue}from"./sentry-DQ_HstYV.js";import{n as d}from"./mui-DzE-7sTl.js";import{R as O,I as Te}from"./CollapsableReportTable-C4hqC6Uj-CeOhK0qJ.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]="70ef95b7-0687-4f45-a3ed-620df4839085",e._sentryDebugIdIdentifier="sentry-dbid-70ef95b7-0687-4f45-a3ed-620df4839085")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Be=e=>({this_period:{start_date:e.thisPeriod.startDate.format(V),end_date:e.thisPeriod.endDate.format(V)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Ee=e=>e!=null?{start_date:e.startDate.format(V),end_date:e.endDate.format(V)}:void 0;function Ae(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(V):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:Be(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Ee(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function ho(e,r,n){const t=oe.getLocalizedStrings().downloadReport,l=`${e}?query=${encodeURIComponent(JSON.stringify(Ae(n)))}`;try{const h=await ve({urlEndPoint:l,authParams:r,fileType:n.statementFileType});if(h.ok){const y=ke(h.headers,t.defaultFileName),_=await h.arrayBuffer();Ce(_,y)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Le=d.div`
1
+ import{y as ee,J as de,cf as xe,aa as ye,V as o,aq as _e,cg as te,ae as we,x as P,aT as $e,o as a,b as oe,ch as ve,ci as ke,cj as Ce,ck as je,cl as Ie,ao as he,cm as Se,ak as Ne,aG as X,bG as Pe,u as f,aX as Oe,an as De,av as Fe}from"./index-B3hQ50EY.js";import{a as u,P as ue}from"./sentry-DQ_HstYV.js";import{n as d}from"./mui-DzE-7sTl.js";import{R as O,I as Te}from"./CollapsableReportTable-C4hqC6Uj-5tFXuNTR.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]="70ef95b7-0687-4f45-a3ed-620df4839085",e._sentryDebugIdIdentifier="sentry-dbid-70ef95b7-0687-4f45-a3ed-620df4839085")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Be=e=>({this_period:{start_date:e.thisPeriod.startDate.format(V),end_date:e.thisPeriod.endDate.format(V)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Ee=e=>e!=null?{start_date:e.startDate.format(V),end_date:e.endDate.format(V)}:void 0;function Ae(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(V):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:Be(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Ee(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function ho(e,r,n){const t=oe.getLocalizedStrings().downloadReport,l=`${e}?query=${encodeURIComponent(JSON.stringify(Ae(n)))}`;try{const h=await ve({urlEndPoint:l,authParams:r,fileType:n.statementFileType});if(h.ok){const y=ke(h.headers,t.defaultFileName),_=await h.arrayBuffer();Ce(_,y)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Le=d.div`
2
2
  padding: 0 ${a.sp3} 0 ${a.sp3};
3
3
  border: 1px solid ${e=>e.theme.colors.primary};
4
4
  background: ${e=>e.theme.colors.grey5};
@@ -1,4 +1,4 @@
1
- import{J as W,y as G,b as y,ay as ge,V as r,bQ as _e,ac as T,bF as be,bE as Se,o as w,aV as we,L as ye,x as B,bR as Ce,u as S,K as A,aG as Q,H as xe,aX as Oe,au as Re,bN as Ae}from"./index-Cq3X29cS.js";import{a as P,P as X}from"./sentry-DQ_HstYV.js";import{n as _}from"./mui-DzE-7sTl.js";import{bg as Z,Fy as Be,FH as ve,FI as $,FJ as Le,FK as Pe,FL as Te,FM as Ie,FN as Ne,FO as ee,FP as te}from"./zeni-epic-state-B4gyGBI3.js";import{m as z,l as q}from"./analyticsHelper-YXL3oVeL-st_q3oRE.js";import{x as ke}from"./ReportTableViewSelector-DM_Em4lI-DVoP-nO6.js";import{a as se,p as Fe}from"./TimeRangeSwitcher-NHpll2Zg-Dr20odtf.js";import{I as Me}from"./TimeframeSwitcherWithToggle-DlZ34Erl-BkLOXZy3.js";import{DownloadOverlayButton as $e}from"./DownloadOverlay-CfWDWIbC-DcGZOT8A.js";import{I as je,R as F,p as ne}from"./CollapsableReportTable-C4hqC6Uj-CeOhK0qJ.js";import{D as oe,T as ae,C as j,L as Ee,g as ie}from"./mapSectionWithAcOnlyToTreeNode-BR34hkWh-Dcg0Ex62.js";import{s as H}from"./mapTimeframeBalancesToTreeNode-DNryKtmS-D24Y9ZFz.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-6kNSnV0m-BkRLjeRM.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-CkbJ6R1I-DIVOAa5P.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./TimeframeSwitcher-DR4B6ENA-CD0Ac63k.js";import"./page-detail-CWX5S47F-CU2PSbaV.js";import"./AccountRow-C7_pSX9U-C_uj4ob-.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3112cb11-93b4-4f8e-9f42-7afcf59f5b6b",e._sentryDebugIdIdentifier="sentry-dbid-3112cb11-93b4-4f8e-9f42-7afcf59f5b6b")}catch{}})();function ce({section:e,sectionId:t,numOfBalances:o,config:a}){return ne("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ue({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ue({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ne("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,f)=>ie({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:f===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:f===i.length-1}]}}));return l.children.push(...u),l}function re({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ie({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function le({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function We(e,t,o,a=!0){Object.assign(e.config,t);const n=de(o),d=H({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const de=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Ge(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=de(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),f={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(f),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Le(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(oe({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(ae({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else Pe(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function He({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function Ye(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),f={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(f),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Te(s)===!0)if(e.sections[s].accountGroups.length>0){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else Ie(s)===!0?i.push(He({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):Ne(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function Ze(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Ve({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,f)=>{const s=f%4;let c=De[s];const C=ze({title:`${f}+${c}`,balances:p,config:t});C.reportElementData.element.numOfBalances=6,l.push(C)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=H({balances:u,config:t}),f=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(ee(s)===!0){const c=e.sections[s];c!=null&&l.push(Ee({section:c,sectionType:s,numOfBalances:f,title:n.sections[s],isLastNode:!0,config:t}))}else if(te(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:f,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function qe(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=H({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(ee(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(oe({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(ae({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),te(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const J={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Je=_.div`
1
+ import{J as W,y as G,b as y,ay as ge,V as r,bQ as _e,ac as T,bF as be,bE as Se,o as w,aV as we,L as ye,x as B,bR as Ce,u as S,K as A,aG as Q,H as xe,aX as Oe,au as Re,bN as Ae}from"./index-B3hQ50EY.js";import{a as P,P as X}from"./sentry-DQ_HstYV.js";import{n as _}from"./mui-DzE-7sTl.js";import{bg as Z,Fy as Be,FH as ve,FI as $,FJ as Le,FK as Pe,FL as Te,FM as Ie,FN as Ne,FO as ee,FP as te}from"./zeni-epic-state-B4gyGBI3.js";import{m as z,l as q}from"./analyticsHelper-YXL3oVeL-BPAS52dh.js";import{x as ke}from"./ReportTableViewSelector-DM_Em4lI-BV_CwmkV.js";import{a as se,p as Fe}from"./TimeRangeSwitcher-NHpll2Zg-DESlkXFJ.js";import{I as Me}from"./TimeframeSwitcherWithToggle-DlZ34Erl-DlGIs5fl.js";import{DownloadOverlayButton as $e}from"./DownloadOverlay-CfWDWIbC-Cl0cCm4g.js";import{I as je,R as F,p as ne}from"./CollapsableReportTable-C4hqC6Uj-5tFXuNTR.js";import{D as oe,T as ae,C as j,L as Ee,g as ie}from"./mapSectionWithAcOnlyToTreeNode-BR34hkWh-CdyWokMa.js";import{s as H}from"./mapTimeframeBalancesToTreeNode-DNryKtmS-DUg0cGGx.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-6kNSnV0m-BiaSXpyk.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-CkbJ6R1I-CGGhBBTF.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";import"./TimeframeSwitcher-DR4B6ENA-C32GEGxC.js";import"./page-detail-CWX5S47F-CU2PSbaV.js";import"./AccountRow-C7_pSX9U-B9KvLBQA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="3112cb11-93b4-4f8e-9f42-7afcf59f5b6b",e._sentryDebugIdIdentifier="sentry-dbid-3112cb11-93b4-4f8e-9f42-7afcf59f5b6b")}catch{}})();function ce({section:e,sectionId:t,numOfBalances:o,config:a}){return ne("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ue({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ue({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ne("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,f)=>ie({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:f===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:f===i.length-1}]}}));return l.children.push(...u),l}function re({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ie({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function le({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function We(e,t,o,a=!0){Object.assign(e.config,t);const n=de(o),d=H({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const de=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Ge(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=de(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),f={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(f),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Le(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(oe({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(ae({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else Pe(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function He({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function Ye(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),f={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(f),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Te(s)===!0)if(e.sections[s].accountGroups.length>0){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else Ie(s)===!0?i.push(He({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):Ne(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function Ze(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Ve({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,f)=>{const s=f%4;let c=De[s];const C=ze({title:`${f}+${c}`,balances:p,config:t});C.reportElementData.element.numOfBalances=6,l.push(C)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=H({balances:u,config:t}),f=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(ee(s)===!0){const c=e.sections[s];c!=null&&l.push(Ee({section:c,sectionType:s,numOfBalances:f,title:n.sections[s],isLastNode:!0,config:t}))}else if(te(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:f,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function qe(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=H({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(ee(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(oe({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(ae({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),te(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const J={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Je=_.div`
2
2
  height: ${e=>e.height}px;
3
3
  width: 99.9%;
4
4
  margin-top: ${w.sp2};
@@ -1,4 +1,4 @@
1
- import{y as A,V as a,b as D,J as de,b5 as J,u as I,w as M,a_ as Q,o as m,ac as Ae,p as g,aG as Ve,x as xe,bO as ge,an as R,bP as V,bc as F}from"./index-Cq3X29cS.js";import{a as P,P as ee}from"./sentry-DQ_HstYV.js";import{n as x}from"./mui-DzE-7sTl.js";import{p as b,d as ae,y as W,b as N,g as re,u as T}from"./chartTypes-BPQ65VEE-6yZpeJsO.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID-CU-N01Ne-BfeZ-0De.js";import{V as Z}from"./toChartData-BIERIIE--CxJg6nKe.js";import{H as Te,I as te,X as le,Y as ne,J as se,L as pe,K as ce,M as me,N as fe}from"./recharts-CiLmNGsl.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]="dd6bd57c-3491-4853-ae93-fbfbdf9d9747",e._sentryDebugIdIdentifier="sentry-dbid-dd6bd57c-3491-4853-ae93-fbfbdf9d9747")}catch{}})();const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(I[3],I[4])},Fe=x.div`
1
+ import{y as A,V as a,b as D,J as de,b5 as J,u as I,w as M,a_ as Q,o as m,ac as Ae,p as g,aG as Ve,x as xe,bO as ge,an as R,bP as V,bc as F}from"./index-B3hQ50EY.js";import{a as P,P as ee}from"./sentry-DQ_HstYV.js";import{n as x}from"./mui-DzE-7sTl.js";import{p as b,d as ae,y as W,b as N,g as re,u as T}from"./chartTypes-BPQ65VEE-Cay7MVWd.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID-CU-N01Ne-CsSiVXKO.js";import{V as Z}from"./toChartData-BIERIIE--CUOhP7c-.js";import{H as Te,I as te,X as le,Y as ne,J as se,L as pe,K as ce,M as me,N as fe}from"./recharts-CiLmNGsl.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]="dd6bd57c-3491-4853-ae93-fbfbdf9d9747",e._sentryDebugIdIdentifier="sentry-dbid-dd6bd57c-3491-4853-ae93-fbfbdf9d9747")}catch{}})();const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(I[3],I[4])},Fe=x.div`
2
2
  display: flex;
3
3
  `,He=x.div`
4
4
  margin: ${m.sp2} ${m.sp0} ${m.sp2} ${m.sp0};
@@ -1,4 +1,4 @@
1
- import{J as Tt,ay as Ct,x as u,f9 as Dt,fa as It,fb as kt,V as t,fc as Pt,fd as le,fe as Mt,ff as At,fg as Bt,fh as Ft,aQ as M,fi as Lt,ac as v,fj as Rt,fk as Be,fl as Fe,fm as Le,w as U,fn as O,p as j,fo as zt,fp as E,fq as V,fr as Nt,fs as Ot,bV as Re,o as n,aT as Et,u as d,b as Vt,ai as Wt,c4 as Zt,c as _t,M as Gt,ft as Yt,ck as qt,an as ce,ao as me,fu as Ut,fv as Kt,bk as Ht,h as Jt,bb as Xt,fw as Qt,as as tt,bM as en,ak as nt,bv as tn,fx as nn}from"./index-Cq3X29cS.js";import{a as Z}from"./sentry-DQ_HstYV.js";import{n as i}from"./mui-DzE-7sTl.js";import{bo as ze,bm as Ne,bH as I,bX as an,Gm as on,bL as re,bZ as ln}from"./zeni-epic-state-B4gyGBI3.js";import{t as rn,o as sn}from"./LowBalancePopup-Cg-JRo7A-zj6pzOkP.js";import{S as W}from"./LabeledText-B0bwznDi-CbaJVeOz.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},y=new e.Error().stack;y&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[y]="6a114599-0729-4f23-bab6-b5658616f68f",e._sentryDebugIdIdentifier="sentry-dbid-6a114599-0729-4f23-bab6-b5658616f68f")}catch{}})();const it=["small","medium-compact","medium-regular"],m={largeLabelWidth:new u(150,215,215),infoMinWidth:new u(0,0,0,142,142),infoMarginRight:new u(0,0,0,d[2],d[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,d[1]),navBarContainerPaddingTop:new u(10,d[3]),sectionTitleMarginLeft:new u(d[3],d[0]),reviewContainerMarginLeft:new u(d[3],d[6]),reviewContainerMarginRight:new u(d[3],d[8]),footerRightIconMarginRight:new u(d[0],d[0],d[7]),infoLabelPaddingRight:new u(d[0],d[3]),infoLabelMarginTop:new u(d[1],d[0])},dn={sectionTitle:new _t("h6Medium","h5Medium")},{dateFormat:Oe,common:{currency:$,labels:Ee,edit:cn,strings:{empty:f}},spendManagement:{billPay:mn}}=Vt.getLocalizedStrings(),{billDetails:a,paymentDetails:Ve}=mn,We=({attachment:e})=>{const[y,g]=Z.useState(!1),A=()=>{g(!1)},S=e.fileId?.length===0;return t.jsxs(On,{isDisabled:e.fileId?.length===0,"data-testid":v("attachment-tag",e.fileName),onClick:()=>S===!1?g(!0):null,children:[y&&e?.fileDownloadUrl!=null?t.jsx(Ut,{title:e.fileName,file:e,onCrossClick:()=>A(),setShowFullScreenView:g}):null,t.jsx(En,{children:t.jsx(Kt,{contentType:e.contentType})})]})},di=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:g,currentTenant:A,isInternationalPaymentShaVsOurEnabled:S,isLocalCurrencyEnabled:at,style:ot,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:rt,isDetectInsufficientFundsEnabled:st,billId:b,onClickEdit:pe,discardBillDetailsFromLocalStore:ue,saveBillDetails:ye,discardOutsideZeniPaymentData:dt,updateBillDetailSaveBillCode:he,redirectToBillsScreen:fe,onAttachmentClick:X,retryPayment:ct})=>{const s=Tt(),c=Ct(),B={application:"dashboard",companyId:c.currentTenant?.companyId,tab:"bill",entityId:b},F=g&&b!=null,L=`dashboard_${c.currentTenant?.companyId}`,R=m.largeLabelWidth.value(s),k=e.saveStatus,Q=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,l=Dt(S,at,e.billPayConfigList.filter(o=>o.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),T=Oe.visual.MMMDCommaYYYYformat,ge={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},p={amount:l?.method.includes("international")===!0?It(ge,l):e.recipientTotalAmount.amount+(l?.fee.amount??0),currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},z={amount:l?.method.includes("international")===!0?kt(ge,l):l?.fee.amount??0,currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},[mt,xe]=Z.useState(!1),[te,be]=Z.useState(!1),we=()=>xe(!1),pt=()=>{w.trackBillPayMagicLinkPreviewEmail("review_bill"),xe(!0)},ut=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Rn,{size:s,children:t.jsx(Ln,{})})]}):Pt(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(k?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(ue(),he(),fe())},[k,Q,fe,ue,he]);const P=e.billPayInfo?.stage,N=e.billPayInfo?.billStatus,_=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,ne=P?.code==="paid"?P:N?.code=="approved"&&_?.code?_:N,ht=e.billPayInfo?.isRefundInitiated===!0?yt:N?.code=="approved"&&_?.code?_:N,ie=()=>{pe()},$e=()=>{pe()},G=e.paymentDetailsSection?.paymentDate,ae=le(l?.method??""),ve=ae.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:ve,onClick:pt}):a.addedByZeni,Y=y.allApprovalRules.length>0,gt=ze(l?.method!=null&&(l.method.includes(I)||l?.fee.amount!=null&&l.fee.amount!==0)?p.amount-z.amount:p.amount,l?.fee.currencyCode??Ne.currencyCode,l?.fee.currencySymbol??Ne.currencySymbol),x=an(e.paymentDetailsSection?.paymentType?.method),xt=o=>{w.trackBillPayMarkAsPaidSubmit(o.paymentMode??"other",P?.code??"draft",ne?.code??""),ye(!0,o)},je=()=>{be(!0),w.trackBillPayMarkAsPaid(P?.code??"draft",ne?.code??"")},bt=()=>{dt(),be(!1)},C=x,h=C&&!rt,Se=Ze(h,Y,e.isBillMarkedForRetry),wt=()=>x?h?void 0:a.paymentOutsideZeni.reviewInfo:l?.method!=null&&l.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&S&&ee===$.currencyCode?Qt(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,oe=st&&e.paymentDetailsSection!=null?At(p,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,$t=()=>{const o=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,D=e.recurringConfig,jt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&w.trackBillPayAutoDateChange(b??"new_bill"),l?.method!=null&&o!=null){const St=x?a.paymentOutsideZeni.offline:le(l.method);if(w.trackBillPaySendForApproval(St,o.format(Oe.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,b,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:re(D?.startDate?.toString()??"").format(T),endDate:re(D?.endDate?.toString()??"").format(T),frequency:D?.frequency??"monthly",totalAmount:jt.amount,totalPaymentCycles:D?.totalPaymentCycles??0,isApprovalRequired:D?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?D?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?D?.updateRecurringBills==="all":void 0}),oe!=null){const De=P?.code??"draft",Ie=N?.code??"",ke=e.isRecurring?["Recurring"]:["One-Time"],Pe=e.invoiceNumber??"",Me=nn(c.loggedInUser),Ae=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";Se===a.scheduleBill?w.trackLowBalanceAccountSchedule(De,Ie,ke,Pe,Me,Ae):Se===a.sendForApproval&&w.trackLowBalanceAccountSentForApproval(De,Ie,ke,Pe,Me,Ae)}}},Te=()=>{Ce===!0&&q(!1),e.isBillMarkedForRetry===!0?(ct(),w.trackRetryConfirmClick(ne?.code??"",P?.code??"",ht?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&($t(),ye(!1,{}))},vt=on(p.amount,y.allApprovalRules,c.loggedInUser),[Ce,q]=Z.useState(!1);return t.jsxs($n,{children:[te?t.jsx(rn,{onCancel:bt,onProceedForMarkAsPaid:xt,saveDetailsFetchState:k?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,Ce?t.jsx(sn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Te,onCancelClick:()=>{q(!1),ie()},onClickAway:()=>{q(!1)}}):null,t.jsx(Bt,{anchor:"right",open:mt,onClose:we,transitionDuration:250,"data-testid":v("vendor-email-preview-drawer"),children:t.jsx(Ft,{companyName:Lt(A.company?.companyInfo),vendor:e.vendor?.name,paymentDate:G?.format(T)??"",paymentType:ve,amount:M("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:we})}),t.jsxs(vn,{windowSize:s,style:ot,children:[s==="small"?t.jsxs(Fn,{windowSize:s,children:[t.jsx(He,{onClick:$e,"data-testid":v("review-detail-nav-bar-small-back")}),t.jsx(Ye,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Bn,{"data-testid":v("review-details-nav-bar-back"),children:t.jsx(He,{onClick:$e})}),s!=="small"?t.jsx(Sn,{children:t.jsx(Ye,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(Yn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:a.duplicateBillPayWarning}),t.jsxs(In,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":v("review-detail-attachment-button"),onClick:()=>X(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(Gn,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(o=>{const r=Rt(o);return o!=null?t.jsx(_n,{children:it.includes(s)?t.jsxs(qe,{windowSize:s,children:[t.jsxs(Pn,{children:[t.jsxs(Mn,{children:[o.attachments&&o.attachments.length>0?t.jsx(We,{attachment:o.attachments[0]}):t.jsx(Je,{children:t.jsx(Xe,{})}),t.jsx(H,{children:t.jsxs(t.Fragment,{children:[o.documentId!=null?a.invoiceNo:null,o.documentId]})})]}),t.jsx(Qe,{windowSize:s,children:M("0,0[.]00",o.recipientTotalAmount)})]}),t.jsxs(Vn,{"data-testid":v("review-detail-mobile-info"),onClick:()=>X(o.id,o.billPayInfo.stage.code),children:[t.jsxs(H,{children:[o.dueDate!=null?a.due:null," ",o.dueDate?.format(T)]}),t.jsx(et,{children:r!=null?Be.includes(r.code)?t.jsx(Fe,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(qe,{windowSize:s,children:[o.attachments&&o.attachments.length>0?t.jsx(We,{attachment:o.attachments[0]}):t.jsx(Je,{children:t.jsx(Xe,{})}),t.jsxs(Wn,{"data-testid":v("review-detail-info"),onClick:()=>X(o.id,o.billPayInfo.stage.code),children:[t.jsx(H,{style:{width:"50%"},children:t.jsxs("div",{children:[o.documentId!=null?a.invoiceNo:null," ",o.documentId]})}),t.jsxs(H,{style:{width:"25%"},children:[o.dueDate!=null?a.due:null," ",o.dueDate?.format(T)]}),t.jsx(Qe,{style:{width:"25%"},windowSize:s,children:M("0,0[.]00",o.amount)})]}),t.jsx(et,{children:r!=null?Be.includes(r.code)?t.jsx(Fe,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},o.id):null})]})]}):null,t.jsxs(An,{children:[t.jsx(Ue,{children:a.pay}),t.jsx(Ke,{children:t.jsx(Le,{amount:gt,integerStyles:U.largeMedium.cssObject,decimalStyles:U.smallMedium.cssObject})}),t.jsx(Ue,{children:a.to}),t.jsx(Ke,{children:e.vendor?.name})]}),t.jsxs(jn,{children:[x?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"withdrawFrom"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:R},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?zt(e.paymentDetailsSection.withdrawFrom,s):f,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(s),marginTop:m.infoLabelMarginTop.valuePx(s),color:j.brandColorGoldDark},additionalInfoLabel:oe})}),t.jsx(K,{})]}),t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentType"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:R},style:{width:"auto"},value:le(l?.method??""),additionalInfoLabel:wt()})}),t.jsx(K,{}),!x&&G!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentDate"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:R},style:{width:"auto"},value:G.format(T),additionalInfoLabel:`${a.estimatedArrival}${re(ln(G.toDate(),[0,6],l?.maxPeriod.value??0).toDateString()).format(T)} - (${ae.length>0?`${ae} `:""}${a.deliveryTimeLabel} = ${l?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(K,{})]}):null,x?null:t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentTo"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:R},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),x||lt?t.jsxs(t.Fragment,{children:[t.jsx(K,{}),t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"recurringPaymentType"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:R},style:{width:"auto"},value:Ot(e.isRecurring,x,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Nt(s,e.isRecurring,x,e.recurringConfig)})})]}):null]}),!x&&l?.method!=null&&(l.method.includes(I)||l?.fee.amount!=null&&l.fee.amount!==0)?t.jsx(gn,{children:t.jsxs(xn,{windowSize:s,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:a.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ge,{children:[t.jsx(de,{children:l.method.includes(I)&&ee!==$.currencyCode?Ve.conversionAmountColon:Ee.invoiceAmount}),t.jsx(se,{children:M("0,0[.]00",{amount:p.amount-z.amount,currencySymbol:z.currencySymbol})})]}),t.jsxs(Ge,{children:[t.jsx(de,{children:Ve.transactionFee}),t.jsx(se,{children:M("0,0[.]00",{amount:z.amount,currencySymbol:z.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(de,{children:Ee.total}),t.jsx(se,{children:M("0,0[.]00",{amount:p.amount,currencyCode:p.currencyCode,currencySymbol:p.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(pn,{})})]}),t.jsx(wn,{children:t.jsx(Le,{amount:ze(p.amount,p.currencyCode,p.currencySymbol),integerStyles:U.h6Medium.cssObject,decimalStyles:U.standardMedium.cssObject})})]})}):null]}),t.jsx(Et,{cancelBtn:{label:C&&!h?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:C&&!h?je:ie,isLoading:C&&!h&&te&&k?.fetchState==="In-Progress",reverseSpinnerColor:!1,style:{width:_e(!1,C,h,Y,s)}},primaryBtn:{label:Ze(h,Y,e.isBillMarkedForRetry),isLoading:k?.fetchState==="In-Progress"&&(h||!te)||Q?.fetchState==="In-Progress",onClick:h?je:()=>{vt&&oe!=null?q(!0):Te()},style:{width:_e(!0,C,h,Y,s)}},rightSideComponent:C&&!h&&k.fetchState!=="In-Progress"?t.jsx(qn,{windowSize:s,children:t.jsx(Re,{style:{color:j.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Kn,{onClick:ie,"data-testid":v("review-detail-edit-bill-button"),children:t.jsx(Un,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?t.jsxs(zn,{children:[a.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Ze=(e,y,g)=>e?a.paymentOutsideZeni.markAsPaid:g===!0?a.retryPayment:y?a.sendForApproval:a.scheduleBill,_e=(e,y,g,A,S)=>g?128:y&&!e&&S==="small"?"auto":A?165:m.footerButtonWidth.value(S),pn=i(en)`
1
+ import{J as Tt,ay as Ct,x as u,f9 as Dt,fa as It,fb as kt,V as t,fc as Pt,fd as le,fe as Mt,ff as At,fg as Bt,fh as Ft,aQ as M,fi as Lt,ac as v,fj as Rt,fk as Be,fl as Fe,fm as Le,w as U,fn as O,p as j,fo as zt,fp as E,fq as V,fr as Nt,fs as Ot,bV as Re,o as n,aT as Et,u as d,b as Vt,ai as Wt,c4 as Zt,c as _t,M as Gt,ft as Yt,ck as qt,an as ce,ao as me,fu as Ut,fv as Kt,bk as Ht,h as Jt,bb as Xt,fw as Qt,as as tt,bM as en,ak as nt,bv as tn,fx as nn}from"./index-B3hQ50EY.js";import{a as Z}from"./sentry-DQ_HstYV.js";import{n as i}from"./mui-DzE-7sTl.js";import{bo as ze,bm as Ne,bH as I,bX as an,Gm as on,bL as re,bZ as ln}from"./zeni-epic-state-B4gyGBI3.js";import{t as rn,o as sn}from"./LowBalancePopup-Cg-JRo7A-BHBzAYDh.js";import{S as W}from"./LabeledText-B0bwznDi-DpPCDPqS.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},y=new e.Error().stack;y&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[y]="6a114599-0729-4f23-bab6-b5658616f68f",e._sentryDebugIdIdentifier="sentry-dbid-6a114599-0729-4f23-bab6-b5658616f68f")}catch{}})();const it=["small","medium-compact","medium-regular"],m={largeLabelWidth:new u(150,215,215),infoMinWidth:new u(0,0,0,142,142),infoMarginRight:new u(0,0,0,d[2],d[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,d[1]),navBarContainerPaddingTop:new u(10,d[3]),sectionTitleMarginLeft:new u(d[3],d[0]),reviewContainerMarginLeft:new u(d[3],d[6]),reviewContainerMarginRight:new u(d[3],d[8]),footerRightIconMarginRight:new u(d[0],d[0],d[7]),infoLabelPaddingRight:new u(d[0],d[3]),infoLabelMarginTop:new u(d[1],d[0])},dn={sectionTitle:new _t("h6Medium","h5Medium")},{dateFormat:Oe,common:{currency:$,labels:Ee,edit:cn,strings:{empty:f}},spendManagement:{billPay:mn}}=Vt.getLocalizedStrings(),{billDetails:a,paymentDetails:Ve}=mn,We=({attachment:e})=>{const[y,g]=Z.useState(!1),A=()=>{g(!1)},S=e.fileId?.length===0;return t.jsxs(On,{isDisabled:e.fileId?.length===0,"data-testid":v("attachment-tag",e.fileName),onClick:()=>S===!1?g(!0):null,children:[y&&e?.fileDownloadUrl!=null?t.jsx(Ut,{title:e.fileName,file:e,onCrossClick:()=>A(),setShowFullScreenView:g}):null,t.jsx(En,{children:t.jsx(Kt,{contentType:e.contentType})})]})},di=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:g,currentTenant:A,isInternationalPaymentShaVsOurEnabled:S,isLocalCurrencyEnabled:at,style:ot,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:rt,isDetectInsufficientFundsEnabled:st,billId:b,onClickEdit:pe,discardBillDetailsFromLocalStore:ue,saveBillDetails:ye,discardOutsideZeniPaymentData:dt,updateBillDetailSaveBillCode:he,redirectToBillsScreen:fe,onAttachmentClick:X,retryPayment:ct})=>{const s=Tt(),c=Ct(),B={application:"dashboard",companyId:c.currentTenant?.companyId,tab:"bill",entityId:b},F=g&&b!=null,L=`dashboard_${c.currentTenant?.companyId}`,R=m.largeLabelWidth.value(s),k=e.saveStatus,Q=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,l=Dt(S,at,e.billPayConfigList.filter(o=>o.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),T=Oe.visual.MMMDCommaYYYYformat,ge={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},p={amount:l?.method.includes("international")===!0?It(ge,l):e.recipientTotalAmount.amount+(l?.fee.amount??0),currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},z={amount:l?.method.includes("international")===!0?kt(ge,l):l?.fee.amount??0,currencyCode:$.currencyCode,currencySymbol:$.currencySymbol},[mt,xe]=Z.useState(!1),[te,be]=Z.useState(!1),we=()=>xe(!1),pt=()=>{w.trackBillPayMagicLinkPreviewEmail("review_bill"),xe(!0)},ut=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Rn,{size:s,children:t.jsx(Ln,{})})]}):Pt(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(k?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(ue(),he(),fe())},[k,Q,fe,ue,he]);const P=e.billPayInfo?.stage,N=e.billPayInfo?.billStatus,_=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,ne=P?.code==="paid"?P:N?.code=="approved"&&_?.code?_:N,ht=e.billPayInfo?.isRefundInitiated===!0?yt:N?.code=="approved"&&_?.code?_:N,ie=()=>{pe()},$e=()=>{pe()},G=e.paymentDetailsSection?.paymentDate,ae=le(l?.method??""),ve=ae.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:ve,onClick:pt}):a.addedByZeni,Y=y.allApprovalRules.length>0,gt=ze(l?.method!=null&&(l.method.includes(I)||l?.fee.amount!=null&&l.fee.amount!==0)?p.amount-z.amount:p.amount,l?.fee.currencyCode??Ne.currencyCode,l?.fee.currencySymbol??Ne.currencySymbol),x=an(e.paymentDetailsSection?.paymentType?.method),xt=o=>{w.trackBillPayMarkAsPaidSubmit(o.paymentMode??"other",P?.code??"draft",ne?.code??""),ye(!0,o)},je=()=>{be(!0),w.trackBillPayMarkAsPaid(P?.code??"draft",ne?.code??"")},bt=()=>{dt(),be(!1)},C=x,h=C&&!rt,Se=Ze(h,Y,e.isBillMarkedForRetry),wt=()=>x?h?void 0:a.paymentOutsideZeni.reviewInfo:l?.method!=null&&l.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&S&&ee===$.currencyCode?Qt(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,oe=st&&e.paymentDetailsSection!=null?At(p,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,$t=()=>{const o=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,D=e.recurringConfig,jt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&w.trackBillPayAutoDateChange(b??"new_bill"),l?.method!=null&&o!=null){const St=x?a.paymentOutsideZeni.offline:le(l.method);if(w.trackBillPaySendForApproval(St,o.format(Oe.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,b,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:re(D?.startDate?.toString()??"").format(T),endDate:re(D?.endDate?.toString()??"").format(T),frequency:D?.frequency??"monthly",totalAmount:jt.amount,totalPaymentCycles:D?.totalPaymentCycles??0,isApprovalRequired:D?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?D?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?D?.updateRecurringBills==="all":void 0}),oe!=null){const De=P?.code??"draft",Ie=N?.code??"",ke=e.isRecurring?["Recurring"]:["One-Time"],Pe=e.invoiceNumber??"",Me=nn(c.loggedInUser),Ae=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";Se===a.scheduleBill?w.trackLowBalanceAccountSchedule(De,Ie,ke,Pe,Me,Ae):Se===a.sendForApproval&&w.trackLowBalanceAccountSentForApproval(De,Ie,ke,Pe,Me,Ae)}}},Te=()=>{Ce===!0&&q(!1),e.isBillMarkedForRetry===!0?(ct(),w.trackRetryConfirmClick(ne?.code??"",P?.code??"",ht?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&($t(),ye(!1,{}))},vt=on(p.amount,y.allApprovalRules,c.loggedInUser),[Ce,q]=Z.useState(!1);return t.jsxs($n,{children:[te?t.jsx(rn,{onCancel:bt,onProceedForMarkAsPaid:xt,saveDetailsFetchState:k?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,Ce?t.jsx(sn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Te,onCancelClick:()=>{q(!1),ie()},onClickAway:()=>{q(!1)}}):null,t.jsx(Bt,{anchor:"right",open:mt,onClose:we,transitionDuration:250,"data-testid":v("vendor-email-preview-drawer"),children:t.jsx(Ft,{companyName:Lt(A.company?.companyInfo),vendor:e.vendor?.name,paymentDate:G?.format(T)??"",paymentType:ve,amount:M("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:we})}),t.jsxs(vn,{windowSize:s,style:ot,children:[s==="small"?t.jsxs(Fn,{windowSize:s,children:[t.jsx(He,{onClick:$e,"data-testid":v("review-detail-nav-bar-small-back")}),t.jsx(Ye,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Bn,{"data-testid":v("review-details-nav-bar-back"),children:t.jsx(He,{onClick:$e})}),s!=="small"?t.jsx(Sn,{children:t.jsx(Ye,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(Yn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:a.duplicateBillPayWarning}),t.jsxs(In,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":v("review-detail-attachment-button"),onClick:()=>X(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(Gn,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(o=>{const r=Rt(o);return o!=null?t.jsx(_n,{children:it.includes(s)?t.jsxs(qe,{windowSize:s,children:[t.jsxs(Pn,{children:[t.jsxs(Mn,{children:[o.attachments&&o.attachments.length>0?t.jsx(We,{attachment:o.attachments[0]}):t.jsx(Je,{children:t.jsx(Xe,{})}),t.jsx(H,{children:t.jsxs(t.Fragment,{children:[o.documentId!=null?a.invoiceNo:null,o.documentId]})})]}),t.jsx(Qe,{windowSize:s,children:M("0,0[.]00",o.recipientTotalAmount)})]}),t.jsxs(Vn,{"data-testid":v("review-detail-mobile-info"),onClick:()=>X(o.id,o.billPayInfo.stage.code),children:[t.jsxs(H,{children:[o.dueDate!=null?a.due:null," ",o.dueDate?.format(T)]}),t.jsx(et,{children:r!=null?Be.includes(r.code)?t.jsx(Fe,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(qe,{windowSize:s,children:[o.attachments&&o.attachments.length>0?t.jsx(We,{attachment:o.attachments[0]}):t.jsx(Je,{children:t.jsx(Xe,{})}),t.jsxs(Wn,{"data-testid":v("review-detail-info"),onClick:()=>X(o.id,o.billPayInfo.stage.code),children:[t.jsx(H,{style:{width:"50%"},children:t.jsxs("div",{children:[o.documentId!=null?a.invoiceNo:null," ",o.documentId]})}),t.jsxs(H,{style:{width:"25%"},children:[o.dueDate!=null?a.due:null," ",o.dueDate?.format(T)]}),t.jsx(Qe,{style:{width:"25%"},windowSize:s,children:M("0,0[.]00",o.amount)})]}),t.jsx(et,{children:r!=null?Be.includes(r.code)?t.jsx(Fe,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(J,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},o.id):null})]})]}):null,t.jsxs(An,{children:[t.jsx(Ue,{children:a.pay}),t.jsx(Ke,{children:t.jsx(Le,{amount:gt,integerStyles:U.largeMedium.cssObject,decimalStyles:U.smallMedium.cssObject})}),t.jsx(Ue,{children:a.to}),t.jsx(Ke,{children:e.vendor?.name})]}),t.jsxs(jn,{children:[x?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"withdrawFrom"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:R},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?zt(e.paymentDetailsSection.withdrawFrom,s):f,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(s),marginTop:m.infoLabelMarginTop.valuePx(s),color:j.brandColorGoldDark},additionalInfoLabel:oe})}),t.jsx(K,{})]}),t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentType"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:R},style:{width:"auto"},value:le(l?.method??""),additionalInfoLabel:wt()})}),t.jsx(K,{}),!x&&G!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentDate"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:R},style:{width:"auto"},value:G.format(T),additionalInfoLabel:`${a.estimatedArrival}${re(ln(G.toDate(),[0,6],l?.maxPeriod.value??0).toDateString()).format(T)} - (${ae.length>0?`${ae} `:""}${a.deliveryTimeLabel} = ${l?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(K,{})]}):null,x?null:t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"paymentTo"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:R},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),x||lt?t.jsxs(t.Fragment,{children:[t.jsx(K,{}),t.jsx(O,{isThreadAllowed:F,entityId:b,dashboardTabKey:V({type:"details",key:"recurringPaymentType"}),roomId:L,companyId:c.currentTenant?.companyId??f,companyName:c.currentTenant?.companyName??f,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:R},style:{width:"auto"},value:Ot(e.isRecurring,x,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Nt(s,e.isRecurring,x,e.recurringConfig)})})]}):null]}),!x&&l?.method!=null&&(l.method.includes(I)||l?.fee.amount!=null&&l.fee.amount!==0)?t.jsx(gn,{children:t.jsxs(xn,{windowSize:s,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:a.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ge,{children:[t.jsx(de,{children:l.method.includes(I)&&ee!==$.currencyCode?Ve.conversionAmountColon:Ee.invoiceAmount}),t.jsx(se,{children:M("0,0[.]00",{amount:p.amount-z.amount,currencySymbol:z.currencySymbol})})]}),t.jsxs(Ge,{children:[t.jsx(de,{children:Ve.transactionFee}),t.jsx(se,{children:M("0,0[.]00",{amount:z.amount,currencySymbol:z.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(de,{children:Ee.total}),t.jsx(se,{children:M("0,0[.]00",{amount:p.amount,currencyCode:p.currencyCode,currencySymbol:p.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(pn,{})})]}),t.jsx(wn,{children:t.jsx(Le,{amount:ze(p.amount,p.currencyCode,p.currencySymbol),integerStyles:U.h6Medium.cssObject,decimalStyles:U.standardMedium.cssObject})})]})}):null]}),t.jsx(Et,{cancelBtn:{label:C&&!h?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:C&&!h?je:ie,isLoading:C&&!h&&te&&k?.fetchState==="In-Progress",reverseSpinnerColor:!1,style:{width:_e(!1,C,h,Y,s)}},primaryBtn:{label:Ze(h,Y,e.isBillMarkedForRetry),isLoading:k?.fetchState==="In-Progress"&&(h||!te)||Q?.fetchState==="In-Progress",onClick:h?je:()=>{vt&&oe!=null?q(!0):Te()},style:{width:_e(!0,C,h,Y,s)}},rightSideComponent:C&&!h&&k.fetchState!=="In-Progress"?t.jsx(qn,{windowSize:s,children:t.jsx(Re,{style:{color:j.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Kn,{onClick:ie,"data-testid":v("review-detail-edit-bill-button"),children:t.jsx(Un,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?t.jsxs(zn,{children:[a.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},Ze=(e,y,g)=>e?a.paymentOutsideZeni.markAsPaid:g===!0?a.retryPayment:y?a.sendForApproval:a.scheduleBill,_e=(e,y,g,A,S)=>g?128:y&&!e&&S==="small"?"auto":A?165:m.footerButtonWidth.value(S),pn=i(en)`
2
2
  width: ${n.sp3};
3
3
  height: ${n.sp3};
4
4
  color: ${e=>e.theme.colors.hero};
@@ -1,4 +1,4 @@
1
- import{J as P,V as i,ac as m,o as r,aT as L,x as d,d as B,c as C,M as I,p as s,an as j,cF as W,L as D,ak as b,bj as R,u as n,ep as G,g as _,j5 as F,ki as J}from"./index-Cq3X29cS.js";import{n as t}from"./mui-DzE-7sTl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new e.Error().stack;g&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[g]="741ffc39-cdbe-4e20-817b-b9f744941898",e._sentryDebugIdIdentifier="sentry-dbid-741ffc39-cdbe-4e20-817b-b9f744941898")}catch{}})();const a={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},A={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:k},onCloseOverlay:E,onCloseReviewItem:M})=>{const l=P();return i.jsxs(V,{children:[i.jsx(X,{windowSize:l,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:l,children:i.jsx(ee,{children:i.jsx(ie,{onClick:E,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(H,{windowSize:l,children:[i.jsxs(q,{windowSize:l,children:[i.jsx(K,{children:i.jsx(N,{windowSize:l,children:e})}),i.jsx(Q,{isError:g.isError,windowSize:l,children:g.content})]}),i.jsx(U,{windowSize:l,children:x.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return i.jsxs(re,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?i.jsx(ce,{onClick:()=>M(o.id),"data-testid":m("review-close",o.id)}):null,i.jsxs(te,{children:[i.jsxs(ne,{children:[i.jsx(de,{children:O(o)}),i.jsxs(oe,{children:[i.jsxs(w,{children:[i.jsx(f,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),i.jsx(f,{isWarning:c,isError:h,children:o.rightSideText.title})]}),i.jsxs(w,{children:[i.jsx(se,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),l!=="small"?i.jsxs(u,{windowSize:l,children:[i.jsx(p,{isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),l==="small"?i.jsxs(u,{windowSize:l,children:[i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),S?i.jsx(L,{primaryBtn:z,cancelBtn:T,showCancel:!k}):null]})},O=e=>e.reviewStatus.isLoading?i.jsx(D,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):e.reviewStatus.code==="error"?i.jsx(y,{isError:!0}):e.reviewStatus.code==="warning"?i.jsx(y,{isError:!1}):e.reviewStatus.code==="valid"?i.jsx(le,{}):e.reviewStatus.code==="low-balance"?i.jsx(he,{}):i.jsx(ae,{}),V=t.div`
1
+ import{J as P,V as i,ac as m,o as r,aT as L,x as d,d as B,c as C,M as I,p as s,an as j,cF as W,L as D,ak as b,bj as R,u as n,ep as G,g as _,j5 as F,ki as J}from"./index-B3hQ50EY.js";import{n as t}from"./mui-DzE-7sTl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new e.Error().stack;g&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[g]="741ffc39-cdbe-4e20-817b-b9f744941898",e._sentryDebugIdIdentifier="sentry-dbid-741ffc39-cdbe-4e20-817b-b9f744941898")}catch{}})();const a={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},A={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:k},onCloseOverlay:E,onCloseReviewItem:M})=>{const l=P();return i.jsxs(V,{children:[i.jsx(X,{windowSize:l,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:l,children:i.jsx(ee,{children:i.jsx(ie,{onClick:E,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(H,{windowSize:l,children:[i.jsxs(q,{windowSize:l,children:[i.jsx(K,{children:i.jsx(N,{windowSize:l,children:e})}),i.jsx(Q,{isError:g.isError,windowSize:l,children:g.content})]}),i.jsx(U,{windowSize:l,children:x.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return i.jsxs(re,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?i.jsx(ce,{onClick:()=>M(o.id),"data-testid":m("review-close",o.id)}):null,i.jsxs(te,{children:[i.jsxs(ne,{children:[i.jsx(de,{children:O(o)}),i.jsxs(oe,{children:[i.jsxs(w,{children:[i.jsx(f,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),i.jsx(f,{isWarning:c,isError:h,children:o.rightSideText.title})]}),i.jsxs(w,{children:[i.jsx(se,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),l!=="small"?i.jsxs(u,{windowSize:l,children:[i.jsx(p,{isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),l==="small"?i.jsxs(u,{windowSize:l,children:[i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),S?i.jsx(L,{primaryBtn:z,cancelBtn:T,showCancel:!k}):null]})},O=e=>e.reviewStatus.isLoading?i.jsx(D,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):e.reviewStatus.code==="error"?i.jsx(y,{isError:!0}):e.reviewStatus.code==="warning"?i.jsx(y,{isError:!1}):e.reviewStatus.code==="valid"?i.jsx(le,{}):e.reviewStatus.code==="low-balance"?i.jsx(he,{}):i.jsx(ae,{}),V=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{eU as b,eV as h,V as s,bV as f,o as a,ac as n,b as g,ap as x,ak as c}from"./index-Cq3X29cS.js";import{n as l}from"./mui-DzE-7sTl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cc6ee2b5-ca25-4bbb-8dcf-7e2a2a48b4e2",e._sentryDebugIdIdentifier="sentry-dbid-cc6ee2b5-ca25-4bbb-8dcf-7e2a2a48b4e2")}catch{}})();const{hyphen:d}=g.getLocalizedStrings().common.strings,y=l.div``,m=l.div`
1
+ import{eU as b,eV as h,V as s,bV as f,o as a,ac as n,b as g,ap as x,ak as c}from"./index-B3hQ50EY.js";import{n as l}from"./mui-DzE-7sTl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cc6ee2b5-ca25-4bbb-8dcf-7e2a2a48b4e2",e._sentryDebugIdIdentifier="sentry-dbid-cc6ee2b5-ca25-4bbb-8dcf-7e2a2a48b4e2")}catch{}})();const{hyphen:d}=g.getLocalizedStrings().common.strings,y=l.div``,m=l.div`
2
2
  display: flex;
3
3
  min-width: 192px;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{aS as K,ix as te,gO as me,eG as we,iy as Me,aa as Ve,iz as _e,cI as Fe,cJ as Pe,V as a,ae as Ne,cs as Re,ct as qe,cu as Be,aT as Ue,iA as We,iB as ze,b as be,ab as pe,iC as Se,iD as $e,cM as Ge,J as Ke,iR as Xe,gU as ue,u as B,p as De,x as ye,cN as He,iE as Ze,iF as Ye,iG as Qe,o as _}from"./index-Cq3X29cS.js";import{a as f}from"./sentry-DQ_HstYV.js";import{n as W}from"./mui-DzE-7sTl.js";import{GR as et,GS as tt}from"./zeni-epic-state-B4gyGBI3.js";import{r as lt,s as at,n as st,i as ot}from"./ScheduleSequenceTable-CCHqmNhS-C5vei5ej.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.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]="69580ecc-51e5-4515-a58c-5435d161b656",e._sentryDebugIdIdentifier="sentry-dbid-69580ecc-51e5-4515-a58c-5435d161b656")}catch{}})();const U={labelWidth:new ye(160,160,160),depCategoryLabelWidth:new ye(200,280,280)},nt=W.div`
1
+ import{aS as K,ix as te,gO as me,eG as we,iy as Me,aa as Ve,iz as _e,cI as Fe,cJ as Pe,V as a,ae as Ne,cs as Re,ct as qe,cu as Be,aT as Ue,iA as We,iB as ze,b as be,ab as pe,iC as Se,iD as $e,cM as Ge,J as Ke,iR as Xe,gU as ue,u as B,p as De,x as ye,cN as He,iE as Ze,iF as Ye,iG as Qe,o as _}from"./index-B3hQ50EY.js";import{a as f}from"./sentry-DQ_HstYV.js";import{n as W}from"./mui-DzE-7sTl.js";import{GR as et,GS as tt}from"./zeni-epic-state-B4gyGBI3.js";import{r as lt,s as at,n as st,i as ot}from"./ScheduleSequenceTable-CCHqmNhS-DXJD_R5L.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.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]="69580ecc-51e5-4515-a58c-5435d161b656",e._sentryDebugIdIdentifier="sentry-dbid-69580ecc-51e5-4515-a58c-5435d161b656")}catch{}})();const U={labelWidth:new ye(160,160,160),depCategoryLabelWidth:new ye(200,280,280)},nt=W.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{aS as _,ix as Q,gO as Ie,eG as Je,iy as we,aa as Le,iz as Me,cI as Ve,cJ as Pe,V as a,ae as Fe,cs as _e,ct as $e,cu as Be,aT as Ne,iA as Re,iB as Ue,b as De,ab as re,iC as pe,iD as ze,cM as We,J as qe,gU as me,u as Z,p as Ge,x as Ke,iE as He,iF as Xe,iG as Ye,o as w}from"./index-Cq3X29cS.js";import{a as D}from"./sentry-DQ_HstYV.js";import{n as P}from"./mui-DzE-7sTl.js";import{GR as Qe,GS as Ze,bL as et}from"./zeni-epic-state-B4gyGBI3.js";import{r as tt,s as lt,n as at,i as st}from"./ScheduleSequenceTable-CCHqmNhS-C5vei5ej.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a1976381-c57d-4d01-a5aa-2676dba20d4d",e._sentryDebugIdIdentifier="sentry-dbid-a1976381-c57d-4d01-a5aa-2676dba20d4d")}catch{}})();const R={labelWidth:new Ke(160,160,160)},nt=P.div`
1
+ import{aS as _,ix as Q,gO as Ie,eG as Je,iy as we,aa as Le,iz as Me,cI as Ve,cJ as Pe,V as a,ae as Fe,cs as _e,ct as $e,cu as Be,aT as Ne,iA as Re,iB as Ue,b as De,ab as re,iC as pe,iD as ze,cM as We,J as qe,gU as me,u as Z,p as Ge,x as Ke,iE as He,iF as Xe,iG as Ye,o as w}from"./index-B3hQ50EY.js";import{a as D}from"./sentry-DQ_HstYV.js";import{n as P}from"./mui-DzE-7sTl.js";import{GR as Qe,GS as Ze,bL as et}from"./zeni-epic-state-B4gyGBI3.js";import{r as tt,s as lt,n as at,i as st}from"./ScheduleSequenceTable-CCHqmNhS-DXJD_R5L.js";import"./liveblocks-hPir54fv.js";import"./core-CCdM5htn.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./utils-wDk5ojg7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a1976381-c57d-4d01-a5aa-2676dba20d4d",e._sentryDebugIdIdentifier="sentry-dbid-a1976381-c57d-4d01-a5aa-2676dba20d4d")}catch{}})();const R={labelWidth:new Ke(160,160,160)},nt=P.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{J as F,y as X,V as t,iH as ie,iI as le,c as oe,iJ as xe,dV as fe,fm as we,w as I,b as R,iK as ye,iG as be,o as i,x as b,p as j,h as $e,ac as je,ab as ne,dP as Se,cs as ke,cu as ve,cM as Z,ey as ee,cR as De,iL as K,iM as Ce,b5 as Me,iN as ze,cw as Oe,iO as Ee,u as h,an as O,bb as Le,ct as Ie,aq as pe,eH as Fe,b3 as re,et as Te,aT as Ae,iP as T,gl as Ve,aQ as Je,iQ as Be,aX as q,d2 as Pe,bj as Re}from"./index-Cq3X29cS.js";import{n as o,c as B}from"./mui-DzE-7sTl.js";import{a as C}from"./sentry-DQ_HstYV.js";import{bh as G,GT as Ne}from"./zeni-epic-state-B4gyGBI3.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]="a66cbe01-d1f0-494f-9c03-f4db306875ec",e._sentryDebugIdIdentifier="sentry-dbid-a66cbe01-d1f0-494f-9c03-f4db306875ec")}catch{}})();const N=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=R.getLocalizedStrings();function We({defaultValue:e,name:l,placeholder:s,alignLeft:n=!1,style:p,isDisabled:r,registerOptions:d,onSaveClick:c,onCancelClick:y}){const[f,u]=C.useState(!1),{control:m,formState:{errors:x},setValue:S}=Z(),v=()=>{k||(c(),u(!1))},w=()=>{y(),u(!1)},k=ee(x,l),g=F(),a=X();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Xe,{style:p,isDisabled:r!=null,windowSize:g,onClick:()=>{!f&&r==null&&u(!0)},children:t.jsx(Fe,{name:N(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(qe,{children:[t.jsx(Ye,{placeholder:s,defaultValue:e,isDisabled:r}),f?t.jsxs(Ke,{alignLeft:n===!0,children:[t.jsx(tt,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(et,{isError:e.type==="day"&&k,children:[t.jsx(re,{label:{label:M.pickDate},radioField:{id:"day",name:N(l,"type"),value:"day",radioSize:"small",checked:e.type==="day"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3,minWidth:"35%"},labelStyle:{color:e.type==="day"&&k?j.important:"inherit"}}),t.jsx(Te,{name:N(l,"dayOfMonth"),type:"number",placeholder:M.placeholder,disableCopyPaste:!0,autoTrim:"trim",onKeyDown:$=>{$.key!=="Backspace"&&isNaN(parseInt($.key))&&$.preventDefault()},defaultValue:e.dayOfMonth!=null&&!isNaN(e.dayOfMonth)?e.dayOfMonth:0,registerOptions:{min:1,max:28},outerDivStyle:{width:"fit-content",marginLeft:i.sp1,marginRight:i.sp1},style:{border:`1px solid ${e.type==="day"&&k?j.important:a.colors.grey2}`,borderRadius:i.sp1,...I.smallRegular.cssObject,padding:i.sp2,maxWidth:"35px",boxSizing:"border-box"}}),t.jsx(Ue,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(He,{defaultValue:e.dayOfMonth,onClick:$=>{S(`${l}.dayOfMonth`,$),S(`${l}.type`,"day")}})]}),t.jsx(it,{}),t.jsx(ae,{isSelected:e.type==="lastDayOfMonth",children:t.jsx(re,{label:{label:M.lastDayOfMonth},radioField:{id:"lastDayOfMonth",name:N(l,"type"),value:"lastDayOfMonth",radioSize:"small",checked:e.type==="lastDayOfMonth"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3},labelStyle:{color:e.type==="lastDayOfMonth"&&k?j.important:"inherit"}})}),t.jsx(Ae,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:_e(e),type:"button",style:{minWidth:"83px"}},cancelBtn:{label:se.footer.cancel,onClick:w,style:{minWidth:"83px"}},style:{position:"unset",backgroundColor:"transparent"}})]}):null]})})})})}function Ye({placeholder:e,defaultValue:l,isDisabled:s}){return t.jsxs(Ge,{isDisabled:s!=null,children:[l?.type==null?t.jsx(Qe,{children:e}):null,l?.type=="day"&&l.dayOfMonth!=null?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth[`${l.dayOfMonth}`]}),t.jsx(W,{children:M.ofEveryMonth})]}):null,l?.type==="lastDayOfMonth"?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth.lastDayOfMonth}),t.jsx(W,{children:M.ofEveryMonth})]}):null]})}function He({defaultValue:e,onClick:l}){return t.jsxs(Ze,{children:[t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+1;return t.jsx(H,{isSelected:n===e,onClick:()=>l(Ne(n)),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+8;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+15;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+22;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})})]})}const _e=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},qe=o.div`
1
+ import{J as F,y as X,V as t,iH as ie,iI as le,c as oe,iJ as xe,dV as fe,fm as we,w as I,b as R,iK as ye,iG as be,o as i,x as b,p as j,h as $e,ac as je,ab as ne,dP as Se,cs as ke,cu as ve,cM as Z,ey as ee,cR as De,iL as K,iM as Ce,b5 as Me,iN as ze,cw as Oe,iO as Ee,u as h,an as O,bb as Le,ct as Ie,aq as pe,eH as Fe,b3 as re,et as Te,aT as Ae,iP as T,gl as Ve,aQ as Je,iQ as Be,aX as q,d2 as Pe,bj as Re}from"./index-B3hQ50EY.js";import{n as o,c as B}from"./mui-DzE-7sTl.js";import{a as C}from"./sentry-DQ_HstYV.js";import{bh as G,GT as Ne}from"./zeni-epic-state-B4gyGBI3.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]="a66cbe01-d1f0-494f-9c03-f4db306875ec",e._sentryDebugIdIdentifier="sentry-dbid-a66cbe01-d1f0-494f-9c03-f4db306875ec")}catch{}})();const N=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=R.getLocalizedStrings();function We({defaultValue:e,name:l,placeholder:s,alignLeft:n=!1,style:p,isDisabled:r,registerOptions:d,onSaveClick:c,onCancelClick:y}){const[f,u]=C.useState(!1),{control:m,formState:{errors:x},setValue:S}=Z(),v=()=>{k||(c(),u(!1))},w=()=>{y(),u(!1)},k=ee(x,l),g=F(),a=X();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Xe,{style:p,isDisabled:r!=null,windowSize:g,onClick:()=>{!f&&r==null&&u(!0)},children:t.jsx(Fe,{name:N(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(qe,{children:[t.jsx(Ye,{placeholder:s,defaultValue:e,isDisabled:r}),f?t.jsxs(Ke,{alignLeft:n===!0,children:[t.jsx(tt,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(et,{isError:e.type==="day"&&k,children:[t.jsx(re,{label:{label:M.pickDate},radioField:{id:"day",name:N(l,"type"),value:"day",radioSize:"small",checked:e.type==="day"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3,minWidth:"35%"},labelStyle:{color:e.type==="day"&&k?j.important:"inherit"}}),t.jsx(Te,{name:N(l,"dayOfMonth"),type:"number",placeholder:M.placeholder,disableCopyPaste:!0,autoTrim:"trim",onKeyDown:$=>{$.key!=="Backspace"&&isNaN(parseInt($.key))&&$.preventDefault()},defaultValue:e.dayOfMonth!=null&&!isNaN(e.dayOfMonth)?e.dayOfMonth:0,registerOptions:{min:1,max:28},outerDivStyle:{width:"fit-content",marginLeft:i.sp1,marginRight:i.sp1},style:{border:`1px solid ${e.type==="day"&&k?j.important:a.colors.grey2}`,borderRadius:i.sp1,...I.smallRegular.cssObject,padding:i.sp2,maxWidth:"35px",boxSizing:"border-box"}}),t.jsx(Ue,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(He,{defaultValue:e.dayOfMonth,onClick:$=>{S(`${l}.dayOfMonth`,$),S(`${l}.type`,"day")}})]}),t.jsx(it,{}),t.jsx(ae,{isSelected:e.type==="lastDayOfMonth",children:t.jsx(re,{label:{label:M.lastDayOfMonth},radioField:{id:"lastDayOfMonth",name:N(l,"type"),value:"lastDayOfMonth",radioSize:"small",checked:e.type==="lastDayOfMonth"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3},labelStyle:{color:e.type==="lastDayOfMonth"&&k?j.important:"inherit"}})}),t.jsx(Ae,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:_e(e),type:"button",style:{minWidth:"83px"}},cancelBtn:{label:se.footer.cancel,onClick:w,style:{minWidth:"83px"}},style:{position:"unset",backgroundColor:"transparent"}})]}):null]})})})})}function Ye({placeholder:e,defaultValue:l,isDisabled:s}){return t.jsxs(Ge,{isDisabled:s!=null,children:[l?.type==null?t.jsx(Qe,{children:e}):null,l?.type=="day"&&l.dayOfMonth!=null?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth[`${l.dayOfMonth}`]}),t.jsx(W,{children:M.ofEveryMonth})]}):null,l?.type==="lastDayOfMonth"?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth.lastDayOfMonth}),t.jsx(W,{children:M.ofEveryMonth})]}):null]})}function He({defaultValue:e,onClick:l}){return t.jsxs(Ze,{children:[t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+1;return t.jsx(H,{isSelected:n===e,onClick:()=>l(Ne(n)),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+8;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+15;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const n=s+22;return t.jsx(H,{isSelected:n===e,onClick:()=>l(n),children:n},n)})})]})}const _e=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},qe=o.div`
2
2
  position: relative;
3
3
  `,Ge=o.div`
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{EF as Xf,EG as Lt,EH as Qf,iN as ot,hv as ql,iP as Ye,hs as eh,hz as Ll,EI as Pa,hB as th,hC as rh,EJ as Gt,EK as kt,h0 as nh,EL as xr,EM as ta,cO as ih,f2 as ra,e$ as Ir,f7 as rt,f5 as oh,EN as kl,EO as Nl,hQ as ah,hN as sh,EP as uh,h$ as ch,hW as ja,hT as lh,hI as fh,EQ as hh,dJ as dh,cU as ph,i$ as Dl,ER as mh,bL as Tr,hF as xa,hK as gh,pt as Ml,iO as qr,ES as Ne,ib as na,ET as yh,j5 as vh,B as Re,EU as ia,EV as bh,gZ as wh,EW as Eh,EX as Fl,EY as Sh,o1 as qa,ny as _h,EZ as Rh,nE as Zr,E_ as Oh,nG as Th,E$ as Ze,nv as Ih,cB as Ah,iS as Ul,iT as Bl,iR as oa,iQ as aa,iU as Ch,F0 as Ph,o4 as jh,F1 as xh,nN as qh,n_ as Lh,F2 as kh,nR as Nh,F3 as Dh,F4 as _t,F5 as sa,F6 as Mh,F7 as Fh,my as Uh,mE as $l,F8 as Vl,gu as Bh,DL as Gl,F9 as $h,DF as Vh,Fa as Gh,Fb as Hh,mH as zh,Fc as Zh,DQ as Wh,DE as Yh,q_ as Hl,Fd as Wr,Fe as zl,AQ as ua,AC as Jh,AT as Zl,AF as Kh,Ff as Xh,AK as Qh,Aw as ed,Az as td,Fg as rd,AX as nd,AN as id,c4 as od,bd as ad,Fh as sd,Fi as ft,Fj as ud,Fk as cd,Fl as ld,i3 as Ko,ba as fd}from"./zeni-epic-state-B4gyGBI3.js";import{j as N}from"./liveblocks-hPir54fv.js";import{a as Y,p as X,d as Wl,c as Yl,g as hd}from"./sentry-DQ_HstYV.js";import{U as dd,y as dt,J as Lr,i as pd,j as pe,z as be,G as md,l as gd,x as Pe,k as kr,m as yd,R as Je,b as Nt,q as pt,r as at,L as Nr,o as tt,C as vd,s as bd,P as nt,I as ca,E as it,t as wd,v as Ed,u as Yr,A as Sd,B as Jl,D as _d,F as Kl,H as Xl,K as Xo,N as Rd,Q as Od,S as Td,_ as Ql,T as Id,W as Ad,X as Cd,Y as Pd,Z as jd,$ as xd,a0 as qd,a1 as Ld,a2 as kd,a3 as Nd,a4 as Dd,a5 as Md,a6 as Fd}from"./index-Cq3X29cS.js";import{f as Ud}from"./analyticsHelper-BROaWFlP.js";import{n as ef,i as me,m as Ee,o as je,g as re,h as ge,N as Pt,R as Ve,k as se,u as la,j as Qo}from"./core-CCdM5htn.js";import{D as Dr,n as Te,S as mt}from"./mui-DzE-7sTl.js";import{a as ve,b as Bd,c as $d,d as Vd,e as fa,f as Gd,g as Hd,h as zd,i as gt,j as Zd,k as xt,l as Mr,m as Wd,n as Dt,o as Yd}from"./utils-wDk5ojg7.js";import{r as ha}from"./empty-21UCvCWa.js";import{r as Jd,a as Kd,b as Xd,c as Qd}from"./constants-cBgt-jnp.js";import{r as Mt,a as ep}from"./index-8HE4yJ5t.js";import{r as tp}from"./index-DBail5F5.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./url-vYaM0QEj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b373c607-8a94-4a6d-8445-e8b1972187a3",e._sentryDebugIdIdentifier="sentry-dbid-b373c607-8a94-4a6d-8445-e8b1972187a3")}catch{}})();const st=()=>{const[e,n]=ef(),[a,o]=Y.useState(),i=Y.useRef(!1);return Y.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const r=dd(e);r!=null&&o(r);const s=new URLSearchParams(e);s.delete("thread_id"),s.delete("entity_type"),s.delete("company_id"),n(s,{replace:!0}),i.current=!0},[e,n]),a},rp={overlayWidth:new Pe(100,100,50)},{common:{strings:La}}=Nt.getLocalizedStrings();function np(e,n){return{headerActions:{onTabChange:a=>{const o=at(a),i=pt(a);pe.trackCockpitTabClicked(i),n.navigate(`../../${o}`,{replace:!0})},filterActions:{onFilterTextChanged:(a,o)=>{e(Gt({uiState:{filterText:o}}))},onFiltersChange:(a,o)=>{o.categories!=null&&o.categoryCombinationOperator!=null&&pe.trackHealthMonitorFiltersApplied({filterSelection:{condition:o.categories.map(i=>i.matchingOperator).join(La.comma),logic:o.categoryCombinationOperator,parameter:o.categories.map(i=>i.field).join(La.comma)}}),e(Gt({uiState:{filters:o}}))}}},healthPageActions:{onRowClick:a=>{e(Ll(a))},onColumnSortConfigChanged:(a,o)=>{e(Gt({uiState:{sortKey:a,sortOrder:o}}))},onCockpitReloadData:a=>{a==="healthMonitor"&&e(ql())},onFiltersChange:a=>{e(Gt({uiState:{filters:a}}))}}}}function ip(e,n){return{headerData:{selectedTabOption:Je("healthMonitor")},healthPageData:{healthView:n.healthView,managementView:n.managementView,mixpanelUrl:n.mixpanelHMUrl}}}const op=ge(ip,np)(yd);function Jr({isDrawerOpen:e}){const n=me(),a=Ee(),o=dt(),i=Lr(),{companyId:t}=je(),[r,s]=ef(),[d,c]=Y.useState(!1),h=st(),f=re(m=>Xf(m)),l=re(m=>Lt(m)),{additionalChurnFactors:b}=re(m=>Qf(m)),{selectedCompanyDetail:p,selectedCompanyId:y,localFormDataAndStatusByCompanyId:g}=f,u=re(m=>m.companyViewState.zeniUsers.fetchState),v=re(m=>m.companyHealthMetricConfigViewState);if(Y.useEffect(()=>{const m=E=>E==="Not-Started"||E==="Error";f.fetchState==="Completed"?a(ot(!1)):m(f.fetchState)&&(a(ql()),m(u)&&a(Ye()),m(v.fetchState)&&a(eh()))},[f.fetchState,v.fetchState]),Y.useEffect(()=>{t!=null&&f.fetchState==="Completed"&&r.has("utm_source")===!0&&(a(Ll(t)),p!=null&&(pd(),pe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:p.companyInfo.companyId,companyName:p.companyInfo.name,churnProbability:p.companyHealthMetric.churnProbabilityPercentage??null}),c(!0),r.delete("utm_source"),s(r)))},[f.fetchState,p?.companyInfo.companyId,p?.companyInfo.name]),be.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return N.jsxs(N.Fragment,{children:[e===!0||y!=null&&p!=null?N.jsx(Dr,{anchor:"right",open:y!=null,PaperProps:{style:{width:rp.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a(Pa()),children:N.jsx(md,{roomId:`cockpit_${y}`,autoConnect:!0,children:N.jsx(gd,{onSaveClick:()=>{y!=null&&a(rh(y))},onSaveChangesToLocalStore:m=>{f.selectedCompanyId!=null&&a(th({companyId:f.selectedCompanyId,updatedLocalData:m}))},localData:g?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:f,onCloseDrawer:()=>a(Pa()),analytics:pe,urlSource:d,additionalChurnFactorsOptions:b})})}):null,N.jsx(op,{initialOpenThreadRequest:h??void 0,healthView:f,managementView:l,navigate:n,mixpanelHMUrl:kr.mixpanelHMUrl})]})}const tf=(e,n)=>{const a=[...e??[]];return a.push(n),a},ap=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},sp=(e=2)=>{let n="../";for(let a=0;a<e;a++)n=`${n}../`;return n},le=({state:e,element:n})=>be.isSignedIn()===!0?N.jsx(N.Fragment,{children:n}):N.jsx(Pt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function up(){return N.jsxs(Ve,{children:[N.jsx(se,{path:"/companies/:companyId",element:N.jsx(le,{element:N.jsx(Jr,{isDrawerOpen:!0})})}),N.jsx(se,{path:"/",element:N.jsx(le,{element:N.jsx(Jr,{})})}),N.jsx(se,{path:"/*",element:N.jsx(le,{element:N.jsx(Jr,{})})})]})}const cp={drawerLeftMargin:new Pe(0,0,240)};function Ft(e){const{isOpen:n,drawerLeftMargin:a,children:o,onClose:i}=e,t=Lr(),r=a?.valuePx(t)??cp.drawerLeftMargin.valuePx(t),s=dt();return N.jsx(Dr,{anchor:"right",open:n,PaperProps:{style:{width:`calc(100% - ${r})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:o})}const lp=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?N.jsx(fp,{children:N.jsx(Nr,{size:"ExtraLarge",start:!0})}):null,fp=Te.div`
1
+ import{EF as Xf,EG as Lt,EH as Qf,iN as ot,hv as ql,iP as Ye,hs as eh,hz as Ll,EI as Pa,hB as th,hC as rh,EJ as Gt,EK as kt,h0 as nh,EL as xr,EM as ta,cO as ih,f2 as ra,e$ as Ir,f7 as rt,f5 as oh,EN as kl,EO as Nl,hQ as ah,hN as sh,EP as uh,h$ as ch,hW as ja,hT as lh,hI as fh,EQ as hh,dJ as dh,cU as ph,i$ as Dl,ER as mh,bL as Tr,hF as xa,hK as gh,pt as Ml,iO as qr,ES as Ne,ib as na,ET as yh,j5 as vh,B as Re,EU as ia,EV as bh,gZ as wh,EW as Eh,EX as Fl,EY as Sh,o1 as qa,ny as _h,EZ as Rh,nE as Zr,E_ as Oh,nG as Th,E$ as Ze,nv as Ih,cB as Ah,iS as Ul,iT as Bl,iR as oa,iQ as aa,iU as Ch,F0 as Ph,o4 as jh,F1 as xh,nN as qh,n_ as Lh,F2 as kh,nR as Nh,F3 as Dh,F4 as _t,F5 as sa,F6 as Mh,F7 as Fh,my as Uh,mE as $l,F8 as Vl,gu as Bh,DL as Gl,F9 as $h,DF as Vh,Fa as Gh,Fb as Hh,mH as zh,Fc as Zh,DQ as Wh,DE as Yh,q_ as Hl,Fd as Wr,Fe as zl,AQ as ua,AC as Jh,AT as Zl,AF as Kh,Ff as Xh,AK as Qh,Aw as ed,Az as td,Fg as rd,AX as nd,AN as id,c4 as od,bd as ad,Fh as sd,Fi as ft,Fj as ud,Fk as cd,Fl as ld,i3 as Ko,ba as fd}from"./zeni-epic-state-B4gyGBI3.js";import{j as N}from"./liveblocks-hPir54fv.js";import{a as Y,p as X,d as Wl,c as Yl,g as hd}from"./sentry-DQ_HstYV.js";import{U as dd,y as dt,J as Lr,i as pd,j as pe,z as be,G as md,l as gd,x as Pe,k as kr,m as yd,R as Je,b as Nt,q as pt,r as at,L as Nr,o as tt,C as vd,s as bd,P as nt,I as ca,E as it,t as wd,v as Ed,u as Yr,A as Sd,B as Jl,D as _d,F as Kl,H as Xl,K as Xo,N as Rd,Q as Od,S as Td,_ as Ql,T as Id,W as Ad,X as Cd,Y as Pd,Z as jd,$ as xd,a0 as qd,a1 as Ld,a2 as kd,a3 as Nd,a4 as Dd,a5 as Md,a6 as Fd}from"./index-B3hQ50EY.js";import{f as Ud}from"./analyticsHelper-DmCNU5zy.js";import{n as ef,i as me,m as Ee,o as je,g as re,h as ge,N as Pt,R as Ve,k as se,u as la,j as Qo}from"./core-CCdM5htn.js";import{D as Dr,n as Te,S as mt}from"./mui-DzE-7sTl.js";import{a as ve,b as Bd,c as $d,d as Vd,e as fa,f as Gd,g as Hd,h as zd,i as gt,j as Zd,k as xt,l as Mr,m as Wd,n as Dt,o as Yd}from"./utils-wDk5ojg7.js";import{r as ha}from"./empty-21UCvCWa.js";import{r as Jd,a as Kd,b as Xd,c as Qd}from"./constants-cBgt-jnp.js";import{r as Mt,a as ep}from"./index-8HE4yJ5t.js";import{r as tp}from"./index-DBail5F5.js";import"./recharts-CiLmNGsl.js";import"./lottie-B9oE3WTk.js";import"./analytics-BxsZVqMD.js";import"./lexical-BfjdJw9p.js";import"./url-vYaM0QEj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b373c607-8a94-4a6d-8445-e8b1972187a3",e._sentryDebugIdIdentifier="sentry-dbid-b373c607-8a94-4a6d-8445-e8b1972187a3")}catch{}})();const st=()=>{const[e,n]=ef(),[a,o]=Y.useState(),i=Y.useRef(!1);return Y.useEffect(()=>{if(i.current===!0||!(e.has("thread_id")||e.has("entity_type")||e.has("company_id")))return;const r=dd(e);r!=null&&o(r);const s=new URLSearchParams(e);s.delete("thread_id"),s.delete("entity_type"),s.delete("company_id"),n(s,{replace:!0}),i.current=!0},[e,n]),a},rp={overlayWidth:new Pe(100,100,50)},{common:{strings:La}}=Nt.getLocalizedStrings();function np(e,n){return{headerActions:{onTabChange:a=>{const o=at(a),i=pt(a);pe.trackCockpitTabClicked(i),n.navigate(`../../${o}`,{replace:!0})},filterActions:{onFilterTextChanged:(a,o)=>{e(Gt({uiState:{filterText:o}}))},onFiltersChange:(a,o)=>{o.categories!=null&&o.categoryCombinationOperator!=null&&pe.trackHealthMonitorFiltersApplied({filterSelection:{condition:o.categories.map(i=>i.matchingOperator).join(La.comma),logic:o.categoryCombinationOperator,parameter:o.categories.map(i=>i.field).join(La.comma)}}),e(Gt({uiState:{filters:o}}))}}},healthPageActions:{onRowClick:a=>{e(Ll(a))},onColumnSortConfigChanged:(a,o)=>{e(Gt({uiState:{sortKey:a,sortOrder:o}}))},onCockpitReloadData:a=>{a==="healthMonitor"&&e(ql())},onFiltersChange:a=>{e(Gt({uiState:{filters:a}}))}}}}function ip(e,n){return{headerData:{selectedTabOption:Je("healthMonitor")},healthPageData:{healthView:n.healthView,managementView:n.managementView,mixpanelUrl:n.mixpanelHMUrl}}}const op=ge(ip,np)(yd);function Jr({isDrawerOpen:e}){const n=me(),a=Ee(),o=dt(),i=Lr(),{companyId:t}=je(),[r,s]=ef(),[d,c]=Y.useState(!1),h=st(),f=re(m=>Xf(m)),l=re(m=>Lt(m)),{additionalChurnFactors:b}=re(m=>Qf(m)),{selectedCompanyDetail:p,selectedCompanyId:y,localFormDataAndStatusByCompanyId:g}=f,u=re(m=>m.companyViewState.zeniUsers.fetchState),v=re(m=>m.companyHealthMetricConfigViewState);if(Y.useEffect(()=>{const m=E=>E==="Not-Started"||E==="Error";f.fetchState==="Completed"?a(ot(!1)):m(f.fetchState)&&(a(ql()),m(u)&&a(Ye()),m(v.fetchState)&&a(eh()))},[f.fetchState,v.fetchState]),Y.useEffect(()=>{t!=null&&f.fetchState==="Completed"&&r.has("utm_source")===!0&&(a(Ll(t)),p!=null&&(pd(),pe.trackCockpitHealthMonitorNotificationAlertClicked({companyId:p.companyInfo.companyId,companyName:p.companyInfo.name,churnProbability:p.companyHealthMetric.churnProbabilityPercentage??null}),c(!0),r.delete("utm_source"),s(r)))},[f.fetchState,p?.companyInfo.companyId,p?.companyInfo.name]),be.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return N.jsxs(N.Fragment,{children:[e===!0||y!=null&&p!=null?N.jsx(Dr,{anchor:"right",open:y!=null,PaperProps:{style:{width:rp.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>a(Pa()),children:N.jsx(md,{roomId:`cockpit_${y}`,autoConnect:!0,children:N.jsx(gd,{onSaveClick:()=>{y!=null&&a(rh(y))},onSaveChangesToLocalStore:m=>{f.selectedCompanyId!=null&&a(th({companyId:f.selectedCompanyId,updatedLocalData:m}))},localData:g?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:f,onCloseDrawer:()=>a(Pa()),analytics:pe,urlSource:d,additionalChurnFactorsOptions:b})})}):null,N.jsx(op,{initialOpenThreadRequest:h??void 0,healthView:f,managementView:l,navigate:n,mixpanelHMUrl:kr.mixpanelHMUrl})]})}const tf=(e,n)=>{const a=[...e??[]];return a.push(n),a},ap=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},sp=(e=2)=>{let n="../";for(let a=0;a<e;a++)n=`${n}../`;return n},le=({state:e,element:n})=>be.isSignedIn()===!0?N.jsx(N.Fragment,{children:n}):N.jsx(Pt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function up(){return N.jsxs(Ve,{children:[N.jsx(se,{path:"/companies/:companyId",element:N.jsx(le,{element:N.jsx(Jr,{isDrawerOpen:!0})})}),N.jsx(se,{path:"/",element:N.jsx(le,{element:N.jsx(Jr,{})})}),N.jsx(se,{path:"/*",element:N.jsx(le,{element:N.jsx(Jr,{})})})]})}const cp={drawerLeftMargin:new Pe(0,0,240)};function Ft(e){const{isOpen:n,drawerLeftMargin:a,children:o,onClose:i}=e,t=Lr(),r=a?.valuePx(t)??cp.drawerLeftMargin.valuePx(t),s=dt();return N.jsx(Dr,{anchor:"right",open:n,PaperProps:{style:{width:`calc(100% - ${r})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:o})}const lp=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?N.jsx(fp,{children:N.jsx(Nr,{size:"ExtraLarge",start:!0})}):null,fp=Te.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100%;