@zeniai/web-cockpit-ui 1.14.62-dev → 1.14.63-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/assets/{ACHDetailsPage-C9GD0hCH-wcmQ_I_w.js → ACHDetailsPage-QkOAxB4j-BwmsngrU.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-B0Adp0wg-BRw7cYj4.js → AIPerformancePage-POiv6dgZ-BKgnVS14.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-BSxUquf3-Cq3qTjcH.js → AccountInfoPage-DpzAjyd0-CKJdFzLl.js} +3 -3
  4. package/dist/assets/{AccountInfoPageContent-8V3PDzEc-BlV15_jy.js → AccountInfoPageContent-BrPhtN53-CjBlOxg5.js} +15 -15
  5. package/dist/assets/{AccountLockedInfoModal-7bhpExx3-DJKdkKXd.js → AccountLockedInfoModal-D1ZHYvRy-C9tYFXcu.js} +4 -4
  6. package/dist/assets/{AccountReconDetailsDrawerPage-jTH8M9iA-CMGLbrVx.js → AccountReconDetailsDrawerPage-CubIO376-CtKM65LB.js} +12 -12
  7. package/dist/assets/{AccountRow-BpoPw0Cq-PxbfVOGF.js → AccountRow-DTdcfEa8-U3MpTECA.js} +12 -12
  8. package/dist/assets/{AccountsPromoCardStack-gsG5tf8_-DWo1I6r8.js → AccountsPromoCardStack-CwDbKaNJ-1hCsTiEX.js} +9 -9
  9. package/dist/assets/{AddAddressForCardDrawer-CMF3Il-u-Dg_CMfGn.js → AddAddressForCardDrawer-CniAAcX8-D363vOD8.js} +2 -2
  10. package/dist/assets/{AddToWalletPage-CpWP7Kpn-oyevXfMf.js → AddToWalletPage-DOG6ubAY-BGRDDIey.js} +12 -12
  11. package/dist/assets/{AgingReportsPage-DEQ2pO0Y-B_El_7jI.js → AgingReportsPage-Dbtn1PKG-CbUghZ5Y.js} +5 -5
  12. package/dist/assets/{AllUserItems-D0SR0Oue-C_Mnq_2_.js → AllUserItems-Dth5Uovp-tGFNdHax.js} +6 -6
  13. package/dist/assets/{ApAgingDetailPage-BA-wKCiF-DoDUWxWK.js → ApAgingDetailPage-C6C-aYG7-Dbv3SH4D.js} +2 -2
  14. package/dist/assets/{AppBasePage-DFn4TCyI-BVuiMG50.js → AppBasePage-CtnXt_EV-BSPuX6dn.js} +6 -6
  15. package/dist/assets/{AppDrawerContent-CBG4Ybue-1CDBllQE.js → AppDrawerContent-DnrQdYVp-D2qog1EV.js} +2 -2
  16. package/dist/assets/{ApprovalRulesSettingsPage-CpjHazzI-CsBcR4Oy.js → ApprovalRulesSettingsPage-BEOQl822-CbUsx0mD.js} +4 -4
  17. package/dist/assets/{ArAgingChart-BDISnDae-DNBj0-9L.js → ArAgingChart-B9rpCcBM-q8jdb__E.js} +5 -5
  18. package/dist/assets/{ArAgingDetailPage-Cgqf_0fL-CU471vpq.js → ArAgingDetailPage-BKsCQCpu-jNIcx6Tl.js} +1 -1
  19. package/dist/assets/{AttachmentView-X1k01Vtr-BZZUcPOE.js → AttachmentView-DEE6AWkv-B1086jMd.js} +1 -1
  20. package/dist/assets/{BankAccountSection-CrxSDsgw-BPSLHakI.js → BankAccountSection-D8_5fjrd-BCE6WYWF.js} +4 -4
  21. package/dist/assets/{BankAccountWarningSection-Dpt8yOKi-BO8G0nmG.js → BankAccountWarningSection-CMrRr8aa-BT7FUFGR.js} +7 -7
  22. package/dist/assets/{BankConnectionsSettingsPage-Uzhaoi7g-Bcdti6AO.js → BankConnectionsSettingsPage-BUwkPoK_-Baxx5R77.js} +41 -41
  23. package/dist/assets/{BillDetailPage-DcyikS7i-dCdg2EaC.js → BillDetailPage-DcGxex6B-g3MH8yQi.js} +10 -10
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-aM8F15Nu-ackUtbJ8.js → BillPayApprovalRuleDetailPage-B4OuTcAA-Bkq-QU-5.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-B46FwPVR-Bv9k8Xtu.js → BillPayApprovalRulesPage-DaCdVMRx-DKi7a9ar.js} +4 -4
  26. package/dist/assets/{BillPayPromoPage-DtVzdlsy-Bd5M4tTJ.js → BillPayPromoPage-DBlGsv9D-BevFRtNT.js} +8 -8
  27. package/dist/assets/{BillPaySetUpPage-BKdNiQf7-BvAzvMev.js → BillPaySetUpPage-A4zcT_mP-BkNiC1Xc.js} +2 -2
  28. package/dist/assets/{BillingSettingsPage-3AgPTFzN-deJJWYq4.js → BillingSettingsPage-CujTn-BW-DGU5_gJ4.js} +1 -1
  29. package/dist/assets/BillsBulkReviewDrawerPage-Cs779Xc4-D5R5rhwS.js +1 -0
  30. package/dist/assets/{BoxItem-Dsoq6QyZ-D7NZjkdf.js → BoxItem-imggFWL_-C8e_yZct.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-DSkBV_II-DSCAr_Go.js → BusinessVerificationPage-U_lU2O0k-B63nfdcn.js} +4 -4
  32. package/dist/assets/{CardNumberSubText-Crk5WDQr-D42xv8Vo.js → CardNumberSubText-Ct0mJOMk-DQXdeyZe.js} +2 -2
  33. package/dist/assets/{CashbackDetailPage-BZAFRMGW-CBzh2ZdI.js → CashbackDetailPage-GMncsgDy-DzCIgTYK.js} +17 -17
  34. package/dist/assets/ChargeCardDetailPage-BQvjt_rh-Dc8yPFPr.js +1462 -0
  35. package/dist/assets/{ChargeCardListPage-CIV1XQK1-BsJ1Un8U.js → ChargeCardListPage-BJgzJ53p-D4N85pU_.js} +9 -9
  36. package/dist/assets/{ChargeCardListTable-Dxn8Y17P-BLWbpWSy.js → ChargeCardListTable-BD4N2FtO-DrTuKtln.js} +49 -49
  37. package/dist/assets/{ChargeCardPromoPage-B6yTGsIY-CaVyUdrp.js → ChargeCardPromoPage-BQMfHfHp-DuUPUl6t.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-HHFdpsmJ-BZfvUbrB.js → ChargeCardSetupPage-DO1cXZF4-CWlYdj31.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-tuV67f3k-0CxnC-oz.js → ChargeCardStatementsPage-0rBvkIU1-NpKk50PX.js} +5 -5
  40. package/dist/assets/ChargeCardUtils-Cy5rZlIH-BILI0sIl.js +1 -0
  41. package/dist/assets/{ChaseOverlay-B2pqFXTT-BWakvkAR.js → ChaseOverlay-Dqg_bWdn-C8vTlyWM.js} +6 -6
  42. package/dist/assets/{CheckDepositDrawerPage-DDXZ3m54-CXBK2nJg.js → CheckDepositDrawerPage-BzzWhLjb-CVED41XL.js} +15 -15
  43. package/dist/assets/{CollapsableReportTable-BLDh7Osv-ox-qsXy2.js → CollapsableReportTable-CwhNUlX5-CGrdBCh6.js} +1 -1
  44. package/dist/assets/{CompanyOfficerDetailsSection-Dg3sn5Sh-BTBTOsDr.js → CompanyOfficerDetailsSection-BHXF7g6M-BrZ1ZKbF.js} +1 -1
  45. package/dist/assets/{CompanyPassportCard-2HnVDVVi-dxhiiZQi.js → CompanyPassportCard-Dd4Modb9-C23aPg6a.js} +6 -6
  46. package/dist/assets/{CompanyPassportPage-DlGllnaL-u0Oh4-Ab.js → CompanyPassportPage-Bh2JSIAW-rjC4pxXL.js} +20 -20
  47. package/dist/assets/{CompleteProfile-kFGIESms-CDZ04UbG.js → CompleteProfile-CAtziP70-DuSPFP1s.js} +1 -1
  48. package/dist/assets/{ConfettiBurst-D5IgJ5P3-DI0WARwG.js → ConfettiBurst-DvSGcRZX-C_PjMyTg.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-D8IFFcdA-BWjjY2FD.js → CreateOrEditVendorPage-Csorfbun-CNt6xuOL.js} +9 -9
  50. package/dist/assets/{CreditCardPaymentDrawerPage-Xu0psAw0-DRgPLpcF.js → CreditCardPaymentDrawerPage-DAw1GyrP-BNs6qoGC.js} +12 -12
  51. package/dist/assets/{CreditCardPaymentPlgSection-CqvgalYj-CACGNzop.js → CreditCardPaymentPlgSection-HikR7OVv-BCZXDr8I.js} +6 -6
  52. package/dist/assets/{CurrencySelectField-hwgVPqTt-CZrVpTrr.js → CurrencySelectField-BW71th1E-DHxO3UVa.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingActivationPage-CBFhWSJz-BUJvmXrh.js → CustomerOnboardingActivationPage-t4YirGGH-BQcXqlYq.js} +7 -7
  54. package/dist/assets/CustomerOnboardingContainerPage-BFE2DU3a-C9v_itD5.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-B2q2tdnD-Bp78peNj.js → CustomerOnboardingDetailPageSkeleton-CWWXhhJn-DacLmheB.js} +10 -10
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-BsNq90nq-_3KuDz4_.js → CustomerOnboardingNoStepsPage-YdWEMnwL-BhhMIya_.js} +2 -2
  57. package/dist/assets/{CustomerOnboardingPage-BbGV3jtT-DCZddKCA.js → CustomerOnboardingPage-C-WAF_MK-0e07LkOq.js} +5 -5
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-R2PJEOqZ-BqHqYyVu.js → CustomerOnboardingProductSuitePage-CxwXw5lA-8eL0zyfM.js} +10 -10
  59. package/dist/assets/{Dashboard-Cw4u8_9e-CNVcyr2a.js → Dashboard-Cp0UY0M3-DrmBKQin.js} +1 -1
  60. package/dist/assets/{DashboardReportPage-ls_MMfAh-ku8msjfd.js → DashboardReportPage-Bsr_1Vfu-CrZaa5CE.js} +6 -6
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-C_9jGJQn-DjB0cTYb.js → DashboardSidebarBackgroundAnimation-BvgNiAXF-CXiqzdPm.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-BLgpyexV-BUif7HBg.js → DepositAccTransactionItem-Cm5lhc_H-Db7mfK10.js} +2 -2
  63. package/dist/assets/{DepositAccTransactionListPage-r4UVSUOl-jIySug5o.js → DepositAccTransactionListPage-CHwS-_Nr-DFBxFwkp.js} +3 -3
  64. package/dist/assets/{DomesticWireDetailsPage-BSXsHwf5-nZMW9ya5.js → DomesticWireDetailsPage-mqJgiAC--4FLLq-KS.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-DKpj3Vwl-DX_ZKzvM.js → DownloadOverlay-DwPR_SsY-EUTGOsKd.js} +21 -21
  66. package/dist/assets/{DrawerPage-Cxz5I3Mb-DWCpAx75.js → DrawerPage-CR2L2ry3-DOZs2EHb.js} +14 -14
  67. package/dist/assets/{EditPeoplePage-Dbsa013z-C87B1cPM.js → EditPeoplePage-DiNxeKXK-BiaRAv0O.js} +5 -5
  68. package/dist/assets/{EditReimbursementDetailPage-Clpj3Hjz-De3HxU8I.js → EditReimbursementDetailPage-5TJ4Spw1-CpwzkfQj.js} +64 -64
  69. package/dist/assets/{EntityDetailPage-C73BtWIp-Cr_6Sl3E.js → EntityDetailPage-CYDIH-NA-wQQfd0jW.js} +3 -3
  70. package/dist/assets/{EntitySummarySection-BQA0g-pF-C1PbnddD.js → EntitySummarySection-Cv7t21-t-DI0hIJYP.js} +5 -5
  71. package/dist/assets/{ExpenseAutomationOverviewPage-BxEr0k8F-CUbCOzoq.js → ExpenseAutomationOverviewPage-Cwl9dV2--DfcmKBVV.js} +17 -17
  72. package/dist/assets/{ExpenseAutomationPage-BS4M9nkW-DYAXIB9M.js → ExpenseAutomationPage-LMBRJxAv-Vn9lo85n.js} +26 -26
  73. package/dist/assets/{ExpressPayPage-Buxb2M1i-DC3wux1h.js → ExpressPayPage-CCF0jSlI-C7_sWp9b.js} +6 -6
  74. package/dist/assets/{FeaturePreviewPage-ClfFYnHb-BfGEfVGQ.js → FeaturePreviewPage-POKsqSnu-BhWwdsL7.js} +2 -2
  75. package/dist/assets/{FollowStepsSection-CkQ-g4YK-GLs0gIYR.js → FollowStepsSection-BZdlZelr-Dgb2aUZZ.js} +21 -21
  76. package/dist/assets/{GlobalReviewListPage-C_DbsHsA-Bi1oO-Mz.js → GlobalReviewListPage-BnmMh-Bc-CYAA0kUn.js} +13 -13
  77. package/dist/assets/{HelpButton-B0ZBXPeh-zSwt_svY.js → HelpButton-Cp2LXxyy-C5Y06Y1n.js} +4 -4
  78. package/dist/assets/{InformationCardStack-DYdCt7zr-DhV-r4Uj.js → InformationCardStack-CiYqiW7_-CbY8PLVD.js} +4 -4
  79. package/dist/assets/{InsightsCardStack-BSHQznep-CWR7qCJZ.js → InsightsCardStack-BnVrehfR-CN-oMur2.js} +2 -2
  80. package/dist/assets/{InsightsSection-C37BKIiK-KVt8i2oW.js → InsightsSection-BpVW6ov6-CBRdcxmz.js} +5 -5
  81. package/dist/assets/{IntegrationsSettingsPage-DHAdlHrq-Bqfn2ev2.js → IntegrationsSettingsPage-CaAahFPb-BYVW6C7U.js} +8 -8
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-B64WNt28-D1_PuT1L.js → InternationalWireSwiftDetailsPage-DcwbldkC-BB32EMRa.js} +8 -8
  83. package/dist/assets/{InternationalWireVerificationPage-D7ttGovC-BKd-ehNA.js → InternationalWireVerificationPage-7XDbU2GY-Dyfkxo3B.js} +7 -7
  84. package/dist/assets/{InviteFormPage-BhbGM4dC-CzvXIR5_.js → InviteFormPage-Dgv7jdgF-DVviW_Nt.js} +1 -1
  85. package/dist/assets/{InvitePageListView-CyRlLv60-CnnQlGla.js → InvitePageListView-DlpINjRJ-BMeTuOsJ.js} +11 -11
  86. package/dist/assets/InvitePeoplePage-0YsY4Il7-B0pE52_Y.js +12 -0
  87. package/dist/assets/{InvoiceUploadSection-BPPgbS-r-DsP3dMQH.js → InvoiceUploadSection-DzzjJVfz-KKaBZftU.js} +5 -5
  88. package/dist/assets/{IssueChargeCardPage-D_qQkkfo-B3Igv8Wu.js → IssueChargeCardPage-BeB9egJS-Buw9rvK5.js} +20 -20
  89. package/dist/assets/{LabeledAddressValue-EshVNGGW-BdxJWtKx.js → LabeledAddressValue-D6advpnC-6YH6AS3A.js} +1 -1
  90. package/dist/assets/{LabeledAddressValueField-kgieouBM-C9jRpERl.js → LabeledAddressValueField-DRBoA2eb-CWryzMa2.js} +2 -2
  91. package/dist/assets/{LabeledControlledCheckBoxField-CWABc6OK-HO6-gxJI.js → LabeledControlledCheckBoxField-Bu2WHgAQ-BgnuqupP.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-B5o1KUJj-BQcKTXHX.js → LabeledCreatableSingleSelectField-DcdF286I-C7Y6s3yv.js} +7 -7
  93. package/dist/assets/{LabeledDocumentField-BrXpwWfM-8fIPpLS4.js → LabeledDocumentField-B25RLa6I-jFD7YVyX.js} +1 -1
  94. package/dist/assets/{LabeledDropDownFormattedTextField-Cepl3y9a-W2a_RnbU.js → LabeledDropDownFormattedTextField-DoK5Zfc1-HbMH9wCe.js} +1 -1
  95. package/dist/assets/{LabeledText-BmFLymPb-D8x81Lh_.js → LabeledText-depbwNsM-DXrsYHkA.js} +1 -1
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CBbnTiwl-DBx8kYuJ.js → LabeledUserSingleSelectWithSubtitlesField-BURpXN_N-Xj7wxd7w.js} +8 -8
  97. package/dist/assets/{LabeledZeniRolesDropDownField-Da9mc-0B-BJ1z3EeH.js → LabeledZeniRolesDropDownField-TbyaA8M3-DTROc_uU.js} +7 -7
  98. package/dist/assets/{LinkJETransactionPage-DIhsx2g--KBlFRQb2.js → LinkJETransactionPage-BITHs1CJ-Y1_ePi-m.js} +7 -7
  99. package/dist/assets/{LockCardPage-BA4Lj9Iy-DTk5VUQk.js → LockCardPage-DPBKHSos-D1Lau_ZJ.js} +15 -15
  100. package/dist/assets/{LowBalancePopup-B1pTBmAF-XO9AvMeQ.js → LowBalancePopup-D2G3wpXv-BCydjVKG.js} +3 -3
  101. package/dist/assets/{MagicLinkACHDetailsPage-BxzbJBWO--JriP-v7.js → MagicLinkACHDetailsPage-Be7GMhBd-D3Y_9hTy.js} +1 -1
  102. package/dist/assets/{MagicLinkDomesticWireDetailsPage-DB2tBUoV-D11VFVs7.js → MagicLinkDomesticWireDetailsPage-C9d2Ea6m-DiWMiwF8.js} +1 -1
  103. package/dist/assets/{MagicLinkInternationalWireDetailsPage-0B5pD_Iw-D3uoz_xk.js → MagicLinkInternationalWireDetailsPage-B2M9WztX-B6F5ppQ2.js} +1 -1
  104. package/dist/assets/{MagicLinkSuccessPage-3I1CRYrj-CQ85jc3m.js → MagicLinkSuccessPage-DPb0UoGh-y5M5nnWg.js} +1 -1
  105. package/dist/assets/{MagicLinkTitleSection-BKgwdBLy-DJAtgQrS.js → MagicLinkTitleSection-Cc-MU2bJ-DSi2szeX.js} +1 -1
  106. package/dist/assets/{MailingDetailsSection-BwEd_J6R-dp-4DZAU.js → MailingDetailsSection-8mj7Lslp--SKJjx0D.js} +1 -1
  107. package/dist/assets/{MeetingCalenderPopup-BpRpGSe6-BbPmd_3K.js → MeetingCalenderPopup-Be-tan9_-CK9Gr3Pd.js} +1 -1
  108. package/dist/assets/{Menu-De_gaVnj-BIeYBB7q.js → Menu-ndvXF6cX-B4y3KuMr.js} +1 -1
  109. package/dist/assets/{MyBankConnectionsSettingsPage-lChXBDCb-CU4FUkGq.js → MyBankConnectionsSettingsPage-DuZFVLYx-VAbH3B5M.js} +4 -4
  110. package/dist/assets/{MyPendingActivationChargeCardListPage-D3di8BeS-DVyKiAts.js → MyPendingActivationChargeCardListPage-DDIlU_fs-C-bYuxLR.js} +2 -2
  111. package/dist/assets/{MyProfileSettingsPage-CYI4yK6I-B8BI2oLj.js → MyProfileSettingsPage-CccRK9mD-BRFADFUO.js} +3 -3
  112. package/dist/assets/{NavBarWithPicker-DcELUvq0-JOqnZxMT.js → NavBarWithPicker-D_MqRubB-D8dMZBv7.js} +6 -6
  113. package/dist/assets/{NavigationArrow-W1nVj2KC-CMqtrSRj.js → NavigationArrow-CfMVfLD8-BQnWEdPn.js} +1 -1
  114. package/dist/assets/{NavigationDots-BKVFhe2Y-BrHbPCev.js → NavigationDots-E2eEHB86-BK4Og9YA.js} +1 -1
  115. package/dist/assets/{NewGlobalMerchantPage-DRrjJgZt-CEoy9VUB.js → NewGlobalMerchantPage-vXrz_DRg-Wc9088Ea.js} +7 -7
  116. package/dist/assets/{NoDataChart-BzSCComh-BBDrgF2D.js → NoDataChart-CpocQ1Pa-ChFzAJ2R.js} +1 -1
  117. package/dist/assets/{NoDataTable-CGWMbvak-ByO1cOCm.js → NoDataTable-937mkn0a-D0ksTITz.js} +2 -2
  118. package/dist/assets/{NotFoundPage-DfRFngFV-5gg6LFkb.js → NotFoundPage-BmxF81mT-B9r6velH.js} +1 -1
  119. package/dist/assets/{NotificationSettingsPage-BTJH62-O-D7DVGMmr.js → NotificationSettingsPage-DyOyHW6d-DehMDImE.js} +20 -20
  120. package/dist/assets/{NotificationsListConfig-DPutUxp3-C94QRV7X.js → NotificationsListConfig-DVs7cr0d-wmSn6l3s.js} +1 -1
  121. package/dist/assets/{NotificationsPage-xu6A1hVF-DQF7RHp8.js → NotificationsPage-ntuZjRm--CaQvtRPb.js} +24 -24
  122. package/dist/assets/{OpExByVendorPage-BeO7iMry-DDqW-8aU.js → OpExByVendorPage-1MOdxG9V-BhrPpCQQ.js} +5 -5
  123. package/dist/assets/{OverlayContainerPage-CU1AAMcq-D-Pawytj.js → OverlayContainerPage-CU1AAMcq-lFQCSe-G.js} +1 -1
  124. package/dist/assets/{PandLWithForecastPage-1qSy3_Ke-EOIFmkSR.js → PandLWithForecastPage-n4fiElGl-BTwNmE3c.js} +8 -8
  125. package/dist/assets/{PaymentAccountSetupBillingAddressSection-DnObHdjD-BdZ7cMoC.js → PaymentAccountSetupBillingAddressSection-CXcwA0ON-KeSy0gEv.js} +8 -8
  126. package/dist/assets/{PeoplePage-CPqz8R9j-Db69JWzl.js → PeoplePage-BvZkMpjW-D7ElTICV.js} +13 -13
  127. package/dist/assets/{PortfolioAllocationFormPage-C9ZM9oUf-CZJ1jxYZ.js → PortfolioAllocationFormPage-B7AKufjq-BCZV66E3.js} +3 -3
  128. package/dist/assets/{PortfolioDetails-BJBNPfcI-DsK_BUc_.js → PortfolioDetails-C85yA52O-BcnUojwW.js} +7 -7
  129. package/dist/assets/{ProductsCarousel-Ctx00P5D-D9FkIJxu.js → ProductsCarousel-ixHCR9AW-BHD947gD.js} +4 -4
  130. package/dist/assets/{PromoBaseCards-BGYdfmx6-BEMDJNz0.js → PromoBaseCards-DiefKKcS-CVepNaw-.js} +1 -1
  131. package/dist/assets/{QBOConnectionDialog-B9yKv9hq-BkyyC54F.js → QBOConnectionDialog-DV-xC7Yc-6uoxl-nC.js} +1 -1
  132. package/dist/assets/{QBOSetupSection-CTMSCXwv-e3p1TnXx.js → QBOSetupSection-CI8cHWjq-CNHezBrT.js} +8 -8
  133. package/dist/assets/{ReimbursementApprovalRuleDetailPage-BtZUsK7H-D7OL8G_2.js → ReimbursementApprovalRuleDetailPage-CqnCqZ5F-MbrRP60p.js} +1 -1
  134. package/dist/assets/{ReimbursementApprovalRulesPage-DNBHPoIZ-DjLma364.js → ReimbursementApprovalRulesPage-DxoNMA62-DOLuIxNO.js} +2 -2
  135. package/dist/assets/{ReimbursementDetailPage-BxZ5ijHe-BVaX9EvT.js → ReimbursementDetailPage-CTvPAxMB-BlP7rQJ5.js} +7 -7
  136. package/dist/assets/{ReimbursementPromoPage-D284EkRZ-DkeYmm5-.js → ReimbursementPromoPage-DcxPNTHd-asHPfKWE.js} +9 -9
  137. package/dist/assets/{ReimbursementSetUpPage-BzR91_eW-B1cVy_ii.js → ReimbursementSetUpPage-SQo-xrwo-BuAAGp_P.js} +7 -7
  138. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BMo9fFp7-DDhl84yp.js → ReimbursementsBulkReviewDrawerPage-y4v-8gQs-b-mXMP5z.js} +1 -1
  139. package/dist/assets/{ReloadCard-CGUNX_x4-DHHdzF-o.js → ReloadCard-CWZU9IDv-lCmqRueL.js} +3 -3
  140. package/dist/assets/{ReportTableViewSelector-BVAek1Ui-tg0FtSlz.js → ReportTableViewSelector-t3pgCiJb-DU7QbDSE.js} +5 -5
  141. package/dist/assets/{ReportsPage-BzKbMWV4-Bkyilcu9.js → ReportsPage-D82gQH-e-Ckp9VR2p.js} +1 -1
  142. package/dist/assets/{RevenueChart-CPUrVR7y-p14Y9U0K.js → RevenueChart-BMgI2BHK-I-njStGG.js} +13 -13
  143. package/dist/assets/{ReviewDetailsPage-B74yrCe2-2UJj3aSZ.js → ReviewDetailsPage-Dc7dY-VA-CxSy8KVL.js} +3 -3
  144. package/dist/assets/{ReviewOverlay-DQvXSDYM-BgLXL5oi.js → ReviewOverlay-Bra2W5Jg-C_PWInnU.js} +4 -4
  145. package/dist/assets/{RoleWithToolTip-MwI_BmVq-X2NuZkOe.js → RoleWithToolTip-DJ15AsI3-p10xCSND.js} +2 -2
  146. package/dist/assets/{ScheduleDetailsFixedAssetsPage-CbkRYKjG-CGeWP6Q0.js → ScheduleDetailsFixedAssetsPage-DoH2eyLG-BrozO2ME.js} +8 -8
  147. package/dist/assets/{ScheduleDetailsPage-CCRspH3Y-CWtiBfKU.js → ScheduleDetailsPage-BM1Paa1W-C0ySlnA2.js} +3 -3
  148. package/dist/assets/{ScheduleSequenceTable-55zYXNwF-DayScLRg.js → ScheduleSequenceTable-C8UB3y1y-CNI-a_wl.js} +7 -7
  149. package/dist/assets/{ScreenRoutes-DFaMy6Tb.js → ScreenRoutes-_3xGjUU-.js} +41 -41
  150. package/dist/assets/{SetUpAccountSection-IgQjKWEr-C4h-8RcD.js → SetUpAccountSection-BGdUkQz3-D6CAjYv7.js} +7 -7
  151. package/dist/assets/{SetUpDefaultSection-shC3qOy6-NZDiaWla.js → SetUpDefaultSection-C4NnRO65-C0fyZc92.js} +10 -10
  152. package/dist/assets/{SignIn-CZGmLYjH-DKDYi6L5.js → SignIn-BrHA4sLj-DDyEN7b5.js} +1 -1
  153. package/dist/assets/SignInScreen-Cx7qc3RP.js +1 -0
  154. package/dist/assets/{SpendManagementListViewPage-BhTnQtma-CGcx-wdm.js → SpendManagementListViewPage-Dqb0zspN-DreMX5hh.js} +4 -4
  155. package/dist/assets/{SpendManagementPerTabPage-DpnIM6Nc-DJd_UPYY.js → SpendManagementPerTabPage-D5xIpojr-P0_AnHoz.js} +14 -14
  156. package/dist/assets/{SpendManagementSection-Hjvwgkt0-C9Ik4rB-.js → SpendManagementSection-C2iof2aM-Bp9C8eeM.js} +7 -7
  157. package/dist/assets/{SpendMgmtSetupAccountSection-CAWyEGGM-CyE9_AxZ.js → SpendMgmtSetupAccountSection-Dz3vQC2g-P6jfr6Bz.js} +6 -6
  158. package/dist/assets/{StatementItem-D8v_Laju-BC0rGudd.js → StatementItem-BOgmKBTq-DcvmbOpL.js} +5 -5
  159. package/dist/assets/{StatementsPage-CEw-9UyR-F4RCa_uj.js → StatementsPage-ClMtBDGf-DWR5BFTu.js} +4 -4
  160. package/dist/assets/{StatusSwitcher-DoSCydJG-CUZayvzb.js → StatusSwitcher-QwlvHg3_-DRNWj6rt.js} +2 -2
  161. package/dist/assets/{SubTabSwitcher-Ct1DqfgC-D_B5Q5CC.js → SubTabSwitcher-CiJ1FPk5-CEwKyb-x.js} +1 -1
  162. package/dist/assets/{SummaryCard-CHUbuF_0-BPkrpzgf.js → SummaryCard-D1B_1H2X-Lh7q95p7.js} +1 -1
  163. package/dist/assets/{TaskManagementPage-Ddox5Vwh-BtmzFtgk.js → TaskManagementPage-DibwJCOk-BF0_AhRU.js} +14 -14
  164. package/dist/assets/{TimeRangeSwitcher-CiOSsTU--DJtVL6uZ.js → TimeRangeSwitcher-Ci3SxLOE-anbVhnvw.js} +1 -1
  165. package/dist/assets/{TimeframeSwitcher-D1k1Zf_U-DRQ7Dyxo.js → TimeframeSwitcher-DSRKJTq1-BG9pQPgY.js} +1 -1
  166. package/dist/assets/{TimeframeSwitcherWithToggle-DXbaoDe6-CTgc86K9.js → TimeframeSwitcherWithToggle-D_BNOfdQ-BKTbCmic.js} +1 -1
  167. package/dist/assets/{TopExCard-D4ZDqXZg-BF-WMzyH.js → TopExCard-C5622MiP-2KEQHijQ.js} +4 -4
  168. package/dist/assets/{TopExDetailPage-BdPAcKwH-DpLiY3rN.js → TopExDetailPage-qOhQ-KAG-fVnbyWbs.js} +6 -6
  169. package/dist/assets/{TransactionDetailPage-BcjGxHy8-IuIJ3mqx.js → TransactionDetailPage-DaCUZuc0-DAUodm_m.js} +13 -13
  170. package/dist/assets/{TransactionList-BSuMEtB3-CMOkefWM.js → TransactionList-CzdU-NQx-D6gdr6x7.js} +6 -6
  171. package/dist/assets/{TransactionListBig-MY_ZxyR3-DAEJW71z.js → TransactionListBig-Bq7XI_xx-DjK27aH5.js} +11 -11
  172. package/dist/assets/{TransactionListPage-CWGrWDjK-CIEoKrUV.js → TransactionListPage-CZDewehT-BcmO71OJ.js} +6 -6
  173. package/dist/assets/{TransactionVendorDetailPage-DDNK9KrI-O_lhiQcq.js → TransactionVendorDetailPage-Bf5UUIC6-DQ0SU60H.js} +3 -3
  174. package/dist/assets/{TransferDrawerPage-vK0YoMro-BnQ7gfWx.js → TransferDrawerPage-yQE7GKl_-BiU7RlMv.js} +17 -17
  175. package/dist/assets/{TreasuryOverviewPage-CQsUti1c-B9kfLqNq.js → TreasuryOverviewPage-CisB53k8-CkomXNIa.js} +20 -20
  176. package/dist/assets/{TreasuryPromoPage-Bp72hKEs-CTtwU0ZX.js → TreasuryPromoPage-BfISVj15-BKUZCqqQ.js} +11 -11
  177. package/dist/assets/{TreasurySetupPage-BUKsU3nh-ChLyWbKe.js → TreasurySetupPage-SN-3mAFw-C_4PPIWf.js} +2 -2
  178. package/dist/assets/{TreasuryStatementsPage-Cryv1PNX-BXauBu3y.js → TreasuryStatementsPage-DGyug1wv-CZKI-qyS.js} +5 -5
  179. package/dist/assets/{TreasuryTaxLetterPage-BMYTdYa5-B5Y_HIfH.js → TreasuryTaxLetterPage-BRvcOhJZ-BeVUPN4i.js} +5 -5
  180. package/dist/assets/{TreasuryTransferOrReviewPage-B9VwyDJa-BiuSVWbg.js → TreasuryTransferOrReviewPage-H5ohs_5r-DHIAJoBr.js} +30 -30
  181. package/dist/assets/{TrendChart-CqYeWLeV-DGzeA7Oj.js → TrendChart-ohr8bK1l-B5dRIvEy.js} +4 -4
  182. package/dist/assets/{TrendWithTransactions-xn1fvlLO-BRgtHO5b.js → TrendWithTransactions-D5eTj9Ca-BjYM3mpG.js} +3 -3
  183. package/dist/assets/{UncategorizedAccountsMappingPage-B_aOzm4v-CskTnoly.js → UncategorizedAccountsMappingPage-3NGCCdAA-DC14oDOB.js} +1 -1
  184. package/dist/assets/{UnitIntegrationPage-B6LF_f7C-D2tKVxd-.js → UnitIntegrationPage-B6FOsf88-BTafkfwm.js} +3 -3
  185. package/dist/assets/{UploadAdditionalDocumentOverlay-BlKvE3tT-HoFIL9hV.js → UploadAdditionalDocumentOverlay-CH9x8nx2-CEXAXlCj.js} +1 -1
  186. package/dist/assets/Vendor2FAPopup-D7455GFK-DU0-h-ac.js +1 -0
  187. package/dist/assets/{VendorACHDetailsPage-CncDplWQ-B3O_yZHX.js → VendorACHDetailsPage-CXoxi6Qp-CrJbaYWf.js} +1 -1
  188. package/dist/assets/{VendorDetailPage-POan4Fo8-CFdhAO3w.js → VendorDetailPage-C6BgYb-c-BaTlvY1P.js} +6 -6
  189. package/dist/assets/{VendorDomesticWireDetailsPage-B1bT0W9o-D_UYfmub.js → VendorDomesticWireDetailsPage-DXfnCFu1-Bhf2lnL-.js} +1 -1
  190. package/dist/assets/{VendorFiling1099EditablePage-C25iYV4w-Crhvm405.js → VendorFiling1099EditablePage-ByESLoQK-C5wgo9Qc.js} +14 -14
  191. package/dist/assets/{VendorFirstReviewPage-DY035p5C-CBR39dJP.js → VendorFirstReviewPage-iNPtUFNw-BbgJ63Tq.js} +27 -27
  192. package/dist/assets/{VendorInternationalWireDetailsPage-DN_mcAqY-mmYMcnBl.js → VendorInternationalWireDetailsPage-CqgGFU1K-CKX6n49-.js} +11 -11
  193. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-BaXgGRdu-Cae4saOt.js → VendorInternationalWireSwiftDetailsPage-CNzft0dg-D-n290kY.js} +1 -1
  194. package/dist/assets/{VendorsAccountsSection-C2UiqXC0-C8tGsoLh.js → VendorsAccountsSection-DCWhoqAP-DHjXIFFo.js} +2 -2
  195. package/dist/assets/{VerifyDevice-C7BWrAZ3-Csv3HVHz.js → VerifyDevice-DvJEmcUq-BD1k6-81.js} +4 -4
  196. package/dist/assets/{VideoPlayer-BYkDTMkS-BwPpLJtc.js → VideoPlayer-Cp5DBUTp-n0gfwB0a.js} +1 -1
  197. package/dist/assets/{VideoPopup-Chye3pds-CsfGUZ0P.js → VideoPopup-97jTEw9t-C5kzDaxd.js} +1 -1
  198. package/dist/assets/{WarningsDrawerPage-Cx-gJdnW-CaMsO86D.js → WarningsDrawerPage-CMy4FFqt-zNFC-DvY.js} +7 -7
  199. package/dist/assets/{ZeniAccountDetailPage-BrXe6Kao-DSC2z41y.js → ZeniAccountDetailPage-mzHK5HUV-B2AMGiBu.js} +1 -1
  200. package/dist/assets/{ZeniAccountListViewPage-CJnHvk5a-CKxe9b_t.js → ZeniAccountListViewPage-BeN4AKFd-B0XSIJvm.js} +1 -1
  201. package/dist/assets/{ZeniAccountNavBarPieces-BdLOT9UG-BloORYtU.js → ZeniAccountNavBarPieces-Db9bLk29-BybXcA-l.js} +2 -2
  202. package/dist/assets/{ZeniAccountPromoPage-B1I9l833-C9FtKjkQ.js → ZeniAccountPromoPage-By02sVg0-BAnhqfjw.js} +11 -11
  203. package/dist/assets/{ZeniAccountSetupPage-CitVJnZC-djUrd4xP.js → ZeniAccountSetupPage-DeDgKig1-lQnp_HAL.js} +1 -1
  204. package/dist/assets/{ZeniCopyright-DbQka65R-DPVtmyyb.js → ZeniCopyright-Bfc0Yl56-xItwPVZ8.js} +1 -1
  205. package/dist/assets/{ZeniTransferAmountSlider-Dzxu82Xw-dYxKyELc.js → ZeniTransferAmountSlider-DzeU3D5r-Dnm1GguJ.js} +6 -6
  206. package/dist/assets/{analyticsHelper-DNLhFCBz.js → analyticsHelper-CuIvasD7.js} +1 -1
  207. package/dist/assets/{analyticsHelper-DgJDMdal-1yNDR_DA.js → analyticsHelper-Cx9PlTZt-BYpG33i-.js} +1 -1
  208. package/dist/assets/{chartTypes-D1j_l919-BJFL1pej.js → chartTypes-BoA9fCCZ-7xW-fVbz.js} +1 -1
  209. package/dist/assets/{commonDimensions-DDu54g8x-CV84qnXW.js → commonDimensions-BCUrWcBL-vTG5ZzmA.js} +1 -1
  210. package/dist/assets/{detailCommon-DXjUFoA1-DOO_rLzr.js → detailCommon-CFA4p6RP-B16mjiFN.js} +4 -4
  211. package/dist/assets/{downloadPdf-DChYYVaW-Dnx-iALN.js → downloadPdf-DZ5WQt0r-Bylb-lK-.js} +1 -1
  212. package/dist/assets/{index-HCR8uiT1.js → index-6DHFBk74.js} +1721 -1710
  213. package/dist/assets/{mapLoadingInProgressToTreeNode-BC5IH44--DUlVTHZE.js → mapLoadingInProgressToTreeNode-DQf-1sg7-B5MxQ8jl.js} +1 -1
  214. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CUXssP6r-BNiiDwH7.js → mapSectionWithAcOnlyToTreeNode-D0W1f0wZ-D3CjHikv.js} +1 -1
  215. package/dist/assets/{mapSpacerToTreeNode-sdzfy8cu-BS6jqoR8.js → mapSpacerToTreeNode-Dzbv_N4o-CAPOe3mv.js} +1 -1
  216. package/dist/assets/{mapTimeframeBalancesToTreeNode-DgOZfixy-2xtis6eH.js → mapTimeframeBalancesToTreeNode-2yWiGglp-Dy8oBMmS.js} +1 -1
  217. package/dist/assets/{mapTimeframeBalancesToTreeNode-BROieqal-CeHO_B7h.js → mapTimeframeBalancesToTreeNode-COS_auLN-CKgStlR5.js} +1 -1
  218. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-bXb7WXAq-BQ_We1t6.js → mapTimeframeHeaderLoadingInProgressToTreeNode-NCujclSc-BUwl6Oy8.js} +1 -1
  219. package/dist/assets/{toCOABalancesWithID-DqhuI8hD-BZz1K830.js → toCOABalancesWithID--3a-7Ohb-Dq8zIbZX.js} +1 -1
  220. package/dist/assets/{toChartData-DZPFiNsp-eUlwDIgN.js → toChartData-KZ92y9KA-BJN5TA9Q.js} +1 -1
  221. package/dist/assets/{treasuryColorHelper-D5AxfiPH-BIkGmYn_.js → treasuryColorHelper-ChFJTPyg--ivM0q9A.js} +1 -1
  222. package/dist/assets/{uploadAttachment-D04Fz4F1-CY5qRTQH.js → uploadAttachment-BzeeOF-1-oKdmjDH7.js} +14 -14
  223. package/dist/assets/{uploadReceipts-9DTOr0BG-Dpma3uTz.js → uploadReceipts-9DTOr0BG-BAqIaRxY.js} +1 -1
  224. package/dist/index.html +1 -1
  225. package/package.json +4 -4
  226. package/dist/assets/BillsBulkReviewDrawerPage-CFK7g3R1-b-zDDdgS.js +0 -1
  227. package/dist/assets/ChargeCardDetailPage-DXUoIbZa-DkTH3Igs.js +0 -1813
  228. package/dist/assets/ChargeCardUtils-BeG5m9OQ-BVnvyZkb.js +0 -1
  229. package/dist/assets/CustomerOnboardingContainerPage-D4zUp7hX-CSoGWUYd.js +0 -1
  230. package/dist/assets/InvitePeoplePage-DYpb33z0-yjHHc7mx.js +0 -12
  231. package/dist/assets/SignInScreen-DeabHgX8.js +0 -1
  232. package/dist/assets/Vendor2FAPopup-BLzf9zxl-l8gvXF4Y.js +0 -1
@@ -1,10 +1,10 @@
1
- import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as Ie,gr as Zn,gt as Xn,gu as eo,j as t,gN as to,ad as nn,cD as li,cE as on,cF as an,aM as q,o as i,y as d,bF as ki,bs as io,dN as no,gv as oo,gG as rn,gB as Ii,aQ as ln,ap as sn,gC as ao,eR as _e,gO as At,ff as si,P as xt,gP as ro,h as j,A as dn,ar as di,u as a,bB as lo,gE as so,cT as co,eY as ci,gQ as zt,fu as fe,fw as xe,cV as ui,d3 as dt,eD as uo,ft as cn,C as Rt,cY as un,cX as Xe,db as st,ai as mi,gR as mo,fG as po,cS as ho,aU as Di,bA as go,b9 as mn,M as yo,eC as bo,b6 as Bt,gw as fo,c7 as pn,O as pi,H as hn,dd as gn,cw as Ft,fa as xo,b8 as wo,dh as So,fB as $o,am as hi,n as Ti,c5 as yn,b1 as ji,da as vo,an as Co,c$ as bn,aN as ko,gS as fn,gT as ri,gm as Pi,gU as Ot,d9 as Io,gq as Do,bP as To,d8 as jo}from"./index-HCR8uiT1.js";import{b as v,n,w as vt}from"./vendor-Bs1fkIUX.js";import{_ as Po}from"./liveblocks-8ht9CoL5.js";import xn from"./InvoiceUploadSection-BPPgbS-r-DsP3dMQH.js";import{r as Ro,f as Lt,d as yt,p as gi,u as Ri,h as ve}from"./types-DyvtCprH-BcZYcgaq.js";import{I as Oo}from"./LabeledCreatableSingleSelectField-B5o1KUJj-BQcKTXHX.js";import{S as Lo}from"./CurrencySelectField-hwgVPqTt-CZrVpTrr.js";import{K as Ao}from"./SetUpDefaultSection-shC3qOy6-NZDiaWla.js";import{e as zo}from"./BankAccountSection-CrxSDsgw-BPSLHakI.js";import{W as Bo,F as Fo}from"./BankAccountWarningSection-Dpt8yOKi-BO8G0nmG.js";import{o as Mo}from"./radio-default-CiSgisfh-Cuu8ymvq.js";import"./mui-Ty75qFQF.js";import"./analytics-CcevxdRy.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-cQYYQPTZ.js";import"./AttachmentView-X1k01Vtr-BZZUcPOE.js";import"./uploadReceipts-9DTOr0BG-Dpma3uTz.js";const Je=(e,o)=>`${e}.${o}`,Oi={largeLabelWidth:new d(120,120,160),paddingBottom:new d(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Pe}},dateFormat:Eo,common:No}=me.getLocalizedStrings(),Wo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:u,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:S,companyMileageConfigInfo:b,reimbursementId:l,classHierarchyList:k})=>{const f=Ie(),s=ft(),g=zt(),w=`dashboard_${s.currentTenant?.companyId}`,P=bt(),{getValues:T}=dt(),$=No.strings.empty,K=T(Je(p,"distanceInMiles")),L=Oi.largeLabelWidth.value(f),I={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},E=A=>r.filter(_=>_.classId===A)[0]?.accountingClassNumber,te=r.find(A=>A.classId===o.class),pe={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.transactionDate`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("transactionDate",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:m,label:{label:Pe.transactionDate,width:L},style:{paddingBottom:Oi.paddingBottom.valuePx(f),width:"auto"},dateField:{name:Je(p,"transactionDate"),placeholder:Pe.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:Eo.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:S?"disabled":void 0,style:{width:"auto"},label:{label:Pe.distanceInMiles,width:L},formattedTextField:{type:"number",name:Je(p,"distanceInMiles"),placeholder:Pe.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.amount`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("amount",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:"disabled",label:{label:Pe.amount,width:L},formattedTextField:{type:"number",name:Je(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:Xe(Pe.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:K!=null&&b?.mileageUnitAmount!=null?`${u.currencySymbol}${b?.mileageUnitAmount} per mile x ${K}`:void 0})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.memo`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("memo",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:m,label:{label:Pe.memo,width:L},style:{width:"auto"},text:{type:"text",name:Je(p,"memo"),placeholder:Xe(Pe.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.class`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("class",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:Pe.department,width:L},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Je(p,"class"),placeholder:Xe(Pe.department),valueToId:A=>E(A),defaultValue:{selectedOption:te?.classId,allOptions:_e(k,[])},style:{width:"100%"},customStyleConfig:pe,registerOptions:{required:!0,validate:A=>!!A.selectedOption}},style:{borderBottom:`1px solid ${P.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Je(p,"class"))})]})},Ct=n.div`
1
+ import{aP as ai,c as bt,ax as ft,aa as en,az as Ci,l as ee,O as me,aC as tn,q as Ie,gr as Zn,gt as Xn,gu as eo,j as t,gN as to,ad as nn,cD as li,cE as on,cF as an,aM as q,o as i,y as c,bF as ki,bs as io,dN as no,gv as oo,gG as rn,gB as Ii,aQ as ln,ap as sn,gC as ao,eR as _e,gO as At,ff as si,P as xt,gP as ro,h as j,A as cn,ar as ci,u as a,bB as lo,gE as so,cT as co,eY as di,gQ as zt,fu as fe,fw as xe,cV as ui,d3 as ct,eD as uo,ft as dn,C as Rt,cY as un,cX as Xe,db as st,ai as mi,gR as mo,fG as po,cS as ho,aU as Di,bA as go,b9 as mn,M as yo,eC as bo,b6 as Bt,gw as fo,c7 as pn,b as pi,H as hn,dd as gn,cw as Mt,fa as xo,b8 as wo,dh as So,fB as $o,am as hi,n as Ti,c5 as yn,b1 as ji,da as vo,an as Co,c$ as bn,aN as ko,gS as fn,gT as ri,gm as Pi,gU as Ot,d9 as Io,gq as Do,bP as To,d8 as jo}from"./index-6DHFBk74.js";import{b as v,n,w as vt}from"./vendor-Bs1fkIUX.js";import{_ as Po}from"./liveblocks-8ht9CoL5.js";import xn from"./InvoiceUploadSection-DzzjJVfz-KKaBZftU.js";import{r as Ro,f as Lt,d as yt,p as gi,u as Ri,h as ve}from"./types-DyvtCprH-BcZYcgaq.js";import{I as Oo}from"./LabeledCreatableSingleSelectField-DcdF286I-C7Y6s3yv.js";import{S as Lo}from"./CurrencySelectField-BW71th1E-DHxO3UVa.js";import{K as Ao}from"./SetUpDefaultSection-C4NnRO65-C0fyZc92.js";import{e as zo}from"./BankAccountSection-D8_5fjrd-BCE6WYWF.js";import{W as Bo,F as Mo}from"./BankAccountWarningSection-CMrRr8aa-BT7FUFGR.js";import{o as Fo}from"./radio-default-CiSgisfh-Cuu8ymvq.js";import"./mui-Ty75qFQF.js";import"./analytics-CcevxdRy.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-cQYYQPTZ.js";import"./AttachmentView-DEE6AWkv-B1086jMd.js";import"./uploadReceipts-9DTOr0BG-BAqIaRxY.js";const Je=(e,o)=>`${e}.${o}`,Oi={largeLabelWidth:new c(120,120,160),paddingBottom:new c(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Pe}},dateFormat:Eo,common:No}=me.getLocalizedStrings(),Wo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:u,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:S,companyMileageConfigInfo:b,reimbursementId:l,classHierarchyList:k})=>{const f=Ie(),s=ft(),g=zt(),w=`dashboard_${s.currentTenant?.companyId}`,P=bt(),{getValues:T}=ct(),$=No.strings.empty,K=T(Je(p,"distanceInMiles")),L=Oi.largeLabelWidth.value(f),I={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},E=A=>r.filter(_=>_.classId===A)[0]?.accountingClassNumber,te=r.find(A=>A.classId===o.class),pe={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.transactionDate`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("transactionDate",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:m,label:{label:Pe.transactionDate,width:L},style:{paddingBottom:Oi.paddingBottom.valuePx(f),width:"auto"},dateField:{name:Je(p,"transactionDate"),placeholder:Pe.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:Eo.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:S?"disabled":void 0,style:{width:"auto"},label:{label:Pe.distanceInMiles,width:L},formattedTextField:{type:"number",name:Je(p,"distanceInMiles"),placeholder:Pe.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.amount`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("amount",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:"disabled",label:{label:Pe.amount,width:L},formattedTextField:{type:"number",name:Je(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:Xe(Pe.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:K!=null&&b?.mileageUnitAmount!=null?`${u.currencySymbol}${b?.mileageUnitAmount} per mile x ${K}`:void 0})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.memo`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("memo",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:m,label:{label:Pe.memo,width:L},style:{width:"auto"},text:{type:"text",name:Je(p,"memo"),placeholder:Xe(Pe.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.class`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("class",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:Pe.department,width:L},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Je(p,"class"),placeholder:Xe(Pe.department),valueToId:A=>E(A),defaultValue:{selectedOption:te?.classId,allOptions:_e(k,[])},style:{width:"100%"},customStyleConfig:pe,registerOptions:{required:!0,validate:A=>!!A.selectedOption}},style:{borderBottom:`1px solid ${P.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Je(p,"class"))})]})},Ct=n.div`
2
2
  display: flex;
3
3
  flex: 1;
4
4
  background-color: ${e=>e.theme.colors.grey3};
5
5
  min-height: 1px;
6
6
  max-height: 1px;
7
- `,Li={amounWidth:new d(50,30),currencyWidth:new d(50,70)};function Uo({name:e,placeHolder:o,defaultValue:r,isDisabled:u,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[S,b]=v.useState(!1),{getValues:l,formState:{errors:k}}=dt(),f=bt(),s=Ie(),g=u!=null,w=l(e),P=`${w?.amount} ${w?.currency?.selectedOption}`,T=st(k,e)&&Ot(k,`${e}.amount`)!=null,$=st(k,e)&&Ot(k,`${e}.currency`)!=null,K=p===!0?T||$:!1,L=!K&&S===!1;return v.useEffect(()=>{L===!1&&b(!0)},[L]),t.jsx(sn,{onClickAway:()=>g===!1&&!K&&b(!1),children:t.jsx(_o,{style:C,isDisabled:g,tabIndex:L&&!g?0:void 0,onClick:()=>g===!1&&b(!0),"data-testid":q("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[w?.amount!=null?t.jsx(Ai,{className:"amount-field",isVisible:L,children:P}):t.jsx(Ai,{className:"amount-field amount-placeholder",isVisible:L,children:o?.name}),t.jsxs(Vo,{isVisible:!L,children:[t.jsx(Do,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:I=>I!=null?I>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:u,style:{display:"flex",flexGrow:1,width:Li.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:f.colors.background,isFieldError:T,shouldHighlightZeroAmount:!0}),L?null:t.jsx(Ho,{}),t.jsx(Lo,{name:`${e}.currency`,registerOptions:{validate:I=>I!=null&&I.selectedOption!=null},defaultValue:{allOptions:m.map(I=>({label:s==="small"?I.currencyCode:`${I.currencyCode} - ${I.currency}`,value:I.currencyCode,countryCode:I.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:f.colors.background},isDisabled:u,style:{width:Li.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
7
+ `,Li={amounWidth:new c(50,30),currencyWidth:new c(50,70)};function Uo({name:e,placeHolder:o,defaultValue:r,isDisabled:u,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[S,b]=v.useState(!1),{getValues:l,formState:{errors:k}}=ct(),f=bt(),s=Ie(),g=u!=null,w=l(e),P=`${w?.amount} ${w?.currency?.selectedOption}`,T=st(k,e)&&Ot(k,`${e}.amount`)!=null,$=st(k,e)&&Ot(k,`${e}.currency`)!=null,K=p===!0?T||$:!1,L=!K&&S===!1;return v.useEffect(()=>{L===!1&&b(!0)},[L]),t.jsx(sn,{onClickAway:()=>g===!1&&!K&&b(!1),children:t.jsx(_o,{style:C,isDisabled:g,tabIndex:L&&!g?0:void 0,onClick:()=>g===!1&&b(!0),"data-testid":q("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[w?.amount!=null?t.jsx(Ai,{className:"amount-field",isVisible:L,children:P}):t.jsx(Ai,{className:"amount-field amount-placeholder",isVisible:L,children:o?.name}),t.jsxs(Vo,{isVisible:!L,children:[t.jsx(Do,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:I=>I!=null?I>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:u,style:{display:"flex",flexGrow:1,width:Li.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:f.colors.background,isFieldError:T,shouldHighlightZeroAmount:!0}),L?null:t.jsx(Ho,{}),t.jsx(Lo,{name:`${e}.currency`,registerOptions:{validate:I=>I!=null&&I.selectedOption!=null},defaultValue:{allOptions:m.map(I=>({label:s==="small"?I.currencyCode:`${I.currencyCode} - ${I.currency}`,value:I.currencyCode,countryCode:I.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:f.colors.background},isDisabled:u,style:{width:Li.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
8
8
  display: ${e=>e.isVisible?"flex":"none"};
9
9
  width: 100%;
10
10
  input {
@@ -37,16 +37,16 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
37
37
  &.amount-placeholder {
38
38
  color: ${e=>e.theme.colors.grey1};
39
39
  }
40
- `,Me={width:new d(343,580,726),height:new d(a[6],a[6]),controlHeight:new d(a[6],a[6]),paddingTopBottom:new d(a[2],a[2]),marginRight:new d(a[2],a[2]),labelMarginLeft:new d(a[3],a[4]),labelMarginRight:new d(a[3],a[4]),labelMarginTop:new d(a[2],a[2])},wn={infoLabel:new pi("extraSmallRegular","smallRegular")};function qo({isDisabled:e,label:o,currencyAmountField:r,style:u,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:S,additionalInfoLabel:b,showAdditionalInfoLabel:l=!0}){const k=Ie(),{formState:{errors:f}}=dt(),s=st(f,r.name)&&Ot(f,`${r.name}.amount`)!=null,g=st(f,r.name)&&Ot(f,`${r.name}.currency`)!=null,w=r.showAmountCurrencyError===!0?s||g:!1,P=s||g||w,T=()=>{if(C===!0)return t.jsx(Qo,{children:t.jsx(xt,{size:"Small",start:!0})});if(l&&b||w){let $=null;return m===!0&&l&&b&&($=t.jsx(yn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Jo,{children:S??""}),children:t.jsx(Xo,{children:t.jsx(ea,{})})})),t.jsxs(Zo,{size:k,isError:w,hasToolTip:m,children:[$,b]})}};return t.jsxs(Ko,{size:k,style:u,isDisabled:e!=null,isAmountError:s,isCurrencyError:g,"data-testid":q("labeled-currency-amount-field",r.name),children:[t.jsx(Io,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Me.labelMarginLeft.value(k),marginRight:Me.labelMarginRight.value(k),marginTop:Me.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Yo,{labelWidth:o.width,children:[t.jsx(Uo,{...r,isDisabled:e,style:{flexGrow:1,height:Me.controlHeight.value(k)}}),P?t.jsx(Go,{size:k,hasError:P,children:p}):null,T()]})]})}const Ko=n.div`
40
+ `,Fe={width:new c(343,580,726),height:new c(a[6],a[6]),controlHeight:new c(a[6],a[6]),paddingTopBottom:new c(a[2],a[2]),marginRight:new c(a[2],a[2]),labelMarginLeft:new c(a[3],a[4]),labelMarginRight:new c(a[3],a[4]),labelMarginTop:new c(a[2],a[2])},wn={infoLabel:new pi("extraSmallRegular","smallRegular")};function qo({isDisabled:e,label:o,currencyAmountField:r,style:u,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:S,additionalInfoLabel:b,showAdditionalInfoLabel:l=!0}){const k=Ie(),{formState:{errors:f}}=ct(),s=st(f,r.name)&&Ot(f,`${r.name}.amount`)!=null,g=st(f,r.name)&&Ot(f,`${r.name}.currency`)!=null,w=r.showAmountCurrencyError===!0?s||g:!1,P=s||g||w,T=()=>{if(C===!0)return t.jsx(Qo,{children:t.jsx(xt,{size:"Small",start:!0})});if(l&&b||w){let $=null;return m===!0&&l&&b&&($=t.jsx(yn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Jo,{children:S??""}),children:t.jsx(Xo,{children:t.jsx(ea,{})})})),t.jsxs(Zo,{size:k,isError:w,hasToolTip:m,children:[$,b]})}};return t.jsxs(Ko,{size:k,style:u,isDisabled:e!=null,isAmountError:s,isCurrencyError:g,"data-testid":q("labeled-currency-amount-field",r.name),children:[t.jsx(Io,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Fe.labelMarginLeft.value(k),marginRight:Fe.labelMarginRight.value(k),marginTop:Fe.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Yo,{labelWidth:o.width,children:[t.jsx(Uo,{...r,isDisabled:e,style:{flexGrow:1,height:Fe.controlHeight.value(k)}}),P?t.jsx(Go,{size:k,hasError:P,children:p}):null,T()]})]})}const Ko=n.div`
41
41
  display: flex;
42
42
  flex-direction: row;
43
43
  align-items: flex-start;
44
44
  background-color: ${e=>e.theme.colors.grey5};
45
- width: ${e=>Me.width.valuePx(e.size)};
46
- min-height: ${e=>Me.height.valuePx(e.size)};
47
- padding-right: ${e=>Me.marginRight.valuePx(e.size)};
48
- padding-top: ${e=>Me.paddingTopBottom.valuePx(e.size)};
49
- padding-bottom: ${e=>Me.paddingTopBottom.valuePx(e.size)};
45
+ width: ${e=>Fe.width.valuePx(e.size)};
46
+ min-height: ${e=>Fe.height.valuePx(e.size)};
47
+ padding-right: ${e=>Fe.marginRight.valuePx(e.size)};
48
+ padding-top: ${e=>Fe.paddingTopBottom.valuePx(e.size)};
49
+ padding-bottom: ${e=>Fe.paddingTopBottom.valuePx(e.size)};
50
50
 
51
51
  :first-of-type {
52
52
  border-top-left-radius: inherit;
@@ -146,9 +146,9 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
146
146
  width: ${i.sp3};
147
147
  height: ${i.sp3};
148
148
  color: inherit;
149
- `,Be=(e,o)=>`${e}.${o}`,jt={largeLabelWidth:new d(120,120,160),smallLabelWidth:new d(85,85,160),paddingBottom:new d(a[3],a[2]),autoFillIconLeft:new d(-8,-24)},{dateFormat:ta,common:Sn,spendManagement:{reimbursement:{reimbursementDetail:ce}}}=me.getLocalizedStrings(),{strings:{empty:oe}}=Sn,ia=(e,o)=>{const r=e.slice(1);let u=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(u=!0)}),u},na=e=>e.charAt(0).toLowerCase()+e.slice(1),oa=({lineIndex:e,outOfPocket:o,accountList:r,classList:u,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:S,isDisabled:b,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:f,reimbursementId:s,tentativeMerchantName:g,allCurrencies:w,uncategorizedAccounts:P})=>{const T=Ie(),$=ft(),K=zt(),L=bt(),I=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!ia(o.recommendations,o.account),E=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,te=jt.largeLabelWidth.value(T),pe=jt.smallLabelWidth.value(T),A=p.map(R=>R.id??oe),_={application:"dashboard",companyId:$.currentTenant?.companyId,tab:"reimbursement",entityId:s},Y=`dashboard_${$.currentTenant?.companyId}`,H=R=>p.find(ge=>ge.id===R)?.name??R,ie=r.find(R=>R.qboId===o.account),X=R=>[P.expense?.qboId,P.income?.qboId].includes(R),we=u.find(R=>R.classId===o.class),he={valueContainer:R=>({...R,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},re=R=>r.filter(ge=>ge.qboId===R)[0]?.qboId,J=R=>u.filter(ge=>ge.classId===R)[0]?.accountingClassNumber,le=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",na(o?.recommendedAccount?.reason??oe)),Oe=At(k,o.recommendations);return t.jsxs(t.Fragment,{children:[g!=null||l.includes("merchant")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(Oo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:ce.merchant,width:te},style:{width:"auto"},creatableSingleSelectField:{name:Be(m,"merchant"),placeholder:ce.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??oe,allOptions:A},registerOptions:{required:!0,validate:R=>!!R.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:H})}),t.jsx(kt,{}),l.includes("transactionDate")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:b,label:{label:ce.transactionDate,width:te},style:{paddingBottom:jt.paddingBottom.valuePx(T),width:"auto"},dateField:{name:Be(m,"transactionDate"),placeholder:ce.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ta.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:R=>!!R}}})}),t.jsx(kt,{}),l.includes("amount")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,isTwoLined:!0,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(qo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:ce.amount,width:pe},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:ce.addAmount,name:ce.addAmount},allCurrencies:w,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:ce.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!tn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==Sn.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${ko("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(kt,{}),l.includes("memo")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:b,label:{label:ce.memo,width:te},style:{width:"auto"},text:{type:"text",name:Be(m,"memo"),placeholder:Xe(ce.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(kt,{}),l.includes("account")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.account`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("account",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ri,{label:{label:ce.category,width:te},groupedSingleSelectField:{shouldShowChevronIcon:I||E,name:Be(m,"account"),placeholder:ce.categoryPlaceholder,valueToId:R=>re(R),defaultValue:{selectedOption:ie?.qboId??ie?.accountId,allOptions:Oe},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},disableCurrentOption:X,style:{borderBottom:`1px solid ${L.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:I?{tooltipProps:{text:le},label:{label:o.recommendedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:E?{label:{label:o.retainedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},Be(m,"account"))}),l.includes("class")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.class`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("class",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:ce.department,width:te},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Be(m,"class"),placeholder:Xe(ce.department),valueToId:R=>J(R),defaultValue:{selectedOption:we?.classId,allOptions:_e(f,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},style:{borderBottom:`1px solid ${L.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Be(m,"class"))})]})},ot=n.span`
149
+ `,Be=(e,o)=>`${e}.${o}`,jt={largeLabelWidth:new c(120,120,160),smallLabelWidth:new c(85,85,160),paddingBottom:new c(a[3],a[2]),autoFillIconLeft:new c(-8,-24)},{dateFormat:ta,common:Sn,spendManagement:{reimbursement:{reimbursementDetail:de}}}=me.getLocalizedStrings(),{strings:{empty:oe}}=Sn,ia=(e,o)=>{const r=e.slice(1);let u=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(u=!0)}),u},na=e=>e.charAt(0).toLowerCase()+e.slice(1),oa=({lineIndex:e,outOfPocket:o,accountList:r,classList:u,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:S,isDisabled:b,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:f,reimbursementId:s,tentativeMerchantName:g,allCurrencies:w,uncategorizedAccounts:P})=>{const T=Ie(),$=ft(),K=zt(),L=bt(),I=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!ia(o.recommendations,o.account),E=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,te=jt.largeLabelWidth.value(T),pe=jt.smallLabelWidth.value(T),A=p.map(R=>R.id??oe),_={application:"dashboard",companyId:$.currentTenant?.companyId,tab:"reimbursement",entityId:s},Y=`dashboard_${$.currentTenant?.companyId}`,H=R=>p.find(ge=>ge.id===R)?.name??R,ie=r.find(R=>R.qboId===o.account),X=R=>[P.expense?.qboId,P.income?.qboId].includes(R),we=u.find(R=>R.classId===o.class),he={valueContainer:R=>({...R,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},re=R=>r.filter(ge=>ge.qboId===R)[0]?.qboId,J=R=>u.filter(ge=>ge.classId===R)[0]?.accountingClassNumber,le=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",na(o?.recommendedAccount?.reason??oe)),Oe=At(k,o.recommendations);return t.jsxs(t.Fragment,{children:[g!=null||l.includes("merchant")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(Oo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.merchant,width:te},style:{width:"auto"},creatableSingleSelectField:{name:Be(m,"merchant"),placeholder:de.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??oe,allOptions:A},registerOptions:{required:!0,validate:R=>!!R.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:H})}),t.jsx(kt,{}),l.includes("transactionDate")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:b,label:{label:de.transactionDate,width:te},style:{paddingBottom:jt.paddingBottom.valuePx(T),width:"auto"},dateField:{name:Be(m,"transactionDate"),placeholder:de.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ta.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:R=>!!R}}})}),t.jsx(kt,{}),l.includes("amount")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,isTwoLined:!0,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(qo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.amount,width:pe},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:de.addAmount,name:de.addAmount},allCurrencies:w,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:de.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!tn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==Sn.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${ko("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(kt,{}),l.includes("memo")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:b,label:{label:de.memo,width:te},style:{width:"auto"},text:{type:"text",name:Be(m,"memo"),placeholder:Xe(de.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(kt,{}),l.includes("account")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.account`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("account",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ri,{label:{label:de.category,width:te},groupedSingleSelectField:{shouldShowChevronIcon:I||E,name:Be(m,"account"),placeholder:de.categoryPlaceholder,valueToId:R=>re(R),defaultValue:{selectedOption:ie?.qboId??ie?.accountId,allOptions:Oe},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},disableCurrentOption:X,style:{borderBottom:`1px solid ${L.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:I?{tooltipProps:{text:le},label:{label:o.recommendedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:E?{label:{label:o.retainedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},Be(m,"account"))}),l.includes("class")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.class`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("class",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:de.department,width:te},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Be(m,"class"),placeholder:Xe(de.department),valueToId:R=>J(R),defaultValue:{selectedOption:we?.classId,allOptions:_e(f,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},style:{borderBottom:`1px solid ${L.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Be(m,"class"))})]})},ot=n.span`
150
150
  position: relative;
151
- `,at=n(ci)`
151
+ `,at=n(di)`
152
152
  color: ${e=>e.theme.colors.primary};
153
153
  width: ${i.sp3};
154
154
  height: ${i.sp3};
@@ -163,7 +163,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
163
163
  background-color: ${e=>e.theme.colors.grey3};
164
164
  min-height: 1px;
165
165
  max-height: 1px;
166
- `,Qe=(e,o)=>`${e}.${o}`,Ee={paddingTop:new d(a[5],a[4]),marginBottom:new d(a[3],a[3]),labelPaddingLeft:new d(a[3],a[4]),buttonWidth:new d(70,70),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6]),deleteConfirmationTextMarginBottom:new d(a[2],a[0])},G=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,aa=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:u,lineIndex:p,accountList:C,classList:m,merchantList:S,hasFile:b,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:f,duplicateLineDetails:s,remiStatus:g,sectionId:w,isDisabled:P,isReimbursementCommentingEnabled:T,isAddReimbursementDisabled:$,style:K,autoFields:L=[],analytics:I,reimbursementId:E,tentativeMerchantName:te,companyMileageConfigInfo:pe,uncategorizedAccounts:A,removeDuplicateReimbursementForLine:_,scrollToSection:Y,onDuplicateLineClick:H,onRemoveReimbursement:ie,clearTentativeNameForLine:X,allCurrencies:we,accountsHierarchyList:he,classHierarchyList:re})=>{const J=Ie(),le=ft(),Oe=zt(),R=me.getLocalizedStrings().common.strings.empty,ge={application:"dashboard",companyId:le.currentTenant?.companyId,tab:"reimbursement",entityId:E},se=`dashboard_${le.currentTenant?.companyId}`,{getValues:Ne}=dt(),[Le,Ae]=v.useState(!1),Se=Ne(Qe(w,"reimbursementType"));return t.jsxs(ma,{style:K,windowSize:J,children:[t.jsxs(la,{hasFile:b,windowSize:J,showDeleteConfirmation:Le,children:[t.jsx(ha,{windowSize:J,children:k?`#${p+1} ${G.reimbursement}`:G.reimbursement}),Le?t.jsxs(ua,{windowSize:J,children:[t.jsx(ca,{windowSize:J,children:G.deleteConfirmation}),t.jsxs(ra,{children:[t.jsx(Ti,{label:G.buttons.cancel,onClick:()=>Ae(!1),style:{width:Ee.buttonWidth.value(J),marginLeft:J==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":q("delete-remi-button",G.buttons.cancel)}),t.jsx(Ti,{label:G.buttons.remove,onClick:()=>{I?.trackReimbursementDeleteReimbursementLine(e.lineId,E),X?.(e.lineId??"1"),Ae(!1),_(e.lineId),ie(p)},style:{width:Ee.buttonWidth.value(J)},size:"small",variant:"danger","data-testid":q("delete-remi-button",G.buttons.remove)})]})]}):k&&(u==="draft"||g==="rejected")?t.jsx(sa,{className:"deleteIconWrapper",windowSize:J,onClick:()=>Ae(!0),"data-testid":q("delete-remi-button",e.lineId),children:t.jsx(yn,{enterDelay:600,title:G.deleteReimbursement,placement:"top-end",children:t.jsx(da,{})})}):null]}),f.includes(e.lineId)?t.jsx(rn,{title:G.missingReceipt,description:G.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ga,{windowSize:J,children:[s?.duplicateLineId!=null?t.jsxs(pa,{children:[G.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(zi,{"data-testid":q("view-duplicate-transaction-expense"),onClick:()=>(I?.trackReimbursementViewDuplicateExpense(!0,E),Y(s.duplicateLineId)),children:G.viewOriginalExpense}):t.jsx(zi,{"data-testid":q("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(I?.trackReimbursementViewDuplicateExpense(!1,E),H(s.duplicateTransactionId,s.duplicateLineId))},children:G.viewOriginalExpense})]}):null,t.jsx(fe,{isThreadAllowed:T&&E!=null,dashboardTabKey:xe({type:"details",key:Se===G.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:se,companyId:le.currentTenant?.companyId??R,companyName:le.currentTenant?.companyName??R,entityId:E,dashboardOptionType:"reimbursement",filterMetaData:{...ge,entityType:`reimbursement.details.${ve("reimbursementType",p,Se===G.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Oe?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(ba,{isDisabled:P!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopLeftRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Qe(w,"reimbursementType"),id:`${Qe(w,"reimbursementType")}.${G.outOfPocketKey}`,value:G.outOfPocketKey}}),t.jsx(ya,{}),t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopRightRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Qe(w,"reimbursementType"),id:`${Qe(w,"reimbursementType")}.${G.mileageKey}`,value:G.mileageKey}})]})}),t.jsx(fa,{}),Se===G.outOfPocketKey?t.jsx(oa,{lineIndex:p,reimbursementId:E,uncategorizedAccounts:A,isReimbursementCommentingEnabled:T,isDisabled:P,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:Qe(w,"outOfPocket"),accountList:C,classList:m,autoFields:L,merchantList:S,tentativeMerchantName:te,allCurrencies:we,isAddReimbursementDisabled:$,accountsHierarchyList:he,classHierarchyList:re}):t.jsx(Wo,{lineIndex:p,reimbursementId:E,isReimbursementCommentingEnabled:T,isDisabled:P,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:Qe(w,"mileage"),companyMileageConfigInfo:pe,defaultCurrency:l,isAddReimbursementDisabled:$,classHierarchyList:re})]})]})},ra=n.div``,la=n.div`
166
+ `,Qe=(e,o)=>`${e}.${o}`,Ee={paddingTop:new c(a[5],a[4]),marginBottom:new c(a[3],a[3]),labelPaddingLeft:new c(a[3],a[4]),buttonWidth:new c(70,70),containerRightMargin:new c(a[3],a[8]),containerLeftMargin:new c(a[3],a[6]),deleteConfirmationTextMarginBottom:new c(a[2],a[0])},G=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,aa=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:u,lineIndex:p,accountList:C,classList:m,merchantList:S,hasFile:b,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:f,duplicateLineDetails:s,remiStatus:g,sectionId:w,isDisabled:P,isReimbursementCommentingEnabled:T,isAddReimbursementDisabled:$,style:K,autoFields:L=[],analytics:I,reimbursementId:E,tentativeMerchantName:te,companyMileageConfigInfo:pe,uncategorizedAccounts:A,removeDuplicateReimbursementForLine:_,scrollToSection:Y,onDuplicateLineClick:H,onRemoveReimbursement:ie,clearTentativeNameForLine:X,allCurrencies:we,accountsHierarchyList:he,classHierarchyList:re})=>{const J=Ie(),le=ft(),Oe=zt(),R=me.getLocalizedStrings().common.strings.empty,ge={application:"dashboard",companyId:le.currentTenant?.companyId,tab:"reimbursement",entityId:E},se=`dashboard_${le.currentTenant?.companyId}`,{getValues:Ne}=ct(),[Le,Ae]=v.useState(!1),Se=Ne(Qe(w,"reimbursementType"));return t.jsxs(ma,{style:K,windowSize:J,children:[t.jsxs(la,{hasFile:b,windowSize:J,showDeleteConfirmation:Le,children:[t.jsx(ha,{windowSize:J,children:k?`#${p+1} ${G.reimbursement}`:G.reimbursement}),Le?t.jsxs(ua,{windowSize:J,children:[t.jsx(da,{windowSize:J,children:G.deleteConfirmation}),t.jsxs(ra,{children:[t.jsx(Ti,{label:G.buttons.cancel,onClick:()=>Ae(!1),style:{width:Ee.buttonWidth.value(J),marginLeft:J==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":q("delete-remi-button",G.buttons.cancel)}),t.jsx(Ti,{label:G.buttons.remove,onClick:()=>{I?.trackReimbursementDeleteReimbursementLine(e.lineId,E),X?.(e.lineId??"1"),Ae(!1),_(e.lineId),ie(p)},style:{width:Ee.buttonWidth.value(J)},size:"small",variant:"danger","data-testid":q("delete-remi-button",G.buttons.remove)})]})]}):k&&(u==="draft"||g==="rejected")?t.jsx(sa,{className:"deleteIconWrapper",windowSize:J,onClick:()=>Ae(!0),"data-testid":q("delete-remi-button",e.lineId),children:t.jsx(yn,{enterDelay:600,title:G.deleteReimbursement,placement:"top-end",children:t.jsx(ca,{})})}):null]}),f.includes(e.lineId)?t.jsx(rn,{title:G.missingReceipt,description:G.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ga,{windowSize:J,children:[s?.duplicateLineId!=null?t.jsxs(pa,{children:[G.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(zi,{"data-testid":q("view-duplicate-transaction-expense"),onClick:()=>(I?.trackReimbursementViewDuplicateExpense(!0,E),Y(s.duplicateLineId)),children:G.viewOriginalExpense}):t.jsx(zi,{"data-testid":q("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(I?.trackReimbursementViewDuplicateExpense(!1,E),H(s.duplicateTransactionId,s.duplicateLineId))},children:G.viewOriginalExpense})]}):null,t.jsx(fe,{isThreadAllowed:T&&E!=null,dashboardTabKey:xe({type:"details",key:Se===G.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:se,companyId:le.currentTenant?.companyId??R,companyName:le.currentTenant?.companyName??R,entityId:E,dashboardOptionType:"reimbursement",filterMetaData:{...ge,entityType:`reimbursement.details.${ve("reimbursementType",p,Se===G.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Oe?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(ba,{isDisabled:P!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopLeftRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Qe(w,"reimbursementType"),id:`${Qe(w,"reimbursementType")}.${G.outOfPocketKey}`,value:G.outOfPocketKey}}),t.jsx(ya,{}),t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopRightRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Qe(w,"reimbursementType"),id:`${Qe(w,"reimbursementType")}.${G.mileageKey}`,value:G.mileageKey}})]})}),t.jsx(fa,{}),Se===G.outOfPocketKey?t.jsx(oa,{lineIndex:p,reimbursementId:E,uncategorizedAccounts:A,isReimbursementCommentingEnabled:T,isDisabled:P,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:Qe(w,"outOfPocket"),accountList:C,classList:m,autoFields:L,merchantList:S,tentativeMerchantName:te,allCurrencies:we,isAddReimbursementDisabled:$,accountsHierarchyList:he,classHierarchyList:re}):t.jsx(Wo,{lineIndex:p,reimbursementId:E,isReimbursementCommentingEnabled:T,isDisabled:P,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:Qe(w,"mileage"),companyMileageConfigInfo:pe,defaultCurrency:l,isAddReimbursementDisabled:$,classHierarchyList:re})]})]})},ra=n.div``,la=n.div`
167
167
  //when file is present and it's a small window, we don't have to show the title and delete icon. Delete icon will be displayed inside the invoice title, next to replace
168
168
  //https://www.figma.com/file/ERKhHKvXKZSfIUruWfHqwU/New-Reimbursement-Mobile-Ver-1.0?type=design&node-id=419%3A6356&mode=design&t=upxphJ6HQRaue6wK-1
169
169
  display: ${e=>e.hasFile&&e.windowSize==="small"?"none":"flex"};
@@ -182,11 +182,11 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
182
182
  `,zi=n.span`
183
183
  border-bottom: 1px solid currentColor;
184
184
  cursor: pointer;
185
- `,da=n(vo)`
185
+ `,ca=n(vo)`
186
186
  width: ${i.sp3};
187
187
  height: ${i.sp3};
188
188
  cursor: pointer;
189
- `,ca=n.div`
189
+ `,da=n.div`
190
190
  margin-bottom: ${e=>Ee.deleteConfirmationTextMarginBottom.valuePx(e.windowSize)};
191
191
  `,ua=n(hi)`
192
192
  color: ${e=>e.theme.colors.hero};
@@ -241,7 +241,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
241
241
  background-color: ${e=>e.theme.colors.grey3};
242
242
  min-height: 1px;
243
243
  max-height: 1px;
244
- `,xa=(e,o)=>`${e}.${o}`,lt={labelWidth:new d(120,160,160),paddingBottom:new d(a[3],a[3]),paddingTop:new d(12,a[3]),marginBottom:new d(12,a[3]),containerRightMargin:new d(a[3],a[8]),containerLeftMargin:new d(a[3],a[6])},$n=({isReimbursementCommentingEnabled:e,sectionId:o,isDisabled:r,reportTitle:u,reimbursementId:p,style:C})=>{const m=Ie(),S=ft(),b=zt(),l=`dashboard_${S.currentTenant?.companyId}`,k=me.getLocalizedStrings(),f=k.spendManagement.reimbursement.reimbursementDetail,s=k.common.strings.empty,g=lt.labelWidth.value(m);return t.jsxs(wa,{style:C,windowSize:m,children:[t.jsx($a,{windowSize:m,children:f.whatFor}),t.jsx(Sa,{children:t.jsx(fe,{isThreadAllowed:e&&p!=null,dashboardTabKey:xe({type:"details",key:"whatFor"}),roomId:l,companyId:S.currentTenant?.companyId??s,companyName:S.currentTenant?.companyName??s,entityId:p,dashboardOptionType:"reimbursement",filterMetaData:{application:"dashboard",companyId:S.currentTenant?.companyId,tab:"reimbursement",entityId:p,entityType:"reimbursement.details.whatFor"},fieldThreadTargetElement:b?.sharedRef?.contentWrapperRef,style:{borderRadius:i.sp2},children:t.jsx(ui,{isDisabled:r,label:{label:f.reportTitle,width:g},text:{type:"text",name:xa(o,"reportTitle"),placeholder:f.lunchWithClient,defaultValue:u,autoComplete:"off",options:{required:!0,validate:w=>!!w}},style:{width:"auto",borderRadius:i.sp2}})})})]})},wa=n.div`
244
+ `,xa=(e,o)=>`${e}.${o}`,lt={labelWidth:new c(120,160,160),paddingBottom:new c(a[3],a[3]),paddingTop:new c(12,a[3]),marginBottom:new c(12,a[3]),containerRightMargin:new c(a[3],a[8]),containerLeftMargin:new c(a[3],a[6])},$n=({isReimbursementCommentingEnabled:e,sectionId:o,isDisabled:r,reportTitle:u,reimbursementId:p,style:C})=>{const m=Ie(),S=ft(),b=zt(),l=`dashboard_${S.currentTenant?.companyId}`,k=me.getLocalizedStrings(),f=k.spendManagement.reimbursement.reimbursementDetail,s=k.common.strings.empty,g=lt.labelWidth.value(m);return t.jsxs(wa,{style:C,windowSize:m,children:[t.jsx($a,{windowSize:m,children:f.whatFor}),t.jsx(Sa,{children:t.jsx(fe,{isThreadAllowed:e&&p!=null,dashboardTabKey:xe({type:"details",key:"whatFor"}),roomId:l,companyId:S.currentTenant?.companyId??s,companyName:S.currentTenant?.companyName??s,entityId:p,dashboardOptionType:"reimbursement",filterMetaData:{application:"dashboard",companyId:S.currentTenant?.companyId,tab:"reimbursement",entityId:p,entityType:"reimbursement.details.whatFor"},fieldThreadTargetElement:b?.sharedRef?.contentWrapperRef,style:{borderRadius:i.sp2},children:t.jsx(ui,{isDisabled:r,label:{label:f.reportTitle,width:g},text:{type:"text",name:xa(o,"reportTitle"),placeholder:f.lunchWithClient,defaultValue:u,autoComplete:"off",options:{required:!0,validate:w=>!!w}},style:{width:"auto",borderRadius:i.sp2}})})})]})},wa=n.div`
245
245
  display: flex;
246
246
  flex-direction: column;
247
247
  padding-top: ${e=>lt.paddingTop.valuePx(e.windowSize)};
@@ -258,9 +258,9 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
258
258
  `,$a=n(Bt)`
259
259
  color: ${e=>e.theme.colors.primary};
260
260
  margin-bottom: ${e=>lt.marginBottom.valuePx(e.windowSize)};
261
- `,F={largeLabelWidth:new d(120,120,220),marginTop:new d(28,8),paymentToMarginTop:new d(0,a[4]),marginBottom:new d(a[5],a[4]),paymentToMarginBottom:new d(12,a[3]),totalMarginBottom:new d(a[3],a[3]),reimbursementSectionLeftMargin:new d(a[3],a[6]),reimbursementSectionRightMargin:new d(a[3],a[8]),invoiceSectionLeftMargin:new d(a[3],a[8]),invoiceSectionRightMargin:new d(a[3],a[6]),rightSectionWidth:new d(100,58),firstOrLastItemHeight:new d(390,760),itemHeight:new d(390,459),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6])},va={total:new pi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:It}}},common:{currency:{currencyCode:Dt}}}=me.getLocalizedStrings(),vn=e=>{let o=0,r=Dt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const u=e;o=u.outOfPocket.amount??0,r=u.outOfPocket.currencyCode??Dt}else{const u=e;o=u.outOfPocket.amount?.amount??0,r=u.outOfPocket.amount?.currencyCode??Dt}return(e.homeCurrencyConversions?.currencyCode??Dt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},Ca=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:u,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:S,isFirstOrLastListItem:b,index:l,reimbursementSectionRef:k,showSkipAutoFill:f,lineData:s,currencyConversionState:g,authParams:w,uploadInvoiceEndPoint:P,accountList:T,classList:$,merchantList:K,remiStage:L,autoFieldsByLineId:I,isReimbursementCommentingEnabled:E,isAutoFieldsExist:te,totalAmount:pe,showTotalAmountLoader:A,totalNumberOfLines:_,defaultCurrency:Y,bankAccounts:H,fileRequiredLineIds:ie,isAddReimbursementDisabled:X,duplicateLineByLineId:we,remiStatus:he,file:re,uncategorizedAccounts:J,reportTitle:le,recommendationFetchState:Oe,tentativeMerchantName:R,paymentTo:ge,analytics:se,companyMileageConfigInfo:Ne,loggedInUserDepartmentId:Le,isSignedInUserReimbursementCreator:Ae,setShowBankAccountPage:Se,setRefByLineId:ze,setCurrentLineIdForUpload:ye,onDuplicateLineClick:De,setUploadedReceiptPayload:ct,removeDuplicateReimbursementForLine:W,onReceiptsUpload:et,scrollToSection:tt,onRemoveReimbursement:We,onAddReimbursement:ke,clearTentativeNameForLine:He,onReplaceClick:Te,onDeleteBankAccount:Ue,updateInvoiceUploadFetchState:Ve,removeFileFromLine:qe,allCurrencies:Ke,accountsHierarchyList:ne,classHierarchyList:it})=>{const{formState:{errors:ut}}=dt(),Ge=v.useRef(null);v.useEffect(()=>(ze(z=>({...z,[`L${s.lineId}`]:Ge.current})),()=>{ze(z=>({...z,[`L${s.lineId}`]:null}))}),[s.lineId,ze]);const U=Ie(),mt=L==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,M=F.largeLabelWidth.value(U),ae=z=>z.outOfPocket.account.selectedOption==null&&(z.outOfPocket.amount==null||z.outOfPocket.amount.amount==0)&&(z.outOfPocket.class.selectedOption==null||z.outOfPocket.class.selectedOption===Le)&&(z.outOfPocket.memo===""||z.outOfPocket.memo==null)&&z.outOfPocket.merchant.selectedOption==null&&z.outOfPocket.transactionDate==null,wt=H.map(z=>z.bankAccountId),$e=s.reimbursementType===V.outOfPocketKey&&vn(s)>=75&&re==null;return t.jsxs(Va,{ref:k,windowSize:U,children:[t.jsx(_a,{ref:z=>{z!=null&&(Ge.current=z)},windowSize:U,bottomSeperator:_!==1,showSkipAutoFill:f,isFirstItem:l===0,children:t.jsx(xn,{customError:$e?V.requireReceipt:void 0,analytics:se,showAutofill:!1,uploadInvoiceEndPoint:P,authParams:w,entityId:X?"":void 0,file:re,style:{width:"auto",padding:0,height:b?F.firstOrLastItemHeight.valuePx(U):F.itemHeight.valuePx(U),margin:U==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:Ve,onInvoiceUpload:z=>{s.reimbursementType===V.outOfPocketKey&&!ae(s)?(ye(Number(s.lineId)),ct(z),Te?.()):et(z,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!X,pdfTitle:_>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{Ve?.("In-Progress"),setTimeout(()=>qe?.(Number(s.lineId)))},onReplaceClick:()=>{ye(Number(s.lineId)),Te?.()},allowMultiFiles:_===l+1,type:"reimbursement"})}),t.jsxs(Ua,{windowSize:U,children:[l===0&&U!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(La,{children:mt}),t.jsx(Ha,{children:t.jsx(fo,{progressSectionObj:o,createDate:u,paymentDate:C,scheduleDate:p,approvedDate:S,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Da,{children:[t.jsx(ka,{}),t.jsx(Oa,{children:V.banner})]}),m&&t.jsxs(Ta,{size:U,children:[t.jsx(Ia,{}),t.jsxs(Pa,{children:[t.jsx(ja,{children:V.thereSeems}),t.jsx(Ra,{children:V.pleaseFind})]})]}),t.jsx($n,{isReimbursementCommentingEnabled:E,sectionId:Lt,reportTitle:le,reimbursementId:r})]}):null,t.jsx(aa,{analytics:se,reimbursementId:r,onDuplicateLineClick:De,uncategorizedAccounts:J,sectionId:`${gi}.${l}`,scrollToSection:tt,lineIndex:l,lineData:s,accountList:T,classList:$,merchantList:K,autoFields:s.lineId!=null?I[s.lineId]:[],currencyConversionState:g,recommendationFetchState:Oe,onRemoveReimbursement:We,hasMultipleLineItems:_>1,clearTentativeNameForLine:He,tentativeMerchantName:R,hasFile:re!=null,companyMileageConfigInfo:Ne,defaultCurrency:Y,remiStage:L,remiStatus:he,fileRequiredLineIds:ie,allCurrencies:Ke,isReimbursementCommentingEnabled:E,isAddReimbursementDisabled:X,accountsHierarchyList:ne,classHierarchyList:it,duplicateLineDetails:we[s.lineId],removeDuplicateReimbursementForLine:W}),_!==1&&_===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(za,{windowSize:U,children:[t.jsx(Ba,{children:V.total}),A?t.jsx(Fa,{windowSize:U,children:t.jsx(Ma,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(cn,{amount:ee.toAmount(pe,"USD","$"),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]}),t.jsxs(Na,{windowSize:U,onClick:()=>{X===!1&&ke()},isDisabled:X,"data-testid":q("add-reimbursement-row"),children:[t.jsx(Fi,{}),t.jsx(Bi,{children:V.addReimbursement})]}),Ae?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{windowSize:U,children:V.receivePaymentTo}),t.jsx(Ea,{windowSize:U,shouldDisplay:H.length>0,children:t.jsx(un,{label:{label:V.yourBankAccount,width:M},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Xe(V.yourBankAccount),showValueEyeIcon:!X,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ue,getTooltipInfo:z=>Cn(H,z),onClickCreateBankAccount:()=>Se(!0),getLabelForId:z=>In(H,z),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:X?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:ge,allOptions:wt},registerOptions:{required:!0,validate:z=>!!z.selectedOption}},isFunctional:!0})}),t.jsxs(Wa,{shouldDisplay:H.length===0,windowSize:U,hasError:st(ut,yt),onClick:()=>{X===!1&&Se(!0)},isDisabled:X,"data-testid":q("remi-add-bank-account-container"),children:[t.jsx(Fi,{}),t.jsx(Bi,{children:V.addBankAccount})]})]}):null]})]})]})},Cn=(e,o)=>{const r=kn(e,o);return r==null?`${It.bankRoutingNumber} ${V.emptyValue}
261
+ `,M={largeLabelWidth:new c(120,120,220),marginTop:new c(28,8),paymentToMarginTop:new c(0,a[4]),marginBottom:new c(a[5],a[4]),paymentToMarginBottom:new c(12,a[3]),totalMarginBottom:new c(a[3],a[3]),reimbursementSectionLeftMargin:new c(a[3],a[6]),reimbursementSectionRightMargin:new c(a[3],a[8]),invoiceSectionLeftMargin:new c(a[3],a[8]),invoiceSectionRightMargin:new c(a[3],a[6]),rightSectionWidth:new c(100,58),firstOrLastItemHeight:new c(390,760),itemHeight:new c(390,459),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6])},va={total:new pi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:It}}},common:{currency:{currencyCode:Dt}}}=me.getLocalizedStrings(),vn=e=>{let o=0,r=Dt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const u=e;o=u.outOfPocket.amount??0,r=u.outOfPocket.currencyCode??Dt}else{const u=e;o=u.outOfPocket.amount?.amount??0,r=u.outOfPocket.amount?.currencyCode??Dt}return(e.homeCurrencyConversions?.currencyCode??Dt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},Ca=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:u,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:S,isFirstOrLastListItem:b,index:l,reimbursementSectionRef:k,showSkipAutoFill:f,lineData:s,currencyConversionState:g,authParams:w,uploadInvoiceEndPoint:P,accountList:T,classList:$,merchantList:K,remiStage:L,autoFieldsByLineId:I,isReimbursementCommentingEnabled:E,isAutoFieldsExist:te,totalAmount:pe,showTotalAmountLoader:A,totalNumberOfLines:_,defaultCurrency:Y,bankAccounts:H,fileRequiredLineIds:ie,isAddReimbursementDisabled:X,duplicateLineByLineId:we,remiStatus:he,file:re,uncategorizedAccounts:J,reportTitle:le,recommendationFetchState:Oe,tentativeMerchantName:R,paymentTo:ge,analytics:se,companyMileageConfigInfo:Ne,loggedInUserDepartmentId:Le,isSignedInUserReimbursementCreator:Ae,setShowBankAccountPage:Se,setRefByLineId:ze,setCurrentLineIdForUpload:ye,onDuplicateLineClick:De,setUploadedReceiptPayload:dt,removeDuplicateReimbursementForLine:W,onReceiptsUpload:et,scrollToSection:tt,onRemoveReimbursement:We,onAddReimbursement:ke,clearTentativeNameForLine:He,onReplaceClick:Te,onDeleteBankAccount:Ue,updateInvoiceUploadFetchState:Ve,removeFileFromLine:qe,allCurrencies:Ke,accountsHierarchyList:ne,classHierarchyList:it})=>{const{formState:{errors:ut}}=ct(),Ge=v.useRef(null);v.useEffect(()=>(ze(z=>({...z,[`L${s.lineId}`]:Ge.current})),()=>{ze(z=>({...z,[`L${s.lineId}`]:null}))}),[s.lineId,ze]);const U=Ie(),mt=L==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,F=M.largeLabelWidth.value(U),ae=z=>z.outOfPocket.account.selectedOption==null&&(z.outOfPocket.amount==null||z.outOfPocket.amount.amount==0)&&(z.outOfPocket.class.selectedOption==null||z.outOfPocket.class.selectedOption===Le)&&(z.outOfPocket.memo===""||z.outOfPocket.memo==null)&&z.outOfPocket.merchant.selectedOption==null&&z.outOfPocket.transactionDate==null,wt=H.map(z=>z.bankAccountId),$e=s.reimbursementType===V.outOfPocketKey&&vn(s)>=75&&re==null;return t.jsxs(Va,{ref:k,windowSize:U,children:[t.jsx(_a,{ref:z=>{z!=null&&(Ge.current=z)},windowSize:U,bottomSeperator:_!==1,showSkipAutoFill:f,isFirstItem:l===0,children:t.jsx(xn,{customError:$e?V.requireReceipt:void 0,analytics:se,showAutofill:!1,uploadInvoiceEndPoint:P,authParams:w,entityId:X?"":void 0,file:re,style:{width:"auto",padding:0,height:b?M.firstOrLastItemHeight.valuePx(U):M.itemHeight.valuePx(U),margin:U==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:Ve,onInvoiceUpload:z=>{s.reimbursementType===V.outOfPocketKey&&!ae(s)?(ye(Number(s.lineId)),dt(z),Te?.()):et(z,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!X,pdfTitle:_>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{Ve?.("In-Progress"),setTimeout(()=>qe?.(Number(s.lineId)))},onReplaceClick:()=>{ye(Number(s.lineId)),Te?.()},allowMultiFiles:_===l+1,type:"receipt"})}),t.jsxs(Ua,{windowSize:U,children:[l===0&&U!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(La,{children:mt}),t.jsx(Ha,{children:t.jsx(fo,{progressSectionObj:o,createDate:u,paymentDate:C,scheduleDate:p,approvedDate:S,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Da,{children:[t.jsx(ka,{}),t.jsx(Oa,{children:V.banner})]}),m&&t.jsxs(Ta,{size:U,children:[t.jsx(Ia,{}),t.jsxs(Pa,{children:[t.jsx(ja,{children:V.thereSeems}),t.jsx(Ra,{children:V.pleaseFind})]})]}),t.jsx($n,{isReimbursementCommentingEnabled:E,sectionId:Lt,reportTitle:le,reimbursementId:r})]}):null,t.jsx(aa,{analytics:se,reimbursementId:r,onDuplicateLineClick:De,uncategorizedAccounts:J,sectionId:`${gi}.${l}`,scrollToSection:tt,lineIndex:l,lineData:s,accountList:T,classList:$,merchantList:K,autoFields:s.lineId!=null?I[s.lineId]:[],currencyConversionState:g,recommendationFetchState:Oe,onRemoveReimbursement:We,hasMultipleLineItems:_>1,clearTentativeNameForLine:He,tentativeMerchantName:R,hasFile:re!=null,companyMileageConfigInfo:Ne,defaultCurrency:Y,remiStage:L,remiStatus:he,fileRequiredLineIds:ie,allCurrencies:Ke,isReimbursementCommentingEnabled:E,isAddReimbursementDisabled:X,accountsHierarchyList:ne,classHierarchyList:it,duplicateLineDetails:we[s.lineId],removeDuplicateReimbursementForLine:W}),_!==1&&_===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(za,{windowSize:U,children:[t.jsx(Ba,{children:V.total}),A?t.jsx(Ma,{windowSize:U,children:t.jsx(Fa,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(pe,"USD","$"),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]}),t.jsxs(Na,{windowSize:U,onClick:()=>{X===!1&&ke()},isDisabled:X,"data-testid":q("add-reimbursement-row"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addReimbursement})]}),Ae?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{windowSize:U,children:V.receivePaymentTo}),t.jsx(Ea,{windowSize:U,shouldDisplay:H.length>0,children:t.jsx(un,{label:{label:V.yourBankAccount,width:F},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Xe(V.yourBankAccount),showValueEyeIcon:!X,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ue,getTooltipInfo:z=>Cn(H,z),onClickCreateBankAccount:()=>Se(!0),getLabelForId:z=>In(H,z),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:X?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:ge,allOptions:wt},registerOptions:{required:!0,validate:z=>!!z.selectedOption}},isFunctional:!0})}),t.jsxs(Wa,{shouldDisplay:H.length===0,windowSize:U,hasError:st(ut,yt),onClick:()=>{X===!1&&Se(!0)},isDisabled:X,"data-testid":q("remi-add-bank-account-container"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addBankAccount})]})]}):null]})]})]})},Cn=(e,o)=>{const r=kn(e,o);return r==null?`${It.bankRoutingNumber} ${V.emptyValue}
262
262
  ${It.bankAccountNumber} ${V.emptyValue}`:`${It.bankRoutingNumber} ${r.bankRoutingNumberAch??V.emptyValue}, ${r.bankName??V.emptyValue}
263
- ${It.bankAccountNumber} ${r.bankAccountNumber??V.emptyValue}`},kn=(e,o)=>e.find(r=>r.bankAccountId===o),In=(e,o)=>{const r=kn(e,o);return r==null?V.selectBankAccount:r.bankAccountName?r.bankAccountName:r.maskedAccountNumber?r.maskedAccountNumber:r.bankName&&r.bankAccountNumber?`${r.bankName} ${V.accountNameConnector}${r.bankAccountNumber.slice(r.bankAccountNumber.length-4)}`:V.selectBankAccount},ka=n(ci)`
263
+ ${It.bankAccountNumber} ${r.bankAccountNumber??V.emptyValue}`},kn=(e,o)=>e.find(r=>r.bankAccountId===o),In=(e,o)=>{const r=kn(e,o);return r==null?V.selectBankAccount:r.bankAccountName?r.bankAccountName:r.maskedAccountNumber?r.maskedAccountNumber:r.bankName&&r.bankAccountNumber?`${r.bankName} ${V.accountNameConnector}${r.bankAccountNumber.slice(r.bankAccountNumber.length-4)}`:V.selectBankAccount},ka=n(di)`
264
264
  color: ${e=>e.theme.colors.primary};
265
265
  width: ${i.sp3};
266
266
  height: ${i.sp3};
@@ -282,13 +282,13 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
282
282
  padding: ${i.sp3};
283
283
  border-radius: ${i.sp2};
284
284
  align-items: start;
285
- margin-top: ${e=>F.duplicateBannerWrapperMarginTop.valuePx(e.size)};
286
- margin-right: ${e=>F.duplicateBannerWrapperMarginRight.valuePx(e.size)};
287
- margin-bottom: ${e=>F.duplicateBannerWrapperMarginBottom.valuePx(e.size)};
288
- margin-left: ${e=>F.duplicateBannerWrapperMarginLeft.valuePx(e.size)};
285
+ margin-top: ${e=>M.duplicateBannerWrapperMarginTop.valuePx(e.size)};
286
+ margin-right: ${e=>M.duplicateBannerWrapperMarginRight.valuePx(e.size)};
287
+ margin-bottom: ${e=>M.duplicateBannerWrapperMarginBottom.valuePx(e.size)};
288
+ margin-left: ${e=>M.duplicateBannerWrapperMarginLeft.valuePx(e.size)};
289
289
  background-color: ${j.alertLight};
290
290
  border: 1px solid ${e=>e.theme.colors.brandColorGoldDark};
291
- `,ja=n(Ft)`
291
+ `,ja=n(Mt)`
292
292
  color: ${e=>e.theme.colors.brandColorGoldDark};
293
293
  `,Pa=n.div`
294
294
  width: 100%;
@@ -303,10 +303,10 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
303
303
  `,Aa=n(Bt)`
304
304
  letter-spacing: -0.02em;
305
305
  color: ${e=>e.theme.colors.primary};
306
- margin-top: ${e=>F.paymentToMarginTop.valuePx(e.windowSize)};
307
- margin-bottom: ${e=>F.paymentToMarginBottom.valuePx(e.windowSize)};
308
- margin-left: ${e=>F.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
309
- margin-right: ${e=>F.reimbursementSectionRightMargin.valuePx(e.windowSize)};
306
+ margin-top: ${e=>M.paymentToMarginTop.valuePx(e.windowSize)};
307
+ margin-bottom: ${e=>M.paymentToMarginBottom.valuePx(e.windowSize)};
308
+ margin-left: ${e=>M.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
309
+ margin-right: ${e=>M.reimbursementSectionRightMargin.valuePx(e.windowSize)};
310
310
  `,za=n.div`
311
311
  padding: ${i.sp3};
312
312
  display: flex;
@@ -316,29 +316,29 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
316
316
  border: 1px solid ${e=>e.theme.colors.grey3};
317
317
  border-radius: ${i.sp2};
318
318
  color: ${e=>e.theme.colors.hero};
319
- margin-top: ${e=>F.totalMarginBottom.valuePx(e.windowSize)};
320
- margin-left: ${e=>F.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
321
- margin-right: ${e=>F.reimbursementSectionRightMargin.valuePx(e.windowSize)};
322
- margin-bottom: ${e=>F.totalMarginBottom.valuePx(e.windowSize)};
319
+ margin-top: ${e=>M.totalMarginBottom.valuePx(e.windowSize)};
320
+ margin-left: ${e=>M.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
321
+ margin-right: ${e=>M.reimbursementSectionRightMargin.valuePx(e.windowSize)};
322
+ margin-bottom: ${e=>M.totalMarginBottom.valuePx(e.windowSize)};
323
323
  justify-content: space-between;
324
324
  `,Ba=n(pn)`
325
325
  display: flex;
326
326
  width: 176px;
327
327
  color: ${e=>e.theme.colors.primary};
328
- `,Fa=n(hn)`
328
+ `,Ma=n(hn)`
329
329
  display: flex;
330
330
  width: calc(100% - 176px);
331
331
  justify-content: flex-end;
332
332
  color: ${e=>e.theme.colors.primary};
333
333
  ${e=>`${va.total.style(e.windowSize)}`};
334
- `,Ma=n.div`
334
+ `,Fa=n.div`
335
335
  padding-right: ${i.sp3};
336
336
  height: 30px;
337
337
  display: flex;
338
338
  justify-content: flex-end;
339
339
  `,Ea=n.div`
340
- margin-left: ${e=>F.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
341
- margin-right: ${e=>F.reimbursementSectionRightMargin.valuePx(e.windowSize)};
340
+ margin-left: ${e=>M.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
341
+ margin-right: ${e=>M.reimbursementSectionRightMargin.valuePx(e.windowSize)};
342
342
  margin-bottom: ${i.sp3};
343
343
  border: 1px solid ${e=>e.theme.colors.grey3};
344
344
  border-radius: ${i.sp2};
@@ -359,10 +359,10 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
359
359
  border: 1px solid
360
360
  ${e=>e.isDisabled?e.theme.colors.grey3:e.hasError===!0?j.important:e.theme.colors.primary};
361
361
  }
362
- margin-top: ${e=>F.totalMarginBottom.valuePx(e.windowSize)};
363
- margin-left: ${e=>F.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
364
- margin-right: ${e=>F.reimbursementSectionRightMargin.valuePx(e.windowSize)};
365
- margin-bottom: ${e=>F.marginBottom.valuePx(e.windowSize)};
362
+ margin-top: ${e=>M.totalMarginBottom.valuePx(e.windowSize)};
363
+ margin-left: ${e=>M.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
364
+ margin-right: ${e=>M.reimbursementSectionRightMargin.valuePx(e.windowSize)};
365
+ margin-bottom: ${e=>M.marginBottom.valuePx(e.windowSize)};
366
366
  `,Wa=n.div`
367
367
  padding: ${i.sp3};
368
368
  display: ${e=>e.shouldDisplay?"flex":"none"};
@@ -378,19 +378,19 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
378
378
  border: 1px solid
379
379
  ${e=>e.isDisabled?e.theme.colors.grey3:e.hasError===!0?j.important:e.theme.colors.primary};
380
380
  }
381
- margin-left: ${e=>F.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
382
- margin-right: ${e=>F.reimbursementSectionRightMargin.valuePx(e.windowSize)};
383
- margin-bottom: ${e=>F.marginBottom.valuePx(e.windowSize)};
384
- `,Bi=n(Ft)`
381
+ margin-left: ${e=>M.reimbursementSectionLeftMargin.valuePx(e.windowSize)};
382
+ margin-right: ${e=>M.reimbursementSectionRightMargin.valuePx(e.windowSize)};
383
+ margin-bottom: ${e=>M.marginBottom.valuePx(e.windowSize)};
384
+ `,Bi=n(Mt)`
385
385
  color: inherit;
386
- `,Fi=n(gn)`
386
+ `,Mi=n(gn)`
387
387
  margin-right: ${i.sp2};
388
388
  width: ${i.sp3};
389
389
  height: ${i.sp3};
390
390
  `,Ua=n.div`
391
391
  display: flex;
392
392
  flex-direction: column;
393
- width: ${e=>F.rightSectionWidth.valuePercentage(e.windowSize)};
393
+ width: ${e=>M.rightSectionWidth.valuePercentage(e.windowSize)};
394
394
  `,Va=n.div`
395
395
  display: flex;
396
396
  width: 100%;
@@ -400,14 +400,14 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
400
400
  background: ${e=>e.theme.colors.grey3};
401
401
  border-radius: ${i.sp2};
402
402
  width: ${e=>e.windowSize==="small"?"auto":"42%"};
403
- margin-left: ${e=>F.invoiceSectionLeftMargin.valuePx(e.windowSize)};
404
- margin-right: ${e=>F.invoiceSectionRightMargin.valuePx(e.windowSize)};
403
+ margin-left: ${e=>M.invoiceSectionLeftMargin.valuePx(e.windowSize)};
404
+ margin-right: ${e=>M.invoiceSectionRightMargin.valuePx(e.windowSize)};
405
405
  visibility: ${e=>e.showSkipAutoFill?"hidden":"unset"};
406
406
  margin-bottom: ${e=>e.bottomSeperator===!0&&e.windowSize!=="small"?e.isFirstItem?"102px":i.sp10:0};
407
- margin-top: ${e=>F.marginTop.valuePx(e.windowSize)};
407
+ margin-top: ${e=>M.marginTop.valuePx(e.windowSize)};
408
408
  `,Ha=n.div`
409
409
  padding: ${i.sp2} ${i.sp8} ${i.sp0} ${i.sp6};
410
- `,qa={total:new pi("largeMedium","h6Medium")},Q={largeLabelWidth:new d(120,120,220),marginBottom:new d(a[5],a[4]),addBankAccountMarginBottom:new d(a[5],a[5]),marginTop:new d(a[0],78),paymentToMarginTop:new d(0,a[4]),totalMarginBottom:new d(a[3],a[3]),rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),paymentToMarginBottom:new d(12,a[3])},Ze=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,Ka=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:u,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:S,defaultCurrency:b,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:f,companyMileageConfigInfo:s,analytics:g,reimbursementId:w,currencyConversionStatus:P,setShowSkipAutoFill:T,setShowBankAccountPage:$,removeDuplicateReimbursementForLine:K,onReceiptsUpload:L,setCurrentLineIdForUpload:I,onDuplicateLineClick:E,setUploadedReceiptPayload:te,removeFileFromLine:pe,onReplaceClick:A,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,onDeleteBankAccount:H,uncategorizedAccounts:ie,isSignedInUserReimbursementCreator:X,duplicateLineByLineId:we,showTotalAmountLoader:he,scrollContainerRef:re})=>{const{control:J,formState:{errors:le}}=dt(),{fields:Oe,append:R,remove:ge}=uo({name:gi,control:J}),se=Oe,Ne=v.useRef(null),Le=M=>{setTimeout(()=>{ge(M)})},{tentativeMerchantNameByLineId:Ae,remiStage:Se,remiStatus:ze}=e,ye=!X||Se==="pending_approval"&&ze!=="rejected"&&o||Se==="pending_approval"&&ze==="rejected",De=ye?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,ct=De.map(M=>M.bankAccountId),W=Ie(),et=Q.largeLabelWidth.value(W),tt=e.whatForSection.reportTitle,We=e.accountList.accounts,ke=e.accountsHierarchyList,He=e.classHierarchyList,Te=e.classList.classes,Ue=e.merchantList.merchants,Ve=e.addRemiAutoFieldsByLineId,qe=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(M=>Number(M)),0),Ke=()=>{const M=se[se.length-1],ae=Dn(se.length,Number(M.lineId)>qe?String(Number(M.lineId)+1):String(qe+1),ke,He,Ue,b,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{R(ae,{shouldFocus:!1})}),I(Number(ae.lineId)),T(!0),setTimeout(()=>Ri(Ne.current,re?.current),50)},[ne,it]=v.useState({}),ut=v.useCallback(M=>{const ae=ne[`L${M}`];ae!=null&&Ri(ae,re?.current)},[ne,re]),Ge=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,U=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,mt=e.reimbursementInfo?.expectedDepositDate??U;return t.jsxs(Qa,{windowSize:W,showSkipAutoFill:p,children:[se.map((M,ae)=>t.jsx(Ca,{removeDuplicateReimbursementForLine:K,onDuplicateLineClick:E,scrollToSection:ut,setRefByLineId:it,duplicateLineByLineId:we,reimbursementId:w,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:ie,progressSectionObj:Ge,createDate:e.createTime,paymentDate:mt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:se.length-1===ae||ae===0,index:ae,reimbursementSectionRef:Ne,remiStage:Se,remiStatus:ze,authParams:r,file:M.file,uploadInvoiceEndPoint:u,showSkipAutoFill:p,lineData:M,currencyConversionState:P[M.lineId],recommendationFetchState:e.lineDetailSection[M.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:I,setUploadedReceiptPayload:te,onReplaceClick:A,onReceiptsUpload:L,removeFileFromLine:pe,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:tt,accountList:We,classList:Te,merchantList:Ue,autoFieldsByLineId:Ve,onRemoveReimbursement:Le,onAddReimbursement:Ke,totalAmount:S,showTotalAmountLoader:he,hasDuplicateLine:l,totalNumberOfLines:se.length,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,tentativeMerchantName:Ae[M.lineId],companyMileageConfigInfo:s,defaultCurrency:b,setShowBankAccountPage:$,paymentTo:e.paymentTo,bankAccounts:De,onDeleteBankAccount:H,analytics:g,fileRequiredLineIds:f,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ye,accountsHierarchyList:ke,classHierarchyList:He,isSignedInUserReimbursementCreator:X},M.lineId)),se.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(Za,{windowSize:W,children:[t.jsx(Xa,{children:Ze.total}),he?t.jsx(tr,{windowSize:W,children:t.jsx(ir,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(cn,{amount:ee.toAmount(S,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(nr,{windowSize:W,onClick:()=>{ye===!1&&Ke()},isDisabled:ye,"data-testid":q("add-reimbursement-container"),children:[t.jsx(Ei,{}),t.jsx(Mi,{children:Ze.addReimbursement})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,X?t.jsxs(Yt,{windowSize:W,children:[t.jsx(er,{windowSize:W,children:Ze.receivePaymentTo}),t.jsx(Ja,{windowSize:W,shouldDisplay:De.length>0,children:t.jsx(un,{label:{label:Ze.yourBankAccount,width:et},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Xe(Ze.yourBankAccount),showValueEyeIcon:!ye,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:H,getTooltipInfo:M=>Cn(De,M),onClickCreateBankAccount:()=>$(!0),getLabelForId:M=>In(De,M),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ye?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:ct},registerOptions:{required:!0,validate:M=>!!M.selectedOption}},isFunctional:!0})}),t.jsxs(or,{shouldDisplay:De.length===0,windowSize:W,onClick:()=>{ye===!1&&$(!0)},hasError:st(le,yt),isDisabled:ye,"data-testid":q("remi-add-bank-account-container"),children:[t.jsx(Ei,{}),t.jsx(Mi,{children:Ze.addBankAccount})]})]}):null]})]})]})},Dn=(e,o,r,u,p,C,m,S)=>{const b=Ga(r,u,p,C,m,S);return{lineIndex:e,lineId:o,reimbursementType:Ze.outOfPocketKey,file:void 0,outOfPocket:b,mileage:Ya(u,C,S)}},Ga=(e,o,r,u,p,C)=>({transactionDate:void 0,class:{allOptions:_e(o,[]),selectedOption:C},account:{allOptions:At(e,[]),selectedOption:void 0},amount:{amount:0,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:si(m.countryCode)})),selectedOption:u.currencyCode??me.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Ya=(e,o,r)=>({transactionDate:void 0,class:{allOptions:_e(e,[]),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Ja=n.div`
410
+ `,qa={total:new pi("largeMedium","h6Medium")},Q={largeLabelWidth:new c(120,120,220),marginBottom:new c(a[5],a[4]),addBankAccountMarginBottom:new c(a[5],a[5]),marginTop:new c(a[0],78),paymentToMarginTop:new c(0,a[4]),totalMarginBottom:new c(a[3],a[3]),rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),paymentToMarginBottom:new c(12,a[3])},Ze=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,Ka=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:u,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:S,defaultCurrency:b,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:f,companyMileageConfigInfo:s,analytics:g,reimbursementId:w,currencyConversionStatus:P,setShowSkipAutoFill:T,setShowBankAccountPage:$,removeDuplicateReimbursementForLine:K,onReceiptsUpload:L,setCurrentLineIdForUpload:I,onDuplicateLineClick:E,setUploadedReceiptPayload:te,removeFileFromLine:pe,onReplaceClick:A,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,onDeleteBankAccount:H,uncategorizedAccounts:ie,isSignedInUserReimbursementCreator:X,duplicateLineByLineId:we,showTotalAmountLoader:he,scrollContainerRef:re})=>{const{control:J,formState:{errors:le}}=ct(),{fields:Oe,append:R,remove:ge}=uo({name:gi,control:J}),se=Oe,Ne=v.useRef(null),Le=F=>{setTimeout(()=>{ge(F)})},{tentativeMerchantNameByLineId:Ae,remiStage:Se,remiStatus:ze}=e,ye=!X||Se==="pending_approval"&&ze!=="rejected"&&o||Se==="pending_approval"&&ze==="rejected",De=ye?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,dt=De.map(F=>F.bankAccountId),W=Ie(),et=Q.largeLabelWidth.value(W),tt=e.whatForSection.reportTitle,We=e.accountList.accounts,ke=e.accountsHierarchyList,He=e.classHierarchyList,Te=e.classList.classes,Ue=e.merchantList.merchants,Ve=e.addRemiAutoFieldsByLineId,qe=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(F=>Number(F)),0),Ke=()=>{const F=se[se.length-1],ae=Dn(se.length,Number(F.lineId)>qe?String(Number(F.lineId)+1):String(qe+1),ke,He,Ue,b,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{R(ae,{shouldFocus:!1})}),I(Number(ae.lineId)),T(!0),setTimeout(()=>Ri(Ne.current,re?.current),50)},[ne,it]=v.useState({}),ut=v.useCallback(F=>{const ae=ne[`L${F}`];ae!=null&&Ri(ae,re?.current)},[ne,re]),Ge=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,U=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,mt=e.reimbursementInfo?.expectedDepositDate??U;return t.jsxs(Qa,{windowSize:W,showSkipAutoFill:p,children:[se.map((F,ae)=>t.jsx(Ca,{removeDuplicateReimbursementForLine:K,onDuplicateLineClick:E,scrollToSection:ut,setRefByLineId:it,duplicateLineByLineId:we,reimbursementId:w,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:ie,progressSectionObj:Ge,createDate:e.createTime,paymentDate:mt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:se.length-1===ae||ae===0,index:ae,reimbursementSectionRef:Ne,remiStage:Se,remiStatus:ze,authParams:r,file:F.file,uploadInvoiceEndPoint:u,showSkipAutoFill:p,lineData:F,currencyConversionState:P[F.lineId],recommendationFetchState:e.lineDetailSection[F.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:I,setUploadedReceiptPayload:te,onReplaceClick:A,onReceiptsUpload:L,removeFileFromLine:pe,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:tt,accountList:We,classList:Te,merchantList:Ue,autoFieldsByLineId:Ve,onRemoveReimbursement:Le,onAddReimbursement:Ke,totalAmount:S,showTotalAmountLoader:he,hasDuplicateLine:l,totalNumberOfLines:se.length,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,tentativeMerchantName:Ae[F.lineId],companyMileageConfigInfo:s,defaultCurrency:b,setShowBankAccountPage:$,paymentTo:e.paymentTo,bankAccounts:De,onDeleteBankAccount:H,analytics:g,fileRequiredLineIds:f,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ye,accountsHierarchyList:ke,classHierarchyList:He,isSignedInUserReimbursementCreator:X},F.lineId)),se.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(Za,{windowSize:W,children:[t.jsx(Xa,{children:Ze.total}),he?t.jsx(tr,{windowSize:W,children:t.jsx(ir,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(S,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(nr,{windowSize:W,onClick:()=>{ye===!1&&Ke()},isDisabled:ye,"data-testid":q("add-reimbursement-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Ze.addReimbursement})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,X?t.jsxs(Yt,{windowSize:W,children:[t.jsx(er,{windowSize:W,children:Ze.receivePaymentTo}),t.jsx(Ja,{windowSize:W,shouldDisplay:De.length>0,children:t.jsx(un,{label:{label:Ze.yourBankAccount,width:et},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Xe(Ze.yourBankAccount),showValueEyeIcon:!ye,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:H,getTooltipInfo:F=>Cn(De,F),onClickCreateBankAccount:()=>$(!0),getLabelForId:F=>In(De,F),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ye?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:dt},registerOptions:{required:!0,validate:F=>!!F.selectedOption}},isFunctional:!0})}),t.jsxs(or,{shouldDisplay:De.length===0,windowSize:W,onClick:()=>{ye===!1&&$(!0)},hasError:st(le,yt),isDisabled:ye,"data-testid":q("remi-add-bank-account-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Ze.addBankAccount})]})]}):null]})]})]})},Dn=(e,o,r,u,p,C,m,S)=>{const b=Ga(r,u,p,C,m,S);return{lineIndex:e,lineId:o,reimbursementType:Ze.outOfPocketKey,file:void 0,outOfPocket:b,mileage:Ya(u,C,S)}},Ga=(e,o,r,u,p,C)=>({transactionDate:void 0,class:{allOptions:_e(o,[]),selectedOption:C},account:{allOptions:At(e,[]),selectedOption:void 0},amount:{amount:0,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:si(m.countryCode)})),selectedOption:u.currencyCode??me.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Ya=(e,o,r)=>({transactionDate:void 0,class:{allOptions:_e(e,[]),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Ja=n.div`
411
411
  margin-left: ${e=>Q.leftMargin.valuePx(e.windowSize)};
412
412
  margin-right: ${e=>Q.rightMargin.valuePx(e.windowSize)};
413
413
  margin-bottom: ${e=>Q.addBankAccountMarginBottom.valuePx(e.windowSize)};
@@ -495,7 +495,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
495
495
  margin-left: ${e=>Q.leftMargin.valuePx(e.windowSize)};
496
496
  margin-right: ${e=>Q.rightMargin.valuePx(e.windowSize)};
497
497
  margin-bottom: ${e=>Q.addBankAccountMarginBottom.valuePx(e.windowSize)};
498
- `,Mi=n(Ft)`
498
+ `,Fi=n(Mt)`
499
499
  color: inherit;
500
500
  `,Ei=n(gn)`
501
501
  margin-right: ${i.sp2};
@@ -504,7 +504,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
504
504
  `,Jt=n.div`
505
505
  display: flex;
506
506
  width: 100%;
507
- `,Re={buttonWidth:new d(140,140),paddingLeft:new d(a[3],a[6]),paddingRight:new d(a[3],a[8]),subTitleMarginbottom:new d(a[2],a[3]),orSeperatorTopBottomMargin:new d(a[6],44),iconWidthHeight:new d(20,a[4])},Ni="userBankAccountPage",Pt="bankAccountSection",ar=e=>({[Pt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Wi=e=>`${e}_form`,rr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:u,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:S,onSaveHandler:b,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:f})=>{const s=bt(),g=Ie(),w=en({mode:"onBlur",reValidateMode:"onChange",defaultValues:v.useMemo(()=>ar(C),[C])}),P=v.useCallback(Y=>{p?.(Y),f()},[f,p]),T=r.link_account_no_microdeposit,{open:$}=po({token:T.linkToken??null,onSuccess:P});v.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(T.expiration)||T.linkToken==null)&&u?.("link_account_no_microdeposit")},[]);const[K,L]=v.useState(!1),I=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,E=me.getLocalizedStrings().common.footer,te={onOkClick:()=>{L(!1),w.reset(),f()},onCancelClick:()=>{L(!1)}},pe=async(Y,H)=>{const ie=H[Pt].bankRoutingNumber;l(H),Y===`${Pt}.bankRoutingNumber`&&ie?.length===9&&xo.test(ie)===!0&&k?.(ie)};v.useEffect(()=>{const Y=w.watch((H,{name:ie})=>{ie!=null&&H!=null&&ho(()=>pe(ie,H))});return()=>{Y.unsubscribe()}}),v.useEffect(()=>{e?.fetchState==="Completed"&&f()},[e?.fetchState,f,o]);const A=w.handleSubmit(Y=>{m.fetchState!=="In-Progress"&&b()}),_=s.mode==="light"?new Di(s.colors.brandColorJadeLight):new Di(s.colors.brandColorJadeDark);return t.jsxs(lr,{children:[t.jsxs(hr,{windowSize:g,children:[K===!0?t.jsx(li,{titleComponent:t.jsx(an,{children:I.discardTitle}),descriptionComponent:t.jsx(on,{children:I.discardDescription}),primaryButtonText:I.buttons.delete,secondaryButtonText:I.buttons.cancel,action:te}):null,t.jsx(Bo,{header:I.addBankAccount,isDirty:w.formState.isDirty,onBackClick:f,setShowConfirmationPopup:L}),t.jsx(sr,{}),t.jsxs(gr,{size:g,children:[t.jsx(Ao,{onClick:()=>{w.reset(),$()},title:I.connectYourBank,subTitle:I.loginToBank,header:I.setupAchPayments,icon:{element:t.jsx(go,{width:Re.iconWidthHeight.valuePx(g),height:Re.iconWidthHeight.valuePx(g)}),color:_},style:{width:"unset",rowGap:g==="small"?i.sp2:void 0}}),t.jsxs(dr,{windowSize:g,children:[t.jsx(cr,{}),t.jsx(mr,{children:t.jsx(pr,{children:I.or})})]}),t.jsx(ur,{windowSize:g,children:I.saveAccountManually})]}),t.jsx(yr,{size:g,children:t.jsx(nn,{...w,children:t.jsxs("form",{id:Wi(Ni),onSubmit:A,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Fo,{warningText:I.accountExistWarning}):null,t.jsx(zo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Pt})]})})})]}),t.jsx(ln,{formId:Wi(Ni),primaryBtn:{label:I.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Re.buttonWidth.value(g)},isDisabled:S!=null},cancelBtn:{label:E.cancel,style:{width:Re.buttonWidth.value(g)},shouldResetOnCancel:!1,onClick:()=>{w.formState.isDirty?L(!0):(L(!1),w.reset(),f())}}})]})},lr=n.div`
507
+ `,Re={buttonWidth:new c(140,140),paddingLeft:new c(a[3],a[6]),paddingRight:new c(a[3],a[8]),subTitleMarginbottom:new c(a[2],a[3]),orSeperatorTopBottomMargin:new c(a[6],44),iconWidthHeight:new c(20,a[4])},Ni="userBankAccountPage",Pt="bankAccountSection",ar=e=>({[Pt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Wi=e=>`${e}_form`,rr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:u,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:S,onSaveHandler:b,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:f})=>{const s=bt(),g=Ie(),w=en({mode:"onBlur",reValidateMode:"onChange",defaultValues:v.useMemo(()=>ar(C),[C])}),P=v.useCallback(Y=>{p?.(Y),f()},[f,p]),T=r.link_account_no_microdeposit,{open:$}=po({token:T.linkToken??null,onSuccess:P});v.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(T.expiration)||T.linkToken==null)&&u?.("link_account_no_microdeposit")},[]);const[K,L]=v.useState(!1),I=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,E=me.getLocalizedStrings().common.footer,te={onOkClick:()=>{L(!1),w.reset(),f()},onCancelClick:()=>{L(!1)}},pe=async(Y,H)=>{const ie=H[Pt].bankRoutingNumber;l(H),Y===`${Pt}.bankRoutingNumber`&&ie?.length===9&&xo.test(ie)===!0&&k?.(ie)};v.useEffect(()=>{const Y=w.watch((H,{name:ie})=>{ie!=null&&H!=null&&ho(()=>pe(ie,H))});return()=>{Y.unsubscribe()}}),v.useEffect(()=>{e?.fetchState==="Completed"&&f()},[e?.fetchState,f,o]);const A=w.handleSubmit(Y=>{m.fetchState!=="In-Progress"&&b()}),_=s.mode==="light"?new Di(s.colors.brandColorJadeLight):new Di(s.colors.brandColorJadeDark);return t.jsxs(lr,{children:[t.jsxs(hr,{windowSize:g,children:[K===!0?t.jsx(li,{titleComponent:t.jsx(an,{children:I.discardTitle}),descriptionComponent:t.jsx(on,{children:I.discardDescription}),primaryButtonText:I.buttons.delete,secondaryButtonText:I.buttons.cancel,action:te}):null,t.jsx(Bo,{header:I.addBankAccount,isDirty:w.formState.isDirty,onBackClick:f,setShowConfirmationPopup:L}),t.jsx(sr,{}),t.jsxs(gr,{size:g,children:[t.jsx(Ao,{onClick:()=>{w.reset(),$()},title:I.connectYourBank,subTitle:I.loginToBank,header:I.setupAchPayments,icon:{element:t.jsx(go,{width:Re.iconWidthHeight.valuePx(g),height:Re.iconWidthHeight.valuePx(g)}),color:_},style:{width:"unset",rowGap:g==="small"?i.sp2:void 0}}),t.jsxs(cr,{windowSize:g,children:[t.jsx(dr,{}),t.jsx(mr,{children:t.jsx(pr,{children:I.or})})]}),t.jsx(ur,{windowSize:g,children:I.saveAccountManually})]}),t.jsx(yr,{size:g,children:t.jsx(nn,{...w,children:t.jsxs("form",{id:Wi(Ni),onSubmit:A,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Mo,{warningText:I.accountExistWarning}):null,t.jsx(zo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Pt})]})})})]}),t.jsx(ln,{formId:Wi(Ni),primaryBtn:{label:I.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Re.buttonWidth.value(g)},isDisabled:S!=null},cancelBtn:{label:E.cancel,style:{width:Re.buttonWidth.value(g)},shouldResetOnCancel:!1,onClick:()=>{w.formState.isDirty?L(!0):(L(!1),w.reset(),f())}}})]})},lr=n.div`
508
508
  display: flex;
509
509
  flex-direction: column;
510
510
  width: 100%;
@@ -512,10 +512,10 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
512
512
  `,sr=n.div`
513
513
  margin: ${i.sp2} 0;
514
514
  position: relative;
515
- `,dr=n.div`
515
+ `,cr=n.div`
516
516
  margin: ${e=>Re.orSeperatorTopBottomMargin.valuePx(e.windowSize)} 0;
517
517
  position: relative;
518
- `,cr=n.div`
518
+ `,dr=n.div`
519
519
  background: ${e=>e.theme.colors.grey2};
520
520
  height: 1px;
521
521
  `,ur=n(wo)`
@@ -547,7 +547,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
547
547
  padding-left: ${e=>Re.paddingLeft.valuePx(e.size)};
548
548
  padding-right: ${e=>Re.paddingRight.valuePx(e.size)};
549
549
  padding-bottom: ${i.sp3};
550
- `,Ce={containerWidth:new d(343,544),confirmationPopUpTitleMarginTop:new d(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new d(a[5],a[8]),submitButtonWidth:new d(145,156),cancelButtonWidth:new d(121,121),errorLineItemGap:new d(a[2],12),styledCloseIconRight:new d(a[3],a[8])},{footer:Ui}=me.getLocalizedStrings().common,ue=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(Hi,{});case"In-Progress":return t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(Tn,{});default:return t.jsx(Hi,{})}},br=e=>{switch(e){case"Not-Started":return ue.detectDuplicates;case"In-Progress":return ue.detectingDuplicates;case"Completed":return ue.noDuplicatesFound;default:return ue.detectDuplicates}},fr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:u,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:S,fetchDuplicateReimbursement:b,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const f=Ie(),[s,g]=vt.useState(!0),w=ai(e),P=ai(o);vt.useEffect(()=>{setTimeout(()=>{s&&(g(!1),o==="Not-Started"&&b())},2e3)},[o,b,s]),vt.useEffect(()=>{w==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,w,p,l]),vt.useEffect(()=>{P==="In-Progress"&&o==="Completed"&&!r&&S()},[P,o,r,S]);const T=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[T?t.jsx(xr,{size:f}):null,t.jsx(li,{action:{onOkClick:()=>{T?(l(),e==="Error"&&k(),g(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(u,m),p(!1),ro())},onCancelClick:()=>{T?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(u,m),S())}},shouldClickAway:T,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:T?Ui.resubmit:ue.primaryButtonText,secondaryButtonText:T?Ui.cancel:ue.secondaryButtonText,primaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),secondaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),descriptionComponent:t.jsx($r,{size:f,children:t.jsxs(wr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Zt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(Tn,{}),t.jsx(Qt,{isDisabled:!1,children:s?ue.reviewingExpenses:ue.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(qi,{children:o==="Error"?ue.failedToDetect:`${u} ${ue.duplicateExpensesFound}`})]}):t.jsxs(Zt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&u===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Qt,{isDisabled:o==="Not-Started",children:br(o)})]}),e==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(qi,{children:ue.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Zt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Qt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?ue.submitReport:ue.submittingReport})]})]})}),titleComponent:t.jsx(Sr,{size:f,children:ue.title}),showFooter:r||T,containerStyle:{width:Ce.containerWidth.value(f),maxWidth:"unset"}})]})},xr=n(dn)`
550
+ `,Ce={containerWidth:new c(343,544),confirmationPopUpTitleMarginTop:new c(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new c(a[5],a[8]),submitButtonWidth:new c(145,156),cancelButtonWidth:new c(121,121),errorLineItemGap:new c(a[2],12),styledCloseIconRight:new c(a[3],a[8])},{footer:Ui}=me.getLocalizedStrings().common,ue=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(Hi,{});case"In-Progress":return t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(Tn,{});default:return t.jsx(Hi,{})}},br=e=>{switch(e){case"Not-Started":return ue.detectDuplicates;case"In-Progress":return ue.detectingDuplicates;case"Completed":return ue.noDuplicatesFound;default:return ue.detectDuplicates}},fr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:u,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:S,fetchDuplicateReimbursement:b,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const f=Ie(),[s,g]=vt.useState(!0),w=ai(e),P=ai(o);vt.useEffect(()=>{setTimeout(()=>{s&&(g(!1),o==="Not-Started"&&b())},2e3)},[o,b,s]),vt.useEffect(()=>{w==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,w,p,l]),vt.useEffect(()=>{P==="In-Progress"&&o==="Completed"&&!r&&S()},[P,o,r,S]);const T=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[T?t.jsx(xr,{size:f}):null,t.jsx(li,{action:{onOkClick:()=>{T?(l(),e==="Error"&&k(),g(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(u,m),p(!1),ro())},onCancelClick:()=>{T?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(u,m),S())}},shouldClickAway:T,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:T?Ui.resubmit:ue.primaryButtonText,secondaryButtonText:T?Ui.cancel:ue.secondaryButtonText,primaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),secondaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),descriptionComponent:t.jsx($r,{size:f,children:t.jsxs(wr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Zt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(Tn,{}),t.jsx(Qt,{isDisabled:!1,children:s?ue.reviewingExpenses:ue.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(qi,{children:o==="Error"?ue.failedToDetect:`${u} ${ue.duplicateExpensesFound}`})]}):t.jsxs(Zt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&u===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Qt,{isDisabled:o==="Not-Started",children:br(o)})]}),e==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(qi,{children:ue.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Zt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Qt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?ue.submitReport:ue.submittingReport})]})]})}),titleComponent:t.jsx(Sr,{size:f,children:ue.title}),showFooter:r||T,containerStyle:{width:Ce.containerWidth.value(f),maxWidth:"unset"}})]})},xr=n(cn)`
551
551
  width: ${i.sp4};
552
552
  height: ${i.sp4};
553
553
  color: ${e=>e.theme.colors.hero};
@@ -564,7 +564,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
564
564
  height: ${i.sp4};
565
565
  min-width: ${i.sp4};
566
566
  color: ${j.brandColorGoldDark};
567
- `,Hi=n(Mo)`
567
+ `,Hi=n(Fo)`
568
568
  width: ${i.sp3};
569
569
  height: ${i.sp3};
570
570
  min-width: ${i.sp3};
@@ -596,7 +596,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
596
596
  padding: ${i.sp3};
597
597
  border-radius: ${i.sp2};
598
598
  text-align: left;
599
- `,Sr=n(di)`
599
+ `,Sr=n(ci)`
600
600
  margin-top: ${e=>Ce.confirmationPopUpTitleMarginTop.valuePx(e.size)};
601
601
  padding-left: ${e=>Ce.confirmationPopUpTitlePaddingLeftRight.valuePx(e.size)};
602
602
  padding-right: ${e=>Ce.confirmationPopUpTitlePaddingLeftRight.valuePx(e.size)};
@@ -616,7 +616,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
616
616
  height: ${i.sp4};
617
617
  min-width: ${i.sp4};
618
618
  color: ${j.success};
619
- `,Z={rightMargin:new d(a[3],a[8]),leftMargin:new d(a[3],a[6]),bottomMargin:new d(56,56),closeMarginTop:new d(0,19),closeMarginRight:new d(a[3],a[8]),rightSectionWidth:new d(100,58),leftSectionWidth:new d(100,42),footerButtonWidth:new d(120,165),right:new d(a[3],a[0]),actionsContainerRight:new d(a[0],a[6]),otherActionsContainerBottom:new d(58,44),duplicateBannerWrapperMarginTop:new d(a[5],a[3]),duplicateBannerWrapperMarginRight:new d(a[3],a[8]),duplicateBannerWrapperMarginBottom:new d(a[5],a[3]),duplicateBannerWrapperMarginLeft:new d(a[3],a[6]),navBarWidth:new d(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:y,bulkActions:Gi}},common:{currency:{currencyCode:Fe,currencySymbol:Tt},texts:{comments:vr},strings:{empty:Cr}},collaboration:{threads:{placeholder:{addANewComment:kr,replyAComment:Ir},tooltip:{resolveComment:Dr,unResolveComment:Tr}}},dateFormat:Yi}=me.getLocalizedStrings(),Ji="editReimbursementDetailPage",Qi=e=>`${e}_form`,jr=(e,o,r,u,p,C,m,S,b)=>{const l=e.outOfPocket,k=e.mileage,f=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??y.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:_e(r,[]),selectedOption:l?.lineDetail?.class?.classId??b},account:{allOptions:At(o,s),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:S.map(g=>({label:`${g.currencyCode} - ${g.currency}`,value:g.currencyCode,countryCode:si(g.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??Fe}},memo:l?.description??void 0,merchant:{allOptions:u.map(g=>g.id).filter(g=>!!g),selectedOption:f?.id?f?.id:f?.name?f?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:_e(r,[]),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},Xt=(e,o,r)=>{const u=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&u.push(jr(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),u.length===0&&u.push(Dn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[Lt]:{reportTitle:e.whatForSection.reportTitle},[gi]:u,[yt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ei=(e,o)=>{const r=u=>u.lineId==null||o[u.lineId]?.fetchState==="In-Progress"?0:(o[u.lineId]?.fetchState,u.type===y.mileageKey?u?.mileage?.amount??0:u?.outOfPocket?.currencyCode!==Fe&&u.homeCurrencyConversions?.amount!==u?.outOfPocket?.amount?u.homeCurrencyConversions?.amount??0:u?.outOfPocket?.amount??0);return Object.values(e).reduce((u,p)=>u+r(p),0)},ti=(e,o,r,u,p,C,m,S)=>{const b={};return e.lineInfo.forEach(l=>{const k=S.find(P=>P.classId===l.mileage.class.selectedOption),f=m.find(P=>P.qboId===l.outOfPocket.account.selectedOption||P.accountId===l.outOfPocket.account.selectedOption),s=S.find(P=>P.classId===l.outOfPocket.class.selectedOption),g=o.find(P=>P.id===l.outOfPocket.merchant.selectedOption),w=C.find(P=>P.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;b[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??w,currencySymbol:l.mileage.amount?.currencySymbol??w,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:f},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??w,currencySymbol:w,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:g?.id??"",name:g?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:b,totalAmount:{amount:u,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Pl=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:u,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:S,reimbursementId:b,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:f,bankAccounts:s,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,bankAccountToCreate:P,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onSaveBankAccount:L,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:pe,onDuplicateLineClick:A,onExistingMerchantChange:_,onNewMerchantChange:Y,onReceiptsUpload:H,saveRemiDetails:ie,submitRemiDetails:X,discardReimbursementDetailsFromLocalStore:we,onReimbursementDetailsChanged:he,updateReimbursementType:re,onHomeCurrencyConversionUpdate:J,redirectToReimbursementListScreen:le,redirectToReimbursementDetailScreen:Oe,deleteReimbursement:R,removeFileFromLine:ge,onZeniLogoClick:se,onAmountChanged:Ne,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,onAddNewRule:Se,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,deleteBankAccount:De,onBackClickFromBankAccountPage:ct})=>{const W=v.useRef(null),et=v.useRef(null),tt=ai(e.uploadStatus),We=bt(),ke=ft(),[He,Te]=v.useState(!1),[Ue,Ve]=v.useState(!1),[qe,Ke]=v.useState("save"),[ne,it]=v.useState(ei(e.lineDetailSection,e.currencyConversionStatus)),[ut,Ge]=v.useState(!1),[U,mt]=v.useState(null),[M,ae]=v.useState(!1),wt=`dashboard_${ke.currentTenant?.companyId}`,$e=en({mode:"all",reValidateMode:"onChange",defaultValues:v.useMemo(()=>Xt(e,r,s),[e,r,s]),values:v.useMemo(()=>Xt(e,r,s),[e,r,s])}),{isDirty:z,dirtyFields:jn}=$e.formState,Pn=async(h,D)=>{const{lineInfo:c}=D,x=Number(h.split(".")[1]);if(h.includes("reportTitle")||h.includes("memo"))return;if(h.includes("reimbursementType")){const B=c[x].mileage,N=c[x].outOfPocket;c[x]={...c[x],outOfPocket:{transactionDate:N.transactionDate??void 0,class:{allOptions:N.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:N.class.selectedOption??void 0},account:{allOptions:N.account.allOptions??At(e.accountsHierarchyList,[]),selectedOption:N.account.selectedOption??void 0},amount:N.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(be=>({label:`${be.currencyCode} - ${be.currency}`,value:be.currencyCode,countryCode:si(be.countryCode)})),selectedOption:r.currencyCode??Fe}},memo:N.memo??void 0,merchant:N.merchant??void 0,recommendations:N.recommendations??[],recommendedAccount:N.recommendedAccount??void 0,isCategoryUpdateSelected:N.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:N.isCategoryFirstTimeAutofilled??!1,retainedAccount:N.retainedAccount??void 0,isRetainedCategorySelected:N.isRetainedCategorySelected??!1},mileage:{transactionDate:B.transactionDate??void 0,class:{allOptions:B.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:B.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:B.distanceInMiles,amount:{amount:B?.amount?.amount??0,currencyCode:B?.amount?.currencyCode??Fe,currencySymbol:B?.amount?.currencySymbol??Tt},memo:B.memo??void 0}}}else if(h.includes("mileage.distanceInMiles")){const{distanceInMiles:B}=c[x].mileage,N=u?.mileageUnitAmount??0;c[x].mileage={...c[x].mileage,amount:{amount:B!=null?B*N:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(h.includes("outOfPocket.amount")&&c[x].lineId){const B=c[x].outOfPocket.amount,N=e.allCurrencies.find(be=>be.currencyCode===B?.currency.selectedOption)?.currencySymbol;if(B?.currencyCode!==B?.currency.selectedOption){const be=B?.currency?.allOptions||[];c[x].outOfPocket.amount={currency:{allOptions:be,selectedOption:B?.currency?.selectedOption},amount:c[x].outOfPocket?.amount?.amount??0,currencyCode:B?.currency.selectedOption??Fe,currencySymbol:N??Tt}}if(B?.currency.selectedOption!==Fe)Ge(!0),Mn(c[x].lineId,Fe);else{const be={};c.forEach(Kt=>{be[Kt.lineId]={lineId:Kt.lineId,homeCurrencyConversions:Kt.homeCurrencyConversions}}),c[x].homeCurrencyConversions={amount:B.amount??0,currencyCode:B?.currency.selectedOption??Fe,currencySymbol:N??Tt};const vi=ei(be,e.currencyConversionStatus);ne!==vi&&it(vi)}}else if(h.includes("outOfPocket.isRetainedCategorySelected"))c[x].outOfPocket.isRetainedCategorySelected===!0&&(c[x].outOfPocket.isCategoryUpdateSelected=!1,c[x].outOfPocket.account.selectedOption=c[x].outOfPocket.retainedAccount?.qboId);else if(h.includes("outOfPocket.isCategoryUpdateSelected"))if(c[x].outOfPocket.isCategoryUpdateSelected===!0)c[x].outOfPocket.account.selectedOption=c[x].outOfPocket.recommendedAccount?.qboId,c[x].outOfPocket.isRetainedCategorySelected=!1;else{const B=c[x].lineId,N=e.editRemiInitialDetails.lineDetailSection[B]?.lineDetail?.account?.qboId;c[x].outOfPocket.account.selectedOption=N,c[x].outOfPocket.isRetainedCategorySelected=!1}else h.includes("outOfPocket.account")&&(c[x].outOfPocket.recommendations.length>0&&(c[x].outOfPocket.recommendedAccount=c[x].outOfPocket.recommendations[0].account),c[x].outOfPocket.recommendedAccount?.qboId!=null&&c[x].outOfPocket.account.selectedOption===c[x].outOfPocket.recommendedAccount?.qboId?c[x].outOfPocket.isCategoryUpdateSelected=!0:c[x].outOfPocket.isCategoryUpdateSelected=!1,c[x].outOfPocket.retainedAccount?.qboId!=null&&c[x].outOfPocket.account.selectedOption===c[x].outOfPocket.retainedAccount?.qboId?c[x].outOfPocket.isRetainedCategorySelected=!0:c[x].outOfPocket.isRetainedCategorySelected=!1,c[x].outOfPocket.isCategoryFirstTimeAutofilled=!1);const $t=ti({...D,lineInfo:c},e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(he?.($t),h.includes("outOfPocket.merchant")){const B=c[x].lineId,N=c[x].outOfPocket.merchant.selectedOption??"";c[x].outOfPocket.merchant.allOptions.find(be=>be===N)!=null?_(N,B):Y(N,B)}},yi=v.useMemo(()=>Ci((h,D)=>Pn(h,D),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);v.useEffect(()=>{const h=$e.watch((D,{name:c})=>{c!=null&&D!=null&&yi(c,D)});return()=>{h.unsubscribe()}},[yi,$e]),v.useEffect(()=>{const h=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),D=h.fetchState==="In-Progress"||h.fetchState==="Error";Ge(D)},[e.currencyConversionStatus]),v.useEffect(()=>{for(const D in e.currencyConversionStatus){const c=e.lineDetailSection[D],x=e.lineDetailSection[D];e.currencyConversionStatus[D].fetchState==="Completed"&&x!=null&&c.type!==y.mileageKey&&!tn(c?.homeCurrencyConversions,x.homeCurrencyConversions)&&J({amount:c?.homeCurrencyConversions?.amount??0,currencyCode:c?.homeCurrencyConversions?.currencyCode??Fe,currencySymbol:c?.homeCurrencyConversions?.currencySymbol??Tt},D,b)}const h=ei(e.lineDetailSection,e.currencyConversionStatus);ne!==h&&it(h)},[e.currencyConversionStatus,e.lineDetailSection]),v.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(we(b),le?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,b,we,le]);const O=Ie(),[je,pt]=v.useState(b==null),[ht,Rn]=v.useState(1),[On,Mt]=v.useState(!1),[Ln,An]=v.useState(""),[Et,zn]=v.useState(null),[Bn,nt]=v.useState(!1),[Fn,bi]=v.useState(!1),[Nt,Wt]=v.useState([]),[de,St]=v.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),Mn=v.useRef(Ci((h,D)=>Ne(h,D),500,{trailing:!0})).current;v.useEffect(()=>{tt==="In-Progress"&&(e.uploadStatus==="Completed"?($e.reset(Xt(e,r,s),{keepDefaultValues:!0}),Te(!1),pt(!1)):e.uploadStatus==="Error"&&Te(!1))},[tt,e.uploadStatus,$e,e,He,Te,je,r,s,S]),v.useEffect(()=>{e.uploadStatus==="In-Progress"&&je===!1&&Te(!0)},[e.uploadStatus,Te,je]);const Ut=e.remiStage==="draft"?y.newReimbursementTitle:y.editReimbursementTitle,En={onOkClick:()=>{if(nt(!1),de.primaryButtonText===y.buttons.discard)we(b),e.remiStage==="draft"?le?.():Oe?.();else if(de.primaryButtonText===y.buttons.delete)de.title===y.deleteBankAccountTitle?De?.(Ln):R?.();else if(de.primaryButtonText===y.buttons.yes&&Et!=null){const h=Nt.filter(D=>D!==ht.toString());Wt(h),H(Et,ht,!0)}},onCancelClick:()=>{if(nt(!1),de.secondaryButtonText===y.buttons.no){const h=Nt.filter(D=>D!==ht.toString());Wt(h),H(Et,ht,!1)}}},fi=()=>{z||co(jn)?(St({title:y.discardTitle,description:y.discardDescription,primaryButtonText:y.buttons.discard,secondaryButtonText:y.buttons.cancel}),nt(!0)):(we(b),le?.())},Nn=()=>{St({title:e.remiStage==="draft"?y.deleteDraftTitle:y.deleteReportTitle,description:y.deleteAlertDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Wn=h=>{An(h),St({title:y.deleteBankAccountTitle,description:y.deleteBankAccountDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Un=()=>{St({title:y.overwriteTitle,description:y.overwriteDescription,primaryButtonText:y.buttons.yes,secondaryButtonText:y.buttons.no}),nt(!0)},Vn=()=>{let h=!0;const D=[];return Object.values(e.lineDetailSection).forEach((c,x)=>{c.type===y.outOfPocketKey&&vn(c)>=75&&c.file==null&&(D.push(c.lineId),h=!1)}),Wt(D),h},xi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")fi();else{Ke("save");const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D);const c=D.whatForSection?.reportTitle;c!=null&&c.length>0?ie(e.remiStatus==="rejected"?"pending_approval":"draft"):$e.trigger(`${Lt}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(h=>{h.length>0&&(Vt=!0)});let wi=[];if(e.remiId==null){const h=ne??0;h>0&&(wi=e.approvalRules.allApprovalRules?.filter(D=>{const c=D.criteria[0].range;if(c.max!=null){if(c.min.amount<h&&c.max.amount>=h)return D}else if(c.min.amount<h)return D;return null}).map(D=>({...D,stepsWithStatus:D.steps.map(c=>({...c,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const _n=h=>{const D=Vn();return $e.handleSubmit(()=>{D&&(Ke("submit"),S?.trackReimbursementSubmitReimbursement(e.createTime?.format(Yi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Yi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,ne,b),E(),bi(!0))})(h)},Hn=()=>{const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D),X()},qn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,Kn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Gn=e.reimbursementInfo?.expectedDepositDate??Kn,Yn=b!=null&&e.remiStage==="draft",Si=Ro(e.duplicateLineByLineId),_t=e.duplicateReimbursementStatus.fetchState==="Completed"&&Si>0,{requestToOpenThread:Ht,setRequestToOpenThread:$i,setOpenThread:qt}=v.useContext(Zn),{threads:gt,isLoading:Ye}=Xn({application:"dashboard",companyId:ke.currentTenant?.companyId,tab:"reimbursement",entityId:b,isGlobalComment:!1},"both",!1);v.useEffect(()=>{Ht?.threadId!=null&&gt.length>0&&!Ye&&(qt(Ht.threadId),$i(null))},[Ht,gt,Ye,qt,$i]);const Jn=v.useMemo(()=>b==null?[]:gt.filter(h=>h.resolved===!1&&!h.id.includes(eo)),[gt,b]).length,Qn=(h,D)=>{qt(D);const c=h.entityType.split("."),x=parseInt(c[2]);if(isNaN(x)){ae(!1);return}const $t=`${x+1}`,B=e.lineDetailSection[x+1].type;c.includes(y.mileageKey)&&B===y.outOfPocketKey?re(ee.toReimbursementTypeCode(y.mileageKey),$t,b):c.includes(y.outOfPocketKey)&&B===y.mileageKey&&re(ee.toReimbursementTypeCode(y.outOfPocketKey),$t,b),ae(!1)};return t.jsx(Rr,{ref:W,children:t.jsx(to,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:et.current??null}},children:t.jsxs(nn,{...$e,children:[t.jsx("form",{id:Qi(Ji),onSubmit:h=>_n(h),children:t.jsxs(rl,{windowSize:O,ref:et,children:[Bn?t.jsx(li,{titleComponent:t.jsx(an,{children:de.title}),descriptionComponent:t.jsx(on,{children:de.description}),primaryButtonText:de.primaryButtonText,secondaryButtonText:de.secondaryButtonText,action:En,proceedButtonVariant:de.title===y.deleteBankAccountTitle||de.title===y.deleteDraftTitle||de.title===y.deleteReportTitle||de.title===y.discardTitle?"danger":"primary",isEditPopup:de.title===y.deleteBankAccountTitle}):null,Fn?t.jsx(fr,{reimbursementId:b,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:_t,numberOfDuplicateLines:Si,setShowDuplicatePopup:bi,submitReport:Hn,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,analytics:S}):null,He?t.jsx(Xi,{windowSize:O}):null,je?t.jsxs(Xi,{windowSize:O,"data-testid":q("skip-autofill-section"),children:[O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(oi,{partOfSkipAutoFill:!0,size:O,onClick:()=>pt(!1),"data-testid":q("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}),t.jsx(Hr,{children:Ut})]}):null,t.jsx(xn,{showAutofill:je,analytics:S,onSkipAutofill:()=>{S?.trackReimbursementSkipAutofill(),pt(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:Z.leftSectionWidth.valuePercentage(O),boxSizing:"border-box",backgroundColor:O==="small"?We.colors.grey4:"unset",padding:O==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:O==="small"?i.sp0:void 0},onInvoiceUpload:h=>H(h,ht,!0),dropFilePlaceholder:{upload:y.dropReceipt.upload,single:y.dropReceipt.single,or:y.dropReceipt.or,multiple:y.dropReceipt.multiple,receipts:y.dropReceipt.receipts},updateInvoiceUploadFetchState:Le,showInfoText:!1,allowMultiFiles:je,type:"reimbursement"}),O!=="small"?t.jsx(_r,{children:t.jsx(oi,{partOfSkipAutoFill:!0,onClick:()=>pt(!1),"data-testid":q("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}):null]}):null,t.jsxs(tl,{windowSize:O,"data-testid":q("edit-reimbursement-detail-page-nav-bar-container"),children:[O!=="small"?t.jsx(ki,{style:{width:"42%"},"data-testid":q("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(il,{"data-testid":q("zeni-logo-spend-management-reimbursement-detail-page"),onClick:se}),enableTitleOnScroll:!1,scrollableContent:W,backgroundColor:We.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,O!=="small"?t.jsx(Or,{}):null,t.jsx(ki,{style:{width:Z.navBarWidth.valuePercentage(O)},"data-testid":q("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:Ut,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:je!=!0?t.jsxs(nl,{children:[C&&b!=null?t.jsxs(ol,{isDisabled:Ye,"data-testid":q("remi-comment-button"),onClick:Ye?()=>null:h=>{h.preventDefault(),h.stopPropagation(),mt({roomId:wt,companyId:ke.currentTenant?.companyId??"",companyName:ke.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:b}),ae(!0),S?.trackCommentActivity("reimbursement","clicked",ke.currentTenant?.companyName??"",ke.controllersList.controllers.map(D=>no(D)),void 0,void 0,"page icon")},children:[t.jsx(io,{count:Ye?void 0:Jn,isLoading:Ye,style:{left:"12px"}}),t.jsx(al,{})]}):null,t.jsx(oi,{size:O,onClick:()=>fi(),"data-testid":q("close-nav-bar"),children:t.jsx(ni,{withOverlay:!1,children:t.jsx(ii,{})})})]}):null,enableTitleOnScroll:O!=="small",scrollThreshold:64,scrollableContent:W,backgroundColor:We.colors.grey4})]}),O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(el,{children:Ut}),t.jsx(oo,{progressSectionObj:qn,createDate:e.createTime,paymentDate:Gn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:b!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Gr,{children:[t.jsx(Kr,{}),t.jsx(Yr,{children:y.banner})]}),e.isProcessing?t.jsx(rn,{variant:"warning",style:{margin:O==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Gi.duplicateWarning.title,description:Gi.duplicateWarning.description}):_t?t.jsxs(Jr,{size:O,children:[t.jsx(Br,{}),t.jsxs(Zr,{children:[t.jsx(Qr,{children:y.thereSeems}),t.jsx(Xr,{children:y.pleaseFind})]})]}):null,t.jsx($n,{isReimbursementCommentingEnabled:C,sectionId:Lt,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(Ka,{onDuplicateLineClick:A,reimbursementId:b,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:je,setShowSkipAutoFill:pt,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:ne,removeFileFromLine:ge,onReplaceClick:Un,onReceiptsUpload:H,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Rn,setUploadedReceiptPayload:zn,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,defaultCurrency:r,companyMileageConfigInfo:u,isUserAdmin:m,setShowBankAccountPage:Mt,bankAccounts:s,onDeleteBankAccount:Wn,analytics:S,fileRequiredLineIds:Nt,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,showTotalAmountLoader:ut,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:_t,removeDuplicateReimbursementForLine:pe,scrollContainerRef:W}),t.jsxs(ll,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Zi,{}):null,t.jsx(sl,{windowSize:O,children:t.jsxs(dl,{windowSize:O,children:[e.remiId!==void 0&&t.jsx(Ii,{amount:ne??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:Se,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&ne!=null&&ne>0?t.jsx(Ii,{amount:ne??0,activities:wi,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(cl,{}),t.jsxs(qr,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Zi,{}):null,t.jsx(Lr,{windowSize:O,onClick:h=>{h.stopPropagation(),Ue===!0&&Ve(!1)},children:t.jsx(ln,{formId:Qi(Ji),separatorStyle:{marginRight:i.sp4},showCancel:g,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?O==="small"?y.buttons.discard:y.buttons.discardChanges:O==="small"?y.buttons.save:y.buttons.saveChanges,isLoading:qe==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:xi,style:{width:Z.footerButtonWidth.value(O)},reverseSpinnerColor:!1},primaryBtn:{label:Pr(g,m,e,O),isDisabled:!g,style:{width:g?Z.footerButtonWidth.value(O):"auto"},type:g?"submit":"button",onClick:g?()=>null:xi,isLoading:!g&&qe==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(Ar,{children:t.jsxs(Nr,{windowSize:O,children:[Ue?t.jsx(sn,{onClickAway:()=>Ve(!1),children:t.jsx(Er,{windowSize:O,"data-testid":q("remi-other-actions-container"),children:t.jsx(Wr,{onClick:Nn,"data-testid":q("delete-report-action"),children:y.buttons.deleteReport})})}):null,t.jsx(Mr,{windowSize:O,children:Yn===!0?t.jsx(Fr,{windowSize:O,"data-testid":q("more-details-button"),children:t.jsx(zr,{onClick:()=>Ve(!Ue)})}):null})]})}),style:{minHeight:62}})})]}),C&&b!=null?t.jsx(Po,{id:wt,children:t.jsx(ao,{isDrawerOpen:M,allowComposer:!0,drawerTitle:vr,threads:gt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:U?.companyId??Cr,isGlobalComment:!1,tab:"reimbursement"},isLoading:Ye,threadMetadata:U?{companyName:U.companyName,companyId:U.companyId,entityId:U.entityId,entityType:U.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:kr,replyComposerPlaceholder:Ir,threadResolve:Dr,threadUnResolve:Tr},onThreadClick:(h,D)=>Qn(h,D),onCloseAllThreadsDrawer:()=>ae(!1),drawerSectionStyle:{width:"400px",backgroundColor:We.colors.background}})}):null]})}),On?t.jsx(Ur,{windowSize:O,children:t.jsx(rr,{bankAccountCreationState:k,setShowBankAccountPage:Mt,plaidConnectionDetails:l,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,onSaveHandler:L,bankAccountToCreate:P,bankNameByRouting:f,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onBackClick:()=>{ct(),Mt(!1)}})}):null]})})})},Pr=(e,o,r,u)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?y.buttons.resubmit:y.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?u==="small"?y.buttons.discard:y.buttons.discardChanges:u==="small"?y.buttons.save:y.buttons.saveChanges,Rr=n.div`
619
+ `,Z={rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),bottomMargin:new c(56,56),closeMarginTop:new c(0,19),closeMarginRight:new c(a[3],a[8]),rightSectionWidth:new c(100,58),leftSectionWidth:new c(100,42),footerButtonWidth:new c(120,165),right:new c(a[3],a[0]),actionsContainerRight:new c(a[0],a[6]),otherActionsContainerBottom:new c(58,44),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6]),navBarWidth:new c(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:y,bulkActions:Gi}},common:{currency:{currencyCode:Me,currencySymbol:Tt},texts:{comments:vr},strings:{empty:Cr}},collaboration:{threads:{placeholder:{addANewComment:kr,replyAComment:Ir},tooltip:{resolveComment:Dr,unResolveComment:Tr}}},dateFormat:Yi}=me.getLocalizedStrings(),Ji="editReimbursementDetailPage",Qi=e=>`${e}_form`,jr=(e,o,r,u,p,C,m,S,b)=>{const l=e.outOfPocket,k=e.mileage,f=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??y.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:_e(r,[]),selectedOption:l?.lineDetail?.class?.classId??b},account:{allOptions:At(o,s),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:S.map(g=>({label:`${g.currencyCode} - ${g.currency}`,value:g.currencyCode,countryCode:si(g.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??Me}},memo:l?.description??void 0,merchant:{allOptions:u.map(g=>g.id).filter(g=>!!g),selectedOption:f?.id?f?.id:f?.name?f?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:_e(r,[]),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},Xt=(e,o,r)=>{const u=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&u.push(jr(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),u.length===0&&u.push(Dn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[Lt]:{reportTitle:e.whatForSection.reportTitle},[gi]:u,[yt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ei=(e,o)=>{const r=u=>u.lineId==null||o[u.lineId]?.fetchState==="In-Progress"?0:(o[u.lineId]?.fetchState,u.type===y.mileageKey?u?.mileage?.amount??0:u?.outOfPocket?.currencyCode!==Me&&u.homeCurrencyConversions?.amount!==u?.outOfPocket?.amount?u.homeCurrencyConversions?.amount??0:u?.outOfPocket?.amount??0);return Object.values(e).reduce((u,p)=>u+r(p),0)},ti=(e,o,r,u,p,C,m,S)=>{const b={};return e.lineInfo.forEach(l=>{const k=S.find(P=>P.classId===l.mileage.class.selectedOption),f=m.find(P=>P.qboId===l.outOfPocket.account.selectedOption||P.accountId===l.outOfPocket.account.selectedOption),s=S.find(P=>P.classId===l.outOfPocket.class.selectedOption),g=o.find(P=>P.id===l.outOfPocket.merchant.selectedOption),w=C.find(P=>P.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;b[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??w,currencySymbol:l.mileage.amount?.currencySymbol??w,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:f},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??w,currencySymbol:w,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:g?.id??"",name:g?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:b,totalAmount:{amount:u,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Pl=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:u,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:S,reimbursementId:b,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:f,bankAccounts:s,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,bankAccountToCreate:P,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onSaveBankAccount:L,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:pe,onDuplicateLineClick:A,onExistingMerchantChange:_,onNewMerchantChange:Y,onReceiptsUpload:H,saveRemiDetails:ie,submitRemiDetails:X,discardReimbursementDetailsFromLocalStore:we,onReimbursementDetailsChanged:he,updateReimbursementType:re,onHomeCurrencyConversionUpdate:J,redirectToReimbursementListScreen:le,redirectToReimbursementDetailScreen:Oe,deleteReimbursement:R,removeFileFromLine:ge,onZeniLogoClick:se,onAmountChanged:Ne,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,onAddNewRule:Se,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,deleteBankAccount:De,onBackClickFromBankAccountPage:dt})=>{const W=v.useRef(null),et=v.useRef(null),tt=ai(e.uploadStatus),We=bt(),ke=ft(),[He,Te]=v.useState(!1),[Ue,Ve]=v.useState(!1),[qe,Ke]=v.useState("save"),[ne,it]=v.useState(ei(e.lineDetailSection,e.currencyConversionStatus)),[ut,Ge]=v.useState(!1),[U,mt]=v.useState(null),[F,ae]=v.useState(!1),wt=`dashboard_${ke.currentTenant?.companyId}`,$e=en({mode:"all",reValidateMode:"onChange",defaultValues:v.useMemo(()=>Xt(e,r,s),[e,r,s]),values:v.useMemo(()=>Xt(e,r,s),[e,r,s])}),{isDirty:z,dirtyFields:jn}=$e.formState,Pn=async(h,D)=>{const{lineInfo:d}=D,x=Number(h.split(".")[1]);if(h.includes("reportTitle")||h.includes("memo"))return;if(h.includes("reimbursementType")){const B=d[x].mileage,N=d[x].outOfPocket;d[x]={...d[x],outOfPocket:{transactionDate:N.transactionDate??void 0,class:{allOptions:N.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:N.class.selectedOption??void 0},account:{allOptions:N.account.allOptions??At(e.accountsHierarchyList,[]),selectedOption:N.account.selectedOption??void 0},amount:N.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(be=>({label:`${be.currencyCode} - ${be.currency}`,value:be.currencyCode,countryCode:si(be.countryCode)})),selectedOption:r.currencyCode??Me}},memo:N.memo??void 0,merchant:N.merchant??void 0,recommendations:N.recommendations??[],recommendedAccount:N.recommendedAccount??void 0,isCategoryUpdateSelected:N.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:N.isCategoryFirstTimeAutofilled??!1,retainedAccount:N.retainedAccount??void 0,isRetainedCategorySelected:N.isRetainedCategorySelected??!1},mileage:{transactionDate:B.transactionDate??void 0,class:{allOptions:B.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:B.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:B.distanceInMiles,amount:{amount:B?.amount?.amount??0,currencyCode:B?.amount?.currencyCode??Me,currencySymbol:B?.amount?.currencySymbol??Tt},memo:B.memo??void 0}}}else if(h.includes("mileage.distanceInMiles")){const{distanceInMiles:B}=d[x].mileage,N=u?.mileageUnitAmount??0;d[x].mileage={...d[x].mileage,amount:{amount:B!=null?B*N:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(h.includes("outOfPocket.amount")&&d[x].lineId){const B=d[x].outOfPocket.amount,N=e.allCurrencies.find(be=>be.currencyCode===B?.currency.selectedOption)?.currencySymbol;if(B?.currencyCode!==B?.currency.selectedOption){const be=B?.currency?.allOptions||[];d[x].outOfPocket.amount={currency:{allOptions:be,selectedOption:B?.currency?.selectedOption},amount:d[x].outOfPocket?.amount?.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Tt}}if(B?.currency.selectedOption!==Me)Ge(!0),Fn(d[x].lineId,Me);else{const be={};d.forEach(Kt=>{be[Kt.lineId]={lineId:Kt.lineId,homeCurrencyConversions:Kt.homeCurrencyConversions}}),d[x].homeCurrencyConversions={amount:B.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Tt};const vi=ei(be,e.currencyConversionStatus);ne!==vi&&it(vi)}}else if(h.includes("outOfPocket.isRetainedCategorySelected"))d[x].outOfPocket.isRetainedCategorySelected===!0&&(d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.retainedAccount?.qboId);else if(h.includes("outOfPocket.isCategoryUpdateSelected"))if(d[x].outOfPocket.isCategoryUpdateSelected===!0)d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.recommendedAccount?.qboId,d[x].outOfPocket.isRetainedCategorySelected=!1;else{const B=d[x].lineId,N=e.editRemiInitialDetails.lineDetailSection[B]?.lineDetail?.account?.qboId;d[x].outOfPocket.account.selectedOption=N,d[x].outOfPocket.isRetainedCategorySelected=!1}else h.includes("outOfPocket.account")&&(d[x].outOfPocket.recommendations.length>0&&(d[x].outOfPocket.recommendedAccount=d[x].outOfPocket.recommendations[0].account),d[x].outOfPocket.recommendedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.recommendedAccount?.qboId?d[x].outOfPocket.isCategoryUpdateSelected=!0:d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.retainedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.retainedAccount?.qboId?d[x].outOfPocket.isRetainedCategorySelected=!0:d[x].outOfPocket.isRetainedCategorySelected=!1,d[x].outOfPocket.isCategoryFirstTimeAutofilled=!1);const $t=ti({...D,lineInfo:d},e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(he?.($t),h.includes("outOfPocket.merchant")){const B=d[x].lineId,N=d[x].outOfPocket.merchant.selectedOption??"";d[x].outOfPocket.merchant.allOptions.find(be=>be===N)!=null?_(N,B):Y(N,B)}},yi=v.useMemo(()=>Ci((h,D)=>Pn(h,D),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);v.useEffect(()=>{const h=$e.watch((D,{name:d})=>{d!=null&&D!=null&&yi(d,D)});return()=>{h.unsubscribe()}},[yi,$e]),v.useEffect(()=>{const h=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),D=h.fetchState==="In-Progress"||h.fetchState==="Error";Ge(D)},[e.currencyConversionStatus]),v.useEffect(()=>{for(const D in e.currencyConversionStatus){const d=e.lineDetailSection[D],x=e.lineDetailSection[D];e.currencyConversionStatus[D].fetchState==="Completed"&&x!=null&&d.type!==y.mileageKey&&!tn(d?.homeCurrencyConversions,x.homeCurrencyConversions)&&J({amount:d?.homeCurrencyConversions?.amount??0,currencyCode:d?.homeCurrencyConversions?.currencyCode??Me,currencySymbol:d?.homeCurrencyConversions?.currencySymbol??Tt},D,b)}const h=ei(e.lineDetailSection,e.currencyConversionStatus);ne!==h&&it(h)},[e.currencyConversionStatus,e.lineDetailSection]),v.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(we(b),le?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,b,we,le]);const O=Ie(),[je,pt]=v.useState(b==null),[ht,Rn]=v.useState(1),[On,Ft]=v.useState(!1),[Ln,An]=v.useState(""),[Et,zn]=v.useState(null),[Bn,nt]=v.useState(!1),[Mn,bi]=v.useState(!1),[Nt,Wt]=v.useState([]),[ce,St]=v.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),Fn=v.useRef(Ci((h,D)=>Ne(h,D),500,{trailing:!0})).current;v.useEffect(()=>{tt==="In-Progress"&&(e.uploadStatus==="Completed"?($e.reset(Xt(e,r,s),{keepDefaultValues:!0}),Te(!1),pt(!1)):e.uploadStatus==="Error"&&Te(!1))},[tt,e.uploadStatus,$e,e,He,Te,je,r,s,S]),v.useEffect(()=>{e.uploadStatus==="In-Progress"&&je===!1&&Te(!0)},[e.uploadStatus,Te,je]);const Ut=e.remiStage==="draft"?y.newReimbursementTitle:y.editReimbursementTitle,En={onOkClick:()=>{if(nt(!1),ce.primaryButtonText===y.buttons.discard)we(b),e.remiStage==="draft"?le?.():Oe?.();else if(ce.primaryButtonText===y.buttons.delete)ce.title===y.deleteBankAccountTitle?De?.(Ln):R?.();else if(ce.primaryButtonText===y.buttons.yes&&Et!=null){const h=Nt.filter(D=>D!==ht.toString());Wt(h),H(Et,ht,!0)}},onCancelClick:()=>{if(nt(!1),ce.secondaryButtonText===y.buttons.no){const h=Nt.filter(D=>D!==ht.toString());Wt(h),H(Et,ht,!1)}}},fi=()=>{z||co(jn)?(St({title:y.discardTitle,description:y.discardDescription,primaryButtonText:y.buttons.discard,secondaryButtonText:y.buttons.cancel}),nt(!0)):(we(b),le?.())},Nn=()=>{St({title:e.remiStage==="draft"?y.deleteDraftTitle:y.deleteReportTitle,description:y.deleteAlertDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Wn=h=>{An(h),St({title:y.deleteBankAccountTitle,description:y.deleteBankAccountDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Un=()=>{St({title:y.overwriteTitle,description:y.overwriteDescription,primaryButtonText:y.buttons.yes,secondaryButtonText:y.buttons.no}),nt(!0)},Vn=()=>{let h=!0;const D=[];return Object.values(e.lineDetailSection).forEach((d,x)=>{d.type===y.outOfPocketKey&&vn(d)>=75&&d.file==null&&(D.push(d.lineId),h=!1)}),Wt(D),h},xi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")fi();else{Ke("save");const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D);const d=D.whatForSection?.reportTitle;d!=null&&d.length>0?ie(e.remiStatus==="rejected"?"pending_approval":"draft"):$e.trigger(`${Lt}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(h=>{h.length>0&&(Vt=!0)});let wi=[];if(e.remiId==null){const h=ne??0;h>0&&(wi=e.approvalRules.allApprovalRules?.filter(D=>{const d=D.criteria[0].range;if(d.max!=null){if(d.min.amount<h&&d.max.amount>=h)return D}else if(d.min.amount<h)return D;return null}).map(D=>({...D,stepsWithStatus:D.steps.map(d=>({...d,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const _n=h=>{const D=Vn();return $e.handleSubmit(()=>{D&&(Ke("submit"),S?.trackReimbursementSubmitReimbursement(e.createTime?.format(Yi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Yi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,ne,b),E(),bi(!0))})(h)},Hn=()=>{const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D),X()},qn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,Kn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Gn=e.reimbursementInfo?.expectedDepositDate??Kn,Yn=b!=null&&e.remiStage==="draft",Si=Ro(e.duplicateLineByLineId),_t=e.duplicateReimbursementStatus.fetchState==="Completed"&&Si>0,{requestToOpenThread:Ht,setRequestToOpenThread:$i,setOpenThread:qt}=v.useContext(Zn),{threads:gt,isLoading:Ye}=Xn({application:"dashboard",companyId:ke.currentTenant?.companyId,tab:"reimbursement",entityId:b,isGlobalComment:!1},"both",!1);v.useEffect(()=>{Ht?.threadId!=null&&gt.length>0&&!Ye&&(qt(Ht.threadId),$i(null))},[Ht,gt,Ye,qt,$i]);const Jn=v.useMemo(()=>b==null?[]:gt.filter(h=>h.resolved===!1&&!h.id.includes(eo)),[gt,b]).length,Qn=(h,D)=>{qt(D);const d=h.entityType.split("."),x=parseInt(d[2]);if(isNaN(x)){ae(!1);return}const $t=`${x+1}`,B=e.lineDetailSection[x+1].type;d.includes(y.mileageKey)&&B===y.outOfPocketKey?re(ee.toReimbursementTypeCode(y.mileageKey),$t,b):d.includes(y.outOfPocketKey)&&B===y.mileageKey&&re(ee.toReimbursementTypeCode(y.outOfPocketKey),$t,b),ae(!1)};return t.jsx(Rr,{ref:W,children:t.jsx(to,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:et.current??null}},children:t.jsxs(nn,{...$e,children:[t.jsx("form",{id:Qi(Ji),onSubmit:h=>_n(h),children:t.jsxs(rl,{windowSize:O,ref:et,children:[Bn?t.jsx(li,{titleComponent:t.jsx(an,{children:ce.title}),descriptionComponent:t.jsx(on,{children:ce.description}),primaryButtonText:ce.primaryButtonText,secondaryButtonText:ce.secondaryButtonText,action:En,proceedButtonVariant:ce.title===y.deleteBankAccountTitle||ce.title===y.deleteDraftTitle||ce.title===y.deleteReportTitle||ce.title===y.discardTitle?"danger":"primary",isEditPopup:ce.title===y.deleteBankAccountTitle}):null,Mn?t.jsx(fr,{reimbursementId:b,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:_t,numberOfDuplicateLines:Si,setShowDuplicatePopup:bi,submitReport:Hn,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,analytics:S}):null,He?t.jsx(Xi,{windowSize:O}):null,je?t.jsxs(Xi,{windowSize:O,"data-testid":q("skip-autofill-section"),children:[O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(oi,{partOfSkipAutoFill:!0,size:O,onClick:()=>pt(!1),"data-testid":q("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}),t.jsx(Hr,{children:Ut})]}):null,t.jsx(xn,{showAutofill:je,analytics:S,onSkipAutofill:()=>{S?.trackReimbursementSkipAutofill(),pt(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:Z.leftSectionWidth.valuePercentage(O),boxSizing:"border-box",backgroundColor:O==="small"?We.colors.grey4:"unset",padding:O==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:O==="small"?i.sp0:void 0},onInvoiceUpload:h=>H(h,ht,!0),dropFilePlaceholder:{upload:y.dropReceipt.upload,single:y.dropReceipt.single,or:y.dropReceipt.or,multiple:y.dropReceipt.multiple,receipts:y.dropReceipt.receipts},updateInvoiceUploadFetchState:Le,showInfoText:!1,allowMultiFiles:je,type:"receipt"}),O!=="small"?t.jsx(_r,{children:t.jsx(oi,{partOfSkipAutoFill:!0,onClick:()=>pt(!1),"data-testid":q("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}):null]}):null,t.jsxs(tl,{windowSize:O,"data-testid":q("edit-reimbursement-detail-page-nav-bar-container"),children:[O!=="small"?t.jsx(ki,{style:{width:"42%"},"data-testid":q("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(il,{"data-testid":q("zeni-logo-spend-management-reimbursement-detail-page"),onClick:se}),enableTitleOnScroll:!1,scrollableContent:W,backgroundColor:We.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,O!=="small"?t.jsx(Or,{}):null,t.jsx(ki,{style:{width:Z.navBarWidth.valuePercentage(O)},"data-testid":q("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:Ut,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:je!=!0?t.jsxs(nl,{children:[C&&b!=null?t.jsxs(ol,{isDisabled:Ye,"data-testid":q("remi-comment-button"),onClick:Ye?()=>null:h=>{h.preventDefault(),h.stopPropagation(),mt({roomId:wt,companyId:ke.currentTenant?.companyId??"",companyName:ke.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:b}),ae(!0),S?.trackCommentActivity("reimbursement","clicked",ke.currentTenant?.companyName??"",ke.controllersList.controllers.map(D=>no(D)),void 0,void 0,"page icon")},children:[t.jsx(io,{count:Ye?void 0:Jn,isLoading:Ye,style:{left:"12px"}}),t.jsx(al,{})]}):null,t.jsx(oi,{size:O,onClick:()=>fi(),"data-testid":q("close-nav-bar"),children:t.jsx(ni,{withOverlay:!1,children:t.jsx(ii,{})})})]}):null,enableTitleOnScroll:O!=="small",scrollThreshold:64,scrollableContent:W,backgroundColor:We.colors.grey4})]}),O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(el,{children:Ut}),t.jsx(oo,{progressSectionObj:qn,createDate:e.createTime,paymentDate:Gn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:b!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Gr,{children:[t.jsx(Kr,{}),t.jsx(Yr,{children:y.banner})]}),e.isProcessing?t.jsx(rn,{variant:"warning",style:{margin:O==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Gi.duplicateWarning.title,description:Gi.duplicateWarning.description}):_t?t.jsxs(Jr,{size:O,children:[t.jsx(Br,{}),t.jsxs(Zr,{children:[t.jsx(Qr,{children:y.thereSeems}),t.jsx(Xr,{children:y.pleaseFind})]})]}):null,t.jsx($n,{isReimbursementCommentingEnabled:C,sectionId:Lt,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(Ka,{onDuplicateLineClick:A,reimbursementId:b,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:je,setShowSkipAutoFill:pt,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:ne,removeFileFromLine:ge,onReplaceClick:Un,onReceiptsUpload:H,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Rn,setUploadedReceiptPayload:zn,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,defaultCurrency:r,companyMileageConfigInfo:u,isUserAdmin:m,setShowBankAccountPage:Ft,bankAccounts:s,onDeleteBankAccount:Wn,analytics:S,fileRequiredLineIds:Nt,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,showTotalAmountLoader:ut,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:_t,removeDuplicateReimbursementForLine:pe,scrollContainerRef:W}),t.jsxs(ll,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Zi,{}):null,t.jsx(sl,{windowSize:O,children:t.jsxs(cl,{windowSize:O,children:[e.remiId!==void 0&&t.jsx(Ii,{amount:ne??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:Se,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&ne!=null&&ne>0?t.jsx(Ii,{amount:ne??0,activities:wi,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(dl,{}),t.jsxs(qr,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Zi,{}):null,t.jsx(Lr,{windowSize:O,onClick:h=>{h.stopPropagation(),Ue===!0&&Ve(!1)},children:t.jsx(ln,{formId:Qi(Ji),separatorStyle:{marginRight:i.sp4},showCancel:g,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?O==="small"?y.buttons.discard:y.buttons.discardChanges:O==="small"?y.buttons.save:y.buttons.saveChanges,isLoading:qe==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:xi,style:{width:Z.footerButtonWidth.value(O)},reverseSpinnerColor:!1},primaryBtn:{label:Pr(g,m,e,O),isDisabled:!g,style:{width:g?Z.footerButtonWidth.value(O):"auto"},type:g?"submit":"button",onClick:g?()=>null:xi,isLoading:!g&&qe==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(Ar,{children:t.jsxs(Nr,{windowSize:O,children:[Ue?t.jsx(sn,{onClickAway:()=>Ve(!1),children:t.jsx(Er,{windowSize:O,"data-testid":q("remi-other-actions-container"),children:t.jsx(Wr,{onClick:Nn,"data-testid":q("delete-report-action"),children:y.buttons.deleteReport})})}):null,t.jsx(Fr,{windowSize:O,children:Yn===!0?t.jsx(Mr,{windowSize:O,"data-testid":q("more-details-button"),children:t.jsx(zr,{onClick:()=>Ve(!Ue)})}):null})]})}),style:{minHeight:62}})})]}),C&&b!=null?t.jsx(Po,{id:wt,children:t.jsx(ao,{isDrawerOpen:F,allowComposer:!0,drawerTitle:vr,threads:gt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:U?.companyId??Cr,isGlobalComment:!1,tab:"reimbursement"},isLoading:Ye,threadMetadata:U?{companyName:U.companyName,companyId:U.companyId,entityId:U.entityId,entityType:U.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:kr,replyComposerPlaceholder:Ir,threadResolve:Dr,threadUnResolve:Tr},onThreadClick:(h,D)=>Qn(h,D),onCloseAllThreadsDrawer:()=>ae(!1),drawerSectionStyle:{width:"400px",backgroundColor:We.colors.background}})}):null]})}),On?t.jsx(Ur,{windowSize:O,children:t.jsx(rr,{bankAccountCreationState:k,setShowBankAccountPage:Ft,plaidConnectionDetails:l,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,onSaveHandler:L,bankAccountToCreate:P,bankNameByRouting:f,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onBackClick:()=>{dt(),Ft(!1)}})}):null]})})})},Pr=(e,o,r,u)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?y.buttons.resubmit:y.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?u==="small"?y.buttons.discard:y.buttons.discardChanges:u==="small"?y.buttons.save:y.buttons.saveChanges,Rr=n.div`
620
620
  position: relative;
621
621
  height: 100vh;
622
622
  overflow-y: scroll;
@@ -647,7 +647,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
647
647
  width: ${i.sp4};
648
648
  height: ${i.sp4};
649
649
  color: ${j.brandColorGoldDark};
650
- `,Fr=n.div`
650
+ `,Mr=n.div`
651
651
  display: flex;
652
652
  margin-left: ${e=>e.windowSize==="small"?i.sp4:i.sp5};
653
653
  cursor: pointer;
@@ -655,7 +655,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
655
655
  &:hover {
656
656
  color: ${e=>e.theme.colors.primary};
657
657
  }
658
- `,Mr=n.div`
658
+ `,Fr=n.div`
659
659
  display: flex;
660
660
  justify-content: center;
661
661
  align-items: center;
@@ -712,7 +712,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
712
712
  justify-content: end;
713
713
  `,_r=n.div`
714
714
  width: 58%;
715
- `,Hr=n(di)`
715
+ `,Hr=n(ci)`
716
716
  padding: ${i.sp3} ${i.sp3} 0 ${i.sp3};
717
717
  background: ${e=>e.theme.colors.grey4};
718
718
  color: ${e=>e.theme.colors.primary};
@@ -724,7 +724,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
724
724
  z-index: 3;
725
725
  `,Zi=n.div`
726
726
  width: 42%;
727
- `,Kr=n(ci)`
727
+ `,Kr=n(di)`
728
728
  color: ${e=>e.theme.colors.primary};
729
729
  width: ${i.sp3};
730
730
  height: ${i.sp3};
@@ -750,13 +750,13 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
750
750
  margin-left: ${e=>Z.duplicateBannerWrapperMarginLeft.valuePx(e.size)};
751
751
  background-color: ${j.alertLight};
752
752
  border: 1px solid ${e=>e.theme.colors.brandColorGoldDark};
753
- `,Qr=n(Ft)`
753
+ `,Qr=n(Mt)`
754
754
  color: ${e=>e.theme.colors.brandColorGoldDark};
755
755
  `,Zr=n.div`
756
756
  width: 100%;
757
757
  `,Xr=n(hi)`
758
758
  color: ${e=>e.theme.colors.brandColorGoldDark};
759
- `,el=n(di)`
759
+ `,el=n(ci)`
760
760
  letter-spacing: -0.02em;
761
761
  color: ${e=>e.theme.colors.primary};
762
762
  margin: ${i.sp3};
@@ -784,7 +784,7 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
784
784
  cursor: pointer;
785
785
  width: ${i.sp4};
786
786
  height: ${i.sp4};
787
- `,ii=n(dn)`
787
+ `,ii=n(cn)`
788
788
  cursor: pointer;
789
789
  width: ${i.sp4};
790
790
  height: ${i.sp4};
@@ -855,10 +855,10 @@ import{aP as ai,b as bt,ax as ft,aa as en,az as Ci,l as ee,F as me,aC as tn,q as
855
855
  margin-bottom: ${e=>Z.bottomMargin.valuePx(e.windowSize)};
856
856
  `,sl=n.div`
857
857
  width: ${e=>Z.rightSectionWidth.valuePercentage(e.windowSize)};
858
- `,dl=n.div`
858
+ `,cl=n.div`
859
859
  margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
860
860
  margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
861
- `,cl=n.div`
861
+ `,dl=n.div`
862
862
  display: flex;
863
863
  flex-direction: column;
864
864
  height: ${i.sp11};