@zeniai/web-cockpit-ui 1.15.3-prod → 1.15.4-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 (276) hide show
  1. package/dist/assets/{ACHDetailsPage-BTeL5y4g-IG9nQQem.js → ACHDetailsPage-uGxVPurg-BoohNpSs.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-DbUM6qs6-B6DiCKzz.js → AIPerformancePage-DqmxZNlX--Hr--1bJ.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-C-UvpjYp-C9PswY_3.js → AccountInfoPage-C2Dq8UPa-CDfBL7Wu.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-BwD3P36S-l8y2bAQt.js → AccountInfoPageContent-HVhR3c9c-DosFJwky.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-CLssvxib-C5QaHM9J.js → AccountLockedInfoModal-DM9AQ-14-CIrGwmC7.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-BB1W1GCn-BgweQbzz.js → AccountReconDetailsDrawerPage-zcvYkXrD-BPDfVNC-.js} +40 -40
  7. package/dist/assets/{AccountRow-Dqp3eLws-CGaSxCWi.js → AccountRow-B3ULDo0k-BhJpm00a.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-NTUKe73a-DhdY2mF2.js → AccountsPromoCardStack-CJZlWV2d-EdC25r6I.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-BRWhfaUV-DnqIr12A.js → AddAddressForCardDrawer-Rm7tH3HQ-BC-bWtsD.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-eU9RlrX2-BgVoKROr.js → AddToWalletPage-DfB-vvqh--jeS88nY.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-Dbj75D7L-AReiHnRK.js → AgingReportsPage-__jUwahK-CLXoQ0cz.js} +3 -3
  12. package/dist/assets/{AllUserItems-C8o0ftGM-DhDOVY0N.js → AllUserItems-Coo6Qik6-UHUBqeo9.js} +3 -3
  13. package/dist/assets/{ApAgingDetailPage-oU_NMgYv-CQ7DqjRL.js → ApAgingDetailPage-C1LyqY_A-BtwuroAU.js} +2 -2
  14. package/dist/assets/{AppBasePage-Bb2EfHmS-BW4oXpvJ.js → AppBasePage-Cz2ddFfo-mHKaK9iL.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-UxABc1Xq-Czv0hBvm.js → AppDrawerContent-CObWehh2-Cjn399er.js} +5 -5
  16. package/dist/assets/{ApprovalRulesSettingsPage-ITDu42uI-X2w0UWLm.js → ApprovalRulesSettingsPage-ZqKHe7B_-CavRIFVF.js} +1 -1
  17. package/dist/assets/{ArAgingChart-BxAOsEvx-C75NgVyk.js → ArAgingChart-CjRE8wyO-KhcQp5wu.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-DhHW1GHw-lUXxgAgI.js → ArAgingDetailPage-DXjs7XAS-CBng1tZs.js} +1 -1
  19. package/dist/assets/{AttachmentView-BnFvMAGW-BCG75Uhg.js → AttachmentView-C3WpRmXR-DHEKPSUE.js} +1 -1
  20. package/dist/assets/{BankAccountSection-C0ZBcrDN-BNcewrma.js → BankAccountSection-BigS_oOq-Ci-ry1uG.js} +1 -1
  21. package/dist/assets/{BankAccountWarningSection-BAMjtbnn-BVk2RIFn.js → BankAccountWarningSection-Czlvc-qX-fV9_v1_E.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-Ckpo_VYA-M_iFML6f.js → BankConnectionsSettingsPage-BgliKI11-CVrp_3jT.js} +1 -1
  23. package/dist/assets/{BillDetailPage-D3lgSK4F-C6CJjEvD.js → BillDetailPage-DNPgeuje-DvJjtReR.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRuleDetailPage--UxMsaII-Dh8f0zjS.js → BillPayApprovalRuleDetailPage-OrTzXAEP-F8EXZnBA.js} +5 -5
  25. package/dist/assets/{BillPayApprovalRulesPage-BgokSweY-CEyytyEH.js → BillPayApprovalRulesPage-DXcPkwwf-D9IFAJHv.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-Cmfp8aZE-C4LVnnos.js → BillPayPromoPage-fBpp10um-GZ0MLbC-.js} +13 -13
  27. package/dist/assets/{BillPaySetUpPage-BmtV-Zr2-CM0FkvLs.js → BillPaySetUpPage-9iEVFLUa-CieGlXQ4.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-BRJELj5Y-DtwDuk2q.js → BillingSettingsPage-IL6J1DV0-C_Ptx6al.js} +8 -8
  29. package/dist/assets/{BillsBulkReviewDrawerPage-D0HYL5UR-CaBvrB4W.js → BillsBulkReviewDrawerPage-DcRTKRMw-Dot6MMyh.js} +1 -1
  30. package/dist/assets/{BoxItem-BO8CYlnI-wn9QVmbM.js → BoxItem-Cg9N_YPt-DJ_jUCA7.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-DNOBs_OD-BHyMz22p.js → BusinessVerificationPage-KZWTxmeh-Bf4A-QbN.js} +2 -2
  32. package/dist/assets/{CardNumberSubText-BgxVtjBP-BeXDOa75.js → CardNumberSubText-DqtkAe0V-CnWXJt_4.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-uVqHfc3a-ehQyv084.js → CashbackDetailPage-D-l7cqjW-DUYPwmfE.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-urxX5Ksv-e59kH-Oh.js → ChargeCardDetailPage-ChwrpnhL-veTgs8Ar.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-uyLpvqZN-CyXKHiOY.js → ChargeCardListPage-zDV88I5X-B2RVPf-8.js} +1 -1
  36. package/dist/assets/{ChargeCardListTable-CWBqYx4D-BoDbKC-R.js → ChargeCardListTable-Cu1sCT_g-BGpTFZxZ.js} +1 -1
  37. package/dist/assets/{ChargeCardPaymentHistoryPage-CrJRk1Yl-Gb56XOxT.js → ChargeCardPaymentHistoryPage-Db6zW203-WFxJEWqw.js} +1 -1
  38. package/dist/assets/{ChargeCardPromoPage-8p2rEuSL-VYWGxwrU.js → ChargeCardPromoPage-DsrTt5B0-CxLK8tnF.js} +1 -1
  39. package/dist/assets/{ChargeCardSetupPage-Dk3kFOe8-DurMBJ7s.js → ChargeCardSetupPage-DcYthQvc-CTSyFY1c.js} +1 -1
  40. package/dist/assets/{ChargeCardStatementsPage-BgVV9glv-DBd8qnP0.js → ChargeCardStatementsPage-DkUJKxIz-CnKozjSR.js} +1 -1
  41. package/dist/assets/{CheckDepositDrawerPage-D-yLGTdP-BkONcJqh.js → CheckDepositDrawerPage-C7rL0Ts2-RP5ItDdY.js} +1 -1
  42. package/dist/assets/{CollapsableReportTable-9GyG9N_I-7LyzoYc7.js → CollapsableReportTable-B0N8Ybey-DhyMNzbJ.js} +1 -1
  43. package/dist/assets/{CompanyOfficerDetailsSection-CTO9aR2f-CAoML3Sa.js → CompanyOfficerDetailsSection-5DfSL2V8-ScLL5OT8.js} +1 -1
  44. package/dist/assets/{CompanyPassportCard-DRMGgEym-D3oFnWuv.js → CompanyPassportCard-BLw_MMZR-CEzISmuM.js} +2 -2
  45. package/dist/assets/{CompanyPassportPage-CgEtnvFs-B22k-1ox.js → CompanyPassportPage-BamWWVQB-C7x4VyMq.js} +1 -1
  46. package/dist/assets/{CompleteProfile-B8B0WHlc-BnkvkL_E.js → CompleteProfile-CPwV8diq-J2SvPl5E.js} +1 -1
  47. package/dist/assets/{ConfettiBurst-Cf9tVPaI-qf4uUt8m.js → ConfettiBurst-CJc1ZWFJ-DhK08ncO.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-BRoA1J_e-BAk67A84.js → CreateOrEditVendorPage-CDqjntBH-Dvy2lhUu.js} +1 -1
  49. package/dist/assets/{CreditCardPaymentDrawerPage-DfLgUaL5-B4C37Tyj.js → CreditCardPaymentDrawerPage-cBCHuatx-C8VBVt7-.js} +1 -1
  50. package/dist/assets/{CurrencySelectField-P0hAgQCu-BmbccHbm.js → CurrencySelectField-kA2N_h2r-CcyWX90z.js} +1 -1
  51. package/dist/assets/{CustomerOnboardingActivationPage-B8Q88AWZ-BaWEcmlp.js → CustomerOnboardingActivationPage-BU5SX7SV-Difzp9Mo.js} +1 -1
  52. package/dist/assets/CustomerOnboardingContainerPage-CY24zxv4-DINzCoKw.js +1 -0
  53. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-CHfRyWDx-CIihsXq9.js → CustomerOnboardingDetailPageSkeleton-DGG2nFxO-Dw6MsSJ6.js} +1 -1
  54. package/dist/assets/{CustomerOnboardingNoStepsPage-AHaRcpU7-xDB3k1qq.js → CustomerOnboardingNoStepsPage-Dx_Py2Fa-Eccb4L_B.js} +1 -1
  55. package/dist/assets/{CustomerOnboardingPage-M-yohbX--BRZ9DmSD.js → CustomerOnboardingPage-AHQX5bSN-BxpQ0OvT.js} +1 -1
  56. package/dist/assets/CustomerOnboardingProductSuitePage-CJ9rX2hA-BJUYSoDy.js +202 -0
  57. package/dist/assets/{Dashboard-BG4b-9G4-DRHcy_jk.js → Dashboard-BQGdcgDK-CcNLKkZL.js} +1 -1
  58. package/dist/assets/{DashboardReportPage-BzRypSME-B1wlkHBu.js → DashboardReportPage-C9eB1Lz--5ieAwPtY.js} +1 -1
  59. package/dist/assets/{DashboardSidebarBackgroundAnimation-iToqk56B-QOlDYIkj.js → DashboardSidebarBackgroundAnimation-Cu7qPhOd-CTi4Znx6.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionItem-LqdXkh9A-ClnFxSxE.js → DepositAccTransactionItem-DOcqx_qa-leYCAzF7.js} +1 -1
  61. package/dist/assets/{DepositAccTransactionListPage-CdvLbfLi-BkzXareI.js → DepositAccTransactionListPage-gxOQSQ9a-C_x5v-6x.js} +1 -1
  62. package/dist/assets/{DomesticWireDetailsPage-B42h6sda-BlhXTC8v.js → DomesticWireDetailsPage-C_chbExL-BeToz5h5.js} +1 -1
  63. package/dist/assets/{DownloadOverlay-BaDe2oAY-C0WKjhwB.js → DownloadOverlay-a0IFrzRd-D3N8T5hh.js} +1 -1
  64. package/dist/assets/{DrawerPage-CstJJdfo-BMlsTngW.js → DrawerPage-D3ezgD8z-B72SfIcT.js} +1 -1
  65. package/dist/assets/{EditPeoplePage-DnOwrdDz-B_gALQwf.js → EditPeoplePage-BnCysZo9-DrBsiLvG.js} +1 -1
  66. package/dist/assets/{EditReimbursementDetailPage-CibEtPqY-Ba3HnmL-.js → EditReimbursementDetailPage-BzKR9gus-CcV8vLu7.js} +1 -1
  67. package/dist/assets/{EntityDetailPage-DkdoV8Td-ePZWanlx.js → EntityDetailPage-B8vx2Mri-Dq6ftPMD.js} +2 -2
  68. package/dist/assets/{EntitySummarySection-mA5rFNgr-CDqHLliz.js → EntitySummarySection-B5pV5wTI-DsRwDVIH.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationOverviewPage-Cdb_ye_U-Cf6Va-1j.js → ExpenseAutomationOverviewPage-D25gPCR4-DOT9Bi2a.js} +8 -8
  70. package/dist/assets/{ExpenseAutomationPage-C8BdII8_-Sy2BBx73.js → ExpenseAutomationPage-BUAS2p9i-IL1JLlJv.js} +134 -134
  71. package/dist/assets/{ExpressPayPage-D-q6m2Sl-BeWk56q6.js → ExpressPayPage-DfIwfewF-QpNTIKub.js} +1 -1
  72. package/dist/assets/{FeaturePreviewPage-Brmih5xQ-CNfGsyYq.js → FeaturePreviewPage-AXorSpml-Ds6bcvAF.js} +1 -1
  73. package/dist/assets/{FollowStepsSection-C0R9691z-YdxBDdK3.js → FollowStepsSection-YR8SDxZC-jK4GFXy_.js} +1 -1
  74. package/dist/assets/{GlobalReviewListPage-wZ4Kv7Km-CYoeqYD8.js → GlobalReviewListPage-CxH9D6qC-D9VCs7_X.js} +1 -1
  75. package/dist/assets/{InformationCardStack-C_Vo9lw4-CCXOLPC5.js → InformationCardStack-GuTsARmk-m7W2Cyla.js} +2 -2
  76. package/dist/assets/{InsightsCardStack-B18tApRg-BOSBW8ij.js → InsightsCardStack-CmTNccBr-B7V7JJKw.js} +5 -5
  77. package/dist/assets/{InsightsSection-BT1h9fEy-CG8NWYpP.js → InsightsSection-Bu-MplmN-Dorr_z_6.js} +5 -5
  78. package/dist/assets/{IntegrationsSettingsPage-BXihQUgf-xTTVWlbO.js → IntegrationsSettingsPage-JZMYvwgs-DuQDlnR9.js} +1 -1
  79. package/dist/assets/{InternationalWireSwiftDetailsPage-s2KDdELd-DHDlKqAc.js → InternationalWireSwiftDetailsPage-CM50BUc0-_CxvnrXr.js} +1 -1
  80. package/dist/assets/{InternationalWireVerificationPage-seQdCIHj-D9iMmyqy.js → InternationalWireVerificationPage-Cg0oEA0I-D1TCfpW-.js} +3 -3
  81. package/dist/assets/{InviteFormPage-DORYlkDF-bwYieO-t.js → InviteFormPage-CDlB29vX-Dmvvor8B.js} +1 -1
  82. package/dist/assets/{InvitePageListView-__0_bfoj-C6bYRXTf.js → InvitePageListView-74Ymz8Xr-JpwUJSKI.js} +1 -1
  83. package/dist/assets/{InvitePeoplePage-BPU0cUoJ-Bj-v1jch.js → InvitePeoplePage-DxLF-5KU-CkS36yG4.js} +1 -1
  84. package/dist/assets/{InvoiceUploadSection-Cf_VG6ou-BaN1AnoI.js → InvoiceUploadSection-De-7n3RO-qOxwsJtX.js} +1 -1
  85. package/dist/assets/{IssueChargeCardPage-Ak_ZYHLC-Dfun0s1b.js → IssueChargeCardPage-CzKlIsrE-CA_eEqsH.js} +1 -1
  86. package/dist/assets/{LabeledAddressValue-Dv_iNmJ1-D8iNfCXo.js → LabeledAddressValue-CZwyvCy5-D1-9Sm0B.js} +1 -1
  87. package/dist/assets/{LabeledAddressValueField-BOu3phtO-Tb5QlCYn.js → LabeledAddressValueField-k9TP-qlZ-BzpglZfd.js} +1 -1
  88. package/dist/assets/{LabeledControlledCheckBoxField-CPIKQ-CK-DoL2IVRF.js → LabeledControlledCheckBoxField-DBnXkX-G-D4fP_6xf.js} +1 -1
  89. package/dist/assets/{LabeledCountryMultiSelectField-BfXHGTpW-DhXS1om9.js → LabeledCountryMultiSelectField-CiWNHg9A-DFrwqamp.js} +1 -1
  90. package/dist/assets/{LabeledCreatableSingleSelectField-xk2HC5O8-MJI7bqGI.js → LabeledCreatableSingleSelectField-DdVE_wVv-xntEGmYo.js} +1 -1
  91. package/dist/assets/{LabeledDocumentField-D8RhxYIe-BgxzdCdT.js → LabeledDocumentField-DGnh1cGh-BCYe8_PA.js} +1 -1
  92. package/dist/assets/{LabeledDropDownFormattedTextField-ClNFgUx5-Z7VcAQiD.js → LabeledDropDownFormattedTextField-BnaconeO-Ced0Yfaq.js} +1 -1
  93. package/dist/assets/{LabeledMultiSelectField-BpLilatj-DeJuZbkW.js → LabeledMultiSelectField-Bt5PGbgf-8xamnDnk.js} +1 -1
  94. package/dist/assets/{LabeledText-Xnlcoee7-BORoJuWl.js → LabeledText-D9rbUJbs-B8rHFe3f.js} +1 -1
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DSu4gVyZ-DWLDQxKc.js → LabeledUserSingleSelectWithSubtitlesField-DsstNVEx-CdKxnW8j.js} +1 -1
  96. package/dist/assets/{LabeledZeniRolesDropDownField-Dm6FC_X5-CbXz_lhJ.js → LabeledZeniRolesDropDownField-DhvE24vx-B-YVtH41.js} +1 -1
  97. package/dist/assets/{LinkJETransactionPage-D0tsT5TK-DAPdl6cr.js → LinkJETransactionPage-CpttcuV1-DTLtK8Xw.js} +2 -2
  98. package/dist/assets/{LockCardPage-DYNFfr7G-DBCRwQYk.js → LockCardPage-FMI6xt1u-BqXJz86i.js} +1 -1
  99. package/dist/assets/{LowBalancePopup-BHUFtl2y-zv67Zrf2.js → LowBalancePopup-UNnJZwgC-D6ASOhaV.js} +1 -1
  100. package/dist/assets/MagicLinkACHDetailsPage-Bwzk6331-BkvpBbKP.js +1 -0
  101. package/dist/assets/MagicLinkDomesticWireDetailsPage-23WXWUBb-DxgLQKhU.js +1 -0
  102. package/dist/assets/MagicLinkInternationalWireDetailsPage-XqDeRmny-DaBhYRdy.js +1 -0
  103. package/dist/assets/{MagicLinkSuccessPage-B-8mtcQ5-DpyDsIxF.js → MagicLinkSuccessPage-MURH2rp8-CYwIx8kJ.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-DHU7VtF2-BYiH62Bb.js → MagicLinkTitleSection-Cyx2YimC-BzlWjntf.js} +1 -1
  105. package/dist/assets/MailingDetailsSection-Ro9Lxvtp-BP_WY31Z.js +21 -0
  106. package/dist/assets/{Menu-BumlrBWb-BEr87esv.js → Menu-XT10vy6U-BOoUbuzb.js} +1 -1
  107. package/dist/assets/{MyBankConnectionsSettingsPage-BP8ahgjX-BMfBoFzF.js → MyBankConnectionsSettingsPage-BwD3OyXL-Da0NgCMi.js} +1 -1
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-DL6ZI6yW-ij0p64lA.js → MyPendingActivationChargeCardListPage-B4yQ0O4T-B-nL-DnD.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-D0t4K8ns-CzlYkZMd.js → MyProfileSettingsPage-Bb4QkILK-HSMShd-J.js} +5 -5
  110. package/dist/assets/{NavBarWithPicker-BtWbUncS-DufGSdNq.js → NavBarWithPicker-DhLovvzt-DexTgtAK.js} +1 -1
  111. package/dist/assets/{NavigationArrow-CxgIRSy6-BgJ6OCs1.js → NavigationArrow-lK8LcatV-DGfMOxMA.js} +1 -1
  112. package/dist/assets/{NavigationDots-B3pcllxp-CeqIa_JP.js → NavigationDots-Dp0jKWtv-wJZlAbQ6.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-cvM5npvx-DgdMkbZs.js → NewGlobalMerchantPage-DFt03MpW-DqMLqtG6.js} +1 -1
  114. package/dist/assets/{NoDataChart-CkbRqqmB-BCSU88f3.js → NoDataChart-BVStkyEY-B8WZvGsw.js} +1 -1
  115. package/dist/assets/{NoDataTable-D5uU7rww-ZqVUz5-I.js → NoDataTable-CBglXVQp-DDY10FD4.js} +1 -1
  116. package/dist/assets/{NotFoundPage-CQ43hKOe-C2lcokwW.js → NotFoundPage-8N4Q0cRS-l_4f29AK.js} +7 -7
  117. package/dist/assets/{NotificationSettingsPage-B1Lup2VT--8jvAFCP.js → NotificationSettingsPage--cl75C4Y-CI4sz5M5.js} +1 -1
  118. package/dist/assets/{NotificationsListConfig-DbMLqAOq-DccfT18S.js → NotificationsListConfig-BvqUVi6A-BHY0be2X.js} +1 -1
  119. package/dist/assets/{NotificationsPage-AB3KsQi7-DnMOtecg.js → NotificationsPage-ClhmC4cD-IBtrx1co.js} +1 -1
  120. package/dist/assets/{OpExByVendorPage-SzuZwalp-DDZWyows.js → OpExByVendorPage-B24tsc-s-D6QTllTB.js} +1 -1
  121. package/dist/assets/{OverlayContainerPage-Daz3A7cI-1Wm2SceQ.js → OverlayContainerPage-Daz3A7cI-qKQBMmtx.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-SYjTIobN-Dk2Wi-kP.js → PandLWithForecastPage-ChmIZfeB--a2CqoGA.js} +2 -2
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-Bsx0mGaZ-_R3KAHgB.js → PaymentAccountSetupBillingAddressSection-rhNK3_SE-DvD9qIA8.js} +1 -1
  124. package/dist/assets/{PeoplePage-B5JrcDNI-7bZrkr3e.js → PeoplePage-PetKjS8P-_ragIp3s.js} +1 -1
  125. package/dist/assets/{Preview-1PrXr5aI.js → Preview-BfeJRZ_s.js} +1 -1
  126. package/dist/assets/{ProductsCarousel-CVoL_xl4-DNVzlhgi.js → ProductsCarousel-DzhNUiJk-CnpcLYLM.js} +1 -1
  127. package/dist/assets/{PromoBaseCards-C8qSUCzq-BtzSzeGC.js → PromoBaseCards-ZTN2uS4W-CaNYBpDe.js} +1 -1
  128. package/dist/assets/{QBOConnectionDialog-QFZbkFOA-CRqr7ek8.js → QBOConnectionDialog-CBtavUIz-BfsbqfyR.js} +1 -1
  129. package/dist/assets/{QBOSetupSection-B2qiAlYU-DHwrKclh.js → QBOSetupSection-jcVYFWfP-BR9neq53.js} +1 -1
  130. package/dist/assets/{ReimbursementApprovalRuleDetailPage-iqzN8yeY-SNXyRydX.js → ReimbursementApprovalRuleDetailPage-BoarRMWS-CplZNZTA.js} +1 -1
  131. package/dist/assets/{ReimbursementApprovalRulesPage-BWFxJ80S-BTK627HM.js → ReimbursementApprovalRulesPage-B5hHz-7T-COzYdYAx.js} +1 -1
  132. package/dist/assets/{ReimbursementDetailPage-Cb9BOq4R-Do3wFQM0.js → ReimbursementDetailPage-YfiCLu3C-DRrFxOgG.js} +1 -1
  133. package/dist/assets/{ReimbursementPromoPage-D-NSe4nk-C8HKRvTb.js → ReimbursementPromoPage-CC_zFd3U-B-6fRWux.js} +4 -4
  134. package/dist/assets/{ReimbursementSetUpPage-zUHUxId8-B7JOVI8H.js → ReimbursementSetUpPage-ChjBTodZ-BokcNixy.js} +1 -1
  135. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-CMupP_NB-3bqtC3ZU.js → ReimbursementsBulkReviewDrawerPage-DOSDVT4u-B7pg5Efr.js} +1 -1
  136. package/dist/assets/{ReloadCard-Dh0SYKvO-CivpTO7T.js → ReloadCard-qzpNu5-B-VePHUMif.js} +1 -1
  137. package/dist/assets/{ReportTableViewSelector-0H1aO3_G-BU09ACUj.js → ReportTableViewSelector-kzIQLZ5u-DS78KTH3.js} +1 -1
  138. package/dist/assets/{ReportsPage-DsFJrJ9D-DOmL8e9o.js → ReportsPage-DVZ3Rcn1-CBE174bA.js} +5 -5
  139. package/dist/assets/{RevenueChart-BlQnByKx-BTsHsCrM.js → RevenueChart-Bu8VCI9M-BYSxY3Z8.js} +14 -14
  140. package/dist/assets/{ReviewDetailsPage-CV-J7_FZ-CsFpRQAj.js → ReviewDetailsPage-Cl2_0ldt-BqZxApRm.js} +1 -1
  141. package/dist/assets/{ReviewOverlay-CwyShttD-7e_mp995.js → ReviewOverlay-vmoQ2B3U-XNVWskNH.js} +1 -1
  142. package/dist/assets/{RoleWithToolTip-CeOpT_6v-CR5cFRVU.js → RoleWithToolTip-CEcusyL7-YmpTx_Di.js} +1 -1
  143. package/dist/assets/{ScheduleDetailsFixedAssetsPage-G0FPNF5V-Dwq4kG8E.js → ScheduleDetailsFixedAssetsPage-D9w3rUch-DKLGn-zP.js} +3 -3
  144. package/dist/assets/{ScheduleDetailsPage-D3WXeMzk-CfZ8k9L0.js → ScheduleDetailsPage-LbjrnfcH-DCCH1T9I.js} +1 -1
  145. package/dist/assets/{ScheduleSequenceTable-DdrN0kHc-BEcJmm2S.js → ScheduleSequenceTable-2IpjhbUO-GCUPvy0g.js} +1 -1
  146. package/dist/assets/{ScreenRoutes-BHvO3l7n.js → ScreenRoutes-DkDRu-4T.js} +1 -1
  147. package/dist/assets/{SetUpAccountSection-DjGIyGqz-D-ESbU3W.js → SetUpAccountSection-p_viPmIN-BeZeCWCj.js} +1 -1
  148. package/dist/assets/{SignIn-KN2wUeWN-Bl8me7dp.js → SignIn-DhRwLJFX-CrhLsfuP.js} +8 -8
  149. package/dist/assets/{SignInScreen-CosD6y-4.js → SignInScreen-DLU3c9qR.js} +1 -1
  150. package/dist/assets/{SpendManagementListViewPage-DA0yJkNS-D-4Sjt7d.js → SpendManagementListViewPage-C3i-Mkip-BJcfLEEj.js} +5 -5
  151. package/dist/assets/{SpendManagementPerTabPage-CIiwcTHn-D8XSRhOm.js → SpendManagementPerTabPage-dTz2pMKg-CV1wRQLN.js} +1 -1
  152. package/dist/assets/{SpendManagementSection-BLZOU6Ll-DhM5PEsF.js → SpendManagementSection-DKMG4ReN-CZlClCbP.js} +1 -1
  153. package/dist/assets/StatementItem-Dk8gBfGY-DssA0Zy_.js +31 -0
  154. package/dist/assets/{StatementsPage-DCjD7tSA-38duBYaa.js → StatementsPage-DwvWOETo-C11bqWeD.js} +1 -1
  155. package/dist/assets/{StatusSwitcher-CiOSpmnA-B-Pdg5ku.js → StatusSwitcher-Moxr70rd-DtIz0Sb6.js} +1 -1
  156. package/dist/assets/{SubTabSwitcher-CfxBS2oi-C3gzBc7d.js → SubTabSwitcher-DnCoUKmO-qRR_BP7y.js} +1 -1
  157. package/dist/assets/SummaryCard-DvdjDQ13-B4TCkks7.js +1 -0
  158. package/dist/assets/{TaskManagementPage-q5-Uh7TS-RZCP_w9W.js → TaskManagementPage-kHOwTTeJ-D1GVz39b.js} +1 -1
  159. package/dist/assets/{TimeRangeSwitcher-B7_2Hok--CRDw5XO7.js → TimeRangeSwitcher-8DihGZnj-BuenjRnY.js} +11 -11
  160. package/dist/assets/{TimeframeSwitcher-nC3rnif3-hgrViqzw.js → TimeframeSwitcher-Dy5hbFn4-tf-sE1Tu.js} +1 -1
  161. package/dist/assets/{TimeframeSwitcherWithToggle-DkOcWDwA-ByRrkSQo.js → TimeframeSwitcherWithToggle-V2cHhGoQ-ChkncCQh.js} +2 -2
  162. package/dist/assets/{TopExCard-aqOoqjT0-BIe6wtJL.js → TopExCard-D_okDk9T-wYnCPso1.js} +10 -10
  163. package/dist/assets/{TopExDetailPage-DIzdQ0cx-BShaXLbS.js → TopExDetailPage-pOK_Ly9f-DZHeA38W.js} +8 -8
  164. package/dist/assets/{TransactionDetailPage-B_hEEP8t-CyUV09lj.js → TransactionDetailPage-T1xurXsz-B4W_5S1Q.js} +1 -1
  165. package/dist/assets/{TransactionList-UYBDB4bd-V0q82PSj.js → TransactionList-DblCSg0s-Dp5Vrkhr.js} +1 -1
  166. package/dist/assets/{TransactionListBig-OdFVjIup-DNl6d4lZ.js → TransactionListBig-JLNkkeay-kxPrn2Fz.js} +5 -5
  167. package/dist/assets/{TransactionListPage-BXYB5l79-Blz66V-g.js → TransactionListPage-Cf2i0F_k-CbyopTmd.js} +2 -2
  168. package/dist/assets/{TransactionVendorDetailPage-kDn1yhpe-BNClTtjy.js → TransactionVendorDetailPage-B4T07nWa-DPNm9QGH.js} +1 -1
  169. package/dist/assets/{TransferDrawerPage-CtSQvv-q-DvqkYz9z.js → TransferDrawerPage-BukQB5RF-CjEiIEvy.js} +1 -1
  170. package/dist/assets/{TreasuryOverviewPage-Dwp-RAwa-C92isYhA.js → TreasuryOverviewPage-C0bQkCDh-BxK_GNbO.js} +1 -1
  171. package/dist/assets/{TreasuryPromoPage-CqiGJJb1-Uf7831Ma.js → TreasuryPromoPage-BaXLj90f-CHTsHIFq.js} +1 -1
  172. package/dist/assets/{TreasuryStatementsPage-BvjfEhwz-J52CK7ld.js → TreasuryStatementsPage-CNK6wX8W-D72m3AI-.js} +2 -2
  173. package/dist/assets/{TreasuryTaxLetterPage-C3B6iff1-DkcCuLqO.js → TreasuryTaxLetterPage-DEnUpGEu-BnF_XmM3.js} +1 -1
  174. package/dist/assets/{TrendChart-DwPnEwyO-CrxbA9Yz.js → TrendChart-BhcSso96-HdF7LRi9.js} +1 -1
  175. package/dist/assets/{TrendWithTransactions-B3oV0JPi-DXjMckyZ.js → TrendWithTransactions-B6xQ_DkB-Cvs1eKME.js} +3 -3
  176. package/dist/assets/{UncategorizedAccountsMappingPage-bGvTx0Pv-D-bTmo-G.js → UncategorizedAccountsMappingPage-DDqyVfnh-eAWCdEG0.js} +2 -2
  177. package/dist/assets/{UnitIntegrationPage-CGqGix7l-DWYWmoeO.js → UnitIntegrationPage-BpT6E05N-RmQBxDe9.js} +1 -1
  178. package/dist/assets/{UploadAdditionalDocumentOverlay-DYbC57rE-BkWt4a0C.js → UploadAdditionalDocumentOverlay-Dgwmxm6G-BrPUqWPJ.js} +1 -1
  179. package/dist/assets/{Vendor2FAPopup-CF5GvGtl-Dvtf7SuI.js → Vendor2FAPopup-CayW9AB7-DH4zWHWM.js} +1 -1
  180. package/dist/assets/VendorACHDetailsPage-CjsWjEGI-DSO-nYli.js +1 -0
  181. package/dist/assets/{VendorDetailPage-LmgMG0tb-Byq5gX7I.js → VendorDetailPage-DQKnd_wl-DwLsSmFh.js} +5 -5
  182. package/dist/assets/VendorDomesticWireDetailsPage-DBOWshWu-N9IiH6Qb.js +1 -0
  183. package/dist/assets/{VendorFiling1099EditablePage-DZYtpPRR-D51hiC0K.js → VendorFiling1099EditablePage-monlt0GX-DhHW1Hg8.js} +32 -32
  184. package/dist/assets/{VendorFirstReviewPage-DDj-Rw2b-CNftOlXN.js → VendorFirstReviewPage-B_5VMGPE-DN-QZxaX.js} +1 -1
  185. package/dist/assets/{VendorInternationalWireDetailsPage-VBJ-6ETL-Booitxzm.js → VendorInternationalWireDetailsPage-Czz9BmEm-DfcATEGo.js} +1 -1
  186. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-dc3xswld-CxV0ihpM.js → VendorInternationalWireSwiftDetailsPage-B-mh5P3v-Bc79bIRM.js} +1 -1
  187. package/dist/assets/{VendorsAccountsSection-CAygTvfU-PQjUAMyw.js → VendorsAccountsSection-BCxVL3Vy-BoF6gQ0C.js} +1 -1
  188. package/dist/assets/{VerifyDevice-CxLFy5GU-FO4xPTGf.js → VerifyDevice-CzW6x8kw-B7mzxysF.js} +1 -1
  189. package/dist/assets/{VideoPlayer-DKj4Ii21-DvsOSGvC.js → VideoPlayer-B6HamlwN-DO-Ebeno.js} +2 -2
  190. package/dist/assets/{VideoPopup-CFvt5o_3-Dq8-3PZ7.js → VideoPopup-D2mt1wC7-DHjn2cBV.js} +2 -2
  191. package/dist/assets/{WarningsDrawerPage-BiBeB75Y-CvopzSGg.js → WarningsDrawerPage-BbN2G_rG-D-RK3Kf3.js} +1 -1
  192. package/dist/assets/{ZeniAccountDetailPage-CTrz5iPv-DqvEw3gM.js → ZeniAccountDetailPage-Bs_CVksP-aa_P2NUV.js} +1 -1
  193. package/dist/assets/{ZeniAccountListViewPage-DUfa9C7y-BZEy-IQo.js → ZeniAccountListViewPage-D5VNz-Hq-Cl6QAZp7.js} +7 -7
  194. package/dist/assets/{ZeniAccountNavBarPieces-knHeWdLO-AH1IZPcl.js → ZeniAccountNavBarPieces-Dr8RdhtI-Bb7xJeYD.js} +1 -1
  195. package/dist/assets/{ZeniAccountPromoPage-BnGvEYqf-CrQ6v88z.js → ZeniAccountPromoPage-DvOrXg46-D6yWqYxW.js} +1 -1
  196. package/dist/assets/{ZeniAccountSetupPage-JnPZalVG-BDl23oEc.js → ZeniAccountSetupPage-zxlxRsQl-LI3fD0r9.js} +1 -1
  197. package/dist/assets/{ZeniCopyright-B4Tk2oOq-CXbM0Grg.js → ZeniCopyright-F1ki_Lss-DMCcW5zx.js} +1 -1
  198. package/dist/assets/{ZeniTransferAmountSlider-bXoRbaVx-6dPMWxM6.js → ZeniTransferAmountSlider-CK6HDTK_-DITkaxMM.js} +1 -1
  199. package/dist/assets/{add-to-wallet-DgdBD8_G-AXPe0pkT.js → add-to-wallet-DgdBD8_G-B95D_4Mz.js} +1 -1
  200. package/dist/assets/{analytics-CxlO61hU.js → analytics-Cvgud8Kt.js} +1 -1
  201. package/dist/assets/{analyticsHelper-BMXRwufY.js → analyticsHelper-B9B5MkKm.js} +1 -1
  202. package/dist/assets/{analyticsHelper-Bow8lzQJ-CHj_RrSy.js → analyticsHelper-BgGQcED5-B6zw5Y6I.js} +1 -1
  203. package/dist/assets/{arrow-south-east-round-PEovUgvH-Dzlwz29Y.js → arrow-south-east-round-PEovUgvH-D4yBr92E.js} +1 -1
  204. package/dist/assets/{auto-transfer-rule-mbafm5D3-BLb6_ETh.js → auto-transfer-rule-mbafm5D3-Bx6GnRAc.js} +1 -1
  205. package/dist/assets/{chartTypes-C6j6oBoS-BZFUzPy5.js → chartTypes-Cdx27b7W-ChloPEmp.js} +1 -1
  206. package/dist/assets/{commonDimensions-Dw7YNTQN-BXL9WfDm.js → commonDimensions-BIRY_wCD--kqEOvxT.js} +1 -1
  207. package/dist/assets/{commonTypes-Bq0C5-39-COdRGyc4.js → commonTypes-DfehYs8A-BsLjL_9-.js} +1 -1
  208. package/dist/assets/{constants-DADTWlZs.js → constants-BtzoEfaK.js} +1 -1
  209. package/dist/assets/{core-CdS6TbBI.js → core-CXv949D6.js} +1 -1
  210. package/dist/assets/{dash.all.min-CQOdCLZm.js → dash.all.min-Cqg4Xi33.js} +1 -1
  211. package/dist/assets/{detailCommon-DaTlK7zO-rBYMGZOI.js → detailCommon-C4lCnx9f-C7pmgfja.js} +2 -2
  212. package/dist/assets/{downloadPdf-CF50NGDy-C3CVRPmA.js → downloadPdf-BuszScX2-B_Z_90M1.js} +1 -1
  213. package/dist/assets/{empty-C2XzBW9x.js → empty-ByGWobuT.js} +1 -1
  214. package/dist/assets/{empty-Cmz_J3W0.js → empty-DMMVJjdh.js} +1 -1
  215. package/dist/assets/{epic-Bym8Uv6T.js → epic-CfYPw6_1.js} +1 -1
  216. package/dist/assets/{gift-box-Cmt9OgIZ-CUP-4n_V.js → gift-box-Cmt9OgIZ-BVRdqnGH.js} +1 -1
  217. package/dist/assets/{graphic-no-data-l-DU4J8fDt-BVVNCG_d.js → graphic-no-data-l-DU4J8fDt-BOH0Hki6.js} +1 -1
  218. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-BnLckQDb.js → graphic-no-data-net-burn-l-CzmycA0m-D2SwohD-.js} +1 -1
  219. package/dist/assets/{handshake-BPg58FML-D7GEYBir.js → handshake-BPg58FML-B7qt1m6p.js} +1 -1
  220. package/dist/assets/{index-DQ-_q88g.js → index-B7Vrs2at.js} +1 -1
  221. package/dist/assets/{index-DYn_MQoT.js → index-BoBO6goA.js} +1 -1
  222. package/dist/assets/{index-DROaP0em.js → index-BoFx375B.js} +1 -1
  223. package/dist/assets/{index-DP9FPy8G.js → index-CWzyMkSf.js} +1 -1
  224. package/dist/assets/{index-CJM34kzE.js → index-CuYWWTvq.js} +1 -1
  225. package/dist/assets/{index-D-0BPYxX.js → index-HEX4i15-.js} +7 -7
  226. package/dist/assets/{index--X9p0Eww.js → index-sODlkJM-.js} +1 -1
  227. package/dist/assets/{lexical-BF8_Y4ML.js → lexical-DVRjsGc3.js} +1 -1
  228. package/dist/assets/{liveblocks-C9IItjmp.js → liveblocks-Cb1r83bZ.js} +1 -1
  229. package/dist/assets/{lottie-DYs4z9Zg.js → lottie-ChpXBaXa.js} +1 -1
  230. package/dist/assets/mapLoadingInProgressToTreeNode-COOEc1T9-DGQoLemv.js +1 -0
  231. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-DioWEF-R-BUwU406H.js → mapSectionWithAcOnlyToTreeNode-KPnNJcR6-DHEAql9w.js} +1 -1
  232. package/dist/assets/{mapSpacerToTreeNode-pvGPhRLA-DSoXQ8Zu.js → mapSpacerToTreeNode-BgJYIgvo-fV_Gwxoc.js} +1 -1
  233. package/dist/assets/mapTimeframeBalancesToTreeNode-DAnYNYrr-D_2bOFsl.js +1 -0
  234. package/dist/assets/mapTimeframeBalancesToTreeNode-DKbBYyC9--OjhjG_D.js +1 -0
  235. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-BeGSkZpM-DL5IPXlV.js +1 -0
  236. package/dist/assets/{mui-G5lsnNTD.js → mui-ic6OiqS8.js} +1 -1
  237. package/dist/assets/{page-detail-CWX5S47F-QUJx5paC.js → page-detail-CWX5S47F-k_jk9CoG.js} +1 -1
  238. package/dist/assets/{radio-default-CiSgisfh-BTBFtxDQ.js → radio-default-CiSgisfh-za7RGM9N.js} +1 -1
  239. package/dist/assets/{react-CWMYidJr.js → react-9LgnLXOA.js} +1 -1
  240. package/dist/assets/{react-CgzNbPXa.js → react-BBhRq74A.js} +1 -1
  241. package/dist/assets/{react-_66Q8w7Q.js → react-Bdp1N68v.js} +1 -1
  242. package/dist/assets/{react-B-e8Clal.js → react-BuqZeXYc.js} +1 -1
  243. package/dist/assets/{react-BdPneu0p.js → react-CPjX1wmE.js} +2 -2
  244. package/dist/assets/{react-syN1Hur7.js → react-DK-HRtjG.js} +1 -1
  245. package/dist/assets/{react-CdFazbSr.js → react-DQZAFu6o.js} +1 -1
  246. package/dist/assets/{react-ClrH6tJV.js → react-gyhpZrY7.js} +1 -1
  247. package/dist/assets/{recharts-D5NIcLuw.js → recharts-C7z-lQH-.js} +1 -1
  248. package/dist/assets/{sentry-DsZ-ISDW.js → sentry-DNw4E1cx.js} +1 -1
  249. package/dist/assets/{shield-DOlUxcFf-CFV2z0Bb.js → shield-DOlUxcFf-D6nz_AIb.js} +1 -1
  250. package/dist/assets/toCOABalancesWithID-C__BVdeG-L2MMXLgC.js +1 -0
  251. package/dist/assets/{toChartData-CnjrCi9i-ByMqYB8i.js → toChartData-B0HFgnVy-FTnLuytJ.js} +1 -1
  252. package/dist/assets/{uploadAttachment-Ce0sdSDo-BWQyGvYp.js → uploadAttachment-DlvokhTk-r6x0axxP.js} +1 -1
  253. package/dist/assets/{uploadReceipts-CPw64UYa-D0Y-7e4v.js → uploadReceipts-CPw64UYa-BWHPlnz7.js} +1 -1
  254. package/dist/assets/{url-DEdpVf9t.js → url--ZPS5B7f.js} +1 -1
  255. package/dist/assets/{url-D_UC810Y.js → url-DBQRifxB.js} +1 -1
  256. package/dist/assets/{useLongPress-GCK2COYQ-B-Wkk00D.js → useLongPress-GCK2COYQ-DCMSiElk.js} +1 -1
  257. package/dist/assets/{usp-line-BBd1wKwW-DfDE7B5y.js → usp-line-BBd1wKwW-BHEAhb94.js} +1 -1
  258. package/dist/assets/{utils-17l1ReQl.js → utils-BM6IYCHh.js} +1 -1
  259. package/dist/assets/{zeni-epic-state-Djyf0FAG.js → zeni-epic-state-CKYsFVFb.js} +3 -3
  260. package/dist/index.html +1 -1
  261. package/package.json +2 -2
  262. package/dist/assets/CustomerOnboardingContainerPage-YGCksJfr-BC3BY741.js +0 -1
  263. package/dist/assets/CustomerOnboardingProductSuitePage-DqQ7Lcwq-I72zh07z.js +0 -202
  264. package/dist/assets/MagicLinkACHDetailsPage-D1Yrf6I3-B63bxqzA.js +0 -1
  265. package/dist/assets/MagicLinkDomesticWireDetailsPage-DF4qlmsy-Cp8T6D6l.js +0 -1
  266. package/dist/assets/MagicLinkInternationalWireDetailsPage-BNeI6INt-Bq7Xal4B.js +0 -1
  267. package/dist/assets/MailingDetailsSection-B-bODwAg-DoXtAkk9.js +0 -21
  268. package/dist/assets/StatementItem-DfbvINGt-CFmq5a0i.js +0 -31
  269. package/dist/assets/SummaryCard-YakCHMD--DNcgzO6G.js +0 -1
  270. package/dist/assets/VendorACHDetailsPage-CKmq7yOU-DgS0pAgp.js +0 -1
  271. package/dist/assets/VendorDomesticWireDetailsPage-CBYW97OY-9y7C0FCq.js +0 -1
  272. package/dist/assets/mapLoadingInProgressToTreeNode-BogZGPG9-BoCYap0V.js +0 -1
  273. package/dist/assets/mapTimeframeBalancesToTreeNode-BNu8T9PW-CODrB7uB.js +0 -1
  274. package/dist/assets/mapTimeframeBalancesToTreeNode-CiB5iztB-apGipl09.js +0 -1
  275. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-DwGOxYFm-CYHJ3lz8.js +0 -1
  276. package/dist/assets/toCOABalancesWithID-BxzNBK9u-enIkCG9Y.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c as g,F as Ie,co as ua,d as bt,bA as ha,i2 as pa,aL as Ue,bR as ye,y as ee,bu as ma,aN as B,i0 as ga,al as _e,gW as xa,gO as os,bv as fa,bN as Dt,b6 as is,ah as vt,bI as ss,p as Xe,kf as ya,g2 as Ca,am as pt,L as wa,gh as ba,gi as as,bn as va,ci as Sa,c0 as ja,ez as gn,bZ as jo,a9 as qt,bM as ko,ac as Jt,kg as ka,kh as Ia,ki as $a,kj as ln,kk as rs,kl as ls,km as La,kn as No,ko as Ta,dg as cs,kp as Aa,kq as Ea,kr as Ra,ks as Da,kt as Oa,ku as Ma,kv as _a,kw as za,kx as Fa,ky as Ba,kz as ds,kA as Pa,kB as Na,kC as Va,kD as Ha,gw as us,b2 as _n,cr as zn,k as hs,N as ps,w as ms,cC as xn,dO as Io,gs as Wa,fL as Ua,gZ as qa,aq as Ja,l as Ka,fw as Ga,aB as gs,kE as Ya,aT as $o,aO as Vo,gQ as xs,kF as Za,kG as Xa,kH as Qa,bD as fs,aR as er,gE as Rt,hS as Vn,ew as En,cP as Lo,ay as tr,ex as ys,di as nr,iO as or,dn as To,cw as Fn,cz as Bn,iv as nt,b as At,hF as ir,gx as Hn,je as Ho,de as Cs,cZ as hn,kI as sr,aY as ar,dm as ws,n as pn,il as bs,iw as yo,kJ as tn,e8 as vs,ea as Ss,iR as js,iS as ks,kK as rr,cX as Pn,im as Is,fk as $s,en as Wn,aH as Ao,kL as lr,cV as cr,aW as Ls,iD as dr,dM as ur,ao as ft,kM as hr,kN as pr,b0 as Un,ej as mr,a8 as gr,ek as xr,el as fr,em as yr,ep as Wo,eq as Uo,er as Cr,kO as wr,a_ as br,eB as vr,eC as Sr,eD as jr}from"./index-D-0BPYxX.js";import{a as s,S as Ts}from"./sentry-DsZ-ISDW.js";import{n as a,c as Ze,k as Eo}from"./mui-G5lsnNTD.js";import{bh as qn,Gi as qo,Gj as mn,Gk as kr,Gl as Ir,cx as $r,bL as Co,cy as Lr,EN as Jo,cz as Tr,cA as Ar,l8 as cn,bE as Nt,Gm as Ko,c4 as As,Gn as Er,bY as Rr,bo as Vt,Go as Dr,Gp as Es,Gq as Rs,Gr as Ds,Gs as Os,Gt as Ms,Gu as Ro,kU as Or}from"./zeni-epic-state-Djyf0FAG.js";import{r as _s,I as zs,n as nn,R as ht}from"./CollapsableReportTable-9GyG9N_I-7LyzoYc7.js";import{N as Jn}from"./AccountRow-Dqp3eLws-CGaSxCWi.js";import{o as Fs}from"./mapTimeframeBalancesToTreeNode-BNu8T9PW-CODrB7uB.js";import{d as Go}from"./mapLoadingInProgressToTreeNode-BogZGPG9-BoCYap0V.js";import{h as Mr}from"./VendorsAccountsSection-CAygTvfU-PQjUAMyw.js";import{u as _r,c as Yo,d as zr,m as Fr}from"./uploadAttachment-Ce0sdSDo-BWQyGvYp.js";import"./liveblocks-C9IItjmp.js";import"./core-CdS6TbBI.js";import"./recharts-D5NIcLuw.js";import"./lottie-DYs4z9Zg.js";import"./analytics-CxlO61hU.js";import"./lexical-BF8_Y4ML.js";import"./utils-17l1ReQl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e53b533d-dd82-4c83-9318-ff1f8493b79b",e._sentryDebugIdIdentifier="sentry-dbid-e53b533d-dd82-4c83-9318-ff1f8493b79b")}catch{}})();const{common:{navBar:{back:Br},texts:{refresh:Pr,close:Nr,copy:Vr,copied:Hr,open:Wr}},expenseAutomation:{common:{numbers:{maximumCount:Ur}}}}=Ie.getLocalizedStrings(),qr=a(Wa)`
1
+ import{o,bT as ca,q as ke,gf as Qi,gg as es,V as t,cn as da,aa as Pe,aP as ts,c as g,F as Ie,co as ua,d as bt,bA as ha,i2 as pa,aL as Ue,bR as ye,y as ee,bu as ma,aN as M,i0 as ga,al as Be,gW as xa,gO as ns,bv as fa,bN as Dt,b6 as os,ah as vt,bI as is,p as Xe,kf as ya,g2 as Ca,am as pt,L as wa,gh as ba,gi as ss,bn as va,ci as Sa,c0 as ja,ez as gn,bZ as So,a9 as qt,bM as jo,ac as Jt,kg as ka,kh as Ia,ki as $a,kj as ln,kk as as,kl as rs,km as La,kn as Po,ko as Ta,dg as ls,kp as Aa,kq as Ea,kr as Ra,ks as Da,kt as Oa,ku as za,kv as Ba,kw as Fa,kx as _a,ky as Ma,kz as cs,kA as Pa,kB as Na,kC as Va,kD as Ha,gw as ds,b2 as Bn,cr as Fn,k as us,N as hs,w as ps,cC as xn,dO as ko,gs as Wa,fL as Ua,gZ as qa,aq as Ja,l as Ka,fw as Ga,aB as ms,kE as Ya,aT as Io,aO as No,gQ as gs,kF as Za,kG as Xa,kH as Qa,bD as xs,aR as er,gE as Rt,hS as Nn,ew as En,cP as $o,ay as tr,ex as fs,di as nr,iO as or,dn as Lo,cw as _n,cz as Mn,iv as nt,b as At,hF as ir,gx as Vn,je as Vo,de as ys,cZ as hn,kI as sr,aY as ar,dm as Cs,n as pn,il as ws,iw as fo,kJ as tn,e8 as bs,ea as vs,iR as Ss,iS as js,kK as rr,cX as Pn,im as ks,fk as Is,en as Hn,aH as To,kL as lr,cV as cr,aW as $s,iD as dr,dM as ur,ao as ft,kM as hr,kN as pr,b0 as Wn,ej as mr,a8 as gr,ek as xr,el as fr,em as yr,ep as Ho,eq as Wo,er as Cr,kO as wr,a_ as br,eB as vr,eC as Sr,eD as jr}from"./index-HEX4i15-.js";import{a as s,S as Ls}from"./sentry-DNw4E1cx.js";import{n as a,c as Ze,k as Ao}from"./mui-ic6OiqS8.js";import{bh as Un,Gi as Uo,Gj as mn,Gk as kr,Gl as Ir,cx as $r,bL as yo,cy as Lr,EN as qo,cz as Tr,cA as Ar,l8 as cn,bE as Nt,Gm as Jo,c4 as Ts,Gn as Er,bY as Rr,bo as Vt,Go as Dr,Gp as As,Gq as Es,Gr as Rs,Gs as Ds,Gt as Os,Gu as Eo,kU as Or}from"./zeni-epic-state-CKYsFVFb.js";import{r as zs,I as Bs,n as nn,R as ht}from"./CollapsableReportTable-B0N8Ybey-DhyMNzbJ.js";import{N as qn}from"./AccountRow-B3ULDo0k-BhJpm00a.js";import{o as Fs}from"./mapTimeframeBalancesToTreeNode-DAnYNYrr-D_2bOFsl.js";import{d as Ko}from"./mapLoadingInProgressToTreeNode-COOEc1T9-DGQoLemv.js";import{h as zr}from"./VendorsAccountsSection-BCxVL3Vy-BoF6gQ0C.js";import{u as Br,c as Go,d as Fr,m as _r}from"./uploadAttachment-DlvokhTk-r6x0axxP.js";import"./liveblocks-Cb1r83bZ.js";import"./core-CXv949D6.js";import"./recharts-C7z-lQH-.js";import"./lottie-ChpXBaXa.js";import"./analytics-Cvgud8Kt.js";import"./lexical-DVRjsGc3.js";import"./utils-BM6IYCHh.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b28506a2-4940-4cfe-8f6e-5d94fc1f218b",e._sentryDebugIdIdentifier="sentry-dbid-b28506a2-4940-4cfe-8f6e-5d94fc1f218b")}catch{}})();const{common:{navBar:{back:Mr},texts:{refresh:Pr,close:Nr,copy:Vr,copied:Hr,open:Wr}},expenseAutomation:{common:{numbers:{maximumCount:Ur}}}}=Ie.getLocalizedStrings(),qr=a(Wa)`
2
2
  display: flex;
3
3
  width: ${o.sp4};
4
4
  height: ${o.sp4};
@@ -28,8 +28,8 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  align-items: center;
31
- padding-left: ${e=>Xo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
- padding-right: ${e=>Xo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
31
+ padding-left: ${e=>Zo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
+ padding-right: ${e=>Zo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
33
33
  `,Yr=a.div`
34
34
  display: flex;
35
35
  align-items: baseline;
@@ -80,7 +80,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
80
80
  &:hover {
81
81
  color: ${e=>e.theme.colors.primary};
82
82
  }
83
- `,ol=Eo`
83
+ `,ol=Ao`
84
84
  0% {
85
85
  transform: rotate(0deg);
86
86
  }
@@ -90,7 +90,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
90
90
  `,il=a.div`
91
91
  padding-top: ${o.sp0};
92
92
  padding-bottom: ${o.sp0};
93
- `,Zo=a(_e)`
93
+ `,Yo=a(Be)`
94
94
  color: ${e=>e.theme.colors.hero};
95
95
  text-align: center;
96
96
  display: flex;
@@ -128,10 +128,10 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
128
128
  stroke-width: 2;
129
129
  }
130
130
  `,Cn=a.span`
131
- font-weight: ${jo.regular};
131
+ font-weight: ${So.regular};
132
132
  color: ${e=>e.theme.colors.primary};
133
133
  `,ul=a.span`
134
- font-weight: ${jo.medium};
134
+ font-weight: ${So.medium};
135
135
  color: ${e=>e.theme.colors.primary};
136
136
  `,hl=a.span`
137
137
  color: ${e=>e.theme.colors.primary};
@@ -151,7 +151,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
151
151
  }
152
152
  text-decoration-color: ${e=>e.theme.colors.primary};
153
153
  }
154
- `,Xo={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},pl=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:p,...h}=c,i={...h},{threads:l,isLoading:r}=ba(i,!1,!1),m=l.filter(u=>u.id.includes(as)===!1);return t.jsxs(Jr,{isDisabled:r,onClick:e,"data-testid":B("comment-icon"),children:[t.jsx(va,{count:m.length,isLoading:r}),t.jsx(qr,{})]})},ml=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:p,isZeniUser:h,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(Yr,{children:e.rightSection.map((x,C)=>{switch(x){case"search":return t.jsx(ga,{isSearchOpen:(d.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:d,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:w=>{m(w)},downloadPresent:!1},C+x);case"refresh":return t.jsx(ye,{display:"block",placement:"bottom",title:Pr,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(nl,{onClick:u,$spinning:n==="In-Progress","data-testid":B("refresh-icon")})},C+x);case"comment":return h===!1?null:t.jsx(pl,{companyId:p,companyName:c,onAllThreadsClick:i});case"close":default:return t.jsx(ye,{display:"block",placement:"bottom",title:Nr,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(el,{onClick:l,"data-testid":B("close-icon")})},C+x)}})})},gl=({headerData:e,onBack:n})=>t.jsx(Zr,{children:e.leftSection.map((d,c)=>{switch(d){case"back":default:return t.jsx(ye,{display:"block",placement:"bottom",title:Br,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(tl,{onClick:n,"data-testid":B("back-button")})},c+d)}})}),Qo=({text:e,linkText:n,windowSize:d,isCopied:c,onLinkClick:p})=>{if(n==null||!n)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const h=e.indexOf(n);if(h===-1)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const i=e.substring(0,h),l=e.substring(h+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(Cn,{windowSize:d,children:[i.trim()," "]}):null,t.jsx(ye,{display:"flex",placement:"right",title:os.test(n)?c?Hr:Vr:Wr,enterTouchDelay:600,children:t.jsxs(hl,{onClick:()=>p?.(n),"data-testid":B("pre-link"),children:[n,c?t.jsx(Qr,{className:"success-icon"}):t.jsx(Xr,{className:"copy-icon"})]})}),l?t.jsxs(Cn,{windowSize:d,children:[l," "]}):null]})},ei=({subTitles:e})=>{const n=ke(),[,d]=xa(),[c,p]=s.useState(!1),h=s.useRef(null),i=s.useCallback(l=>{os.test(l)?(d(l),p(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[d]);return s.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),t.jsx(cl,{children:e.map((l,r)=>t.jsxs(ll,{children:[l.pre?t.jsx(Qo,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:c,onLinkClick:i}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(dl,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(ul,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Qo,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:c,onLinkClick:i}):null]},r+l.bold+l.pre+l.post))})};function xl(e){const{headerData:n,currentTab:d,completionStatus:c,onUpdateTab:p,selectedReconAccountId:h,getTabCountAndFetchState:i,reconcileDetailPageFetchState:l,forceShowSubtitle:r,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:x,navBarCustomElement:C,titleStyle:w={}}=e,f=i("autoCategorized")?.count??0,v=i("review")?.count??0,I=i("reconcile")?.count??0,y=n.tabs.length>0||n.subTitle.length>0,$=m==="transaction_categorization"&&d==="autoCategorized",O=m==="reconciliation"&&x==="review"&&h!=null,T=m==="reconciliation"&&x==="reconcile"&&h!=null,D=$?f>0:O?l==="In-Progress"?!0:v>0:T?l==="In-Progress"?!0:I>0:c!=="complete",S=bt(),b=ke();let A=[];return n.tabs.length>0&&(A=n.tabs.map(L=>({label:L.label,id:L.id,countDetails:i(L.id)}))),t.jsxs(Kr,{children:[t.jsx(ha,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:S.colors.grey4,onBackClick:()=>null,titleStyle:w,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(gl,{...e}),rightSideComponent:t.jsx(ml,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Pe,{controller:y===!0,children:t.jsx(Gr,{windowSize:b,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(il,{windowSize:b,children:t.jsx(pa,{allTabs:A,selectedTab:m==="transaction_categorization"?d??A[0].id:x??A[0].id,onTabChange:L=>{if(m==="transaction_categorization"){const H=kr(L.id);H!=null&&p(H)}else if(m==="reconciliation"){const H=Ir(L.id);H!=null&&u(H)}},maximumCountLimit:Ur})}),t.jsx(al,{windowSize:b}),t.jsx(rl,{}),t.jsx(Pe,{controller:D===!0||r===!0,children:t.jsx(Zo,{windowSize:b,children:n.tabs.map((L,H)=>(m==="reconciliation"?L.id===x:L.id===d)?t.jsx(sl,{children:t.jsx(ei,{subTitles:L.subTitle})},H+L.id):null)})})]}):t.jsx(Pe,{controller:D===!0||r===!0,children:t.jsx(Zo,{windowSize:b,children:t.jsx(ei,{subTitles:n.subTitle})})})})})]})}const fl=1;function yl({name:e,checkBoxes:n,mode:d,isDisabled:c,style:p,labelStyle:h,labelCheckBoxStyle:i,checkBoxStyle:l,width:r,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:x,checkBoxContainerStyle:C,draggable:w=!1,selectionLimit:f,infoIconContainerStyle:v,onDragStart:I,rowHeight:y=40,initialScrollOffSet:$,onScroll:O}){const T=ke(),D=s.useRef(null),{control:S}=Lo(),b=n.find(M=>M.groupLabel),A=n.filter(M=>!M.groupLabel),L=[];for(const M of A)if(M.isException||L.push(M.value),f!=null&&L.length===f+1)break;const H=n.filter(M=>M.defaultChecked).map(M=>M.value);return t.jsx(ys,{control:S,name:e,rules:m,defaultValue:H,render:({field:{value:M,ref:q,onChange:z}})=>{const Y=N=>{wl({event:N,value:M,allCheckBoxValues:L,groupLabelCheckBox:b,onChange:z})};return t.jsxs(bl,{style:p,windowSize:T,children:[b&&t.jsx(Do,{checkBox:b,index:0,value:M,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:C,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:h,width:r,draggable:w,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:c,selectionLimit:f,onDragStart:I,ref:q,onChangeHandler:Y}),t.jsx(vl,{children:t.jsx(_n,{style:{height:"100%",width:"100%"},children:({height:N,width:G})=>t.jsx(zn,{ref:D,height:N,width:G,itemCount:A.length,itemSize:()=>y,estimatedItemSize:y,initialScrollOffset:$??0,onScroll:({scrollOffset:V})=>{O?.(V)},overscanCount:fl,itemKey:V=>A[V].value,itemData:{checkBoxes:A,value:M,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:C,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:h,width:r,draggable:w,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:c,selectionLimit:f,onDragStart:I,ref:q,onChange:z,handleChangeEvent:Y,rowHeight:y},children:Cl})})})]})}})}const Cl=({index:e,style:n,data:d})=>{const c=s.useRef(null),{checkBoxes:p,value:h,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:C,labelStyle:w,width:f,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:y,checkedIconColor:$,isDisabled:O,selectionLimit:T,onDragStart:D,ref:S,handleChangeEvent:b}=d,A=p[e];return t.jsx(Ll,{style:{...n,width:"100%"},ref:c,children:t.jsx(Do,{checkBox:A,index:e,value:h,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:C,labelStyle:w,width:f,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:y,checkedIconColor:$,isDisabled:O,selectionLimit:T,onDragStart:D,ref:S,onChangeHandler:b})})},Do=s.forwardRef((e,n)=>{const{value:d,checkBox:c,groupLabelCheckBox:p,allCheckBoxValues:h,selectionLimit:i,mode:l,checkBoxStyle:r,labelCheckBoxStyle:m,isDisabled:u,draggable:x,checkBoxContainerStyle:C,infoIconContainerStyle:w,name:f,index:v,width:I,checkedIconColor:y,checkBoxIconStyle:$,labelStyle:O,onDragStart:T,onChangeHandler:D}=e,S=ke(),b=M=>{typeof n=="function"?n(M):n&&(n.current=M)};let A=d.includes(c.value);const L=Array.from(new Set([...d,c.value]));p?.value===c.value&&d.length>0&&(i!=null?A=L.length===h.length||L.length===i+1:A=h.every(M=>L.includes(M)===!0));const H=()=>l==="off"||c.isException?S==="small"?{display:"none",...r}:{visibility:"hidden",...r}:c.groupLabel?h.length===1&&h[0]===p?.value?{visibility:"hidden",...m}:m:r;return t.jsxs(jl,{mode:l,draggable:x===!0,onDragStart:M=>{T?.(M,c.value)},style:C,isDisabled:u,isSelected:A,exceptionMode:c.exceptionMode,children:[c.prefix?t.jsx(Sl,{className:"prefix-box",children:c.prefix}):null,c.isException?t.jsx(kl,{style:w,className:"checkbox-alert",children:t.jsx(ye,{style:{padding:`12px ${o.sp3}`},title:c.exceptionInfo??"",placement:"bottom-start",children:c.exceptionType==="info"?t.jsx(Il,{}):t.jsx($l,{})})}):t.jsx(lr,{name:`${f}.${c.value}`,checkBoxValue:c.value,value:A,checkedIconColor:y,isDisabled:u||!c.groupLabel&&!A&&i!=null&&L.length===i+1?"disabled":void 0,checkBoxStyle:H(),checkBoxIconStyle:$,ref:b,onChange:D}),typeof c.label=="string"&&c.label?t.jsx(cr,{isDisabled:u,label:c.label,labelStyle:O,htmlFor:`${f}.${c.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:I,backgroundColor:"inherit",...O}}):c.label]},`${c.value}_${v}`)});Do.displayName="CheckBoxWithLabel";const wl=({event:e,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:p})=>{const h=e.currentTarget.value,i=e.currentTarget.checked,l=c?.value,r=new Set(n);if(h===l){p(i?Array.from(new Set([l,...d])):[]);return}i?r.add(h):r.delete(h);const m=d.every(u=>r.has(u));l!=null&&(m&&!r.has(l)?r.add(l):!m&&r.has(l)&&r.delete(l)),p(Array.from(r))},bl=a.div`
154
+ `,Zo={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},pl=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:p,...h}=c,i={...h},{threads:l,isLoading:r}=ba(i,!1,!1),m=l.filter(u=>u.id.includes(ss)===!1);return t.jsxs(Jr,{isDisabled:r,onClick:e,"data-testid":M("comment-icon"),children:[t.jsx(va,{count:m.length,isLoading:r}),t.jsx(qr,{})]})},ml=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:p,isZeniUser:h,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(Yr,{children:e.rightSection.map((x,C)=>{switch(x){case"search":return t.jsx(ga,{isSearchOpen:(d.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:d,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:w=>{m(w)},downloadPresent:!1},C+x);case"refresh":return t.jsx(ye,{display:"block",placement:"bottom",title:Pr,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(nl,{onClick:u,$spinning:n==="In-Progress","data-testid":M("refresh-icon")})},C+x);case"comment":return h===!1?null:t.jsx(pl,{companyId:p,companyName:c,onAllThreadsClick:i});case"close":default:return t.jsx(ye,{display:"block",placement:"bottom",title:Nr,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(el,{onClick:l,"data-testid":M("close-icon")})},C+x)}})})},gl=({headerData:e,onBack:n})=>t.jsx(Zr,{children:e.leftSection.map((d,c)=>{switch(d){case"back":default:return t.jsx(ye,{display:"block",placement:"bottom",title:Mr,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(tl,{onClick:n,"data-testid":M("back-button")})},c+d)}})}),Xo=({text:e,linkText:n,windowSize:d,isCopied:c,onLinkClick:p})=>{if(n==null||!n)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const h=e.indexOf(n);if(h===-1)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const i=e.substring(0,h),l=e.substring(h+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(Cn,{windowSize:d,children:[i.trim()," "]}):null,t.jsx(ye,{display:"flex",placement:"right",title:ns.test(n)?c?Hr:Vr:Wr,enterTouchDelay:600,children:t.jsxs(hl,{onClick:()=>p?.(n),"data-testid":M("pre-link"),children:[n,c?t.jsx(Qr,{className:"success-icon"}):t.jsx(Xr,{className:"copy-icon"})]})}),l?t.jsxs(Cn,{windowSize:d,children:[l," "]}):null]})},Qo=({subTitles:e})=>{const n=ke(),[,d]=xa(),[c,p]=s.useState(!1),h=s.useRef(null),i=s.useCallback(l=>{ns.test(l)?(d(l),p(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[d]);return s.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),t.jsx(cl,{children:e.map((l,r)=>t.jsxs(ll,{children:[l.pre?t.jsx(Xo,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:c,onLinkClick:i}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(dl,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(ul,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Xo,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:c,onLinkClick:i}):null]},r+l.bold+l.pre+l.post))})};function xl(e){const{headerData:n,currentTab:d,completionStatus:c,onUpdateTab:p,selectedReconAccountId:h,getTabCountAndFetchState:i,reconcileDetailPageFetchState:l,forceShowSubtitle:r,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:x,navBarCustomElement:C,titleStyle:w={}}=e,f=i("autoCategorized")?.count??0,v=i("review")?.count??0,I=i("reconcile")?.count??0,y=n.tabs.length>0||n.subTitle.length>0,$=m==="transaction_categorization"&&d==="autoCategorized",O=m==="reconciliation"&&x==="review"&&h!=null,T=m==="reconciliation"&&x==="reconcile"&&h!=null,D=$?f>0:O?l==="In-Progress"?!0:v>0:T?l==="In-Progress"?!0:I>0:c!=="complete",S=bt(),b=ke();let A=[];return n.tabs.length>0&&(A=n.tabs.map(L=>({label:L.label,id:L.id,countDetails:i(L.id)}))),t.jsxs(Kr,{children:[t.jsx(ha,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:S.colors.grey4,onBackClick:()=>null,titleStyle:w,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(gl,{...e}),rightSideComponent:t.jsx(ml,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Pe,{controller:y===!0,children:t.jsx(Gr,{windowSize:b,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(il,{windowSize:b,children:t.jsx(pa,{allTabs:A,selectedTab:m==="transaction_categorization"?d??A[0].id:x??A[0].id,onTabChange:L=>{if(m==="transaction_categorization"){const H=kr(L.id);H!=null&&p(H)}else if(m==="reconciliation"){const H=Ir(L.id);H!=null&&u(H)}},maximumCountLimit:Ur})}),t.jsx(al,{windowSize:b}),t.jsx(rl,{}),t.jsx(Pe,{controller:D===!0||r===!0,children:t.jsx(Yo,{windowSize:b,children:n.tabs.map((L,H)=>(m==="reconciliation"?L.id===x:L.id===d)?t.jsx(sl,{children:t.jsx(Qo,{subTitles:L.subTitle})},H+L.id):null)})})]}):t.jsx(Pe,{controller:D===!0||r===!0,children:t.jsx(Yo,{windowSize:b,children:t.jsx(Qo,{subTitles:n.subTitle})})})})})]})}const fl=1;function yl({name:e,checkBoxes:n,mode:d,isDisabled:c,style:p,labelStyle:h,labelCheckBoxStyle:i,checkBoxStyle:l,width:r,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:x,checkBoxContainerStyle:C,draggable:w=!1,selectionLimit:f,infoIconContainerStyle:v,onDragStart:I,rowHeight:y=40,initialScrollOffSet:$,onScroll:O}){const T=ke(),D=s.useRef(null),{control:S}=$o(),b=n.find(z=>z.groupLabel),A=n.filter(z=>!z.groupLabel),L=[];for(const z of A)if(z.isException||L.push(z.value),f!=null&&L.length===f+1)break;const H=n.filter(z=>z.defaultChecked).map(z=>z.value);return t.jsx(fs,{control:S,name:e,rules:m,defaultValue:H,render:({field:{value:z,ref:q,onChange:F}})=>{const Y=N=>{wl({event:N,value:z,allCheckBoxValues:L,groupLabelCheckBox:b,onChange:F})};return t.jsxs(bl,{style:p,windowSize:T,children:[b&&t.jsx(Ro,{checkBox:b,index:0,value:z,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:C,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:h,width:r,draggable:w,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:c,selectionLimit:f,onDragStart:I,ref:q,onChangeHandler:Y}),t.jsx(vl,{children:t.jsx(Bn,{style:{height:"100%",width:"100%"},children:({height:N,width:G})=>t.jsx(Fn,{ref:D,height:N,width:G,itemCount:A.length,itemSize:()=>y,estimatedItemSize:y,initialScrollOffset:$??0,onScroll:({scrollOffset:V})=>{O?.(V)},overscanCount:fl,itemKey:V=>A[V].value,itemData:{checkBoxes:A,value:z,allCheckBoxValues:L,mode:d,name:e,checkBoxContainerStyle:C,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:h,width:r,draggable:w,groupLabelCheckBox:b,infoIconContainerStyle:v,checkedIconColor:u,isDisabled:c,selectionLimit:f,onDragStart:I,ref:q,onChange:F,handleChangeEvent:Y,rowHeight:y},children:Cl})})})]})}})}const Cl=({index:e,style:n,data:d})=>{const c=s.useRef(null),{checkBoxes:p,value:h,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:C,labelStyle:w,width:f,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:y,checkedIconColor:$,isDisabled:O,selectionLimit:T,onDragStart:D,ref:S,handleChangeEvent:b}=d,A=p[e];return t.jsx(Ll,{style:{...n,width:"100%"},ref:c,children:t.jsx(Ro,{checkBox:A,index:e,value:h,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:C,labelStyle:w,width:f,draggable:v,groupLabelCheckBox:I,infoIconContainerStyle:y,checkedIconColor:$,isDisabled:O,selectionLimit:T,onDragStart:D,ref:S,onChangeHandler:b})})},Ro=s.forwardRef((e,n)=>{const{value:d,checkBox:c,groupLabelCheckBox:p,allCheckBoxValues:h,selectionLimit:i,mode:l,checkBoxStyle:r,labelCheckBoxStyle:m,isDisabled:u,draggable:x,checkBoxContainerStyle:C,infoIconContainerStyle:w,name:f,index:v,width:I,checkedIconColor:y,checkBoxIconStyle:$,labelStyle:O,onDragStart:T,onChangeHandler:D}=e,S=ke(),b=z=>{typeof n=="function"?n(z):n&&(n.current=z)};let A=d.includes(c.value);const L=Array.from(new Set([...d,c.value]));p?.value===c.value&&d.length>0&&(i!=null?A=L.length===h.length||L.length===i+1:A=h.every(z=>L.includes(z)===!0));const H=()=>l==="off"||c.isException?S==="small"?{display:"none",...r}:{visibility:"hidden",...r}:c.groupLabel?h.length===1&&h[0]===p?.value?{visibility:"hidden",...m}:m:r;return t.jsxs(jl,{mode:l,draggable:x===!0,onDragStart:z=>{T?.(z,c.value)},style:C,isDisabled:u,isSelected:A,exceptionMode:c.exceptionMode,children:[c.prefix?t.jsx(Sl,{className:"prefix-box",children:c.prefix}):null,c.isException?t.jsx(kl,{style:w,className:"checkbox-alert",children:t.jsx(ye,{style:{padding:`12px ${o.sp3}`},title:c.exceptionInfo??"",placement:"bottom-start",children:c.exceptionType==="info"?t.jsx(Il,{}):t.jsx($l,{})})}):t.jsx(lr,{name:`${f}.${c.value}`,checkBoxValue:c.value,value:A,checkedIconColor:y,isDisabled:u||!c.groupLabel&&!A&&i!=null&&L.length===i+1?"disabled":void 0,checkBoxStyle:H(),checkBoxIconStyle:$,ref:b,onChange:D}),typeof c.label=="string"&&c.label?t.jsx(cr,{isDisabled:u,label:c.label,labelStyle:O,htmlFor:`${f}.${c.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:I,backgroundColor:"inherit",...O}}):c.label]},`${c.value}_${v}`)});Ro.displayName="CheckBoxWithLabel";const wl=({event:e,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:p})=>{const h=e.currentTarget.value,i=e.currentTarget.checked,l=c?.value,r=new Set(n);if(h===l){p(i?Array.from(new Set([l,...d])):[]);return}i?r.add(h):r.delete(h);const m=d.every(u=>r.has(u));l!=null&&(m&&!r.has(l)?r.add(l):!m&&r.has(l)&&r.delete(l)),p(Array.from(r))},bl=a.div`
155
155
  display: flex;
156
156
  flex-direction: column;
157
157
  width: 100%;
@@ -224,13 +224,13 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
224
224
  `}
225
225
  `,kl=a.div`
226
226
  cursor: pointer;
227
- `,Il=a(ss)`
227
+ `,Il=a(is)`
228
228
  height: ${o.sp3};
229
229
  width: ${o.sp3};
230
230
  color: ${e=>e.theme.colors.hero};
231
231
  background-color: ${e=>e.theme.colors.grey4};
232
232
  border-radius: 50%;
233
- `,$l=a($s)`
233
+ `,$l=a(Is)`
234
234
  height: ${o.sp3};
235
235
  width: ${o.sp3};
236
236
  color: ${e=>e.theme.colors.hero};
@@ -250,26 +250,26 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
250
250
  `,Ol=a(Al)`
251
251
  width: 90px;
252
252
  height: 90px;
253
- `,Ml=a(El)`
253
+ `,zl=a(El)`
254
254
  width: 90px;
255
255
  height: 90px;
256
- `,_l=a(Tl)`
256
+ `,Bl=a(Tl)`
257
257
  width: 90px;
258
258
  height: 90px;
259
- `,zl=a(Rl)`
259
+ `,Fl=a(Rl)`
260
260
  width: 90px;
261
261
  height: 90px;
262
- `,Fl=a.div`
262
+ `,_l=a.div`
263
263
  display: flex;
264
264
  align-items: center;
265
265
  justify-content: center;
266
266
  flex-direction: column;
267
- `,Bl=a(Ja)`
267
+ `,Ml=a(Ja)`
268
268
  margin-top: ${o.sp2};
269
269
  color: ${e=>e.theme.colors.brandColorJade};
270
270
  `,Pl=a(Ka)`
271
271
  color: ${e=>e.theme.colors.primary};
272
- `,Nl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Ol,{});case"je_schedules":case"reconciliation":return t.jsx(zl,{});case"flux_analysis":return t.jsx(_l,{});case"missing_receipts":default:return t.jsx(Ml,{})}};function wt(e){const{title:n,subTitle:d}=e;return t.jsx(Dl,{children:t.jsxs(Fl,{children:[t.jsx(Nl,{...e}),t.jsx(Bl,{children:n}),t.jsx(Pl,{children:d})]})})}const{common:{headers:{transactions:Vl,jeSchedules:Hl,fluxAnalysis:Wl,missingReceipts:Ul,insights:ql,reconciliation:ti},strings:{empty:Ft}},expenseAutomation:{transactions:{tabs:ni,subTitles:{review:{item1:wn,item2:bn},autoCategorized:{item1:vn,item2:Jl}},searchPlaceholder:Kl,allDoneText:Gl},jeSchedules:{subTitles:{item1:Yl,item2:Zl},searchPlaceholder:Xl,allDoneText:Ql},missingReceipts:{subTitles:ec,searchPlaceholder:tc,allDoneText:nc},fluxAnalysis:{subTitles:{item1:oc,item2:ic},searchPlaceholder:sc,emptyPageTexts:{youDidIt:ac,allReviewed:rc}},accountRecon:{review:{allDoneText:oi},reconcile:{allDoneText:lc},tabs:ii,titles:{item1:cc,item2:dc},subTitles:{review:{item1:uc,item2:Sn},reconcile:{item1:jn,item2:hc}}}}}=Ie.getLocalizedStrings(),Ve=(e,n,d,c,p)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Vl,subTitle:[],tabs:[{label:ni.review,id:"review",subTitle:[{pre:wn.pre,bold:wn.bold,prefixIconName:wn.prefixIconName,post:wn.post},{pre:bn.pre,bold:bn.bold,prefixIconName:bn.prefixIconName,post:bn.post}]},{label:ni.autoCategorized,id:"autoCategorized",subTitle:[{pre:vn.pre,bold:vn.bold,prefixIconName:vn.prefixIconName,post:vn.post.replace("#number",n!=null&&n!=0?n.toString():"")},Jl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Kl,allDoneText:Gl};case"je_schedules":return{key:"je_schedules",title:Hl,subTitle:[Yl,Zl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Xl,allDoneText:Ql};case"missing_receipts":return{key:"missing_receipts",title:Ul,subTitle:[ec],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:tc,allDoneText:nc};case"flux_analysis":return{key:"flux_analysis",title:Wl,subTitle:[oc,ic],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sc,allDoneText:{title:ac,subTitle:rc}};case"month_end_insights":return{key:"month_end_insights",title:ql,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:Ft,allDoneText:{title:Ft,subTitle:Ft}};case"reconciliation":return d==null?{key:"reconciliation",title:ti,subTitle:[cc,dc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ft,allDoneText:{title:Ft,subTitle:Ft}}:{key:"reconciliation",title:c??ti,subText:p??void 0,subTitle:[],tabs:[{label:ii.review,id:"review",subTitle:[uc,{pre:Sn.pre,bold:Sn.bold,prefixIconName:Sn.prefixIconName,post:Sn.post}],allDoneText:oi},{label:ii.reconcile,id:"reconcile",subTitle:[{pre:jn.pre,bold:jn.bold,prefixIconName:jn.prefixIconName,post:jn.post},hc],allDoneText:lc}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:Ft,allDoneText:oi}}},{common:{strings:{empty:pc}},expenseAutomation:{accountRecon:{reconcile:{header:Ot}}}}=Ie.getLocalizedStrings(),mc={key:"date",value:Ot.date,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},gc={key:"clearedDate",value:Ot.clearedDate,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},xc={key:"type",value:Ot.type,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},fc={key:"payee",value:Ot.payee,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},yc={key:"account",value:Ot.account,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Cc={key:"transactionDirection",value:Ot.direction,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},wc={key:"memo",value:Ot.memo,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},bc={key:"amount",value:Ot.amount,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},vc={key:"recommended",value:pc,sortOrder:"ascending",width:new ee(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},De=[mc,gc,xc,fc,yc,Cc,wc,bc,vc],Sc=50,rn={sortKey:"date",sortOrder:"descending"};function jc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const d=ke(),[c,p]=s.useState(Ao(De));s.useEffect(()=>{const l=[...c];for(const r of l)r.key===e.sortKey?r.sortOrder=e.sortOrder:r.sortOrder="ascending";p(l)},[e.sortKey,e.sortOrder]);const h=(l,r)=>{let m=r;e.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),n(l,m)},i=l=>{h(l.key,l.sortOrder)};return t.jsx(Lc,{headerHeight:Sc,children:c.map(l=>t.jsx(Ic,{columnWidth:l.width,windowSize:d,sortDataValue:e.sortKey,actualDataValue:l.key,style:l.customStyle,children:t.jsxs(Dc,{isVisible:l.key!=="recommended",children:[t.jsx($c,{"data-testid":B("reconcile-tab-list-sort",l.value),onClick:()=>i(l),children:t.jsx(pt,{children:l.value})}),t.jsx(Tc,{sortConfig:e,headerData:l,children:t.jsx(Ac,{})}),t.jsx(Ec,{isVisible:e.sortKey===l.key&&(e.sortKey!==rn.sortKey||e.sortOrder!==rn.sortOrder),children:t.jsx(Rc,{"data-testid":B("reconcile-tab-list-reset-sort",rn.sortKey),onClick:()=>n(rn.sortKey,rn.sortOrder)})})]})},l.key))})}const kc=Ts.memo(jc),Ic=a.div`
272
+ `,Nl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Ol,{});case"je_schedules":case"reconciliation":return t.jsx(Fl,{});case"flux_analysis":return t.jsx(Bl,{});case"missing_receipts":default:return t.jsx(zl,{})}};function wt(e){const{title:n,subTitle:d}=e;return t.jsx(Dl,{children:t.jsxs(_l,{children:[t.jsx(Nl,{...e}),t.jsx(Ml,{children:n}),t.jsx(Pl,{children:d})]})})}const{common:{headers:{transactions:Vl,jeSchedules:Hl,fluxAnalysis:Wl,missingReceipts:Ul,insights:ql,reconciliation:ei},strings:{empty:_t}},expenseAutomation:{transactions:{tabs:ti,subTitles:{review:{item1:wn,item2:bn},autoCategorized:{item1:vn,item2:Jl}},searchPlaceholder:Kl,allDoneText:Gl},jeSchedules:{subTitles:{item1:Yl,item2:Zl},searchPlaceholder:Xl,allDoneText:Ql},missingReceipts:{subTitles:ec,searchPlaceholder:tc,allDoneText:nc},fluxAnalysis:{subTitles:{item1:oc,item2:ic},searchPlaceholder:sc,emptyPageTexts:{youDidIt:ac,allReviewed:rc}},accountRecon:{review:{allDoneText:ni},reconcile:{allDoneText:lc},tabs:oi,titles:{item1:cc,item2:dc},subTitles:{review:{item1:uc,item2:Sn},reconcile:{item1:jn,item2:hc}}}}}=Ie.getLocalizedStrings(),Ve=(e,n,d,c,p)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Vl,subTitle:[],tabs:[{label:ti.review,id:"review",subTitle:[{pre:wn.pre,bold:wn.bold,prefixIconName:wn.prefixIconName,post:wn.post},{pre:bn.pre,bold:bn.bold,prefixIconName:bn.prefixIconName,post:bn.post}]},{label:ti.autoCategorized,id:"autoCategorized",subTitle:[{pre:vn.pre,bold:vn.bold,prefixIconName:vn.prefixIconName,post:vn.post.replace("#number",n!=null&&n!=0?n.toString():"")},Jl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Kl,allDoneText:Gl};case"je_schedules":return{key:"je_schedules",title:Hl,subTitle:[Yl,Zl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Xl,allDoneText:Ql};case"missing_receipts":return{key:"missing_receipts",title:Ul,subTitle:[ec],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:tc,allDoneText:nc};case"flux_analysis":return{key:"flux_analysis",title:Wl,subTitle:[oc,ic],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sc,allDoneText:{title:ac,subTitle:rc}};case"month_end_insights":return{key:"month_end_insights",title:ql,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}};case"reconciliation":return d==null?{key:"reconciliation",title:ei,subTitle:[cc,dc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}}:{key:"reconciliation",title:c??ei,subText:p??void 0,subTitle:[],tabs:[{label:oi.review,id:"review",subTitle:[uc,{pre:Sn.pre,bold:Sn.bold,prefixIconName:Sn.prefixIconName,post:Sn.post}],allDoneText:ni},{label:oi.reconcile,id:"reconcile",subTitle:[{pre:jn.pre,bold:jn.bold,prefixIconName:jn.prefixIconName,post:jn.post},hc],allDoneText:lc}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:_t,allDoneText:ni}}},{common:{strings:{empty:pc}},expenseAutomation:{accountRecon:{reconcile:{header:Ot}}}}=Ie.getLocalizedStrings(),mc={key:"date",value:Ot.date,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},gc={key:"clearedDate",value:Ot.clearedDate,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},xc={key:"type",value:Ot.type,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},fc={key:"payee",value:Ot.payee,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},yc={key:"account",value:Ot.account,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Cc={key:"transactionDirection",value:Ot.direction,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},wc={key:"memo",value:Ot.memo,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},bc={key:"amount",value:Ot.amount,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},vc={key:"recommended",value:pc,sortOrder:"ascending",width:new ee(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},De=[mc,gc,xc,fc,yc,Cc,wc,bc,vc],Sc=50,rn={sortKey:"date",sortOrder:"descending"};function jc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const d=ke(),[c,p]=s.useState(To(De));s.useEffect(()=>{const l=[...c];for(const r of l)r.key===e.sortKey?r.sortOrder=e.sortOrder:r.sortOrder="ascending";p(l)},[e.sortKey,e.sortOrder]);const h=(l,r)=>{let m=r;e.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),n(l,m)},i=l=>{h(l.key,l.sortOrder)};return t.jsx(Lc,{headerHeight:Sc,children:c.map(l=>t.jsx(Ic,{columnWidth:l.width,windowSize:d,sortDataValue:e.sortKey,actualDataValue:l.key,style:l.customStyle,children:t.jsxs(Dc,{isVisible:l.key!=="recommended",children:[t.jsx($c,{"data-testid":M("reconcile-tab-list-sort",l.value),onClick:()=>i(l),children:t.jsx(pt,{children:l.value})}),t.jsx(Tc,{sortConfig:e,headerData:l,children:t.jsx(Ac,{})}),t.jsx(Ec,{isVisible:e.sortKey===l.key&&(e.sortKey!==rn.sortKey||e.sortOrder!==rn.sortOrder),children:t.jsx(Rc,{"data-testid":M("reconcile-tab-list-reset-sort",rn.sortKey),onClick:()=>n(rn.sortKey,rn.sortOrder)})})]})},l.key))})}const kc=Ls.memo(jc),Ic=a.div`
273
273
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
274
274
  :hover {
275
275
  color: ${e=>e.theme.colors.primary};
@@ -303,7 +303,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
303
303
  align-items: center;
304
304
  transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
305
305
  ${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
306
- `,Ac=a(Fn)`
306
+ `,Ac=a(_n)`
307
307
  width: ${o.sp2};
308
308
  height: ${o.sp2};
309
309
  `,Ec=a.div`
@@ -315,17 +315,17 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
315
315
  &:hover {
316
316
  color: ${e=>e.theme.colors.primary};
317
317
  }
318
- `,Rc=a(Bn)`
318
+ `,Rc=a(Mn)`
319
319
  width: 12px;
320
320
  height: 12px;
321
321
  `,Dc=a.div`
322
322
  display: ${e=>e.isVisible?"flex":"none"};
323
- `,Oc=54,Mc=72,{common:{strings:{hyphen:Kn}}}=Ie.getLocalizedStrings(),{dateFormat:si}=Ie.getLocalizedStrings();function _c({selectedTransactionIds:e,transaction:n,transactionId:d}){const c=ke(),p=bt(),[h,i]=s.useState(!1),l=e.includes(d),r=h||l;return t.jsx(zc,{id:d,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:t.jsxs(Fc,{isSelected:r,totalHeight:Oc,children:[t.jsx(gt,{windowSize:c,responsiveWidth:De[0].width,style:De[0].customStyle,children:t.jsx(Bt,{isSelected:r,children:n.date.format(si.visual.MMMDCommaYYYYformat)})}),De[1].customStyle.display!=="none"?t.jsx(gt,{windowSize:c,responsiveWidth:De[1].width,style:De[1].customStyle,children:t.jsx(Bt,{isSelected:r,children:n.clearedDate!=null?n.clearedDate.format(si.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Kn})})}):null,t.jsx(gt,{windowSize:c,style:De[2].customStyle,responsiveWidth:De[2].width,children:t.jsx(Nc,{isSelected:r,children:t.jsx(Bc,{isSelected:r,children:rr(n.type)})})}),t.jsx(gt,{windowSize:c,style:De[3].customStyle,responsiveWidth:De[3].width,children:n.merchantName!=null&&n.merchantName.length>0?t.jsx(nt,{text:n.merchantName,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}}):t.jsx(Bt,{isSelected:r,children:t.jsx("span",{children:Kn})})}),t.jsx(gt,{windowSize:c,style:De[4].customStyle,responsiveWidth:De[4].width,children:n.accountName!=null&&n.accountName.length>0?t.jsx(nt,{text:n.accountName,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}}):t.jsx(Bt,{isSelected:r,children:t.jsx("span",{children:Kn})})}),t.jsx(gt,{windowSize:c,style:De[5].customStyle,responsiveWidth:De[5].width,children:t.jsx(Bt,{isSelected:r,style:{textTransform:"capitalize"},children:n.transactionDirection})}),t.jsx(gt,{windowSize:c,style:De[6].customStyle,responsiveWidth:De[6].width,children:t.jsx(nt,{text:n.memo,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}})}),t.jsx(gt,{windowSize:c,style:De[7].customStyle,responsiveWidth:De[7].width,children:t.jsx(Bt,{isSelected:r,children:Ue("0,0.[00]",n.amount)})}),t.jsx(gt,{windowSize:c,responsiveWidth:De[8].width,style:De[8].customStyle,children:t.jsx(Bt,{isSelected:r,children:n.isZeniRecommended?t.jsx(Pc,{}):null})})]})})}const zc=a.div`
323
+ `,Oc=54,zc=72,{common:{strings:{hyphen:Jn}}}=Ie.getLocalizedStrings(),{dateFormat:ii}=Ie.getLocalizedStrings();function Bc({selectedTransactionIds:e,transaction:n,transactionId:d}){const c=ke(),p=bt(),[h,i]=s.useState(!1),l=e.includes(d),r=h||l;return t.jsx(Fc,{id:d,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:t.jsxs(_c,{isSelected:r,totalHeight:Oc,children:[t.jsx(gt,{windowSize:c,responsiveWidth:De[0].width,style:De[0].customStyle,children:t.jsx(Mt,{isSelected:r,children:n.date.format(ii.visual.MMMDCommaYYYYformat)})}),De[1].customStyle.display!=="none"?t.jsx(gt,{windowSize:c,responsiveWidth:De[1].width,style:De[1].customStyle,children:t.jsx(Mt,{isSelected:r,children:n.clearedDate!=null?n.clearedDate.format(ii.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Jn})})}):null,t.jsx(gt,{windowSize:c,style:De[2].customStyle,responsiveWidth:De[2].width,children:t.jsx(Nc,{isSelected:r,children:t.jsx(Mc,{isSelected:r,children:rr(n.type)})})}),t.jsx(gt,{windowSize:c,style:De[3].customStyle,responsiveWidth:De[3].width,children:n.merchantName!=null&&n.merchantName.length>0?t.jsx(nt,{text:n.merchantName,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}}):t.jsx(Mt,{isSelected:r,children:t.jsx("span",{children:Jn})})}),t.jsx(gt,{windowSize:c,style:De[4].customStyle,responsiveWidth:De[4].width,children:n.accountName!=null&&n.accountName.length>0?t.jsx(nt,{text:n.accountName,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}}):t.jsx(Mt,{isSelected:r,children:t.jsx("span",{children:Jn})})}),t.jsx(gt,{windowSize:c,style:De[5].customStyle,responsiveWidth:De[5].width,children:t.jsx(Mt,{isSelected:r,style:{textTransform:"capitalize"},children:n.transactionDirection})}),t.jsx(gt,{windowSize:c,style:De[6].customStyle,responsiveWidth:De[6].width,children:t.jsx(nt,{text:n.memo,itemTextStyle:{color:r?p.colors.primary:p.colors.hero}})}),t.jsx(gt,{windowSize:c,style:De[7].customStyle,responsiveWidth:De[7].width,children:t.jsx(Mt,{isSelected:r,children:Ue("0,0.[00]",n.amount)})}),t.jsx(gt,{windowSize:c,responsiveWidth:De[8].width,style:De[8].customStyle,children:t.jsx(Mt,{isSelected:r,children:n.isZeniRecommended?t.jsx(Pc,{}):null})})]})})}const Fc=a.div`
324
324
  box-sizing: border-box;
325
325
  width: 100%;
326
326
  display: flex;
327
327
  padding-right: ${o.sp8};
328
- `,Fc=a.div`
328
+ `,_c=a.div`
329
329
  cursor: pointer;
330
330
  display: flex;
331
331
  border-radius: ${o.sp2};
@@ -347,12 +347,12 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
347
347
  height: 100%;
348
348
  z-index: auto;
349
349
  position: relative;
350
- `,Bt=a(_e)`
350
+ `,Mt=a(Be)`
351
351
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
352
352
  span {
353
353
  padding-left: ${o.sp3};
354
354
  }
355
- `,Bc=a(pt)`
355
+ `,Mc=a(pt)`
356
356
  text-transform: capitalize;
357
357
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
358
358
  `,Pc=a(gn)`
@@ -366,14 +366,14 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
366
366
  padding: 1px 6px;
367
367
  border-radius: ${o.sp1};
368
368
  border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
369
- `,Vc=Ie.getLocalizedStrings(),{common:{all:ai,strings:{empty:ri}}}=Vc,li="selectedTransactionIds",Hc="expenseAutomationBankReconReconcilePage",Wc=e=>`${e}_form`;function Uc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:p,selectedAccountId:h,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=qt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(kc,{onReconTabColumnSortConfigChanged:i,sortConfig:c}),value:ai.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},x=d.map(v=>({label:t.jsx(_c,{transaction:v,selectedTransactionIds:n.selectedTransactionIds,transactionId:v.id}),value:v.id,defaultChecked:!1,groupLabel:!1})),C=[u,...x],w=async v=>{const I=v[li].filter(y=>y!=ai.toLocaleLowerCase());l(I)};s.useEffect(()=>{const v=m.watch(I=>{I!=null&&xn(()=>w(I))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&r("expenseAutomationBankReconReconcilePage"),()=>{r("expenseAutomationPage")}),[]);const f=s.useCallback(()=>{p({reconcileAction:"reconcile"})},[p]);if(d.length===0){const v=Ve("reconciliation",void 0,h).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(Gc,{children:t.jsx(wt,{tab:"missing_receipts",title:v?.title??ri,subTitle:v?.subTitle??ri})})}return t.jsx(qc,{children:t.jsx(Jt,{...m,children:t.jsx(Jc,{onSubmit:m.handleSubmit(f),id:Wc(Hc),children:t.jsx(Kc,{children:t.jsx(yl,{name:li,checkBoxes:C,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Mc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const qc=a.div``,Jc=a.form``,Kc=a.div`
369
+ `,Vc=Ie.getLocalizedStrings(),{common:{all:si,strings:{empty:ai}}}=Vc,ri="selectedTransactionIds",Hc="expenseAutomationBankReconReconcilePage",Wc=e=>`${e}_form`;function Uc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:p,selectedAccountId:h,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=qt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(kc,{onReconTabColumnSortConfigChanged:i,sortConfig:c}),value:si.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},x=d.map(v=>({label:t.jsx(Bc,{transaction:v,selectedTransactionIds:n.selectedTransactionIds,transactionId:v.id}),value:v.id,defaultChecked:!1,groupLabel:!1})),C=[u,...x],w=async v=>{const I=v[ri].filter(y=>y!=si.toLocaleLowerCase());l(I)};s.useEffect(()=>{const v=m.watch(I=>{I!=null&&xn(()=>w(I))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&r("expenseAutomationBankReconReconcilePage"),()=>{r("expenseAutomationPage")}),[]);const f=s.useCallback(()=>{p({reconcileAction:"reconcile"})},[p]);if(d.length===0){const v=Ve("reconciliation",void 0,h).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(Gc,{children:t.jsx(wt,{tab:"missing_receipts",title:v?.title??ai,subTitle:v?.subTitle??ai})})}return t.jsx(qc,{children:t.jsx(Jt,{...m,children:t.jsx(Jc,{onSubmit:m.handleSubmit(f),id:Wc(Hc),children:t.jsx(Kc,{children:t.jsx(yl,{name:ri,checkBoxes:C,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:zc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const qc=a.div``,Jc=a.form``,Kc=a.div`
370
370
  height: calc(100vh - 350px);
371
371
  `,Gc=a.div`
372
372
  height: 100%;
373
373
  display: flex;
374
374
  justify-content: center;
375
375
  align-items: center;
376
- `,wo=69,pe={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},Bs=a.div`
376
+ `,Co=69,pe={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},_s=a.div`
377
377
  display: flex;
378
378
  flex-direction: column;
379
379
  background-color: ${e=>e.theme.colors.grey4};
@@ -382,25 +382,25 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
382
382
  height: calc(100vh - 500px);
383
383
  overflow-x: scroll;
384
384
  align-items: center;
385
- `,Ps=a.div`
385
+ `,Ms=a.div`
386
386
  display: flex;
387
387
  flex-direction: column;
388
388
  gap: ${o.sp5};
389
389
  align-items: flex-start;
390
390
  padding-bottom: ${o.sp9};
391
391
  width: 100%;
392
- `,Ns=a.div`
392
+ `,Ps=a.div`
393
393
  width: 100%;
394
- `,Vs=a.div`
394
+ `,Ns=a.div`
395
395
  width: 100%;
396
- `,Oo=a.div`
396
+ `,Do=a.div`
397
397
  display: flex;
398
398
  flex-direction: row;
399
399
  padding: ${o.sp2};
400
400
  padding-right: ${o.sp3};
401
401
  justify-content: space-between;
402
402
  border-bottom: ${e=>`1px solid ${e.theme.colors.grey3}`};
403
- `,Mo=a.div`
403
+ `,Oo=a.div`
404
404
  display: flex;
405
405
  flex-direction: row;
406
406
  justify-content: space-between;
@@ -415,7 +415,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
415
415
  padding-right: ${o.sp3};
416
416
  `,Zc=a.div`
417
417
  padding: ${o.sp2} ${o.sp3};
418
- `,_o=a.div`
418
+ `,zo=a.div`
419
419
  display: flex;
420
420
  `,Xc=a.div`
421
421
  display: flex;
@@ -426,7 +426,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
426
426
  background-color: ${e=>e.theme.colors.grey3};
427
427
  border-bottom-left-radius: ${o.sp2};
428
428
  border-bottom-right-radius: ${o.sp2};
429
- `,zo=a.div`
429
+ `,Bo=a.div`
430
430
  display: flex;
431
431
  flex-direction: column;
432
432
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
@@ -477,7 +477,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
477
477
  padding: ${o.sp2} ${o.sp3};
478
478
  `,se=a(pt)`
479
479
  color: ${e=>e.theme.colors.hero};
480
- `,ue=a(_e)`
480
+ `,de=a(Be)`
481
481
  width: 100%;
482
482
  color: ${e=>e.theme.colors.hero};
483
483
  white-space: nowrap;
@@ -507,9 +507,9 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
507
507
  align-items: center;
508
508
  justify-content: center;
509
509
  padding: ${o.sp0} 42px;
510
- `,Bo=a.div`
510
+ `,_o=a.div`
511
511
  flex: 1;
512
- `,Hs=a(pt)`
512
+ `,Vs=a(pt)`
513
513
  padding: ${o.sp0} 6px;
514
514
  color: ${Xe.info};
515
515
  border: 1px solid ${Xe.info};
@@ -522,7 +522,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
522
522
  border-radius: ${o.sp1};
523
523
  `,We=a(Rn)`
524
524
  padding: 2px ${o.sp2};
525
- `,Gt=Ie.getLocalizedStrings().expenseAutomation.accountRecon.review.header,yt=[{key:"date",value:Gt.date,sortOrder:"ascending",width:new ee(20,20),loaderWidth:120},{key:"payee",value:Gt.payee,sortOrder:"ascending",width:new ee(20,20),loaderWidth:212},{key:"memo",value:Gt.memo,sortOrder:"ascending",width:new ee(20,20),loaderWidth:192},{key:"direction",value:Gt.direction,sortOrder:"ascending",width:new ee(15,15),loaderWidth:84},{key:"match",value:Gt.match,sortOrder:"ascending",width:new ee(15,15),loaderWidth:152},{key:"amount",value:Gt.amount,sortOrder:"ascending",width:new ee(10,10),loaderWidth:64}],Qc=e=>{const{sortConfig:n,onColumnSortConfigChanged:d}=e,c=ke(),[p,h]=s.useState(Ao(yt));s.useEffect(()=>{const l=[...p];for(const r of l)r.key===n.sortKey?r.sortOrder=n.sortOrder:r.sortOrder="ascending";h(l)},[n.sortKey,n.sortOrder]);const i=(l,r)=>{let m=r;n.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),d(l,m)};return t.jsx(td,{children:p.map(l=>t.jsxs(nd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:c,isLastColumn:l.key==="amount",children:[t.jsxs(od,{"data-testid":B("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>i(l.key,l.sortOrder),children:[t.jsx(pt,{children:l.value}),t.jsx(id,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(sd,{})})]}),t.jsx(ad,{sortDataValue:n.sortKey,windowSize:c,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(rd,{"data-testid":B("account-reconciliation-review-sort-by-date"),onClick:()=>i("date","ascending")})})]},l.key))})},ed=Ts.memo(Qc),td=a(vt)`
525
+ `,Gt=Ie.getLocalizedStrings().expenseAutomation.accountRecon.review.header,yt=[{key:"date",value:Gt.date,sortOrder:"ascending",width:new ee(20,20),loaderWidth:120},{key:"payee",value:Gt.payee,sortOrder:"ascending",width:new ee(20,20),loaderWidth:212},{key:"memo",value:Gt.memo,sortOrder:"ascending",width:new ee(20,20),loaderWidth:192},{key:"direction",value:Gt.direction,sortOrder:"ascending",width:new ee(15,15),loaderWidth:84},{key:"match",value:Gt.match,sortOrder:"ascending",width:new ee(15,15),loaderWidth:152},{key:"amount",value:Gt.amount,sortOrder:"ascending",width:new ee(10,10),loaderWidth:64}],Qc=e=>{const{sortConfig:n,onColumnSortConfigChanged:d}=e,c=ke(),[p,h]=s.useState(To(yt));s.useEffect(()=>{const l=[...p];for(const r of l)r.key===n.sortKey?r.sortOrder=n.sortOrder:r.sortOrder="ascending";h(l)},[n.sortKey,n.sortOrder]);const i=(l,r)=>{let m=r;n.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),d(l,m)};return t.jsx(td,{children:p.map(l=>t.jsxs(nd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:c,isLastColumn:l.key==="amount",children:[t.jsxs(od,{"data-testid":M("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>i(l.key,l.sortOrder),children:[t.jsx(pt,{children:l.value}),t.jsx(id,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(sd,{})})]}),t.jsx(ad,{sortDataValue:n.sortKey,windowSize:c,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(rd,{"data-testid":M("account-reconciliation-review-sort-by-date"),onClick:()=>i("date","ascending")})})]},l.key))})},ed=Ls.memo(Qc),td=a(vt)`
526
526
  top: 0;
527
527
  left: 0;
528
528
  width: fit-content;
@@ -561,7 +561,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
561
561
  `:Ze`
562
562
  padding-bottom: 2px;
563
563
  `}
564
- `,sd=a(Fn)`
564
+ `,sd=a(_n)`
565
565
  width: ${o.sp2};
566
566
  height: ${o.sp2};
567
567
  cursor: pointer;
@@ -570,12 +570,12 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
570
570
  display: ${e=>e.isVisible?"flex":"none"};
571
571
  align-items: center;
572
572
  padding-top: 2px;
573
- `,rd=a(Bn)`
573
+ `,rd=a(Mn)`
574
574
  width: 12px;
575
575
  height: 12px;
576
576
  cursor: pointer;
577
577
  color: ${e=>e.theme.colors.hero};
578
- `,st="accountReconReviewTableSection",{dateFormat:ld,expenseAutomation:cd,common:ut}=Ie.getLocalizedStrings(),{visual:Ws}=ld,{accountRecon:xe}=cd,Us=e=>[{label:xe.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],qs=e=>[{label:xe.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],ci=e=>`${st}_${e}_form`,Le=(e,n)=>`${st}.${e}.${n}`,dd=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:p,allAccountList:h,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:C,saveFetchById:w,reviewTabSelectedVendorByTransactionId:f,refreshStatus:v,updateLocalData:I,onColumnSortConfigChanged:y,onSaveReconciliation:$,onSaveReconciliationReview:O,onReconMatchedTransactionClick:T,bankAccounts:D,creditCards:S}=e,{transactionsToReview:b,account:{accountType:A}}=c,L=s.useRef(null),[H,M]=s.useState(null),q=Y=>{const N=b[Y],G=Es(N),V=Rs(N),Z=Ds(N,A??"bank"),fe=Os(N,A??"bank"),ce=Ms(N),te=Ro(N),ne=N.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return N.transactionId===H?V||Z||fe||ce||te?275+(ne?25:0):G?185+N.recommendedAction.recommendedTransactions.length*40+(ne?25:0):146:72},z=s.useMemo(()=>({onColumnSortConfigChanged:y,sortConfig:{sortKey:n,sortOrder:d}}),[y,n,d]);if(s.useEffect(()=>{M(b[0]?.transactionId??null),L.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{L.current?.resetAfterIndex(0)},[H]),s.useEffect(()=>{L.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{v.fetchState==="Completed"&&L.current?.resetAfterIndex(0)},[v]),b.length===0){const Y=Ve("reconciliation",void 0,u).tabs.find(N=>N.id==="review")?.allDoneText;return t.jsx(Rd,{children:t.jsx(wt,{tab:"reconciliation",title:Y?.title??ut.strings.empty,subTitle:Y?.subTitle??ut.strings.empty})})}return t.jsx(yd,{children:t.jsx(Js.Provider,{value:z,children:t.jsx(_n,{children:({height:Y,width:N})=>t.jsx(zn,{width:N,height:Y,innerElementType:Ks,ref:L,itemCount:b.length,itemSize:q,itemKey:G=>b[G].transactionId,overscanCount:or,itemData:{transactionsList:b,expandedRowId:H,allAccountList:h,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:p,excludeFetchById:C,saveFetchById:w,reviewTabSelectedVendorByTransactionId:f,bankAccounts:D,creditCards:S,accountType:A,updateLocalData:I,setExpandedRowId:M,onSaveReconciliation:$,onSaveReconciliationReview:O,onReconMatchedTransactionClick:T},initialScrollOffset:0,children:ud})})})})},Js=s.createContext(void 0),Ks=s.forwardRef((e,n)=>{const{children:d,style:c,...p}=e,{sortConfig:h,onColumnSortConfigChanged:i}=s.useContext(Js);return t.jsxs(Cd,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...p,children:[t.jsx(ed,{onColumnSortConfigChanged:i,sortConfig:h}),t.jsx(wd,{children:d})]})});Ks.displayName="Account recon review table inner element type";const ud=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:p,setExpandedRowId:h,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:C,entitySearchAutoCompleteData:w,onSaveReconciliation:f,onSaveReconciliationReview:v,onReconMatchedTransactionClick:I,excludeFetchById:y,saveFetchById:$,reviewTabSelectedVendorByTransactionId:O,bankAccounts:T,creditCards:D,accountType:S}=d,b=c[e];return t.jsx(fd,{style:{...n,width:"100%"},children:t.jsx(hd,{transaction:b,expandedRowId:p,setExpandedRowId:h,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:C,onSaveReconciliation:f,onSaveReconciliationReview:v,onReconMatchedTransactionClick:I,excludeFetchById:y,saveFetchById:$,selectedVendor:O[b.transactionId],bankAccounts:T,creditCards:D,accountType:S})})},hd=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:p,classList:h,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:C,creditCards:w,accountType:f,setExpandedRowId:v,updateLocalData:I,onSaveReconciliation:y,onSaveReconciliationReview:$,onReconMatchedTransactionClick:O})=>{const T=n===e.transactionId,D=ke(),S=l[e.transactionId],b=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",L=Ro(e),H=p.find(z=>z.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),M=z=>z.recommendedAction.recommendedTransactions.length>0&&z.recommendedAction.recommendedTransactions[0].merchantName!=null?z.recommendedAction.recommendedTransactions[0].merchantName:ut.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(md,{isExpanded:T,children:[t.jsxs(gd,{isExpanded:T,onClick:()=>v(e.transactionId),"data-testid":B("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Zt,{windowSize:D,responsiveWidth:yt[0].width,children:t.jsx(Yt,{children:e.transactionDate.format(Ws.MMMDCommaYYYYformat)})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[1].width,children:t.jsx(Yt,{children:t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:M(e)})})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[2].width,children:t.jsx(Yt,{children:t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[3].width,children:t.jsx(Yt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Zt,{windowSize:D,responsiveWidth:yt[4].width,children:[t.jsx(Pe,{controller:b,children:t.jsx(Dd,{children:t.jsx(Od,{children:xe.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Pe,{controller:!b,children:t.jsx(Yt,{children:H!=null?t.jsxs(t.Fragment,{children:[t.jsx(Gs,{}),t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:H.accountName})]}):ut.strings.hyphen})})]}),t.jsx(Zt,{windowSize:D,isLastColumn:!0,responsiveWidth:yt[5].width,children:t.jsx(Yt,{children:Ls("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Pe,{controller:T&&S!=null,children:[t.jsx(pd,{onSaveReconciliation:y,onSaveReconciliationReview:$,updateLocalData:I,saveFetchById:u,excludeFetchById:m,localData:S,classListNestedAccountHierarchy:i,allAccountList:p,classList:h,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:C,creditCards:w,accountType:f,onReconMatchedTransactionClick:O}),t.jsx(Pe,{controller:(b||A||L)&&q!=null,children:t.jsx(_d,{children:t.jsxs(zd,{children:[f==="credit_card"?xe.review.creditCardDetail:xe.review.bankDetail,ut.strings.colon," ",q]})})})]})]})},pd=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:p,classListNestedAccountHierarchy:h,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:C,accountType:w,updateLocalData:f,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:y})=>{const $=bt(),[O,T]=s.useState(!i.vendor?.id),[D,S]=s.useState(!i.customer?.id),[b,A]=s.useState(i.categoryId==null),[L,H]=s.useState(i.classId==null),[M,q]=s.useState(i.bankAccountId==null),[z,Y]=s.useState(i.creditCardId==null),[N,G]=s.useState(!i.memo),V=Es(e),Z=Rs(e),fe=Os(e,w??"bank"),ce=Ds(e,w??"bank"),te=Ms(e),ne=Ro(e),P=s.useMemo(()=>{if(!Z&&!ne)return Rt(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Rt(n,u?.recommendations);const k=c.find(we=>we.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),he=k!=null?{...k,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Rt(n,[{account:he}])},[Z,ne,u,e.recommendedAction.recommendedTransactions,c,n]),_=s.useMemo(()=>{if(!Z&&!ne)return En(h);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return En(h,u?.recommendations);const k=p.find(we=>we.classId===e.recommendedAction.recommendedTransactions[0]?.classId),he=k!=null?{...k,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return En(h,[{class:he}])},[Z,ne,u,e.recommendedAction.recommendedTransactions,p,h]),U=qt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>di(e,i,P,c,_,x,C,l),[e,i,_,c,P,x,C,l]),values:s.useMemo(()=>di(e,i,P,c,_,x,C,l),[e,i,_,c,P,x,C,l])}),F=async(k,he)=>{k.includes("memo")||f(ui(he,e,l,c),e.transactionId,k.includes("vendor"))};s.useEffect(()=>{const k=U.watch((he,{name:we})=>{we!=null&&he!=null&&xn(()=>F(we,he))});return()=>{k.unsubscribe()}});const j=s.useCallback(k=>{if(Z||te||ne){if((Z||ne)&&i.vendor==null){T(!1),U.setError(Le(e.transactionId,"vendor"),{type:"required"});return}if(te&&i.customer==null){S(!1),U.setError(Le(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){A(!1),U.setError(Le(e.transactionId,"category"),{type:"required"});return}}f(ui(k,e,l,c),e.transactionId,!1),I(e.transactionId)},[Z,ne,te,f,e,l,c,I,i.categoryId,i.vendor,i.customer]),R=U.watch(Le(e.transactionId,"vendor")),W=U.watch(Le(e.transactionId,"customer")),ie=s.useRef(),E=s.useMemo(()=>Z||ne?"vendor":te?"customer":null,[Z,ne,te]),J=(k,he)=>{E!=null&&d.onAutoCompleteInputChange?.(k,E),ie.current=he};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&((Z||ne)&&ie.current?.(bs(l.entityAutoCompleteView)),te&&ie.current?.(pr(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,te,Z,ne]);const K=k=>p.filter(he=>he.classId===k)[0]?.accountingClassNumber??void 0,oe=k=>c.filter(he=>he.qboId===k)[0]?.qboId,Ce=s.useMemo(()=>{if(w==="bank")switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[w,e.recommendedAction.action,e.transactionDirection]),$e=()=>{A(!1)},ge=()=>{q(!1)},re=()=>{Y(!1)};return s.useEffect(()=>{b===!1&&i.categoryId==null&&U.setFocus(Le(e.transactionId,"category"))},[b]),s.useEffect(()=>{L===!1&&i.classId==null&&U.setFocus(Le(e.transactionId,"class"))},[L]),s.useEffect(()=>{O===!1&&i.vendor==null&&U.setFocus(Le(e.transactionId,"vendor"))},[O]),s.useEffect(()=>{D===!1&&i.customer==null&&U.setFocus(Le(e.transactionId,"customer"))},[D]),s.useEffect(()=>{M===!1&&i.bankAccountId==null&&U.setFocus(Le(e.transactionId,"bankAccount"))},[M]),s.useEffect(()=>{z===!1&&i.creditCardId==null&&U.setFocus(Le(e.transactionId,"creditCard"))},[z]),t.jsx(Jt,{...U,children:t.jsx("form",{onSubmit:U.handleSubmit(j),id:ci(e.transactionId),children:t.jsxs(xd,{children:[t.jsxs(bd,{children:[t.jsxs(jd,{children:[t.jsxs(kd,{children:[t.jsx(Gs,{}),t.jsx(Un,{label:{label:V?xe.review.formLabels.match:xe.review.formLabels.categorize},radioField:{name:Le(e.transactionId,"match_radio"),id:V?"match":"categorize",value:V?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Pe,{controller:!V,children:t.jsxs(t.Fragment,{children:[t.jsx(hi,{}),Ce.map(k=>t.jsx(Un,{label:{label:xe.review.formLabels[k]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Le(e.transactionId,"recommendedActionType"),id:k,value:k,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},k))]})})]}),t.jsxs(Sd,{children:[t.jsx(pn,{variant:"secondary",size:"small",label:xe.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":B("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{v({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(pn,{form:ci(e.transactionId),"data-testid":B("account-reconciliation-review-save-button",e.transactionId),label:ut.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Pe,{controller:Z||te||ne,children:t.jsxs(Gn,{children:[t.jsx(Pe,{controller:Z||ne,children:t.jsx(ft,{onClickAway:()=>{i.vendor==null&&O===!1&&T(!0)},children:t.jsx(Q,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.vendor}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:O===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),T(!1)},"data-testid":B("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addVendor]}):t.jsx(yo,{name:Le(e.transactionId,"vendor"),allowEmpty:!1,placeholder:xe.review.formLabels.addVendor,valueToId:k=>k,defaultValue:{selectedOption:R?.selectedOption,defaultOptions:R?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:J})})})]})})})}),t.jsx(Pe,{controller:te,children:t.jsx(ft,{onClickAway:()=>{i.customer==null&&D===!1&&S(!0)},children:t.jsx(Q,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.customer}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),S(!1)},"data-testid":B("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addCustomer]}):t.jsx(yo,{name:Le(e.transactionId,"customer"),allowEmpty:!1,placeholder:xe.review.formLabels.addCustomer,valueToId:k=>k,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:J})})})]})})})}),t.jsx(ft,{onClickAway:()=>{i.categoryId==null&&b===!1&&A(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:b===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),$e()},"data-testid":B("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"category"),placeholder:xe.review.formLabels.addCategory,valueToId:k=>oe(k),defaultValue:{allOptions:P,selectedOption:c.find(k=>k.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})}),t.jsx(ft,{onClickAway:()=>{i.classId==null&&L===!1&&H(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.class}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:L===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),H(!1)},"data-testid":B("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addClass]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"class"),placeholder:xe.review.formLabels.addClass,valueToId:k=>K(k),defaultValue:{allOptions:_,selectedOption:i.classId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})]})}),t.jsx(Pe,{controller:V,children:t.jsxs(Id,{children:[t.jsxs($d,{children:[t.jsx("span",{className:"matched-text",children:`${xe.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),xe.review.matchesFoundFullInfo]}),t.jsx(Td,{children:e.recommendedAction.recommendedTransactions.map(k=>k.bookTransactionId!=null?t.jsxs(Ad,{children:[t.jsx(Un,{label:{label:t.jsxs(Ld,{children:[t.jsx(_e,{children:k.date.format(Ws.MMMDCommaYYYYformat)}),t.jsx(_e,{children:k.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Le(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:k.bookTransactionId,value:k.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Md,{"data-testid":B("account-reconciliation-review-matched-transaction-amount",k.bookTransactionId),onClick:()=>{k.bookTransactionId!=null&&y(k.bookTransactionId)},children:[t.jsx(Ed,{children:Ls("0,0.00",k.amount.amount,k.amount.currencySymbol)}),t.jsx(hi,{})]})]},k.bookTransactionId):null)})]})}),t.jsx(Pe,{controller:fe,children:t.jsx(Gn,{children:t.jsx(ft,{onClickAway:()=>{i.bankAccountId==null&&M===!1&&q(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:w==="credit_card"?xe.review.formLabels.selectAccount:xe.review.formLabels.transferTo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:M===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),ge()},"data-testid":B("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.selectAccount]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"bankAccount"),placeholder:xe.review.formLabels.selectAccount,defaultValue:{allOptions:Us(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(Pe,{controller:ce,children:t.jsx(Gn,{children:t.jsx(ft,{onClickAway:()=>{i.creditCardId==null&&z===!1&&Y(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.creditCard}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),re()},"data-testid":B("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.selectCard]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"creditCard"),placeholder:xe.review.formLabels.selectCard,defaultValue:{allOptions:qs(C),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(Pe,{controller:!V,children:t.jsx(vd,{children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.header.memo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(ue,{onClick:k=>{k.stopPropagation(),G(!1)},"data-testid":B("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addMemo]}):t.jsx(mr,{name:Le(e.transactionId,"memo"),placeholder:xe.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},kn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},di=(e,n,d,c,p,h,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[st]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:p},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Us(h)},creditCard:{selectedOption:n?.creditCardId,allOptions:qs(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:Is(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:wr(n?.customer,l.entityAutoCompleteView)}}}}},ui=(e,n,d,c)=>{const{vendor:p,customer:h}=e[st][n.transactionId];let i;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)i={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)l={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[st][n.transactionId].category.selectedOption)?.accountId??e[st][n.transactionId].category.selectedOption,classId:e[st][n.transactionId].class.selectedOption,memo:e[st][n.transactionId].memo,matchedTransactionId:e[st][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[st][n.transactionId].bankAccount.selectedOption,creditCardId:e[st][n.transactionId].creditCard.selectedOption,customer:l}},Yt=a(_e)`
578
+ `,st="accountReconReviewTableSection",{dateFormat:ld,expenseAutomation:cd,common:ut}=Ie.getLocalizedStrings(),{visual:Hs}=ld,{accountRecon:xe}=cd,Ws=e=>[{label:xe.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Us=e=>[{label:xe.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],li=e=>`${st}_${e}_form`,Le=(e,n)=>`${st}.${e}.${n}`,dd=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:p,allAccountList:h,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:C,saveFetchById:w,reviewTabSelectedVendorByTransactionId:f,refreshStatus:v,updateLocalData:I,onColumnSortConfigChanged:y,onSaveReconciliation:$,onSaveReconciliationReview:O,onReconMatchedTransactionClick:T,bankAccounts:D,creditCards:S}=e,{transactionsToReview:b,account:{accountType:A}}=c,L=s.useRef(null),[H,z]=s.useState(null),q=Y=>{const N=b[Y],G=As(N),V=Es(N),Z=Rs(N,A??"bank"),fe=Ds(N,A??"bank"),le=Os(N),te=Eo(N),ne=N.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return N.transactionId===H?V||Z||fe||le||te?275+(ne?25:0):G?185+N.recommendedAction.recommendedTransactions.length*40+(ne?25:0):146:72},F=s.useMemo(()=>({onColumnSortConfigChanged:y,sortConfig:{sortKey:n,sortOrder:d}}),[y,n,d]);if(s.useEffect(()=>{z(b[0]?.transactionId??null),L.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{L.current?.resetAfterIndex(0)},[H]),s.useEffect(()=>{L.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{v.fetchState==="Completed"&&L.current?.resetAfterIndex(0)},[v]),b.length===0){const Y=Ve("reconciliation",void 0,u).tabs.find(N=>N.id==="review")?.allDoneText;return t.jsx(Rd,{children:t.jsx(wt,{tab:"reconciliation",title:Y?.title??ut.strings.empty,subTitle:Y?.subTitle??ut.strings.empty})})}return t.jsx(yd,{children:t.jsx(qs.Provider,{value:F,children:t.jsx(Bn,{children:({height:Y,width:N})=>t.jsx(Fn,{width:N,height:Y,innerElementType:Js,ref:L,itemCount:b.length,itemSize:q,itemKey:G=>b[G].transactionId,overscanCount:or,itemData:{transactionsList:b,expandedRowId:H,allAccountList:h,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:p,excludeFetchById:C,saveFetchById:w,reviewTabSelectedVendorByTransactionId:f,bankAccounts:D,creditCards:S,accountType:A,updateLocalData:I,setExpandedRowId:z,onSaveReconciliation:$,onSaveReconciliationReview:O,onReconMatchedTransactionClick:T},initialScrollOffset:0,children:ud})})})})},qs=s.createContext(void 0),Js=s.forwardRef((e,n)=>{const{children:d,style:c,...p}=e,{sortConfig:h,onColumnSortConfigChanged:i}=s.useContext(qs);return t.jsxs(Cd,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...p,children:[t.jsx(ed,{onColumnSortConfigChanged:i,sortConfig:h}),t.jsx(wd,{children:d})]})});Js.displayName="Account recon review table inner element type";const ud=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:p,setExpandedRowId:h,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:C,entitySearchAutoCompleteData:w,onSaveReconciliation:f,onSaveReconciliationReview:v,onReconMatchedTransactionClick:I,excludeFetchById:y,saveFetchById:$,reviewTabSelectedVendorByTransactionId:O,bankAccounts:T,creditCards:D,accountType:S}=d,b=c[e];return t.jsx(fd,{style:{...n,width:"100%"},children:t.jsx(hd,{transaction:b,expandedRowId:p,setExpandedRowId:h,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:C,onSaveReconciliation:f,onSaveReconciliationReview:v,onReconMatchedTransactionClick:I,excludeFetchById:y,saveFetchById:$,selectedVendor:O[b.transactionId],bankAccounts:T,creditCards:D,accountType:S})})},hd=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:p,classList:h,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:C,creditCards:w,accountType:f,setExpandedRowId:v,updateLocalData:I,onSaveReconciliation:y,onSaveReconciliationReview:$,onReconMatchedTransactionClick:O})=>{const T=n===e.transactionId,D=ke(),S=l[e.transactionId],b=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",L=Eo(e),H=p.find(F=>F.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),z=F=>F.recommendedAction.recommendedTransactions.length>0&&F.recommendedAction.recommendedTransactions[0].merchantName!=null?F.recommendedAction.recommendedTransactions[0].merchantName:ut.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(md,{isExpanded:T,children:[t.jsxs(gd,{isExpanded:T,onClick:()=>v(e.transactionId),"data-testid":M("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Zt,{windowSize:D,responsiveWidth:yt[0].width,children:t.jsx(Yt,{children:e.transactionDate.format(Hs.MMMDCommaYYYYformat)})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[1].width,children:t.jsx(Yt,{children:t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:z(e)})})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[2].width,children:t.jsx(Yt,{children:t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Zt,{windowSize:D,responsiveWidth:yt[3].width,children:t.jsx(Yt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Zt,{windowSize:D,responsiveWidth:yt[4].width,children:[t.jsx(Pe,{controller:b,children:t.jsx(Dd,{children:t.jsx(Od,{children:xe.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Pe,{controller:!b,children:t.jsx(Yt,{children:H!=null?t.jsxs(t.Fragment,{children:[t.jsx(Ks,{}),t.jsx(nt,{itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"},text:H.accountName})]}):ut.strings.hyphen})})]}),t.jsx(Zt,{windowSize:D,isLastColumn:!0,responsiveWidth:yt[5].width,children:t.jsx(Yt,{children:$s("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Pe,{controller:T&&S!=null,children:[t.jsx(pd,{onSaveReconciliation:y,onSaveReconciliationReview:$,updateLocalData:I,saveFetchById:u,excludeFetchById:m,localData:S,classListNestedAccountHierarchy:i,allAccountList:p,classList:h,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:C,creditCards:w,accountType:f,onReconMatchedTransactionClick:O}),t.jsx(Pe,{controller:(b||A||L)&&q!=null,children:t.jsx(Bd,{children:t.jsxs(Fd,{children:[f==="credit_card"?xe.review.creditCardDetail:xe.review.bankDetail,ut.strings.colon," ",q]})})})]})]})},pd=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:p,classListNestedAccountHierarchy:h,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:C,accountType:w,updateLocalData:f,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:y})=>{const $=bt(),[O,T]=s.useState(!i.vendor?.id),[D,S]=s.useState(!i.customer?.id),[b,A]=s.useState(i.categoryId==null),[L,H]=s.useState(i.classId==null),[z,q]=s.useState(i.bankAccountId==null),[F,Y]=s.useState(i.creditCardId==null),[N,G]=s.useState(!i.memo),V=As(e),Z=Es(e),fe=Ds(e,w??"bank"),le=Rs(e,w??"bank"),te=Os(e),ne=Eo(e),P=s.useMemo(()=>{if(!Z&&!ne)return Rt(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Rt(n,u?.recommendations);const k=c.find(we=>we.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ue=k!=null?{...k,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Rt(n,[{account:ue}])},[Z,ne,u,e.recommendedAction.recommendedTransactions,c,n]),B=s.useMemo(()=>{if(!Z&&!ne)return En(h);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return En(h,u?.recommendations);const k=p.find(we=>we.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ue=k!=null?{...k,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return En(h,[{class:ue}])},[Z,ne,u,e.recommendedAction.recommendedTransactions,p,h]),U=qt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>ci(e,i,P,c,B,x,C,l),[e,i,B,c,P,x,C,l]),values:s.useMemo(()=>ci(e,i,P,c,B,x,C,l),[e,i,B,c,P,x,C,l])}),_=async(k,ue)=>{k.includes("memo")||f(di(ue,e,l,c),e.transactionId,k.includes("vendor"))};s.useEffect(()=>{const k=U.watch((ue,{name:we})=>{we!=null&&ue!=null&&xn(()=>_(we,ue))});return()=>{k.unsubscribe()}});const j=s.useCallback(k=>{if(Z||te||ne){if((Z||ne)&&i.vendor==null){T(!1),U.setError(Le(e.transactionId,"vendor"),{type:"required"});return}if(te&&i.customer==null){S(!1),U.setError(Le(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){A(!1),U.setError(Le(e.transactionId,"category"),{type:"required"});return}}f(di(k,e,l,c),e.transactionId,!1),I(e.transactionId)},[Z,ne,te,f,e,l,c,I,i.categoryId,i.vendor,i.customer]),R=U.watch(Le(e.transactionId,"vendor")),W=U.watch(Le(e.transactionId,"customer")),ie=s.useRef(),E=s.useMemo(()=>Z||ne?"vendor":te?"customer":null,[Z,ne,te]),J=(k,ue)=>{E!=null&&d.onAutoCompleteInputChange?.(k,E),ie.current=ue};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&((Z||ne)&&ie.current?.(ws(l.entityAutoCompleteView)),te&&ie.current?.(pr(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,te,Z,ne]);const K=k=>p.filter(ue=>ue.classId===k)[0]?.accountingClassNumber??void 0,oe=k=>c.filter(ue=>ue.qboId===k)[0]?.qboId,Ce=s.useMemo(()=>{if(w==="bank")switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[w,e.recommendedAction.action,e.transactionDirection]),$e=()=>{A(!1)},ge=()=>{q(!1)},re=()=>{Y(!1)};return s.useEffect(()=>{b===!1&&i.categoryId==null&&U.setFocus(Le(e.transactionId,"category"))},[b]),s.useEffect(()=>{L===!1&&i.classId==null&&U.setFocus(Le(e.transactionId,"class"))},[L]),s.useEffect(()=>{O===!1&&i.vendor==null&&U.setFocus(Le(e.transactionId,"vendor"))},[O]),s.useEffect(()=>{D===!1&&i.customer==null&&U.setFocus(Le(e.transactionId,"customer"))},[D]),s.useEffect(()=>{z===!1&&i.bankAccountId==null&&U.setFocus(Le(e.transactionId,"bankAccount"))},[z]),s.useEffect(()=>{F===!1&&i.creditCardId==null&&U.setFocus(Le(e.transactionId,"creditCard"))},[F]),t.jsx(Jt,{...U,children:t.jsx("form",{onSubmit:U.handleSubmit(j),id:li(e.transactionId),children:t.jsxs(xd,{children:[t.jsxs(bd,{children:[t.jsxs(jd,{children:[t.jsxs(kd,{children:[t.jsx(Ks,{}),t.jsx(Wn,{label:{label:V?xe.review.formLabels.match:xe.review.formLabels.categorize},radioField:{name:Le(e.transactionId,"match_radio"),id:V?"match":"categorize",value:V?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Pe,{controller:!V,children:t.jsxs(t.Fragment,{children:[t.jsx(ui,{}),Ce.map(k=>t.jsx(Wn,{label:{label:xe.review.formLabels[k]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Le(e.transactionId,"recommendedActionType"),id:k,value:k,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},k))]})})]}),t.jsxs(Sd,{children:[t.jsx(pn,{variant:"secondary",size:"small",label:xe.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":M("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{v({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(pn,{form:li(e.transactionId),"data-testid":M("account-reconciliation-review-save-button",e.transactionId),label:ut.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Pe,{controller:Z||te||ne,children:t.jsxs(Kn,{children:[t.jsx(Pe,{controller:Z||ne,children:t.jsx(ft,{onClickAway:()=>{i.vendor==null&&O===!1&&T(!0)},children:t.jsx(Q,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.vendor}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:O===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),T(!1)},"data-testid":M("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addVendor]}):t.jsx(fo,{name:Le(e.transactionId,"vendor"),allowEmpty:!1,placeholder:xe.review.formLabels.addVendor,valueToId:k=>k,defaultValue:{selectedOption:R?.selectedOption,defaultOptions:R?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:J})})})]})})})}),t.jsx(Pe,{controller:te,children:t.jsx(ft,{onClickAway:()=>{i.customer==null&&D===!1&&S(!0)},children:t.jsx(Q,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.customer}),t.jsx(ae,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),S(!1)},"data-testid":M("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addCustomer]}):t.jsx(fo,{name:Le(e.transactionId,"customer"),allowEmpty:!1,placeholder:xe.review.formLabels.addCustomer,valueToId:k=>k,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:J})})})]})})})}),t.jsx(ft,{onClickAway:()=>{i.categoryId==null&&b===!1&&A(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:b===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),$e()},"data-testid":M("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"category"),placeholder:xe.review.formLabels.addCategory,valueToId:k=>oe(k),defaultValue:{allOptions:P,selectedOption:c.find(k=>k.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})}),t.jsx(ft,{onClickAway:()=>{i.classId==null&&L===!1&&H(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ut.texts.class}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:L===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),H(!1)},"data-testid":M("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addClass]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"class"),placeholder:xe.review.formLabels.addClass,valueToId:k=>K(k),defaultValue:{allOptions:B,selectedOption:i.classId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})]})}),t.jsx(Pe,{controller:V,children:t.jsxs(Id,{children:[t.jsxs($d,{children:[t.jsx("span",{className:"matched-text",children:`${xe.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),xe.review.matchesFoundFullInfo]}),t.jsx(Td,{children:e.recommendedAction.recommendedTransactions.map(k=>k.bookTransactionId!=null?t.jsxs(Ad,{children:[t.jsx(Wn,{label:{label:t.jsxs(Ld,{children:[t.jsx(Be,{children:k.date.format(Hs.MMMDCommaYYYYformat)}),t.jsx(Be,{children:k.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Le(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:k.bookTransactionId,value:k.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(zd,{"data-testid":M("account-reconciliation-review-matched-transaction-amount",k.bookTransactionId),onClick:()=>{k.bookTransactionId!=null&&y(k.bookTransactionId)},children:[t.jsx(Ed,{children:$s("0,0.00",k.amount.amount,k.amount.currencySymbol)}),t.jsx(ui,{})]})]},k.bookTransactionId):null)})]})}),t.jsx(Pe,{controller:fe,children:t.jsx(Kn,{children:t.jsx(ft,{onClickAway:()=>{i.bankAccountId==null&&z===!1&&q(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:w==="credit_card"?xe.review.formLabels.selectAccount:xe.review.formLabels.transferTo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),ge()},"data-testid":M("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.selectAccount]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"bankAccount"),placeholder:xe.review.formLabels.selectAccount,defaultValue:{allOptions:Ws(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(Pe,{controller:le,children:t.jsx(Kn,{children:t.jsx(ft,{onClickAway:()=>{i.creditCardId==null&&F===!1&&Y(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.creditCard}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:F===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),re()},"data-testid":M("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.selectCard]}):t.jsx(tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Le(e.transactionId,"creditCard"),placeholder:xe.review.formLabels.selectCard,defaultValue:{allOptions:Us(C),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(Pe,{controller:!V,children:t.jsx(vd,{children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ct,{className:"hover-background",children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.header.memo}),t.jsx(ae,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),G(!1)},"data-testid":M("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:$.colors.champion,cursor:"pointer"},children:[t.jsx(Pt,{}),xe.review.formLabels.addMemo]}):t.jsx(mr,{name:Le(e.transactionId,"memo"),placeholder:xe.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},kn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},ci=(e,n,d,c,p,h,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[st]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:p},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Ws(h)},creditCard:{selectedOption:n?.creditCardId,allOptions:Us(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:ks(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:wr(n?.customer,l.entityAutoCompleteView)}}}}},di=(e,n,d,c)=>{const{vendor:p,customer:h}=e[st][n.transactionId];let i;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)i={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)l={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[st][n.transactionId].category.selectedOption)?.accountId??e[st][n.transactionId].category.selectedOption,classId:e[st][n.transactionId].class.selectedOption,memo:e[st][n.transactionId].memo,matchedTransactionId:e[st][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[st][n.transactionId].bankAccount.selectedOption,creditCardId:e[st][n.transactionId].creditCard.selectedOption,customer:l}},Yt=a(Be)`
579
579
  display: flex;
580
580
  align-items: center;
581
581
  column-gap: ${o.sp1};
@@ -635,7 +635,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
635
635
  padding: 12px ${o.sp3};
636
636
  background-color: ${e=>e.theme.colors.background};
637
637
  border-radius: ${o.sp2};
638
- `,Gn=a.div`
638
+ `,Kn=a.div`
639
639
  display: flex;
640
640
  flex-direction: row;
641
641
  align-items: center;
@@ -660,7 +660,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
660
660
  `,Pt=a(Pn)`
661
661
  width: ${o.sp3};
662
662
  height: ${o.sp3};
663
- `,hi=a(br)`
663
+ `,ui=a(br)`
664
664
  width: ${o.sp3};
665
665
  height: ${o.sp3};
666
666
  color: ${e=>e.theme.colors.hero};
@@ -669,11 +669,11 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
669
669
  flex-direction: column;
670
670
  row-gap: ${o.sp3};
671
671
  padding: ${o.sp0} 12px;
672
- `,$d=a(_e)`
672
+ `,$d=a(Be)`
673
673
  color: ${e=>e.theme.colors.primary};
674
674
 
675
675
  .matched-text {
676
- font-weight: ${jo.bold};
676
+ font-weight: ${So.bold};
677
677
  }
678
678
  `,Ld=a.div`
679
679
  display: flex;
@@ -690,7 +690,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
690
690
  justify-content: space-between;
691
691
  padding-bottom: ${o.sp2};
692
692
  border-bottom: 1px solid ${e=>e.theme.colors.grey3};
693
- `,Ed=a(_e)`
693
+ `,Ed=a(Be)`
694
694
  color: ${e=>e.theme.colors.hero};
695
695
  `,Rd=a.div`
696
696
  height: 100%;
@@ -703,28 +703,28 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
703
703
  border-radius: ${o.sp1};
704
704
  `,Od=a(pt)`
705
705
  color: ${e=>e.theme.colors.hero};
706
- `,Md=a.div`
706
+ `,zd=a.div`
707
707
  display: flex;
708
708
  align-items: center;
709
709
  column-gap: 20px;
710
710
  cursor: pointer;
711
- `,_d=a.div`
711
+ `,Bd=a.div`
712
712
  text-align: center;
713
713
  padding: ${o.sp1} ${o.sp0};
714
714
  border-top: 1px solid ${e=>e.theme.colors.grey3};
715
- `,zd=a(pt)`
715
+ `,Fd=a(pt)`
716
716
  color: ${e=>e.theme.colors.hero};
717
- `,Gs=a(gn)`
717
+ `,Ks=a(gn)`
718
718
  width: ${o.sp3};
719
719
  height: ${o.sp3};
720
720
  margin-right: ${o.sp1};
721
721
  path {
722
722
  stroke-width: 2;
723
723
  }
724
- `,Fd=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:d,currentFooterFormId:c,entitySearchAutoCompleteActions:p,onUpdateReconcileTabLocalData:h,setCurrentFooterFormId:i,onReconTabColumnSortConfigChanged:l,updateReviewTabLocalData:r,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:x,onReconMatchedTransactionClick:C})=>{const{accountReconciliationsByAccountID:w,reconciliationTabsState:{reconcile:{uiState:{sortKey:f,sortOrder:v}}},selectedReconAccount:I}=e,y=w[d],{transactionFetchState:$}=I??{};return $?.fetchState==="In-Progress"||$?.fetchState==="Not-Started"?t.jsxs(pi,{style:{paddingLeft:g[8],paddingRight:g[8]},children:[t.jsx(Bd,{children:yt.map(O=>t.jsx(Dt,{width:O.loaderWidth,height:18},O.key))}),t.jsxs(Nd,{children:[...Array(3).fill(0).map((O,T)=>t.jsx(Pd,{children:yt.map(D=>t.jsx(Dt,{width:D.loaderWidth,height:g[4]},D.key))},`${T}_${O}`))]})]}):t.jsx(pi,{children:e.selectedTab==="reconcile"?t.jsx(Uc,{selectedAccountId:d,currentFooterFormId:c,setCurrentFooterFormId:i,onUpdateReconcileTabLocalData:h,onReconTabColumnSortConfigChanged:l,onSaveReconciliation:u,sortConfig:{sortKey:f,sortOrder:v},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:y?.accountReconEntity.transactionsToReconcile}):t.jsx(dd,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[d]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[d].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:r,entitySearchAutoCompleteActions:p,onColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:x,onReconMatchedTransactionClick:C,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:d,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},pi=a.div`
724
+ `,_d=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:d,currentFooterFormId:c,entitySearchAutoCompleteActions:p,onUpdateReconcileTabLocalData:h,setCurrentFooterFormId:i,onReconTabColumnSortConfigChanged:l,updateReviewTabLocalData:r,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:x,onReconMatchedTransactionClick:C})=>{const{accountReconciliationsByAccountID:w,reconciliationTabsState:{reconcile:{uiState:{sortKey:f,sortOrder:v}}},selectedReconAccount:I}=e,y=w[d],{transactionFetchState:$}=I??{};return $?.fetchState==="In-Progress"||$?.fetchState==="Not-Started"?t.jsxs(hi,{style:{paddingLeft:g[8],paddingRight:g[8]},children:[t.jsx(Md,{children:yt.map(O=>t.jsx(Dt,{width:O.loaderWidth,height:18},O.key))}),t.jsxs(Nd,{children:[...Array(3).fill(0).map((O,T)=>t.jsx(Pd,{children:yt.map(D=>t.jsx(Dt,{width:D.loaderWidth,height:g[4]},D.key))},`${T}_${O}`))]})]}):t.jsx(hi,{children:e.selectedTab==="reconcile"?t.jsx(Uc,{selectedAccountId:d,currentFooterFormId:c,setCurrentFooterFormId:i,onUpdateReconcileTabLocalData:h,onReconTabColumnSortConfigChanged:l,onSaveReconciliation:u,sortConfig:{sortKey:f,sortOrder:v},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:y?.accountReconEntity.transactionsToReconcile}):t.jsx(dd,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[d]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[d].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:r,entitySearchAutoCompleteActions:p,onColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:x,onReconMatchedTransactionClick:C,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:d,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},hi=a.div`
725
725
  width: 100%;
726
726
  height: 100%;
727
- `,Bd=a.div`
727
+ `,Md=a.div`
728
728
  display: flex;
729
729
  justify-content: space-between;
730
730
  padding: ${o.sp3} ${o.sp4};
@@ -742,7 +742,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
742
742
  display: flex;
743
743
  gap: ${o.sp3};
744
744
  flex-direction: column;
745
- `;function Vd({title:e,config:n,nodeId:d}){return{children:[],id:d??ht("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Hd({account:e,numOfBalances:n,title:d,isLastNode:c,config:p}){const h=ht("ac_group_report",[],d);return{children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"ac_group_report",title:d,data:e,numOfBalances:n},config:p}}}function Wd({title:e,section:n,config:d,numOfBalances:c,nodeId:p}){return{children:[],id:p??ht("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:c},config:d}}}function mi({section:e,allAccountReconciliations:n,title:d,subTitle:c,isLastNode:p,isTitleRowRequired:h,config:i}){const l=ht("section",[],d),r={children:[],id:l,isLastNode:p,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:0},config:i}};if(h){const u=ht("title_string_only",[],d),x={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:d,data:e,numOfBalances:0},config:i}};r.children.push(x)}const m=Wd({title:c,section:e,config:i,numOfBalances:0});return r.children.push(m),e.accountIDs.forEach((u,x)=>{const C=n[u],w=Hd({account:C,numOfBalances:0,title:C.accountReconEntity.account.accountName,isLastNode:x===e.accountIDs.length-1,config:i});r.children.push(w)}),r}function Ys({config:e,accountReconForSection:n,nodeId:d}){return{children:[],id:d??ht("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function Ud(e,n){return n?Jn("section")+Jn("total")+e*Jn("ac_group_report"):1/0}const qd=(e,n,d,c,p=!0,h="assets")=>{const i=h==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,l=Ys({config:n,accountReconForSection:i}),r=[];r.push(l);const m=Array.isArray(d[c])?d[c]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:x}}=Ie.getLocalizedStrings(),C=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",w=f=>f.filter(v=>!m.includes(v));if(C)[...Array(3)].forEach((f,v)=>{r.push(Vd({title:`${v}+${x}`,config:n}))});else{const f=w(e.accountReconciliationBySectionID.assets.accountIDs),v=mi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:f},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(r.push(v),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const I=w(e.accountReconciliationBySectionID.liabilities.accountIDs),y=mi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:I},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});r.push(y)}}return{config:n,headerNodes:p?[l]:[],contentNodes:r}};function Jd(e,n,d,c=!1,p="assets"){Object.assign(e.config,d);const h=p==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=Ys({config:d,accountReconForSection:h});return{config:d,headerNodes:c?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const bo={wrapperPadding:new ee(g[2],g[2],g[2],g[8]),contentPaddingLeft:new ee(g[2],g[2],g[2],g[2]),contentPaddingRight:new ee(g[2],g[2],g[2],g[2])},Kd=a.div`
745
+ `;function Vd({title:e,config:n,nodeId:d}){return{children:[],id:d??ht("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Hd({account:e,numOfBalances:n,title:d,isLastNode:c,config:p}){const h=ht("ac_group_report",[],d);return{children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"ac_group_report",title:d,data:e,numOfBalances:n},config:p}}}function Wd({title:e,section:n,config:d,numOfBalances:c,nodeId:p}){return{children:[],id:p??ht("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:c},config:d}}}function pi({section:e,allAccountReconciliations:n,title:d,subTitle:c,isLastNode:p,isTitleRowRequired:h,config:i}){const l=ht("section",[],d),r={children:[],id:l,isLastNode:p,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:0},config:i}};if(h){const u=ht("title_string_only",[],d),x={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:d,data:e,numOfBalances:0},config:i}};r.children.push(x)}const m=Wd({title:c,section:e,config:i,numOfBalances:0});return r.children.push(m),e.accountIDs.forEach((u,x)=>{const C=n[u],w=Hd({account:C,numOfBalances:0,title:C.accountReconEntity.account.accountName,isLastNode:x===e.accountIDs.length-1,config:i});r.children.push(w)}),r}function Gs({config:e,accountReconForSection:n,nodeId:d}){return{children:[],id:d??ht("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function Ud(e,n){return n?qn("section")+qn("total")+e*qn("ac_group_report"):1/0}const qd=(e,n,d,c,p=!0,h="assets")=>{const i=h==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,l=Gs({config:n,accountReconForSection:i}),r=[];r.push(l);const m=Array.isArray(d[c])?d[c]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:x}}=Ie.getLocalizedStrings(),C=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",w=f=>f.filter(v=>!m.includes(v));if(C)[...Array(3)].forEach((f,v)=>{r.push(Vd({title:`${v}+${x}`,config:n}))});else{const f=w(e.accountReconciliationBySectionID.assets.accountIDs),v=pi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:f},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(r.push(v),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const I=w(e.accountReconciliationBySectionID.liabilities.accountIDs),y=pi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:I},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});r.push(y)}}return{config:n,headerNodes:p?[l]:[],contentNodes:r}};function Jd(e,n,d,c=!1,p="assets"){Object.assign(e.config,d);const h=p==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=Gs({config:d,accountReconForSection:h});return{config:d,headerNodes:c?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const wo={wrapperPadding:new ee(g[2],g[2],g[2],g[8]),contentPaddingLeft:new ee(g[2],g[2],g[2],g[2]),contentPaddingRight:new ee(g[2],g[2],g[2],g[2])},Kd=a.div`
746
746
  display: flex;
747
747
  height: 100%;
748
748
  width: 100%;
@@ -755,23 +755,23 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
755
755
  flex: 1 1 auto;
756
756
  width: 100%;
757
757
  justify-content: center;
758
- padding-left: ${e=>bo.wrapperPadding.valuePx(e.windowSize)};
758
+ padding-left: ${e=>wo.wrapperPadding.valuePx(e.windowSize)};
759
759
  background-color: ${e=>e.theme.colors.grey4};
760
760
  `,Yd=a.div`
761
761
  width: 100%;
762
762
  height: 100%;
763
- `,{common:Zd}=Ie.getLocalizedStrings();function Xd({reconciliation:e,companyId:n,onReload:d,onReviewClicked:c,setOpenDrawerClicked:p,onFetchLinkTokenClick:h,onEstablishConnectionClick:i,onAddStatementClick:l}){const[r,m]=s.useState(void 0),[u,x]=s.useState(void 0),C=e.plaidConnectionDetails.link_account_no_microdeposit,w=e.plaidConnectionDetails.update_account,f=u==="update_account"?w:C,[v,I]=s.useState(f.linkToken??null),[y,$]=s.useState(!1),{useDynamicConfig:O}=ps(),{configValue:T}=O(ms.accountReconGLAccountsConfig),D=s.useCallback(J=>{m(J),x("link_account_no_microdeposit")},[]),S=s.useCallback(J=>{const K=H.current.accountReconciliationsByAccountID[J]?.paymentAccountId;m(J),x("update_account"),h("update_account",K)},[]),b=s.useCallback(J=>{p(J)},[]),A=s.useRef(r),L=s.useRef(u),H=s.useRef(e);s.useEffect(()=>{A.current=r},[r]),s.useEffect(()=>{L.current=u},[u]),s.useEffect(()=>{H.current=e},[e]);const M=s.useCallback(J=>{i(J,A.current??"",L.current),m(void 0),x(void 0),$(!1)},[i]),q=s.useCallback((J,K)=>{J!=null&&console.log("Plaid Connection Error",J,K),m(void 0),x(void 0),$(!1)},[]),{open:z,ready:Y}=Ga({token:v,onSuccess:M,onExit:q});s.useEffect(()=>{(Co(new Date().toISOString()).isAfter(f.expiration)||f.linkToken==null)&&f.fetchStatus.fetchState==="Not-Started"&&h("link_account_no_microdeposit")},[f.fetchStatus.fetchState]),s.useEffect(()=>{!y&&u!=null&&f.linkToken===v&&f.fetchStatus.fetchState==="Completed"&&Y&&$(!0)},[Y,v,f.fetchStatus.fetchState,f.linkToken,u,y]),s.useEffect(()=>{f.fetchStatus.fetchState==="Completed"&&f.linkToken!=null&&f.linkToken!==v&&I(f.linkToken)},[f.fetchStatus.fetchState,f.linkToken,v]),s.useEffect(()=>{y&&z()},[y,z]);const[N,G]=s.useState(void 0),[V,Z]=s.useState(void 0),[fe,ce]=s.useState("assets"),te=Co("2025-03-31"),ne=1,P="account_reconciliation",_=ke(),U=bt(),F=!0,j=Array.isArray(T?.[n])?T[n]:[],R=e.accountReconciliationBySectionID.assets.accountIDs.filter(J=>!j.includes(J)).length,W=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,ie=Ud(R,W),E=s.useCallback(J=>{const K=J.scrollTop>=ie?"liabilities":"assets";K!==fe&&ce(K)},[ie,fe]);return s.useEffect(()=>{const J={reportId:P,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:te,firstMonthOfFY:ne,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:c,onConnectClicked:D,onReconnectClicked:S,onOpenDrawerClicked:b,onStatementAddClicked:l}};if(N==null||!gs(V,e)){const K=qd(e,J,T,n,F,fe);Z(e),G(K)}else{const K=Jd(N,e,J,F,fe);G(K)}},[e,fe]),e.fetchStatus.fetchState==="Error"?t.jsx(Kd,{children:t.jsx(Ya,{onReload:d,message:Zd.errorMessage.somethingWentWrong})}):t.jsx(Gd,{windowSize:_,children:N!=null?t.jsx(Yd,{windowSize:_,children:t.jsx(zs,{backgroundColor:new $o(U.colors.grey4),rootNodes:N,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:F,isStickyName:F},treeNodePadding:{left:bo.contentPaddingLeft.value(_),right:bo.contentPaddingRight.value(_)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:E})}):null})}function Qd({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:d,reconciliation:c,companyId:p,onReconTabColumnSortConfigChanged:h,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:C,onAddStatementClick:w,onReconReviewTabColumnSortConfigChanged:f,onSaveReconciliation:v,onSaveReconciliationReview:I,setOpenDrawerClicked:y,onReconMatchedTransactionClick:$}){return c.selectedAccountId==null?t.jsx(Xd,{companyId:p,reconciliation:c,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:C,setOpenDrawerClicked:y,onAddStatementClick:w}):t.jsx(Fd,{currentFooterFormId:e,setCurrentFooterFormId:r,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:h,reconciliation:c,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:d,onReconReviewTabColumnSortConfigChanged:f,entitySearchAutoCompleteData:n,selectedAccountId:c.selectedAccountId,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:$})}function eu({accountAndClassReport:e,numOfBalances:n,title:d,isLastNode:c,isFirstNode:p,config:h,parentNodeIDs:i,ancestorMetadata:l}){let r="";return e.accountBase&&e.classBase?r=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?r=e.accountBase.accountId:e.classBase&&(r=e.classBase.classId),{children:[],id:ht("flux_vendor_account_class_row",i,r),isLastNode:c,isFirstNode:p,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:d,data:e,metadata:l,numOfBalances:n},config:h}}}function tu({vendorView:e,numOfBalances:n,title:d,isLastNode:c,config:p,parentNodeIDs:h}){const i=ht("flux_vendor_row",h,e.vendor.id),l={children:[],id:i,isLastNode:c,reportElementData:{element:{kind:"flux_vendor_row",title:d,data:e,numOfBalances:n},config:p}},r=e.vendorAccountsAndClasses;return l.children=r.map((m,u)=>eu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:p,isLastNode:u===r.length-1,isFirstNode:u===0,parentNodeIDs:[...h,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:r.length>1,hasChildren:!1,isLastNode:u===r.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:c,vendorId:e.vendor.id}})),l}function nu({section:e,numOfBalances:n,title:d,isLastNode:c,config:p}){const h=e.sectionId,i={children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:n,sectionType:e.sectionId},config:p}},l=(e.vendors??[]).map((r,m)=>tu({vendorView:r,numOfBalances:n,title:r.vendor.name,isLastNode:m===e.vendors.length-1,config:p,parentNodeIDs:[h]}));return i.children.push(...l),i}function ou({title:e,balances:n,config:d,nodeId:c}){return{children:[],id:c??ht("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:d}}}function iu({title:e,data:n,isLastNode:d,config:c,numOfBalances:p}){const h=ht("total",[],e);return{children:[],id:h,isLastNode:d,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:p},config:c}}}const{common:In,expenseAutomation:{fluxAnalysis:su}}=Ie.getLocalizedStrings(),au=(e,n,d=!0)=>{const c=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,p=e.sections.generalExpense.balancesByMonth?nn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?nn(e.sections.reimbursement.balancesByMonth):[],h=Fs({balances:p,config:n}),i=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,r=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)i.push(ou({title:`${In.loading}`,balances:p,config:n})),[...Array(10)].forEach((m,u)=>{i.push(Go({title:`${u}+${In.loading}`,balances:p,config:n}))});else{if(i.push(h),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const x=nn(u.balancesByMonth);i.push(nu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:x,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:c,title:ru(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?nn(e.totalBalancesAndVariance.balancesByMonth):[],u=iu({title:In.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:c});i.push(u)}r===!0&&[...Array(1)].forEach((m,u)=>{i.push(Go({title:`${u}+${In.loading}`,balances:p,config:n}))})}return{config:n,headerNodes:d&&!l?[h]:[],contentNodes:i}},ru=e=>su.sectionTitle[e];function lu(e,n,d,c=!0){Object.assign(e.config,n);const p=cu(d),h=Fs({balances:p,config:n});return{config:n,headerNodes:c?[h]:[],contentNodes:[h,...e.contentNodes.slice(1)]}}const cu=e=>e.sections.generalExpense.balancesByMonth?nn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?nn(e.sections.reimbursement.balancesByMonth):[],vo={contentPaddingLeft:new ee(g[0],g[0],g[0]),contentPaddingRight:new ee(g[3],g[3],g[8]),wrapperPadding:new ee(g[3],g[3],g[8])},du=a.div`
763
+ `,{common:Zd}=Ie.getLocalizedStrings();function Xd({reconciliation:e,companyId:n,onReload:d,onReviewClicked:c,setOpenDrawerClicked:p,onFetchLinkTokenClick:h,onEstablishConnectionClick:i,onAddStatementClick:l}){const[r,m]=s.useState(void 0),[u,x]=s.useState(void 0),C=e.plaidConnectionDetails.link_account_no_microdeposit,w=e.plaidConnectionDetails.update_account,f=u==="update_account"?w:C,[v,I]=s.useState(f.linkToken??null),[y,$]=s.useState(!1),{useDynamicConfig:O}=hs(),{configValue:T}=O(ps.accountReconGLAccountsConfig),D=s.useCallback(J=>{m(J),x("link_account_no_microdeposit")},[]),S=s.useCallback(J=>{const K=H.current.accountReconciliationsByAccountID[J]?.paymentAccountId;m(J),x("update_account"),h("update_account",K)},[]),b=s.useCallback(J=>{p(J)},[]),A=s.useRef(r),L=s.useRef(u),H=s.useRef(e);s.useEffect(()=>{A.current=r},[r]),s.useEffect(()=>{L.current=u},[u]),s.useEffect(()=>{H.current=e},[e]);const z=s.useCallback(J=>{i(J,A.current??"",L.current),m(void 0),x(void 0),$(!1)},[i]),q=s.useCallback((J,K)=>{J!=null&&console.log("Plaid Connection Error",J,K),m(void 0),x(void 0),$(!1)},[]),{open:F,ready:Y}=Ga({token:v,onSuccess:z,onExit:q});s.useEffect(()=>{(yo(new Date().toISOString()).isAfter(f.expiration)||f.linkToken==null)&&f.fetchStatus.fetchState==="Not-Started"&&h("link_account_no_microdeposit")},[f.fetchStatus.fetchState]),s.useEffect(()=>{!y&&u!=null&&f.linkToken===v&&f.fetchStatus.fetchState==="Completed"&&Y&&$(!0)},[Y,v,f.fetchStatus.fetchState,f.linkToken,u,y]),s.useEffect(()=>{f.fetchStatus.fetchState==="Completed"&&f.linkToken!=null&&f.linkToken!==v&&I(f.linkToken)},[f.fetchStatus.fetchState,f.linkToken,v]),s.useEffect(()=>{y&&F()},[y,F]);const[N,G]=s.useState(void 0),[V,Z]=s.useState(void 0),[fe,le]=s.useState("assets"),te=yo("2025-03-31"),ne=1,P="account_reconciliation",B=ke(),U=bt(),_=!0,j=Array.isArray(T?.[n])?T[n]:[],R=e.accountReconciliationBySectionID.assets.accountIDs.filter(J=>!j.includes(J)).length,W=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,ie=Ud(R,W),E=s.useCallback(J=>{const K=J.scrollTop>=ie?"liabilities":"assets";K!==fe&&le(K)},[ie,fe]);return s.useEffect(()=>{const J={reportId:P,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:te,firstMonthOfFY:ne,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:c,onConnectClicked:D,onReconnectClicked:S,onOpenDrawerClicked:b,onStatementAddClicked:l}};if(N==null||!ms(V,e)){const K=qd(e,J,T,n,_,fe);Z(e),G(K)}else{const K=Jd(N,e,J,_,fe);G(K)}},[e,fe]),e.fetchStatus.fetchState==="Error"?t.jsx(Kd,{children:t.jsx(Ya,{onReload:d,message:Zd.errorMessage.somethingWentWrong})}):t.jsx(Gd,{windowSize:B,children:N!=null?t.jsx(Yd,{windowSize:B,children:t.jsx(Bs,{backgroundColor:new Io(U.colors.grey4),rootNodes:N,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:_,isStickyName:_},treeNodePadding:{left:wo.contentPaddingLeft.value(B),right:wo.contentPaddingRight.value(B)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:E})}):null})}function Qd({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:d,reconciliation:c,companyId:p,onReconTabColumnSortConfigChanged:h,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:C,onAddStatementClick:w,onReconReviewTabColumnSortConfigChanged:f,onSaveReconciliation:v,onSaveReconciliationReview:I,setOpenDrawerClicked:y,onReconMatchedTransactionClick:$}){return c.selectedAccountId==null?t.jsx(Xd,{companyId:p,reconciliation:c,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:C,setOpenDrawerClicked:y,onAddStatementClick:w}):t.jsx(_d,{currentFooterFormId:e,setCurrentFooterFormId:r,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:h,reconciliation:c,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:d,onReconReviewTabColumnSortConfigChanged:f,entitySearchAutoCompleteData:n,selectedAccountId:c.selectedAccountId,onSaveReconciliation:v,onSaveReconciliationReview:I,onReconMatchedTransactionClick:$})}function eu({accountAndClassReport:e,numOfBalances:n,title:d,isLastNode:c,isFirstNode:p,config:h,parentNodeIDs:i,ancestorMetadata:l}){let r="";return e.accountBase&&e.classBase?r=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?r=e.accountBase.accountId:e.classBase&&(r=e.classBase.classId),{children:[],id:ht("flux_vendor_account_class_row",i,r),isLastNode:c,isFirstNode:p,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:d,data:e,metadata:l,numOfBalances:n},config:h}}}function tu({vendorView:e,numOfBalances:n,title:d,isLastNode:c,config:p,parentNodeIDs:h}){const i=ht("flux_vendor_row",h,e.vendor.id),l={children:[],id:i,isLastNode:c,reportElementData:{element:{kind:"flux_vendor_row",title:d,data:e,numOfBalances:n},config:p}},r=e.vendorAccountsAndClasses;return l.children=r.map((m,u)=>eu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:p,isLastNode:u===r.length-1,isFirstNode:u===0,parentNodeIDs:[...h,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:r.length>1,hasChildren:!1,isLastNode:u===r.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:c,vendorId:e.vendor.id}})),l}function nu({section:e,numOfBalances:n,title:d,isLastNode:c,config:p}){const h=e.sectionId,i={children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:n,sectionType:e.sectionId},config:p}},l=(e.vendors??[]).map((r,m)=>tu({vendorView:r,numOfBalances:n,title:r.vendor.name,isLastNode:m===e.vendors.length-1,config:p,parentNodeIDs:[h]}));return i.children.push(...l),i}function ou({title:e,balances:n,config:d,nodeId:c}){return{children:[],id:c??ht("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:d}}}function iu({title:e,data:n,isLastNode:d,config:c,numOfBalances:p}){const h=ht("total",[],e);return{children:[],id:h,isLastNode:d,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:p},config:c}}}const{common:In,expenseAutomation:{fluxAnalysis:su}}=Ie.getLocalizedStrings(),au=(e,n,d=!0)=>{const c=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,p=e.sections.generalExpense.balancesByMonth?nn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?nn(e.sections.reimbursement.balancesByMonth):[],h=Fs({balances:p,config:n}),i=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,r=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)i.push(ou({title:`${In.loading}`,balances:p,config:n})),[...Array(10)].forEach((m,u)=>{i.push(Ko({title:`${u}+${In.loading}`,balances:p,config:n}))});else{if(i.push(h),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const x=nn(u.balancesByMonth);i.push(nu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:x,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:c,title:ru(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?nn(e.totalBalancesAndVariance.balancesByMonth):[],u=iu({title:In.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:c});i.push(u)}r===!0&&[...Array(1)].forEach((m,u)=>{i.push(Ko({title:`${u}+${In.loading}`,balances:p,config:n}))})}return{config:n,headerNodes:d&&!l?[h]:[],contentNodes:i}},ru=e=>su.sectionTitle[e];function lu(e,n,d,c=!0){Object.assign(e.config,n);const p=cu(d),h=Fs({balances:p,config:n});return{config:n,headerNodes:c?[h]:[],contentNodes:[h,...e.contentNodes.slice(1)]}}const cu=e=>e.sections.generalExpense.balancesByMonth?nn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?nn(e.sections.reimbursement.balancesByMonth):[],bo={contentPaddingLeft:new ee(g[0],g[0],g[0]),contentPaddingRight:new ee(g[3],g[3],g[8]),wrapperPadding:new ee(g[3],g[3],g[8])},du=a.div`
764
764
  display: flex;
765
765
  position: sticky;
766
766
  width: 100%;
767
767
  justify-content: center;
768
- padding-top: ${e=>vo.wrapperPadding.valuePx(e.windowSize)};
768
+ padding-top: ${e=>bo.wrapperPadding.valuePx(e.windowSize)};
769
769
  padding-left: 20px;
770
770
  background-color: ${e=>e.theme.colors.grey4};
771
771
  `,uu=a.div`
772
772
  width: 100%;
773
773
  height: calc(100vh - ${o.sp11});
774
- `,hu=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:p,onSortOrderChanged:h,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=ke(),u=bt(),[x,C]=s.useState(null),[w,f]=s.useState(null),[v,I]=s.useState(null),y=Jo([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,O]=s.useState(!1),T=Vo(y),D=Vo(n.refreshStatus.fetchState),S=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},b=()=>Object.keys(n.uiState.collapsableStatus).reduce((z,Y)=>(z[Y]=n.uiState.collapsableStatus[Y],z),{}),A=s.useCallback(z=>{const Y=!(n.uiState.collapsableStatus[z]??!0);i({...n.uiState.collapsableStatus,[z]:Y})},[n.uiState.collapsableStatus,i]),L=s.useCallback((z,Y)=>{let N=n.reviewOperatingExpensesIds;const G=[];let V=n.selectedSectionIds;const Z=n.sections[z].vendors;G.push(...Z.map(ce=>ce.fluxAnalysisEntityId));let fe=_s-N.length;Y?(G.forEach(ce=>{!N.includes(ce)&&fe>0&&(N=[...N,ce],fe--)}),V=[...V,z]):(N=N.filter(ce=>!G.includes(ce)),V=V.filter(ce=>ce!==z)),c(N),p(V)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,c,p]),H=s.useCallback(z=>{const Y=n.uiState.collapsableStatus[z]===!1;z==="generalExpense"&&!Y&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),A(z)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,A]),M=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,q=z=>z<M;return s.useEffect(()=>{const z={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:O,onSectionRowClick:H,updateNodeCollapsableStatus:A,updateOperatingExpensesIdsForReview:c,handleRedirectToVendorDetailPage:d,onSectionCheckboxClick:L,onSortOrderChanged:h}};if(x==null||!gs(w,n)){const Y=au(n,z,!0);f(n),C(Y)}else{const Y=lu(x,z,n,!0);C(Y)}},[n,w,d,L,H,h,A,c]),t.jsx(du,{windowSize:m,children:t.jsx(uu,{children:x?t.jsx(zs,{backgroundColor:new $o(u.colors.grey4),rootNodes:x,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:vo.contentPaddingLeft.value(m),right:vo.contentPaddingRight.value(m)},nodeOpenStatus:b(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:q,itemCount:M,loadMoreItems:S},variableNodeHeightTree:{prevFetchState:T??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:$,setIsSortApplied:O,reducedFetchState:Jo([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:D??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:v,setHoveredParentId:I}}):null})})},pu="expenseAutomationFluxPage",{reports:{common:mu}}=Ie.getLocalizedStrings(),gu=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:d,markAsReview:c,onReloadPage:p,setCurrentFooterFormId:h,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:r,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:x})=>{const{fetchStatus:C,reviewOperatingExpensesIds:w,uiState:f}=n,v=s.useRef(null),I=s.useRef(!1),y=qt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:xu(w)}),$=ke();s.useEffect(()=>()=>{h("expenseAutomationPage")},[h]),s.useEffect(()=>{I.current&&v?.current?.scrollLeft!=null&&f.scrollPosition?.scrollLeft!==v.current.scrollLeft&&f.scrollPosition!=null&&r({scrollPosition:{scrollTop:f.scrollPosition?.scrollTop,scrollLeft:v.current.scrollLeft}})},[f.scrollPosition?.scrollLeft,v.current?.scrollLeft,f.scrollPosition,r]),s.useEffect(()=>{h(w.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[w,h]);const O=b=>{m(b)},T=b=>{u(e,b)},D=(b,A)=>{r({sortOrder:b,sortKey:A}),d(),x(e,null,!1)},S=()=>{const b=Zs(n.sections,w);c(w,b===!0?"review":"unreview",e,!0)};if(C.fetchState==="Error")return t.jsxs(yu,{children:[t.jsx(Cu,{onClick:p,children:t.jsx(ko,{})}),t.jsx(wu,{children:mu.failed})]});{const b=L=>{r({collapsableStatus:L})},A=L=>{x(e,L,!0)};return t.jsx(Jt,{...y,children:t.jsx("form",{id:ka(pu),onSubmit:y.handleSubmit(S),style:{height:"100%",width:"100%"},children:t.jsx(fu,{windowSize:$,children:t.jsx(hu,{fluxView:n,handleRedirectToVendorDetailPage:O,onSortOrderChanged:D,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:b,fetchReimbursementView:A,updateSectionIdsForReview:l,fetchGeneralExpenseView:T,reportId:"flux_analysis_operating_expense"})})})})}},Zs=(e,n)=>{const d=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(p=>p.status==="Pending Review");let c;return d.forEach(p=>{n.includes(p.fluxAnalysisEntityId)&&(c=!0)}),c},xu=e=>({fluxAnalysisRowIds:e}),fu=a.div`
774
+ `,hu=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:p,onSortOrderChanged:h,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=ke(),u=bt(),[x,C]=s.useState(null),[w,f]=s.useState(null),[v,I]=s.useState(null),y=qo([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,O]=s.useState(!1),T=No(y),D=No(n.refreshStatus.fetchState),S=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},b=()=>Object.keys(n.uiState.collapsableStatus).reduce((F,Y)=>(F[Y]=n.uiState.collapsableStatus[Y],F),{}),A=s.useCallback(F=>{const Y=!(n.uiState.collapsableStatus[F]??!0);i({...n.uiState.collapsableStatus,[F]:Y})},[n.uiState.collapsableStatus,i]),L=s.useCallback((F,Y)=>{let N=n.reviewOperatingExpensesIds;const G=[];let V=n.selectedSectionIds;const Z=n.sections[F].vendors;G.push(...Z.map(le=>le.fluxAnalysisEntityId));let fe=zs-N.length;Y?(G.forEach(le=>{!N.includes(le)&&fe>0&&(N=[...N,le],fe--)}),V=[...V,F]):(N=N.filter(le=>!G.includes(le)),V=V.filter(le=>le!==F)),c(N),p(V)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,c,p]),H=s.useCallback(F=>{const Y=n.uiState.collapsableStatus[F]===!1;F==="generalExpense"&&!Y&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),A(F)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,A]),z=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,q=F=>F<z;return s.useEffect(()=>{const F={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:O,onSectionRowClick:H,updateNodeCollapsableStatus:A,updateOperatingExpensesIdsForReview:c,handleRedirectToVendorDetailPage:d,onSectionCheckboxClick:L,onSortOrderChanged:h}};if(x==null||!ms(w,n)){const Y=au(n,F,!0);f(n),C(Y)}else{const Y=lu(x,F,n,!0);C(Y)}},[n,w,d,L,H,h,A,c]),t.jsx(du,{windowSize:m,children:t.jsx(uu,{children:x?t.jsx(Bs,{backgroundColor:new Io(u.colors.grey4),rootNodes:x,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:bo.contentPaddingLeft.value(m),right:bo.contentPaddingRight.value(m)},nodeOpenStatus:b(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:q,itemCount:z,loadMoreItems:S},variableNodeHeightTree:{prevFetchState:T??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:$,setIsSortApplied:O,reducedFetchState:qo([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:D??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:v,setHoveredParentId:I}}):null})})},pu="expenseAutomationFluxPage",{reports:{common:mu}}=Ie.getLocalizedStrings(),gu=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:d,markAsReview:c,onReloadPage:p,setCurrentFooterFormId:h,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:r,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:x})=>{const{fetchStatus:C,reviewOperatingExpensesIds:w,uiState:f}=n,v=s.useRef(null),I=s.useRef(!1),y=qt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:xu(w)}),$=ke();s.useEffect(()=>()=>{h("expenseAutomationPage")},[h]),s.useEffect(()=>{I.current&&v?.current?.scrollLeft!=null&&f.scrollPosition?.scrollLeft!==v.current.scrollLeft&&f.scrollPosition!=null&&r({scrollPosition:{scrollTop:f.scrollPosition?.scrollTop,scrollLeft:v.current.scrollLeft}})},[f.scrollPosition?.scrollLeft,v.current?.scrollLeft,f.scrollPosition,r]),s.useEffect(()=>{h(w.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[w,h]);const O=b=>{m(b)},T=b=>{u(e,b)},D=(b,A)=>{r({sortOrder:b,sortKey:A}),d(),x(e,null,!1)},S=()=>{const b=Ys(n.sections,w);c(w,b===!0?"review":"unreview",e,!0)};if(C.fetchState==="Error")return t.jsxs(yu,{children:[t.jsx(Cu,{onClick:p,children:t.jsx(jo,{})}),t.jsx(wu,{children:mu.failed})]});{const b=L=>{r({collapsableStatus:L})},A=L=>{x(e,L,!0)};return t.jsx(Jt,{...y,children:t.jsx("form",{id:ka(pu),onSubmit:y.handleSubmit(S),style:{height:"100%",width:"100%"},children:t.jsx(fu,{windowSize:$,children:t.jsx(hu,{fluxView:n,handleRedirectToVendorDetailPage:O,onSortOrderChanged:D,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:b,fetchReimbursementView:A,updateSectionIdsForReview:l,fetchGeneralExpenseView:T,reportId:"flux_analysis_operating_expense"})})})})}},Ys=(e,n)=>{const d=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(p=>p.status==="Pending Review");let c;return d.forEach(p=>{n.includes(p.fluxAnalysisEntityId)&&(c=!0)}),c},xu=e=>({fluxAnalysisRowIds:e}),fu=a.div`
775
775
  display: flex;
776
776
  flex: 1 1 auto;
777
777
  min-height: 100%;
@@ -823,7 +823,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
823
823
  `,wu=a(vt)`
824
824
  margin-top: ${o.sp3};
825
825
  color: ${e=>e.theme.colors.hero};
826
- `,bu="expenseAutomationJEAccountSettingsPage",Xs="vendorsAccountSection",vu=e=>`${e}_form`;function Su({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:d,setIsJeAccountSettingsOpened:c,onJeAccountSettingsChange:p,setResetJeAccountSettingsForm:h,setCurrentFooterFormId:i}){const l=e.prepaidExpensesRecommendations,r=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Rt(e.prepaidExpensesAccountHierarchy,l,"Accounts"),[e.prepaidExpensesAccountHierarchy,l]),x=s.useMemo(()=>Rt(e.fixedAssetsAccountHierarchy,r,"Accounts"),[e.fixedAssetsAccountHierarchy,r]),C=s.useMemo(()=>Rt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),w=s.useMemo(()=>ku(e,u,x,C),[e,u,x,C]),f=qt({mode:"all",reValidateMode:"onBlur",defaultValues:w,values:w,resetOptions:{keepDefaultValues:!0}}),v=f.handleSubmit(y=>{d(y)}),I=async y=>{p(y)};return s.useEffect(()=>{const y=f.watch($=>{$!=null&&xn(()=>I($))});return()=>{y.unsubscribe()}}),s.useEffect(()=>(h(()=>f.reset),c(!0),()=>{i("expenseAutomationPage"),c(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:y,previousPrepaidExpensesAccount:$,selectedFixedAssetsAccountIds:O,previousFixedAssetsAccount:T,selectedAccruedExpensesAccountIds:D,previousAccruedExpensesAccount:S}=e.accountSettingsLocalData,b=Vn(y,$)||Vn(O,T)||Vn(D,S);b===!0&&n!="expenseAutomationJEAccountSettingsPage"?i("expenseAutomationJEAccountSettingsPage"):b===!1&&n!=="expenseAutomationPage"&&i("expenseAutomationPage")},[e,n,i]),t.jsx(ju,{children:t.jsx(Jt,{...f,children:t.jsx("form",{id:vu(bu),onSubmit:v,children:t.jsx(Mr,{showTitle:!1,sectionId:Xs,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const ju=a.div`
826
+ `,bu="expenseAutomationJEAccountSettingsPage",Zs="vendorsAccountSection",vu=e=>`${e}_form`;function Su({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:d,setIsJeAccountSettingsOpened:c,onJeAccountSettingsChange:p,setResetJeAccountSettingsForm:h,setCurrentFooterFormId:i}){const l=e.prepaidExpensesRecommendations,r=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Rt(e.prepaidExpensesAccountHierarchy,l,"Accounts"),[e.prepaidExpensesAccountHierarchy,l]),x=s.useMemo(()=>Rt(e.fixedAssetsAccountHierarchy,r,"Accounts"),[e.fixedAssetsAccountHierarchy,r]),C=s.useMemo(()=>Rt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),w=s.useMemo(()=>ku(e,u,x,C),[e,u,x,C]),f=qt({mode:"all",reValidateMode:"onBlur",defaultValues:w,values:w,resetOptions:{keepDefaultValues:!0}}),v=f.handleSubmit(y=>{d(y)}),I=async y=>{p(y)};return s.useEffect(()=>{const y=f.watch($=>{$!=null&&xn(()=>I($))});return()=>{y.unsubscribe()}}),s.useEffect(()=>(h(()=>f.reset),c(!0),()=>{i("expenseAutomationPage"),c(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:y,previousPrepaidExpensesAccount:$,selectedFixedAssetsAccountIds:O,previousFixedAssetsAccount:T,selectedAccruedExpensesAccountIds:D,previousAccruedExpensesAccount:S}=e.accountSettingsLocalData,b=Nn(y,$)||Nn(O,T)||Nn(D,S);b===!0&&n!="expenseAutomationJEAccountSettingsPage"?i("expenseAutomationJEAccountSettingsPage"):b===!1&&n!=="expenseAutomationPage"&&i("expenseAutomationPage")},[e,n,i]),t.jsx(ju,{children:t.jsx(Jt,{...f,children:t.jsx("form",{id:vu(bu),onSubmit:v,children:t.jsx(zr,{showTitle:!1,sectionId:Zs,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const ju=a.div`
827
827
  padding-top: ${o.sp3};
828
828
  display: flex;
829
829
  align-items: center;
@@ -831,38 +831,38 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
831
831
  flex-direction: column;
832
832
  width: 100%;
833
833
  background-color: ${e=>e.theme.colors.grey4};
834
- `,ku=(e,n,d,c)=>{const p=e.prepaidExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(u.accountId)),h=e.fixedAssetsAccountList.filter(u=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(u.accountId)),i=e.accruedExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(u.accountId)),l=p.map(u=>u.qboId).filter(u=>u!=null),r=h.map(u=>u.qboId).filter(u=>u!=null),m=i.map(u=>u.qboId).filter(u=>u!=null);return{[Xs]:{prepaidExpensesAccount:{selectedOptions:l,allOptions:n},fixedAssetsAccount:{selectedOptions:r,allOptions:d},accruedExpensesAccount:{selectedOptions:m,allOptions:c}}}},{expenseAutomation:{jeSchedules:$t},common:{currency:$n,review:Iu,ignore:$u,strings:{hyphen:xt},texts:Ln},dateFormat:Lu,timeframe:{month:gi}}=Ie.getLocalizedStrings(),Tu=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:d,jeScheduleClickHandler:c,onReviewClickHandler:p})=>t.jsxs(zo,{onClick:h=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&c(h,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(_o,{children:[t.jsxs(Bo,{children:[t.jsxs(Oo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Ln.vendor}),t.jsxs(ae,{style:{gap:g[2]},children:[e.vendor.logo!=null?t.jsx(ws,{photoUrl:e.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(hn,{name:e.vendor.name}),t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(We,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:e.vendor.name??xt})})]})]}),t.jsxs(Q,{children:[t.jsx(se,{children:$t.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(We,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:e.baseTransaction.account.accountName??xt})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:$t.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:e.startDate?.format(Lu.visual.MMMCommaYYYYFormat)??xt})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:$t.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?gi.slice(0,-1):gi}`:xt})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:Ln.totalAmount}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(We,{children:Ue("0,0.[00]",Vt(e.baseTransaction.amount.amount,$n.currencyCode,$n.currencySymbol))??xt}),children:t.jsx(ue,{className:"highlight",children:Ue("0,0.[00]",Vt(e.baseTransaction.amount.amount,$n.currencyCode,$n.currencySymbol))??xt})})})]})]}),t.jsxs(Mo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Ln.category}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(We,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:e.jeDebit.account?.accountName??xt})})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:Ln.classText}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(We,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:e.jeDebit.accountingClass?.className??xt})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:$t.scheduleHeaders.type}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",style:{width:"unset"},children:t.jsx(Hs,{children:$t.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:$t.scheduleHeaders.accumulatedCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(We,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:e.jeCredit.account?.accountName??xt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]})]}),t.jsxs(Fo,{children:[t.jsx(pn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&p(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component-review-button",e.jeScheduleId),label:Iu,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:wo}}),t.jsx(pn,{"data-testid":B("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:$u,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&d(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:wo}})]})]}),t.jsxs(Xc,{children:[t.jsx(Au,{}),t.jsx(Eu,{children:$t.aiAccountant}),t.jsx(Ru,{children:$t.zeniGPTText})]})]}),Au=a(gn)`
834
+ `,ku=(e,n,d,c)=>{const p=e.prepaidExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(u.accountId)),h=e.fixedAssetsAccountList.filter(u=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(u.accountId)),i=e.accruedExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(u.accountId)),l=p.map(u=>u.qboId).filter(u=>u!=null),r=h.map(u=>u.qboId).filter(u=>u!=null),m=i.map(u=>u.qboId).filter(u=>u!=null);return{[Zs]:{prepaidExpensesAccount:{selectedOptions:l,allOptions:n},fixedAssetsAccount:{selectedOptions:r,allOptions:d},accruedExpensesAccount:{selectedOptions:m,allOptions:c}}}},{expenseAutomation:{jeSchedules:$t},common:{currency:$n,review:Iu,ignore:$u,strings:{hyphen:xt},texts:Ln},dateFormat:Lu,timeframe:{month:mi}}=Ie.getLocalizedStrings(),Tu=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:d,jeScheduleClickHandler:c,onReviewClickHandler:p})=>t.jsxs(Bo,{onClick:h=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&c(h,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":M("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(zo,{children:[t.jsxs(_o,{children:[t.jsxs(Do,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Ln.vendor}),t.jsxs(ae,{style:{gap:g[2]},children:[e.vendor.logo!=null?t.jsx(Cs,{photoUrl:e.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(hn,{name:e.vendor.name}),t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(We,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:e.vendor.name??xt})})]})]}),t.jsxs(Q,{children:[t.jsx(se,{children:$t.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(We,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:e.baseTransaction.account.accountName??xt})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:$t.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:e.startDate?.format(Lu.visual.MMMCommaYYYYFormat)??xt})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:$t.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?mi.slice(0,-1):mi}`:xt})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:Ln.totalAmount}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(We,{children:Ue("0,0.[00]",Vt(e.baseTransaction.amount.amount,$n.currencyCode,$n.currencySymbol))??xt}),children:t.jsx(de,{className:"highlight",children:Ue("0,0.[00]",Vt(e.baseTransaction.amount.amount,$n.currencyCode,$n.currencySymbol))??xt})})})]})]}),t.jsxs(Oo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Ln.category}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(We,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:e.jeDebit.account?.accountName??xt})})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:Ln.classText}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(We,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:e.jeDebit.accountingClass?.className??xt})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:$t.scheduleHeaders.type}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",style:{width:"unset"},children:t.jsx(Vs,{children:$t.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:$t.scheduleHeaders.accumulatedCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(We,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:e.jeCredit.account?.accountName??xt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]})]}),t.jsxs(Fo,{children:[t.jsx(pn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&p(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":M("je-schedule-draft-component-review-button",e.jeScheduleId),label:Iu,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Co}}),t.jsx(pn,{"data-testid":M("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:$u,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&d(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Co}})]})]}),t.jsxs(Xc,{children:[t.jsx(Au,{}),t.jsx(Eu,{children:$t.aiAccountant}),t.jsx(Ru,{children:$t.zeniGPTText})]})]}),Au=a(gn)`
835
835
  height: ${o.sp3};
836
836
  width: ${o.sp3};
837
837
  margin-right: ${o.sp1};
838
838
  path {
839
839
  stroke-width: 2;
840
840
  }
841
- `,Eu=a(xs)`
841
+ `,Eu=a(gs)`
842
842
  color: ${e=>e.theme.colors.brandColorSapphire};
843
- `,Ru=a(_e)`
843
+ `,Ru=a(Be)`
844
844
  color: ${e=>e.theme.colors.primary};
845
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:xi}}},expenseAutomation:{jeSchedules:Fe},common:{currency:lt,retry:Du,strings:{hyphen:He,empty:fi},texts:Xt},dateFormat:yi}=Ie.getLocalizedStrings(),{common:Ou,timeframe:{month:Ci}}=Ie.getLocalizedStrings(),tt="jeSchedulePage",wi=e=>`${e}_form`,Po=(e,n)=>`${e}.${n}`,bi=Po(tt,"vendor"),vi=Po(tt,"scheduleExpenseCategory"),Si=Po(tt,"accumulatedDepreciationCategory"),Mu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:p,allDepAccountList:h,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:C,onFormDataChange:w,onPostJESchedule:f})=>{const{updatedAccumulatedDepreciationCategoryID:v,updatedCategoryId:I,updatedVendor:y}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},O=s.useRef(),T=qt({mode:"all",reValidateMode:"onChange",defaultValues:ji(l,e,d,p,n,c,h,x.entityAutoCompleteView),values:ji(l,e,d,p,n,c,h,x.entityAutoCompleteView)}),D={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},S={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},b=(i?.scheduledJournalEntry.error??[]).every(j=>{const R=$[j];return!(l!=null&&R&&(R==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||R==="updatedCategoryId"&&l.updatedCategoryId==null||R==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(j,R)=>{if(j!=null){const W=R[tt],{scheduledJournalEntryID:ie,vendor:E}=W;if(j.includes("vendor")){const J=E?.defaultOptions.map(K=>K.value);if(E?.selectedOption!=null&&J?.includes(E.selectedOption)!==!0){const K=x.entityAutoCompleteView.vendor.find(oe=>oe.id===E.selectedOption);K!=null&&T.setValue(`${tt}.vendor.defaultOptions`,[{label:K.name??Ou.strings.empty,value:K.id}])}else E?.selectedOption==null&&E?.defaultOptions.length!==0&&T.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}w(ie,{...W,vendor:E})}};s.useEffect(()=>{const j=T.watch((R,{name:W})=>{W!=null&&R!=null&&xn(()=>A(W,R))});return()=>{j.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&O.current?.(bs(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const L=T.handleSubmit(()=>{f(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),H=j=>n.filter(R=>R.qboId===j)[0]?.qboId,M=j=>h.filter(R=>R.qboId===j)[0]?.qboId,q=j=>[m.expense?.qboId,m.income?.qboId].includes(j),z=T.watch("jeSchedulePage.vendor"),Y=(j,R)=>{u.onAutoCompleteInputChange?.(j,"vendor"),O.current=R},N=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,G=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,V=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,Z=i.vendor.name.split("(deleted)")[0]?.toString(),fe=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??fi,ce=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??fi,[te,ne]=s.useState(G===!0&&I==null),[P,_]=s.useState(V===!0&&v==null),[U,F]=s.useState(N&&(y?.id==null||y?.id==""));return s.useEffect(()=>{te===!1&&l.updatedCategoryId==null&&T.setFocus(vi),P===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&T.setFocus(Si),U===!1&&l.updatedVendor?.id==null&&T.setFocus(bi)},[te,P,U,l,T]),t.jsx(Jt,{...T,children:t.jsx("form",{style:{width:"100%"},id:wi(`${tt}_${i.jeScheduleId}`),onSubmit:L,children:t.jsx(zo,{showBorder:b,onClick:j=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&C(j,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":B("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(_o,{children:[t.jsxs(Bo,{children:[t.jsxs(Oo,{children:[N===!0?t.jsx(Q,{style:{width:pe.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:N,forceHoverEffect:U===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Xt.vendor,t.jsx(ye,{display:"flex",placement:"top-start",title:t.jsx(Rn,{children:Fe.tooltipText.missingVendor.replace("_deleted_vendor_",Z)}),children:t.jsx(Zn,{})})]}),t.jsx(ae,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:U===!0?t.jsxs(ue,{onClick:j=>{j.stopPropagation(),F(!1)},"data-testid":B("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Xe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Yn,{}),xi]}):t.jsx(yo,{name:bi,placeholder:xi,valueToId:j=>j,defaultValue:{selectedOption:z?.selectedOption,defaultOptions:z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:Y})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Xt.vendor}),t.jsx(ae,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(ws,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(hn,{name:i.vendor.name}),t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(We,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.vendor.name??He})})]})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:Fe.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(We,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.baseTransaction.account.accountName??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:Fe.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:i.startDate?.format(yi.visual.MMMCommaYYYYFormat)??He})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:Fe.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?Ci.slice(0,-1):Ci}`:He})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:Xt.totalAmount}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",title:t.jsx(We,{children:Ue("0,0.[00]",Vt(i.baseTransaction.amount.amount,lt.currencyCode,lt.currencySymbol))??He}),children:t.jsx(ue,{className:"highlight",children:Ue("0,0.[00]",Vt(i.baseTransaction.amount.amount,lt.currencyCode,lt.currencySymbol))??He})})})]})]}),t.jsxs(Mo,{children:[G===!0?t.jsx(Q,{showHoverEffect:G===!0,forceHoverEffect:l?.updatedCategoryId==null&&te===!1,style:{padding:"unset",justifyContent:"center",width:pe.COLUMN_ONE},children:t.jsxs(ct,{className:"hover-background",children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Xt.category,G===!0?t.jsx(ye,{display:"flex",placement:"top-start",title:t.jsx(Rn,{children:Fe.tooltipText.missingCategory.replace("_deleted_category_",fe)}),children:t.jsx(Zn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:G===!0?-2:0},children:G===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(ue,{onClick:j=>{j.stopPropagation(),ne(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Yn,{}),Fe.addCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,name:vi,placeholder:Fe.addCategory,valueToId:j=>H(j),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:j=>!!j.selectedOption},disableCurrentOption:q,customStyleConfig:D})}):t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(We,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.jeDebit.account?.accountName??He})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Xt.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(We,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.jeDebit.account?.accountName??He})})})]}),t.jsxs(Q,{children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Xt.classText}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(We,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.jeDebit.accountingClass?.className??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:Fe.scheduleHeaders.type}),t.jsx(ae,{className:"test",children:t.jsx(ue,{className:"highlight",style:{width:"unset"},children:t.jsx(Hs,{children:Fe.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:V===!0?t.jsx(Q,{style:{width:pe.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:V,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&P===!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Fe.scheduleHeaders.accumulatedCategory,V===!0?t.jsx(ye,{display:"flex",placement:"top-end",title:t.jsx(Rn,{children:Fe.tooltipText.missingDepCategory.replace("_deleted_dep_category_",ce)}),children:t.jsx(Zn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:V===!0?-2:0},children:V===!0?t.jsx(t.Fragment,{children:P===!0?t.jsxs(ue,{onClick:j=>{j.stopPropagation(),_(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Yn,{}),Fe.addDepCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Si,placeholder:Fe.addDepCategory,valueToId:j=>M(j),defaultValue:{allOptions:p},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:S,disableCurrentOption:q})}):t.jsx(ye,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(We,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.jeCredit.account?.accountName??He})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Fe.scheduleHeaders.accumulatedCategory}),t.jsx(ye,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(We,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(ue,{className:"highlight",children:i.jeCredit.account?.accountName??He})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]}),t.jsxs(Yc,{children:[t.jsx(Q,{style:{padding:"unset",width:pe.COLUMN_ONE},children:t.jsxs(Zc,{children:[t.jsx(se,{children:Fe.scheduleHeaders.jePostingDate}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(yi.visual.MMMDCommaYYFormat)??He})})]})}),t.jsxs(Q,{children:[t.jsx(se,{children:Fe.scheduleHeaders.balance}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(We,{children:Ue("0,0.[00]",Vt(i?.scheduledJournalEntry?.runningBalance?.amount??0,lt.currencyCode,lt.currencySymbol))??He}),children:t.jsx(ue,{className:"highlight",children:Ue("0,0.[00]",Vt(i?.scheduledJournalEntry?.runningBalance?.amount??0,lt.currencyCode,lt.currencySymbol))??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:Fe.scheduleHeaders.months}),t.jsx(ae,{children:t.jsxs(ue,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:Fe.scheduleHeaders.amountForMonth}),t.jsx(ae,{children:t.jsx(ue,{className:"highlight",children:Ue("0,0.[00]",Vt(i.scheduledJournalEntry.amount?.amount??0,lt.currencyCode,lt.currencySymbol))??He})})]})]})]}),t.jsx(Fo,{children:t.jsx(pn,{form:wi(`${tt}_${i.jeScheduleId}`),label:Du,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:wo}})})]})})})})},ji=(e,n,d,c,p,h,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,C=e.updatedClassId,w=r!=null?p.find(I=>I.accountId===r):void 0,f=x!=null?i.find(I=>I.accountId===x):void 0,v=C!=null?h.find(I=>I.classId===C):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:w?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:f?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:Is(l,u??m)},scheduleClass:{selectedOption:v?.classId,allOptions:d}}}},Yn=a(Pn)`
845
+ `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:gi}}},expenseAutomation:{jeSchedules:_e},common:{currency:lt,retry:Du,strings:{hyphen:He,empty:xi},texts:Xt},dateFormat:fi}=Ie.getLocalizedStrings(),{common:Ou,timeframe:{month:yi}}=Ie.getLocalizedStrings(),tt="jeSchedulePage",Ci=e=>`${e}_form`,Mo=(e,n)=>`${e}.${n}`,wi=Mo(tt,"vendor"),bi=Mo(tt,"scheduleExpenseCategory"),vi=Mo(tt,"accumulatedDepreciationCategory"),zu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:p,allDepAccountList:h,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:C,onFormDataChange:w,onPostJESchedule:f})=>{const{updatedAccumulatedDepreciationCategoryID:v,updatedCategoryId:I,updatedVendor:y}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},O=s.useRef(),T=qt({mode:"all",reValidateMode:"onChange",defaultValues:Si(l,e,d,p,n,c,h,x.entityAutoCompleteView),values:Si(l,e,d,p,n,c,h,x.entityAutoCompleteView)}),D={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},S={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},b=(i?.scheduledJournalEntry.error??[]).every(j=>{const R=$[j];return!(l!=null&&R&&(R==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||R==="updatedCategoryId"&&l.updatedCategoryId==null||R==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(j,R)=>{if(j!=null){const W=R[tt],{scheduledJournalEntryID:ie,vendor:E}=W;if(j.includes("vendor")){const J=E?.defaultOptions.map(K=>K.value);if(E?.selectedOption!=null&&J?.includes(E.selectedOption)!==!0){const K=x.entityAutoCompleteView.vendor.find(oe=>oe.id===E.selectedOption);K!=null&&T.setValue(`${tt}.vendor.defaultOptions`,[{label:K.name??Ou.strings.empty,value:K.id}])}else E?.selectedOption==null&&E?.defaultOptions.length!==0&&T.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}w(ie,{...W,vendor:E})}};s.useEffect(()=>{const j=T.watch((R,{name:W})=>{W!=null&&R!=null&&xn(()=>A(W,R))});return()=>{j.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&O.current?.(ws(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const L=T.handleSubmit(()=>{f(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),H=j=>n.filter(R=>R.qboId===j)[0]?.qboId,z=j=>h.filter(R=>R.qboId===j)[0]?.qboId,q=j=>[m.expense?.qboId,m.income?.qboId].includes(j),F=T.watch("jeSchedulePage.vendor"),Y=(j,R)=>{u.onAutoCompleteInputChange?.(j,"vendor"),O.current=R},N=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,G=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,V=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,Z=i.vendor.name.split("(deleted)")[0]?.toString(),fe=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??xi,le=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??xi,[te,ne]=s.useState(G===!0&&I==null),[P,B]=s.useState(V===!0&&v==null),[U,_]=s.useState(N&&(y?.id==null||y?.id==""));return s.useEffect(()=>{te===!1&&l.updatedCategoryId==null&&T.setFocus(bi),P===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&T.setFocus(vi),U===!1&&l.updatedVendor?.id==null&&T.setFocus(wi)},[te,P,U,l,T]),t.jsx(Jt,{...T,children:t.jsx("form",{style:{width:"100%"},id:Ci(`${tt}_${i.jeScheduleId}`),onSubmit:L,children:t.jsx(Bo,{showBorder:b,onClick:j=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&C(j,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":M("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(zo,{children:[t.jsxs(_o,{children:[t.jsxs(Do,{children:[N===!0?t.jsx(Q,{style:{width:pe.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:N,forceHoverEffect:U===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ct,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Xt.vendor,t.jsx(ye,{display:"flex",placement:"top-start",title:t.jsx(Rn,{children:_e.tooltipText.missingVendor.replace("_deleted_vendor_",Z)}),children:t.jsx(Yn,{})})]}),t.jsx(ae,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:U===!0?t.jsxs(de,{onClick:j=>{j.stopPropagation(),_(!1)},"data-testid":M("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Xe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Gn,{}),gi]}):t.jsx(fo,{name:wi,placeholder:gi,valueToId:j=>j,defaultValue:{selectedOption:F?.selectedOption,defaultOptions:F?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:j=>!!j.selectedOption},loadOptions:Y})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:Xt.vendor}),t.jsx(ae,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(Cs,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(hn,{name:i.vendor.name}),t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(We,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.vendor.name??He})})]})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:_e.scheduleHeaders.scheduleCategory}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(We,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.baseTransaction.account.accountName??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:_e.scheduleHeaders.startMonth}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:i.startDate?.format(fi.visual.MMMCommaYYYYFormat)??He})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:_e.scheduleHeaders.period}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?yi.slice(0,-1):yi}`:He})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:Xt.totalAmount}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",title:t.jsx(We,{children:Ue("0,0.[00]",Vt(i.baseTransaction.amount.amount,lt.currencyCode,lt.currencySymbol))??He}),children:t.jsx(de,{className:"highlight",children:Ue("0,0.[00]",Vt(i.baseTransaction.amount.amount,lt.currencyCode,lt.currencySymbol))??He})})})]})]}),t.jsxs(Oo,{children:[G===!0?t.jsx(Q,{showHoverEffect:G===!0,forceHoverEffect:l?.updatedCategoryId==null&&te===!1,style:{padding:"unset",justifyContent:"center",width:pe.COLUMN_ONE},children:t.jsxs(ct,{className:"hover-background",children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[Xt.category,G===!0?t.jsx(ye,{display:"flex",placement:"top-start",title:t.jsx(Rn,{children:_e.tooltipText.missingCategory.replace("_deleted_category_",fe)}),children:t.jsx(Yn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:G===!0?-2:0},children:G===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(de,{onClick:j=>{j.stopPropagation(),ne(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":M("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Gn,{}),_e.addCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,name:bi,placeholder:_e.addCategory,valueToId:j=>H(j),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:j=>!!j.selectedOption},disableCurrentOption:q,customStyleConfig:D})}):t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(We,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??He})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Xt.category}),t.jsx(ae,{className:"item-value-container",children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(We,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??He})})})]}),t.jsxs(Q,{children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:Xt.classText}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(We,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.accountingClass?.className??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:_e.scheduleHeaders.type}),t.jsx(ae,{className:"test",children:t.jsx(de,{className:"highlight",style:{width:"unset"},children:t.jsx(Vs,{children:_e.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:V===!0?t.jsx(Q,{style:{width:pe.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:V,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&P===!1,children:t.jsxs(ct,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[_e.scheduleHeaders.accumulatedCategory,V===!0?t.jsx(ye,{display:"flex",placement:"top-end",title:t.jsx(Rn,{children:_e.tooltipText.missingDepCategory.replace("_deleted_dep_category_",le)}),children:t.jsx(Yn,{})}):null]}),t.jsx(ae,{className:"item-value-container",style:{marginLeft:V===!0?-2:0},children:V===!0?t.jsx(t.Fragment,{children:P===!0?t.jsxs(de,{onClick:j=>{j.stopPropagation(),B(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Xe.brandColorGoldDark,cursor:"pointer"},"data-testid":M("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Gn,{}),_e.addDepCategory]}):t.jsx(tn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:vi,placeholder:_e.addDepCategory,valueToId:j=>z(j),defaultValue:{allOptions:p},registerOptions:{required:!0,validate:j=>!!j.selectedOption},customStyleConfig:S,disableCurrentOption:q})}):t.jsx(ye,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(We,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??He})})})]})}):t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(se,{style:{display:"flex",alignItems:"center",gap:g[1]},children:_e.scheduleHeaders.accumulatedCategory}),t.jsx(ye,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(We,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??He})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]}),t.jsxs(Yc,{children:[t.jsx(Q,{style:{padding:"unset",width:pe.COLUMN_ONE},children:t.jsxs(Zc,{children:[t.jsx(se,{children:_e.scheduleHeaders.jePostingDate}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(fi.visual.MMMDCommaYYFormat)??He})})]})}),t.jsxs(Q,{children:[t.jsx(se,{children:_e.scheduleHeaders.balance}),t.jsx(ae,{children:t.jsx(ye,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(We,{children:Ue("0,0.[00]",Vt(i?.scheduledJournalEntry?.runningBalance?.amount??0,lt.currencyCode,lt.currencySymbol))??He}),children:t.jsx(de,{className:"highlight",children:Ue("0,0.[00]",Vt(i?.scheduledJournalEntry?.runningBalance?.amount??0,lt.currencyCode,lt.currencySymbol))??He})})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:_e.scheduleHeaders.months}),t.jsx(ae,{children:t.jsxs(de,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Q,{style:{width:pe.COLUMN_FOUR}}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:_e.scheduleHeaders.amountForMonth}),t.jsx(ae,{children:t.jsx(de,{className:"highlight",children:Ue("0,0.[00]",Vt(i.scheduledJournalEntry.amount?.amount??0,lt.currencyCode,lt.currencySymbol))??He})})]})]})]}),t.jsx(Fo,{children:t.jsx(pn,{form:Ci(`${tt}_${i.jeScheduleId}`),label:Du,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:Co}})})]})})})})},Si=(e,n,d,c,p,h,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,C=e.updatedClassId,w=r!=null?p.find(I=>I.accountId===r):void 0,f=x!=null?i.find(I=>I.accountId===x):void 0,v=C!=null?h.find(I=>I.classId===C):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:w?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:f?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:ks(l,u??m)},scheduleClass:{selectedOption:v?.classId,allOptions:d}}}},Gn=a(Pn)`
846
846
  width: ${o.sp3};
847
847
  height: ${o.sp3};
848
- `,Zn=a($s)`
848
+ `,Yn=a(Is)`
849
849
  width: 12px;
850
850
  height: 12px;
851
851
  color: ${Xe.important};
852
- `;function Qs(){return t.jsx(Bs,{children:t.jsxs(Ps,{children:[t.jsxs(Ns,{children:[t.jsx(Oe,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ki,{})]}),t.jsxs(Vs,{children:[t.jsx(Oe,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ki,{})]})]})})}const ki=()=>t.jsx(zo,{style:{minWidth:1088},children:t.jsxs(_o,{children:[t.jsxs(Bo,{children:[t.jsxs(Oo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:t.jsx(Oe,{width:g[10],height:14})}),t.jsxs(ae,{style:{gap:g[2]},children:[t.jsx(To,{height:g[4],width:g[4]}),t.jsx(Oe,{height:g[4],width:g[10]})]})]}),t.jsxs(Q,{children:[t.jsx(se,{children:t.jsx(Oe,{width:101,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:203})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:t.jsx(Oe,{width:g[9],height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:71})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:t.jsx(Oe,{width:107,height:14})}),t.jsx(Oe,{height:g[4],width:68})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:t.jsx(Oe,{width:73,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:49})})]})]}),t.jsxs(Mo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:t.jsx(Oe,{width:49,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:158})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:t.jsx(Oe,{width:36,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:88})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:t.jsx(Oe,{width:36,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:100})})]}),t.jsx(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]}}),t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]})]}),t.jsxs(Fo,{children:[t.jsx(Oe,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(Oe,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),Oe=a(Dt)`
852
+ `;function Xs(){return t.jsx(_s,{children:t.jsxs(Ms,{children:[t.jsxs(Ps,{children:[t.jsx(Oe,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ji,{})]}),t.jsxs(Ns,{children:[t.jsx(Oe,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ji,{})]})]})})}const ji=()=>t.jsx(Bo,{style:{minWidth:1088},children:t.jsxs(zo,{children:[t.jsxs(_o,{children:[t.jsxs(Do,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:t.jsx(Oe,{width:g[10],height:14})}),t.jsxs(ae,{style:{gap:g[2]},children:[t.jsx(Lo,{height:g[4],width:g[4]}),t.jsx(Oe,{height:g[4],width:g[10]})]})]}),t.jsxs(Q,{children:[t.jsx(se,{children:t.jsx(Oe,{width:101,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:203})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:t.jsx(Oe,{width:g[9],height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:71})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(se,{children:t.jsx(Oe,{width:107,height:14})}),t.jsx(Oe,{height:g[4],width:68})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:pe.COLUMN_FIVE},children:[t.jsx(se,{children:t.jsx(Oe,{width:73,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:49})})]})]}),t.jsxs(Oo,{children:[t.jsxs(Q,{style:{width:pe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(se,{children:t.jsx(Oe,{width:49,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:158})})]}),t.jsxs(Q,{children:[t.jsx(se,{children:t.jsx(Oe,{width:36,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:88})})]}),t.jsxs(Q,{style:{width:pe.COLUMN_THREE},children:[t.jsx(se,{children:t.jsx(Oe,{width:36,height:14})}),t.jsx(ae,{children:t.jsx(Oe,{height:g[4],width:100})})]}),t.jsx(Q,{style:{width:pe.COLUMN_FOUR,paddingLeft:g[3]}}),t.jsx(Q,{style:{width:pe.COLUMN_FIVE}})]})]}),t.jsxs(Fo,{children:[t.jsx(Oe,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(Oe,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),Oe=a(Dt)`
853
853
  border-radius: ${o.sp1};
854
- `,{common:{create:_u,resolve:zu}}=Ie.getLocalizedStrings();function Fu({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:d,onJESchedulesFormDataChange:c,onPostJESchedule:p,ignoreRecommendedJeSchedule:h,vendorSearchAutoCompleteActions:i,setCurrentFooterFormId:l}){const r=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,x=e.ignoreStatusById,C=e.resolveSchedules,w=e.uncategorizedAccounts,{allAccountList:f,allClassList:v,allDepreciationAccountList:I}=e,y=Rt(e.accountListNestedAccountHierarchy),$=Rt(e.allDepreciationAccountListNestedAccountHierarchy),O=En(e.classListNestedAccountHierarchy),T=(S,b,A)=>{d(S,b,A)},D=(S,b,A,L)=>{let H=S.target;for(;H;){if(H.classList.contains("item-value-container")||H.classList.contains("hover-background")||H.classList.contains("auto-complete-single-select-field__input")||H.classList.contains("auto-complete-single-select-field__option")||H.classList.contains("grouped-single-select-field__input")||H.classList.contains("grouped-single-select-field__menu"))return;H=H.parentElement}d(b,A,L)};return s.useEffect(()=>{if(C.length!==0){for(const S in m)if(Object.prototype.hasOwnProperty.call(m,S)){const{updatedAccumulatedDepreciationCategoryID:b,updatedCategoryId:A,updatedVendor:L}=m[S];if(b!=null||A!=null||L!=null&&L?.id!==""){l("expenseAutomationJESchedulePage");break}else l("expenseAutomationPage")}}else C.length===0&&l("expenseAutomationPage")}),s.useEffect(()=>()=>{l("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Qs,{}):r.length!==0||C.length!==0?t.jsx(Bs,{children:t.jsxs(Ps,{children:[r.length>0?t.jsxs(Ns,{children:[t.jsxs($i,{children:[_u,t.jsx(Li,{isCircular:r.length<10,children:t.jsx(Ti,{children:r.length})})]}),t.jsx(Ii,{"data-testid":B("expense-automation","draft-je-schedules"),children:r.map((S,b)=>t.jsx(Tu,{ignoreStatus:x[S.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:h,onReviewClickHandler:T,jeScheduleClickHandler:D,draft:S},`${b}_${S.jeScheduleId}`))})]}):null,C.length>0?t.jsxs(Vs,{children:[t.jsxs($i,{children:[zu,t.jsx(Li,{isCircular:C.length<10,children:t.jsx(Ti,{children:C.length})})]}),t.jsx(Ii,{"data-testid":B("expense-automation","resolve-je-schedules"),children:C.map((S,b)=>m[S.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(Mu,{vendorSearchAutoCompleteActions:i,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:D,onPostJESchedule:p,uncategorizedAccounts:w,allAccountList:f,allAccountGroupedOptions:y,allClassGroupedOptions:O,allClassList:v,allDepAccountGroupedOptions:$,allDepAccountList:I,draft:S,postStatus:u[S.scheduledJournalEntry.scheduledJournalEntryID],localData:m[S.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:c},`${b}_${S.jeScheduleTransactionKey}`))})]}):null]})}):null}const Ii=a.div`
854
+ `,{common:{create:Bu,resolve:Fu}}=Ie.getLocalizedStrings();function _u({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:d,onJESchedulesFormDataChange:c,onPostJESchedule:p,ignoreRecommendedJeSchedule:h,vendorSearchAutoCompleteActions:i,setCurrentFooterFormId:l}){const r=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,x=e.ignoreStatusById,C=e.resolveSchedules,w=e.uncategorizedAccounts,{allAccountList:f,allClassList:v,allDepreciationAccountList:I}=e,y=Rt(e.accountListNestedAccountHierarchy),$=Rt(e.allDepreciationAccountListNestedAccountHierarchy),O=En(e.classListNestedAccountHierarchy),T=(S,b,A)=>{d(S,b,A)},D=(S,b,A,L)=>{let H=S.target;for(;H;){if(H.classList.contains("item-value-container")||H.classList.contains("hover-background")||H.classList.contains("auto-complete-single-select-field__input")||H.classList.contains("auto-complete-single-select-field__option")||H.classList.contains("grouped-single-select-field__input")||H.classList.contains("grouped-single-select-field__menu"))return;H=H.parentElement}d(b,A,L)};return s.useEffect(()=>{if(C.length!==0){for(const S in m)if(Object.prototype.hasOwnProperty.call(m,S)){const{updatedAccumulatedDepreciationCategoryID:b,updatedCategoryId:A,updatedVendor:L}=m[S];if(b!=null||A!=null||L!=null&&L?.id!==""){l("expenseAutomationJESchedulePage");break}else l("expenseAutomationPage")}}else C.length===0&&l("expenseAutomationPage")}),s.useEffect(()=>()=>{l("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Xs,{}):r.length!==0||C.length!==0?t.jsx(_s,{children:t.jsxs(Ms,{children:[r.length>0?t.jsxs(Ps,{children:[t.jsxs(Ii,{children:[Bu,t.jsx($i,{isCircular:r.length<10,children:t.jsx(Li,{children:r.length})})]}),t.jsx(ki,{"data-testid":M("expense-automation","draft-je-schedules"),children:r.map((S,b)=>t.jsx(Tu,{ignoreStatus:x[S.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:h,onReviewClickHandler:T,jeScheduleClickHandler:D,draft:S},`${b}_${S.jeScheduleId}`))})]}):null,C.length>0?t.jsxs(Ns,{children:[t.jsxs(Ii,{children:[Fu,t.jsx($i,{isCircular:C.length<10,children:t.jsx(Li,{children:C.length})})]}),t.jsx(ki,{"data-testid":M("expense-automation","resolve-je-schedules"),children:C.map((S,b)=>m[S.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(zu,{vendorSearchAutoCompleteActions:i,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:D,onPostJESchedule:p,uncategorizedAccounts:w,allAccountList:f,allAccountGroupedOptions:y,allClassGroupedOptions:O,allClassList:v,allDepAccountGroupedOptions:$,allDepAccountList:I,draft:S,postStatus:u[S.scheduledJournalEntry.scheduledJournalEntryID],localData:m[S.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:c},`${b}_${S.jeScheduleTransactionKey}`))})]}):null]})}):null}const ki=a.div`
855
855
  display: flex;
856
856
  flex-direction: column;
857
857
  gap: ${o.sp4};
858
858
  min-width: 1088px;
859
- `,$i=a(is)`
859
+ `,Ii=a(os)`
860
860
  color: ${e=>e.theme.colors.primary};
861
861
  padding: ${o.sp2} ${o.sp0};
862
862
  display: flex;
863
863
  align-items: center;
864
864
  gap: ${o.sp1};
865
- `,Li=a.div`
865
+ `,$i=a.div`
866
866
  border-radius: ${o.sp12};
867
867
  display: flex;
868
868
  justify-content: center;
@@ -876,7 +876,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
876
876
  height: 18px;
877
877
  padding: ${sr.padding};
878
878
  `}
879
- `,Ti=a(ar)`
879
+ `,Li=a(ar)`
880
880
  color: ${e=>e.theme.colors.hero};
881
881
  height: 100%;
882
882
  width: 100%;
@@ -884,10 +884,10 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
884
884
  align-items: center;
885
885
  justify-content: center;
886
886
  color: inherit;
887
- `;function Bu({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:d,vendorSearchAutoCompleteData:c,onJESchedulesFormDataChange:p,onPostJESchedule:h,handleJeScheduleClick:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:x,setIsJeAccountSettingsOpened:C}){const{jeSchedules:w}=e;return w.fetchState==="In-Progress"||w.accountSettingsView.fetchState==="In-Progress"?t.jsx(Qs,{}):w.accountSettingsView.fetchState==="Completed"&&w.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&w.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Su,{setIsJeAccountSettingsOpened:C,setResetJeAccountSettingsForm:d,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,accountSettings:w.accountSettingsView,setCurrentFooterFormId:x}):w.fetchState==="Completed"&&w.draftSchedules.length===0&&w.resolveSchedules.length===0?t.jsx(wt,{tab:e.currentSelectedView,title:Ve(e.currentSelectedView).allDoneText.title,subTitle:Ve(e.currentSelectedView).allDoneText.subTitle}):w.fetchState==="Completed"?t.jsx(Fu,{setCurrentFooterFormId:x,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:p,onPostJESchedule:h,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:c}):null}const Pu=72,ea=50,Nu=1,Vu=["receipts"],Ai=e=>As(e,Vu),{common:{texts:{vendor:Hu,amount:Wu,receipts:Uu,category:qu,classText:Ju,date:Ku}}}=Ie.getLocalizedStrings(),Gu={key:"vendor",value:Hu,sortOrder:"ascending",width:new ee(18,18)},Yu={key:"category",value:qu,sortOrder:"ascending",width:new ee(18,18)},Zu={key:"class",value:Ju,sortOrder:"ascending",width:new ee(18,18)},Xu={key:"date",value:Ku,sortOrder:"descending",width:new ee(11,11)},Qu={key:"receipts",value:Uu,sortOrder:"descending",width:new ee(6,6)},eh={key:"amount",value:Wu,sortOrder:"ascending",width:new ee(10,10)},dt=[Gu,Yu,Zu,Xu,Qu,eh],Xn={sortKey:"date",sortOrder:"descending"},Ei={containerPaddingLeftRight:new ee(g[3],g[4])},ta=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=ke(),[p,h]=s.useState(dt);s.useEffect(()=>{const r=[...p];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";h(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Ai(r.key)==null&&i(Er(r.key),r.sortOrder)};return t.jsx(th,{windowSize:c,children:p.map((r,m)=>{const u=n!=null||Ai(r.key)!=null;return t.jsxs(nh,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,isSortDisabled:u,windowSize:c,isLastItem:m===p.length-1,style:r.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(rh,{onClick:()=>u?null:l(r),isSortDisabled:u,children:[t.jsx(lh,{children:r.value}),u?null:t.jsx(ih,{sortConfig:e,headerData:r,children:t.jsx(ah,{})})]}),u?null:t.jsx(sh,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==Xn.sortKey,children:t.jsx(oh,{onClick:()=>{u||i(Xn.sortKey,Xn.sortOrder)},"data-testid":B("missing-receipts-header-close-icon",r.key)})})]},r.key)})})},th=a.div`
887
+ `;function Mu({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:d,vendorSearchAutoCompleteData:c,onJESchedulesFormDataChange:p,onPostJESchedule:h,handleJeScheduleClick:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:x,setIsJeAccountSettingsOpened:C}){const{jeSchedules:w}=e;return w.fetchState==="In-Progress"||w.accountSettingsView.fetchState==="In-Progress"?t.jsx(Xs,{}):w.accountSettingsView.fetchState==="Completed"&&w.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&w.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Su,{setIsJeAccountSettingsOpened:C,setResetJeAccountSettingsForm:d,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,accountSettings:w.accountSettingsView,setCurrentFooterFormId:x}):w.fetchState==="Completed"&&w.draftSchedules.length===0&&w.resolveSchedules.length===0?t.jsx(wt,{tab:e.currentSelectedView,title:Ve(e.currentSelectedView).allDoneText.title,subTitle:Ve(e.currentSelectedView).allDoneText.subTitle}):w.fetchState==="Completed"?t.jsx(_u,{setCurrentFooterFormId:x,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:p,onPostJESchedule:h,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:c}):null}const Pu=72,Qs=50,Nu=1,Vu=["receipts"],Ti=e=>Ts(e,Vu),{common:{texts:{vendor:Hu,amount:Wu,receipts:Uu,category:qu,classText:Ju,date:Ku}}}=Ie.getLocalizedStrings(),Gu={key:"vendor",value:Hu,sortOrder:"ascending",width:new ee(18,18)},Yu={key:"category",value:qu,sortOrder:"ascending",width:new ee(18,18)},Zu={key:"class",value:Ju,sortOrder:"ascending",width:new ee(18,18)},Xu={key:"date",value:Ku,sortOrder:"descending",width:new ee(11,11)},Qu={key:"receipts",value:Uu,sortOrder:"descending",width:new ee(6,6)},eh={key:"amount",value:Wu,sortOrder:"ascending",width:new ee(10,10)},dt=[Gu,Yu,Zu,Xu,Qu,eh],Zn={sortKey:"date",sortOrder:"descending"},Ai={containerPaddingLeftRight:new ee(g[3],g[4])},ea=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=ke(),[p,h]=s.useState(dt);s.useEffect(()=>{const r=[...p];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";h(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Ti(r.key)==null&&i(Er(r.key),r.sortOrder)};return t.jsx(th,{windowSize:c,children:p.map((r,m)=>{const u=n!=null||Ti(r.key)!=null;return t.jsxs(nh,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,isSortDisabled:u,windowSize:c,isLastItem:m===p.length-1,style:r.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(rh,{onClick:()=>u?null:l(r),isSortDisabled:u,children:[t.jsx(lh,{children:r.value}),u?null:t.jsx(ih,{sortConfig:e,headerData:r,children:t.jsx(ah,{})})]}),u?null:t.jsx(sh,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==Zn.sortKey,children:t.jsx(oh,{onClick:()=>{u||i(Zn.sortKey,Zn.sortOrder)},"data-testid":M("missing-receipts-header-close-icon",r.key)})})]},r.key)})})},th=a.div`
888
888
  top: ${o.sp0};
889
889
  left: ${o.sp0};
890
- height: ${ea}px;
890
+ height: ${Qs}px;
891
891
  z-index: 2;
892
892
  display: flex;
893
893
  align-items: center;
@@ -895,8 +895,8 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
895
895
  box-sizing: border-box;
896
896
  background-color: ${e=>e.theme.colors.grey4};
897
897
  position: sticky;
898
- padding-left: ${e=>Ei.containerPaddingLeftRight.valuePx(e.windowSize)};
899
- padding-right: ${e=>Ei.containerPaddingLeftRight.valuePx(e.windowSize)};
898
+ padding-left: ${e=>Ai.containerPaddingLeftRight.valuePx(e.windowSize)};
899
+ padding-right: ${e=>Ai.containerPaddingLeftRight.valuePx(e.windowSize)};
900
900
  `,nh=a.div`
901
901
  color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
902
902
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -910,7 +910,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
910
910
  position: static;
911
911
  z-index: 0;
912
912
  box-sizing: border-box;
913
- `,oh=a(Bn)`
913
+ `,oh=a(Mn)`
914
914
  width: ${o.sp2};
915
915
  height: ${o.sp2};
916
916
  cursor: pointer;
@@ -925,7 +925,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
925
925
  &:hover {
926
926
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
927
927
  }
928
- `,ah=a(Fn)`
928
+ `,ah=a(_n)`
929
929
  width: ${o.sp2};
930
930
  height: ${o.sp2};
931
931
  `,rh=a.div`
@@ -937,7 +937,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
937
937
  }
938
938
  `,lh=a(pt)`
939
939
  display: flex;
940
- `,{common:{strings:{underscore:na,hyphen:Qn,empty:Ri},documents:{singleFileUploadSizeErrorMessage:ch,multipleFileUploadSizeErrorMessage:dh},snackBar:{missing_receipts_attachment:{failed:uh}},tooltips:{addMissingReceipt:hh}},dateFormat:ph}=Ie.getLocalizedStrings(),Tn={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[2],g[3])},mh=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:d,authParams:c,selectedPeriod:p,onUploadReceiptComplete:h,onMissingReceiptsRowClick:i,onUploadReceiptFetchStatus:l,onUploadReceiptAttachment:r})=>{const m=ke(),u=s.useRef(null),x=s.useCallback(async(f,v,I,y,$)=>{l(e.id,"In-Progress"),await _r(f,v,I,y,$).then(({uploadResponse:O,errorMessage:T})=>{O!=null?O.transaction.attachments!=null&&(r(O.transaction),setTimeout(()=>h(O.transaction,p),2e3)):l(e.id,"Error",{code:500,message:uh},T)}).catch(O=>{l(e.id,"Error",O)})},[e.id,p,r,h,l]),C=s.useCallback(f=>{if(f.target.files!=null){const v=f.target.files,I=[],y=[];for(let $=0;$<v.length;$++)I.push(v[$].name),y.push(v[$]);x(d,c,v[0],v[0].name,{id:e.id,type:e.type})}},[c,x,d,e.id,e.type]),w=s.useCallback(()=>{u.current?.click()},[u]);return t.jsx(oa,{windowSize:m,onClick:()=>i(e.id,e.type),"data-testid":B("missing-receipts-list-row",e.id),children:dt.map((f,v)=>{const I=`${e.id}${na}${f.key}`;switch(f.key){case"vendor":default:return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsxs(Dn,{children:[t.jsx(Cs,{photoUrl:e.vendorId!=null?e.logo?.toString()??Ri:Ri,styles:{width:o.sp4,height:o.sp4,borderRadius:o.sp0},placeholder:{width:g[4],height:g[4]},fallbackAvatar:t.jsx(bh,{children:t.jsx(hn,{name:e.vendorName??e.description,size:o.sp4})})}),t.jsx(nt,{text:e.vendorName??e.description,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})]})})},I);case"category":case"class":{const y=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:Qn,$=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:Qn,O=f.key==="category"?y:$;return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(Dn,{children:O!==Qn?t.jsx(nt,{text:O,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}}):t.jsx(wh,{children:O})})})},I)}case"date":return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(Dn,{children:t.jsx(nt,{text:e.date.format(ph.visual.MMMDCommaYYYYformat),itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})})})},I);case"receipts":return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(hs,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(ir,{shouldDisplay:!0,width:g[4],height:g[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(Ch,{onClick:y=>{y.stopPropagation()},children:t.jsx(us,{"data-testid":B("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:u,sizeLimit:Hn,multiple:!1,acceptableTypes:[...Rr],onFileChange:C,onFileSizeError:(y,$)=>{y&&l(e.id,"Error",{code:500,message:$===!0?ch.replace("__maxFileSize__",Ho(Hn,0)):dh.replace("__maxFileSize__",Ho(Hn,0))})}})}),t.jsx(ye,{display:"flex",placement:"bottom",title:hh,enterDelay:600,children:t.jsx(yh,{onClick:y=>{y.stopPropagation(),w()}})})]})})},I);case"amount":{const y=Ue("0,0.[00]",e.amount);return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(nt,{text:e.amount.amount<0?`-${y}`:y,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})})},I)}}})})},gh=()=>{const e=ke(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(oa,{windowSize:e,ref:n,children:dt.map((p,h)=>{const i=`${h}${na}${p.key}`;switch(p.key){case"vendor":return t.jsx(Ht,{windowSize:e,wrapperWidth:p.width,children:t.jsx(Wt,{windowSize:e,isLastItem:h===dt.length-1,children:t.jsxs(Dn,{children:[t.jsx(To,{width:g[4],height:g[4]}),t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(Ht,{windowSize:e,wrapperWidth:p.width,children:t.jsx(Wt,{windowSize:e,isLastItem:h===dt.length-1,children:t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},oa=a.div`
940
+ `,{common:{strings:{underscore:ta,hyphen:Xn,empty:Ei},documents:{singleFileUploadSizeErrorMessage:ch,multipleFileUploadSizeErrorMessage:dh},snackBar:{missing_receipts_attachment:{failed:uh}},tooltips:{addMissingReceipt:hh}},dateFormat:ph}=Ie.getLocalizedStrings(),Tn={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[2],g[3])},mh=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:d,authParams:c,selectedPeriod:p,onUploadReceiptComplete:h,onMissingReceiptsRowClick:i,onUploadReceiptFetchStatus:l,onUploadReceiptAttachment:r})=>{const m=ke(),u=s.useRef(null),x=s.useCallback(async(f,v,I,y,$)=>{l(e.id,"In-Progress"),await Br(f,v,I,y,$).then(({uploadResponse:O,errorMessage:T})=>{O!=null?O.transaction.attachments!=null&&(r(O.transaction),setTimeout(()=>h(O.transaction,p),2e3)):l(e.id,"Error",{code:500,message:uh},T)}).catch(O=>{l(e.id,"Error",O)})},[e.id,p,r,h,l]),C=s.useCallback(f=>{if(f.target.files!=null){const v=f.target.files,I=[],y=[];for(let $=0;$<v.length;$++)I.push(v[$].name),y.push(v[$]);x(d,c,v[0],v[0].name,{id:e.id,type:e.type})}},[c,x,d,e.id,e.type]),w=s.useCallback(()=>{u.current?.click()},[u]);return t.jsx(na,{windowSize:m,onClick:()=>i(e.id,e.type),"data-testid":M("missing-receipts-list-row",e.id),children:dt.map((f,v)=>{const I=`${e.id}${ta}${f.key}`;switch(f.key){case"vendor":default:return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsxs(Dn,{children:[t.jsx(ys,{photoUrl:e.vendorId!=null?e.logo?.toString()??Ei:Ei,styles:{width:o.sp4,height:o.sp4,borderRadius:o.sp0},placeholder:{width:g[4],height:g[4]},fallbackAvatar:t.jsx(bh,{children:t.jsx(hn,{name:e.vendorName??e.description,size:o.sp4})})}),t.jsx(nt,{text:e.vendorName??e.description,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})]})})},I);case"category":case"class":{const y=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:Xn,$=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:Xn,O=f.key==="category"?y:$;return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(Dn,{children:O!==Xn?t.jsx(nt,{text:O,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}}):t.jsx(wh,{children:O})})})},I)}case"date":return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(Dn,{children:t.jsx(nt,{text:e.date.format(ph.visual.MMMDCommaYYYYformat),itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})})})},I);case"receipts":return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(us,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(ir,{shouldDisplay:!0,width:g[4],height:g[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(Ch,{onClick:y=>{y.stopPropagation()},children:t.jsx(ds,{"data-testid":M("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:u,sizeLimit:Vn,multiple:!1,acceptableTypes:[...Rr],onFileChange:C,onFileSizeError:(y,$)=>{y&&l(e.id,"Error",{code:500,message:$===!0?ch.replace("__maxFileSize__",Vo(Vn,0)):dh.replace("__maxFileSize__",Vo(Vn,0))})}})}),t.jsx(ye,{display:"flex",placement:"bottom",title:hh,enterDelay:600,children:t.jsx(yh,{onClick:y=>{y.stopPropagation(),w()}})})]})})},I);case"amount":{const y=Ue("0,0.[00]",e.amount);return t.jsx(Ht,{windowSize:m,wrapperWidth:f.width,children:t.jsx(Wt,{windowSize:m,isLastItem:v===dt.length-1,children:t.jsx(nt,{text:e.amount.amount<0?`-${y}`:y,itemTextStyle:{...At.standardRegular.cssObject,color:"inherit"}})})},I)}}})})},gh=()=>{const e=ke(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(na,{windowSize:e,ref:n,children:dt.map((p,h)=>{const i=`${h}${ta}${p.key}`;switch(p.key){case"vendor":return t.jsx(Ht,{windowSize:e,wrapperWidth:p.width,children:t.jsx(Wt,{windowSize:e,isLastItem:h===dt.length-1,children:t.jsxs(Dn,{children:[t.jsx(Lo,{width:g[4],height:g[4]}),t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(Ht,{windowSize:e,wrapperWidth:p.width,children:t.jsx(Wt,{windowSize:e,isLastItem:h===dt.length-1,children:t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},na=a.div`
941
941
  display: flex;
942
942
  background-color: ${e=>e.theme.colors.grey5};
943
943
  padding-left: ${e=>Tn.containerPaddingLeftRight.valuePx(e.windowSize)};
@@ -984,7 +984,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
984
984
  &:hover {
985
985
  color: ${e=>e.theme.colors.primary};
986
986
  }
987
- `,Wt=a(_e)`
987
+ `,Wt=a(Be)`
988
988
  overflow: hidden;
989
989
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
990
990
  display: flex;
@@ -995,12 +995,12 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
995
995
  flex-direction: row;
996
996
  column-gap: ${o.sp2};
997
997
  align-items: center;
998
- `,wh=a(_e)`
998
+ `,wh=a(Be)`
999
999
  ${xh};
1000
1000
  color: inherit;
1001
1001
  `,bh=a.div`
1002
1002
  display: flex;
1003
- `,vh=({sortConfig:e,fetchState:n,isDisabled:d,onColumnSortConfigChanged:c})=>{const p=ke();return t.jsxs(Sh,{windowSize:p,children:[t.jsx(ta,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":d,onColumnSortConfigChanged:c}),t.jsx(jh,{windowSize:p,children:[...Array(3)].map((h,i)=>t.jsx(gh,{},i))})]})},Sh=a.div`
1003
+ `,vh=({sortConfig:e,fetchState:n,isDisabled:d,onColumnSortConfigChanged:c})=>{const p=ke();return t.jsxs(Sh,{windowSize:p,children:[t.jsx(ea,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":d,onColumnSortConfigChanged:c}),t.jsx(jh,{windowSize:p,children:[...Array(3)].map((h,i)=>t.jsx(gh,{},i))})]})},Sh=a.div`
1004
1004
  display: block;
1005
1005
  min-height: 100%;
1006
1006
  flex-direction: column;
@@ -1010,7 +1010,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1010
1010
  min-height: 100%;
1011
1011
  flex-direction: column;
1012
1012
  row-gap: ${o.sp3};
1013
- `,{common:kh}=Ie.getLocalizedStrings(),Ih=({missingReceipts:e,receiptUploadEndpoint:n,authParams:d,selectedPeriod:c,isDisabled:p,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const x=ke(),{fetchState:C,uiState:w,transactions:f}=e,v=s.useRef(null),[I,y]=s.useState(!1);s.useEffect(()=>{v.current?.resetAfterIndex(0)},[x,v]),s.useEffect(()=>{C==="Completed"&&y(!1)},[C]);const $=T=>Pu,O=(T,D)=>{m({sortOrder:D,sortKey:T})};return t.jsxs(Th,{children:[t.jsx(Ah,{windowSize:x,children:C==="Error"?t.jsxs(Rh,{windowSize:x,children:[t.jsx(Dh,{onClick:()=>u(),"data-testid":B("missing-receipts-list-table-reload-button"),children:t.jsx(ko,{})}),t.jsx(Oh,{children:kh.reloadPage.label})]}):C==="Completed"&&f.length===0?t.jsx(wt,{tab:"missing_receipts",title:Ve("missing_receipts").allDoneText.title,subTitle:Ve("missing_receipts").allDoneText.subTitle}):C==="Not-Started"||C==="In-Progress"&&f.length===0?t.jsx(vh,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},fetchState:C,onColumnSortConfigChanged:O}):t.jsx(Eh,{windowSize:x,children:t.jsx(_n,{children:({height:T,width:D})=>t.jsxs(_h,{style:{height:T,width:D},children:[t.jsx(Lh,{children:t.jsx(ta,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},isDisabled:C==="In-Progress"?"readonly":p,onColumnSortConfigChanged:O})}),t.jsx(zn,{ref:v,height:T-ea,itemCount:f.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:d,isDisabled:p,selectedPeriod:c,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r},itemSize:$,width:D,style:{willChange:"auto"},overscanCount:Nu,onScroll:({scrollOffset:S})=>{m({scrollPosition:{scrollTop:S}})},initialScrollOffset:w.scrollPosition?.scrollTop,children:$h})]})})})}),t.jsx(Pe,{controller:I===!0,children:t.jsx(zh,{children:t.jsx(hs,{size:"Small",start:!0})})})]})},$h=({index:e,style:n,data:d})=>{const{missingReceipts:c,receiptUploadEndpoint:p,authParams:h,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,selectedPeriod:u}=d,x=c.transactions[e];return t.jsx(Mh,{style:{...n,width:"100%"},children:t.jsx(mh,{transaction:x,receiptUploadEndpoint:p,authParams:h,selectedPeriod:u,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,uploadReceiptsFetchState:c.uploadReceiptStatusById[x.id]??{fetchState:"Not-Started",error:void 0}},x.id)})},Lh=a.div`
1013
+ `,{common:kh}=Ie.getLocalizedStrings(),Ih=({missingReceipts:e,receiptUploadEndpoint:n,authParams:d,selectedPeriod:c,isDisabled:p,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const x=ke(),{fetchState:C,uiState:w,transactions:f}=e,v=s.useRef(null),[I,y]=s.useState(!1);s.useEffect(()=>{v.current?.resetAfterIndex(0)},[x,v]),s.useEffect(()=>{C==="Completed"&&y(!1)},[C]);const $=T=>Pu,O=(T,D)=>{m({sortOrder:D,sortKey:T})};return t.jsxs(Th,{children:[t.jsx(Ah,{windowSize:x,children:C==="Error"?t.jsxs(Rh,{windowSize:x,children:[t.jsx(Dh,{onClick:()=>u(),"data-testid":M("missing-receipts-list-table-reload-button"),children:t.jsx(jo,{})}),t.jsx(Oh,{children:kh.reloadPage.label})]}):C==="Completed"&&f.length===0?t.jsx(wt,{tab:"missing_receipts",title:Ve("missing_receipts").allDoneText.title,subTitle:Ve("missing_receipts").allDoneText.subTitle}):C==="Not-Started"||C==="In-Progress"&&f.length===0?t.jsx(vh,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},fetchState:C,onColumnSortConfigChanged:O}):t.jsx(Eh,{windowSize:x,children:t.jsx(Bn,{children:({height:T,width:D})=>t.jsxs(Bh,{style:{height:T,width:D},children:[t.jsx(Lh,{children:t.jsx(ea,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},isDisabled:C==="In-Progress"?"readonly":p,onColumnSortConfigChanged:O})}),t.jsx(Fn,{ref:v,height:T-Qs,itemCount:f.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:d,isDisabled:p,selectedPeriod:c,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:l,onUploadReceiptFetchStatus:r},itemSize:$,width:D,style:{willChange:"auto"},overscanCount:Nu,onScroll:({scrollOffset:S})=>{m({scrollPosition:{scrollTop:S}})},initialScrollOffset:w.scrollPosition?.scrollTop,children:$h})]})})})}),t.jsx(Pe,{controller:I===!0,children:t.jsx(Fh,{children:t.jsx(us,{size:"Small",start:!0})})})]})},$h=({index:e,style:n,data:d})=>{const{missingReceipts:c,receiptUploadEndpoint:p,authParams:h,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,selectedPeriod:u}=d,x=c.transactions[e];return t.jsx(zh,{style:{...n,width:"100%"},children:t.jsx(mh,{transaction:x,receiptUploadEndpoint:p,authParams:h,selectedPeriod:u,onMissingReceiptsRowClick:i,onUploadReceiptComplete:l,onUploadReceiptAttachment:r,onUploadReceiptFetchStatus:m,uploadReceiptsFetchState:c.uploadReceiptStatusById[x.id]??{fetchState:"Not-Started",error:void 0}},x.id)})},Lh=a.div`
1014
1014
  width: auto;
1015
1015
  `,Th=a.div`
1016
1016
  width: 100%;
@@ -1026,7 +1026,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1026
1026
  `,Rh=a.div`
1027
1027
  display: flex;
1028
1028
  width: 100%;
1029
- height: ${e=>`calc(100% - ${fs.valuePx(e.windowSize)})`};
1029
+ height: ${e=>`calc(100% - ${xs.valuePx(e.windowSize)})`};
1030
1030
  flex-direction: column;
1031
1031
  justify-content: center;
1032
1032
  align-items: center;
@@ -1048,14 +1048,14 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1048
1048
  `,Oh=a(er)`
1049
1049
  margin-top: ${o.sp3};
1050
1050
  color: ${e=>e.theme.colors.hero};
1051
- `,Mh=a.div`
1051
+ `,zh=a.div`
1052
1052
  top: ${o.sp0};
1053
1053
  left: ${o.sp0};
1054
1054
  padding-bottom: ${o.sp3};
1055
1055
  box-sizing: border-box;
1056
- `,_h=a.div`
1056
+ `,Bh=a.div`
1057
1057
  position: relative;
1058
- `,zh=a.div`
1058
+ `,Fh=a.div`
1059
1059
  display: flex;
1060
1060
  width: 100%;
1061
1061
  height: ${o.sp3};
@@ -1064,9 +1064,9 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1064
1064
  align-items: center;
1065
1065
  margin-top: ${o.sp3};
1066
1066
  margin-bottom: ${o.sp3};
1067
- `,Fh=[...Lr],Bh=7*1024*100,Ph=a.div`
1067
+ `,_h=[...Lr],Mh=7*1024*100,Ph=a.div`
1068
1068
  width: ${ln}px;
1069
- `,eo=a.div`
1069
+ `,Qn=a.div`
1070
1070
  width: ${e=>`${e.availableWidth}px`};
1071
1071
  min-width: auto;
1072
1072
  position: relative;
@@ -1086,7 +1086,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1086
1086
  margin-bottom: ${o.sp2};
1087
1087
 
1088
1088
  // Disable select for Zeni Logo and File Separator
1089
- #${ds} img[alt*="company logo"],
1089
+ #${cs} img[alt*="company logo"],
1090
1090
  .attachFileSeparator {
1091
1091
  user-select: none;
1092
1092
  }
@@ -1098,7 +1098,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1098
1098
  margin-bottom: ${o.sp3};
1099
1099
  `,Hh=a.div`
1100
1100
  position: relative;
1101
- `,Di=a(_e)`
1101
+ `,Ri=a(Be)`
1102
1102
  position: relative;
1103
1103
  `,Wh=a.div`
1104
1104
  background-color: ${e=>e.theme.colors.grey5};
@@ -1137,20 +1137,20 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1137
1137
  `,Kh=a(vt)`
1138
1138
  color: ${e=>e.theme.colors.grey1};
1139
1139
  user-select: none;
1140
- `,Gh=a(xs)`
1140
+ `,Gh=a(gs)`
1141
1141
  color: ${e=>e.theme.colors.primary};
1142
1142
  `,Yh=a.div`
1143
1143
  flex-direction: column;
1144
1144
  row-gap: ${o.sp3};
1145
1145
  display: flex;
1146
- `,Zh=Eo`
1146
+ `,Zh=Ao`
1147
1147
  0% {
1148
1148
  transform: translateX(100%);
1149
1149
  }
1150
1150
  100% {
1151
1151
  transform: translateX(0)
1152
1152
  }
1153
- `,Xh=Eo`
1153
+ `,Xh=Ao`
1154
1154
  0% {
1155
1155
  transform: translateX(0)
1156
1156
  }
@@ -1165,9 +1165,9 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1165
1165
  right: ${o.sp0};
1166
1166
  top: ${o.sp0};
1167
1167
  z-index: ${g[2]};
1168
- min-width: ${ls}px;
1169
- max-width: ${rs}px;
1170
- `,On="monthEndReportFormSection",Oi="monthEndReportPage",Ge=Ie.getLocalizedStrings();function ep({companyId:e,enableZeniGPTFeature:n,monthEndReportView:d,previewMode:c,customerRequestData:p,allThreadsSectionOpen:h,filterMetaData:i,newThreadMetadata:l,isZeniUser:r,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:x,onUpdateFileAttachment:C,onCloseAllThreadsSection:w,previewMonthEndReport:f,saveMonthEndReport:v,onEditClick:I,onOpenFileAttachmentSnackBar:y,onClickCustomerRequest:$,sendMonthEndReport:O}){const T=bt(),[D,S]=s.useState(),[b,A]=s.useState(0),[L,H]=s.useState(0),M=s.useRef(),q=s.useRef(null),z=s.useRef(null),{html:Y,subject:N,improveUsingZeniGPTStatus:G}=d,[V,Z]=s.useState(),[fe,ce]=s.useState(!1),[te,ne]=s.useState(!1),P=s.useRef(null),_=s.useRef(null),U=Ia(h,250),F=d.fetchState==="Not-Started"||d.fetchState==="In-Progress"||d.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||d.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:j,sortedThreads:R,threadsPositions:W,observer:ie,unresolvedThreadsMap:E,handleRemoveFloatingThread:J}=$a(i,P,!c,F,r),K=s.useCallback(()=>{h?_.current!=null&&H(Math.min((_.current.offsetWidth-ln-g[4])/2,_.current.offsetWidth-ln-rs-g[4])):_.current!=null&&A(Math.min((_.current.offsetWidth-ln-g[4])/2,_.current.offsetWidth-ln-ls-g[4]))},[h]);s.useEffect(()=>{K()},[h,K]),s.useEffect(()=>(window.addEventListener("resize",K),()=>{window.removeEventListener("resize",K)}),[K]);const oe=r?es:ts,{openThread:Ce,addThread:$e,setOpenThread:ge}=s.useContext(oe),re=La(No,!1,!c),k=P.current?.getBoundingClientRect(),he=re!=null&&re.coords&&k?{left:re.coords.left-k.left,top:re.coords.top-k.top}:void 0,we=s.useCallback(()=>{const Me=window.getSelection()?.getRangeAt(0),X=Ta();if(!Me||X==null)return;const be={...l,...X,startPath:X.startPath.join(),endPath:X.endPath.join()},je=`${cs()}${as}`,ve=`cockpit_${e}`;$e(je,{type:"thread",id:je,roomId:ve,createdAt:new Date,comments:[],metadata:be,updatedAt:new Date,resolved:!1}),ge(je)},[$e,e,l,ge]);s.useEffect(()=>{Ce!=null&&h&&w()},[h,Ce,w]);const Ae=G.fetchState==="In-Progress",Ee=qt({mode:"all",defaultValues:Mi(d),values:Mi(d)}),me=Ee.handleSubmit(Me=>{const{recipientEmailList:X,subject:be}=Me[On];if(c===!0)O?.(V?.id);else{const je=D?.replace(Aa,Ge.common.strings.empty);X!=null&&be!=null&&f(X,be,V?.id,je!=null&&je.length>0?D:void 0)}}),Qe=()=>{q.current!=null&&q.current.click()},qe=()=>{V!==void 0&&V!=null&&(x([V.id]),Z(void 0),ce(!1))},Je=Me=>{const X=Me.target.files?Me.target.files[0]:null;if(X)if(!Tr(X.type)||te)console.warn("Please select a valid file.");else{const be=new FileReader;be.onload=function(je){const ve=je.target?.result;if(typeof ve=="string"){const Be={data:ve.split(",")[1],name:X.name,id:Ar(e,X.name)};Z(Be),ce(!0),C([Be])}},be.readAsDataURL(X)}},de=()=>{z.current&&z.current.scrollIntoView({behavior:"smooth"})},Ne=()=>{const Me=Ee.getValues(),{recipientEmailList:X,subject:be}=Me[On];X!=null&&be!=null&&v(X,be,V?.id,D)};s.useEffect(()=>{S(d.zeniRequestsHtml)},[d.zeniRequestsHtml]),s.useEffect(()=>{M.current=V},[V]),s.useEffect(()=>{Z($r(d.attachmentFile)),ce(!1)},[d.attachmentFile]),s.useEffect(()=>{te&&y()},[te,y]);const ot=Co(`${m.year}-${m.month}-01`).format(Ge.dateFormat.visual.MMMMFormat),rt=Y!=null?Y.split(Ea):[],St=d.concatenatedHtml,mt=()=>d.lastDraftSavedDate!=null&&c===!1?t.jsx(Qa,{time:d.lastDraftSavedDate,user:d.reportLastSavedByUser,timeStampLabel:Ge.cockpit.monthEndReport.timeStampLabel}):null,jt=()=>r===!0?U?t.jsxs(t.Fragment,{children:[t.jsx(Qh,{allThreadsSectionOpen:h,children:t.jsx(Za,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${T.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Xe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:T.colors.background},threadsContainerStyle:{paddingBottom:c?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Ge.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Me,X)=>{ge(X);const be=R.findIndex(je=>je[0]===X);w(),j.current?.[be]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>w()})}),t.jsx(eo,{availableWidth:b})]}):t.jsx(Xa,{observer:ie,canvasContainerRef:P,sortedThreads:R,threadsPositions:W,threadsRefs:j,unresolvedThreadsMap:E,editorMode:!c,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${P.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:J}):t.jsx(eo,{availableWidth:b}),kt=(d.zeniRequestsData??[]).length+Ra(d.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Nh,{ref:_,children:[t.jsx(eo,{availableWidth:h?L:b}),t.jsxs(Ph,{children:[t.jsx(Jt,{...Ee,children:t.jsx("form",{id:_i(Oi),onSubmit:me,children:t.jsxs(Yh,{children:[t.jsx(Da,{sectionId:On,previewMode:c,subject:N}),!c&&kt>0?t.jsx(Oa,{totalItems:kt,onClickCustomerRequest:$}):null,t.jsxs(Wh,{id:No,ref:P,children:[t.jsxs(Uh,{className:"monthEndReportCanvasWrapper",children:[V!=null||te?t.jsx(qh,{"data-testid":B("email-attachment-container"),onClick:de,children:t.jsx(Ma,{fileSizeError:te,setFileSizeError:ne,loading:!1,showAnimation:!c&&fe})}):null,c?t.jsx(Di,{dangerouslySetInnerHTML:{__html:_a(St)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Hh,{id:za,children:[t.jsx(_e,{dangerouslySetInnerHTML:{__html:rt[0]!=null?rt[0]+"</body></html>":Ge.common.strings.empty}}),t.jsxs(Vh,{children:[t.jsx(Gh,{children:Ge.cockpit.monthEndReport.editorTitle}),t.jsx(Kh,{children:Ge.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Jh,{id:Fa,children:t.jsx(Ba,{handleFileInputClick:Qe,fileAttached:V!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:Ae,initialHtmlString:d.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:S,customerRequestData:p})}),t.jsx(Di,{id:ds,dangerouslySetInnerHTML:{__html:rt[1]!=null?"<html><body>"+rt[1]:Ge.common.strings.empty}})]}),V!=null?t.jsx(Pa,{ref:z,fileName:V.name,fileSize:Na(V.data),onRemove:qe,isRemovable:!c}):null]}),he?t.jsx(Va,{style:{zIndex:15},coords:he,alignment:re.alignment,onClick:we}):null,t.jsx(Ha,{canvasContainerRef:P,sortedThreads:R,editorMode:!c,isZeniUser:r})]})]})})}),t.jsx(us,{name:V?.name??Ge.common.strings.empty,fileRef:q,sizeLimit:Bh,acceptableTypes:Fh,onFileChange:async Me=>{Je(Me)},onFileSizeError:Me=>ne(Me),multiple:!1})]}),jt()]}),t.jsx(ns,{style:{zIndex:10},leftSideComponent:mt(),formId:_i(Oi),cancelBtn:{isDisabled:Ae,label:c===!0?Ge.cockpit.monthEndReport.editButtonLabel:Ge.cockpit.monthEndReport.saveChanges,onClick:c===!0?I:Ne,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:d.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:Ae,isLoading:c===!0?d.sendMonthEndReportStatus.fetchState==="In-Progress":d.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:c===!0?"unset":"136px"},label:c===!0?Ge.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",ot):Ge.cockpit.monthEndReport.preview,size:"medium"}})]})}const Mi=e=>({[On]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Ge.common.strings.empty}}),_i=e=>`${e}_form`;At.smallBold.lineHeightValue;const tp=1,np=50,zi=56,op=["memo"],Fi=e=>As(e,op),{common:{strings:{empty:ip}},expenseAutomation:{transactions:{header:{vendors:sp,category:ap,classText:rp,date:lp,type:cp,amount:dp}}}}=Ie.getLocalizedStrings(),up={key:"vendor",value:sp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},hp={key:"category",value:ap,sortOrder:"ascending",width:new ee(20,20),customStyle:{common:{paddingLeft:g[7]}}},pp={key:"class",value:rp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},mp={key:"date",value:lp,sortOrder:"descending",width:new ee(11,11),customStyle:{common:{paddingLeft:12}}},gp={key:"transaction_type",value:cp,sortOrder:"descending",width:new ee(13,13),customStyle:{common:{paddingLeft:g[3]}}},xp={key:"memo",value:ip,sortOrder:"ascending",width:new ee(6,6),customStyle:{common:{}}},fp={key:"amount",value:dp,sortOrder:"ascending",width:new ee(10,10),customStyle:{common:{paddingRight:g[4]}}},Ct=[up,hp,pp,mp,gp,xp,fp],to={sortKey:"date",sortOrder:"descending"},ia=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=ke(),[p,h]=s.useState(Ao(Ct));s.useEffect(()=>{const r=[...p];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";h(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Fi(r.key)==null&&i(Or(r.key),r.sortOrder)};return t.jsx(yp,{windowSize:c,"data-testid":B("transaction-categorization-header-container"),children:p.map((r,m)=>{const u=n!=null||Fi(r.key)!=null;return t.jsxs(Cp,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,style:r.customStyle?.common,isSortDisabled:u,windowSize:c,isLastItem:m===p.length-1,"data-testid":B("transaction-categorization-header-wrapper",r.key),children:[t.jsxs(jp,{"data-testid":B("transaction-categorization-header",r.value?r.value:r.key),onClick:()=>l(r),isSortDisabled:u,children:[t.jsx(kp,{children:r.value}),u?null:t.jsx(bp,{sortConfig:e,headerData:r,"data-testid":B("transaction-categorization-sort-icon",r.key),children:t.jsx(Sp,{})})]}),u?null:t.jsx(vp,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==to.sortKey,"data-testid":B("transaction-categorization-close-icon",r.key),children:t.jsx(wp,{onClick:()=>{i(to.sortKey,to.sortOrder)},"data-testid":B("transaction-categorization-close-icon-button",r.key)})})]},r.key)})})},yp=a.div`
1168
+ min-width: ${rs}px;
1169
+ max-width: ${as}px;
1170
+ `,On="monthEndReportFormSection",Di="monthEndReportPage",Ge=Ie.getLocalizedStrings();function ep({companyId:e,enableZeniGPTFeature:n,monthEndReportView:d,previewMode:c,customerRequestData:p,allThreadsSectionOpen:h,filterMetaData:i,newThreadMetadata:l,isZeniUser:r,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:x,onUpdateFileAttachment:C,onCloseAllThreadsSection:w,previewMonthEndReport:f,saveMonthEndReport:v,onEditClick:I,onOpenFileAttachmentSnackBar:y,onClickCustomerRequest:$,sendMonthEndReport:O}){const T=bt(),[D,S]=s.useState(),[b,A]=s.useState(0),[L,H]=s.useState(0),z=s.useRef(),q=s.useRef(null),F=s.useRef(null),{html:Y,subject:N,improveUsingZeniGPTStatus:G}=d,[V,Z]=s.useState(),[fe,le]=s.useState(!1),[te,ne]=s.useState(!1),P=s.useRef(null),B=s.useRef(null),U=Ia(h,250),_=d.fetchState==="Not-Started"||d.fetchState==="In-Progress"||d.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||d.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:j,sortedThreads:R,threadsPositions:W,observer:ie,unresolvedThreadsMap:E,handleRemoveFloatingThread:J}=$a(i,P,!c,_,r),K=s.useCallback(()=>{h?B.current!=null&&H(Math.min((B.current.offsetWidth-ln-g[4])/2,B.current.offsetWidth-ln-as-g[4])):B.current!=null&&A(Math.min((B.current.offsetWidth-ln-g[4])/2,B.current.offsetWidth-ln-rs-g[4]))},[h]);s.useEffect(()=>{K()},[h,K]),s.useEffect(()=>(window.addEventListener("resize",K),()=>{window.removeEventListener("resize",K)}),[K]);const oe=r?Qi:es,{openThread:Ce,addThread:$e,setOpenThread:ge}=s.useContext(oe),re=La(Po,!1,!c),k=P.current?.getBoundingClientRect(),ue=re!=null&&re.coords&&k?{left:re.coords.left-k.left,top:re.coords.top-k.top}:void 0,we=s.useCallback(()=>{const ze=window.getSelection()?.getRangeAt(0),X=Ta();if(!ze||X==null)return;const be={...l,...X,startPath:X.startPath.join(),endPath:X.endPath.join()},je=`${ls()}${ss}`,ve=`cockpit_${e}`;$e(je,{type:"thread",id:je,roomId:ve,createdAt:new Date,comments:[],metadata:be,updatedAt:new Date,resolved:!1}),ge(je)},[$e,e,l,ge]);s.useEffect(()=>{Ce!=null&&h&&w()},[h,Ce,w]);const Ae=G.fetchState==="In-Progress",Ee=qt({mode:"all",defaultValues:Oi(d),values:Oi(d)}),me=Ee.handleSubmit(ze=>{const{recipientEmailList:X,subject:be}=ze[On];if(c===!0)O?.(V?.id);else{const je=D?.replace(Aa,Ge.common.strings.empty);X!=null&&be!=null&&f(X,be,V?.id,je!=null&&je.length>0?D:void 0)}}),Qe=()=>{q.current!=null&&q.current.click()},qe=()=>{V!==void 0&&V!=null&&(x([V.id]),Z(void 0),le(!1))},Je=ze=>{const X=ze.target.files?ze.target.files[0]:null;if(X)if(!Tr(X.type)||te)console.warn("Please select a valid file.");else{const be=new FileReader;be.onload=function(je){const ve=je.target?.result;if(typeof ve=="string"){const Me={data:ve.split(",")[1],name:X.name,id:Ar(e,X.name)};Z(Me),le(!0),C([Me])}},be.readAsDataURL(X)}},ce=()=>{F.current&&F.current.scrollIntoView({behavior:"smooth"})},Ne=()=>{const ze=Ee.getValues(),{recipientEmailList:X,subject:be}=ze[On];X!=null&&be!=null&&v(X,be,V?.id,D)};s.useEffect(()=>{S(d.zeniRequestsHtml)},[d.zeniRequestsHtml]),s.useEffect(()=>{z.current=V},[V]),s.useEffect(()=>{Z($r(d.attachmentFile)),le(!1)},[d.attachmentFile]),s.useEffect(()=>{te&&y()},[te,y]);const ot=yo(`${m.year}-${m.month}-01`).format(Ge.dateFormat.visual.MMMMFormat),rt=Y!=null?Y.split(Ea):[],St=d.concatenatedHtml,mt=()=>d.lastDraftSavedDate!=null&&c===!1?t.jsx(Qa,{time:d.lastDraftSavedDate,user:d.reportLastSavedByUser,timeStampLabel:Ge.cockpit.monthEndReport.timeStampLabel}):null,jt=()=>r===!0?U?t.jsxs(t.Fragment,{children:[t.jsx(Qh,{allThreadsSectionOpen:h,children:t.jsx(Za,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${T.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Xe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:T.colors.background},threadsContainerStyle:{paddingBottom:c?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Ge.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(ze,X)=>{ge(X);const be=R.findIndex(je=>je[0]===X);w(),j.current?.[be]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>w()})}),t.jsx(Qn,{availableWidth:b})]}):t.jsx(Xa,{observer:ie,canvasContainerRef:P,sortedThreads:R,threadsPositions:W,threadsRefs:j,unresolvedThreadsMap:E,editorMode:!c,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${P.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:J}):t.jsx(Qn,{availableWidth:b}),kt=(d.zeniRequestsData??[]).length+Ra(d.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Nh,{ref:B,children:[t.jsx(Qn,{availableWidth:h?L:b}),t.jsxs(Ph,{children:[t.jsx(Jt,{...Ee,children:t.jsx("form",{id:zi(Di),onSubmit:me,children:t.jsxs(Yh,{children:[t.jsx(Da,{sectionId:On,previewMode:c,subject:N}),!c&&kt>0?t.jsx(Oa,{totalItems:kt,onClickCustomerRequest:$}):null,t.jsxs(Wh,{id:Po,ref:P,children:[t.jsxs(Uh,{className:"monthEndReportCanvasWrapper",children:[V!=null||te?t.jsx(qh,{"data-testid":M("email-attachment-container"),onClick:ce,children:t.jsx(za,{fileSizeError:te,setFileSizeError:ne,loading:!1,showAnimation:!c&&fe})}):null,c?t.jsx(Ri,{dangerouslySetInnerHTML:{__html:Ba(St)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Hh,{id:Fa,children:[t.jsx(Be,{dangerouslySetInnerHTML:{__html:rt[0]!=null?rt[0]+"</body></html>":Ge.common.strings.empty}}),t.jsxs(Vh,{children:[t.jsx(Gh,{children:Ge.cockpit.monthEndReport.editorTitle}),t.jsx(Kh,{children:Ge.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Jh,{id:_a,children:t.jsx(Ma,{handleFileInputClick:Qe,fileAttached:V!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:Ae,initialHtmlString:d.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:S,customerRequestData:p})}),t.jsx(Ri,{id:cs,dangerouslySetInnerHTML:{__html:rt[1]!=null?"<html><body>"+rt[1]:Ge.common.strings.empty}})]}),V!=null?t.jsx(Pa,{ref:F,fileName:V.name,fileSize:Na(V.data),onRemove:qe,isRemovable:!c}):null]}),ue?t.jsx(Va,{style:{zIndex:15},coords:ue,alignment:re.alignment,onClick:we}):null,t.jsx(Ha,{canvasContainerRef:P,sortedThreads:R,editorMode:!c,isZeniUser:r})]})]})})}),t.jsx(ds,{name:V?.name??Ge.common.strings.empty,fileRef:q,sizeLimit:Mh,acceptableTypes:_h,onFileChange:async ze=>{Je(ze)},onFileSizeError:ze=>ne(ze),multiple:!1})]}),jt()]}),t.jsx(ts,{style:{zIndex:10},leftSideComponent:mt(),formId:zi(Di),cancelBtn:{isDisabled:Ae,label:c===!0?Ge.cockpit.monthEndReport.editButtonLabel:Ge.cockpit.monthEndReport.saveChanges,onClick:c===!0?I:Ne,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:d.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:Ae,isLoading:c===!0?d.sendMonthEndReportStatus.fetchState==="In-Progress":d.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:c===!0?"unset":"136px"},label:c===!0?Ge.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",ot):Ge.cockpit.monthEndReport.preview,size:"medium"}})]})}const Oi=e=>({[On]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Ge.common.strings.empty}}),zi=e=>`${e}_form`;At.smallBold.lineHeightValue;const tp=1,np=50,Bi=56,op=["memo"],Fi=e=>Ts(e,op),{common:{strings:{empty:ip}},expenseAutomation:{transactions:{header:{vendors:sp,category:ap,classText:rp,date:lp,type:cp,amount:dp}}}}=Ie.getLocalizedStrings(),up={key:"vendor",value:sp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},hp={key:"category",value:ap,sortOrder:"ascending",width:new ee(20,20),customStyle:{common:{paddingLeft:g[7]}}},pp={key:"class",value:rp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},mp={key:"date",value:lp,sortOrder:"descending",width:new ee(11,11),customStyle:{common:{paddingLeft:12}}},gp={key:"transaction_type",value:cp,sortOrder:"descending",width:new ee(13,13),customStyle:{common:{paddingLeft:g[3]}}},xp={key:"memo",value:ip,sortOrder:"ascending",width:new ee(6,6),customStyle:{common:{}}},fp={key:"amount",value:dp,sortOrder:"ascending",width:new ee(10,10),customStyle:{common:{paddingRight:g[4]}}},Ct=[up,hp,pp,mp,gp,xp,fp],eo={sortKey:"date",sortOrder:"descending"},oa=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=ke(),[p,h]=s.useState(To(Ct));s.useEffect(()=>{const r=[...p];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";h(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Fi(r.key)==null&&i(Or(r.key),r.sortOrder)};return t.jsx(yp,{windowSize:c,"data-testid":M("transaction-categorization-header-container"),children:p.map((r,m)=>{const u=n!=null||Fi(r.key)!=null;return t.jsxs(Cp,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,style:r.customStyle?.common,isSortDisabled:u,windowSize:c,isLastItem:m===p.length-1,"data-testid":M("transaction-categorization-header-wrapper",r.key),children:[t.jsxs(jp,{"data-testid":M("transaction-categorization-header",r.value?r.value:r.key),onClick:()=>l(r),isSortDisabled:u,children:[t.jsx(kp,{children:r.value}),u?null:t.jsx(bp,{sortConfig:e,headerData:r,"data-testid":M("transaction-categorization-sort-icon",r.key),children:t.jsx(Sp,{})})]}),u?null:t.jsx(vp,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==eo.sortKey,"data-testid":M("transaction-categorization-close-icon",r.key),children:t.jsx(wp,{onClick:()=>{i(eo.sortKey,eo.sortOrder)},"data-testid":M("transaction-categorization-close-icon-button",r.key)})})]},r.key)})})},yp=a.div`
1171
1171
  top: ${o.sp0};
1172
1172
  left: ${o.sp0};
1173
1173
  height: ${np}px;
@@ -1191,7 +1191,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1191
1191
  position: static;
1192
1192
  z-index: 0;
1193
1193
  box-sizing: border-box;
1194
- `,wp=a(Bn)`
1194
+ `,wp=a(Mn)`
1195
1195
  width: 12px;
1196
1196
  height: 12px;
1197
1197
  `,bp=a.div`
@@ -1207,7 +1207,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1207
1207
  &:hover {
1208
1208
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1209
1209
  }
1210
- `,Sp=a(Fn)`
1210
+ `,Sp=a(_n)`
1211
1211
  width: ${o.sp2};
1212
1212
  height: ${o.sp2};
1213
1213
  `,jp=a.div`
@@ -1219,7 +1219,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1219
1219
  }
1220
1220
  `,kp=a(pt)`
1221
1221
  display: flex;
1222
- `,no="expenseAutomationTransactionsPage",Ut="transactionCategorizationListTable",Te="account",Ye="class",at="lineEntitySelection",Ip="lineEntity",$p="recommendations",sa="lineInfo",Lp="vendorDetails",Tp="customerDetails",Mn="selectedTransactionIds",Lt=(e,n,d)=>`${e}.${d}.${n}`,Ap=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Ep,hyphen:An,empty:Qt}},expenseAutomation:{transactions:Tt},dateFormat:Rp}=Ie.getLocalizedStrings(),Et={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[1],g[2]),containerPaddingTopBottomEmpty:new ee(g[2],g[3]),nameLogoWidth:new ee(g[2],g[4]),nameLogoHeight:new ee(g[2],g[4])},Dp=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:p,selectedTab:h,containerRef:i,listContainerRef:l,isCOTEnabled:r,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:x,vendorLoadOptions:C,openTooltipId:w,setOpenTooltipId:f,isUncategorizedExpenseCategoryEnabled:v})=>{const I=ke(),[y,$]=s.useState(!1),{lineItemById:O,sortedLineItems:T}=n.transactionReviewLocalData,D=n.transactionReviewLocalData.tabSpecificLineItems?.[h]||[],S=T.filter(F=>D.indexOf(F)!==-1),b=[];S.forEach(F=>{b.push(O[F])});const{accountList:A,accountsHierarchyList:L,classHierarchyList:H,classList:M,uncategorizedAccounts:q,transactions:z,selectedCheckBoxTransactionIds:Y}=e,N=Y.includes(n.transactionId),G=bt(),V={control:()=>({marginLeft:-2,backgroundColor:y?G.colors.background:G.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:G.colors.grey5}),singleValue:()=>({color:y||N?G.colors.primary:G.colors.hero,paddingLeft:g[2]}),input:F=>({...F,color:y||N?G.colors.primary:G.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:F=>({...F,zIndex:10})},Z={...V,singleValue:F=>({...F,color:y||N?G.colors.primary:G.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:F=>({...F,color:y||N?G.colors.primary:G.colors.hero,textAlign:"left"})},fe=z.find(F=>F.id===n.transactionId),ce=(F,j)=>{const{transactionType:R}=j.transactionReviewLocalData;let W=F.target;for(;W;){if(W.classList.contains("select-value-container")||W.classList.contains("item-value-container")||W.classList.contains("grouped-single-select-field__value-container")||W.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||W.classList.contains("grouped-single-select-field__input")||W.classList.contains("grouped-single-select-field__menu"))return;W=W.parentElement}R!=null&&u(j.transactionId,R)},te=s.useRef(null),[ne,P]=s.useState(void 0),[_,U]=s.useState("bottom");return s.useEffect(()=>{if(ne===void 0)return;const F=l?.current?._outerRef??null,j=()=>{const R=te.current;if(R==null||F==null)return;const W=R.getBoundingClientRect(),ie=F.getBoundingClientRect(),E=F.scrollTop+(W.bottom-ie.top),J=F.scrollHeight-E;U(J>=288?"bottom":"top")};return j(),window.addEventListener("resize",j),F?.addEventListener("scroll",j),()=>{window.removeEventListener("resize",j),F?.removeEventListener("scroll",j)}},[l,ne]),t.jsx(_p,{onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),windowSize:I,isSelected:N,isHovered:y,children:t.jsx(zp,{children:b.map((F,j)=>t.jsx(Fp,{ref:ne===j?te:void 0,"data-testid":B("transaction-categorization-list-row",F.lineId),windowSize:I,onClick:R=>ce(R,n),children:t.jsx(Op,{line:F,isHovered:y||N,isSelected:N,lineIndex:j,sectionId:d,transaction:n,currentTransaction:fe,windowSize:I,accountsHierarchyList:L,classHierarchyList:H,allAccountList:A,allClassList:M,uncategorizedAccounts:q,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:p,setCurrentTransactionInAction:x,vendorLoadOptions:C,customStyle:V,customStyleAutoComplete:Z,recommendations:F.recommendationsWithCOT,selectedTab:h,isCOTEnabled:r,menuPlacement:_,cotTracking:m,openTooltipId:w,setOpenTooltipId:f,isUncategorizedExpenseCategoryEnabled:v,onDropdownClose:()=>P(void 0),onDropdownOpen:()=>P(j)})},`${n.transactionId}.${F.lineId}`))},n.transactionId)},n.transactionId)},Op=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:p,customStyleAutoComplete:h,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:C=!1,isSelected:w=!1,sectionId:f,recommendations:v,vendorSearchAutoCompleteData:I,selectedTab:y,isCOTEnabled:$,menuPlacement:O,cotTracking:T,openTooltipId:D,setCurrentTransactionInAction:S,vendorLoadOptions:b,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:L,onDropdownClose:H,onDropdownOpen:M})=>{const{transactionDate:q,transactionType:z,transactionTypeName:Y,memo:N}=r.transactionReviewLocalData,{setValue:G}=Lo(),V=s.useCallback((le,Se)=>{T?.onCOTView!=null&&T.onCOTView(i.lineId,r.transactionId,le,Se)},[T,i.lineId,r.transactionId]),Z=i.lineDescription,fe=s.useMemo(()=>{if(Z||N)return[{title:Tt.description,description:Z||An},{title:Tt.header.memo,description:N||An}]},[N,Z]),ce=Lt(f,at,l.toString()),te=Lt(f,Te,l.toString()),ne=Lt(f,Ye,l.toString()),P=(le,Se)=>{let ze;switch(Se){case"vendor":ze=ce;break;case"category":ze=te;break;case"class":ze=ne;break;default:return}G(`${ze}.selectedOption`,le,{shouldValidate:!0,shouldDirty:!0})},_=bt(),U=s.useMemo(()=>m!=null&&Nt(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),F=s.useMemo(()=>m!=null&&Nt(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),j=i[Ye]?.classId,R=i[Te]?.qboId??i[Te]?.accountId,W=U?.id,ie=F?.id,E=F?.name,[J,K]=s.useState(!j),[oe,Ce]=s.useState(!R||i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!0),[$e,ge]=s.useState(!ie||!W),re=le=>v?.find(Se=>Se.vendor?.qboId===le||Se.vendor?.id===le||Se.vendor?.name===le)?.vendor?.reason??"",k=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],he=Ss(e,k),we=vs(c,k),Ae=le=>n.filter(Se=>Se.qboId===le)[0]?.qboId,Ee=le=>d.filter(Se=>Se.classId===le)[0]?.accountingClassNumber??void 0,me=s.useCallback(le=>cn(x,le,L===!0?["income"]:void 0),[x,L]),[Qe,qe]=s.useState(!1),[Je,de]=s.useState(!1),[Ne,ot]=s.useState(!1),rt=(le,Se)=>{S({transactionId:r.transactionId,lineItemId:i.lineId}),b(le,Se)},St=()=>{ge(!(ie||W)),qe(!1),H?.()},mt=()=>{R&&i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!1?Ce(!1):Ce(!0),ot(!1),H?.()},jt=()=>{K(!j),de(!1),H?.()},kt=()=>{(ie||W)&&(qe(!0),M?.())},Me=()=>{de(!0),M?.()},X=()=>{ot(!0),M?.()};s.useEffect(()=>{R&&i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!1?Ce(!1):Ce(!0)},[R]),s.useEffect(()=>{K(!j)},[j]),s.useEffect(()=>{ge(!(ie||W))},[ie,W]);const be=r.transactionReviewLocalData.selectedEntity,je=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,ve=m!=null&&Nt(m)===!0?be:je,Be=s.useMemo(()=>{const le=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],Se=I.entityAutoCompleteView;return{selectedOption:ve?.qboId??ve?.id,defaultOptions:Io(Se,ve,le??[])}},[ve,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),It=()=>ve!=null&&ve.logo!=null?t.jsx(Cs,{photoUrl:ve.logo.toString(),styles:{width:Et.nameLogoWidth.valuePx(u),height:Et.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Ni,{children:t.jsx(hn,{name:ve.name,size:o.sp4})})}):ve!=null&&ve.name!=null?t.jsx(Ni,{children:t.jsx(hn,{name:ve.name,size:o.sp4})}):null,Mt=(le,Se)=>{if(Se==null||!Se)return;let ze=[];return le.forEach(Ke=>{ze=ze.concat(Ke.options)}),ze.find(Ke=>Ke.value===Se)?.label??Se},_t=Mt(we,j),an=Mt(he,R),et=y==="review",Kt=Wn("vendor",Be.defaultOptions,Be.selectedOption),fn=Wn("category",he,R),yn=Wn("class",we,j),Nn=()=>Ct.map((le,Se)=>{const ze=`${r.transactionId}_${le.key}_${i.lineId}`;if(l>0&&m!=null&&Nt(m)===!0&&le.key==="vendor")return t.jsx(it,{windowSize:u,wrapperWidth:le.width},ze);if(l>0&&le.key==="transaction_type")return t.jsx(it,{windowSize:u,wrapperWidth:le.width},ze);switch(le.key){case"vendor":default:return t.jsxs(it,{windowSize:u,wrapperWidth:le.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:k,type:"vendor",isFirstColumn:!0,isEnabled:!!ve?.isPreFilled,isMisCategorized:Kt,onRecommendationClick:P,selectedValue:ie,selectedValueLabel:E,isReviewTab:et,isAccountOptionDisabled:me,existingOption:{label:m!=null&&Nt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Nt(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(lo,{children:$e===!0?t.jsx(ao,{isHovered:C,children:t.jsxs(io,{onClick:Ke=>{Ke.stopPropagation(),M?.(),ge(!1),qe(!0)},"data-testid":B("add-vendor-button",f),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Tt.addPayee]})}):Qe===!0?t.jsx(ft,{onClickAway:St,children:t.jsx(Zp,{"data-testid":B("vendor-selection-dropdown-container",Lt(f,at,l.toString())),children:t.jsx(hr,{name:ce,placeholder:Tt.addPayee,valueToInfo:re,defaultValue:{selectedOption:Be.selectedOption,defaultOptions:Be.defaultOptions},type:"vendor",autoFocus:!$e,style:{width:"100%"},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:h,menuIsOpen:Qe,onMenuClose:St,registerOptions:{required:!1},loadOptions:rt,showCOT:$,onCOTView:V,menuPlacement:O})})}):t.jsx(Qp,{children:t.jsxs(ro,{isHovered:C,showOutline:Kt&&ve?.isPreFilled!==!0&&!w&&et,children:[It(),t.jsx(Yp,{onClick:kt,"data-testid":B("vendor-name-text",f),children:ve!=null&&ve.name?t.jsx(nt,{text:ve.name,itemTextStyle:{color:C?_.colors.primary:_.colors.hero}}):t.jsx(Xp,{children:An})})]})})})]},ze);case"category":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(it,{windowSize:u,wrapperWidth:le.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:k,type:"category",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Te]?.isPreFilled,isAccountOptionDisabled:me,isMisCategorized:fn,onRecommendationClick:P,selectedValue:R,selectedValueLabel:an,existingOption:{label:Ke?.account?.accountName,value:Ke?.account?.qboId??Ke?.account?.accountId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(lo,{children:oe===!0?t.jsx(ao,{isHovered:C,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),M?.(),Ce(!1),ot(!0)},"data-testid":B("category-selection-field",te),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Tt.addCategory]})}):Ne===!0?t.jsx(ft,{onClickAway:mt,children:t.jsx(Vi,{isHovered:C,"data-testid":B("category-selection-dropdown-container",te),children:t.jsx(Yo,{name:te,placeholder:Tt.addCategory,valueToId:zt=>Ae(zt),type:"category",pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:R,allOptions:he},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Ne,autoFocus:!oe&&(!R||i[Te]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Te].qboId)),onMenuClose:mt,customStyleConfig:p,disableCurrentOption:me,menuPlacement:O,onCOTView:V})})}):t.jsx(ro,{isHovered:C,showOutline:fn&&i[Te]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{onClick:X,"data-testid":B("category-label-text",te),children:t.jsx(nt,{text:an??"",itemTextStyle:{color:C?_.colors.primary:_.colors.hero}})})})})]},ze)}case"class":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(it,{windowSize:u,wrapperWidth:le.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:k,type:"class",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Ye]?.isPreFilled,isAccountOptionDisabled:me,isMisCategorized:yn,onRecommendationClick:P,selectedValue:j,selectedValueLabel:_t,existingOption:{label:Ke?.class?.className,value:Ke?.class?.classId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(lo,{children:J===!0?t.jsx(ao,{isHovered:C,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),M?.(),K(!1),de(!0)},"data-testid":B("class-selection-field",ne),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Tt.addClass]})}):Je===!0?t.jsx(ft,{onClickAway:jt,children:t.jsx(Vi,{isHovered:C,"data-testid":B("class-selection-dropdown-container",ne),children:t.jsx(Yo,{name:ne,placeholder:Tt.addClass,valueToId:zt=>Ee(zt),type:"class",showCOT:$,defaultValue:{selectedOption:j,allOptions:we},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",menuIsOpen:Je,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!J&&!j,customStyleConfig:p,onMenuClose:jt,menuPlacement:O,onCOTView:V})})}):t.jsx(ro,{isHovered:C,showOutline:yn&&i[Ye]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{"data-testid":B("class-selection-field",ne),onClick:Me,children:t.jsx(nt,{text:_t??"",itemTextStyle:{color:C?_.colors.primary:_.colors.hero}})})})})]},ze)}case"date":return t.jsx(it,{windowSize:u,wrapperWidth:le.width,children:t.jsx(on,{windowSize:u,isLastItem:Se===Ct.length-1,children:t.jsx(So,{"data-testid":B("date-field",Lt(f,Ye,l.toString())),children:t.jsx(Pp,{style:{color:C?_.colors.primary:_.colors.hero},children:q!=null?q.format(Rp.visual.MMMDCommaYYYYformat):null})})})},ze);case"transaction_type":return t.jsx(it,{windowSize:u,wrapperWidth:le.width,children:t.jsx(on,{windowSize:u,"data-testid":B("transaction-type-field",Lt(f,Ye,l.toString())),isLastItem:Se===Ct.length-1,children:Y!=null?t.jsx(dr,{textColor:C?new $o(_.colors.primary):ur(void 0,_),text:Y??z}):null})},ze);case"memo":return t.jsx(it,{windowSize:u,wrapperWidth:le.width,children:t.jsx(on,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:Se===Ct.length-1,"data-testid":B("memo-field",Lt(f,Ye,l.toString())),children:fe!=null?t.jsx(ye,{placement:"bottom",data:fe,variant:"multi-information-points",children:t.jsx(Vp,{style:{color:C?_.colors.primary:_.colors.hero}})}):t.jsx(Np,{children:An})})},ze);case"amount":{const Ke=Ue("0,0.[00]",i.amount,!0);return t.jsx(it,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:le.width,children:t.jsx(on,{windowSize:u,isLastItem:Se===Ct.length-1,children:t.jsx(So,{"data-testid":B("transaction-amount-field",Lt(f,Ye,l.toString())),style:{color:C?_.colors.primary:_.colors.hero},children:Ke})})},ze)}}});return t.jsx(t.Fragment,{children:Nn()})},Bi=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:p=!1})=>e?n?p?t.jsx(Up,{}):t.jsx(Hp,{}):p?t.jsx(Wp,{}):t.jsx(qp,{className:"ai-icon-selected-plain"}):!e&&d||c?p?t.jsx(Kp,{}):t.jsx(Jp,{}):null,Pi=({isFirstColumn:e,children:n})=>t.jsx(ra,{isFirstColumn:e,children:n}),oo=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:p,isFirstColumn:h,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:C,transactionId:w,isAccountOptionDisabled:f,onRecommendationClick:v,setOpenTooltipId:I})=>{const y=s.useMemo(()=>`${w}:${x}:${d}`,[w,x,d]),$=C===y,O=gr().analytics,{createAlternateRecommendationCallback:T}=xr(),D=s.useCallback(q=>{const z=e[1],Y=e[0];T(d,{currentValue:p??Qt,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:w,lineId:x,onCOTView:(N,G,V,Z)=>{u.onCOTView?.(N,G,V,Z)}}:void 0},z,Y)(q)},[T,e,p,c,d,u,x,w]),S=fr(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",v,D,r,f),b=yr(e,d),A=s.useCallback(()=>{I(y);const q=S?.recommendations[0]?.cot??[],z=S?.recommendations[1]?.cot??[],Y=z.length>0;if(O.trackTransactionCotView({recommendationFor:d,currentValue:p??Qt,recommendation:S?.recommendations[0]?.name??Qt,recommendationCot:q,isRecommendationCotAvailable:q.length>0,recommendationReason:S?.recommendations[0]?.reason??Qt,recommendationConfidencePercentage:S?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Wo(Uo(S?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:S?.recommendations[1]?.name??Qt,alternativeRecommendationCot:z,isAlternativeRecommendationCotAvailable:Y,alternativeRecommendationReason:S?.recommendations[1]?.reason??Qt,alternativeRecommendationConfidencePercentage:S?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:Y?Wo(Uo(S?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const N=Cr(S);N!=null&&u.onCOTView(x,w,d,N)}},[O,S,c,p,d,x,w,y,I]),L=s.useCallback(()=>{C===y&&I(void 0)},[C,y,I]),H=s.useMemo(()=>!r||!b?!1:e.some(q=>d==="vendor"&&q.vendor!=null?q.vendor.id===r||q.vendor.qboId===r:d==="category"&&q.account!=null?q.account.qboId===r||q.account.accountId===r:d==="class"&&q.class!=null?q.class.classId===r:!1),[r,b,e,d]);if(!b)return t.jsx(ra,{isFirstColumn:h});const M=i||H;return S?t.jsx(Pi,{isFirstColumn:h,children:t.jsx(ye,{variant:"chain-of-thought",data:S,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:L,children:t.jsx(Gp,{children:t.jsx(Bi,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:b,isTooltipVisible:$})})})}):t.jsx(Pi,{isFirstColumn:h,children:t.jsx(Bi,{isEnabled:M,isReviewTab:c,isMisCategorized:l,hasRecommendations:b,isTooltipVisible:$})})},aa=()=>{const e=ke(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(Mp,{windowSize:e,ref:n,children:Ct.map((p,h)=>{const i=`${h}${Ep}${p.key}`;switch(p.key){case"vendor":return t.jsx(it,{windowSize:e,wrapperWidth:p.width,children:t.jsx(on,{windowSize:e,isLastItem:h===Ct.length-1,children:t.jsxs(So,{children:[t.jsx(To,{width:g[4],height:g[4]}),t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(it,{windowSize:e,wrapperWidth:p.width,children:t.jsx(on,{windowSize:e,isLastItem:h===Ct.length-1,children:t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},Mp=a.div`
1222
+ `,to="expenseAutomationTransactionsPage",Ut="transactionCategorizationListTable",Te="account",Ye="class",at="lineEntitySelection",Ip="lineEntity",$p="recommendations",ia="lineInfo",Lp="vendorDetails",Tp="customerDetails",zn="selectedTransactionIds",Lt=(e,n,d)=>`${e}.${d}.${n}`,Ap=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Ep,hyphen:An,empty:Qt}},expenseAutomation:{transactions:Tt},dateFormat:Rp}=Ie.getLocalizedStrings(),Et={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[1],g[2]),containerPaddingTopBottomEmpty:new ee(g[2],g[3]),nameLogoWidth:new ee(g[2],g[4]),nameLogoHeight:new ee(g[2],g[4])},Dp=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:p,selectedTab:h,containerRef:i,listContainerRef:l,isCOTEnabled:r,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:x,vendorLoadOptions:C,openTooltipId:w,setOpenTooltipId:f,isUncategorizedExpenseCategoryEnabled:v})=>{const I=ke(),[y,$]=s.useState(!1),{lineItemById:O,sortedLineItems:T}=n.transactionReviewLocalData,D=n.transactionReviewLocalData.tabSpecificLineItems?.[h]||[],S=T.filter(_=>D.indexOf(_)!==-1),b=[];S.forEach(_=>{b.push(O[_])});const{accountList:A,accountsHierarchyList:L,classHierarchyList:H,classList:z,uncategorizedAccounts:q,transactions:F,selectedCheckBoxTransactionIds:Y}=e,N=Y.includes(n.transactionId),G=bt(),V={control:()=>({marginLeft:-2,backgroundColor:y?G.colors.background:G.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:G.colors.grey5}),singleValue:()=>({color:y||N?G.colors.primary:G.colors.hero,paddingLeft:g[2]}),input:_=>({..._,color:y||N?G.colors.primary:G.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:_=>({..._,zIndex:10})},Z={...V,singleValue:_=>({..._,color:y||N?G.colors.primary:G.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:_=>({..._,color:y||N?G.colors.primary:G.colors.hero,textAlign:"left"})},fe=F.find(_=>_.id===n.transactionId),le=(_,j)=>{const{transactionType:R}=j.transactionReviewLocalData;let W=_.target;for(;W;){if(W.classList.contains("select-value-container")||W.classList.contains("item-value-container")||W.classList.contains("grouped-single-select-field__value-container")||W.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||W.classList.contains("grouped-single-select-field__input")||W.classList.contains("grouped-single-select-field__menu"))return;W=W.parentElement}R!=null&&u(j.transactionId,R)},te=s.useRef(null),[ne,P]=s.useState(void 0),[B,U]=s.useState("bottom");return s.useEffect(()=>{if(ne===void 0)return;const _=l?.current?._outerRef??null,j=()=>{const R=te.current;if(R==null||_==null)return;const W=R.getBoundingClientRect(),ie=_.getBoundingClientRect(),E=_.scrollTop+(W.bottom-ie.top),J=_.scrollHeight-E;U(J>=288?"bottom":"top")};return j(),window.addEventListener("resize",j),_?.addEventListener("scroll",j),()=>{window.removeEventListener("resize",j),_?.removeEventListener("scroll",j)}},[l,ne]),t.jsx(Bp,{onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),windowSize:I,isSelected:N,isHovered:y,children:t.jsx(Fp,{children:b.map((_,j)=>t.jsx(_p,{ref:ne===j?te:void 0,"data-testid":M("transaction-categorization-list-row",_.lineId),windowSize:I,onClick:R=>le(R,n),children:t.jsx(Op,{line:_,isHovered:y||N,isSelected:N,lineIndex:j,sectionId:d,transaction:n,currentTransaction:fe,windowSize:I,accountsHierarchyList:L,classHierarchyList:H,allAccountList:A,allClassList:z,uncategorizedAccounts:q,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:p,setCurrentTransactionInAction:x,vendorLoadOptions:C,customStyle:V,customStyleAutoComplete:Z,recommendations:_.recommendationsWithCOT,selectedTab:h,isCOTEnabled:r,menuPlacement:B,cotTracking:m,openTooltipId:w,setOpenTooltipId:f,isUncategorizedExpenseCategoryEnabled:v,onDropdownClose:()=>P(void 0),onDropdownOpen:()=>P(j)})},`${n.transactionId}.${_.lineId}`))},n.transactionId)},n.transactionId)},Op=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:p,customStyleAutoComplete:h,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:C=!1,isSelected:w=!1,sectionId:f,recommendations:v,vendorSearchAutoCompleteData:I,selectedTab:y,isCOTEnabled:$,menuPlacement:O,cotTracking:T,openTooltipId:D,setCurrentTransactionInAction:S,vendorLoadOptions:b,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:L,onDropdownClose:H,onDropdownOpen:z})=>{const{transactionDate:q,transactionType:F,transactionTypeName:Y,memo:N}=r.transactionReviewLocalData,{setValue:G}=$o(),V=s.useCallback((he,Se)=>{T?.onCOTView!=null&&T.onCOTView(i.lineId,r.transactionId,he,Se)},[T,i.lineId,r.transactionId]),Z=i.lineDescription,fe=s.useMemo(()=>{if(Z||N)return[{title:Tt.description,description:Z||An},{title:Tt.header.memo,description:N||An}]},[N,Z]),le=Lt(f,at,l.toString()),te=Lt(f,Te,l.toString()),ne=Lt(f,Ye,l.toString()),P=(he,Se)=>{let Fe;switch(Se){case"vendor":Fe=le;break;case"category":Fe=te;break;case"class":Fe=ne;break;default:return}G(`${Fe}.selectedOption`,he,{shouldValidate:!0,shouldDirty:!0})},B=bt(),U=s.useMemo(()=>m!=null&&Nt(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),_=s.useMemo(()=>m!=null&&Nt(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),j=i[Ye]?.classId,R=i[Te]?.qboId??i[Te]?.accountId,W=U?.id,ie=_?.id,E=_?.name,[J,K]=s.useState(!j),[oe,Ce]=s.useState(!R||i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!0),[$e,ge]=s.useState(!ie||!W),re=he=>v?.find(Se=>Se.vendor?.qboId===he||Se.vendor?.id===he||Se.vendor?.name===he)?.vendor?.reason??"",k=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],ue=vs(e,k),we=bs(c,k),Ae=he=>n.filter(Se=>Se.qboId===he)[0]?.qboId,Ee=he=>d.filter(Se=>Se.classId===he)[0]?.accountingClassNumber??void 0,me=s.useCallback(he=>cn(x,he,L===!0?["income"]:void 0),[x,L]),[Qe,qe]=s.useState(!1),[Je,ce]=s.useState(!1),[Ne,ot]=s.useState(!1),rt=(he,Se)=>{S({transactionId:r.transactionId,lineItemId:i.lineId}),b(he,Se)},St=()=>{ge(!(ie||W)),qe(!1),H?.()},mt=()=>{R&&i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!1?Ce(!1):Ce(!0),ot(!1),H?.()},jt=()=>{K(!j),ce(!1),H?.()},kt=()=>{(ie||W)&&(qe(!0),z?.())},ze=()=>{ce(!0),z?.()},X=()=>{ot(!0),z?.()};s.useEffect(()=>{R&&i[Te]?.qboId!=null&&cn(x,i[Te].qboId,L===!0?["income"]:void 0)===!1?Ce(!1):Ce(!0)},[R]),s.useEffect(()=>{K(!j)},[j]),s.useEffect(()=>{ge(!(ie||W))},[ie,W]);const be=r.transactionReviewLocalData.selectedEntity,je=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,ve=m!=null&&Nt(m)===!0?be:je,Me=s.useMemo(()=>{const he=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],Se=I.entityAutoCompleteView;return{selectedOption:ve?.qboId??ve?.id,defaultOptions:ko(Se,ve,he??[])}},[ve,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),It=()=>ve!=null&&ve.logo!=null?t.jsx(ys,{photoUrl:ve.logo.toString(),styles:{width:Et.nameLogoWidth.valuePx(u),height:Et.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Pi,{children:t.jsx(hn,{name:ve.name,size:o.sp4})})}):ve!=null&&ve.name!=null?t.jsx(Pi,{children:t.jsx(hn,{name:ve.name,size:o.sp4})}):null,zt=(he,Se)=>{if(Se==null||!Se)return;let Fe=[];return he.forEach(Ke=>{Fe=Fe.concat(Ke.options)}),Fe.find(Ke=>Ke.value===Se)?.label??Se},Bt=zt(we,j),an=zt(ue,R),et=y==="review",Kt=Hn("vendor",Me.defaultOptions,Me.selectedOption),fn=Hn("category",ue,R),yn=Hn("class",we,j),la=()=>Ct.map((he,Se)=>{const Fe=`${r.transactionId}_${he.key}_${i.lineId}`;if(l>0&&m!=null&&Nt(m)===!0&&he.key==="vendor")return t.jsx(it,{windowSize:u,wrapperWidth:he.width},Fe);if(l>0&&he.key==="transaction_type")return t.jsx(it,{windowSize:u,wrapperWidth:he.width},Fe);switch(he.key){case"vendor":default:return t.jsxs(it,{windowSize:u,wrapperWidth:he.width,className:"item-value-container",children:[t.jsx(no,{isCOTEnabled:$,recommendations:k,type:"vendor",isFirstColumn:!0,isEnabled:!!ve?.isPreFilled,isMisCategorized:Kt,onRecommendationClick:P,selectedValue:ie,selectedValueLabel:E,isReviewTab:et,isAccountOptionDisabled:me,existingOption:{label:m!=null&&Nt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Nt(m)===!0?m?.vendor?.id:void 0},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(ro,{children:$e===!0?t.jsx(so,{isHovered:C,children:t.jsxs(oo,{onClick:Ke=>{Ke.stopPropagation(),z?.(),ge(!1),qe(!0)},"data-testid":M("add-vendor-button",f),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(io,{}),Tt.addPayee]})}):Qe===!0?t.jsx(ft,{onClickAway:St,children:t.jsx(Zp,{"data-testid":M("vendor-selection-dropdown-container",Lt(f,at,l.toString())),children:t.jsx(hr,{name:le,placeholder:Tt.addPayee,valueToInfo:re,defaultValue:{selectedOption:Me.selectedOption,defaultOptions:Me.defaultOptions},type:"vendor",autoFocus:!$e,style:{width:"100%"},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:h,menuIsOpen:Qe,onMenuClose:St,registerOptions:{required:!1},loadOptions:rt,showCOT:$,onCOTView:V,menuPlacement:O})})}):t.jsx(Qp,{children:t.jsxs(ao,{isHovered:C,showOutline:Kt&&ve?.isPreFilled!==!0&&!w&&et,children:[It(),t.jsx(Yp,{onClick:kt,"data-testid":M("vendor-name-text",f),children:ve!=null&&ve.name?t.jsx(nt,{text:ve.name,itemTextStyle:{color:C?B.colors.primary:B.colors.hero}}):t.jsx(Xp,{children:An})})]})})})]},Fe);case"category":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(it,{windowSize:u,wrapperWidth:he.width,className:"item-value-container",children:[t.jsx(no,{isCOTEnabled:$,recommendations:k,type:"category",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Te]?.isPreFilled,isAccountOptionDisabled:me,isMisCategorized:fn,onRecommendationClick:P,selectedValue:R,selectedValueLabel:an,existingOption:{label:Ke?.account?.accountName,value:Ke?.account?.qboId??Ke?.account?.accountId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(ro,{children:oe===!0?t.jsx(so,{isHovered:C,children:t.jsxs(oo,{onClick:Ft=>{Ft.stopPropagation(),z?.(),Ce(!1),ot(!0)},"data-testid":M("category-selection-field",te),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(io,{}),Tt.addCategory]})}):Ne===!0?t.jsx(ft,{onClickAway:mt,children:t.jsx(Ni,{isHovered:C,"data-testid":M("category-selection-dropdown-container",te),children:t.jsx(Go,{name:te,placeholder:Tt.addCategory,valueToId:Ft=>Ae(Ft),type:"category",pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:R,allOptions:ue},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Ne,autoFocus:!oe&&(!R||i[Te]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Te].qboId)),onMenuClose:mt,customStyleConfig:p,disableCurrentOption:me,menuPlacement:O,onCOTView:V})})}):t.jsx(ao,{isHovered:C,showOutline:fn&&i[Te]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Vi,{onClick:X,"data-testid":M("category-label-text",te),children:t.jsx(nt,{text:an??"",itemTextStyle:{color:C?B.colors.primary:B.colors.hero}})})})})]},Fe)}case"class":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(it,{windowSize:u,wrapperWidth:he.width,className:"item-value-container",children:[t.jsx(no,{isCOTEnabled:$,recommendations:k,type:"class",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Ye]?.isPreFilled,isAccountOptionDisabled:me,isMisCategorized:yn,onRecommendationClick:P,selectedValue:j,selectedValueLabel:Bt,existingOption:{label:Ke?.class?.className,value:Ke?.class?.classId},cotTracking:T,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:D,setOpenTooltipId:A}),t.jsx(ro,{children:J===!0?t.jsx(so,{isHovered:C,children:t.jsxs(oo,{onClick:Ft=>{Ft.stopPropagation(),z?.(),K(!1),ce(!0)},"data-testid":M("class-selection-field",ne),style:{display:"inline-flex",alignItems:"center",color:Xe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(io,{}),Tt.addClass]})}):Je===!0?t.jsx(ft,{onClickAway:jt,children:t.jsx(Ni,{isHovered:C,"data-testid":M("class-selection-dropdown-container",ne),children:t.jsx(Go,{name:ne,placeholder:Tt.addClass,valueToId:Ft=>Ee(Ft),type:"class",showCOT:$,defaultValue:{selectedOption:j,allOptions:we},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",menuIsOpen:Je,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!J&&!j,customStyleConfig:p,onMenuClose:jt,menuPlacement:O,onCOTView:V})})}):t.jsx(ao,{isHovered:C,showOutline:yn&&i[Ye]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Vi,{"data-testid":M("class-selection-field",ne),onClick:ze,children:t.jsx(nt,{text:Bt??"",itemTextStyle:{color:C?B.colors.primary:B.colors.hero}})})})})]},Fe)}case"date":return t.jsx(it,{windowSize:u,wrapperWidth:he.width,children:t.jsx(on,{windowSize:u,isLastItem:Se===Ct.length-1,children:t.jsx(vo,{"data-testid":M("date-field",Lt(f,Ye,l.toString())),children:t.jsx(Pp,{style:{color:C?B.colors.primary:B.colors.hero},children:q!=null?q.format(Rp.visual.MMMDCommaYYYYformat):null})})})},Fe);case"transaction_type":return t.jsx(it,{windowSize:u,wrapperWidth:he.width,children:t.jsx(on,{windowSize:u,"data-testid":M("transaction-type-field",Lt(f,Ye,l.toString())),isLastItem:Se===Ct.length-1,children:Y!=null?t.jsx(dr,{textColor:C?new Io(B.colors.primary):ur(void 0,B),text:Y??F}):null})},Fe);case"memo":return t.jsx(it,{windowSize:u,wrapperWidth:he.width,children:t.jsx(on,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:Se===Ct.length-1,"data-testid":M("memo-field",Lt(f,Ye,l.toString())),children:fe!=null?t.jsx(ye,{placement:"bottom",data:fe,variant:"multi-information-points",children:t.jsx(Vp,{style:{color:C?B.colors.primary:B.colors.hero}})}):t.jsx(Np,{children:An})})},Fe);case"amount":{const Ke=Ue("0,0.[00]",i.amount,!0);return t.jsx(it,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:he.width,children:t.jsx(on,{windowSize:u,isLastItem:Se===Ct.length-1,children:t.jsx(vo,{"data-testid":M("transaction-amount-field",Lt(f,Ye,l.toString())),style:{color:C?B.colors.primary:B.colors.hero},children:Ke})})},Fe)}}});return t.jsx(t.Fragment,{children:la()})},_i=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:p=!1})=>e?n?p?t.jsx(Up,{}):t.jsx(Hp,{}):p?t.jsx(Wp,{}):t.jsx(qp,{className:"ai-icon-selected-plain"}):!e&&d||c?p?t.jsx(Kp,{}):t.jsx(Jp,{}):null,Mi=({isFirstColumn:e,children:n})=>t.jsx(aa,{isFirstColumn:e,children:n}),no=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:p,isFirstColumn:h,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:C,transactionId:w,isAccountOptionDisabled:f,onRecommendationClick:v,setOpenTooltipId:I})=>{const y=s.useMemo(()=>`${w}:${x}:${d}`,[w,x,d]),$=C===y,O=gr().analytics,{createAlternateRecommendationCallback:T}=xr(),D=s.useCallback(q=>{const F=e[1],Y=e[0];T(d,{currentValue:p??Qt,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:w,lineId:x,onCOTView:(N,G,V,Z)=>{u.onCOTView?.(N,G,V,Z)}}:void 0},F,Y)(q)},[T,e,p,c,d,u,x,w]),S=fr(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",v,D,r,f),b=yr(e,d),A=s.useCallback(()=>{I(y);const q=S?.recommendations[0]?.cot??[],F=S?.recommendations[1]?.cot??[],Y=F.length>0;if(O.trackTransactionCotView({recommendationFor:d,currentValue:p??Qt,recommendation:S?.recommendations[0]?.name??Qt,recommendationCot:q,isRecommendationCotAvailable:q.length>0,recommendationReason:S?.recommendations[0]?.reason??Qt,recommendationConfidencePercentage:S?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Ho(Wo(S?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:S?.recommendations[1]?.name??Qt,alternativeRecommendationCot:F,isAlternativeRecommendationCotAvailable:Y,alternativeRecommendationReason:S?.recommendations[1]?.reason??Qt,alternativeRecommendationConfidencePercentage:S?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:Y?Ho(Wo(S?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const N=Cr(S);N!=null&&u.onCOTView(x,w,d,N)}},[O,S,c,p,d,x,w,y,I]),L=s.useCallback(()=>{C===y&&I(void 0)},[C,y,I]),H=s.useMemo(()=>!r||!b?!1:e.some(q=>d==="vendor"&&q.vendor!=null?q.vendor.id===r||q.vendor.qboId===r:d==="category"&&q.account!=null?q.account.qboId===r||q.account.accountId===r:d==="class"&&q.class!=null?q.class.classId===r:!1),[r,b,e,d]);if(!b)return t.jsx(aa,{isFirstColumn:h});const z=i||H;return S?t.jsx(Mi,{isFirstColumn:h,children:t.jsx(ye,{variant:"chain-of-thought",data:S,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:L,children:t.jsx(Gp,{children:t.jsx(_i,{isEnabled:z,isReviewTab:c,isMisCategorized:l,hasRecommendations:b,isTooltipVisible:$})})})}):t.jsx(Mi,{isFirstColumn:h,children:t.jsx(_i,{isEnabled:z,isReviewTab:c,isMisCategorized:l,hasRecommendations:b,isTooltipVisible:$})})},sa=()=>{const e=ke(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(zp,{windowSize:e,ref:n,children:Ct.map((p,h)=>{const i=`${h}${Ep}${p.key}`;switch(p.key){case"vendor":return t.jsx(it,{windowSize:e,wrapperWidth:p.width,children:t.jsx(on,{windowSize:e,isLastItem:h===Ct.length-1,children:t.jsxs(vo,{children:[t.jsx(Lo,{width:g[4],height:g[4]}),t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(it,{windowSize:e,wrapperWidth:p.width,children:t.jsx(on,{windowSize:e,isLastItem:h===Ct.length-1,children:t.jsx(Dt,{width:d*p.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},zp=a.div`
1223
1223
  display: flex;
1224
1224
  background-color: ${e=>e.theme.colors.grey5};
1225
1225
  padding-left: ${e=>Et.containerPaddingLeftRight.valuePx(e.windowSize)};
@@ -1238,7 +1238,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1238
1238
  box-sizing: border-box;
1239
1239
  align-items: center;
1240
1240
  justify-content: space-between;
1241
- `,_p=a.div`
1241
+ `,Bp=a.div`
1242
1242
  display: flex;
1243
1243
  height: 100%;
1244
1244
  flex: 1;
@@ -1266,7 +1266,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1266
1266
  color: ${n.colors.primary};
1267
1267
  }
1268
1268
  `:null};
1269
- `,zp=a.div`
1269
+ `,Fp=a.div`
1270
1270
  display: flex;
1271
1271
  flex: 1;
1272
1272
  flex-direction: column;
@@ -1274,7 +1274,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1274
1274
  box-sizing: border-box;
1275
1275
  align-items: center;
1276
1276
  justify-content: space-around;
1277
- `,Fp=a.div`
1277
+ `,_p=a.div`
1278
1278
  display: flex;
1279
1279
  flex: 1;
1280
1280
  flex-direction: row;
@@ -1294,7 +1294,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1294
1294
  :last-of-type {
1295
1295
  padding-right: ${o.sp0};
1296
1296
  }
1297
- `,Bp=Ze`
1297
+ `,Mp=Ze`
1298
1298
  word-break: break-word;
1299
1299
  white-space: nowrap;
1300
1300
  -webkit-line-clamp: 1;
@@ -1302,23 +1302,23 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1302
1302
  overflow: hidden;
1303
1303
  text-overflow: ellipsis;
1304
1304
  display: -webkit-box;
1305
- `,on=a(_e)`
1305
+ `,on=a(Be)`
1306
1306
  overflow: hidden;
1307
1307
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1308
1308
  display: flex;
1309
1309
  width: 100%;
1310
1310
  align-items: center;
1311
- `,So=a.div`
1311
+ `,vo=a.div`
1312
1312
  display: flex;
1313
1313
  flex-direction: row;
1314
1314
  column-gap: ${o.sp2};
1315
1315
  align-items: center;
1316
- `,Pp=a(_e)`
1317
- ${Bp};
1316
+ `,Pp=a(Be)`
1317
+ ${Mp};
1318
1318
  color: ${e=>e.theme.colors.hero};
1319
- `,io=a(_e)`
1319
+ `,oo=a(Be)`
1320
1320
  color: ${e=>e.theme.colors.hero};
1321
- `,so=a(Pn)`
1321
+ `,io=a(Pn)`
1322
1322
  width: ${o.sp3};
1323
1323
  height: ${o.sp3};
1324
1324
  margin: ${o.sp1};
@@ -1331,13 +1331,13 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1331
1331
  `,Hp=a(Sr)`
1332
1332
  width: ${o.sp5};
1333
1333
  height: ${o.sp5};
1334
- `,Wp=a(zr)`
1334
+ `,Wp=a(Fr)`
1335
1335
  width: ${o.sp5};
1336
1336
  height: ${o.sp5};
1337
1337
  `,Up=a(vr)`
1338
1338
  width: ${o.sp5};
1339
1339
  height: ${o.sp5};
1340
- `,qp=a(Fr)`
1340
+ `,qp=a(_r)`
1341
1341
  width: ${o.sp5};
1342
1342
  height: ${o.sp5};
1343
1343
  `,Jp=a(gn)`
@@ -1349,7 +1349,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1349
1349
  `,Kp=a(jr)`
1350
1350
  width: ${o.sp3};
1351
1351
  height: ${o.sp3};
1352
- `,ra=a.div`
1352
+ `,aa=a.div`
1353
1353
  display: flex;
1354
1354
  align-items: center;
1355
1355
  justify-content: center;
@@ -1362,7 +1362,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1362
1362
  justify-content: center;
1363
1363
  width: auto;
1364
1364
  cursor: pointer;
1365
- `,Yp=a(_e)`
1365
+ `,Yp=a(Be)`
1366
1366
  display: flex;
1367
1367
  max-width: calc(100% - ${o.sp6});
1368
1368
  flex: 1 1 auto;
@@ -1371,7 +1371,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1371
1371
  align-items: center;
1372
1372
  overflow: hidden;
1373
1373
  display: flex;
1374
- `,Ni=a.div`
1374
+ `,Pi=a.div`
1375
1375
  display: flex;
1376
1376
  `,Zp=a.div`
1377
1377
  width: 100%;
@@ -1382,13 +1382,13 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1382
1382
  display: flex;
1383
1383
  align-items: center;
1384
1384
  flex-direction: row;
1385
- `,ao=a.div`
1385
+ `,so=a.div`
1386
1386
  padding: ${o.sp0} ${o.sp2};
1387
1387
  border-radius: ${o.sp1};
1388
1388
  margin-left: ${o.sp0};
1389
1389
  width: 100%;
1390
1390
  background-color: ${e=>e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1391
- `,Vi=a.div`
1391
+ `,Ni=a.div`
1392
1392
  width: 100%;
1393
1393
  border-radius: ${o.sp1};
1394
1394
  padding-left: 2px;
@@ -1397,11 +1397,11 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1397
1397
  display: flex;
1398
1398
  align-items: center;
1399
1399
  flex-direction: row;
1400
- `,Xp=a(_e)``,Qp=a.div`
1400
+ `,Xp=a(Be)``,Qp=a.div`
1401
1401
  width: 100%;
1402
1402
  display: flex;
1403
1403
  padding-left: ${o.sp0};
1404
- `,ro=a.div`
1404
+ `,ao=a.div`
1405
1405
  width: 100%;
1406
1406
  display: flex;
1407
1407
  flex-direction: row;
@@ -1413,11 +1413,11 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1413
1413
  background-color: ${e=>e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1414
1414
  outline: ${e=>e.showOutline?`1px dashed ${e.theme.colors.grey1}`:"none"};
1415
1415
  outline-color: ${e=>e.isHovered&&e.theme.colors.primary};
1416
- `,Hi=a.div``,lo=a.div`
1416
+ `,Vi=a.div``,ro=a.div`
1417
1417
  display: flex;
1418
1418
  align-items: center;
1419
1419
  width: calc(100% - ${o.sp5});
1420
- `,em=({sortConfig:e,fetchState:n,isDisabled:d,onColumnSortConfigChanged:c})=>{const p=ke();return t.jsxs(tm,{windowSize:p,children:[t.jsx(ia,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":d,onColumnSortConfigChanged:c,"data-testid":B("transaction-categorization-list-empty-table-header")}),t.jsx(nm,{windowSize:p,"data-testid":B("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((h,i)=>t.jsx(aa,{"data-testid":B("transaction-categorization-list-empty-row",i.toString())},i))})]})},tm=a.div`
1420
+ `,em=({sortConfig:e,fetchState:n,isDisabled:d,onColumnSortConfigChanged:c})=>{const p=ke();return t.jsxs(tm,{windowSize:p,children:[t.jsx(oa,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":d,onColumnSortConfigChanged:c,"data-testid":M("transaction-categorization-list-empty-table-header")}),t.jsx(nm,{windowSize:p,"data-testid":M("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((h,i)=>t.jsx(sa,{"data-testid":M("transaction-categorization-list-empty-row",i.toString())},i))})]})},tm=a.div`
1421
1421
  display: block;
1422
1422
  min-height: 100%;
1423
1423
  flex-direction: column;
@@ -1430,7 +1430,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1430
1430
  min-height: 100%;
1431
1431
  flex-direction: column;
1432
1432
  row-gap: ${o.sp3};
1433
- `,{common:om,transactionDetail:{notCategorizedTooltipText:im}}=Ie.getLocalizedStrings(),co={rowGap:new ee(g[0],g[2],g[3])},sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:p,isCOTEnabled:h,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:C,onUpdateScrollYOffSetTransactionCategorizationUIState:w,onFetchTransactionCategorizationList:f,containerRef:v,cotTracking:I,isUncategorizedExpenseCategoryEnabled:y})=>{const $=ke(),[O,T]=s.useState(void 0),{fetchState:D,uiState:S,transactionLocalData:b,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:L,transactions:H,uncategorizedAccounts:M}=n,q=s.useRef(null),z=s.useRef({}),{control:Y}=Lo();s.useEffect(()=>{q.current?.resetAfterIndex(0,!0)},[$,q,b]),s.useEffect(()=>{q.current?.scrollTo(S.scrollPosition?.scrollTop??0)},[e]);const N=s.useCallback(E=>{if(z.current?.[E]!=null){const oe=$==="small"&&S.pageToken==null&&E===b.length-1?co.rowGap.value("medium-regular"):co.rowGap.value($);return z.current[E]+oe}if(b[E]==null)return 0;const J=b[E].transactionReviewLocalData,K=Object.keys(J.lineItemById).length;return K!=null&&!isNaN(K)&&K>1?zi*K+co.rowGap.value($)*(K-1):zi},[b,$,S.pageToken,S.sortKey,S.sortOrder]),G=s.useCallback((E,J)=>{z.current={...z.current,[E]:J},q.current?.resetAfterIndex(0,!0)},[$,q,b,S.sortKey,S.sortOrder]),V=s.useCallback(()=>{(S.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&f(e,S.searchString,!0,S.pageToken,!0,!1)},[n.refreshStatus.fetchState,f,e,S.pageToken,S.searchString,S.sortKey,S.sortOrder]),Z=s.useCallback(()=>{S.pageToken!=null&&V()},[V,S.pageToken,S.sortKey,S.sortOrder]),fe=tr(E=>w(e,{scrollPosition:{scrollTop:E}}),1e3,{trailing:!0}),ce=E=>E<n.transactionLocalData.length,te=(E,J)=>{C(e,{sortOrder:J,sortKey:E}),f(e,S.searchString,!1,null,!1,!0)},ne=E=>{if(e==="autoCategorized")return!A.includes(E);const J=b.find(oe=>oe.transactionId===E)?.transactionReviewLocalData,K=H.find(oe=>oe.id===E);return K!=null&&J!=null?Dr(K,J,M,y)?y===!0&&Ko(M,J.lineItemById,["expense"])?L.includes(E)===!1:!1:!0:A.length===0?!0:!A.includes(E)};let P=[],_=[];(D==="Completed"||n.transactionLocalData.length>0)&&(_=n.transactionLocalData.map((E,J)=>{const K=ne(E.transactionId);let oe=!1;y===!0&&K===!0&&e==="review"&&Ko(M,E.transactionReviewLocalData.lineItemById,["expense"])&&(oe=!L.includes(E.transactionId));const Ce=E.transactionReviewLocalData;return{label:t.jsx(Dp,{transactionView:n,sectionId:`${p}.${J}.${sa}`,transaction:E,receiptUploadEndpoint:d,authParams:c,onTransactionCategorizationRowClick:x,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,selectedTab:e,containerRef:v,listContainerRef:q,isCOTEnabled:h,cotTracking:I,openTooltipId:O,setOpenTooltipId:T,isUncategorizedExpenseCategoryEnabled:y},`${E.transactionId}.${Ce.transactionType}`),value:E.transactionId,defaultChecked:!1,groupLabel:!1,isException:oe,exceptionMode:oe===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:K===!0?"readonly":void 0,exceptionType:oe===!0?"alert":void 0,exceptionInfo:oe===!0?im:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),P=_.map(E=>E.value));const U={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:F,subTitle:j}=Ve("transaction_categorization").allDoneText,R=b.map(E=>E.transactionId),W=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),ie=s.useMemo(()=>b.reduce((E,J)=>{const K=Object.keys(J.transactionReviewLocalData.lineItemById).length;return E+(K>0?K:1)},0)<n.totalCountByTab[e]?b.length+1:b.length,[b,n.totalCountByTab,e]);return t.jsx(dm,{windowSize:$,"data-testid":B("transaction-categorization-list-wrapper"),children:t.jsx(um,{windowSize:$,"data-testid":B("transaction-categorization-list-container"),children:D==="Error"?t.jsxs(pm,{windowSize:$,"data-testid":B("transaction-categorization-reload-page"),children:[t.jsx(mm,{onClick:()=>f(e,void 0,!0,null,!1,!0),"data-testid":B("transaction-categorization-reload-icon"),children:t.jsx(ko,{})}),t.jsx(gm,{"data-testid":B("transaction-categorization-reload-label"),children:om.reloadPage.label})]}):D==="Completed"&&b.length===0?t.jsx(wt,{tab:"transaction_categorization",title:F,subTitle:j,"data-testid":B("transaction-categorization-empty-table-section")}):D==="Not-Started"||D==="In-Progress"&&b.length===0?t.jsx(em,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},fetchState:D,onColumnSortConfigChanged:te,"data-testid":B("transaction-categorization-list-empty-table")}):t.jsx(hm,{windowSize:$,"data-testid":B("transaction-categorization-list-view"),children:t.jsx(ys,{control:Y,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:E,ref:J,onChange:K}})=>t.jsx(la.Provider,{value:{value:E,mode:"off",allCheckBoxValues:P,index:0,sortKey:S.sortKey,sortOrder:S.sortOrder,fetchState:D,isDisabled:i,groupLabelCheckBox:U,onColumnSortConfigChanged:te,ref:J,onChange:K,selectedTab:e},children:t.jsx(_n,{children:({height:oe,width:Ce})=>t.jsx(nr,{isItemLoaded:ce,itemCount:W,loadMoreItems:Z,children:({onItemsRendered:$e,ref:ge})=>t.jsx(zn,{ref:re=>{ge(re),q.current=re},height:oe,itemCount:ie,itemKey:re=>`${b[re]?.transactionId??""}-row-${re}`,innerElementType:am,onItemsRendered:$e,width:Ce,style:{willChange:"auto"},overscanCount:tp,itemSize:N,itemData:{checkboxes:_,value:E,allCheckBoxValues:P,groupLabelCheckBox:U,categorizationGroupValue:R,transactionLocalData:b,mode:"always_on",setRowHeight:G,isItemLoaded:ce,ref:ge,onChange:K,selectedCheckBoxTransactionIds:A},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:re})=>{fe(re)},children:lm})})})})})})})})},am=e=>{const{value:n,allCheckBoxValues:d,groupLabelCheckBox:c,index:p,isDisabled:h,fetchState:i,sortKey:l,sortOrder:r,mode:m,ref:u,onChange:x,onColumnSortConfigChanged:C}=rm(),{children:w,style:f,...v}=e;return i==="Completed"?t.jsxs(xm,{ref:u,style:{...f,width:"auto"},...v,children:[t.jsx(fm,{children:t.jsx(js,{selectionLimit:mn,value:n,checkBox:{label:t.jsx(cm,{children:t.jsx(ia,{sortConfig:{sortKey:l,sortOrder:r},isDisabled:h,onColumnSortConfigChanged:C})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:c,allCheckBoxValues:d,mode:m,draggable:!1,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:p,onChangeHandler:I=>ks({event:I,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:x}),ref:u})}),t.jsx(ym,{children:w})]},`${d[p]}-${p}`):null},la=s.createContext(void 0),rm=()=>{const e=s.useContext(la);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},lm=({index:e,style:n,data:d})=>{const{checkboxes:c,value:p,groupLabelCheckBox:h,categorizationGroupValue:i,allCheckBoxValues:l,transactionLocalData:r,isItemLoaded:m,setRowHeight:u,ref:x,onChange:C,selectedCheckBoxTransactionIds:w}=d,f=s.useRef(null),v=ke();if(s.useEffect(()=>{f.current?.firstElementChild!=null&&u(e,f.current.firstElementChild.clientHeight)},[e,f,v,r[e]?.transactionReviewLocalData]),m(e)===!0){const I=c[e];return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:f,children:t.jsx(js,{selectionLimit:mn,checkBox:I,value:p,groupLabelCheckBox:h,allCheckBoxValues:l,mode:I.isDisabled==="readonly"||w.includes(I.value)===!1&&w.length>=mn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:{padding:20},name:`${Ut}.${p}`,ref:x,index:e,onChangeHandler:y=>ks({event:y,value:p,allCheckBoxValues:l,groupLabelCheckBox:h,onChange:C})})},i[e])}else return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:f,children:t.jsx(Cm,{children:t.jsx(aa,{})})},cs())},cm=a.div`
1433
+ `,{common:om,transactionDetail:{notCategorizedTooltipText:im}}=Ie.getLocalizedStrings(),lo={rowGap:new ee(g[0],g[2],g[3])},sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:p,isCOTEnabled:h,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:C,onUpdateScrollYOffSetTransactionCategorizationUIState:w,onFetchTransactionCategorizationList:f,containerRef:v,cotTracking:I,isUncategorizedExpenseCategoryEnabled:y})=>{const $=ke(),[O,T]=s.useState(void 0),{fetchState:D,uiState:S,transactionLocalData:b,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:L,transactions:H,uncategorizedAccounts:z}=n,q=s.useRef(null),F=s.useRef({}),{control:Y}=$o();s.useEffect(()=>{q.current?.resetAfterIndex(0,!0)},[$,q,b]),s.useEffect(()=>{q.current?.scrollTo(S.scrollPosition?.scrollTop??0)},[e]);const N=s.useCallback(E=>{if(F.current?.[E]!=null){const oe=$==="small"&&S.pageToken==null&&E===b.length-1?lo.rowGap.value("medium-regular"):lo.rowGap.value($);return F.current[E]+oe}if(b[E]==null)return 0;const J=b[E].transactionReviewLocalData,K=Object.keys(J.lineItemById).length;return K!=null&&!isNaN(K)&&K>1?Bi*K+lo.rowGap.value($)*(K-1):Bi},[b,$,S.pageToken,S.sortKey,S.sortOrder]),G=s.useCallback((E,J)=>{F.current={...F.current,[E]:J},q.current?.resetAfterIndex(0,!0)},[$,q,b,S.sortKey,S.sortOrder]),V=s.useCallback(()=>{(S.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&f(e,S.searchString,!0,S.pageToken,!0,!1)},[n.refreshStatus.fetchState,f,e,S.pageToken,S.searchString,S.sortKey,S.sortOrder]),Z=s.useCallback(()=>{S.pageToken!=null&&V()},[V,S.pageToken,S.sortKey,S.sortOrder]),fe=tr(E=>w(e,{scrollPosition:{scrollTop:E}}),1e3,{trailing:!0}),le=E=>E<n.transactionLocalData.length,te=(E,J)=>{C(e,{sortOrder:J,sortKey:E}),f(e,S.searchString,!1,null,!1,!0)},ne=E=>{if(e==="autoCategorized")return!A.includes(E);const J=b.find(oe=>oe.transactionId===E)?.transactionReviewLocalData,K=H.find(oe=>oe.id===E);return K!=null&&J!=null?Dr(K,J,z,y)?y===!0&&Jo(z,J.lineItemById,["expense"])?L.includes(E)===!1:!1:!0:A.length===0?!0:!A.includes(E)};let P=[],B=[];(D==="Completed"||n.transactionLocalData.length>0)&&(B=n.transactionLocalData.map((E,J)=>{const K=ne(E.transactionId);let oe=!1;y===!0&&K===!0&&e==="review"&&Jo(z,E.transactionReviewLocalData.lineItemById,["expense"])&&(oe=!L.includes(E.transactionId));const Ce=E.transactionReviewLocalData;return{label:t.jsx(Dp,{transactionView:n,sectionId:`${p}.${J}.${ia}`,transaction:E,receiptUploadEndpoint:d,authParams:c,onTransactionCategorizationRowClick:x,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,selectedTab:e,containerRef:v,listContainerRef:q,isCOTEnabled:h,cotTracking:I,openTooltipId:O,setOpenTooltipId:T,isUncategorizedExpenseCategoryEnabled:y},`${E.transactionId}.${Ce.transactionType}`),value:E.transactionId,defaultChecked:!1,groupLabel:!1,isException:oe,exceptionMode:oe===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:K===!0?"readonly":void 0,exceptionType:oe===!0?"alert":void 0,exceptionInfo:oe===!0?im:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),P=B.map(E=>E.value));const U={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:_,subTitle:j}=Ve("transaction_categorization").allDoneText,R=b.map(E=>E.transactionId),W=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),ie=s.useMemo(()=>b.reduce((E,J)=>{const K=Object.keys(J.transactionReviewLocalData.lineItemById).length;return E+(K>0?K:1)},0)<n.totalCountByTab[e]?b.length+1:b.length,[b,n.totalCountByTab,e]);return t.jsx(dm,{windowSize:$,"data-testid":M("transaction-categorization-list-wrapper"),children:t.jsx(um,{windowSize:$,"data-testid":M("transaction-categorization-list-container"),children:D==="Error"?t.jsxs(pm,{windowSize:$,"data-testid":M("transaction-categorization-reload-page"),children:[t.jsx(mm,{onClick:()=>f(e,void 0,!0,null,!1,!0),"data-testid":M("transaction-categorization-reload-icon"),children:t.jsx(jo,{})}),t.jsx(gm,{"data-testid":M("transaction-categorization-reload-label"),children:om.reloadPage.label})]}):D==="Completed"&&b.length===0?t.jsx(wt,{tab:"transaction_categorization",title:_,subTitle:j,"data-testid":M("transaction-categorization-empty-table-section")}):D==="Not-Started"||D==="In-Progress"&&b.length===0?t.jsx(em,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},fetchState:D,onColumnSortConfigChanged:te,"data-testid":M("transaction-categorization-list-empty-table")}):t.jsx(hm,{windowSize:$,"data-testid":M("transaction-categorization-list-view"),children:t.jsx(fs,{control:Y,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:E,ref:J,onChange:K}})=>t.jsx(ra.Provider,{value:{value:E,mode:"off",allCheckBoxValues:P,index:0,sortKey:S.sortKey,sortOrder:S.sortOrder,fetchState:D,isDisabled:i,groupLabelCheckBox:U,onColumnSortConfigChanged:te,ref:J,onChange:K,selectedTab:e},children:t.jsx(Bn,{children:({height:oe,width:Ce})=>t.jsx(nr,{isItemLoaded:le,itemCount:W,loadMoreItems:Z,children:({onItemsRendered:$e,ref:ge})=>t.jsx(Fn,{ref:re=>{ge(re),q.current=re},height:oe,itemCount:ie,itemKey:re=>`${b[re]?.transactionId??""}-row-${re}`,innerElementType:am,onItemsRendered:$e,width:Ce,style:{willChange:"auto"},overscanCount:tp,itemSize:N,itemData:{checkboxes:B,value:E,allCheckBoxValues:P,groupLabelCheckBox:U,categorizationGroupValue:R,transactionLocalData:b,mode:"always_on",setRowHeight:G,isItemLoaded:le,ref:ge,onChange:K,selectedCheckBoxTransactionIds:A},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:re})=>{fe(re)},children:lm})})})})})})})})},am=e=>{const{value:n,allCheckBoxValues:d,groupLabelCheckBox:c,index:p,isDisabled:h,fetchState:i,sortKey:l,sortOrder:r,mode:m,ref:u,onChange:x,onColumnSortConfigChanged:C}=rm(),{children:w,style:f,...v}=e;return i==="Completed"?t.jsxs(xm,{ref:u,style:{...f,width:"auto"},...v,children:[t.jsx(fm,{children:t.jsx(Ss,{selectionLimit:mn,value:n,checkBox:{label:t.jsx(cm,{children:t.jsx(oa,{sortConfig:{sortKey:l,sortOrder:r},isDisabled:h,onColumnSortConfigChanged:C})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:c,allCheckBoxValues:d,mode:m,draggable:!1,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:p,onChangeHandler:I=>js({event:I,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:x}),ref:u})}),t.jsx(ym,{children:w})]},`${d[p]}-${p}`):null},ra=s.createContext(void 0),rm=()=>{const e=s.useContext(ra);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},lm=({index:e,style:n,data:d})=>{const{checkboxes:c,value:p,groupLabelCheckBox:h,categorizationGroupValue:i,allCheckBoxValues:l,transactionLocalData:r,isItemLoaded:m,setRowHeight:u,ref:x,onChange:C,selectedCheckBoxTransactionIds:w}=d,f=s.useRef(null),v=ke();if(s.useEffect(()=>{f.current?.firstElementChild!=null&&u(e,f.current.firstElementChild.clientHeight)},[e,f,v,r[e]?.transactionReviewLocalData]),m(e)===!0){const I=c[e];return t.jsx(Hi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:f,children:t.jsx(Ss,{selectionLimit:mn,checkBox:I,value:p,groupLabelCheckBox:h,allCheckBoxValues:l,mode:I.isDisabled==="readonly"||w.includes(I.value)===!1&&w.length>=mn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:{padding:20},name:`${Ut}.${p}`,ref:x,index:e,onChangeHandler:y=>js({event:y,value:p,allCheckBoxValues:l,groupLabelCheckBox:h,onChange:C})})},i[e])}else return t.jsx(Hi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:f,children:t.jsx(Cm,{children:t.jsx(sa,{})})},ls())},cm=a.div`
1434
1434
  flex: 1;
1435
1435
  width: auto;
1436
1436
  padding-right: ${o.sp8};
@@ -1448,7 +1448,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1448
1448
  `,pm=a.div`
1449
1449
  display: flex;
1450
1450
  width: 100%;
1451
- height: ${e=>`calc(100% - ${fs.valuePx(e.windowSize)})`};
1451
+ height: ${e=>`calc(100% - ${xs.valuePx(e.windowSize)})`};
1452
1452
  flex-direction: column;
1453
1453
  justify-content: center;
1454
1454
  align-items: center;
@@ -1470,7 +1470,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1470
1470
  `,gm=a(vt)`
1471
1471
  margin-top: ${o.sp3};
1472
1472
  color: ${e=>e.theme.colors.hero};
1473
- `,Wi=a.div`
1473
+ `,Hi=a.div`
1474
1474
  top: ${o.sp0};
1475
1475
  left: ${o.sp0};
1476
1476
  padding-bottom: ${o.sp3};
@@ -1493,7 +1493,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1493
1493
  height: 100%;
1494
1494
  `,Cm=a.div`
1495
1495
  padding-left: ${o.sp8};
1496
- `,wm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:p,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:w,onSaveUpdateTransactionCategorization:f,onUpdateSelectedCheckboxTransactionIds:v,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:y})=>{const[$,O]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),D=s.useRef({}),{useDynamicConfig:S}=ps(),{configValue:b}=S(ms.enableUncategorizedExpenseCategory),A=b?.uncategorized_expense_category_enabled===!0,L=(P,_,U,F)=>{const j={...D.current};j[_]==null&&(j[_]=[]);let R=j[_].findIndex(W=>W.lineId===P);if(R===-1){const W={lineId:P,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};j[_].push(W),R=j[_].length-1}else{const W=j[_][R];j[_][R]={...W,category:{...W.category,recommendationTypesViewed:[...W.category.recommendationTypesViewed]},class:{...W.class,recommendationTypesViewed:[...W.class.recommendationTypesViewed]},vendor:{...W.vendor,recommendationTypesViewed:[...W.vendor.recommendationTypesViewed]}}}F!=null&&F!==""&&!j[_][R][U].recommendationTypesViewed.includes(F)&&j[_][R][U].recommendationTypesViewed.push(F),D.current=j},{transactions:H,transactionLocalData:M,accountsHierarchyList:q,classHierarchyList:z,accountList:Y,classList:N,selectedCheckBoxTransactionIds:G,uncategorizedAccounts:V}=n,Z=qt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>qi(G,M,q,z,h.entityAutoCompleteView),[q,z,G,M,h.entityAutoCompleteView]),values:s.useMemo(()=>qi(G,M,q,z,h.entityAutoCompleteView),[q,z,G,M,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{r("expenseAutomationPage")},[]),s.useEffect(()=>{G.length>0?r(no):r("expenseAutomationPage")},[G,r]);const fe=Z.handleSubmit(P=>{const _=P[Mn],U=D.current;f(e,_,U),_.forEach(F=>{delete D.current[F]})}),ce=async(P,_)=>{if(P!=null){if(P===Mn){const U=Z.getValues(Mn);if(U.length<G.length){v(e,U);return}if(U.length===mn){v(e,U);return}const F=U[U.length-1],j=_[Ut].findIndex(W=>W.transactionId===F),R=Z.getValues(`${Ut}.${j}.lineInfo`);if(R!=null){let W=!1;if(R.every(ie=>(W=cn(V,ie[Te].selectedOption,A?["income"]:void 0),!!ie[Te].selectedOption&&ie[Te].selectedOption!=null&&!W&&!!ie[Ye].selectedOption&&!!ie[at].selectedOption))===!0){v(e,U);return}else{const ie=U.filter(E=>E!==F);v(e,ie);return}}return}if(P.includes(Te)===!0||P.includes(Ye)===!0){const U=parseInt(P.split(".")[1]),F=parseInt(P.split(".")[3]),j=Z.getValues(`${Ut}.${U}.lineInfo`),R=j[F];if(P.includes(Te)||P.includes(Ye)){const{transactionId:W,lineId:ie,recommendations:E}=R;if(j!=null){const J=R[Te].selectedOption,K=R[Ye].selectedOption,oe=R[at].selectedOption,Ce=R[at].selectedOption,$e=R[at].defaultOptions,ge=$e?.find(de=>de.options?.find(Ne=>Ne.value===oe))?.options?.find(de=>de.value===oe)?.label,re=$e?.find(de=>de.options?.find(Ne=>Ne.value===Ce))?.options?.find(de=>de.value===Ce)?.label,k=h.entityAutoCompleteView.vendor.find(de=>de.qboId===oe),he=h.entityAutoCompleteView.customer.find(de=>de.qboId===Ce),we=E.find(de=>de.vendor?.qboId===oe)?.vendor,Ae=oe||k?.qboId||we?.qboId?{id:oe??k?.qboId??we?.qboId??"",name:ge??k?.name??we?.name??"",logo:k?.logo??we?.logo}:void 0,Ee=Ce||he?.qboId?{id:Ce??he?.qboId??"",name:re??he?.name??"",logo:he?.logo}:void 0,me=Y.find(de=>de.qboId===J),Qe=N.find(de=>de.classId===K),qe=n.transactionLocalData.find(de=>de.transactionId===W)?.transactionReviewLocalData.lineItemById[ie].account,Je=n.transactionLocalData.find(de=>de.transactionId===W)?.transactionReviewLocalData.lineItemById[ie].class;m(e,W,ie,H,Ae?.id,Ee?.id,P.includes(Te)&&me!=null?{...me,isPreFilled:!1}:qe,P.includes(Ye)&&Qe!=null?{...Qe,isPreFilled:!1}:Je,void 0,E,A)}return}}if(P.includes(at)){const U=parseInt(P.split(".")[1]),F=parseInt(P.split(".")[3]),j=Z.getValues(`${Ut}.${U}.lineInfo`);if(j!=null){const R=j[F],{transactionId:W,recommendations:ie}=R,E=R[at].selectedOption,J=R[at].selectedOption,K=R[at].defaultOptions,oe=K?.flatMap(me=>me.options)?.find(me=>me.value===E)?.label,Ce=K?.flatMap(me=>me.options)?.find(me=>me.value===J)?.label,$e=h.entityAutoCompleteView.vendor.find(me=>me.qboId===E),ge=h.entityAutoCompleteView.customer.find(me=>me.qboId===J),re=ie.find(me=>me.vendor?.qboId===E)?.vendor,k=E!==""&&E!=null?E:oe!==""&&oe!=null?oe:"",he=($e?.qboId!=null&&$e.qboId!==""?$e.qboId:null)??(re?.qboId!=null&&re.qboId!==""?re.qboId:null)??(E!=null&&E!==""?E:null),we={id:he??oe??"",name:oe??$e?.name??re?.name??"",logo:$e?.logo??re?.logo},Ae=ge?.qboId!=null&&ge.qboId!==""?{id:ge.qboId??J??"",name:Ce??ge.name??"",logo:ge.logo}:void 0,Ee=H.find(me=>me.id===W);if(Ee!=null){const me=n.transactionLocalData.find(Ne=>Ne.transactionId===Ee.id)?.transactionReviewLocalData,Qe=me?.lineItemById[R.lineId],qe=Nt(Ee)===!0?me?.selectedEntity:Qe?.selectedEntityLine,Je=Ae?.id!=null&&Ae.id!==""?{id:Ae.id,name:Ae.name,type:"customer",qboId:Ae.id,zeniId:Ae.id,logo:Ae.logo}:we.id!==""&&we.id!=null?{id:k,name:oe??k,type:"vendor",qboId:k,zeniId:k,logo:we.logo,isPreFilled:qe?.id===he&&qe?.isPreFilled}:void 0,de={transactionId:{id:Ee.id,type:Ee.type},transaction:Ee,lineIds:Ee.type!=="journal_entry"?Ee.lines?.map(Ne=>Ne.id)??[]:[R.lineId]};Je?.type==="customer"?y(R.amount.amount,de,!1,e,Je,Ae,A):I(R.amount.amount,de,!1,e,Je,we,A)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const P=Z.watch((_,{name:U})=>{U!=null&&_!=null&&xn(()=>ce(U,_))});return()=>{P.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const P=n.transactionLocalData.find(_=>_.transactionId===$.transactionId);if(P){const{transactionReviewLocalData:_}=P,{selectedEntity:U}=_,F=$?.lineItemId??_.sortedLineItems[0],j=_.lineItemById[F],R=j.selectedEntityLine;T.current?.(Io(h.entityAutoCompleteView,U??R,j?.recommendationsWithCOT??[]))}O({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(P,_)=>{i.onAutoCompleteInputChange?.(P),T.current=_},ne=s.useRef(null);return t.jsx(vm,{ref:ne,"data-testid":B("transaction-categorization-list-page"),children:t.jsx(Jt,{...Z,children:t.jsx("form",{id:Ui(no),onSubmit:fe,style:{height:"100%",width:"100%"},"data-testid":B(Ui(no)),children:t.jsx(sm,{selectedTab:e,sectionId:p,transactionView:n,receiptUploadEndpoint:d,authParams:c,setCurrentTransactionInAction:O,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:w,onTransactionCategorizationRowClick:u,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,containerRef:ne,isCOTEnabled:l,cotTracking:{onCOTView:L},isUncategorizedExpenseCategoryEnabled:A})})})})},Ui=e=>`${e}_form`,qi=(e,n,d,c,p)=>({[Ut]:n.map(h=>bm(h.transactionId,h.transactionReviewLocalData,d,c,p)),[Mn]:e}),bm=(e,n,d,c,p)=>{const{lineItemById:h,sortedLineItems:i,selectedEntity:l}=n,r=Object.values(h).sort((u,x)=>i.indexOf(u.lineId)-i.indexOf(x.lineId)),m=r[0]?.lineId;return{[sa]:r.map(u=>{const x=u.account?.qboId??u.account?.accountId,C=u.class?.classId,w=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Te]:{selectedOption:x,allOptions:Ss(d,u.recommendationsWithCOT)},[Ye]:{selectedOption:C,allOptions:vs(c,u.recommendationsWithCOT)},[at]:{selectedOption:l?.id??w?.id??l?.name??w?.name,defaultOptions:Io(p,l??w,n.lineItemById[m]?.recommendationsWithCOT??[])},[Ip]:u.lineEntity,[$p]:u.recommendationsWithCOT??[]}}),transactionId:e,[Lp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Tp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},vm=a.div`
1496
+ `,wm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:p,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:w,onSaveUpdateTransactionCategorization:f,onUpdateSelectedCheckboxTransactionIds:v,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:y})=>{const[$,O]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),D=s.useRef({}),{useDynamicConfig:S}=hs(),{configValue:b}=S(ps.enableUncategorizedExpenseCategory),A=b?.uncategorized_expense_category_enabled===!0,L=(P,B,U,_)=>{const j={...D.current};j[B]==null&&(j[B]=[]);let R=j[B].findIndex(W=>W.lineId===P);if(R===-1){const W={lineId:P,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};j[B].push(W),R=j[B].length-1}else{const W=j[B][R];j[B][R]={...W,category:{...W.category,recommendationTypesViewed:[...W.category.recommendationTypesViewed]},class:{...W.class,recommendationTypesViewed:[...W.class.recommendationTypesViewed]},vendor:{...W.vendor,recommendationTypesViewed:[...W.vendor.recommendationTypesViewed]}}}_!=null&&_!==""&&!j[B][R][U].recommendationTypesViewed.includes(_)&&j[B][R][U].recommendationTypesViewed.push(_),D.current=j},{transactions:H,transactionLocalData:z,accountsHierarchyList:q,classHierarchyList:F,accountList:Y,classList:N,selectedCheckBoxTransactionIds:G,uncategorizedAccounts:V}=n,Z=qt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>Ui(G,z,q,F,h.entityAutoCompleteView),[q,F,G,z,h.entityAutoCompleteView]),values:s.useMemo(()=>Ui(G,z,q,F,h.entityAutoCompleteView),[q,F,G,z,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{r("expenseAutomationPage")},[]),s.useEffect(()=>{G.length>0?r(to):r("expenseAutomationPage")},[G,r]);const fe=Z.handleSubmit(P=>{const B=P[zn],U=D.current;f(e,B,U),B.forEach(_=>{delete D.current[_]})}),le=async(P,B)=>{if(P!=null){if(P===zn){const U=Z.getValues(zn);if(U.length<G.length){v(e,U);return}if(U.length===mn){v(e,U);return}const _=U[U.length-1],j=B[Ut].findIndex(W=>W.transactionId===_),R=Z.getValues(`${Ut}.${j}.lineInfo`);if(R!=null){let W=!1;if(R.every(ie=>(W=cn(V,ie[Te].selectedOption,A?["income"]:void 0),!!ie[Te].selectedOption&&ie[Te].selectedOption!=null&&!W&&!!ie[Ye].selectedOption&&!!ie[at].selectedOption))===!0){v(e,U);return}else{const ie=U.filter(E=>E!==_);v(e,ie);return}}return}if(P.includes(Te)===!0||P.includes(Ye)===!0){const U=parseInt(P.split(".")[1]),_=parseInt(P.split(".")[3]),j=Z.getValues(`${Ut}.${U}.lineInfo`),R=j[_];if(P.includes(Te)||P.includes(Ye)){const{transactionId:W,lineId:ie,recommendations:E}=R;if(j!=null){const J=R[Te].selectedOption,K=R[Ye].selectedOption,oe=R[at].selectedOption,Ce=R[at].selectedOption,$e=R[at].defaultOptions,ge=$e?.find(ce=>ce.options?.find(Ne=>Ne.value===oe))?.options?.find(ce=>ce.value===oe)?.label,re=$e?.find(ce=>ce.options?.find(Ne=>Ne.value===Ce))?.options?.find(ce=>ce.value===Ce)?.label,k=h.entityAutoCompleteView.vendor.find(ce=>ce.qboId===oe),ue=h.entityAutoCompleteView.customer.find(ce=>ce.qboId===Ce),we=E.find(ce=>ce.vendor?.qboId===oe)?.vendor,Ae=oe||k?.qboId||we?.qboId?{id:oe??k?.qboId??we?.qboId??"",name:ge??k?.name??we?.name??"",logo:k?.logo??we?.logo}:void 0,Ee=Ce||ue?.qboId?{id:Ce??ue?.qboId??"",name:re??ue?.name??"",logo:ue?.logo}:void 0,me=Y.find(ce=>ce.qboId===J),Qe=N.find(ce=>ce.classId===K),qe=n.transactionLocalData.find(ce=>ce.transactionId===W)?.transactionReviewLocalData.lineItemById[ie].account,Je=n.transactionLocalData.find(ce=>ce.transactionId===W)?.transactionReviewLocalData.lineItemById[ie].class;m(e,W,ie,H,Ae?.id,Ee?.id,P.includes(Te)&&me!=null?{...me,isPreFilled:!1}:qe,P.includes(Ye)&&Qe!=null?{...Qe,isPreFilled:!1}:Je,void 0,E,A)}return}}if(P.includes(at)){const U=parseInt(P.split(".")[1]),_=parseInt(P.split(".")[3]),j=Z.getValues(`${Ut}.${U}.lineInfo`);if(j!=null){const R=j[_],{transactionId:W,recommendations:ie}=R,E=R[at].selectedOption,J=R[at].selectedOption,K=R[at].defaultOptions,oe=K?.flatMap(me=>me.options)?.find(me=>me.value===E)?.label,Ce=K?.flatMap(me=>me.options)?.find(me=>me.value===J)?.label,$e=h.entityAutoCompleteView.vendor.find(me=>me.qboId===E),ge=h.entityAutoCompleteView.customer.find(me=>me.qboId===J),re=ie.find(me=>me.vendor?.qboId===E)?.vendor,k=E!==""&&E!=null?E:oe!==""&&oe!=null?oe:"",ue=($e?.qboId!=null&&$e.qboId!==""?$e.qboId:null)??(re?.qboId!=null&&re.qboId!==""?re.qboId:null)??(E!=null&&E!==""?E:null),we={id:ue??oe??"",name:oe??$e?.name??re?.name??"",logo:$e?.logo??re?.logo},Ae=ge?.qboId!=null&&ge.qboId!==""?{id:ge.qboId??J??"",name:Ce??ge.name??"",logo:ge.logo}:void 0,Ee=H.find(me=>me.id===W);if(Ee!=null){const me=n.transactionLocalData.find(Ne=>Ne.transactionId===Ee.id)?.transactionReviewLocalData,Qe=me?.lineItemById[R.lineId],qe=Nt(Ee)===!0?me?.selectedEntity:Qe?.selectedEntityLine,Je=Ae?.id!=null&&Ae.id!==""?{id:Ae.id,name:Ae.name,type:"customer",qboId:Ae.id,zeniId:Ae.id,logo:Ae.logo}:we.id!==""&&we.id!=null?{id:k,name:oe??k,type:"vendor",qboId:k,zeniId:k,logo:we.logo,isPreFilled:qe?.id===ue&&qe?.isPreFilled}:void 0,ce={transactionId:{id:Ee.id,type:Ee.type},transaction:Ee,lineIds:Ee.type!=="journal_entry"?Ee.lines?.map(Ne=>Ne.id)??[]:[R.lineId]};Je?.type==="customer"?y(R.amount.amount,ce,!1,e,Je,Ae,A):I(R.amount.amount,ce,!1,e,Je,we,A)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const P=Z.watch((B,{name:U})=>{U!=null&&B!=null&&xn(()=>le(U,B))});return()=>{P.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const P=n.transactionLocalData.find(B=>B.transactionId===$.transactionId);if(P){const{transactionReviewLocalData:B}=P,{selectedEntity:U}=B,_=$?.lineItemId??B.sortedLineItems[0],j=B.lineItemById[_],R=j.selectedEntityLine;T.current?.(ko(h.entityAutoCompleteView,U??R,j?.recommendationsWithCOT??[]))}O({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(P,B)=>{i.onAutoCompleteInputChange?.(P),T.current=B},ne=s.useRef(null);return t.jsx(vm,{ref:ne,"data-testid":M("transaction-categorization-list-page"),children:t.jsx(Jt,{...Z,children:t.jsx("form",{id:Wi(to),onSubmit:fe,style:{height:"100%",width:"100%"},"data-testid":M(Wi(to)),children:t.jsx(sm,{selectedTab:e,sectionId:p,transactionView:n,receiptUploadEndpoint:d,authParams:c,setCurrentTransactionInAction:O,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:C,onFetchTransactionCategorizationList:w,onTransactionCategorizationRowClick:u,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,containerRef:ne,isCOTEnabled:l,cotTracking:{onCOTView:L},isUncategorizedExpenseCategoryEnabled:A})})})})},Wi=e=>`${e}_form`,Ui=(e,n,d,c,p)=>({[Ut]:n.map(h=>bm(h.transactionId,h.transactionReviewLocalData,d,c,p)),[zn]:e}),bm=(e,n,d,c,p)=>{const{lineItemById:h,sortedLineItems:i,selectedEntity:l}=n,r=Object.values(h).sort((u,x)=>i.indexOf(u.lineId)-i.indexOf(x.lineId)),m=r[0]?.lineId;return{[ia]:r.map(u=>{const x=u.account?.qboId??u.account?.accountId,C=u.class?.classId,w=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Te]:{selectedOption:x,allOptions:vs(d,u.recommendationsWithCOT)},[Ye]:{selectedOption:C,allOptions:bs(c,u.recommendationsWithCOT)},[at]:{selectedOption:l?.id??w?.id??l?.name??w?.name,defaultOptions:ko(p,l??w,n.lineItemById[m]?.recommendationsWithCOT??[])},[Ip]:u.lineEntity,[$p]:u.recommendationsWithCOT??[]}}),transactionId:e,[Lp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Tp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},vm=a.div`
1497
1497
  display: flex;
1498
1498
  min-height: 100%;
1499
1499
  width: 100%;
@@ -1501,7 +1501,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1501
1501
  flex-direction: column;
1502
1502
  background-color: ${e=>e.theme.colors.grey4};
1503
1503
  z-index: 2;
1504
- `,Ji={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},Sm=a.div`
1504
+ `,qi={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},Sm=a.div`
1505
1505
  width: 100%;
1506
1506
  display: flex;
1507
1507
  justify-content: center;
@@ -1513,7 +1513,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1513
1513
  display: flex;
1514
1514
  flex-direction: column;
1515
1515
  width: 100%;
1516
- `,km=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:p,expenseAutomationViewSelector:h,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:C,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:f,loggedInUser:v,isCOTEnabled:I,setCurrentFooterFormId:y,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:O,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:D,onMissingReceiptsRowClick:S,onUploadReceiptAttachment:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onReconTabColumnSortConfigChanged:H,onReloadReconciliationListPage:M,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:z,onFetchTransactionCategorizationList:Y,onUpdateTransactionCategorizationUIState:N,onUpdateScrollYOffSetTransactionCategorizationUIState:G,handleJeScheduleClick:V,ignoreRecommendedJeSchedule:Z,onJESchedulesFormDataChange:fe,onPostJESchedule:ce,setLocalDataForCategoryAndClass:te,resetTransactionCategorizationLocalData:ne,updateSelectedVendorForTransaction:P,onSaveUpdateTransactionCategorization:_,onUpdateSelectedCheckboxTransactionIds:U,improveMonthEndInsightsUsingZeniGPTClick:F,onRemoveFileAttachment:j,onUpdateFileAttachment:R,onCloseAllThreadsSection:W,onEditMonthEndInsightsClick:ie,previewMonthEndReport:E,saveMonthEndReport:J,onOpenFileAttachmentSnackBar:K,onCloseFileAttachmentSnackBar:oe,onClickCustomerRequest:Ce,sendMonthEndReport:$e,markAsReview:ge,onReloadPage:re,updateOperatingExpensesIdsForReview:k,onFetchReimbursementView:he,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Ae,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:me,setIsJeAccountSettingsOpened:Qe,onReviewClicked:qe,setOpenDrawerClicked:Je,onEstablishConnectionClick:de,onFetchLinkTokenClick:Ne,updateReconReviewTabLocalData:ot,onReconReviewTabColumnSortConfigChanged:rt,onSaveReconciliation:St,onSaveReconciliationReview:mt,onReconMatchedTransactionClick:jt,onAddStatementClick:kt,redirectToVendorDetailPage:Me}=e,{currentSelectedView:X,missingReceipts:be,transactionView:je,selectedPeriod:ve,monthEndInsights:Be,selectedTransactionCategorizationTab:It,reconciliation:Mt}=h;switch(X){case"transaction_categorization":return je.fetchState==="Completed"&&je.transactionLocalData.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(wm,{setCurrentFooterFormId:y,selectedPeriod:ve,selectedTab:It,sectionId:Ut,transactionView:je,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:N,onUpdateScrollYOffSetTransactionCategorizationUIState:G,onFetchTransactionCategorizationList:Y,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:te,resetTransactionCategorizationLocalData:ne,updateSelectedVendorForTransaction:P,onSaveUpdateTransactionCategorization:_,onUpdateSelectedCheckboxTransactionIds:U,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:O,isCOTEnabled:I});case"je_schedules":return t.jsx(Bu,{setIsJeAccountSettingsOpened:Qe,expenseAutomationViewSelector:h,setResetJeAccountSettingsForm:p,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:y,handleJeScheduleClick:V,ignoreRecommendedJeSchedule:Z,onJESchedulesFormDataChange:fe,onPostJESchedule:ce,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return be.fetchState==="Completed"&&be.transactions.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(Ih,{onUpdateMissingReceiptsUIState:z,onFetchMissingReceiptsList:D,missingReceipts:be,receiptUploadEndpoint:l,authParams:i,selectedPeriod:ve,onMissingReceiptsRowClick:S,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onUploadReceiptAttachment:b});case"month_end_insights":if(Be!=null&&h.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Be.fetchState==="Not-Started"||Be.fetchState==="In-Progress"||Be.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Be.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ca,{fetchState:"In-Progress"});{const _t={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Be.companyName,url:window.location.href},{url:an,...et}=_t,Kt={...et};return t.jsx(jm,{children:t.jsx(ep,{allThreadsSectionOpen:f,customerRequestData:w,companyId:r,enableZeniGPTFeature:x,filterMetaData:Kt,selectedPeriod:h.selectedPeriod,improveUsingZeniGPTClick:F,isZeniUser:v?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Be,newThreadMetadata:_t,onClickCustomerRequest:Ce,onCloseAllThreadsSection:W,onCloseFileAttachmentSnackBar:oe,onOpenFileAttachmentSnackBar:K,onRemoveFileAttachment:j,onUpdateFileAttachment:R,previewMode:C,previewMonthEndReport:E,saveMonthEndReport:J,onEditClick:ie,sendMonthEndReport:$e})})}}else return null;case"flux_analysis":return h.fluxAnalysis.fetchStatus.fetchState==="Completed"&&h.fluxAnalysis.sections.generalExpense.vendors.length===0&&h.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(gu,{fluxAnalysis:h.fluxAnalysis,selectedPeriod:h.selectedPeriod,markAsReview:ge,onReloadPage:re,updateOperatingExpensesIdsForReview:k,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Ae,setCurrentFooterFormId:y,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:me,onFetchReimbursementView:he,redirectToVendorDetailPage:Me});case"reconciliation":return t.jsx(Qd,{onReloadReconciliationListPage:M,currentFooterFormId:n,reconciliation:Mt,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:qe,setOpenDrawerClicked:Je,setCurrentFooterFormId:y,onReconTabColumnSortConfigChanged:H,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:de,onFetchLinkTokenClick:Ne,updateReconReviewTabLocalData:ot,onReconReviewTabColumnSortConfigChanged:rt,onSaveReconciliation:St,onSaveReconciliationReview:mt,onReconMatchedTransactionClick:jt,onAddStatementClick:kt});default:return t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle})}};function Im(e){const n=ke(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",p=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Sm,{windowSize:n,style:{...p===!0?{paddingLeft:Ji.subSectionContainerLeftRightPadding.value(n),paddingRight:Ji.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(km,{...e})})}const $m=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Lm=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tm=a.div`
1516
+ `,km=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:p,expenseAutomationViewSelector:h,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:C,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:f,loggedInUser:v,isCOTEnabled:I,setCurrentFooterFormId:y,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:O,onTransactionCategorizationRowClick:T,onFetchMissingReceiptsList:D,onMissingReceiptsRowClick:S,onUploadReceiptAttachment:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onReconTabColumnSortConfigChanged:H,onReloadReconciliationListPage:z,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:F,onFetchTransactionCategorizationList:Y,onUpdateTransactionCategorizationUIState:N,onUpdateScrollYOffSetTransactionCategorizationUIState:G,handleJeScheduleClick:V,ignoreRecommendedJeSchedule:Z,onJESchedulesFormDataChange:fe,onPostJESchedule:le,setLocalDataForCategoryAndClass:te,resetTransactionCategorizationLocalData:ne,updateSelectedVendorForTransaction:P,onSaveUpdateTransactionCategorization:B,onUpdateSelectedCheckboxTransactionIds:U,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:j,onUpdateFileAttachment:R,onCloseAllThreadsSection:W,onEditMonthEndInsightsClick:ie,previewMonthEndReport:E,saveMonthEndReport:J,onOpenFileAttachmentSnackBar:K,onCloseFileAttachmentSnackBar:oe,onClickCustomerRequest:Ce,sendMonthEndReport:$e,markAsReview:ge,onReloadPage:re,updateOperatingExpensesIdsForReview:k,onFetchReimbursementView:ue,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Ae,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:me,setIsJeAccountSettingsOpened:Qe,onReviewClicked:qe,setOpenDrawerClicked:Je,onEstablishConnectionClick:ce,onFetchLinkTokenClick:Ne,updateReconReviewTabLocalData:ot,onReconReviewTabColumnSortConfigChanged:rt,onSaveReconciliation:St,onSaveReconciliationReview:mt,onReconMatchedTransactionClick:jt,onAddStatementClick:kt,redirectToVendorDetailPage:ze}=e,{currentSelectedView:X,missingReceipts:be,transactionView:je,selectedPeriod:ve,monthEndInsights:Me,selectedTransactionCategorizationTab:It,reconciliation:zt}=h;switch(X){case"transaction_categorization":return je.fetchState==="Completed"&&je.transactionLocalData.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(wm,{setCurrentFooterFormId:y,selectedPeriod:ve,selectedTab:It,sectionId:Ut,transactionView:je,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:N,onUpdateScrollYOffSetTransactionCategorizationUIState:G,onFetchTransactionCategorizationList:Y,onTransactionCategorizationRowClick:T,setLocalDataForCategoryAndClass:te,resetTransactionCategorizationLocalData:ne,updateSelectedVendorForTransaction:P,onSaveUpdateTransactionCategorization:B,onUpdateSelectedCheckboxTransactionIds:U,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:O,isCOTEnabled:I});case"je_schedules":return t.jsx(Mu,{setIsJeAccountSettingsOpened:Qe,expenseAutomationViewSelector:h,setResetJeAccountSettingsForm:p,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:y,handleJeScheduleClick:V,ignoreRecommendedJeSchedule:Z,onJESchedulesFormDataChange:fe,onPostJESchedule:le,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return be.fetchState==="Completed"&&be.transactions.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(Ih,{onUpdateMissingReceiptsUIState:F,onFetchMissingReceiptsList:D,missingReceipts:be,receiptUploadEndpoint:l,authParams:i,selectedPeriod:ve,onMissingReceiptsRowClick:S,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:L,onUploadReceiptAttachment:b});case"month_end_insights":if(Me!=null&&h.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Me.fetchState==="Not-Started"||Me.fetchState==="In-Progress"||Me.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Me.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ca,{fetchState:"In-Progress"});{const Bt={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Me.companyName,url:window.location.href},{url:an,...et}=Bt,Kt={...et};return t.jsx(jm,{children:t.jsx(ep,{allThreadsSectionOpen:f,customerRequestData:w,companyId:r,enableZeniGPTFeature:x,filterMetaData:Kt,selectedPeriod:h.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:v?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Me,newThreadMetadata:Bt,onClickCustomerRequest:Ce,onCloseAllThreadsSection:W,onCloseFileAttachmentSnackBar:oe,onOpenFileAttachmentSnackBar:K,onRemoveFileAttachment:j,onUpdateFileAttachment:R,previewMode:C,previewMonthEndReport:E,saveMonthEndReport:J,onEditClick:ie,sendMonthEndReport:$e})})}}else return null;case"flux_analysis":return h.fluxAnalysis.fetchStatus.fetchState==="Completed"&&h.fluxAnalysis.sections.generalExpense.vendors.length===0&&h.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle}):t.jsx(gu,{fluxAnalysis:h.fluxAnalysis,selectedPeriod:h.selectedPeriod,markAsReview:ge,onReloadPage:re,updateOperatingExpensesIdsForReview:k,updateSectionIdsForReview:we,onUpdateFluxAnalysisUIState:Ae,setCurrentFooterFormId:y,fetchFluxViewOnScroll:Ee,onFetchFluxViewList:me,onFetchReimbursementView:ue,redirectToVendorDetailPage:ze});case"reconciliation":return t.jsx(Qd,{onReloadReconciliationListPage:z,currentFooterFormId:n,reconciliation:zt,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:qe,setOpenDrawerClicked:Je,setCurrentFooterFormId:y,onReconTabColumnSortConfigChanged:H,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:ce,onFetchLinkTokenClick:Ne,updateReconReviewTabLocalData:ot,onReconReviewTabColumnSortConfigChanged:rt,onSaveReconciliation:St,onSaveReconciliationReview:mt,onReconMatchedTransactionClick:jt,onAddStatementClick:kt});default:return t.jsx(wt,{tab:X,title:Ve(X).allDoneText.title,subTitle:Ve(X).allDoneText.subTitle})}};function Im(e){const n=ke(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",p=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Sm,{windowSize:n,style:{...p===!0?{paddingLeft:qi.subSectionContainerLeftRightPadding.value(n),paddingRight:qi.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(km,{...e})})}const $m=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Lm=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tm=a.div`
1517
1517
  width: 100%;
1518
1518
  height: 100vh;
1519
1519
  display: flex;
@@ -1533,17 +1533,17 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1533
1533
  width: 100%;
1534
1534
  padding-left: ${o.sp0};
1535
1535
  }
1536
- `,Ki=a(ma)`
1536
+ `,Ji=a(ma)`
1537
1537
  height: ${o.sp3};
1538
1538
  width: ${o.sp3};
1539
1539
  cursor: pointer;
1540
1540
  color: inherit;
1541
- `,Gi=a($m)`
1541
+ `,Ki=a($m)`
1542
1542
  height: ${o.sp3};
1543
1543
  width: ${o.sp3};
1544
1544
  cursor: pointer;
1545
1545
  color: inherit;
1546
- `,{common:{footer:Re,texts:{maxLimitReached:Em,confirmAction:Rm},headers:Dm,create:Om,strings:dn,texts:sn,cancel:Mm,confirm:_m,monthsByIndex:zm},dateFormat:{visual:{MMMDCommaYYYYformat:Yi}},expenseAutomation:un}=Ie.getLocalizedStrings(),C1=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:p,isCOTEnabled:h,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:C,resetTransactionCategorizationLocalData:w,updateOperatingExpensesIdsForReview:f,clearJeScheduleLocalData:v,onSaveReconciliation:I}=e,{currentSelectedView:y,allSteps:$,missingReceipts:O,jeSchedules:T,fluxAnalysis:D,monthEndInsights:S,transactionView:b,selectedTransactionCategorizationTab:A,reconciliation:L,selectedPeriod:H}=n,[M,q]=s.useState("expenseAutomationPage"),[z,Y]=s.useState(()=>{}),[N,G]=s.useState(!1),V=ke(),Z=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),fe=Z?es:ts,{openThread:ce,setOpenThread:te}=s.useContext(fe),[ne,P]=s.useState(!1),[_,U]=s.useState(!1),F=$.find(X=>X.step===y),{nextStep:j,previousStep:R}=Pm($,y),{uiState:{searchString:W,pageToken:ie},totalCountByTab:E,transactions:J,fetchStateByTransactionTabs:K,transactionLocalData:oe}=b,{selectedReconAccount:Ce,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:$e}}}}=L;let ge="Not-Started",re="complete";switch(y){case"missing_receipts":ge=O.refreshStatus.fetchState,re=O.completionStatus;break;case"je_schedules":ge=T.refreshStatus.fetchState,re=T.completionStatus;break;case"month_end_insights":S!=null&&(ge=S?.fetchState);break;case"flux_analysis":ge=D.refreshStatus.fetchState,re=D.completionStatus;break;case"transaction_categorization":ge=b.refreshStatus.fetchState,re=b.completionStatus;break;case"reconciliation":Ce==null?(ge=L.refreshStatus.fetchState,re=L.completionStatus):(ge=L.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",re=L.completionStatus)}const k=()=>{z()},{saveStatus:he,selectedCheckBoxTransactionIds:we}=b,Ae=()=>{const X=Zs(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),be=qn(),{month:je,year:ve}=H,Be=qn().set("month",je-1).set("year",ve).endOf("month");switch(M){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:X===!0?Re.markAsReviewed:sn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(n.fluxAnalysis.reviewOperatingExpensesIds.length,_s,V,sn.vendor,y),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{f([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:he.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(we.length,mn,V,sn.transaction,y),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w(A,J.map(It=>It.id),H,!1,E[A],qo(oe,A),p,ie)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.next,style:{justifyContent:"space-evenly"},isDisabled:d||F?.isNextDisabled,suffixIcon:t.jsx(Ki,{}),onClick:()=>{r(j.step)}},cancelBtn:{label:Re.back,isDisabled:d||F?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Gi,{}),onClick:()=>{r(R.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Re.reconcile,backBtnLabel:Re.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(L.reconciliationTabsState.balances.variance.amount===0&&be.isAfter(Be)),isLoading:L.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:uo($e.length,1/0,V,sn.transaction,y),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:L.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Re.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Re.save,backBtnLabel:Re.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,isLoading:T.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>k(),label:Re.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const It=y==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Mt=y==="reconciliation"&&n.reconciliation.selectedAccountId==null,_t=y==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,an=j.step==="month_end_insights"&&(y==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Mt),et=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",Kt=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",fn=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(le=>le.id==="month_end_insights"),yn=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&fn?.isDisabled===!1&&(c||F?.isNextDisabled===!1),Nn=j.step==="month_end_insights"&&(Mt||y==="flux_analysis")?!yn:F?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:an===!0?Bm(n.selectedPeriod.month):Re.next,style:{justifyContent:"space-evenly"},isDisabled:Nn,suffixIcon:t.jsx(Ki,{}),onClick:()=>{et?i("autoCategorized"):It?l("reconcile"):r(j.step)}},cancelBtn:{label:Re.back,isDisabled:d||F?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Gi,{}),onClick:()=>{Kt?i("review"):_t?l("review"):It?C():r(R.step)}}}}}},Ee=()=>{switch(M){case"expenseAutomationFluxPage":return{confirmAction:()=>{P(!1),f([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{P(!1),w(A,J.map(X=>X.id),H,!1,E[A],qo(oe,A),p,ie),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{P(!1),v(),x()}};default:return{confirmAction:()=>{P(!1)},confirmationDescription:dn.empty}}},me=()=>{M==="expenseAutomationFluxPage"||M==="expenseAutomationJESchedulePage"||M==="expenseAutomationTransactionsPage"?P(!0):x()},{primaryBtn:Qe,cancelBtn:qe,leftSideComponent:Je}=Ae(),{confirmAction:de}=Ee(),Ne=X=>{if(y==="transaction_categorization"&&(X==="autoCategorized"||X==="review"))return{hideCountInTab:E[X]>un.common.numbers.maximumCount,count:E[X],isFetching:K[X].fetchState==="In-Progress"};if(y==="reconciliation"){const{reconciliation:be}=n,{selectedAccountId:je}=be;return je==null?{count:0,isFetching:!1}:X==="review"?{count:be.accountReconciliationsByAccountID[je]?.accountReconEntity?.transactionsToReview.length,isFetching:be.accountReconciliationsByAccountID[je]?.transactionFetchState.fetchState==="In-Progress"}:{count:be.accountReconciliationsByAccountID[je]?.accountReconEntity?.transactionsToReconcile.length,isFetching:be.accountReconciliationsByAccountID[je]?.transactionFetchState.fetchState==="In-Progress"}}},ot=y==="reconciliation"&&L.selectedAccountId!=null&&L.selectedReconAccount!=null,{month:rt,year:St}=H,mt=qn().set("month",rt-1).set("year",St),jt=mt.startOf("month").format(Yi),kt=mt.endOf("month").format(Yi),Me=`${jt} ${dn.hyphen} ${kt}`;return t.jsxs(Tm,{children:[ne?t.jsx(da,{containerStyle:{width:356},titleComponent:t.jsx(qm,{children:Rm}),primaryButtonText:_m,secondaryButtonText:Mm,proceedButtonVariant:"danger",action:{onOkClick:()=>{de()},onCancelClick:()=>P(!1)},descriptionComponent:t.jsx(Jm,{children:un.confirmationDescription})}):null,t.jsxs(Am,{children:[t.jsx(xl,{onBack:C,navBarCustomElement:y==="reconciliation"&&L.selectedAccountId!=null?t.jsx(Fm,{reconciliation:L}):void 0,onReconTabUpdate:l,currentRecontab:L.selectedTab,reconcileDetailPageFetchState:L.selectedAccountId!=null?L.accountReconciliationsByAccountID[L.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:ot?L.selectedAccountId:void 0,currentSelectedView:y,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ve(y,E.autoCategorized,ot?L.selectedAccountId:void 0,ot?L.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,ot?Me:void 0),searchText:W,currentTab:A,getTabCountAndFetchState:Ne,completionStatus:re,forceShowSubtitle:N===!0||y==="je_schedules"&&(T.fetchState==="In-Progress"||T.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ge,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??dn.empty,isZeniUser:Z,onAllThreadsClick:()=>{ce!=null&&te(null),U(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:me}),t.jsx(Im,{...e,isCOTEnabled:h,setIsJeAccountSettingsOpened:G,setResetJeAccountSettingsForm:Y,allThreadsSectionOpen:_,setCurrentFooterFormId:q,currentFooterFormId:M,onCloseAllThreadsSection:()=>U(!1)}),t.jsx(Pe,{controller:y!=="month_end_insights",children:t.jsx(ns,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:Nm(M),primaryBtn:Qe,leftSideComponent:Je,cancelBtn:qe,separatorStyle:{marginRight:o.sp4}})})]})]})},Fm=({reconciliation:e})=>{const n=bt(),{clearedBalance:d,variance:c,variancePercentage:p,deposits:h,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(Km,{children:t.jsxs(Gm,{children:[t.jsxs(ho,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(po,{children:t.jsx(Ym,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:Ue("0,0.00",l)}),t.jsx(go,{children:un.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(ho,{children:[t.jsx(po,{children:t.jsx(Xm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:Ue("0,0.00",d)}),t.jsxs(e1,{children:[t.jsx(go,{children:un.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(ye,{placement:"bottom",title:t.jsxs(t1,{children:[t.jsxs(Zi,{children:[t.jsxs(Xi,{children:[i.count," ",sn.payments]}),t.jsx(Qi,{children:Ue("0,0.[00]",i.totalAmount)})]}),t.jsxs(Zi,{children:[t.jsxs(Xi,{children:[h.count," ",sn.deposits]}),t.jsx(Qi,{children:Ue("0,0.[00]",h.totalAmount)})]})]}),display:"flex",children:t.jsx(Qm,{})})]})]})})]}),t.jsxs(ho,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(po,{children:t.jsx(Zm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(xo,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ue("0,0.00",c)}),p!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${p.toFixed(2)}%)`}):null]}),t.jsx(go,{children:un.accountRecon.reconciliation.headers.variance})]})})]})]})})},uo=(e,n,d,c,p)=>{const h=c,i=(e>1?h+"s":h)+" selected";return e>0?t.jsxs(Vm,{currentView:p,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(Hm,{multiDigit:e>=5,children:e}),t.jsx(Wm,{children:i}),e===n?t.jsx(Um,{children:`(${Em})`}):null]}):null},Bm=e=>{const n=zm[e];return`${Om}${dn.space}${n}${dn.space}${Dm.insights}`};function Pm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,p=(d-1+e.length)%e.length,h=e[c],i=e[p];return{nextStep:h,previousStep:i}}const Nm=e=>`${e}_form`,Vm=a.div`
1546
+ `,{common:{footer:Re,texts:{maxLimitReached:Em,confirmAction:Rm},headers:Dm,create:Om,strings:dn,texts:sn,cancel:zm,confirm:Bm,monthsByIndex:Fm},dateFormat:{visual:{MMMDCommaYYYYformat:Gi}},expenseAutomation:un}=Ie.getLocalizedStrings(),C1=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:p,isCOTEnabled:h,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:C,resetTransactionCategorizationLocalData:w,updateOperatingExpensesIdsForReview:f,clearJeScheduleLocalData:v,onSaveReconciliation:I}=e,{currentSelectedView:y,allSteps:$,missingReceipts:O,jeSchedules:T,fluxAnalysis:D,monthEndInsights:S,transactionView:b,selectedTransactionCategorizationTab:A,reconciliation:L,selectedPeriod:H}=n,[z,q]=s.useState("expenseAutomationPage"),[F,Y]=s.useState(()=>{}),[N,G]=s.useState(!1),V=ke(),Z=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),fe=Z?Qi:es,{openThread:le,setOpenThread:te}=s.useContext(fe),[ne,P]=s.useState(!1),[B,U]=s.useState(!1),_=$.find(X=>X.step===y),{nextStep:j,previousStep:R}=Pm($,y),{uiState:{searchString:W,pageToken:ie},totalCountByTab:E,transactions:J,fetchStateByTransactionTabs:K,transactionLocalData:oe}=b,{selectedReconAccount:Ce,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:$e}}}}=L;let ge="Not-Started",re="complete";switch(y){case"missing_receipts":ge=O.refreshStatus.fetchState,re=O.completionStatus;break;case"je_schedules":ge=T.refreshStatus.fetchState,re=T.completionStatus;break;case"month_end_insights":S!=null&&(ge=S?.fetchState);break;case"flux_analysis":ge=D.refreshStatus.fetchState,re=D.completionStatus;break;case"transaction_categorization":ge=b.refreshStatus.fetchState,re=b.completionStatus;break;case"reconciliation":Ce==null?(ge=L.refreshStatus.fetchState,re=L.completionStatus):(ge=L.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",re=L.completionStatus)}const k=()=>{F()},{saveStatus:ue,selectedCheckBoxTransactionIds:we}=b,Ae=()=>{const X=Ys(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),be=Un(),{month:je,year:ve}=H,Me=Un().set("month",je-1).set("year",ve).endOf("month");switch(z){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:X===!0?Re.markAsReviewed:sn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:co(n.fluxAnalysis.reviewOperatingExpensesIds.length,zs,V,sn.vendor,y),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{f([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:ue.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:co(we.length,mn,V,sn.transaction,y),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w(A,J.map(It=>It.id),H,!1,E[A],Uo(oe,A),p,ie)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.next,style:{justifyContent:"space-evenly"},isDisabled:d||_?.isNextDisabled,suffixIcon:t.jsx(Ji,{}),onClick:()=>{r(j.step)}},cancelBtn:{label:Re.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ki,{}),onClick:()=>{r(R.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Re.reconcile,backBtnLabel:Re.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(L.reconciliationTabsState.balances.variance.amount===0&&be.isAfter(Me)),isLoading:L.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:co($e.length,1/0,V,sn.transaction,y),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:L.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Re.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Re.save,backBtnLabel:Re.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,isLoading:T.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>k(),label:Re.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const It=y==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,zt=y==="reconciliation"&&n.reconciliation.selectedAccountId==null,Bt=y==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,an=j.step==="month_end_insights"&&(y==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||zt),et=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",Kt=y==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",fn=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&(c||_?.isNextDisabled===!1),yn=j.step==="month_end_insights"&&(zt||y==="flux_analysis")?!fn:_?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:an===!0?Mm(n.selectedPeriod.month):Re.next,style:{justifyContent:"space-evenly"},isDisabled:yn,suffixIcon:t.jsx(Ji,{}),onClick:()=>{et?i("autoCategorized"):It?l("reconcile"):r(j.step)}},cancelBtn:{label:Re.back,isDisabled:d||_?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ki,{}),onClick:()=>{Kt?i("review"):Bt?l("review"):It?C():r(R.step)}}}}}},Ee=()=>{switch(z){case"expenseAutomationFluxPage":return{confirmAction:()=>{P(!1),f([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{P(!1),w(A,J.map(X=>X.id),H,!1,E[A],Uo(oe,A),p,ie),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{P(!1),v(),x()}};default:return{confirmAction:()=>{P(!1)},confirmationDescription:dn.empty}}},me=()=>{z==="expenseAutomationFluxPage"||z==="expenseAutomationJESchedulePage"||z==="expenseAutomationTransactionsPage"?P(!0):x()},{primaryBtn:Qe,cancelBtn:qe,leftSideComponent:Je}=Ae(),{confirmAction:ce}=Ee(),Ne=X=>{if(y==="transaction_categorization"&&(X==="autoCategorized"||X==="review"))return{hideCountInTab:E[X]>un.common.numbers.maximumCount,count:E[X],isFetching:K[X].fetchState==="In-Progress"};if(y==="reconciliation"){const{reconciliation:be}=n,{selectedAccountId:je}=be;return je==null?{count:0,isFetching:!1}:X==="review"?{count:be.accountReconciliationsByAccountID[je]?.accountReconEntity?.transactionsToReview.length,isFetching:be.accountReconciliationsByAccountID[je]?.transactionFetchState.fetchState==="In-Progress"}:{count:be.accountReconciliationsByAccountID[je]?.accountReconEntity?.transactionsToReconcile.length,isFetching:be.accountReconciliationsByAccountID[je]?.transactionFetchState.fetchState==="In-Progress"}}},ot=y==="reconciliation"&&L.selectedAccountId!=null&&L.selectedReconAccount!=null,{month:rt,year:St}=H,mt=Un().set("month",rt-1).set("year",St),jt=mt.startOf("month").format(Gi),kt=mt.endOf("month").format(Gi),ze=`${jt} ${dn.hyphen} ${kt}`;return t.jsxs(Tm,{children:[ne?t.jsx(da,{containerStyle:{width:356},titleComponent:t.jsx(qm,{children:Rm}),primaryButtonText:Bm,secondaryButtonText:zm,proceedButtonVariant:"danger",action:{onOkClick:()=>{ce()},onCancelClick:()=>P(!1)},descriptionComponent:t.jsx(Jm,{children:un.confirmationDescription})}):null,t.jsxs(Am,{children:[t.jsx(xl,{onBack:C,navBarCustomElement:y==="reconciliation"&&L.selectedAccountId!=null?t.jsx(_m,{reconciliation:L}):void 0,onReconTabUpdate:l,currentRecontab:L.selectedTab,reconcileDetailPageFetchState:L.selectedAccountId!=null?L.accountReconciliationsByAccountID[L.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:ot?L.selectedAccountId:void 0,currentSelectedView:y,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ve(y,E.autoCategorized,ot?L.selectedAccountId:void 0,ot?L.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,ot?ze:void 0),searchText:W,currentTab:A,getTabCountAndFetchState:Ne,completionStatus:re,forceShowSubtitle:N===!0||y==="je_schedules"&&(T.fetchState==="In-Progress"||T.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ge,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??dn.empty,isZeniUser:Z,onAllThreadsClick:()=>{le!=null&&te(null),U(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:me}),t.jsx(Im,{...e,isCOTEnabled:h,setIsJeAccountSettingsOpened:G,setResetJeAccountSettingsForm:Y,allThreadsSectionOpen:B,setCurrentFooterFormId:q,currentFooterFormId:z,onCloseAllThreadsSection:()=>U(!1)}),t.jsx(Pe,{controller:y!=="month_end_insights",children:t.jsx(ts,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:Nm(z),primaryBtn:Qe,leftSideComponent:Je,cancelBtn:qe,separatorStyle:{marginRight:o.sp4}})})]})]})},_m=({reconciliation:e})=>{const n=bt(),{clearedBalance:d,variance:c,variancePercentage:p,deposits:h,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(Km,{children:t.jsxs(Gm,{children:[t.jsxs(uo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(ho,{children:t.jsx(Ym,{})}),t.jsx(po,{children:m?.fetchState==="In-Progress"?t.jsxs(xo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(go,{children:Ue("0,0.00",l)}),t.jsx(mo,{children:un.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(uo,{children:[t.jsx(ho,{children:t.jsx(Xm,{})}),t.jsx(po,{children:m?.fetchState==="In-Progress"?t.jsxs(xo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(go,{children:Ue("0,0.00",d)}),t.jsxs(e1,{children:[t.jsx(mo,{children:un.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(ye,{placement:"bottom",title:t.jsxs(t1,{children:[t.jsxs(Yi,{children:[t.jsxs(Zi,{children:[i.count," ",sn.payments]}),t.jsx(Xi,{children:Ue("0,0.[00]",i.totalAmount)})]}),t.jsxs(Yi,{children:[t.jsxs(Zi,{children:[h.count," ",sn.deposits]}),t.jsx(Xi,{children:Ue("0,0.[00]",h.totalAmount)})]})]}),display:"flex",children:t.jsx(Qm,{})})]})]})})]}),t.jsxs(uo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(ho,{children:t.jsx(Zm,{})}),t.jsx(po,{children:m?.fetchState==="In-Progress"?t.jsxs(xo,{children:[t.jsx(en,{height:25,width:120}),t.jsx(en,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(go,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Ue("0,0.00",c)}),p!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${p.toFixed(2)}%)`}):null]}),t.jsx(mo,{children:un.accountRecon.reconciliation.headers.variance})]})})]})]})})},co=(e,n,d,c,p)=>{const h=c,i=(e>1?h+"s":h)+" selected";return e>0?t.jsxs(Vm,{currentView:p,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(Hm,{multiDigit:e>=5,children:e}),t.jsx(Wm,{children:i}),e===n?t.jsx(Um,{children:`(${Em})`}):null]}):null},Mm=e=>{const n=Fm[e];return`${Om}${dn.space}${n}${dn.space}${Dm.insights}`};function Pm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,p=(d-1+e.length)%e.length,h=e[c],i=e[p];return{nextStep:h,previousStep:i}}const Nm=e=>`${e}_form`,Vm=a.div`
1547
1547
  display: flex;
1548
1548
  justify-content: flex-start;
1549
1549
  align-items: center;
@@ -1558,7 +1558,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1558
1558
  display: flex;
1559
1559
  justify-content: center;
1560
1560
  align-items: center;
1561
- `,Wm=a(_e)`
1561
+ `,Wm=a(Be)`
1562
1562
  color: ${e=>e.theme.colors.primary};
1563
1563
  `,Um=a(vt)`
1564
1564
  color: ${Xe.important};
@@ -1583,12 +1583,12 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1583
1583
  justify-content: center;
1584
1584
  align-items: center;
1585
1585
  gap: ${o.sp1};
1586
- `,ho=a.div`
1586
+ `,uo=a.div`
1587
1587
  display: flex;
1588
1588
  justify-content: center;
1589
1589
  align-items: center;
1590
1590
  gap: ${o.sp3};
1591
- `,po=a.div`
1591
+ `,ho=a.div`
1592
1592
  width: ${o.sp7};
1593
1593
  height: ${o.sp7};
1594
1594
  border-radius: 50%;
@@ -1596,12 +1596,12 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1596
1596
  justify-content: center;
1597
1597
  align-items: center;
1598
1598
  background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
1599
- `,mo=a.div`
1599
+ `,po=a.div`
1600
1600
  display: flex;
1601
1601
  flex-direction: column;
1602
- `,go=a(vt)`
1602
+ `,mo=a(vt)`
1603
1603
  color: ${e=>e.theme.colors.hero};
1604
- `,xo=a(is)`
1604
+ `,go=a(os)`
1605
1605
  min-width: 180px;
1606
1606
  color: ${e=>e.theme.colors.primary};
1607
1607
  `,Ym=a(fa)`
@@ -1616,7 +1616,7 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1616
1616
  color: ${e=>e.theme.colors.primary};
1617
1617
  width: ${o.sp4};
1618
1618
  height: ${o.sp4};
1619
- `,Qm=a(ss)`
1619
+ `,Qm=a(is)`
1620
1620
  width: ${o.sp3};
1621
1621
  height: ${o.sp3};
1622
1622
  color: ${e=>e.theme.colors.hero};
@@ -1631,18 +1631,18 @@ import{o,bT as ca,q as ke,gf as es,gg as ts,V as t,cn as da,aa as Pe,aP as ns,c
1631
1631
  background-color: ${Xe.overlayDark};
1632
1632
  padding: 2px ${o.sp2};
1633
1633
  border-radius: ${o.sp1};
1634
- `,Zi=a.div`
1634
+ `,Yi=a.div`
1635
1635
  display: flex;
1636
1636
  justify-content: space-between;
1637
1637
  gap: ${o.sp2};
1638
- `,Xi=a.div`
1638
+ `,Zi=a.div`
1639
1639
  text-transform: capitalize;
1640
- `,Qi=a(vt)`
1640
+ `,Xi=a(vt)`
1641
1641
  color: ${Xe.primaryDark};
1642
1642
  align-self: "flex-end";
1643
1643
  `,en=a(Dt)`
1644
1644
  border-radius: ${o.sp2};
1645
- `,fo=a.div`
1645
+ `,xo=a.div`
1646
1646
  display: flex;
1647
1647
  flex-direction: column;
1648
1648
  min-width: 180px;