@zeniai/web-cockpit-ui 1.15.58-qa → 1.15.59-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 (314) hide show
  1. package/dist/assets/{ACHDetailsPage-CfvX6zSV-BnYXr7da.js → ACHDetailsPage-CFhoboVe-NhNiWQoq.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-BTVbAUHG-BoVD62zB.js → AIPerformancePage-DB-fTWME-C20PCC17.js} +31 -31
  3. package/dist/assets/AccountInfoPage-pEEhPqOb-CuwSCEbu.js +18 -0
  4. package/dist/assets/{AccountInfoPageContent-Bk0YQ-4C-BFfUei9K.js → AccountInfoPageContent-eYEsv7ac-CxPwO1am.js} +17 -17
  5. package/dist/assets/{AccountLockedInfoModal-DM2zVI24-BKusNt5D.js → AccountLockedInfoModal-jYWr_8TD-BpvSTyB8.js} +8 -8
  6. package/dist/assets/{AccountReconDetailsDrawerPage-B6mhnC_D-UmCS2ljL.js → AccountReconDetailsDrawerPage-3Q0EPYhL-DhctK78k.js} +44 -44
  7. package/dist/assets/{AccountRow-2vAGu-jm-Ban2UP27.js → AccountRow-CdgvnPG8-BbJV8Q8M.js} +22 -22
  8. package/dist/assets/{AccountsPromoCardStack-z9STg_F3-DQIMAcch.js → AccountsPromoCardStack-DHo59LLN-G_DVA-Yj.js} +22 -22
  9. package/dist/assets/AddAddressForCardDrawer-BzO1FXUa-kqMHH9Vt.js +6 -0
  10. package/dist/assets/{AddToWalletPage-BMPHVMEY-uJdVtbyv.js → AddToWalletPage-BfXFbHjk-QRigQSHV.js} +28 -28
  11. package/dist/assets/{AgingReportsPage-Bngg8YpI-C_fcRo8j.js → AgingReportsPage-C1hFq4KH-COTxuu-2.js} +7 -7
  12. package/dist/assets/{AllUserItems-DzHTUgrn-wXFIirZl.js → AllUserItems-B6pnKByY-BUdz_J3g.js} +10 -10
  13. package/dist/assets/ApAgingDetailPage-CxLVGnpY-OkmLiLaF.js +46 -0
  14. package/dist/assets/{AppBasePage-DUoMiO7X-DW6VTkB1.js → AppBasePage-DiVxF606-C03aQg1o.js} +7 -7
  15. package/dist/assets/AppDrawerContent-B_EWsf8O-16pnrlUd.js +92 -0
  16. package/dist/assets/{ApprovalRulesSettingsPage-BfXvTQyU-Dh6b5zsc.js → ApprovalRulesSettingsPage-HHjDp_NQ-CDZaolru.js} +6 -6
  17. package/dist/assets/{ArAgingChart-BwVPNYHv-3oBDpKQx.js → ArAgingChart-Ba4A-i2N-Cm3Zb2-A.js} +1 -1
  18. package/dist/assets/ArAgingDetailPage-prgcvsS4-CC5CLIGP.js +46 -0
  19. package/dist/assets/{AttachmentView-DQKnQgQK-Bu5XLE-W.js → AttachmentView-SsWJw4A8-BGK1ntZP.js} +8 -8
  20. package/dist/assets/BalancesInsightWithToolTip-DE6gDjGA-D3lvmUPJ.js +38 -0
  21. package/dist/assets/{BankAccountSection-DxW0EB-K-BfA6R4ym.js → BankAccountSection-B4jmT0lb-DzAFSATj.js} +11 -11
  22. package/dist/assets/{BankAccountWarningSection-BQlPiqev-DQgUD-fz.js → BankAccountWarningSection-Bz2itMx0-BwlD2-aX.js} +9 -9
  23. package/dist/assets/{BankConnectionsSettingsPage-CFk2aMnM-Mskj_CdN.js → BankConnectionsSettingsPage-BcVk7bTt-CT4jBj4R.js} +26 -26
  24. package/dist/assets/{BillDetailPage-44pWv8Nq-DZ4TiXFR.js → BillDetailPage-Dkqmi4H1-BrWo4uGz.js} +4 -4
  25. package/dist/assets/{BillPayApprovalRuleDetailPage-D_Q7_oVR-Dl3E9h_h.js → BillPayApprovalRuleDetailPage-Blxlv3pa-CZSNHT3K.js} +1 -1
  26. package/dist/assets/{BillPayApprovalRulesPage-iTvysPLf-B5MNc-_v.js → BillPayApprovalRulesPage-B_QwggJS-LtyCS7v3.js} +14 -14
  27. package/dist/assets/{BillPayPromoPage-B5AGf-Xt-024pxlZZ.js → BillPayPromoPage-Bx2AXpWe-Du89a98b.js} +5 -5
  28. package/dist/assets/{BillPaySetUpPage-bNDxI3Kh-6_VU18cC.js → BillPaySetUpPage-CM7_DkHC-CclJKf3M.js} +3 -3
  29. package/dist/assets/{BillingSettingsPage-4WGlC_Ok-DUDn5i-o.js → BillingSettingsPage-DM0OIfxa-BuoiB9BU.js} +9 -9
  30. package/dist/assets/{BillsBulkReviewDrawerPage-8E35ktf3-Cw9-crTl.js → BillsBulkReviewDrawerPage-C3xmQ7wz-Bwj3c210.js} +1 -1
  31. package/dist/assets/{BoxItem-Yk1jfFWZ-DzXp7dNR.js → BoxItem-CvCo0wr6-DKAIvhWo.js} +1 -1
  32. package/dist/assets/{BusinessVerificationPage-CYzudAIt-BBXKWut1.js → BusinessVerificationPage-BAZmkR4a-AnwjdvL9.js} +10 -10
  33. package/dist/assets/{CardNumberSubText-DjHY0FvO-CjPeFW5K.js → CardNumberSubText-DHtSIcZZ-DL8DMs-k.js} +1 -1
  34. package/dist/assets/{CashbackDetailPage-BBnND02O-DWBUQ_Fx.js → CashbackDetailPage-CNS1FA6b-JWXE3hsL.js} +21 -21
  35. package/dist/assets/{ChargeCardDetailPage-BIR8jdTw-Czwwolcz.js → ChargeCardDetailPage-C4NeG7IM-CPxS6cRg.js} +35 -35
  36. package/dist/assets/{ChargeCardListPage-DIaPTqHg-CsAQvjuT.js → ChargeCardListPage-DNYiWaEf-DJhH9poc.js} +24 -24
  37. package/dist/assets/{ChargeCardListTable-Daaen5Xe-DifYJ3Zj.js → ChargeCardListTable-DdnyzdFf-BmYCmkcc.js} +49 -49
  38. package/dist/assets/{ChargeCardPaymentHistoryPage-BdQWV5hd-BxCbxBo_.js → ChargeCardPaymentHistoryPage-CXlqzaUt-BEtGgsbY.js} +36 -36
  39. package/dist/assets/{ChargeCardPromoPage-DAk2fYcE--OhP0cnw.js → ChargeCardPromoPage-D4canPX9-DuNs-QpK.js} +23 -23
  40. package/dist/assets/{ChargeCardSetupPage-64bBN1fe-BqFWzRA1.js → ChargeCardSetupPage-BtikPFOq-_QFEhM40.js} +3 -3
  41. package/dist/assets/ChargeCardStatementsPage-RepWBbvJ-fE-f9dTt.js +60 -0
  42. package/dist/assets/{CheckDepositDrawerPage-DlJJaad8-CLbfXmNK.js → CheckDepositDrawerPage-BCqg3irO-BNQC0cqt.js} +21 -21
  43. package/dist/assets/{CollapsableReportTable-CcyH-50D-D4qh_Iwq.js → CollapsableReportTable-gy7Ue_fk-D4P0G-Lp.js} +528 -496
  44. package/dist/assets/{CompanyOfficerDetailsSection-m-m1nELP-S26KFwxz.js → CompanyOfficerDetailsSection-BsCx7q-g-vYNOEpVO.js} +15 -15
  45. package/dist/assets/{CompanyPassportCard-ZBDBE8eV-CMQWkwBr.js → CompanyPassportCard-BbUWOs1U-BLVqocbL.js} +4 -4
  46. package/dist/assets/{CompanyPassportPage-B6zI52Pp-B__XqIFB.js → CompanyPassportPage-BnP2oA1U-zWSSW3Bs.js} +29 -29
  47. package/dist/assets/{CompleteProfile-BLWNz2VA-tYLyFWWU.js → CompleteProfile-TiRsm2Fm-CIjFxaAm.js} +3 -3
  48. package/dist/assets/ConfettiBurst-D7J36hZf-BKlSjT6j.js +1 -0
  49. package/dist/assets/{ConstrainedInnerElement-CgdnMeoA-BJt0x_QL.js → ConstrainedInnerElement-CgdnMeoA-Bv_SCMJB.js} +1 -1
  50. package/dist/assets/{CreateOrEditVendorPage-D_fPbFsR-ChtzoVO1.js → CreateOrEditVendorPage-Dihzr1D5-D9cB4SAg.js} +19 -19
  51. package/dist/assets/{CreditCardPaymentDrawerPage-Bl82rSY1-DDoITNb_.js → CreditCardPaymentDrawerPage-CZGzDuxC-p3RWbIDE.js} +14 -14
  52. package/dist/assets/{CurrencySelectField-CwNGSmb2-BfwCMrZd.js → CurrencySelectField-BTAmIqPa-BqQ2_ci5.js} +4 -4
  53. package/dist/assets/{CustomerOnboardingActivationPage-L6GfGsJ9-BbZGV_dK.js → CustomerOnboardingActivationPage-MVI7kqIh-wst5cRj4.js} +5 -5
  54. package/dist/assets/CustomerOnboardingContainerPage-DV3z4pR--Dxqq0QJL.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-MP-lAuJG-UK3eLYnf.js → CustomerOnboardingDetailPageSkeleton-CaI_0pCb-CxQ8bQdr.js} +14 -14
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-DF6CbSZs-7ZmdawXZ.js → CustomerOnboardingNoStepsPage-CO_c2COV-pLp1hFCt.js} +6 -6
  57. package/dist/assets/{CustomerOnboardingPage-Cl4wtP6t-Ex1UzqXa.js → CustomerOnboardingPage-BF0vuYaJ-JMRuse4Z.js} +14 -14
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-vkblu46s-h4faigoV.js → CustomerOnboardingProductSuitePage-BGFdLX1i-DySt6BQg.js} +6 -6
  59. package/dist/assets/{Dashboard-C1Fn0zHa-CkDT70CD.js → Dashboard-Qjedd4r--DHZmjgJN.js} +1 -1
  60. package/dist/assets/{DashboardReportPage-3lvWkrXH-CKAZqKLe.js → DashboardReportPage-Deith_ON-ChcA84Vk.js} +24 -24
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-Cn_5tbit-DB1raPJt.js → DashboardSidebarBackgroundAnimation-C7DfUDio-DPyKxS1U.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-DnL2eweO-BVp_XIJO.js → DepositAccTransactionItem-7kYotKov-BnPXoaAG.js} +6 -6
  63. package/dist/assets/{DepositAccTransactionListPage-HAUhc4OH-w6xPsKCN.js → DepositAccTransactionListPage-Bop4Uj5w-ZOaAmZOC.js} +3 -3
  64. package/dist/assets/DomesticWireDetailsPage-_TyXsqEx-cl5Mv1ja.js +21 -0
  65. package/dist/assets/{DownloadOverlay-GFsPIkgY-CIatX2-l.js → DownloadOverlay-Cmd727bN-BHplNe_3.js} +23 -23
  66. package/dist/assets/{DrawerPage-DudtPicH-DR7eAOPs.js → DrawerPage-DmGwfnGp-B5EgKZxZ.js} +14 -14
  67. package/dist/assets/EditPeoplePage-YyluIC6R-CQIl30sj.js +55 -0
  68. package/dist/assets/{EditReimbursementDetailPage-D8RHkMHR-DhpHj6Tk.js → EditReimbursementDetailPage-DeMid2Ko-BTURFjuA.js} +84 -84
  69. package/dist/assets/EntityDetailPage-DPTSSZdS-B-VW2ygZ.js +18 -0
  70. package/dist/assets/{EntitySummarySection-Po9-k_zM-CKOvXyjt.js → EntitySummarySection-5NbutA8l-Z4HQfo2N.js} +15 -15
  71. package/dist/assets/{ExpenseAutomationOverviewPage-CbLRqpw3-CE6o3IC8.js → ExpenseAutomationOverviewPage-CQ_3WluW-sBkDi2LJ.js} +10 -10
  72. package/dist/assets/{ExpenseAutomationPage-DD33LDin-CmmvW3gw.js → ExpenseAutomationPage-VuU4acYd-DRu_62Rz.js} +239 -239
  73. package/dist/assets/{ExpressPayPage-BbHx9h8j-Jtoo_XSn.js → ExpressPayPage-DhoNmyC2-Ixqn7FeR.js} +15 -15
  74. package/dist/assets/{FeaturePreviewPage-72x3P-pq-fDKDe74V.js → FeaturePreviewPage-GSwhPxgP-C20k6nV5.js} +2 -2
  75. package/dist/assets/{FollowStepsSection-BT_WjsEy-6nsqXk2v.js → FollowStepsSection-DaueHRo4-DdiQ4lOn.js} +11 -11
  76. package/dist/assets/{GlobalReviewListPage-C5h9rvVb-BrdUyPnT.js → GlobalReviewListPage-DG7_1HOT-mLv5NHYa.js} +8 -8
  77. package/dist/assets/{InformationCardStack-CjpOEuJF-DF2z_fcp.js → InformationCardStack-zc-BxR7F-B2cR2Vrc.js} +4 -4
  78. package/dist/assets/{InsightsCardStack-CkxN0Fd6-D3ds4snJ.js → InsightsCardStack-DxCA5sFh-CBXIO7T2.js} +14 -14
  79. package/dist/assets/InsightsSection-BdFG3j3R-DpGjm8qb.js +27 -0
  80. package/dist/assets/{IntegrationsSettingsPage-CN3x9o-8-n2lkrWPc.js → IntegrationsSettingsPage-CaiL3kqS-yWfc1-ip.js} +4 -4
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-C1WTGANK-CX6ZkpbL.js → InternationalWireSwiftDetailsPage-BrQVSzeS-DauYa5_z.js} +19 -19
  82. package/dist/assets/InternationalWireVerificationPage-NaLnhW9C-D3Wh10D9.js +65 -0
  83. package/dist/assets/InviteFormPage-fjqv2l7h-CoWToBnJ.js +312 -0
  84. package/dist/assets/{InvitePageListView-BbQyUnv0-DMumTMJP.js → InvitePageListView-CQecQhxr-BNu8hXMY.js} +48 -48
  85. package/dist/assets/InvitePeoplePage-DAEBuOnk-jK8Ueocl.js +12 -0
  86. package/dist/assets/InvoiceUploadSection-58l6ePuH-BuOyGSAC.js +140 -0
  87. package/dist/assets/{IssueChargeCardPage-BT9h01l_-siq7xJ-s.js → IssueChargeCardPage-Bkxqsgax-BMc-YwRY.js} +30 -30
  88. package/dist/assets/{LabeledAddressValue-DF623NAW-D4a6OVhw.js → LabeledAddressValue-CZfFV97h-DWDhZW5u.js} +2 -2
  89. package/dist/assets/LabeledAddressValueField-D66XOhMx-Di6mjf7B.js +45 -0
  90. package/dist/assets/{LabeledControlledCheckBoxField-DNFUkVLh-CuadpuTO.js → LabeledControlledCheckBoxField-BtnsqE4D-CLMK-CUC.js} +2 -2
  91. package/dist/assets/{LabeledCountryMultiSelectField-B5vytqi_-BXGWCwpL.js → LabeledCountryMultiSelectField-kopByxLB-CVecMMvH.js} +3 -3
  92. package/dist/assets/{LabeledCreatableSingleSelectField-DN5wCaeU-bysGqgYr.js → LabeledCreatableSingleSelectField-B6An-cwq-DxTaWad8.js} +3 -3
  93. package/dist/assets/LabeledDocumentField-D_ZD8JTn-BbI3Z3Te.js +41 -0
  94. package/dist/assets/{LabeledDropDownFormattedTextField-BvdkjSR_-0cU3E71g.js → LabeledDropDownFormattedTextField-CJ7ncCzH-CmOBBbLT.js} +8 -8
  95. package/dist/assets/{LabeledText-BDkcgGG4-YJ-8g03K.js → LabeledText-A1h_ionS-YHsepFfP.js} +4 -4
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-BnDEbwhn-BjMBeUGB.js → LabeledUserSingleSelectWithSubtitlesField-IYaUvqgY-BQ0ZCt10.js} +17 -17
  97. package/dist/assets/{LabeledZeniRolesDropDownField-CY2feiXB-HP_5dGNT.js → LabeledZeniRolesDropDownField-DmynBXbJ-BkBy6SHA.js} +16 -16
  98. package/dist/assets/{LinkJETransactionPage-Bc3h7Bsx-Wiea8FhX.js → LinkJETransactionPage-D6-fL4a6-DPNZmHzv.js} +5 -5
  99. package/dist/assets/LockCardPage-BDlnh_zf-coxMaBNB.js +623 -0
  100. package/dist/assets/{LowBalancePopup-CKSy3iEi-DCgRxDtE.js → LowBalancePopup-CBPl_udd-D2XBBf4O.js} +6 -6
  101. package/dist/assets/MagicLinkACHDetailsPage-eq8wlXQr-DtgQBKXr.js +1 -0
  102. package/dist/assets/{MagicLinkDomesticWireDetailsPage-zLqzW0ZA-DNf2ZFPO.js → MagicLinkDomesticWireDetailsPage-BcNOhJgL-C8mUkiDX.js} +1 -1
  103. package/dist/assets/{MagicLinkInternationalWireDetailsPage-OpEbz58h-DNNhjP9x.js → MagicLinkInternationalWireDetailsPage-Df8XYlkg-BRWnjp0l.js} +1 -1
  104. package/dist/assets/MagicLinkSuccessPage-Cl461HWp-CO6oeX5F.js +31 -0
  105. package/dist/assets/{MagicLinkTitleSection-D38JxxrQ-CU50p6sN.js → MagicLinkTitleSection-DoIMYrRv-BlE9zH37.js} +4 -4
  106. package/dist/assets/MailingDetailsSection-NdwWGQ88-D7MwCKtI.js +21 -0
  107. package/dist/assets/{MyBankConnectionsSettingsPage-TSaL2Z3R-7urnLeL-.js → MyBankConnectionsSettingsPage-BU6TBzI1-DN5Npe5i.js} +10 -10
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-BvcQUu1g-BAib1puz.js → MyPendingActivationChargeCardListPage-DcunCDU6-gyBwBEb_.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-AqrcruM6-CFhzI6VI.js → MyProfileSettingsPage-DF7ahyXE-B1LJnYuu.js} +7 -7
  110. package/dist/assets/{NavBarWithPicker-BpjOj0Mh-B0IyZ-5p.js → NavBarWithPicker-D2v1fhLS-C3H8GgqL.js} +5 -5
  111. package/dist/assets/{NavigationArrow-wyRPTk_w-CBPTcVzh.js → NavigationArrow-CWUL-6kN-BrqMd9Lj.js} +2 -2
  112. package/dist/assets/{NavigationDots-D4jbU1WN-2Zgm3tFB.js → NavigationDots-c-XSrFzE-Dxzsqafk.js} +4 -4
  113. package/dist/assets/{NewGlobalMerchantPage-B-aRURcQ-DM9ZiThQ.js → NewGlobalMerchantPage-FGEO68I8-B7wryl8V.js} +9 -9
  114. package/dist/assets/{NoDataChart-tpjEi1Wb-CneSdGWB.js → NoDataChart-DJhSgtLu-B7rWK9ww.js} +4 -4
  115. package/dist/assets/NoDataTable-BZiwo2qK-1fFq9QL7.js +8 -0
  116. package/dist/assets/{NotFoundPage-aEkhvzEG-5jUiDOLs.js → NotFoundPage-BN5unYX8-RIPoUtcm.js} +5 -5
  117. package/dist/assets/{NotificationSettingsPage-CMNyI8E6-BB9rHV42.js → NotificationSettingsPage-d8kHDj0M-BR4XfDGy.js} +31 -31
  118. package/dist/assets/{NotificationsListConfig-CqxCGQSM-CNk3ZSrm.js → NotificationsListConfig-ThKLok_w-DiwvAaDh.js} +1 -1
  119. package/dist/assets/{NotificationsPage-xmWyvsYE-DgxInQel.js → NotificationsPage-Uvu6XESA-C7IDz_PV.js} +28 -28
  120. package/dist/assets/{OpExByVendorPage-BwWSNQjj-ArHXz_mI.js → OpExByVendorPage-QyqRkD2_-BZtZlU0k.js} +8 -8
  121. package/dist/assets/{OverlayContainerPage-BG9y5C0t-C04r--J3.js → OverlayContainerPage-BG9y5C0t-B5Ccc20I.js} +1 -1
  122. package/dist/assets/PandLWithForecastPage-DJ2v5qbE-D34Zu7P_.js +123 -0
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-Cg-iwsq9-yL-9Kg03.js → PaymentAccountSetupBillingAddressSection-q5z8XZFC-BXoCztnc.js} +12 -12
  124. package/dist/assets/{PeoplePage-CgLumn7f-DpLXgwxu.js → PeoplePage-C5ZdpVyR-D5gb3H9N.js} +34 -34
  125. package/dist/assets/{Preview-BoQzKWlV.js → Preview-M7TzJD6j.js} +1 -1
  126. package/dist/assets/{ProductsCarousel-LGZZZ4bc-BrX6HY26.js → ProductsCarousel-CXjLTOLy-qhgO5u3T.js} +4 -4
  127. package/dist/assets/{PromoBaseCards-DMnQ-nBZ-DDlepqsM.js → PromoBaseCards-CN9uZfG4-4ZG6rDcT.js} +3 -3
  128. package/dist/assets/{QBOConnectionDialog-ufRcAeE8-jq-VIkh3.js → QBOConnectionDialog-CXSi1Pd9-BlV5xAad.js} +3 -3
  129. package/dist/assets/{QBOSetupSection-BaxLXdyW-Bw8JqvSl.js → QBOSetupSection-BrtLMvEP-CWf9qAKV.js} +19 -19
  130. package/dist/assets/{ReimbursementApprovalRuleDetailPage-CE0CxjTY-s7g4Epqs.js → ReimbursementApprovalRuleDetailPage-CS1BQ7pL-gwQi2ubd.js} +1 -1
  131. package/dist/assets/{ReimbursementApprovalRulesPage-DDNhjbbG-e47fcCBo.js → ReimbursementApprovalRulesPage-aLRkhkZB-CtUN1jCI.js} +7 -7
  132. package/dist/assets/{ReimbursementDetailPage-BOW1JodW-Br3QbgaE.js → ReimbursementDetailPage-Dr5BTvEq-BkIwEWVX.js} +17 -17
  133. package/dist/assets/{ReimbursementPromoPage-lD4FRDbt-BTRv0wOn.js → ReimbursementPromoPage-C5Z0mVhQ-sIeJk3bD.js} +8 -8
  134. package/dist/assets/{ReimbursementSetUpPage-vZd1l3-L-BJb01JMz.js → ReimbursementSetUpPage-CXhOBErm-DH5oFO_k.js} +7 -7
  135. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BV1eoHFe-Ct7RQx5a.js → ReimbursementsBulkReviewDrawerPage-CA0n0mau-YPT0uXmT.js} +1 -1
  136. package/dist/assets/{ReloadCard-DZJ1-x96-12T5DybX.js → ReloadCard-Bjp8ygC2-QCThgpLx.js} +6 -6
  137. package/dist/assets/{ReportTableViewSelector-NmHJk-6O-Bo6jFRe0.js → ReportTableViewSelector-DTk1dNWC-B6Y4EDN-.js} +9 -9
  138. package/dist/assets/ReportsPage-DrjOGopt-DJaJ6UxU.js +258 -0
  139. package/dist/assets/{RevenueChart-CKjVL6iT-Bl6arWa6.js → RevenueChart-CqGvXDr4-ls1jVoKH.js} +1 -1
  140. package/dist/assets/{ReviewDetailsPage-Dm5-QehL-C1ebQa3V.js → ReviewDetailsPage-CWBP7FBN-BDBxmvOT.js} +19 -19
  141. package/dist/assets/{ReviewOverlay-DyTC2zKj-Cqqa9ybn.js → ReviewOverlay-Cxkp85Kw-C7d3vwBi.js} +6 -6
  142. package/dist/assets/RoleWithToolTip-CqLxmtj6-BNUOWMRG.js +22 -0
  143. package/dist/assets/ScheduleDetailsFixedAssetsPage-CYvlB3Nf-BjdxIH5b.js +37 -0
  144. package/dist/assets/ScheduleDetailsPage-CZXJ15tN-CjrCADWR.js +37 -0
  145. package/dist/assets/ScheduleSequenceTable-DNPID_7F-j2fgEjwp.js +326 -0
  146. package/dist/assets/{ScreenRoutes-CCqT3xt1.js → ScreenRoutes-DJ_rUo9A.js} +1 -1
  147. package/dist/assets/{SetUpAccountSection-BkGBS9x_-R8tgE_Z9.js → SetUpAccountSection-_WPR-q2V-DrJlA8IQ.js} +16 -16
  148. package/dist/assets/{SignIn-DybDQnmR-ByUOpVOm.js → SignIn-CDEsZw_T-0YUs2QmP.js} +33 -33
  149. package/dist/assets/SignInScreen-CUXsEOc0.js +1 -0
  150. package/dist/assets/{SpendManagementListViewPage-DkEZTojy-CA6_5Fky.js → SpendManagementListViewPage-MOCWuROI-DKR38Veg.js} +11 -11
  151. package/dist/assets/{SpendManagementPerTabPage-CR9CphX3-BEr99KbG.js → SpendManagementPerTabPage-BeK0SCeE-D8khDgh_.js} +43 -43
  152. package/dist/assets/{SpendManagementSection-DqDra2TJ-DXPdzdx4.js → SpendManagementSection-DZFPfKNi-BUQ2S0Kz.js} +17 -17
  153. package/dist/assets/{StatementItem-DSuaMb54-ChcIWFK-.js → StatementItem-DjvU5wiI-DHTNeSpB.js} +2 -2
  154. package/dist/assets/StatementsPage-DYLp_e7W-C5hw_hkQ.js +58 -0
  155. package/dist/assets/{StatusSwitcher-Z7jo_R2B-D-RVNmDS.js → StatusSwitcher-jxaonB4S-Dw8Z5KsP.js} +2 -2
  156. package/dist/assets/{SubTabSwitcher-DJvtpJh2-CqJlCEZ1.js → SubTabSwitcher-CudjNlsi-Dk2m1EXt.js} +3 -3
  157. package/dist/assets/{SummaryCard-D4k-35Mt-CKKk3xUZ.js → SummaryCard-DPOhBmkr-Cj1Lt-Mp.js} +1 -1
  158. package/dist/assets/{TaskManagementPage-Cadtu3qQ-zX8lQopX.js → TaskManagementPage-CTMoHv0R-DzrReeZE.js} +13 -13
  159. package/dist/assets/{TimeRangeSwitcher-CXt00my3-kyL42Suj.js → TimeRangeSwitcher-SqY2MHGs-Bpa_mFEa.js} +5 -5
  160. package/dist/assets/{TimeframeSwitcher-D0ujXDLd-DkH3ill0.js → TimeframeSwitcher-BlJ2fuHy-8yHS99Lr.js} +4 -4
  161. package/dist/assets/{TimeframeSwitcherWithToggle-CMzQ2qRz-CKP0fk1A.js → TimeframeSwitcherWithToggle-Dgc1odUH-CNwpIwWb.js} +4 -4
  162. package/dist/assets/{TopExCard-BmRXVrxo-D8yAs-m9.js → TopExCard-CG8YLsYe-CsdBprjg.js} +11 -11
  163. package/dist/assets/{TopExDetailPage-Ds-BZjbz-IOO7_XQl.js → TopExDetailPage-TvYCbzSP-C1DN6y7-.js} +16 -16
  164. package/dist/assets/{TransactionActivityLogPage-CKIHtz5l-D-dTYDgC.js → TransactionActivityLogPage-BL3vEAdU-B_s3Ii9P.js} +11 -11
  165. package/dist/assets/{TransactionDetailPage-B1UKqtkR-BE9V0dPT.js → TransactionDetailPage-DUouBL0o-BwsVWjsw.js} +26 -26
  166. package/dist/assets/{TransactionList-BE3ODDi0-BDIJTskc.js → TransactionList-B16NONME-MhxbTKXX.js} +18 -18
  167. package/dist/assets/{TransactionListBig-JcBvCcMd-HNZ38dTS.js → TransactionListBig-CItPbTRV-CTDy7YXE.js} +10 -10
  168. package/dist/assets/TransactionListPage-DNecYY8M-DvyKlW5R.js +35 -0
  169. package/dist/assets/{TransactionVendorDetailPage-BCtWJV5U-CC-HiQvd.js → TransactionVendorDetailPage-DpqisXN8-BeIl3VIo.js} +6 -6
  170. package/dist/assets/{TransferDrawerPage-DoIPGIdB-JAB5Sz6q.js → TransferDrawerPage-Dsmbswu0-DuQeRo8o.js} +24 -24
  171. package/dist/assets/{TreasuryOverviewPage-lmaT3YkG-C6wF0pBN.js → TreasuryOverviewPage-BcRpcYmB-B_2n4w_R.js} +40 -40
  172. package/dist/assets/{TreasuryPromoPage-avx9YENY-CaSHYgG2.js → TreasuryPromoPage-DOO_OMRa-Nn5daNmi.js} +19 -19
  173. package/dist/assets/{TreasuryStatementsPage-BguLbwsn-B5E0Q7zz.js → TreasuryStatementsPage-A_U7bEy5-DdFUWuDa.js} +7 -7
  174. package/dist/assets/TreasuryTaxLetterPage-BsJn-BgX-CQZpySFF.js +58 -0
  175. package/dist/assets/{TrendChart-rzKYI72b-x69qqEF1.js → TrendChart-GMMat-NG-CAc9nAfG.js} +2 -2
  176. package/dist/assets/{TrendWithTransactions-atLfDrR5-B0aSX9-q.js → TrendWithTransactions-CrA4opNV-BTtTpjeg.js} +6 -6
  177. package/dist/assets/{UncategorizedAccountsMappingPage-5VnrVRL7-DkHh43Pm.js → UncategorizedAccountsMappingPage-CrzbFGOi-B7V18O6N.js} +10 -10
  178. package/dist/assets/{UnitIntegrationPage-CRtWNQ9s-BlzFosEv.js → UnitIntegrationPage-XZY6zJa7-Cq4xbYW7.js} +13 -13
  179. package/dist/assets/{UploadAdditionalDocumentOverlay-D0FPdZ3n-DT1NoKwU.js → UploadAdditionalDocumentOverlay-eqwSLigx-Ci9eqDqb.js} +2 -2
  180. package/dist/assets/Vendor2FAPopup-BHDivuPB-Cn8-yps4.js +1 -0
  181. package/dist/assets/VendorACHDetailsPage-DJ4Crnr0-adpyH1RD.js +1 -0
  182. package/dist/assets/{VendorDetailPage-DJ54yvWY-DtibNEE0.js → VendorDetailPage-DEu-yS8w-DNet96B_.js} +24 -24
  183. package/dist/assets/VendorDomesticWireDetailsPage-WFcOmpiN-CHE49l9v.js +1 -0
  184. package/dist/assets/{VendorFiling1099EditablePage-B0LEUR_g-CsMru02g.js → VendorFiling1099EditablePage-C461SzO0-BVUWElpF.js} +32 -32
  185. package/dist/assets/{VendorFirstReviewPage-7VUbqyR2-B-t_-gOw.js → VendorFirstReviewPage-klbCHS04-BFjy2m5_.js} +32 -32
  186. package/dist/assets/{VendorInternationalWireDetailsPage-CHFMTDYG-UTfMlqxi.js → VendorInternationalWireDetailsPage-DY0V-VbO-C2xJ0CsJ.js} +26 -26
  187. package/dist/assets/VendorInternationalWireSwiftDetailsPage-B8sx02I_-CE29O6S4.js +1 -0
  188. package/dist/assets/{VendorsAccountsSection-By1Bhh27--5FkvREo.js → VendorsAccountsSection-Cqcr-ArD-DAAwd5Iw.js} +4 -4
  189. package/dist/assets/{VerifyDevice-gXwkGIjJ-ffTqb92V.js → VerifyDevice-Dhu5iywf-HX-kw30c.js} +8 -8
  190. package/dist/assets/{VideoPlayer-DBU7xwIG-G3eDrHhm.js → VideoPlayer-ZGjx_Hp7-Nomi0VD9.js} +3 -3
  191. package/dist/assets/VideoPopup-R3u0N_if-DgVn2CAl.js +31 -0
  192. package/dist/assets/{WarningsDrawerPage-ByCZSQ-E-S67fi1hF.js → WarningsDrawerPage-TerLFC4m-C5ptwy3N.js} +8 -8
  193. package/dist/assets/{ZeniAccountDetailPage-DlCJ5UGq-D5M3rInN.js → ZeniAccountDetailPage-DQB7sXU9-CETOq0EN.js} +16 -16
  194. package/dist/assets/{ZeniAccountListViewPage-DTiBd3Ze-DvMCmuRh.js → ZeniAccountListViewPage-BwXKgf6g-DrDKS22-.js} +29 -29
  195. package/dist/assets/{ZeniAccountNavBarPieces-DAcKYXqh-C3pU1dfO.js → ZeniAccountNavBarPieces-CHUTFAWG-DBX2rB9H.js} +4 -4
  196. package/dist/assets/{ZeniAccountPromoPage-MPekAyNe-BSRrdgoj.js → ZeniAccountPromoPage-BkfJuMNV-DSkmb6Z5.js} +28 -28
  197. package/dist/assets/ZeniAccountSetupPage-C3drM4Zs-D-HaFV-S.js +36 -0
  198. package/dist/assets/{ZeniCopyright-B1muAGCe-RlRc6Vn6.js → ZeniCopyright-CznSgVJF-iBl18n1m.js} +1 -1
  199. package/dist/assets/{ZeniTransferAmountSlider-CX1FGWrl-Sctz6Ol2.js → ZeniTransferAmountSlider-C77DEl-C-CZljZWCZ.js} +7 -7
  200. package/dist/assets/{add-to-wallet-DgdBD8_G-D76iCYbd.js → add-to-wallet-DgdBD8_G-CM6IrCpv.js} +1 -1
  201. package/dist/assets/{analytics-R4GG3mhr.js → analytics-B_VWX-BQ.js} +1 -1
  202. package/dist/assets/analyticsHelper-B8fd42um.js +1 -0
  203. package/dist/assets/{analyticsHelper-BznLUYs2-PwxmAlPi.js → analyticsHelper-Bh8o1v3y-C4Sojiq_.js} +1 -1
  204. package/dist/assets/{arrow-south-east-round-PEovUgvH-BDgsRTSD.js → arrow-south-east-round-PEovUgvH-CQGzMyhs.js} +1 -1
  205. package/dist/assets/{auto-transfer-rule-mbafm5D3-keRK9wSo.js → auto-transfer-rule-mbafm5D3-Ba30im8q.js} +1 -1
  206. package/dist/assets/{chartTypes-Bckf_DAs-Bp9EYUYX.js → chartTypes-C14YY2Rq-DHigu710.js} +1 -1
  207. package/dist/assets/{commonDimensions-Bno19oYe-Ckn-nRQz.js → commonDimensions-CVpc-NCw-D6CVEqC_.js} +1 -1
  208. package/dist/assets/{commonTypes-CATFe6V_-DoBP4FJ5.js → commonTypes-Ec-PxfpT-Dj2109B_.js} +1 -1
  209. package/dist/assets/{constants-CEF2OtLN.js → constants-DgwGHN1r.js} +1 -1
  210. package/dist/assets/{core-DpPwA1EY.js → core-Cjh03OPu.js} +1 -1
  211. package/dist/assets/{dash.all.min-DdEpb4Db.js → dash.all.min-CCSNDyIp.js} +1 -1
  212. package/dist/assets/downloadPdf-BuPJ6cfr-Dyz4TLVR.js +1 -0
  213. package/dist/assets/{empty-nUYKFD2C.js → empty-DlGh28fD.js} +1 -1
  214. package/dist/assets/{empty-r8v2CG_J.js → empty-iTJcp-B8.js} +1 -1
  215. package/dist/assets/{epic-BSSFYfU0.js → epic-hN0N_N79.js} +1 -1
  216. package/dist/assets/{gift-box-Cmt9OgIZ-v4xTyl5z.js → gift-box-Cmt9OgIZ-TbiyaSAn.js} +1 -1
  217. package/dist/assets/{graphic-no-data-l-DU4J8fDt-CDoGR872.js → graphic-no-data-l-DU4J8fDt-CxIH_dl6.js} +1 -1
  218. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-BB-JG1AW.js → graphic-no-data-net-burn-l-CzmycA0m-CUkTpFd-.js} +1 -1
  219. package/dist/assets/{handshake-BPg58FML-B0fu0zwh.js → handshake-BPg58FML-Dbtylvfc.js} +1 -1
  220. package/dist/assets/{helper-BCh4SWyd-CwI6N1FK.js → helper-AgH8nJln-Bk3G7LVh.js} +4 -4
  221. package/dist/assets/{index-CMalJxiA.js → index-B5cuJQnR.js} +1 -1
  222. package/dist/assets/{index-VSH6R5vg.js → index-Bk7UJBjY.js} +1 -1
  223. package/dist/assets/{index-BTvJvxFI.js → index-C4Fispms.js} +1 -1
  224. package/dist/assets/{index-C6nwvBZg.js → index-ChCGry2d.js} +1 -1
  225. package/dist/assets/{index-BlPcRVKX.js → index-DAwCqq2t.js} +1 -1
  226. package/dist/assets/{index-SEvYEB33.js → index-DFowIMIZ.js} +1 -1
  227. package/dist/assets/{index-uV9C0lq0.js → index-aCBnCBoN.js} +3602 -3593
  228. package/dist/assets/{lexical-WuSd_Y3l.js → lexical-9REae7LV.js} +1 -1
  229. package/dist/assets/{liveblocks-PPyiYwu4.js → liveblocks-CEY7tsth.js} +1 -1
  230. package/dist/assets/{lottie-CwowL814.js → lottie-BmLFYENY.js} +1 -1
  231. package/dist/assets/mapLoadingInProgressToTreeNode-DTyQHWMc-CfKVg64X.js +1 -0
  232. package/dist/assets/mapSectionWithAcOnlyToTreeNode-D7pjBGp6-Bef-KTrw.js +1 -0
  233. package/dist/assets/mapSpacerToTreeNode-Cd4FCXAf-BQ_XhzIu.js +1 -0
  234. package/dist/assets/mapTimeframeBalancesToTreeNode-Drhl_lnP-CrhrR0QG.js +1 -0
  235. package/dist/assets/mapTimeframeBalancesToTreeNode-UsawmMLa-_s__LV61.js +1 -0
  236. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-B-aNuSSK-BvCkLSPj.js +1 -0
  237. package/dist/assets/{mui-CgOsYmSB.js → mui-BosmckWV.js} +1 -1
  238. package/dist/assets/{page-detail-CWX5S47F-npur6fd8.js → page-detail-CWX5S47F-C2A7RuXG.js} +1 -1
  239. package/dist/assets/{panelSelectedMixin-Cddsb26L-BDFz9brn.js → panelSelectedMixin-Cddsb26L-CWVsp72I.js} +1 -1
  240. package/dist/assets/{radio-default-CiSgisfh-CaCRbViv.js → radio-default-CiSgisfh-Dhw9u_Vt.js} +1 -1
  241. package/dist/assets/{react-D6M30H8E.js → react-CLFAbS9n.js} +2 -2
  242. package/dist/assets/{react-DzADjYrb.js → react-D8DqvAAs.js} +1 -1
  243. package/dist/assets/{react-1JgjrFGc.js → react-DAXSMqh2.js} +1 -1
  244. package/dist/assets/{react-B5r5WB2A.js → react-DSh5n3Dg.js} +1 -1
  245. package/dist/assets/{react-D2UrnCU4.js → react-DT8qkoNX.js} +1 -1
  246. package/dist/assets/{react-5VwsKWlP.js → react-DTZ405nF.js} +1 -1
  247. package/dist/assets/{react-Bpsw4H-g.js → react-DxfKP-TY.js} +1 -1
  248. package/dist/assets/{react-C_FwXK63.js → react-ddvEC0y3.js} +1 -1
  249. package/dist/assets/{recharts-B5a8DAKj.js → recharts-CimMNwCJ.js} +1 -1
  250. package/dist/assets/{sentry-rcvLxAzW.js → sentry-DzaNjvx0.js} +1 -1
  251. package/dist/assets/{shield-DOlUxcFf-DrUeUva_.js → shield-DOlUxcFf-Cva3YFBn.js} +1 -1
  252. package/dist/assets/toCOABalancesWithID-wh35N3no-ClXxioRe.js +1 -0
  253. package/dist/assets/toChartData-G5y-N82I-BBptd2Gk.js +1 -0
  254. package/dist/assets/{upload-reimbursement-receipt-O2N8vcO7-BkGK3BZ_.js → upload-reimbursement-receipt-O2N8vcO7-CMjD_kCZ.js} +1 -1
  255. package/dist/assets/{uploadAttachment-BLbU_iLy-Cn6htN7U.js → uploadAttachment-RbkIBMGO-TVHnian4.js} +17 -17
  256. package/dist/assets/{uploadReceipts-CIgkuVpu-Bgo2p-8x.js → uploadReceipts-CIgkuVpu-Dil-Qv4Z.js} +1 -1
  257. package/dist/assets/{url-C66ml4tg.js → url-KRGewpHH.js} +1 -1
  258. package/dist/assets/{url-Ce1cqXlU.js → url-ymOv7sCf.js} +1 -1
  259. package/dist/assets/{useLongPress-GCK2COYQ-DY03cKku.js → useLongPress-GCK2COYQ-BgaoTE4k.js} +1 -1
  260. package/dist/assets/{usp-line-BBd1wKwW-BM7i27Wh.js → usp-line-BBd1wKwW-Bnk1sVWO.js} +1 -1
  261. package/dist/assets/{utils-GKlM-QyI.js → utils-THjX-QSp.js} +1 -1
  262. package/dist/assets/{zeni-epic-state-D5MWzrZ6.js → zeni-epic-state-BNpJ2txa.js} +7 -7
  263. package/dist/index.html +1 -1
  264. package/package.json +3 -3
  265. package/dist/assets/AccountInfoPage-XrG_Cs9Q-BjKmCZKu.js +0 -18
  266. package/dist/assets/AddAddressForCardDrawer-BjL_E7Jt-BqV5wj25.js +0 -6
  267. package/dist/assets/ApAgingDetailPage-BdNgdMZi-DJq3tAqz.js +0 -46
  268. package/dist/assets/AppDrawerContent-DpoXoHZU-DR5CGNls.js +0 -92
  269. package/dist/assets/ArAgingDetailPage-Cl5P98Kf-BFShKipH.js +0 -46
  270. package/dist/assets/BalancesInsightWithToolTip-B0YZt5m3-DjqAngZd.js +0 -38
  271. package/dist/assets/ChargeCardStatementsPage-B-XeiOnb-DLIBzbq-.js +0 -60
  272. package/dist/assets/ConfettiBurst-BCkkcLA1-CXjExpzp.js +0 -1
  273. package/dist/assets/CustomerOnboardingContainerPage-C_wG7Q8O-BR0kgKEZ.js +0 -1
  274. package/dist/assets/DomesticWireDetailsPage-QhDoZX5h-BgrN8fs3.js +0 -21
  275. package/dist/assets/EditPeoplePage-DD6wg7xI-_tzQnjsD.js +0 -55
  276. package/dist/assets/EntityDetailPage-levtFHaa-DA4k2cnL.js +0 -18
  277. package/dist/assets/InsightsSection-Cwd2cIP2-BnHpqv9D.js +0 -27
  278. package/dist/assets/InternationalWireVerificationPage-H6gzEDg6-fjU1XMHZ.js +0 -65
  279. package/dist/assets/InviteFormPage-D56FOZEG-CMUlIs-X.js +0 -312
  280. package/dist/assets/InvitePeoplePage-D-XyBXhF-D4mjC05U.js +0 -12
  281. package/dist/assets/InvoiceUploadSection-DaJWTI5B-B6XbuKee.js +0 -140
  282. package/dist/assets/LabeledAddressValueField-B5eyO5LD-1yB-ANDh.js +0 -45
  283. package/dist/assets/LabeledDocumentField-H4V0rHKt-CfD-D1mp.js +0 -41
  284. package/dist/assets/LockCardPage-DIZ-1K3B-DoKRqXz4.js +0 -623
  285. package/dist/assets/MagicLinkACHDetailsPage-DdWD8eZA-BQF6ZaYY.js +0 -1
  286. package/dist/assets/MagicLinkSuccessPage-fC1L-fjF-D0AcUoNI.js +0 -31
  287. package/dist/assets/MailingDetailsSection-_5DUMAiO-CN0GY3U_.js +0 -21
  288. package/dist/assets/NoDataTable-BtEKMdpl-5T10t8Bw.js +0 -8
  289. package/dist/assets/PandLWithForecastPage-GXzJgAFS-BaOt9ro5.js +0 -107
  290. package/dist/assets/ReportsPage-CqCp4w8y-DJ_z1O-2.js +0 -237
  291. package/dist/assets/RoleWithToolTip-Cu0ixEhp-CbBWt2cn.js +0 -22
  292. package/dist/assets/ScheduleDetailsFixedAssetsPage-9XyukA76-CCXXH9fn.js +0 -37
  293. package/dist/assets/ScheduleDetailsPage-CkMIJDcP-Pzn7oHhr.js +0 -37
  294. package/dist/assets/ScheduleSequenceTable-Dgb-vhXK-B0K_kZdi.js +0 -324
  295. package/dist/assets/SignInScreen-DTqfud4B.js +0 -1
  296. package/dist/assets/StatementsPage-BO3P2kKJ-Cx3q3Xoo.js +0 -58
  297. package/dist/assets/TransactionListPage-DqY2twbP-CMg44It6.js +0 -35
  298. package/dist/assets/TreasuryTaxLetterPage-BT_G7d-D-CkFo0wcb.js +0 -58
  299. package/dist/assets/Vendor2FAPopup-CH44a6ok-C6c_8fAz.js +0 -1
  300. package/dist/assets/VendorACHDetailsPage-YgMvjx2w-C_ciXBuk.js +0 -1
  301. package/dist/assets/VendorDomesticWireDetailsPage-CRsOlxyy-CCULw521.js +0 -1
  302. package/dist/assets/VendorInternationalWireSwiftDetailsPage-D0Fnosfi-7sDGJOsu.js +0 -1
  303. package/dist/assets/VideoPopup-Dxc93Pwx-4nt_V7AU.js +0 -31
  304. package/dist/assets/ZeniAccountSetupPage-CxYZzfiZ-r8QQEMaF.js +0 -36
  305. package/dist/assets/analyticsHelper-C5rhp2_h.js +0 -1
  306. package/dist/assets/downloadPdf-CkATqzUx-Dc-uQGNf.js +0 -1
  307. package/dist/assets/mapLoadingInProgressToTreeNode-DcYetEpP-CsO00r3l.js +0 -1
  308. package/dist/assets/mapSectionWithAcOnlyToTreeNode-CExgzViB-CdHm7xiF.js +0 -1
  309. package/dist/assets/mapSpacerToTreeNode-D02PFsN8-CpAel0E8.js +0 -1
  310. package/dist/assets/mapTimeframeBalancesToTreeNode-CoqcGXTM-BAVPnmdP.js +0 -1
  311. package/dist/assets/mapTimeframeBalancesToTreeNode-D0zXBGho-BFFFE8UF.js +0 -1
  312. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-_7RU9lwp-BmunaChV.js +0 -1
  313. package/dist/assets/toCOABalancesWithID-C-wpsGXP-BaAwN-7v.js +0 -1
  314. package/dist/assets/toChartData-C-X2WzOE-DjbtnWdG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as Ge,aT as nr,u as f,O as me,ak as ot,an as Re,cu as _l,ac as D,x as Q,f as Tt,bE as Vl,ik as Nl,aQ as nt,bX as xe,dm as Pi,et as Ul,bx as Hl,p as he,au as Wl,eK as Qt,L as Jn,dU as Ze,b5 as Kn,ds as ir,bt as ql,gc as Jl,ii as Kl,h7 as Ql,g$ as or,by as Gl,bR as it,b9 as Qn,bM as sr,kv as Yl,ao as Ye,c8 as Zl,n as ar,bb as rr,as as Vo,aa as xn,bQ as No,ae as fn,kw as Xl,kx as ec,ky as tc,kz as Vn,kA as lr,kB as cr,kC as nc,kD as hs,kE as ic,gr as dr,dq as ur,kF as oc,kG as sc,kH as ac,kI as rc,kJ as lc,kK as cc,kL as dc,kM as uc,kN as hc,kO as pc,kP as hr,kQ as mc,kR as gc,kS as xc,kT as fc,gG as Uo,cg as Gn,cx as zi,t as pr,v as mr,cJ as Yn,dY as Ho,b as Wo,hG as yc,bq as wc,cn as bc,c6 as Cc,c3 as Zn,gJ as ps,iY as ms,aq as $t,dn as Xn,d5 as Kt,dI as qe,cq as ei,cD as ti,cG as ni,kU as vc,w as yt,iu as gr,fG as Sc,aG as xr,kV as kc,aX as qo,aS as gs,h1 as fr,kW as jc,kX as $c,kY as Ic,bH as yr,aV as Tc,gP as Jt,i7 as Hi,eH as $i,cN as Jo,aA as Lc,eI as wr,gB as Ac,fV as Rc,hb as br,y as Ec,kZ as Dc,a_ as Ko,jX as Mc,jY as Oc,dT as Cr,k_ as vr,j2 as Pc,hW as zc,gH as Ii,jt as xs,k$ as Fc,a$ as Bc,dw as Sr,a as Wn,iD as kr,iM as Ro,l0 as Tn,ej as jr,el as $r,j5 as Eo,j6 as Ir,d2 as Tr,l1 as _c,d3 as Fi,iE as Lr,fu as Ar,l2 as Vc,ey as Wi,aM as Do,l3 as Nc,cS as Uc,iT as Hc,dW as Wc,l4 as qc,gM as Jc,b3 as qi,eu as Kc,fP as Qc,l5 as Gc,dS as Yc,hL as Zc,a9 as Xc,ev as ed,ew as td,ex as nd,eA as fs,eB as ys,eC as id,gT as od,b1 as sd,eM as ad,eN as rd,eO as ld}from"./index-uV9C0lq0.js";import{a as s,P as cd}from"./sentry-rcvLxAzW.js";import{n as o,c as le,k as Bi}from"./mui-CgOsYmSB.js";import{bh as Ji,kO as dd,He as ws,Hf as qn,Hg as ud,Hh as hd,cx as pd,bL as Di,cy as md,c4 as Qo,Hi as gd,FC as bs,cz as xd,cA as fd,lT as Nn,bE as ln,Hj as Cs,Hk as yd,bV as Rr,bo as cn,Hl as wd,Hm as Er,Hn as Dr,Ho as Mr,Hp as Or,Hq as Pr,Hr as Go,ll as bd}from"./zeni-epic-state-D5MWzrZ6.js";import{t as Yo}from"./panelSelectedMixin-Cddsb26L-BDFz9brn.js";import{g as zr,X as Fr,s as Ln,J as Ot}from"./CollapsableReportTable-CcyH-50D-D4qh_Iwq.js";import{N as Ki}from"./AccountRow-2vAGu-jm-Ban2UP27.js";import{o as Br}from"./mapTimeframeBalancesToTreeNode-CoqcGXTM-BAVPnmdP.js";import{d as vs}from"./mapLoadingInProgressToTreeNode-DcYetEpP-CsO00r3l.js";import{h as Cd}from"./VendorsAccountsSection-By1Bhh27--5FkvREo.js";import{u as vd,c as Ss,d as Sd,m as kd}from"./uploadAttachment-BLbU_iLy-Cn6htN7U.js";import{r as Mi}from"./core-DpPwA1EY.js";import{t as jd}from"./upload-reimbursement-receipt-O2N8vcO7-BkGK3BZ_.js";import"./liveblocks-PPyiYwu4.js";import"./recharts-B5a8DAKj.js";import"./lottie-CwowL814.js";import"./analytics-R4GG3mhr.js";import"./lexical-WuSd_Y3l.js";import"./utils-GKlM-QyI.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="7b7f63b6-cf2f-474e-b559-5ffaa79f3690",e._sentryDebugIdIdentifier="sentry-dbid-7b7f63b6-cf2f-474e-b559-5ffaa79f3690")}catch{}})();const{common:{navBar:{back:$d},texts:{refresh:Id,close:Td,copy:Ld,copied:Ad,open:Rd}},expenseAutomation:{common:{numbers:{maximumCount:Ed}}}}=me.getLocalizedStrings(),Dd=o(Ac)`
1
+ import{o as n,c2 as zl,e as Ce,bQ as Xa,bR as er,V as t,cy as Pl,bD as Fl,ab as Ye,aT as tr,u as f,O as me,ak as st,an as Re,cz as Bl,ac as D,x as Q,g as Tt,bE as _l,ip as Vl,aQ as it,c0 as xe,du as zi,eD as Nl,bx as Ul,d as he,au as Wl,eU as Qt,L as Hn,e2 as Xe,b5 as qn,dz as nr,bt as Hl,gk as ql,im as Kl,hb as Jl,h3 as ir,by as Ql,bW as ot,b9 as Kn,bM as or,kz as Gl,ao as Ze,cd as Yl,n as sr,bb as ar,as as _o,aa as gn,bT as Vo,ae as xn,kA as Zl,kB as Xl,kC as ec,kD as Bn,kE as rr,kF as lr,kG as tc,kH as us,kI as nc,gx as cr,dx as dr,kJ as ic,kK as oc,kL as sc,kM as ac,kN as rc,kO as lc,kP as cc,kQ as dc,kR as uc,kS as hc,kT as ur,kU as pc,kV as mc,kW as gc,kX as xc,gK as No,cl as Jn,cC as Pi,v as hr,A as pr,cQ as Qn,e6 as Uo,b as Wo,hK as fc,bq as yc,cs as wc,cb as bc,c8 as Gn,gN as hs,j0 as ps,aq as $t,dv as Yn,dc as Jt,dR as qe,cv as Zn,cI as Xn,cL as ei,kY as Cc,w as yt,iy as mr,fO as vc,aG as gr,kZ as Sc,aX as Ho,aS as ms,h5 as xr,k_ as kc,k$ as jc,l0 as $c,bH as fr,aV as Ic,gT as Kt,ib as Wi,eR as $i,cU as qo,aA as Tc,eS as yr,bV as Lc,g1 as Ac,hf as wr,y as Rc,l1 as Ec,a_ as Ko,j$ as Dc,k0 as Mc,e1 as br,l2 as Cr,j6 as Oc,h_ as zc,gL as Ii,jx as gs,l3 as Pc,a$ as Fc,dD as vr,a as Un,iH as Sr,iQ as Ao,l4 as In,et as kr,ev as jr,j9 as Ro,ja as $r,d9 as Ir,l5 as Bc,da as Fi,iI as Tr,fC as Lr,l6 as _c,eI as Hi,aM as Eo,l7 as Vc,cZ as Nc,iX as Uc,e4 as Wc,l8 as Hc,gQ as qc,b3 as qi,eE as Kc,fX as Jc,l9 as Qc,e0 as Gc,hP as Yc,a9 as Zc,eF as Xc,eG as ed,eH as td,eK as xs,eL as fs,eM as nd,gX as id,b1 as od,eW as sd,eX as ad,eY as rd}from"./index-aCBnCBoN.js";import{a as s,P as ld}from"./sentry-DzaNjvx0.js";import{n as o,c as le,k as Bi}from"./mui-BosmckWV.js";import{bh as cd,kP as dd,He as ys,Hf as Wn,Hg as ud,Hh as hd,cy as pd,bL as Di,cz as md,c4 as Jo,Hi as gd,FD as ws,cA as xd,cB as fd,lU as _n,bE as rn,Hj as bs,Hk as yd,bV as Ar,bo as ln,Hl as wd,Hm as Rr,Hn as Er,Ho as Dr,Hp as Mr,Hq as Or,Hr as Qo,lm as bd}from"./zeni-epic-state-BNpJ2txa.js";import{t as Go}from"./panelSelectedMixin-Cddsb26L-CWVsp72I.js";import{m as zr,n as Pr,a as Tn,t as Mt}from"./CollapsableReportTable-gy7Ue_fk-D4P0G-Lp.js";import{N as Ki}from"./AccountRow-CdgvnPG8-BbJV8Q8M.js";import{o as Fr}from"./mapTimeframeBalancesToTreeNode-Drhl_lnP-CrhrR0QG.js";import{d as Cs}from"./mapLoadingInProgressToTreeNode-DTyQHWMc-CfKVg64X.js";import{h as Cd}from"./VendorsAccountsSection-Cqcr-ArD-DAAwd5Iw.js";import{u as vd,c as vs,d as Sd,m as kd}from"./uploadAttachment-RbkIBMGO-TVHnian4.js";import{r as Mi}from"./core-Cjh03OPu.js";import{t as jd}from"./upload-reimbursement-receipt-O2N8vcO7-CMjD_kCZ.js";import"./liveblocks-CEY7tsth.js";import"./recharts-CimMNwCJ.js";import"./lottie-BmLFYENY.js";import"./analytics-B_VWX-BQ.js";import"./lexical-9REae7LV.js";import"./utils-THjX-QSp.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="18bb4dbe-19b6-463e-b6cb-77f0f301df07",e._sentryDebugIdIdentifier="sentry-dbid-18bb4dbe-19b6-463e-b6cb-77f0f301df07")}catch{}})();const{common:{navBar:{back:$d},texts:{refresh:Id,close:Td,copy:Ld,copied:Ad,open:Rd}},expenseAutomation:{common:{numbers:{maximumCount:Ed}}}}=me.getLocalizedStrings(),Dd=o(Lc)`
2
2
  display: flex;
3
3
  width: ${n.sp4};
4
4
  height: ${n.sp4};
@@ -24,31 +24,31 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
24
24
  position: sticky;
25
25
  top: 0;
26
26
  z-index: 6;
27
- `,ks=o.div`
27
+ `,Ss=o.div`
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  align-items: center;
31
- padding-left: ${e=>$s.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
- padding-right: ${e=>$s.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
33
- `,Pd=o.div`
31
+ padding-left: ${e=>js.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
+ padding-right: ${e=>js.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
33
+ `,zd=o.div`
34
34
  display: flex;
35
35
  align-items: baseline;
36
36
  justify-content: end;
37
37
  gap: ${n.sp4};
38
38
  flex: 1 1 ${n.sp0};
39
- `,zd=o.div`
39
+ `,Pd=o.div`
40
40
  display: flex;
41
41
  align-items: baseline;
42
42
  justify-content: start;
43
43
  gap: ${n.sp4};
44
44
  flex: 1 1 ${n.sp0};
45
- `,Fd=o(br)`
45
+ `,Fd=o(wr)`
46
46
  width: ${n.sp3};
47
47
  height: ${n.sp3};
48
48
  cursor: pointer;
49
49
  margin-left: ${n.sp1};
50
50
  color: inherit;
51
- `,Bd=o(Rc)`
51
+ `,Bd=o(Ac)`
52
52
  width: ${n.sp3};
53
53
  height: ${n.sp3};
54
54
  margin-left: ${n.sp1};
@@ -61,7 +61,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
61
61
  &:hover {
62
62
  color: ${e=>e.theme.colors.primary};
63
63
  }
64
- `,Vd=o(Cc)`
64
+ `,Vd=o(bc)`
65
65
  cursor: pointer;
66
66
  width: ${n.sp4};
67
67
  height: ${n.sp4};
@@ -69,7 +69,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
69
69
  &:hover {
70
70
  color: ${e=>e.theme.colors.primary};
71
71
  }
72
- `,Nd=o(bc,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
72
+ `,Nd=o(wc,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
73
73
  cursor: pointer;
74
74
  width: ${n.sp4};
75
75
  height: ${n.sp4};
@@ -87,12 +87,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
87
87
  100% {
88
88
  transform: rotate(360deg);
89
89
  }
90
- `,Hd=o.div`
91
- width: 100%;
92
90
  `,Wd=o.div`
91
+ width: 100%;
92
+ `,Hd=o.div`
93
93
  padding-top: ${n.sp0};
94
94
  padding-bottom: ${n.sp0};
95
- `,js=o(Re)`
95
+ `,ks=o(Re)`
96
96
  color: ${e=>e.theme.colors.hero};
97
97
  text-align: center;
98
98
  display: flex;
@@ -102,7 +102,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
102
102
  padding-bottom: ${n.sp4};
103
103
  `,qd=o.div`
104
104
  display: flex;
105
- `,Jd=o.div`
105
+ `,Kd=o.div`
106
106
  border: 1px solid ${e=>e.theme.colors.grey3};
107
107
  width: 100%;
108
108
  margin-top: -2px;
@@ -110,7 +110,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
110
110
  border-top-left-radius: ${n.sp2};
111
111
  border-bottom-right-radius: ${n.sp2};
112
112
  border-bottom-left-radius: ${n.sp2};
113
- `,Kd=o.div`
113
+ `,Jd=o.div`
114
114
  display: flex;
115
115
  height: ${n.sp4};
116
116
  `,Qd=o.div`
@@ -130,10 +130,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
130
130
  stroke-width: 2;
131
131
  }
132
132
  `,ui=o.span`
133
- font-weight: ${Zn.regular};
133
+ font-weight: ${Gn.regular};
134
134
  color: ${e=>e.theme.colors.primary};
135
135
  `,Zd=o.span`
136
- font-weight: ${Zn.medium};
136
+ font-weight: ${Gn.medium};
137
137
  color: ${e=>e.theme.colors.primary};
138
138
  `,Xd=o.span`
139
139
  color: ${e=>e.theme.colors.primary};
@@ -153,7 +153,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
153
153
  }
154
154
  text-decoration-color: ${e=>e.theme.colors.primary};
155
155
  }
156
- `,$s={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},eu=({onAllThreadsClick:e,companyId:i,companyName:l})=>{const r={application:"cockpit",companyId:i,entityId:i,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:h,...d}=r,a={...d},{threads:c,isLoading:u}=yc(a,!1,!1),m=c.filter(p=>p.id.includes(dr)===!1);return t.jsxs(Md,{isDisabled:u,onClick:e,"data-testid":D("comment-icon"),children:[t.jsx(wc,{count:m.length,isLoading:u}),t.jsx(Dd,{})]})},tu=({headerData:e,refreshStatus:i,searchText:l,companyName:r,companyId:h,isZeniUser:d,onAllThreadsClick:a,onClose:c,onRefresh:u,onSearchTextChanged:m})=>{const p=()=>{i!=="In-Progress"&&u()};return t.jsx(Pd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Kl,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:n.sp4},searchIconMarginRight:n.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},x+g);case"refresh":return t.jsx(xe,{display:"block",placement:"bottom",title:Id,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Nd,{onClick:p,$spinning:i==="In-Progress","data-testid":D("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(eu,{companyId:h,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(_d,{onClick:c,"data-testid":D("close-icon")})},x+g)}})})},nu=({headerData:e,onBack:i})=>t.jsx(zd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:$d,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Vd,{onClick:i,"data-testid":D("back-button")})},r+l)}})}),Is=({text:e,linkText:i,windowSize:l,isCopied:r,onLinkClick:h})=>{if(i==null||!i)return t.jsxs(ui,{windowSize:l,children:[e," "]});const d=e.indexOf(i);if(d===-1)return t.jsxs(ui,{windowSize:l,children:[e," "]});const a=e.substring(0,d),c=e.substring(d+i.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(ui,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(xe,{display:"flex",placement:"right",title:or.test(i)?r?Ad:Ld:Rd,enterTouchDelay:600,children:t.jsxs(Xd,{onClick:()=>h?.(i),"data-testid":D("pre-link"),children:[i,r?t.jsx(Bd,{className:"success-icon"}):t.jsx(Fd,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Ts=({subTitles:e})=>{const i=Ce(),[,l]=Ql(),[r,h]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{or.test(c)?(l(c),h(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{h(!1)},2e3)):window.open(c,"_blank","noopener,noreferrer")},[l]);return s.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),t.jsx(Gd,{children:e.map((c,u)=>t.jsxs(Qd,{"data-testid":D("subtitle-item",u.toString()),children:[c.pre?t.jsx(Is,{text:c.pre,linkText:c.preLink,windowSize:i,isCopied:r,onLinkClick:a}):null,c.prefixIconName?t.jsx(t.Fragment,{children:c.prefixIconName==="zeniAIIcon"?t.jsx(Yd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(Zd,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx(Is,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},u+c.bold+c.pre+c.post))})};function iu(e){const{headerData:i,currentTab:l,completionStatus:r,onUpdateTab:h,selectedReconAccountId:d,getTabCountAndFetchState:a,reconcileDetailPageFetchState:c,forceShowSubtitle:u,currentSelectedView:m,currentMissingReceiptsTab:p,onMissingReceiptsTabUpdate:g,onReconTabUpdate:x,currentRecontab:y,navBarCustomElement:C,titleStyle:S={},hideEmptyDivBelowTabs:$=!1,belowTabsSlot:v}=e,T=a("autoCategorized")?.count??0,I=a("review")?.count??0,w=a("reconcile")?.count??0,k=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",b=m==="reconciliation"&&y==="review"&&d!=null,z=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:b?c==="In-Progress"?!0:I>0:z?c==="In-Progress"?!0:w>0:r!=="complete",R=Tt(),F=Ce();let V=[];i.tabs.length>0&&(V=i.tabs.map(M=>({label:M.label,id:M.id,countDetails:a(M.id)})));const q=i.tabs.some(M=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)&&M.subTitle.length>0);return t.jsxs(Od,{children:[t.jsx(Vl,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:R.colors.grey4,onBackClick:()=>null,titleStyle:S,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(nu,{...e}),rightSideComponent:t.jsx(tu,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Ge,{controller:k===!0,children:t.jsx(ks,{windowSize:F,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Wd,{windowSize:F,children:t.jsx(Nl,{allTabs:V,selectedTab:m==="transaction_categorization"?l??V[0].id:m==="missing_receipts"?p??V[0].id:y??V[0].id,onTabChange:M=>{if(m==="transaction_categorization"){const O=ud(M.id);O!=null&&h(O)}else if(m==="reconciliation"){const O=hd(M.id);O!=null&&x(O)}else m==="missing_receipts"&&g?.(M.id)},maximumCountLimit:Ed})}),t.jsx(Jd,{windowSize:F}),$!==!0?t.jsx(Kd,{}):null,t.jsx(Ge,{controller:(A===!0||u===!0)&&q,children:t.jsx(js,{windowSize:F,"data-testid":D("subtitle-container"),children:i.tabs.map((M,O)=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)?t.jsx(qd,{"data-testid":D("subtitle-wrapper",M.id),children:t.jsx(Ts,{subTitles:M.subTitle})},O+M.id):null)})})]}):t.jsx(Ge,{controller:A===!0||u===!0,children:t.jsx(js,{windowSize:F,children:t.jsx(Ts,{subTitles:i.subTitle})})})})}),v!=null?t.jsx(ks,{windowSize:F,children:t.jsx(Hd,{children:v})}):null]})}const ou=1;function su({name:e,checkBoxes:i,mode:l,isDisabled:r,style:h,labelStyle:d,labelCheckBoxStyle:a,checkBoxStyle:c,width:u,registerOptions:m,checkedIconColor:p,checkBoxIconStyle:g,checkBoxContainerStyle:x,draggable:y=!1,selectionLimit:C,infoIconContainerStyle:S,onDragStart:$,rowHeight:v=40,initialScrollOffSet:T,onScroll:I}){const w=Ce(),k=s.useRef(null),{control:j}=Jo(),b=i.find(F=>F.groupLabel),z=i.filter(F=>!F.groupLabel),A=[];for(const F of z)if(F.isException||A.push(F.value),C!=null&&A.length===C+1)break;const R=i.filter(F=>F.defaultChecked).map(F=>F.value);return t.jsx(wr,{control:j,name:e,rules:m,defaultValue:R,render:({field:{value:F,ref:V,onChange:q}})=>{const M=O=>{ru({event:O,value:F,allCheckBoxValues:A,groupLabelCheckBox:b,onChange:q})};return t.jsxs(lu,{style:h,windowSize:w,children:[b&&t.jsx(Zo,{checkBox:b,index:0,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChangeHandler:M}),t.jsx(cu,{children:t.jsx(Kn,{style:{height:"100%",width:"100%"},children:({height:O,width:ae})=>t.jsx(zi,{ref:k,height:O,width:ae,itemCount:z.length,itemSize:()=>v,estimatedItemSize:v,initialScrollOffset:T??0,onScroll:({scrollOffset:B})=>{I?.(B)},overscanCount:ou,itemKey:B=>z[B].value,itemData:{checkBoxes:z,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChange:q,handleChangeEvent:M,rowHeight:v},children:au})})})]})}})}const au=({index:e,style:i,data:l})=>{const r=s.useRef(null),{checkBoxes:h,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,handleChangeEvent:b}=l,z=h[e];return t.jsx(gu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Zo,{checkBox:z,index:e,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,onChangeHandler:b})})},Zo=s.forwardRef((e,i)=>{const{value:l,checkBox:r,groupLabelCheckBox:h,allCheckBoxValues:d,selectionLimit:a,mode:c,checkBoxStyle:u,labelCheckBoxStyle:m,isDisabled:p,draggable:g,checkBoxContainerStyle:x,infoIconContainerStyle:y,name:C,index:S,width:$,checkedIconColor:v,checkBoxIconStyle:T,labelStyle:I,onDragStart:w,onChangeHandler:k}=e,j=Ce(),b=F=>{typeof i=="function"?i(F):i&&(i.current=F)};let z=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));h?.value===r.value&&l.length>0&&(a!=null?z=A.length===d.length||A.length===a+1:z=d.every(F=>A.includes(F)===!0));const R=()=>c==="off"||r.isException?j==="small"?{display:"none",...u}:{visibility:"hidden",...u}:r.groupLabel?d.length===1&&d[0]===h?.value?{visibility:"hidden",...m}:m:u;return t.jsxs(uu,{mode:c,draggable:g===!0,onDragStart:F=>{w?.(F,r.value)},style:x,isDisabled:p,isSelected:z,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(du,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(hu,{style:y,className:"checkbox-alert",children:t.jsx(xe,{style:{padding:`12px ${n.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(pu,{}):t.jsx(mu,{})})}):t.jsx(Nc,{name:`${C}.${r.value}`,checkBoxValue:r.value,value:z,checkedIconColor:v,isDisabled:p||!r.groupLabel&&!z&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:R(),checkBoxIconStyle:T,ref:b,onChange:k}),typeof r.label=="string"&&r.label?t.jsx(Uc,{isDisabled:p,label:r.label,labelStyle:I,htmlFor:`${C}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:$,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${S}`)});Zo.displayName="CheckBoxWithLabel";const ru=({event:e,value:i,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:h})=>{const d=e.currentTarget.value,a=e.currentTarget.checked,c=r?.value,u=new Set(i);if(d===c){h(a?Array.from(new Set([c,...l])):[]);return}a?u.add(d):u.delete(d);const m=l.every(p=>u.has(p));c!=null&&(m&&!u.has(c)?u.add(c):!m&&u.has(c)&&u.delete(c)),h(Array.from(u))},lu=o.div`
156
+ `,js={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},eu=({onAllThreadsClick:e,companyId:i,companyName:l})=>{const r={application:"cockpit",companyId:i,entityId:i,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:h,...d}=r,a={...d},{threads:c,isLoading:u}=fc(a,!1,!1),m=c.filter(p=>p.id.includes(cr)===!1);return t.jsxs(Md,{isDisabled:u,onClick:e,"data-testid":D("comment-icon"),children:[t.jsx(yc,{count:m.length,isLoading:u}),t.jsx(Dd,{})]})},tu=({headerData:e,refreshStatus:i,searchText:l,companyName:r,companyId:h,isZeniUser:d,onAllThreadsClick:a,onClose:c,onRefresh:u,onSearchTextChanged:m})=>{const p=()=>{i!=="In-Progress"&&u()};return t.jsx(zd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Kl,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:n.sp4},searchIconMarginRight:n.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},x+g);case"refresh":return t.jsx(xe,{display:"block",placement:"bottom",title:Id,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Nd,{onClick:p,$spinning:i==="In-Progress","data-testid":D("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(eu,{companyId:h,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(_d,{onClick:c,"data-testid":D("close-icon")})},x+g)}})})},nu=({headerData:e,onBack:i})=>t.jsx(Pd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:$d,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Vd,{onClick:i,"data-testid":D("back-button")})},r+l)}})}),$s=({text:e,linkText:i,windowSize:l,isCopied:r,onLinkClick:h})=>{if(i==null||!i)return t.jsxs(ui,{windowSize:l,children:[e," "]});const d=e.indexOf(i);if(d===-1)return t.jsxs(ui,{windowSize:l,children:[e," "]});const a=e.substring(0,d),c=e.substring(d+i.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(ui,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(xe,{display:"flex",placement:"right",title:ir.test(i)?r?Ad:Ld:Rd,enterTouchDelay:600,children:t.jsxs(Xd,{onClick:()=>h?.(i),"data-testid":D("pre-link"),children:[i,r?t.jsx(Bd,{className:"success-icon"}):t.jsx(Fd,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Is=({subTitles:e})=>{const i=Ce(),[,l]=Jl(),[r,h]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{ir.test(c)?(l(c),h(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{h(!1)},2e3)):window.open(c,"_blank","noopener,noreferrer")},[l]);return s.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),t.jsx(Gd,{children:e.map((c,u)=>t.jsxs(Qd,{"data-testid":D("subtitle-item",u.toString()),children:[c.pre?t.jsx($s,{text:c.pre,linkText:c.preLink,windowSize:i,isCopied:r,onLinkClick:a}):null,c.prefixIconName?t.jsx(t.Fragment,{children:c.prefixIconName==="zeniAIIcon"?t.jsx(Yd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(Zd,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx($s,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},u+c.bold+c.pre+c.post))})};function iu(e){const{headerData:i,currentTab:l,completionStatus:r,onUpdateTab:h,selectedReconAccountId:d,getTabCountAndFetchState:a,reconcileDetailPageFetchState:c,forceShowSubtitle:u,currentSelectedView:m,currentMissingReceiptsTab:p,onMissingReceiptsTabUpdate:g,onReconTabUpdate:x,currentRecontab:y,navBarCustomElement:C,titleStyle:S={},hideEmptyDivBelowTabs:$=!1,belowTabsSlot:v}=e,T=a("autoCategorized")?.count??0,I=a("review")?.count??0,w=a("reconcile")?.count??0,k=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",b=m==="reconciliation"&&y==="review"&&d!=null,P=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:b?c==="In-Progress"?!0:I>0:P?c==="In-Progress"?!0:w>0:r!=="complete",R=Tt(),F=Ce();let V=[];i.tabs.length>0&&(V=i.tabs.map(M=>({label:M.label,id:M.id,countDetails:a(M.id)})));const q=i.tabs.some(M=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)&&M.subTitle.length>0);return t.jsxs(Od,{children:[t.jsx(_l,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:R.colors.grey4,onBackClick:()=>null,titleStyle:S,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(nu,{...e}),rightSideComponent:t.jsx(tu,{...e}),source:"NavBarWithHeader"}),C??null,t.jsx(Ye,{controller:k===!0,children:t.jsx(Ss,{windowSize:F,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Hd,{windowSize:F,children:t.jsx(Vl,{allTabs:V,selectedTab:m==="transaction_categorization"?l??V[0].id:m==="missing_receipts"?p??V[0].id:y??V[0].id,onTabChange:M=>{if(m==="transaction_categorization"){const O=ud(M.id);O!=null&&h(O)}else if(m==="reconciliation"){const O=hd(M.id);O!=null&&x(O)}else m==="missing_receipts"&&g?.(M.id)},maximumCountLimit:Ed})}),t.jsx(Kd,{windowSize:F}),$!==!0?t.jsx(Jd,{}):null,t.jsx(Ye,{controller:(A===!0||u===!0)&&q,children:t.jsx(ks,{windowSize:F,"data-testid":D("subtitle-container"),children:i.tabs.map((M,O)=>(m==="reconciliation"?M.id===y:m==="missing_receipts"?M.id===p:M.id===l)?t.jsx(qd,{"data-testid":D("subtitle-wrapper",M.id),children:t.jsx(Is,{subTitles:M.subTitle})},O+M.id):null)})})]}):t.jsx(Ye,{controller:A===!0||u===!0,children:t.jsx(ks,{windowSize:F,children:t.jsx(Is,{subTitles:i.subTitle})})})})}),v!=null?t.jsx(Ss,{windowSize:F,children:t.jsx(Wd,{children:v})}):null]})}const ou=1;function su({name:e,checkBoxes:i,mode:l,isDisabled:r,style:h,labelStyle:d,labelCheckBoxStyle:a,checkBoxStyle:c,width:u,registerOptions:m,checkedIconColor:p,checkBoxIconStyle:g,checkBoxContainerStyle:x,draggable:y=!1,selectionLimit:C,infoIconContainerStyle:S,onDragStart:$,rowHeight:v=40,initialScrollOffSet:T,onScroll:I}){const w=Ce(),k=s.useRef(null),{control:j}=qo(),b=i.find(F=>F.groupLabel),P=i.filter(F=>!F.groupLabel),A=[];for(const F of P)if(F.isException||A.push(F.value),C!=null&&A.length===C+1)break;const R=i.filter(F=>F.defaultChecked).map(F=>F.value);return t.jsx(yr,{control:j,name:e,rules:m,defaultValue:R,render:({field:{value:F,ref:V,onChange:q}})=>{const M=O=>{ru({event:O,value:F,allCheckBoxValues:A,groupLabelCheckBox:b,onChange:q})};return t.jsxs(lu,{style:h,windowSize:w,children:[b&&t.jsx(Yo,{checkBox:b,index:0,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChangeHandler:M}),t.jsx(cu,{children:t.jsx(qn,{style:{height:"100%",width:"100%"},children:({height:O,width:re})=>t.jsx(Pi,{ref:k,height:O,width:re,itemCount:P.length,itemSize:()=>v,estimatedItemSize:v,initialScrollOffset:T??0,onScroll:({scrollOffset:B})=>{I?.(B)},overscanCount:ou,itemKey:B=>P[B].value,itemData:{checkBoxes:P,value:F,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:u,draggable:y,groupLabelCheckBox:b,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:C,onDragStart:$,ref:V,onChange:q,handleChangeEvent:M,rowHeight:v},children:au})})})]})}})}const au=({index:e,style:i,data:l})=>{const r=s.useRef(null),{checkBoxes:h,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,handleChangeEvent:b}=l,P=h[e];return t.jsx(gu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Yo,{checkBox:P,index:e,value:d,allCheckBoxValues:a,mode:c,name:u,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:C,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,onChangeHandler:b})})},Yo=s.forwardRef((e,i)=>{const{value:l,checkBox:r,groupLabelCheckBox:h,allCheckBoxValues:d,selectionLimit:a,mode:c,checkBoxStyle:u,labelCheckBoxStyle:m,isDisabled:p,draggable:g,checkBoxContainerStyle:x,infoIconContainerStyle:y,name:C,index:S,width:$,checkedIconColor:v,checkBoxIconStyle:T,labelStyle:I,onDragStart:w,onChangeHandler:k}=e,j=Ce(),b=F=>{typeof i=="function"?i(F):i&&(i.current=F)};let P=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));h?.value===r.value&&l.length>0&&(a!=null?P=A.length===d.length||A.length===a+1:P=d.every(F=>A.includes(F)===!0));const R=()=>c==="off"||r.isException?j==="small"?{display:"none",...u}:{visibility:"hidden",...u}:r.groupLabel?d.length===1&&d[0]===h?.value?{visibility:"hidden",...m}:m:u;return t.jsxs(uu,{mode:c,draggable:g===!0,onDragStart:F=>{w?.(F,r.value)},style:x,isDisabled:p,isSelected:P,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(du,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(hu,{style:y,className:"checkbox-alert",children:t.jsx(xe,{style:{padding:`12px ${n.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(pu,{}):t.jsx(mu,{})})}):t.jsx(Vc,{name:`${C}.${r.value}`,checkBoxValue:r.value,value:P,checkedIconColor:v,isDisabled:p||!r.groupLabel&&!P&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:R(),checkBoxIconStyle:T,ref:b,onChange:k}),typeof r.label=="string"&&r.label?t.jsx(Nc,{isDisabled:p,label:r.label,labelStyle:I,htmlFor:`${C}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:$,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${S}`)});Yo.displayName="CheckBoxWithLabel";const ru=({event:e,value:i,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:h})=>{const d=e.currentTarget.value,a=e.currentTarget.checked,c=r?.value,u=new Set(i);if(d===c){h(a?Array.from(new Set([c,...l])):[]);return}a?u.add(d):u.delete(d);const m=l.every(p=>u.has(p));c!=null&&(m&&!u.has(c)?u.add(c):!m&&u.has(c)&&u.delete(c)),h(Array.from(u))},lu=o.div`
157
157
  display: flex;
158
158
  flex-direction: column;
159
159
  width: 100%;
@@ -226,13 +226,13 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
226
226
  `}
227
227
  `,hu=o.div`
228
228
  cursor: pointer;
229
- `,pu=o(sr)`
229
+ `,pu=o(or)`
230
230
  height: ${n.sp3};
231
231
  width: ${n.sp3};
232
232
  color: ${e=>e.theme.colors.hero};
233
233
  background-color: ${e=>e.theme.colors.grey4};
234
234
  border-radius: 50%;
235
- `,mu=o(Ar)`
235
+ `,mu=o(Lr)`
236
236
  height: ${n.sp3};
237
237
  width: ${n.sp3};
238
238
  color: ${e=>e.theme.colors.hero};
@@ -266,12 +266,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
266
266
  align-items: center;
267
267
  justify-content: center;
268
268
  flex-direction: column;
269
- `,$u=o(Vo)`
269
+ `,$u=o(_o)`
270
270
  margin-top: ${n.sp2};
271
271
  color: ${e=>e.theme.colors.brandColorJade};
272
- `,Iu=o(ar)`
272
+ `,Iu=o(sr)`
273
273
  color: ${e=>e.theme.colors.primary};
274
- `,Tu=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(Cu,{});case"je_schedules":case"reconciliation":return t.jsx(ku,{});case"flux_analysis":return t.jsx(Su,{});case"missing_receipts":default:return t.jsx(vu,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(bu,{children:t.jsxs(ju,{children:[t.jsx(Tu,{...e}),t.jsx($u,{children:i}),t.jsx(Iu,{children:l})]})})}const{common:{headers:{transactions:Lu,jeSchedules:Au,fluxAnalysis:Ru,missingReceipts:Eu,insights:Du,reconciliation:Ls},strings:{empty:sn}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Mu,unmatched:Ou,completed:Pu}}},expenseAutomation:{transactions:{tabs:As,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:zu}},searchPlaceholder:Fu,allDoneText:Bu},jeSchedules:{subTitles:{item1:_u,item2:Vu},searchPlaceholder:Nu,allDoneText:Uu},missingReceipts:{subTitles:Hu,searchPlaceholder:Wu,allDoneText:Qi},fluxAnalysis:{subTitles:{item1:qu,item2:Ju},searchPlaceholder:Ku,emptyPageTexts:{youDidIt:Qu,allReviewed:Gu}},accountRecon:{review:{allDoneText:Rs},reconcile:{allDoneText:Yu},tabs:Es,titles:{item1:Zu,item2:Xu},subTitles:{review:{item1:eh,item2:gi},reconcile:{item1:xi,item2:th}}}}}=me.getLocalizedStrings(),We=(e,i,l,r,h,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Lu,subTitle:[],tabs:[{label:As.review,id:"review",subTitle:[{pre:hi.pre,bold:hi.bold,prefixIconName:hi.prefixIconName,post:hi.post},{pre:pi.pre,bold:pi.bold,prefixIconName:pi.prefixIconName,post:pi.post}]},{label:As.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},zu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Fu,allDoneText:Bu};case"je_schedules":return{key:"je_schedules",title:Au,subTitle:[_u,Vu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Nu,allDoneText:Uu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Eu,subTitle:[Hu],tabs:a?[{label:Mu,id:"missing",subTitle:[],allDoneText:Qi},{label:Ou,id:"unmatched",subTitle:[]},{label:Pu,id:"completed",subTitle:[],allDoneText:Qi}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Wu,allDoneText:Qi}}case"flux_analysis":return{key:"flux_analysis",title:Ru,subTitle:[qu,Ju],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ku,allDoneText:{title:Qu,subTitle:Gu}};case"month_end_insights":return{key:"month_end_insights",title:Du,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}};case"reconciliation":return l==null?{key:"reconciliation",title:Ls,subTitle:[Zu,Xu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}}:{key:"reconciliation",title:r??Ls,subText:h??void 0,subTitle:[],tabs:[{label:Es.review,id:"review",subTitle:[eh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:Rs},{label:Es.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},th],allDoneText:Yu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:sn,allDoneText:Rs}}},{common:{strings:{empty:nh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),ih={key:"date",value:Gt.date,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},oh={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},sh={key:"type",value:Gt.type,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ah={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},rh={key:"account",value:Gt.account,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"recommended",value:nh,sortOrder:"ascending",width:new Q(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[ih,oh,sh,ah,rh,lh,ch,dh,uh],hh=50,_n={sortKey:"date",sortOrder:"descending"};function ph({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=Ce(),[r,h]=s.useState(Do(Ne));s.useEffect(()=>{const c=[...r];for(const u of c)u.key===e.sortKey?u.sortOrder=e.sortOrder:u.sortOrder="ascending";h(c)},[e.sortKey,e.sortOrder]);const d=(c,u)=>{let m=u;e.sortKey===c&&(m=u==="ascending"?"descending":"ascending"),i(c,m)},a=c=>{d(c.key,c.sortOrder)};return t.jsx(fh,{headerHeight:hh,children:r.map(c=>t.jsx(gh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(vh,{isVisible:c.key!=="recommended",children:[t.jsx(xh,{"data-testid":D("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ye,{children:c.value})}),t.jsx(yh,{sortConfig:e,headerData:c,children:t.jsx(wh,{})}),t.jsx(bh,{isVisible:e.sortKey===c.key&&(e.sortKey!==_n.sortKey||e.sortOrder!==_n.sortOrder),children:t.jsx(Ch,{"data-testid":D("reconcile-tab-list-reset-sort",_n.sortKey),onClick:()=>i(_n.sortKey,_n.sortOrder)})})]})},c.key))})}const mh=cd.memo(ph),gh=o.div`
274
+ `,Tu=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(Cu,{});case"je_schedules":case"reconciliation":return t.jsx(ku,{});case"flux_analysis":return t.jsx(Su,{});case"missing_receipts":default:return t.jsx(vu,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(bu,{children:t.jsxs(ju,{children:[t.jsx(Tu,{...e}),t.jsx($u,{children:i}),t.jsx(Iu,{children:l})]})})}const{common:{headers:{transactions:Lu,jeSchedules:Au,fluxAnalysis:Ru,missingReceipts:Eu,insights:Du,reconciliation:Ts},strings:{empty:on}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Mu,unmatched:Ou,completed:zu}}},expenseAutomation:{transactions:{tabs:Ls,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:Pu}},searchPlaceholder:Fu,allDoneText:Bu},jeSchedules:{subTitles:{item1:_u,item2:Vu},searchPlaceholder:Nu,allDoneText:Uu},missingReceipts:{subTitles:Wu,searchPlaceholder:Hu,allDoneText:Ji},fluxAnalysis:{subTitles:{item1:qu,item2:Ku},searchPlaceholder:Ju,emptyPageTexts:{youDidIt:Qu,allReviewed:Gu}},accountRecon:{review:{allDoneText:As},reconcile:{allDoneText:Yu},tabs:Rs,titles:{item1:Zu,item2:Xu},subTitles:{review:{item1:eh,item2:gi},reconcile:{item1:xi,item2:th}}}}}=me.getLocalizedStrings(),He=(e,i,l,r,h,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Lu,subTitle:[],tabs:[{label:Ls.review,id:"review",subTitle:[{pre:hi.pre,bold:hi.bold,prefixIconName:hi.prefixIconName,post:hi.post},{pre:pi.pre,bold:pi.bold,prefixIconName:pi.prefixIconName,post:pi.post}]},{label:Ls.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},Pu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Fu,allDoneText:Bu};case"je_schedules":return{key:"je_schedules",title:Au,subTitle:[_u,Vu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Nu,allDoneText:Uu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Eu,subTitle:[Wu],tabs:a?[{label:Mu,id:"missing",subTitle:[],allDoneText:Ji},{label:Ou,id:"unmatched",subTitle:[]},{label:zu,id:"completed",subTitle:[],allDoneText:Ji}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Hu,allDoneText:Ji}}case"flux_analysis":return{key:"flux_analysis",title:Ru,subTitle:[qu,Ku],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ju,allDoneText:{title:Qu,subTitle:Gu}};case"month_end_insights":return{key:"month_end_insights",title:Du,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:on,allDoneText:{title:on,subTitle:on}};case"reconciliation":return l==null?{key:"reconciliation",title:Ts,subTitle:[Zu,Xu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:on,allDoneText:{title:on,subTitle:on}}:{key:"reconciliation",title:r??Ts,subText:h??void 0,subTitle:[],tabs:[{label:Rs.review,id:"review",subTitle:[eh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:As},{label:Rs.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},th],allDoneText:Yu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:on,allDoneText:As}}},{common:{strings:{empty:nh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),ih={key:"date",value:Gt.date,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},oh={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},sh={key:"type",value:Gt.type,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ah={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},rh={key:"account",value:Gt.account,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"recommended",value:nh,sortOrder:"ascending",width:new Q(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[ih,oh,sh,ah,rh,lh,ch,dh,uh],hh=50,Fn={sortKey:"date",sortOrder:"descending"};function ph({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=Ce(),[r,h]=s.useState(Eo(Ne));s.useEffect(()=>{const c=[...r];for(const u of c)u.key===e.sortKey?u.sortOrder=e.sortOrder:u.sortOrder="ascending";h(c)},[e.sortKey,e.sortOrder]);const d=(c,u)=>{let m=u;e.sortKey===c&&(m=u==="ascending"?"descending":"ascending"),i(c,m)},a=c=>{d(c.key,c.sortOrder)};return t.jsx(fh,{headerHeight:hh,children:r.map(c=>t.jsx(gh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(vh,{isVisible:c.key!=="recommended",children:[t.jsx(xh,{"data-testid":D("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ze,{children:c.value})}),t.jsx(yh,{sortConfig:e,headerData:c,children:t.jsx(wh,{})}),t.jsx(bh,{isVisible:e.sortKey===c.key&&(e.sortKey!==Fn.sortKey||e.sortOrder!==Fn.sortOrder),children:t.jsx(Ch,{"data-testid":D("reconcile-tab-list-reset-sort",Fn.sortKey),onClick:()=>i(Fn.sortKey,Fn.sortOrder)})})]})},c.key))})}const mh=ld.memo(ph),gh=o.div`
275
275
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
276
276
  :hover {
277
277
  color: ${e=>e.theme.colors.primary};
@@ -288,7 +288,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
288
288
  display: flex;
289
289
  gap: 5px;
290
290
  cursor: pointer;
291
- `,fh=o(ot)`
291
+ `,fh=o(st)`
292
292
  width: fit-content;
293
293
  height: ${e=>`${e.headerHeight}px`};
294
294
  width: calc(100% - 20px);
@@ -305,7 +305,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
305
305
  align-items: center;
306
306
  transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
307
307
  ${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
308
- `,wh=o(ti)`
308
+ `,wh=o(Xn)`
309
309
  width: ${n.sp2};
310
310
  height: ${n.sp2};
311
311
  `,bh=o.div`
@@ -317,12 +317,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
317
317
  &:hover {
318
318
  color: ${e=>e.theme.colors.primary};
319
319
  }
320
- `,Ch=o(ni)`
320
+ `,Ch=o(ei)`
321
321
  width: 12px;
322
322
  height: 12px;
323
323
  `,vh=o.div`
324
324
  display: ${e=>e.isVisible?"flex":"none"};
325
- `,Sh=54,kh=72,{common:{strings:{hyphen:Gi}}}=me.getLocalizedStrings(),{dateFormat:Ds}=me.getLocalizedStrings();function jh({selectedTransactionIds:e,transaction:i,transactionId:l}){const r=Ce(),h=Tt(),[d,a]=s.useState(!1),c=e.includes(l),u=d||c;return t.jsx($h,{id:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:t.jsxs(Ih,{isSelected:u,totalHeight:Sh,children:[t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[0].width,style:Ne[0].customStyle,children:t.jsx(an,{isSelected:u,children:i.date.format(Ds.visual.MMMDCommaYYYYformat)})}),Ne[1].customStyle.display!=="none"?t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[1].width,style:Ne[1].customStyle,children:t.jsx(an,{isSelected:u,children:i.clearedDate!=null?i.clearedDate.format(Ds.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Gi})})}):null,t.jsx(Pt,{windowSize:r,style:Ne[2].customStyle,responsiveWidth:Ne[2].width,children:t.jsx(Ah,{isSelected:u,children:t.jsx(Th,{isSelected:u,children:_c(i.type)})})}),t.jsx(Pt,{windowSize:r,style:Ne[3].customStyle,responsiveWidth:Ne[3].width,children:i.merchantName!=null&&i.merchantName.length>0?t.jsx(qe,{text:i.merchantName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(an,{isSelected:u,children:t.jsx("span",{children:Gi})})}),t.jsx(Pt,{windowSize:r,style:Ne[4].customStyle,responsiveWidth:Ne[4].width,children:i.accountName!=null&&i.accountName.length>0?t.jsx(qe,{text:i.accountName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(an,{isSelected:u,children:t.jsx("span",{children:Gi})})}),t.jsx(Pt,{windowSize:r,style:Ne[5].customStyle,responsiveWidth:Ne[5].width,children:t.jsx(an,{isSelected:u,style:{textTransform:"capitalize"},children:i.transactionDirection})}),t.jsx(Pt,{windowSize:r,style:Ne[6].customStyle,responsiveWidth:Ne[6].width,children:t.jsx(qe,{text:i.memo,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}})}),t.jsx(Pt,{windowSize:r,style:Ne[7].customStyle,responsiveWidth:Ne[7].width,children:t.jsx(an,{isSelected:u,children:nt("0,0.[00]",i.amount)})}),t.jsx(Pt,{windowSize:r,responsiveWidth:Ne[8].width,style:Ne[8].customStyle,children:t.jsx(an,{isSelected:u,children:i.isZeniRecommended?t.jsx(Lh,{}):null})})]})})}const $h=o.div`
325
+ `,Sh=54,kh=72,{common:{strings:{hyphen:Qi}}}=me.getLocalizedStrings(),{dateFormat:Es}=me.getLocalizedStrings();function jh({selectedTransactionIds:e,transaction:i,transactionId:l}){const r=Ce(),h=Tt(),[d,a]=s.useState(!1),c=e.includes(l),u=d||c;return t.jsx($h,{id:l,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:t.jsxs(Ih,{isSelected:u,totalHeight:Sh,children:[t.jsx(zt,{windowSize:r,responsiveWidth:Ne[0].width,style:Ne[0].customStyle,children:t.jsx(sn,{isSelected:u,children:i.date.format(Es.visual.MMMDCommaYYYYformat)})}),Ne[1].customStyle.display!=="none"?t.jsx(zt,{windowSize:r,responsiveWidth:Ne[1].width,style:Ne[1].customStyle,children:t.jsx(sn,{isSelected:u,children:i.clearedDate!=null?i.clearedDate.format(Es.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Qi})})}):null,t.jsx(zt,{windowSize:r,style:Ne[2].customStyle,responsiveWidth:Ne[2].width,children:t.jsx(Ah,{isSelected:u,children:t.jsx(Th,{isSelected:u,children:Bc(i.type)})})}),t.jsx(zt,{windowSize:r,style:Ne[3].customStyle,responsiveWidth:Ne[3].width,children:i.merchantName!=null&&i.merchantName.length>0?t.jsx(qe,{text:i.merchantName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(sn,{isSelected:u,children:t.jsx("span",{children:Qi})})}),t.jsx(zt,{windowSize:r,style:Ne[4].customStyle,responsiveWidth:Ne[4].width,children:i.accountName!=null&&i.accountName.length>0?t.jsx(qe,{text:i.accountName,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}}):t.jsx(sn,{isSelected:u,children:t.jsx("span",{children:Qi})})}),t.jsx(zt,{windowSize:r,style:Ne[5].customStyle,responsiveWidth:Ne[5].width,children:t.jsx(sn,{isSelected:u,style:{textTransform:"capitalize"},children:i.transactionDirection})}),t.jsx(zt,{windowSize:r,style:Ne[6].customStyle,responsiveWidth:Ne[6].width,children:t.jsx(qe,{text:i.memo,itemTextStyle:{color:u?h.colors.primary:h.colors.hero}})}),t.jsx(zt,{windowSize:r,style:Ne[7].customStyle,responsiveWidth:Ne[7].width,children:t.jsx(sn,{isSelected:u,children:it("0,0.[00]",i.amount)})}),t.jsx(zt,{windowSize:r,responsiveWidth:Ne[8].width,style:Ne[8].customStyle,children:t.jsx(sn,{isSelected:u,children:i.isZeniRecommended?t.jsx(Lh,{}):null})})]})})}const $h=o.div`
326
326
  box-sizing: border-box;
327
327
  width: 100%;
328
328
  display: flex;
@@ -341,7 +341,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
341
341
  :hover {
342
342
  border: ${e=>`1px solid ${e.theme.colors.primary}`};
343
343
  }
344
- `,Pt=o.div`
344
+ `,zt=o.div`
345
345
  width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
346
346
  display: flex;
347
347
  align-items: center;
@@ -349,12 +349,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
349
349
  height: 100%;
350
350
  z-index: auto;
351
351
  position: relative;
352
- `,an=o(Re)`
352
+ `,sn=o(Re)`
353
353
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
354
354
  span {
355
355
  padding-left: ${n.sp3};
356
356
  }
357
- `,Th=o(Ye)`
357
+ `,Th=o(Ze)`
358
358
  text-transform: capitalize;
359
359
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
360
360
  `,Lh=o(Qt)`
@@ -368,14 +368,14 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
368
368
  padding: 1px 6px;
369
369
  border-radius: ${n.sp1};
370
370
  border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
371
- `,Rh=me.getLocalizedStrings(),{common:{all:Ms,strings:{empty:Os}}}=Rh,Ps="selectedTransactionIds",Eh="expenseAutomationBankReconReconcilePage",Dh=e=>`${e}_form`;function Mh({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u}){const m=xn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(mh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ms.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(S=>({label:t.jsx(jh,{transaction:S,selectedTransactionIds:i.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async S=>{const $=S[Ps].filter(v=>v!=Ms.toLocaleLowerCase());c($)};s.useEffect(()=>{const S=m.watch($=>{$!=null&&Yn(()=>y($))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&u("expenseAutomationBankReconReconcilePage"),()=>{u("expenseAutomationPage")}),[]);const C=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(l.length===0){const S=We("reconciliation",void 0,d).tabs.find($=>$.id==="reconcile")?.allDoneText;return t.jsx(Fh,{children:t.jsx(It,{tab:"missing_receipts",title:S?.title??Os,subTitle:S?.subTitle??Os})})}return t.jsx(Oh,{children:t.jsx(fn,{...m,children:t.jsx(Ph,{onSubmit:m.handleSubmit(C),id:Dh(Eh),children:t.jsx(zh,{children:t.jsx(su,{name:Ps,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:kh,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Oh=o.div``,Ph=o.form``,zh=o.div`
371
+ `,Rh=me.getLocalizedStrings(),{common:{all:Ds,strings:{empty:Ms}}}=Rh,Os="selectedTransactionIds",Eh="expenseAutomationBankReconReconcilePage",Dh=e=>`${e}_form`;function Mh({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:h,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u}){const m=gn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(mh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ds.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(S=>({label:t.jsx(jh,{transaction:S,selectedTransactionIds:i.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async S=>{const $=S[Os].filter(v=>v!=Ds.toLocaleLowerCase());c($)};s.useEffect(()=>{const S=m.watch($=>{$!=null&&Qn(()=>y($))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&u("expenseAutomationBankReconReconcilePage"),()=>{u("expenseAutomationPage")}),[]);const C=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(l.length===0){const S=He("reconciliation",void 0,d).tabs.find($=>$.id==="reconcile")?.allDoneText;return t.jsx(Fh,{children:t.jsx(It,{tab:"missing_receipts",title:S?.title??Ms,subTitle:S?.subTitle??Ms})})}return t.jsx(Oh,{children:t.jsx(xn,{...m,children:t.jsx(zh,{onSubmit:m.handleSubmit(C),id:Dh(Eh),children:t.jsx(Ph,{children:t.jsx(su,{name:Os,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:kh,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Oh=o.div``,zh=o.form``,Ph=o.div`
372
372
  height: calc(100vh - 350px);
373
373
  `,Fh=o.div`
374
374
  height: 100%;
375
375
  display: flex;
376
376
  justify-content: center;
377
377
  align-items: center;
378
- `,Mo=69,be={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},_r=o.div`
378
+ `,Do=69,be={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},Br=o.div`
379
379
  display: flex;
380
380
  flex-direction: column;
381
381
  background-color: ${e=>e.theme.colors.grey4};
@@ -384,25 +384,25 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
384
384
  height: calc(100vh - 500px);
385
385
  overflow-x: scroll;
386
386
  align-items: center;
387
- `,Vr=o.div`
387
+ `,_r=o.div`
388
388
  display: flex;
389
389
  flex-direction: column;
390
390
  gap: ${n.sp5};
391
391
  align-items: flex-start;
392
392
  padding-bottom: ${n.sp9};
393
393
  width: 100%;
394
- `,Nr=o.div`
394
+ `,Vr=o.div`
395
395
  width: 100%;
396
- `,Ur=o.div`
396
+ `,Nr=o.div`
397
397
  width: 100%;
398
- `,Xo=o.div`
398
+ `,Zo=o.div`
399
399
  display: flex;
400
400
  flex-direction: row;
401
401
  padding: ${n.sp2};
402
402
  padding-right: ${n.sp3};
403
403
  justify-content: space-between;
404
404
  border-bottom: ${e=>`1px solid ${e.theme.colors.grey3}`};
405
- `,es=o.div`
405
+ `,Xo=o.div`
406
406
  display: flex;
407
407
  flex-direction: row;
408
408
  justify-content: space-between;
@@ -417,7 +417,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
417
417
  padding-right: ${n.sp3};
418
418
  `,_h=o.div`
419
419
  padding: ${n.sp2} ${n.sp3};
420
- `,ts=o.div`
420
+ `,es=o.div`
421
421
  display: flex;
422
422
  `,Vh=o.div`
423
423
  display: flex;
@@ -428,7 +428,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
428
428
  background-color: ${e=>e.theme.colors.grey3};
429
429
  border-bottom-left-radius: ${n.sp2};
430
430
  border-bottom-right-radius: ${n.sp2};
431
- `,ns=o.div`
431
+ `,ts=o.div`
432
432
  display: flex;
433
433
  flex-direction: column;
434
434
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
@@ -446,7 +446,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
446
446
  :hover .highlight {
447
447
  color: ${e=>e.theme.colors.primary};
448
448
  }
449
- `,re=o.div`
449
+ `,ae=o.div`
450
450
  display: flex;
451
451
  flex-direction: column;
452
452
  width: 180px;
@@ -475,9 +475,9 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
475
475
  margin-top: ${n.sp2};
476
476
  }
477
477
  }
478
- `,Et=o.div`
478
+ `,Rt=o.div`
479
479
  padding: ${n.sp2} ${n.sp3};
480
- `,ue=o(Ye)`
480
+ `,ue=o(Ze)`
481
481
  color: ${e=>e.theme.colors.hero};
482
482
  `,we=o(Re)`
483
483
  width: 100%;
@@ -501,7 +501,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
501
501
  }
502
502
  }
503
503
  }
504
- `,is=o.div`
504
+ `,ns=o.div`
505
505
  border-left: ${e=>`1px solid ${e.theme.colors.grey3}`};
506
506
  display: flex;
507
507
  flex-direction: column;
@@ -509,22 +509,22 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
509
509
  align-items: center;
510
510
  justify-content: center;
511
511
  padding: ${n.sp0} 42px;
512
- `,os=o.div`
512
+ `,is=o.div`
513
513
  flex: 1;
514
- `,Hr=o(Ye)`
514
+ `,Ur=o(Ze)`
515
515
  padding: ${n.sp0} 6px;
516
516
  color: ${he.info};
517
517
  border: 1px solid ${he.info};
518
518
  border-radius: ${n.sp1};
519
519
  margin-top: ${n.sp1};
520
- `,Ti=o(ot)`
520
+ `,Ti=o(st)`
521
521
  padding: ${n.sp2};
522
522
  color: ${e=>e.theme.colors.hero};
523
523
  background: ${e=>e.theme.colors.overlayColor};
524
524
  border-radius: ${n.sp1};
525
- `,at=o(Ti)`
525
+ `,rt=o(Ti)`
526
526
  padding: 2px ${n.sp2};
527
- `,Wt=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Wt.date,sortOrder:"ascending",width:new Q(20,20),loaderWidth:120},{key:"payee",value:Wt.payee,sortOrder:"ascending",width:new Q(20,20),loaderWidth:212},{key:"memo",value:Wt.memo,sortOrder:"ascending",width:new Q(20,20),loaderWidth:192},{key:"direction",value:Wt.direction,sortOrder:"ascending",width:new Q(15,15),loaderWidth:84},{key:"match",value:Wt.match,sortOrder:"ascending",width:new Q(15,15),loaderWidth:152},{key:"amount",value:Wt.amount,sortOrder:"ascending",width:new Q(10,10),loaderWidth:64}],Oo=[{key:"payee",value:Wt.payee,sortOrder:"ascending",width:new Q(65,65),loaderWidth:212},{key:"amount",value:Wt.amount,sortOrder:"ascending",width:new Q(30,30),loaderWidth:64}],Nh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=Ce(),h=Ze()?Oo:Ft,[d,a]=s.useState(()=>h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})));s.useEffect(()=>{a(h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})))},[i.sortKey,i.sortOrder,h]);const c=(u,m)=>{let p=m;i.sortKey===u&&(p=m==="ascending"?"descending":"ascending"),l(u,p)};return t.jsx(Hh,{children:d.map(u=>t.jsxs(Wh,{sortDataValue:i.sortKey,actualDataValue:u.key,wrapperWidth:u.width,windowSize:r,isLastColumn:u.key==="amount",children:[t.jsxs(qh,{"data-testid":D("account-reconciliation-review-header",u.value),sortKey:u.key,onClick:()=>c(u.key,u.sortOrder),children:[t.jsx(Ye,{children:u.value}),t.jsx(Jh,{sortDataValue:i.sortKey,headerData:u,children:t.jsx(Kh,{})})]}),t.jsx(Qh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===u.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Gh,{"data-testid":D("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},u.key))})},Uh=s.memo(Nh),Hh=o(ot)`
527
+ `,Ht=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Ht.date,sortOrder:"ascending",width:new Q(20,20),loaderWidth:120},{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(20,20),loaderWidth:212},{key:"memo",value:Ht.memo,sortOrder:"ascending",width:new Q(20,20),loaderWidth:192},{key:"direction",value:Ht.direction,sortOrder:"ascending",width:new Q(15,15),loaderWidth:84},{key:"match",value:Ht.match,sortOrder:"ascending",width:new Q(15,15),loaderWidth:152},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(10,10),loaderWidth:64}],Mo=[{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(65,65),loaderWidth:212},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(30,30),loaderWidth:64}],Nh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=Ce(),h=Xe()?Mo:Ft,[d,a]=s.useState(()=>h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})));s.useEffect(()=>{a(h.map(u=>({...u,sortOrder:u.key===i.sortKey?i.sortOrder:"ascending"})))},[i.sortKey,i.sortOrder,h]);const c=(u,m)=>{let p=m;i.sortKey===u&&(p=m==="ascending"?"descending":"ascending"),l(u,p)};return t.jsx(Wh,{children:d.map(u=>t.jsxs(Hh,{sortDataValue:i.sortKey,actualDataValue:u.key,wrapperWidth:u.width,windowSize:r,isLastColumn:u.key==="amount",children:[t.jsxs(qh,{"data-testid":D("account-reconciliation-review-header",u.value),sortKey:u.key,onClick:()=>c(u.key,u.sortOrder),children:[t.jsx(Ze,{children:u.value}),t.jsx(Kh,{sortDataValue:i.sortKey,headerData:u,children:t.jsx(Jh,{})})]}),t.jsx(Qh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===u.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Gh,{"data-testid":D("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},u.key))})},Uh=s.memo(Nh),Wh=o(st)`
528
528
  top: 0;
529
529
  left: 0;
530
530
  width: fit-content;
@@ -537,7 +537,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
537
537
  position: sticky;
538
538
  color: ${e=>e.theme.colors.grey1};
539
539
  background-color: ${e=>e.theme.colors.grey4};
540
- `,Wh=o.div`
540
+ `,Hh=o.div`
541
541
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
542
542
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
543
543
  min-width: ${e=>e.isLastColumn===!0?"auto":e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -554,7 +554,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
554
554
  color: ${e=>e.theme.colors.primary};
555
555
  }
556
556
  white-space: nowrap;
557
- `,Jh=o.div`
557
+ `,Kh=o.div`
558
558
  display: flex;
559
559
  align-items: center;
560
560
  transform: ${e=>e.sortDataValue===e.headerData.key&&e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
@@ -563,7 +563,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
563
563
  `:le`
564
564
  padding-bottom: 2px;
565
565
  `}
566
- `,Kh=o(ti)`
566
+ `,Jh=o(Xn)`
567
567
  width: ${n.sp2};
568
568
  height: ${n.sp2};
569
569
  cursor: pointer;
@@ -572,16 +572,16 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
572
572
  display: ${e=>e.isVisible?"flex":"none"};
573
573
  align-items: center;
574
574
  padding-top: 2px;
575
- `,Gh=o(ni)`
575
+ `,Gh=o(ei)`
576
576
  width: 12px;
577
577
  height: 12px;
578
578
  cursor: pointer;
579
579
  color: ${e=>e.theme.colors.hero};
580
- `,kt="accountReconReviewTableSection",{dateFormat:Yh,expenseAutomation:Zh,common:Dt}=me.getLocalizedStrings(),{visual:Wr}=Yh,{accountRecon:ke}=Zh,qr=e=>[{label:ke.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Jr=e=>[{label:ke.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],zs=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,Xh=e=>{const{sortKey:i,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:h,allAccountList:d,classList:a,localData:c,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,selectedAccountId:p,entitySearchAutoCompleteData:g,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,refreshStatus:S,updateLocalData:$,onColumnSortConfigChanged:v,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w,bankAccounts:k,creditCards:j}=e,{transactionsToReview:b,account:{accountType:z}}=r,A=s.useRef(null),[R,F]=s.useState(null),V=M=>{const O=b[M],ae=Er(O),B=Dr(O),L=Mr(O,z??"bank"),U=Or(O,z??"bank"),X=Pr(O),ce=Go(O),ge=O.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return O.transactionId===R?B||L||U||X||ce?275+(ge?25:0):ae?185+O.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},q=s.useMemo(()=>({onColumnSortConfigChanged:v,sortConfig:{sortKey:i,sortOrder:l}}),[v,i,l]);if(s.useEffect(()=>{F(b[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[R]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{S.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[S]),b.length===0){const M=We("reconciliation",void 0,p).tabs.find(O=>O.id==="review")?.allDoneText;return t.jsx(Cp,{children:t.jsx(It,{tab:"reconciliation",title:M?.title??Dt.strings.empty,subTitle:M?.subTitle??Dt.strings.empty})})}return t.jsx(rp,{children:t.jsx(Kr.Provider,{value:q,children:t.jsx(Kn,{children:({height:M,width:O})=>t.jsx(zi,{width:O,height:M,innerElementType:Qr,ref:A,itemCount:b.length,itemSize:V,itemKey:ae=>b[ae].transactionId,overscanCount:Pc,itemData:{transactionsList:b,expandedRowId:R,allAccountList:d,classList:a,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,bankAccounts:k,creditCards:j,accountType:z,updateLocalData:$,setExpandedRowId:F,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:ep})})})})},Kr=s.createContext(void 0),Qr=s.forwardRef((e,i)=>{const{children:l,style:r,...h}=e,d=s.useContext(Kr);return t.jsxs(lp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...h,children:[d!=null&&t.jsx(Uh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(cp,{children:l})]})});Qr.displayName="Account recon review table inner element type";const ep=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Pi(),{transactionsList:h,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:u,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,reviewTabSelectedVendorByTransactionId:w,bankAccounts:k,creditCards:j,accountType:b}=l,z=h[e],A=r!=null&&r===z.transactionId;return t.jsx(ap,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(tp,{transaction:z,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:u,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,selectedVendor:w[z.transactionId],bankAccounts:k,creditCards:j,accountType:b})})},tp=({transaction:e,expandedRowId:i,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:h,classList:d,classListNestedAccountHierarchy:a,localData:c,entitySearchAutoCompleteData:u,excludeFetchById:m,saveFetchById:p,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,setExpandedRowId:S,updateLocalData:$,onSaveReconciliation:v,onSaveReconciliationReview:T,onReconMatchedTransactionClick:I})=>{const w=i===e.transactionId,k=Ce(),j=Ze(),b=c[e.transactionId],z=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",R=Go(e),F=h.find(M=>M.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),V=M=>M.recommendedAction.recommendedTransactions.length>0&&M.recommendedAction.recommendedTransactions[0].merchantName!=null?M.recommendedAction.recommendedTransactions[0].merchantName:Dt.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(ip,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(op,{isExpanded:w,onClick:()=>S(e.transactionId),"data-testid":D("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[0].width,children:t.jsx(vn,{children:e.transactionDate.format(Wr.MMMDCommaYYYYformat)})}),t.jsx(Sn,{windowSize:k,responsiveWidth:j?Oo[0].width:Ft[1].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:V(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[2].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[3].width,children:t.jsx(vn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Sn,{windowSize:k,responsiveWidth:Ft[4].width,children:[t.jsx(Ge,{controller:z,children:t.jsx(vp,{children:t.jsx(Sp,{children:ke.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ge,{controller:!z,children:t.jsx(vn,{children:F!=null?t.jsxs(t.Fragment,{children:[t.jsx(Gr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:F.accountName})]}):Dt.strings.hyphen})})]})]}),t.jsx(Sn,{windowSize:k,isLastColumn:!0,responsiveWidth:j?Oo[1].width:Ft[5].width,children:t.jsx(vn,{children:Ko("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ge,{controller:w&&b!=null,children:[t.jsx(np,{onSaveReconciliation:v,onSaveReconciliationReview:T,updateLocalData:$,saveFetchById:p,excludeFetchById:m,localData:b,classListNestedAccountHierarchy:a,allAccountList:h,classList:d,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:u,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,onReconMatchedTransactionClick:I}),t.jsx(Ge,{controller:(z||A||R)&&q!=null,children:t.jsx(jp,{children:t.jsxs($p,{children:[C==="credit_card"?ke.review.creditCardDetail:ke.review.bankDetail,Dt.strings.colon," ",q]})})})]})]})},np=({transaction:e,accountListNestedAccountHierarchy:i,entitySearchAutoCompleteActions:l,allAccountList:r,classList:h,classListNestedAccountHierarchy:d,localData:a,entitySearchAutoCompleteData:c,excludeFetchById:u,saveFetchById:m,selectedVendor:p,bankAccounts:g,creditCards:x,accountType:y,updateLocalData:C,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v})=>{const T=Tt(),I=Ze(),[w,k]=s.useState(!a.vendor?.id),[j,b]=s.useState(!a.customer?.id),[z,A]=s.useState(a.categoryId==null),[R,F]=s.useState(a.classId==null),[V,q]=s.useState(a.bankAccountId==null),[M,O]=s.useState(a.creditCardId==null),[ae,B]=s.useState(!a.memo),L=Er(e),U=Dr(e),X=Or(e,y??"bank"),ce=Mr(e,y??"bank"),ge=Pr(e),te=Go(e),K=s.useMemo(()=>{if(!U&&!te)return Jt(i);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Jt(i,p?.recommendations);const E=r.find($e=>$e.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return Jt(i,[{account:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,r,i]),ee=s.useMemo(()=>{if(!U&&!te)return $i(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return $i(d,p?.recommendations);const E=h.find($e=>$e.classId===e.recommendedAction.recommendedTransactions[0]?.classId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return $i(d,[{class:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,h,d]),W=xn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Fs(e,a,K,r,ee,g,x,c),[e,a,ee,r,K,g,x,c]),values:s.useMemo(()=>Fs(e,a,K,r,ee,g,x,c),[e,a,ee,r,K,g,x,c])}),_=async(E,de)=>{E.includes("memo")||C(Bs(de,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=W.watch((de,{name:$e})=>{$e!=null&&de!=null&&Yn(()=>_($e,de))});return()=>{E.unsubscribe()}});const ne=s.useCallback(E=>{if(!I){if(U||ge||te){if((U||te)&&a.vendor==null){k(!1),W.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){b(!1),W.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),W.setError(Oe(e.transactionId,"category"),{type:"required"});return}}C(Bs(E,e,c,r),e.transactionId,!1),$(e.transactionId)}},[I,U,te,ge,C,e,c,r,$,a.categoryId,a.vendor,a.customer]),H=W.watch(Oe(e.transactionId,"vendor")),Z=W.watch(Oe(e.transactionId,"customer")),oe=s.useRef(),J=s.useMemo(()=>U||te?"vendor":ge?"customer":null,[U,te,ge]),N=(E,de)=>{J!=null&&l.onAutoCompleteInputChange?.(E,J),oe.current=de};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((U||te)&&oe.current?.(kr(c.entityAutoCompleteView)),ge&&oe.current?.(Jc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,U,te]);const P=E=>h.filter(de=>de.classId===E)[0]?.accountingClassNumber??void 0,se=E=>r.filter(de=>de.qboId===E)[0]?.qboId,Y=s.useMemo(()=>{if(y==="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[]}},[y,e.recommendedAction.action,e.transactionDirection]),G=()=>{I||A(!1)},je=()=>{I||q(!1)},Te=()=>{I||O(!1)};return s.useEffect(()=>{z===!1&&a.categoryId==null&&W.setFocus(Oe(e.transactionId,"category"))},[z]),s.useEffect(()=>{R===!1&&a.classId==null&&W.setFocus(Oe(e.transactionId,"class"))},[R]),s.useEffect(()=>{w===!1&&a.vendor==null&&W.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&W.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{V===!1&&a.bankAccountId==null&&W.setFocus(Oe(e.transactionId,"bankAccount"))},[V]),s.useEffect(()=>{M===!1&&a.creditCardId==null&&W.setFocus(Oe(e.transactionId,"creditCard"))},[M]),t.jsx(fn,{...W,children:t.jsx("form",{onSubmit:W.handleSubmit(ne),id:zs(e.transactionId),children:t.jsxs(sp,{children:[t.jsxs(dp,{children:[t.jsxs(pp,{children:[t.jsxs(mp,{children:[t.jsx(Gr,{}),t.jsx(qi,{label:{label:L?ke.review.formLabels.match:ke.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:L?"match":"categorize",value:L?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ge,{controller:!L,children:t.jsxs(t.Fragment,{children:[t.jsx(_s,{}),Y.map(E=>t.jsx(qi,{label:{label:ke.review.formLabels[E]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"recommendedActionType"),id:E,value:E,style:{width:n.sp3,height:n.sp3,padding:"2px"}}},E))]})})]}),t.jsxs(hp,{children:[t.jsx(Wn,{variant:"secondary",size:"small",label:ke.review.formLabels.exclude,loading:u[e.transactionId]?.fetchState==="In-Progress","data-testid":D("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{I||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Wn,{form:zs(e.transactionId),"data-testid":D("account-reconciliation-review-save-button",e.transactionId),label:Dt.footer.save,style:{width:n.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ge,{controller:U||ge||te,children:t.jsxs(Yi,{children:[t.jsx(Ge,{controller:U||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&k(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.vendor}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:w===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&k(!1)},"data-testid":D("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addVendor]}):t.jsx(Ro,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:ke.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:H?.selectedOption,defaultOptions:H?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx(Ge,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&b(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.customer}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&b(!1)},"data-testid":D("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCustomer]}):t.jsx(Ro,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:ke.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Z?.selectedOption,defaultOptions:Z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&z===!1&&A(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&G()},"data-testid":D("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"category"),placeholder:ke.review.formLabels.addCategory,valueToId:E=>se(E),defaultValue:{allOptions:K,selectedOption:r.find(E=>E.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&R===!1&&F(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.class}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&F(!1)},"data-testid":D("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addClass]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:ke.review.formLabels.addClass,valueToId:E=>P(E),defaultValue:{allOptions:ee,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ge,{controller:L,children:t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx("span",{className:"matched-text",children:`${ke.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),ke.review.matchesFoundFullInfo]}),t.jsx(yp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(wp,{children:[t.jsx(qi,{label:{label:t.jsxs(fp,{children:[t.jsx(Re,{children:E.date.format(Wr.MMMDCommaYYYYformat)}),t.jsx(Re,{children:E.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:E.bookTransactionId,value:E.bookTransactionId,style:{width:n.sp3,height:n.sp3,padding:"2px"}}}),t.jsxs(kp,{"data-testid":D("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&v(E.bookTransactionId)},children:[t.jsx(bp,{children:Ko("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(_s,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ge,{controller:X,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&V===!1&&q(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:y==="credit_card"?ke.review.formLabels.selectAccount:ke.review.formLabels.transferTo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&je()},"data-testid":D("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectAccount]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:ke.review.formLabels.selectAccount,defaultValue:{allOptions:qr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:ce,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&M===!1&&O(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.formLabels.creditCard}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:M===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&Te()},"data-testid":D("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectCard]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:ke.review.formLabels.selectCard,defaultValue:{allOptions:Jr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:!L,children:t.jsx(up,{children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.header.memo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ae===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&B(!1)},"data-testid":D("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addMemo]}):t.jsx(Kc,{name:Oe(e.transactionId,"memo"),placeholder:ke.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},fi={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${n.sp5})`,marginRight:`-${n.sp3}`,marginLeft:`-${n.sp3}`})},Fs=(e,i,l,r,h,d,a,c)=>{const u=r.find(m=>m.accountId===i.categoryId);return{[kt]:{[e.transactionId]:{category:{selectedOption:u?.qboId,allOptions:l},class:{selectedOption:i?.classId,allOptions:h},bankAccount:{selectedOption:i?.bankAccountId,allOptions:qr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:Jr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Lr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:od(i?.customer,c.entityAutoCompleteView)}}}}},Bs=(e,i,l,r)=>{const{vendor:h,customer:d}=e[kt][i.transactionId];let a;if(h.selectedOption!=null){const u=h.defaultOptions.find(m=>m.value===h.selectedOption);if(u!=null)a={id:h.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.vendor.find(p=>p.id===h.selectedOption||p.zeniId===h.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let c;if(d.selectedOption!=null){const u=d.defaultOptions.find(m=>m.value===d.selectedOption);if(u!=null)c={id:d.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.customer.find(p=>p.id===d.selectedOption||p.zeniId===d.selectedOption);m!=null&&(c={id:m.zeniId,name:m.name})}}return{categoryId:r.find(u=>u.qboId===e[kt][i.transactionId].category.selectedOption)?.accountId??e[kt][i.transactionId].category.selectedOption,classId:e[kt][i.transactionId].class.selectedOption,memo:e[kt][i.transactionId].memo,matchedTransactionId:e[kt][i.transactionId].matchedTransaction,vendor:a,bankAccountId:e[kt][i.transactionId].bankAccount.selectedOption,creditCardId:e[kt][i.transactionId].creditCard.selectedOption,customer:c}},vn=o(Re)`
580
+ `,kt="accountReconReviewTableSection",{dateFormat:Yh,expenseAutomation:Zh,common:Et}=me.getLocalizedStrings(),{visual:Wr}=Yh,{accountRecon:Se}=Zh,Hr=e=>[{label:Se.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],qr=e=>[{label:Se.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],zs=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,Xh=e=>{const{sortKey:i,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:h,allAccountList:d,classList:a,localData:c,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,selectedAccountId:p,entitySearchAutoCompleteData:g,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,refreshStatus:S,updateLocalData:$,onColumnSortConfigChanged:v,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w,bankAccounts:k,creditCards:j}=e,{transactionsToReview:b,account:{accountType:P}}=r,A=s.useRef(null),[R,F]=s.useState(null),V=M=>{const O=b[M],re=Rr(O),B=Er(O),L=Dr(O,P??"bank"),U=Mr(O,P??"bank"),X=Or(O),ce=Qo(O),ge=O.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return O.transactionId===R?B||L||U||X||ce?275+(ge?25:0):re?185+O.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},q=s.useMemo(()=>({onColumnSortConfigChanged:v,sortConfig:{sortKey:i,sortOrder:l}}),[v,i,l]);if(s.useEffect(()=>{F(b[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[R]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[b.length]),s.useEffect(()=>{S.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[S]),b.length===0){const M=He("reconciliation",void 0,p).tabs.find(O=>O.id==="review")?.allDoneText;return t.jsx(Cp,{children:t.jsx(It,{tab:"reconciliation",title:M?.title??Et.strings.empty,subTitle:M?.subTitle??Et.strings.empty})})}return t.jsx(rp,{children:t.jsx(Kr.Provider,{value:q,children:t.jsx(qn,{children:({height:M,width:O})=>t.jsx(Pi,{width:O,height:M,innerElementType:Jr,ref:A,itemCount:b.length,itemSize:V,itemKey:re=>b[re].transactionId,overscanCount:Oc,itemData:{transactionsList:b,expandedRowId:R,allAccountList:d,classList:a,accountListNestedAccountHierarchy:u,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:h,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:C,bankAccounts:k,creditCards:j,accountType:P,updateLocalData:$,setExpandedRowId:F,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:ep})})})})},Kr=s.createContext(void 0),Jr=s.forwardRef((e,i)=>{const{children:l,style:r,...h}=e,d=s.useContext(Kr);return t.jsxs(lp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...h,children:[d!=null&&t.jsx(Uh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(cp,{children:l})]})});Jr.displayName="Account recon review table inner element type";const ep=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{transactionsList:h,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:u,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:C,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,reviewTabSelectedVendorByTransactionId:w,bankAccounts:k,creditCards:j,accountType:b}=l,P=h[e],A=r!=null&&r===P.transactionId;return t.jsx(ap,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(tp,{transaction:P,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:u,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:C,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,selectedVendor:w[P.transactionId],bankAccounts:k,creditCards:j,accountType:b})})},tp=({transaction:e,expandedRowId:i,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:h,classList:d,classListNestedAccountHierarchy:a,localData:c,entitySearchAutoCompleteData:u,excludeFetchById:m,saveFetchById:p,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,setExpandedRowId:S,updateLocalData:$,onSaveReconciliation:v,onSaveReconciliationReview:T,onReconMatchedTransactionClick:I})=>{const w=i===e.transactionId,k=Ce(),j=Xe(),b=c[e.transactionId],P=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",R=Qo(e),F=h.find(M=>M.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),V=M=>M.recommendedAction.recommendedTransactions.length>0&&M.recommendedAction.recommendedTransactions[0].merchantName!=null?M.recommendedAction.recommendedTransactions[0].merchantName:Et.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(ip,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(op,{isExpanded:w,onClick:()=>S(e.transactionId),"data-testid":D("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(vn,{windowSize:k,responsiveWidth:Ft[0].width,children:t.jsx(Cn,{children:e.transactionDate.format(Wr.MMMDCommaYYYYformat)})}),t.jsx(vn,{windowSize:k,responsiveWidth:j?Mo[0].width:Ft[1].width,children:t.jsx(Cn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:V(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(vn,{windowSize:k,responsiveWidth:Ft[2].width,children:t.jsx(Cn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(vn,{windowSize:k,responsiveWidth:Ft[3].width,children:t.jsx(Cn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(vn,{windowSize:k,responsiveWidth:Ft[4].width,children:[t.jsx(Ye,{controller:P,children:t.jsx(vp,{children:t.jsx(Sp,{children:Se.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ye,{controller:!P,children:t.jsx(Cn,{children:F!=null?t.jsxs(t.Fragment,{children:[t.jsx(Qr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:F.accountName})]}):Et.strings.hyphen})})]})]}),t.jsx(vn,{windowSize:k,isLastColumn:!0,responsiveWidth:j?Mo[1].width:Ft[5].width,children:t.jsx(Cn,{children:Ko("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ye,{controller:w&&b!=null,children:[t.jsx(np,{onSaveReconciliation:v,onSaveReconciliationReview:T,updateLocalData:$,saveFetchById:p,excludeFetchById:m,localData:b,classListNestedAccountHierarchy:a,allAccountList:h,classList:d,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:u,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:C,onReconMatchedTransactionClick:I}),t.jsx(Ye,{controller:(P||A||R)&&q!=null,children:t.jsx(jp,{children:t.jsxs($p,{children:[C==="credit_card"?Se.review.creditCardDetail:Se.review.bankDetail,Et.strings.colon," ",q]})})})]})]})},np=({transaction:e,accountListNestedAccountHierarchy:i,entitySearchAutoCompleteActions:l,allAccountList:r,classList:h,classListNestedAccountHierarchy:d,localData:a,entitySearchAutoCompleteData:c,excludeFetchById:u,saveFetchById:m,selectedVendor:p,bankAccounts:g,creditCards:x,accountType:y,updateLocalData:C,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v})=>{const T=Tt(),I=Xe(),[w,k]=s.useState(!a.vendor?.id),[j,b]=s.useState(!a.customer?.id),[P,A]=s.useState(a.categoryId==null),[R,F]=s.useState(a.classId==null),[V,q]=s.useState(a.bankAccountId==null),[M,O]=s.useState(a.creditCardId==null),[re,B]=s.useState(!a.memo),L=Rr(e),U=Er(e),X=Mr(e,y??"bank"),ce=Dr(e,y??"bank"),ge=Or(e),te=Qo(e),J=s.useMemo(()=>{if(!U&&!te)return Kt(i);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Kt(i,p?.recommendations);const E=r.find(je=>je.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),de=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return Kt(i,[{account:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,r,i]),ee=s.useMemo(()=>{if(!U&&!te)return $i(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return $i(d,p?.recommendations);const E=h.find(je=>je.classId===e.recommendedAction.recommendedTransactions[0]?.classId),de=E!=null?{...E,reason:Se.review.zeniGptRecommendation,min:0,max:0}:void 0;return $i(d,[{class:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,h,d]),H=gn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Ps(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c]),values:s.useMemo(()=>Ps(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c])}),_=async(E,de)=>{E.includes("memo")||C(Fs(de,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=H.watch((de,{name:je})=>{je!=null&&de!=null&&Qn(()=>_(je,de))});return()=>{E.unsubscribe()}});const ne=s.useCallback(E=>{if(!I){if(U||ge||te){if((U||te)&&a.vendor==null){k(!1),H.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){b(!1),H.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),H.setError(Oe(e.transactionId,"category"),{type:"required"});return}}C(Fs(E,e,c,r),e.transactionId,!1),$(e.transactionId)}},[I,U,te,ge,C,e,c,r,$,a.categoryId,a.vendor,a.customer]),W=H.watch(Oe(e.transactionId,"vendor")),Z=H.watch(Oe(e.transactionId,"customer")),ie=s.useRef(),K=s.useMemo(()=>U||te?"vendor":ge?"customer":null,[U,te,ge]),N=(E,de)=>{K!=null&&l.onAutoCompleteInputChange?.(E,K),ie.current=de};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((U||te)&&ie.current?.(Sr(c.entityAutoCompleteView)),ge&&ie.current?.(qc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,U,te]);const z=E=>h.filter(de=>de.classId===E)[0]?.accountingClassNumber??void 0,oe=E=>r.filter(de=>de.qboId===E)[0]?.qboId,Y=s.useMemo(()=>{if(y==="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[]}},[y,e.recommendedAction.action,e.transactionDirection]),G=()=>{I||A(!1)},ke=()=>{I||q(!1)},Ie=()=>{I||O(!1)};return s.useEffect(()=>{P===!1&&a.categoryId==null&&H.setFocus(Oe(e.transactionId,"category"))},[P]),s.useEffect(()=>{R===!1&&a.classId==null&&H.setFocus(Oe(e.transactionId,"class"))},[R]),s.useEffect(()=>{w===!1&&a.vendor==null&&H.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&H.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{V===!1&&a.bankAccountId==null&&H.setFocus(Oe(e.transactionId,"bankAccount"))},[V]),s.useEffect(()=>{M===!1&&a.creditCardId==null&&H.setFocus(Oe(e.transactionId,"creditCard"))},[M]),t.jsx(xn,{...H,children:t.jsx("form",{onSubmit:H.handleSubmit(ne),id:zs(e.transactionId),children:t.jsxs(sp,{children:[t.jsxs(dp,{children:[t.jsxs(pp,{children:[t.jsxs(mp,{children:[t.jsx(Qr,{}),t.jsx(qi,{label:{label:L?Se.review.formLabels.match:Se.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:L?"match":"categorize",value:L?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ye,{controller:!L,children:t.jsxs(t.Fragment,{children:[t.jsx(Bs,{}),Y.map(E=>t.jsx(qi,{label:{label:Se.review.formLabels[E]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"recommendedActionType"),id:E,value:E,style:{width:n.sp3,height:n.sp3,padding:"2px"}}},E))]})})]}),t.jsxs(hp,{children:[t.jsx(Un,{variant:"secondary",size:"small",label:Se.review.formLabels.exclude,loading:u[e.transactionId]?.fetchState==="In-Progress","data-testid":D("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{I||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Un,{form:zs(e.transactionId),"data-testid":D("account-reconciliation-review-save-button",e.transactionId),label:Et.footer.save,style:{width:n.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ye,{controller:U||ge||te,children:t.jsxs(Gi,{children:[t.jsx(Ye,{controller:U||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&k(!0)},children:t.jsx(ae,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.vendor}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:w===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&k(!1)},"data-testid":D("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.addVendor]}):t.jsx(Ao,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:Se.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx(Ye,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&b(!0)},children:t.jsx(ae,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.customer}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&b(!1)},"data-testid":D("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.addCustomer]}):t.jsx(Ao,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:Se.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Z?.selectedOption,defaultOptions:Z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&P===!1&&A(!0)},children:t.jsx(ae,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:P===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&G()},"data-testid":D("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.addCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"category"),placeholder:Se.review.formLabels.addCategory,valueToId:E=>oe(E),defaultValue:{allOptions:J,selectedOption:r.find(E=>E.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&R===!1&&F(!0)},children:t.jsx(ae,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Et.texts.class}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&F(!1)},"data-testid":D("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.addClass]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:Se.review.formLabels.addClass,valueToId:E=>z(E),defaultValue:{allOptions:ee,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ye,{controller:L,children:t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx("span",{className:"matched-text",children:`${Se.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),Se.review.matchesFoundFullInfo]}),t.jsx(yp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(wp,{children:[t.jsx(qi,{label:{label:t.jsxs(fp,{children:[t.jsx(Re,{children:E.date.format(Wr.MMMDCommaYYYYformat)}),t.jsx(Re,{children:E.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:E.bookTransactionId,value:E.bookTransactionId,style:{width:n.sp3,height:n.sp3,padding:"2px"}}}),t.jsxs(kp,{"data-testid":D("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&v(E.bookTransactionId)},children:[t.jsx(bp,{children:Ko("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(Bs,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ye,{controller:X,children:t.jsx(Gi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&V===!1&&q(!0)},children:t.jsx(ae,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:y==="credit_card"?Se.review.formLabels.selectAccount:Se.review.formLabels.transferTo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&ke()},"data-testid":D("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.selectAccount]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:Se.review.formLabels.selectAccount,defaultValue:{allOptions:Hr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ye,{controller:ce,children:t.jsx(Gi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&M===!1&&O(!0)},children:t.jsx(ae,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Se.review.formLabels.creditCard}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:M===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&Ie()},"data-testid":D("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.selectCard]}):t.jsx(In,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:Se.review.formLabels.selectCard,defaultValue:{allOptions:qr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ye,{controller:!L,children:t.jsx(up,{children:t.jsx(ae,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Se.review.header.memo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:re===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&B(!1)},"data-testid":D("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(an,{}),Se.review.formLabels.addMemo]}):t.jsx(Kc,{name:Oe(e.transactionId,"memo"),placeholder:Se.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},fi={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${n.sp5})`,marginRight:`-${n.sp3}`,marginLeft:`-${n.sp3}`})},Ps=(e,i,l,r,h,d,a,c)=>{const u=r.find(m=>m.accountId===i.categoryId);return{[kt]:{[e.transactionId]:{category:{selectedOption:u?.qboId,allOptions:l},class:{selectedOption:i?.classId,allOptions:h},bankAccount:{selectedOption:i?.bankAccountId,allOptions:Hr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:qr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Tr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:id(i?.customer,c.entityAutoCompleteView)}}}}},Fs=(e,i,l,r)=>{const{vendor:h,customer:d}=e[kt][i.transactionId];let a;if(h.selectedOption!=null){const u=h.defaultOptions.find(m=>m.value===h.selectedOption);if(u!=null)a={id:h.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.vendor.find(p=>p.id===h.selectedOption||p.zeniId===h.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let c;if(d.selectedOption!=null){const u=d.defaultOptions.find(m=>m.value===d.selectedOption);if(u!=null)c={id:d.selectedOption,name:u.label};else{const m=l.entityAutoCompleteView.customer.find(p=>p.id===d.selectedOption||p.zeniId===d.selectedOption);m!=null&&(c={id:m.zeniId,name:m.name})}}return{categoryId:r.find(u=>u.qboId===e[kt][i.transactionId].category.selectedOption)?.accountId??e[kt][i.transactionId].category.selectedOption,classId:e[kt][i.transactionId].class.selectedOption,memo:e[kt][i.transactionId].memo,matchedTransactionId:e[kt][i.transactionId].matchedTransaction,vendor:a,bankAccountId:e[kt][i.transactionId].bankAccount.selectedOption,creditCardId:e[kt][i.transactionId].creditCard.selectedOption,customer:c}},Cn=o(Re)`
581
581
  display: flex;
582
582
  align-items: center;
583
583
  column-gap: ${n.sp1};
584
- `,Sn=o.div`
584
+ `,vn=o.div`
585
585
  width: ${e=>e.responsiveWidth.valuePercentage(e.windowSize)};
586
586
  display: flex;
587
587
  justify-content: ${e=>e.isLastColumn===!0?"flex-end":"flex-start"};
@@ -621,7 +621,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
621
621
  box-sizing: border-box;
622
622
  ${e=>e.isPanelSelected===!0&&le`
623
623
  .recon-row-card {
624
- ${Yo(e.theme)}
624
+ ${Go(e.theme)}
625
625
  }
626
626
  `}
627
627
  `,rp=o.div`
@@ -643,7 +643,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
643
643
  padding: 12px ${n.sp3};
644
644
  background-color: ${e=>e.theme.colors.background};
645
645
  border-radius: ${n.sp2};
646
- `,Yi=o.div`
646
+ `,Gi=o.div`
647
647
  display: flex;
648
648
  flex-direction: row;
649
649
  align-items: center;
@@ -665,10 +665,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
665
665
  flex-direction: row;
666
666
  align-items: center;
667
667
  column-gap: ${n.sp1};
668
- `,rn=o(Fi)`
668
+ `,an=o(Fi)`
669
669
  width: ${n.sp3};
670
670
  height: ${n.sp3};
671
- `,_s=o(sd)`
671
+ `,Bs=o(od)`
672
672
  width: ${n.sp3};
673
673
  height: ${n.sp3};
674
674
  color: ${e=>e.theme.colors.hero};
@@ -681,7 +681,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
681
681
  color: ${e=>e.theme.colors.primary};
682
682
 
683
683
  .matched-text {
684
- font-weight: ${Zn.bold};
684
+ font-weight: ${Gn.bold};
685
685
  }
686
686
  `,fp=o.div`
687
687
  display: flex;
@@ -709,7 +709,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
709
709
  border: 1px solid ${e=>e.theme.colors.grey2};
710
710
  padding: ${n.sp0} ${n.sp1};
711
711
  border-radius: ${n.sp1};
712
- `,Sp=o(Ye)`
712
+ `,Sp=o(Ze)`
713
713
  color: ${e=>e.theme.colors.hero};
714
714
  `,kp=o.div`
715
715
  display: flex;
@@ -720,16 +720,16 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
720
720
  text-align: center;
721
721
  padding: ${n.sp1} ${n.sp0};
722
722
  border-top: 1px solid ${e=>e.theme.colors.grey3};
723
- `,$p=o(Ye)`
723
+ `,$p=o(Ze)`
724
724
  color: ${e=>e.theme.colors.hero};
725
- `,Gr=o(Qt)`
725
+ `,Qr=o(Qt)`
726
726
  width: ${n.sp3};
727
727
  height: ${n.sp3};
728
728
  margin-right: ${n.sp1};
729
729
  path {
730
730
  stroke-width: 2;
731
731
  }
732
- `,Ip=({reconciliation:e,entitySearchAutoCompleteData:i,selectedAccountId:l,currentFooterFormId:r,entitySearchAutoCompleteActions:h,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:a,onReconTabColumnSortConfigChanged:c,updateReviewTabLocalData:u,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:C,sortOrder:S}}},selectedReconAccount:$}=e,v=y[l],{transactionFetchState:T}=$??{};return T?.fetchState==="In-Progress"||T?.fetchState==="Not-Started"?t.jsxs(Vs,{style:{paddingLeft:f[8],paddingRight:f[8]},children:[t.jsx(Tp,{children:Ft.map(I=>t.jsx(it,{width:I.loaderWidth,height:18},I.key))}),t.jsxs(Ap,{children:[...Array(3).fill(0).map((I,w)=>t.jsx(Lp,{children:Ft.map(k=>t.jsx(it,{width:k.loaderWidth,height:f[4]},k.key))},`${w}_${I}`))]})]}):t.jsx(Vs,{children:e.selectedTab==="reconcile"?t.jsx(Mh,{selectedAccountId:l,currentFooterFormId:r,setCurrentFooterFormId:a,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:c,onSaveReconciliation:p,sortConfig:{sortKey:C,sortOrder:S},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:v?.accountReconEntity.transactionsToReconcile}):t.jsx(Xh,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[l]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[l].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:i,updateLocalData:u,entitySearchAutoCompleteActions:h,onColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:l,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},Vs=o.div`
732
+ `,Ip=({reconciliation:e,entitySearchAutoCompleteData:i,selectedAccountId:l,currentFooterFormId:r,entitySearchAutoCompleteActions:h,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:a,onReconTabColumnSortConfigChanged:c,updateReviewTabLocalData:u,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:C,sortOrder:S}}},selectedReconAccount:$}=e,v=y[l],{transactionFetchState:T}=$??{};return T?.fetchState==="In-Progress"||T?.fetchState==="Not-Started"?t.jsxs(_s,{style:{paddingLeft:f[8],paddingRight:f[8]},children:[t.jsx(Tp,{children:Ft.map(I=>t.jsx(ot,{width:I.loaderWidth,height:18},I.key))}),t.jsxs(Ap,{children:[...Array(3).fill(0).map((I,w)=>t.jsx(Lp,{children:Ft.map(k=>t.jsx(ot,{width:k.loaderWidth,height:f[4]},k.key))},`${w}_${I}`))]})]}):t.jsx(_s,{children:e.selectedTab==="reconcile"?t.jsx(Mh,{selectedAccountId:l,currentFooterFormId:r,setCurrentFooterFormId:a,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:c,onSaveReconciliation:p,sortConfig:{sortKey:C,sortOrder:S},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:v?.accountReconEntity.transactionsToReconcile}):t.jsx(Xh,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[l]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[l].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:i,updateLocalData:u,entitySearchAutoCompleteActions:h,onColumnSortConfigChanged:m,onSaveReconciliation:p,onSaveReconciliationReview:g,onReconMatchedTransactionClick:x,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:l,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},_s=o.div`
733
733
  width: 100%;
734
734
  height: 100%;
735
735
  `,Tp=o.div`
@@ -750,7 +750,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
750
750
  display: flex;
751
751
  gap: ${n.sp3};
752
752
  flex-direction: column;
753
- `;function Rp({title:e,config:i,nodeId:l}){return{children:[],id:l??Ot("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:i}}}function Ep({account:e,numOfBalances:i,title:l,isLastNode:r,config:h}){const d=Ot("ac_group_report",[],l);return{children:[],id:d,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:l,data:e,numOfBalances:i},config:h}}}function Dp({title:e,section:i,config:l,numOfBalances:r,nodeId:h}){return{children:[],id:h??Ot("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:r},config:l}}}function Ns({section:e,allAccountReconciliations:i,title:l,subTitle:r,isLastNode:h,isTitleRowRequired:d,config:a}){const c=Ot("section",[],l),u={children:[],id:c,isLastNode:h,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:0},config:a}};if(d){const p=Ot("title_string_only",[],l),g={children:[],id:p,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:l,data:e,numOfBalances:0},config:a}};u.children.push(g)}const m=Dp({title:r,section:e,config:a,numOfBalances:0});return u.children.push(m),e.accountIDs.forEach((p,g)=>{const x=i[p],y=Ep({account:x,numOfBalances:0,title:x.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:a});u.children.push(y)}),u}function Yr({config:e,accountReconForSection:i,nodeId:l}){return{children:[],id:l??Ot("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:i,numOfBalances:0},config:e}}}function Mp(e,i){return i?Ki("section")+Ki("total")+e*Ki("ac_group_report"):1/0}const Op=(e,i,l,r,h=!0,d="assets")=>{const a=d==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,c=Yr({config:i,accountReconForSection:a}),u=[];u.push(c);const m=Array.isArray(l[r])?l[r]:[],{expenseAutomation:{accountRecon:{reconciliation:p}},common:{loading:g}}=me.getLocalizedStrings(),x=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=C=>C.filter(S=>!m.includes(S));if(x)[...Array(3)].forEach((C,S)=>{u.push(Rp({title:`${S}+${g}`,config:i}))});else{const C=y(e.accountReconciliationBySectionID.assets.accountIDs),S=Ns({section:{...e.accountReconciliationBySectionID.assets,accountIDs:C},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.assets.title,subTitle:p.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:i});if(u.push(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const $=y(e.accountReconciliationBySectionID.liabilities.accountIDs),v=Ns({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:$},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.liabilities.title,subTitle:p.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:i});u.push(v)}}return{config:i,headerNodes:h?[c]:[],contentNodes:u}};function Pp(e,i,l,r=!1,h="assets"){Object.assign(e.config,l);const d=h==="liabilities"&&i.accountReconciliationBySectionID.liabilities.accountIDs.length>0?i.accountReconciliationBySectionID.liabilities:i.accountReconciliationBySectionID.assets,a=Yr({config:l,accountReconForSection:d});return{config:l,headerNodes:r?[a]:[],contentNodes:[a,...e.contentNodes.slice(1)]}}const Po={wrapperPadding:new Q(f[2],f[2],f[2],f[8]),contentPaddingLeft:new Q(f[2],f[2],f[2],f[2]),contentPaddingRight:new Q(f[2],f[2],f[2],f[2])},zp=o.div`
753
+ `;function Rp({title:e,config:i,nodeId:l}){return{children:[],id:l??Mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:i}}}function Ep({account:e,numOfBalances:i,title:l,isLastNode:r,config:h}){const d=Mt("ac_group_report",[],l);return{children:[],id:d,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:l,data:e,numOfBalances:i},config:h}}}function Dp({title:e,section:i,config:l,numOfBalances:r,nodeId:h}){return{children:[],id:h??Mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:r},config:l}}}function Vs({section:e,allAccountReconciliations:i,title:l,subTitle:r,isLastNode:h,isTitleRowRequired:d,config:a}){const c=Mt("section",[],l),u={children:[],id:c,isLastNode:h,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:0},config:a}};if(d){const p=Mt("title_string_only",[],l),g={children:[],id:p,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:l,data:e,numOfBalances:0},config:a}};u.children.push(g)}const m=Dp({title:r,section:e,config:a,numOfBalances:0});return u.children.push(m),e.accountIDs.forEach((p,g)=>{const x=i[p],y=Ep({account:x,numOfBalances:0,title:x.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:a});u.children.push(y)}),u}function Gr({config:e,accountReconForSection:i,nodeId:l}){return{children:[],id:l??Mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:i,numOfBalances:0},config:e}}}function Mp(e,i){return i?Ki("section")+Ki("total")+e*Ki("ac_group_report"):1/0}const Op=(e,i,l,r,h=!0,d="assets")=>{const a=d==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,c=Gr({config:i,accountReconForSection:a}),u=[];u.push(c);const m=Array.isArray(l[r])?l[r]:[],{expenseAutomation:{accountRecon:{reconciliation:p}},common:{loading:g}}=me.getLocalizedStrings(),x=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=C=>C.filter(S=>!m.includes(S));if(x)[...Array(3)].forEach((C,S)=>{u.push(Rp({title:`${S}+${g}`,config:i}))});else{const C=y(e.accountReconciliationBySectionID.assets.accountIDs),S=Vs({section:{...e.accountReconciliationBySectionID.assets,accountIDs:C},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.assets.title,subTitle:p.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:i});if(u.push(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const $=y(e.accountReconciliationBySectionID.liabilities.accountIDs),v=Vs({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:$},allAccountReconciliations:e.accountReconciliationsByAccountID,title:p.headers.section.liabilities.title,subTitle:p.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:i});u.push(v)}}return{config:i,headerNodes:h?[c]:[],contentNodes:u}};function zp(e,i,l,r=!1,h="assets"){Object.assign(e.config,l);const d=h==="liabilities"&&i.accountReconciliationBySectionID.liabilities.accountIDs.length>0?i.accountReconciliationBySectionID.liabilities:i.accountReconciliationBySectionID.assets,a=Gr({config:l,accountReconForSection:d});return{config:l,headerNodes:r?[a]:[],contentNodes:[a,...e.contentNodes.slice(1)]}}const Oo={wrapperPadding:new Q(f[2],f[2],f[2],f[8]),contentPaddingLeft:new Q(f[2],f[2],f[2],f[2]),contentPaddingRight:new Q(f[2],f[2],f[2],f[2])},Pp=o.div`
754
754
  display: flex;
755
755
  height: 100%;
756
756
  width: 100%;
@@ -763,12 +763,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
763
763
  flex: 1 1 auto;
764
764
  width: 100%;
765
765
  justify-content: center;
766
- padding-left: ${e=>Po.wrapperPadding.valuePx(e.windowSize)};
766
+ padding-left: ${e=>Oo.wrapperPadding.valuePx(e.windowSize)};
767
767
  background-color: ${e=>e.theme.colors.grey4};
768
768
  `,Bp=o.div`
769
769
  width: 100%;
770
770
  height: 100%;
771
- `,{common:_p}=me.getLocalizedStrings();function Vp({reconciliation:e,companyId:i,onReload:l,onReviewClicked:r,setOpenDrawerClicked:h,onFetchLinkTokenClick:d,onEstablishConnectionClick:a,onAddStatementClick:c}){const[u,m]=s.useState(void 0),[p,g]=s.useState(void 0),x=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,C=p==="update_account"?y:x,[S,$]=s.useState(C.linkToken??null),[v,T]=s.useState(!1),{useDynamicConfig:I}=pr(),{configValue:w}=I(mr.accountReconGLAccountsConfig),k=s.useCallback(J=>{m(J),g("link_account_no_microdeposit")},[]),j=s.useCallback(J=>{const N=R.current.accountReconciliationsByAccountID[J]?.paymentAccountId;m(J),g("update_account"),d("update_account",N)},[]),b=s.useCallback(J=>{h(J)},[]),z=s.useRef(u),A=s.useRef(p),R=s.useRef(e);s.useEffect(()=>{z.current=u},[u]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{R.current=e},[e]);const F=s.useCallback(J=>{a(J,z.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),V=s.useCallback((J,N)=>{J!=null&&console.log("Plaid Connection Error",J,N),m(void 0),g(void 0),T(!1)},[]),{open:q,ready:M}=Sc({token:S,onSuccess:F,onExit:V});s.useEffect(()=>{(Di(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!v&&p!=null&&C.linkToken===S&&C.fetchStatus.fetchState==="Completed"&&M&&T(!0)},[M,S,C.fetchStatus.fetchState,C.linkToken,p,v]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==S&&$(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,S]),s.useEffect(()=>{v&&q()},[v,q]);const[O,ae]=s.useState(void 0),[B,L]=s.useState(void 0),[U,X]=s.useState("assets"),ce=Di("2025-03-31"),ge=1,te="account_reconciliation",K=Ce(),ee=Tt();Gn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const W=!0,_=Array.isArray(w?.[i])?w[i]:[],ne=e.accountReconciliationBySectionID.assets.accountIDs.filter(J=>!_.includes(J)).length,H=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Z=Mp(ne,H),oe=s.useCallback(J=>{const N=J.scrollTop>=Z?"liabilities":"assets";N!==U&&X(N)},[Z,U]);return s.useEffect(()=>{const J={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:ce,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:k,onReconnectClicked:j,onOpenDrawerClicked:b,onStatementAddClicked:c}};if(O==null||!xr(B,e)){const N=Op(e,J,w,i,W,U);L(e),ae(N)}else{const N=Pp(O,e,J,W,U);ae(N)}},[e,U]),e.fetchStatus.fetchState==="Error"?t.jsx(zp,{children:t.jsx(kc,{onReload:l,message:_p.errorMessage.somethingWentWrong})}):t.jsx(Fp,{windowSize:K,children:O!=null?t.jsx(Bp,{windowSize:K,children:t.jsx(Fr,{backgroundColor:new qo(ee.colors.grey4),rootNodes:O,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:W,isStickyName:W},treeNodePadding:{left:Po.contentPaddingLeft.value(K),right:Po.contentPaddingRight.value(K)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:oe})}):null})}function Np({currentFooterFormId:e,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:h,onReconTabColumnSortConfigChanged:d,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u,onReloadReconciliationListPage:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:C,onSaveReconciliation:S,onSaveReconciliationReview:$,setOpenDrawerClicked:v,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Vp,{companyId:h,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:v,onAddStatementClick:y}):t.jsx(Ip,{currentFooterFormId:e,setCurrentFooterFormId:u,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:C,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:T})}function Up({accountAndClassReport:e,numOfBalances:i,title:l,isLastNode:r,isFirstNode:h,config:d,parentNodeIDs:a,ancestorMetadata:c}){let u="";return e.accountBase&&e.classBase?u=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?u=e.accountBase.accountId:e.classBase&&(u=e.classBase.classId),{children:[],id:Ot("flux_vendor_account_class_row",a,u),isLastNode:r,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:c,numOfBalances:i},config:d}}}function Hp({config:e,isLastNode:i,numOfBalances:l,parentNodeIDs:r,title:h,vendorRowIndex:d,vendorView:a}){const c=Ot("flux_vendor_row",r,a.vendor.id),u={children:[],id:c,isLastNode:i,reportElementData:{element:{kind:"flux_vendor_row",title:h,data:a,numOfBalances:l,index:d},config:e}},m=a.vendorAccountsAndClasses;return u.children=m.map((p,g)=>Up({accountAndClassReport:p,numOfBalances:l,title:p.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,c],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:p.accountBase?.accountName},isVendorLastChild:i,vendorId:a.vendor.id}})),u}function Wp({section:e,numOfBalances:i,title:l,isLastNode:r,config:h,vendorIndexOffset:d}){const a=e.sectionId,c={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:i,sectionType:e.sectionId},config:h}},u=(e.vendors??[]).map((m,p)=>Hp({config:h,isLastNode:p===e.vendors.length-1,numOfBalances:i,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:d+p,vendorView:m}));return c.children.push(...u),c}function qp({title:e,balances:i,config:l,nodeId:r}){return{children:[],id:r??Ot("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:i,numOfBalances:i.length},config:l}}}function Jp({title:e,data:i,isLastNode:l,config:r,numOfBalances:h}){const d=Ot("total",[],e);return{children:[],id:d,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:h},config:r}}}const{common:yi,expenseAutomation:{fluxAnalysis:Kp}}=me.getLocalizedStrings(),Qp=(e,i,l=!0)=>{const r=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,h=e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],d=Br({balances:h,config:i}),a=[],c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,u=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(c===!0)a.push(qp({title:`${yi.loading}`,balances:h,config:i})),[...Array(10)].forEach((m,p)=>{a.push(vs({title:`${p}+${yi.loading}`,balances:h,config:i}))});else{a.push(d);const m=["generalExpense","reimbursement"];let p=0;if(m.forEach(g=>{const x=e.sections[g];if(x.vendors.length>0||x.fetchStatus.fetchState==="Completed"){const y=Ln(x.balancesByMonth);a.push(Wp({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:x.vendors,varianceAmount:x.varianceAmount,variancePercentage:x.variancePercentage,currency:e.currency},numOfBalances:r,title:Gp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Ln(e.totalBalancesAndVariance.balancesByMonth):[],x=Jp({title:yi.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:i,isLastNode:!0,numOfBalances:r});a.push(x)}u===!0&&[...Array(1)].forEach((g,x)=>{a.push(vs({title:`${x}+${yi.loading}`,balances:h,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Gp=e=>Kp.sectionTitle[e];function Yp(e,i,l,r=!0){Object.assign(e.config,i);const h=Zp(l),d=Br({balances:h,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const Zp=e=>e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],zo={contentPaddingLeft:new Q(f[0],f[0],f[0]),contentPaddingRight:new Q(f[3],f[3],f[8]),wrapperPadding:new Q(f[3],f[3],f[8])},Xp=o.div`
771
+ `,{common:_p}=me.getLocalizedStrings();function Vp({reconciliation:e,companyId:i,onReload:l,onReviewClicked:r,setOpenDrawerClicked:h,onFetchLinkTokenClick:d,onEstablishConnectionClick:a,onAddStatementClick:c}){const[u,m]=s.useState(void 0),[p,g]=s.useState(void 0),x=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,C=p==="update_account"?y:x,[S,$]=s.useState(C.linkToken??null),[v,T]=s.useState(!1),{useDynamicConfig:I}=hr(),{configValue:w}=I(pr.accountReconGLAccountsConfig),k=s.useCallback(K=>{m(K),g("link_account_no_microdeposit")},[]),j=s.useCallback(K=>{const N=R.current.accountReconciliationsByAccountID[K]?.paymentAccountId;m(K),g("update_account"),d("update_account",N)},[]),b=s.useCallback(K=>{h(K)},[]),P=s.useRef(u),A=s.useRef(p),R=s.useRef(e);s.useEffect(()=>{P.current=u},[u]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{R.current=e},[e]);const F=s.useCallback(K=>{a(K,P.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),V=s.useCallback((K,N)=>{K!=null&&console.log("Plaid Connection Error",K,N),m(void 0),g(void 0),T(!1)},[]),{open:q,ready:M}=vc({token:S,onSuccess:F,onExit:V});s.useEffect(()=>{(Di(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!v&&p!=null&&C.linkToken===S&&C.fetchStatus.fetchState==="Completed"&&M&&T(!0)},[M,S,C.fetchStatus.fetchState,C.linkToken,p,v]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==S&&$(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,S]),s.useEffect(()=>{v&&q()},[v,q]);const[O,re]=s.useState(void 0),[B,L]=s.useState(void 0),[U,X]=s.useState("assets"),ce=Di("2025-03-31"),ge=1,te="account_reconciliation",J=Ce(),ee=Tt();Jn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const H=!0,_=Array.isArray(w?.[i])?w[i]:[],ne=e.accountReconciliationBySectionID.assets.accountIDs.filter(K=>!_.includes(K)).length,W=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Z=Mp(ne,W),ie=s.useCallback(K=>{const N=K.scrollTop>=Z?"liabilities":"assets";N!==U&&X(N)},[Z,U]);return s.useEffect(()=>{const K={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:ce,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:k,onReconnectClicked:j,onOpenDrawerClicked:b,onStatementAddClicked:c}};if(O==null||!gr(B,e)){const N=Op(e,K,w,i,H,U);L(e),re(N)}else{const N=zp(O,e,K,H,U);re(N)}},[e,U]),e.fetchStatus.fetchState==="Error"?t.jsx(Pp,{children:t.jsx(Sc,{onReload:l,message:_p.errorMessage.somethingWentWrong})}):t.jsx(Fp,{windowSize:J,children:O!=null?t.jsx(Bp,{windowSize:J,children:t.jsx(Pr,{backgroundColor:new Ho(ee.colors.grey4),rootNodes:O,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:H,isStickyName:H},treeNodePadding:{left:Oo.contentPaddingLeft.value(J),right:Oo.contentPaddingRight.value(J)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:ie})}):null})}function Np({currentFooterFormId:e,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:h,onReconTabColumnSortConfigChanged:d,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:u,onReloadReconciliationListPage:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:C,onSaveReconciliation:S,onSaveReconciliationReview:$,setOpenDrawerClicked:v,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Vp,{companyId:h,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:v,onAddStatementClick:y}):t.jsx(Ip,{currentFooterFormId:e,setCurrentFooterFormId:u,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:C,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:T})}function Up({accountAndClassReport:e,numOfBalances:i,title:l,isLastNode:r,isFirstNode:h,config:d,parentNodeIDs:a,ancestorMetadata:c}){let u="";return e.accountBase&&e.classBase?u=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?u=e.accountBase.accountId:e.classBase&&(u=e.classBase.classId),{children:[],id:Mt("flux_vendor_account_class_row",a,u),isLastNode:r,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:c,numOfBalances:i},config:d}}}function Wp({config:e,isLastNode:i,numOfBalances:l,parentNodeIDs:r,title:h,vendorRowIndex:d,vendorView:a}){const c=Mt("flux_vendor_row",r,a.vendor.id),u={children:[],id:c,isLastNode:i,reportElementData:{element:{kind:"flux_vendor_row",title:h,data:a,numOfBalances:l,index:d},config:e}},m=a.vendorAccountsAndClasses;return u.children=m.map((p,g)=>Up({accountAndClassReport:p,numOfBalances:l,title:p.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,c],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:p.accountBase?.accountName},isVendorLastChild:i,vendorId:a.vendor.id}})),u}function Hp({section:e,numOfBalances:i,title:l,isLastNode:r,config:h,vendorIndexOffset:d}){const a=e.sectionId,c={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:i,sectionType:e.sectionId},config:h}},u=(e.vendors??[]).map((m,p)=>Wp({config:h,isLastNode:p===e.vendors.length-1,numOfBalances:i,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:d+p,vendorView:m}));return c.children.push(...u),c}function qp({title:e,balances:i,config:l,nodeId:r}){return{children:[],id:r??Mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:i,numOfBalances:i.length},config:l}}}function Kp({title:e,data:i,isLastNode:l,config:r,numOfBalances:h}){const d=Mt("total",[],e);return{children:[],id:d,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:h},config:r}}}const{common:yi,expenseAutomation:{fluxAnalysis:Jp}}=me.getLocalizedStrings(),Qp=(e,i,l=!0)=>{const r=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,h=e.sections.generalExpense.balancesByMonth?Tn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Tn(e.sections.reimbursement.balancesByMonth):[],d=Fr({balances:h,config:i}),a=[],c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,u=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(c===!0)a.push(qp({title:`${yi.loading}`,balances:h,config:i})),[...Array(10)].forEach((m,p)=>{a.push(Cs({title:`${p}+${yi.loading}`,balances:h,config:i}))});else{a.push(d);const m=["generalExpense","reimbursement"];let p=0;if(m.forEach(g=>{const x=e.sections[g];if(x.vendors.length>0||x.fetchStatus.fetchState==="Completed"){const y=Tn(x.balancesByMonth);a.push(Hp({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:x.vendors,varianceAmount:x.varianceAmount,variancePercentage:x.variancePercentage,currency:e.currency},numOfBalances:r,title:Gp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Tn(e.totalBalancesAndVariance.balancesByMonth):[],x=Kp({title:yi.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:i,isLastNode:!0,numOfBalances:r});a.push(x)}u===!0&&[...Array(1)].forEach((g,x)=>{a.push(Cs({title:`${x}+${yi.loading}`,balances:h,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Gp=e=>Jp.sectionTitle[e];function Yp(e,i,l,r=!0){Object.assign(e.config,i);const h=Zp(l),d=Fr({balances:h,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const Zp=e=>e.sections.generalExpense.balancesByMonth?Tn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Tn(e.sections.reimbursement.balancesByMonth):[],zo={contentPaddingLeft:new Q(f[0],f[0],f[0]),contentPaddingRight:new Q(f[3],f[3],f[8]),wrapperPadding:new Q(f[3],f[3],f[8])},Xp=o.div`
772
772
  display: flex;
773
773
  position: sticky;
774
774
  width: 100%;
@@ -779,10 +779,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
779
779
  `,em=o.div`
780
780
  width: 100%;
781
781
  height: calc(100vh - ${n.sp11});
782
- `,tm=e=>{const{fluxView:i,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:d,updateNodeCollapsableStatus:a,fetchReimbursementView:c,fetchGeneralExpenseView:u}=e,m=Ce(),p=Tt(),[g,x]=s.useState(null),[y,C]=s.useState(null),[S,$]=s.useState(null),v=bs([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,[T,I]=s.useState(!1),w=gs(v),k=gs(i.refreshStatus.fetchState),j=s.useRef(!1),[b,z]=s.useState(!1),A=s.useRef(B=>{B&&!j.current&&(j.current=!0,z(!0))});Gn({componentName:"expense_automation.flux_analysis",enabled:b});const R=()=>{i.uiState.collapsableStatus.generalExpense?i.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&i.sections.generalExpense.fetchStatus.fetchState==="Completed"?u(i.uiState.paginationInfoByGroup.generalExpense.pageToken):i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken):i.uiState.collapsableStatus.reimbursement&&i.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&i.sections.reimbursement.fetchStatus.fetchState==="Completed"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken)},F=()=>Object.keys(i.uiState.collapsableStatus).reduce((B,L)=>(B[L]=i.uiState.collapsableStatus[L],B),{}),V=s.useCallback(B=>{const L=!(i.uiState.collapsableStatus[B]??!0);a({...i.uiState.collapsableStatus,[B]:L})},[i.uiState.collapsableStatus,a]),q=s.useCallback((B,L)=>{let U=i.reviewOperatingExpensesIds;const X=[];let ce=i.selectedSectionIds;const ge=i.sections[B].vendors;X.push(...ge.map(K=>K.fluxAnalysisEntityId));let te=zr-U.length;L?(X.forEach(K=>{!U.includes(K)&&te>0&&(U=[...U,K],te--)}),ce=[...ce,B]):(U=U.filter(K=>!X.includes(K)),ce=ce.filter(K=>K!==B)),r(U),h(ce)},[i.reviewOperatingExpensesIds,i.selectedSectionIds,i.sections,r,h]),M=s.useCallback(B=>{const L=i.uiState.collapsableStatus[B]===!1;B==="generalExpense"&&!L&&i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken),V(B)},[i.uiState.collapsableStatus,i.sections.reimbursement.fetchStatus.fetchState,i.uiState.paginationInfoByGroup.reimbursement.pageToken,c,V]),O=i.sections.generalExpense.vendors.length+i.sections.reimbursement.vendors.length,ae=B=>B<O;return s.useEffect(()=>{const B={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:i.uiState.sortOrder,sortKey:i.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:i.reviewOperatingExpensesIds,reviewSectionIds:i.selectedSectionIds,fetchStatus:i.fetchStatus.fetchState,setIsSortApplied:I,onSectionRowClick:M,updateNodeCollapsableStatus:V,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:l,onSectionCheckboxClick:q,onSortOrderChanged:d}};if(g==null||!xr(y,i)){const L=Qp(i,B,!0);C(i),x(L)}else{const L=Yp(g,B,i,!0);x(L)}},[i,y,l,q,M,d,V,r]),t.jsx(Xp,{windowSize:m,children:t.jsx(em,{children:g?t.jsx(nm,{ref:A.current,children:t.jsx(Fr,{backgroundColor:new qo(p.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:zo.contentPaddingLeft.value(m),right:zo.contentPaddingRight.value(m)},nodeOpenStatus:F(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:ae,itemCount:O,loadMoreItems:R},variableNodeHeightTree:{prevFetchState:w??"Not-Started",fetchState:i.fetchStatus.fetchState,isSortApplied:T,setIsSortApplied:I,reducedFetchState:bs([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:k??"Not-Started",refreshFetchState:i.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:S,setHoveredParentId:$}})}):null})})},nm=o.div`
782
+ `,tm=e=>{const{fluxView:i,handleRedirectToVendorDetailPage:l,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:h,onSortOrderChanged:d,updateNodeCollapsableStatus:a,fetchReimbursementView:c,fetchGeneralExpenseView:u}=e,m=Ce(),p=Tt(),[g,x]=s.useState(null),[y,C]=s.useState(null),[S,$]=s.useState(null),v=ws([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,[T,I]=s.useState(!1),w=ms(v),k=ms(i.refreshStatus.fetchState),j=s.useRef(!1),[b,P]=s.useState(!1),A=s.useRef(B=>{B&&!j.current&&(j.current=!0,P(!0))});Jn({componentName:"expense_automation.flux_analysis",enabled:b});const R=()=>{i.uiState.collapsableStatus.generalExpense?i.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&i.sections.generalExpense.fetchStatus.fetchState==="Completed"?u(i.uiState.paginationInfoByGroup.generalExpense.pageToken):i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken):i.uiState.collapsableStatus.reimbursement&&i.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&i.sections.reimbursement.fetchStatus.fetchState==="Completed"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken)},F=()=>Object.keys(i.uiState.collapsableStatus).reduce((B,L)=>(B[L]=i.uiState.collapsableStatus[L],B),{}),V=s.useCallback(B=>{const L=!(i.uiState.collapsableStatus[B]??!0);a({...i.uiState.collapsableStatus,[B]:L})},[i.uiState.collapsableStatus,a]),q=s.useCallback((B,L)=>{let U=i.reviewOperatingExpensesIds;const X=[];let ce=i.selectedSectionIds;const ge=i.sections[B].vendors;X.push(...ge.map(J=>J.fluxAnalysisEntityId));let te=zr-U.length;L?(X.forEach(J=>{!U.includes(J)&&te>0&&(U=[...U,J],te--)}),ce=[...ce,B]):(U=U.filter(J=>!X.includes(J)),ce=ce.filter(J=>J!==B)),r(U),h(ce)},[i.reviewOperatingExpensesIds,i.selectedSectionIds,i.sections,r,h]),M=s.useCallback(B=>{const L=i.uiState.collapsableStatus[B]===!1;B==="generalExpense"&&!L&&i.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&c(i.uiState.paginationInfoByGroup.reimbursement.pageToken),V(B)},[i.uiState.collapsableStatus,i.sections.reimbursement.fetchStatus.fetchState,i.uiState.paginationInfoByGroup.reimbursement.pageToken,c,V]),O=i.sections.generalExpense.vendors.length+i.sections.reimbursement.vendors.length,re=B=>B<O;return s.useEffect(()=>{const B={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:i.uiState.sortOrder,sortKey:i.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:i.reviewOperatingExpensesIds,reviewSectionIds:i.selectedSectionIds,fetchStatus:i.fetchStatus.fetchState,setIsSortApplied:I,onSectionRowClick:M,updateNodeCollapsableStatus:V,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:l,onSectionCheckboxClick:q,onSortOrderChanged:d}};if(g==null||!gr(y,i)){const L=Qp(i,B,!0);C(i),x(L)}else{const L=Yp(g,B,i,!0);x(L)}},[i,y,l,q,M,d,V,r]),t.jsx(Xp,{windowSize:m,children:t.jsx(em,{children:g?t.jsx(nm,{ref:A.current,children:t.jsx(Pr,{backgroundColor:new Ho(p.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:zo.contentPaddingLeft.value(m),right:zo.contentPaddingRight.value(m)},nodeOpenStatus:F(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:re,itemCount:O,loadMoreItems:R},variableNodeHeightTree:{prevFetchState:w??"Not-Started",fetchState:i.fetchStatus.fetchState,isSortApplied:T,setIsSortApplied:I,reducedFetchState:ws([i.sections.generalExpense.fetchStatus,i.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:k??"Not-Started",refreshFetchState:i.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:S,setHoveredParentId:$}})}):null})})},nm=o.div`
783
783
  height: 100%;
784
784
  width: 100%;
785
- `,im="expenseAutomationFluxPage",{reports:{common:om}}=me.getLocalizedStrings(),sm=({selectedPeriod:e,fluxAnalysis:i,onFetchFluxViewList:l,markAsReview:r,onReloadPage:h,setCurrentFooterFormId:d,updateOperatingExpensesIdsForReview:a,updateSectionIdsForReview:c,onUpdateFluxAnalysisUIState:u,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:p,onFetchReimbursementView:g})=>{const{fetchStatus:x,reviewOperatingExpensesIds:y,uiState:C}=i,S=s.useRef(null),$=s.useRef(!1),v=xn({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:am(y)}),T=Ce();s.useEffect(()=>()=>{d("expenseAutomationPage")},[d]),s.useEffect(()=>{$.current&&S?.current?.scrollLeft!=null&&C.scrollPosition?.scrollLeft!==S.current.scrollLeft&&C.scrollPosition!=null&&u({scrollPosition:{scrollTop:C.scrollPosition?.scrollTop,scrollLeft:S.current.scrollLeft}})},[C.scrollPosition?.scrollLeft,S.current?.scrollLeft,C.scrollPosition,u]),s.useEffect(()=>{d(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,d]);const I=b=>{m(b)},w=b=>{p(e,b)},k=(b,z)=>{u({sortOrder:b,sortKey:z}),l(),g(e,null,!1)},j=()=>{const b=Zr(i.sections,y);r(y,b===!0?"review":"unreview",e,!0)};if(x.fetchState==="Error")return t.jsxs(lm,{children:[t.jsx(cm,{onClick:h,children:t.jsx(No,{})}),t.jsx(dm,{children:om.failed})]});{const b=A=>{u({collapsableStatus:A})},z=A=>{g(e,A,!0)};return t.jsx(fn,{...v,children:t.jsx("form",{id:Xl(im),onSubmit:v.handleSubmit(j),style:{height:"100%",width:"100%"},children:t.jsx(rm,{windowSize:T,children:t.jsx(tm,{fluxView:i,handleRedirectToVendorDetailPage:I,onSortOrderChanged:k,updateOperatingExpensesIdsForReview:a,updateNodeCollapsableStatus:b,fetchReimbursementView:z,updateSectionIdsForReview:c,fetchGeneralExpenseView:w,reportId:"flux_analysis_operating_expense"})})})})}},Zr=(e,i)=>{const l=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let r;return l.forEach(h=>{i.includes(h.fluxAnalysisEntityId)&&(r=!0)}),r},am=e=>({fluxAnalysisRowIds:e}),rm=o.div`
785
+ `,im="expenseAutomationFluxPage",{reports:{common:om}}=me.getLocalizedStrings(),sm=({selectedPeriod:e,fluxAnalysis:i,onFetchFluxViewList:l,markAsReview:r,onReloadPage:h,setCurrentFooterFormId:d,updateOperatingExpensesIdsForReview:a,updateSectionIdsForReview:c,onUpdateFluxAnalysisUIState:u,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:p,onFetchReimbursementView:g})=>{const{fetchStatus:x,reviewOperatingExpensesIds:y,uiState:C}=i,S=s.useRef(null),$=s.useRef(!1),v=gn({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:am(y)}),T=Ce();s.useEffect(()=>()=>{d("expenseAutomationPage")},[d]),s.useEffect(()=>{$.current&&S?.current?.scrollLeft!=null&&C.scrollPosition?.scrollLeft!==S.current.scrollLeft&&C.scrollPosition!=null&&u({scrollPosition:{scrollTop:C.scrollPosition?.scrollTop,scrollLeft:S.current.scrollLeft}})},[C.scrollPosition?.scrollLeft,S.current?.scrollLeft,C.scrollPosition,u]),s.useEffect(()=>{d(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,d]);const I=b=>{m(b)},w=b=>{p(e,b)},k=(b,P)=>{u({sortOrder:b,sortKey:P}),l(),g(e,null,!1)},j=()=>{const b=Yr(i.sections,y);r(y,b===!0?"review":"unreview",e,!0)};if(x.fetchState==="Error")return t.jsxs(lm,{children:[t.jsx(cm,{onClick:h,children:t.jsx(Vo,{})}),t.jsx(dm,{children:om.failed})]});{const b=A=>{u({collapsableStatus:A})},P=A=>{g(e,A,!0)};return t.jsx(xn,{...v,children:t.jsx("form",{id:Zl(im),onSubmit:v.handleSubmit(j),style:{height:"100%",width:"100%"},children:t.jsx(rm,{windowSize:T,children:t.jsx(tm,{fluxView:i,handleRedirectToVendorDetailPage:I,onSortOrderChanged:k,updateOperatingExpensesIdsForReview:a,updateNodeCollapsableStatus:b,fetchReimbursementView:P,updateSectionIdsForReview:c,fetchGeneralExpenseView:w,reportId:"flux_analysis_operating_expense"})})})})}},Yr=(e,i)=>{const l=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let r;return l.forEach(h=>{i.includes(h.fluxAnalysisEntityId)&&(r=!0)}),r},am=e=>({fluxAnalysisRowIds:e}),rm=o.div`
786
786
  display: flex;
787
787
  flex: 1 1 auto;
788
788
  min-height: 100%;
@@ -831,10 +831,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
831
831
  color: ${e=>e.theme.colors.primary};
832
832
  }
833
833
  }
834
- `,dm=o(ot)`
834
+ `,dm=o(st)`
835
835
  margin-top: ${n.sp3};
836
836
  color: ${e=>e.theme.colors.hero};
837
- `,um="expenseAutomationJEAccountSettingsPage",Xr="vendorsAccountSection",hm=e=>`${e}_form`;function pm({accountSettings:e,currentFooterFormId:i,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:d,setCurrentFooterFormId:a}){const c=e.prepaidExpensesRecommendations,u=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,p=s.useMemo(()=>Jt(e.prepaidExpensesAccountHierarchy,c,"Accounts"),[e.prepaidExpensesAccountHierarchy,c]),g=s.useMemo(()=>Jt(e.fixedAssetsAccountHierarchy,u,"Accounts"),[e.fixedAssetsAccountHierarchy,u]),x=s.useMemo(()=>Jt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>gm(e,p,g,x),[e,p,g,x]),C=xn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=C.handleSubmit(v=>{l(v)}),$=async v=>{h(v)};return s.useEffect(()=>{const v=C.watch(T=>{T!=null&&Yn(()=>$(T))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(d(()=>C.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:v,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:k,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,b=Hi(v,T)||Hi(I,w)||Hi(k,j);b===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):b===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(mm,{children:t.jsx(fn,{...C,children:t.jsx("form",{id:hm(um),onSubmit:S,children:t.jsx(Cd,{showTitle:!1,sectionId:Xr,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 mm=o.div`
837
+ `,um="expenseAutomationJEAccountSettingsPage",Zr="vendorsAccountSection",hm=e=>`${e}_form`;function pm({accountSettings:e,currentFooterFormId:i,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:h,setResetJeAccountSettingsForm:d,setCurrentFooterFormId:a}){const c=e.prepaidExpensesRecommendations,u=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,p=s.useMemo(()=>Kt(e.prepaidExpensesAccountHierarchy,c,"Accounts"),[e.prepaidExpensesAccountHierarchy,c]),g=s.useMemo(()=>Kt(e.fixedAssetsAccountHierarchy,u,"Accounts"),[e.fixedAssetsAccountHierarchy,u]),x=s.useMemo(()=>Kt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>gm(e,p,g,x),[e,p,g,x]),C=gn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=C.handleSubmit(v=>{l(v)}),$=async v=>{h(v)};return s.useEffect(()=>{const v=C.watch(T=>{T!=null&&Qn(()=>$(T))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(d(()=>C.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:v,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:k,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,b=Wi(v,T)||Wi(I,w)||Wi(k,j);b===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):b===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(mm,{children:t.jsx(xn,{...C,children:t.jsx("form",{id:hm(um),onSubmit:S,children:t.jsx(Cd,{showTitle:!1,sectionId:Zr,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 mm=o.div`
838
838
  padding-top: ${n.sp3};
839
839
  display: flex;
840
840
  align-items: center;
@@ -842,38 +842,38 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
842
842
  flex-direction: column;
843
843
  width: 100%;
844
844
  background-color: ${e=>e.theme.colors.grey4};
845
- `,gm=(e,i,l,r)=>{const h=e.prepaidExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(p.accountId)),d=e.fixedAssetsAccountList.filter(p=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(p.accountId)),a=e.accruedExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(p.accountId)),c=h.map(p=>p.qboId).filter(p=>p!=null),u=d.map(p=>p.qboId).filter(p=>p!=null),m=a.map(p=>p.qboId).filter(p=>p!=null);return{[Xr]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:u,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:xm,ignore:fm,strings:{hyphen:zt},texts:bi},dateFormat:ym,timeframe:{month:Us}}=me.getLocalizedStrings(),wm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:h})=>t.jsxs(ns,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(Sr,{photoUrl:e.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Kt,{name:e.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(at,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.vendor.name??zt})})]})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Nt.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(at,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.baseTransaction.account.accountName??zt})})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(ym.visual.MMMCommaYYYYFormat)??zt})})]}),t.jsxs(re,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Us.slice(0,-1):Us}`:zt})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:bi.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??zt}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??zt})})})]})]}),t.jsxs(es,{children:[t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.category}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(at,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.account?.accountName??zt})})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:bi.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.accountingClass?.className??zt})})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.type}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(re,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.accumulatedCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(at,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeCredit.account?.accountName??zt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(is,{children:[t.jsx(Wn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&h(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component-review-button",e.jeScheduleId),label:xm,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Mo}}),t.jsx(Wn,{"data-testid":D("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:fm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Mo}})]})]}),t.jsxs(Vh,{children:[t.jsx(bm,{}),t.jsx(Cm,{children:Nt.aiAccountant}),t.jsx(vm,{children:Nt.zeniGPTText})]})]}),bm=o(Qt)`
845
+ `,gm=(e,i,l,r)=>{const h=e.prepaidExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(p.accountId)),d=e.fixedAssetsAccountList.filter(p=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(p.accountId)),a=e.accruedExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(p.accountId)),c=h.map(p=>p.qboId).filter(p=>p!=null),u=d.map(p=>p.qboId).filter(p=>p!=null),m=a.map(p=>p.qboId).filter(p=>p!=null);return{[Zr]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:u,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:xm,ignore:fm,strings:{hyphen:Pt},texts:bi},dateFormat:ym,timeframe:{month:Ns}}=me.getLocalizedStrings(),wm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:h})=>t.jsxs(ts,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(vr,{photoUrl:e.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:e.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(rt,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.vendor.name??Pt})})]})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:Nt.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(rt,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.baseTransaction.account.accountName??Pt})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(ym.visual.MMMCommaYYYYFormat)??Pt})})]}),t.jsxs(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Ns.slice(0,-1):Ns}`:Pt})})]}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:bi.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(rt,{children:it("0,0.[00]",ln(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt})})})]})]}),t.jsxs(Xo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:bi.category}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(rt,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.account?.accountName??Pt})})})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:bi.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(rt,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.accountingClass?.className??Pt})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.type}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Ur,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.accumulatedCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(rt,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeCredit.account?.accountName??Pt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(ae,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(ns,{children:[t.jsx(Un,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&h(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":D("je-schedule-draft-component-review-button",e.jeScheduleId),label:xm,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Do}}),t.jsx(Un,{"data-testid":D("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:fm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Do}})]})]}),t.jsxs(Vh,{children:[t.jsx(bm,{}),t.jsx(Cm,{children:Nt.aiAccountant}),t.jsx(vm,{children:Nt.zeniGPTText})]})]}),bm=o(Qt)`
846
846
  height: ${n.sp3};
847
847
  width: ${n.sp3};
848
848
  margin-right: ${n.sp1};
849
849
  path {
850
850
  stroke-width: 2;
851
851
  }
852
- `,Cm=o(fr)`
852
+ `,Cm=o(xr)`
853
853
  color: ${e=>e.theme.colors.brandColorSapphire};
854
854
  `,vm=o(Re)`
855
855
  color: ${e=>e.theme.colors.primary};
856
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Hs}}},expenseAutomation:{jeSchedules:Ke},common:{currency:Rt,retry:Sm,strings:{hyphen:st,empty:Ws},texts:kn},dateFormat:qs}=me.getLocalizedStrings(),{common:km,timeframe:{month:Js}}=me.getLocalizedStrings(),gt="jeSchedulePage",Ks=e=>`${e}_form`,ss=(e,i)=>`${e}.${i}`,Qs=ss(gt,"vendor"),Gs=ss(gt,"scheduleExpenseCategory"),Ys=ss(gt,"accumulatedDepreciationCategory"),jm=({allAccountGroupedOptions:e,allAccountList:i,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:h,allDepAccountList:d,draft:a,localData:c,postStatus:u,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:x,onFormDataChange:y,onPostJESchedule:C})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:$,updatedVendor:v}=c,T={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"},I=s.useRef(),w=xn({mode:"all",reValidateMode:"onChange",defaultValues:Zs(c,e,l,h,i,r,d,g.entityAutoCompleteView),values:Zs(c,e,l,h,i,r,d,g.entityAutoCompleteView)}),k={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:300})},j={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:350})},b=(a?.scheduledJournalEntry.error??[]).every(_=>{const ne=T[_];return!(c!=null&&ne&&(ne==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||ne==="updatedCategoryId"&&c.updatedCategoryId==null||ne==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),z=async(_,ne)=>{if(_!=null){const H=ne[gt],{scheduledJournalEntryID:Z,vendor:oe}=H;if(_.includes("vendor")){const J=oe?.defaultOptions.map(N=>N.value);if(oe?.selectedOption!=null&&J?.includes(oe.selectedOption)!==!0){const N=g.entityAutoCompleteView.vendor.find(P=>P.id===oe.selectedOption);N!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:N.name??km.strings.empty,value:N.id}])}else oe?.selectedOption==null&&oe?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Z,{...H,vendor:oe})}};s.useEffect(()=>{const _=w.watch((ne,{name:H})=>{H!=null&&ne!=null&&Yn(()=>z(H,ne))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(kr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{C(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),R=_=>i.filter(ne=>ne.qboId===_)[0]?.qboId,F=_=>d.filter(ne=>ne.qboId===_)[0]?.qboId,V=_=>[m.expense?.qboId,m.income?.qboId].includes(_),q=w.watch("jeSchedulePage.vendor"),M=(_,ne)=>{p.onAutoCompleteInputChange?.(_,"vendor"),I.current=ne},O=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ae=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,B=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,L=a.vendor.name.split("(deleted)")[0]?.toString(),U=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Ws,X=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Ws,[ce,ge]=s.useState(ae===!0&&$==null),[te,K]=s.useState(B===!0&&S==null),[ee,W]=s.useState(O&&(v?.id==null||v?.id==""));return s.useEffect(()=>{ce===!1&&c.updatedCategoryId==null&&w.setFocus(Gs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Ys),ee===!1&&c.updatedVendor?.id==null&&w.setFocus(Qs)},[ce,te,ee,c,w]),t.jsx(fn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Ks(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(ns,{showBorder:b,onClick:_=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(_,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":D("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[O===!0?t.jsx(re,{style:{width:be.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:O,forceHoverEffect:ee===!1&&(c?.updatedVendor?.id==null||c?.updatedVendor?.id==""),children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.vendor,t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Ke.tooltipText.missingVendor.replace("_deleted_vendor_",L)}),children:t.jsx(Xi,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),W(!1)},"data-testid":D("je-schedule-resolve-component-add-vendor-button",`${gt}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:f[2],color:he.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zi,{}),Hs]}):t.jsx(Ro,{name:Qs,placeholder:Hs,valueToId:_=>_,defaultValue:{selectedOption:q?.selectedOption,defaultOptions:q?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:_=>!!_.selectedOption},loadOptions:M})})})]})}):t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp0} ${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:kn.vendor}),t.jsx(pe,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(Sr,{photoUrl:a.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Kt,{name:a.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(at,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.vendor.name??st})})]})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Ke.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(at,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.baseTransaction.account.accountName??st})})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Ke.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(qs.visual.MMMCommaYYYYFormat)??st})})]}),t.jsxs(re,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Ke.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?Js.slice(0,-1):Js}`:st})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:kn.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:t.jsx(at,{children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st})})})]})]}),t.jsxs(es,{children:[ae===!0?t.jsx(re,{showHoverEffect:ae===!0,forceHoverEffect:c?.updatedCategoryId==null&&ce===!1,style:{padding:"unset",justifyContent:"center",width:be.COLUMN_ONE},children:t.jsxs(Et,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.category,ae===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Ke.tooltipText.missingCategory.replace("_deleted_category_",U)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:ae===!0?-2:0},children:ae===!0?t.jsx(t.Fragment,{children:ce===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Ke.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,name:Gs,placeholder:Ke.addCategory,valueToId:_=>R(_),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:_=>!!_.selectedOption},disableCurrentOption:V,customStyleConfig:k})}):t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]}),t.jsxs(re,{children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.accountingClass?.className??st})})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Ke.scheduleHeaders.type}),t.jsx(pe,{className:"test",children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Ke.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:B===!0?t.jsx(re,{style:{width:be.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:B,forceHoverEffect:c.updatedAccumulatedDepreciationCategoryID==null&&te===!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:f[2],paddingLeft:f[3]},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Ke.scheduleHeaders.accumulatedCategory,B===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ti,{children:Ke.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:B===!0?-2:0},children:B===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),K(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Ke.addDepCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ys,placeholder:Ke.addDepCategory,valueToId:_=>F(_),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:_=>!!_.selectedOption},customStyleConfig:j,disableCurrentOption:V})}):t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:be.COLUMN_FOUR,padding:`${n.sp2} ${n.sp2} ${n.sp2} ${n.sp3}`,justifyContent:"center"},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Ke.scheduleHeaders.accumulatedCategory}),t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:be.COLUMN_FIVE}})]}),t.jsxs(Bh,{children:[t.jsx(re,{style:{padding:"unset",width:be.COLUMN_ONE},children:t.jsxs(_h,{children:[t.jsx(ue,{children:Ke.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(qs.visual.MMMDCommaYYFormat)??st})})]})}),t.jsxs(re,{children:[t.jsx(ue,{children:Ke.scheduleHeaders.balance}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Ke.scheduleHeaders.months}),t.jsx(pe,{children:t.jsxs(we,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(re,{style:{width:be.COLUMN_FOUR}}),t.jsxs(re,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:Ke.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.scheduledJournalEntry.amount?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})]})]})]}),t.jsx(is,{children:t.jsx(Wn,{form:Ks(`${gt}_${a.jeScheduleId}`),label:Sm,variant:"primary",className:"item-value-container",type:"submit",loading:u?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:Mo}})})]})})})})},Zs=(e,i,l,r,h,d,a,c)=>{const u=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find($=>$.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=u!=null?h.find($=>$.accountId===u):void 0,C=g!=null?a.find($=>$.accountId===g):void 0,S=x!=null?d.find($=>$.classId===x):void 0;return{[gt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:i},accumulatedDepreciationCategory:{selectedOption:C?.qboId,allOptions:r},vendor:{selectedOption:p?.id??m?.id,defaultOptions:Lr(c,p??m)},scheduleClass:{selectedOption:S?.classId,allOptions:l}}}},Zi=o(Fi)`
856
+ `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Us}}},expenseAutomation:{jeSchedules:Je},common:{currency:At,retry:Sm,strings:{hyphen:at,empty:Ws},texts:Sn},dateFormat:Hs}=me.getLocalizedStrings(),{common:km,timeframe:{month:qs}}=me.getLocalizedStrings(),gt="jeSchedulePage",Ks=e=>`${e}_form`,os=(e,i)=>`${e}.${i}`,Js=os(gt,"vendor"),Qs=os(gt,"scheduleExpenseCategory"),Gs=os(gt,"accumulatedDepreciationCategory"),jm=({allAccountGroupedOptions:e,allAccountList:i,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:h,allDepAccountList:d,draft:a,localData:c,postStatus:u,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:x,onFormDataChange:y,onPostJESchedule:C})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:$,updatedVendor:v}=c,T={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"},I=s.useRef(),w=gn({mode:"all",reValidateMode:"onChange",defaultValues:Ys(c,e,l,h,i,r,d,g.entityAutoCompleteView),values:Ys(c,e,l,h,i,r,d,g.entityAutoCompleteView)}),k={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:300})},j={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:350})},b=(a?.scheduledJournalEntry.error??[]).every(_=>{const ne=T[_];return!(c!=null&&ne&&(ne==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||ne==="updatedCategoryId"&&c.updatedCategoryId==null||ne==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),P=async(_,ne)=>{if(_!=null){const W=ne[gt],{scheduledJournalEntryID:Z,vendor:ie}=W;if(_.includes("vendor")){const K=ie?.defaultOptions.map(N=>N.value);if(ie?.selectedOption!=null&&K?.includes(ie.selectedOption)!==!0){const N=g.entityAutoCompleteView.vendor.find(z=>z.id===ie.selectedOption);N!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:N.name??km.strings.empty,value:N.id}])}else ie?.selectedOption==null&&ie?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Z,{...W,vendor:ie})}};s.useEffect(()=>{const _=w.watch((ne,{name:W})=>{W!=null&&ne!=null&&Qn(()=>P(W,ne))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(Sr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{C(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),R=_=>i.filter(ne=>ne.qboId===_)[0]?.qboId,F=_=>d.filter(ne=>ne.qboId===_)[0]?.qboId,V=_=>[m.expense?.qboId,m.income?.qboId].includes(_),q=w.watch("jeSchedulePage.vendor"),M=(_,ne)=>{p.onAutoCompleteInputChange?.(_,"vendor"),I.current=ne},O=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,re=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,B=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,L=a.vendor.name.split("(deleted)")[0]?.toString(),U=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Ws,X=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Ws,[ce,ge]=s.useState(re===!0&&$==null),[te,J]=s.useState(B===!0&&S==null),[ee,H]=s.useState(O&&(v?.id==null||v?.id==""));return s.useEffect(()=>{ce===!1&&c.updatedCategoryId==null&&w.setFocus(Qs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Gs),ee===!1&&c.updatedVendor?.id==null&&w.setFocus(Js)},[ce,te,ee,c,w]),t.jsx(xn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Ks(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(ts,{showBorder:b,onClick:_=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(_,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":D("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[O===!0?t.jsx(ae,{style:{width:be.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:O,forceHoverEffect:ee===!1&&(c?.updatedVendor?.id==null||c?.updatedVendor?.id==""),children:t.jsxs(Rt,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Sn.vendor,t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingVendor.replace("_deleted_vendor_",L)}),children:t.jsx(Zi,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),H(!1)},"data-testid":D("je-schedule-resolve-component-add-vendor-button",`${gt}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:f[2],color:he.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Yi,{}),Us]}):t.jsx(Ao,{name:Js,placeholder:Us,valueToId:_=>_,defaultValue:{selectedOption:q?.selectedOption,defaultOptions:q?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:_=>!!_.selectedOption},loadOptions:M})})})]})}):t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp0} ${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Sn.vendor}),t.jsx(pe,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(vr,{photoUrl:a.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:a.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(rt,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.vendor.name??at})})]})})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:Je.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(rt,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.baseTransaction.account.accountName??at})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(Hs.visual.MMMCommaYYYYFormat)??at})})]}),t.jsxs(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Je.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?qs.slice(0,-1):qs}`:at})})]}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:Sn.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:t.jsx(rt,{children:it("0,0.[00]",ln(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a.baseTransaction.amount.amount,At.currencyCode,At.currencySymbol))??at})})})]})]}),t.jsxs(Xo,{children:[re===!0?t.jsx(ae,{showHoverEffect:re===!0,forceHoverEffect:c?.updatedCategoryId==null&&ce===!1,style:{padding:"unset",justifyContent:"center",width:be.COLUMN_ONE},children:t.jsxs(Rt,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Sn.category,re===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingCategory.replace("_deleted_category_",U)}),children:t.jsx(Zi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:re===!0?-2:0},children:re===!0?t.jsx(t.Fragment,{children:ce===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Yi,{}),Je.addCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,name:Qs,placeholder:Je.addCategory,valueToId:_=>R(_),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:_=>!!_.selectedOption},disableCurrentOption:V,customStyleConfig:k})}):t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(rt,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??at})})})]})}):t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Sn.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(rt,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??at})})})]}),t.jsxs(ae,{children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Sn.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(rt,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.accountingClass?.className??at})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.type}),t.jsx(pe,{className:"test",children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Ur,{children:Je.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:B===!0?t.jsx(ae,{style:{width:be.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:B,forceHoverEffect:c.updatedAccumulatedDepreciationCategoryID==null&&te===!1,children:t.jsxs(Rt,{className:"hover-background",style:{padding:f[2],paddingLeft:f[3]},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Je.scheduleHeaders.accumulatedCategory,B===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ti,{children:Je.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(Zi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:B===!0?-2:0},children:B===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),J(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":D("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Yi,{}),Je.addDepCategory]}):t.jsx(In,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Gs,placeholder:Je.addDepCategory,valueToId:_=>F(_),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:_=>!!_.selectedOption},customStyleConfig:j,disableCurrentOption:V})}):t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(rt,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??at})})})]})}):t.jsxs(ae,{style:{width:be.COLUMN_FOUR,padding:`${n.sp2} ${n.sp2} ${n.sp2} ${n.sp3}`,justifyContent:"center"},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Je.scheduleHeaders.accumulatedCategory}),t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(rt,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??at})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(ae,{style:{width:be.COLUMN_FOUR}}):null,t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]}),t.jsxs(Bh,{children:[t.jsx(ae,{style:{padding:"unset",width:be.COLUMN_ONE},children:t.jsxs(_h,{children:[t.jsx(ue,{children:Je.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(Hs.visual.MMMDCommaYYFormat)??at})})]})}),t.jsxs(ae,{children:[t.jsx(ue,{children:Je.scheduleHeaders.balance}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(rt,{children:it("0,0.[00]",ln(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at}),children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a?.scheduledJournalEntry?.runningBalance?.amount??0,At.currencyCode,At.currencySymbol))??at})})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.months}),t.jsx(pe,{children:t.jsxs(we,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(ae,{style:{width:be.COLUMN_FOUR}}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:Je.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:it("0,0.[00]",ln(a.scheduledJournalEntry.amount?.amount??0,At.currencyCode,At.currencySymbol))??at})})]})]})]}),t.jsx(ns,{children:t.jsx(Un,{form:Ks(`${gt}_${a.jeScheduleId}`),label:Sm,variant:"primary",className:"item-value-container",type:"submit",loading:u?.fetchState==="In-Progress",size:"small",disabled:!b,style:{minWidth:Do}})})]})})})})},Ys=(e,i,l,r,h,d,a,c)=>{const u=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find($=>$.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=u!=null?h.find($=>$.accountId===u):void 0,C=g!=null?a.find($=>$.accountId===g):void 0,S=x!=null?d.find($=>$.classId===x):void 0;return{[gt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:i},accumulatedDepreciationCategory:{selectedOption:C?.qboId,allOptions:r},vendor:{selectedOption:p?.id??m?.id,defaultOptions:Tr(c,p??m)},scheduleClass:{selectedOption:S?.classId,allOptions:l}}}},Yi=o(Fi)`
857
857
  width: ${n.sp3};
858
858
  height: ${n.sp3};
859
- `,Xi=o(Ar)`
859
+ `,Zi=o(Lr)`
860
860
  width: 12px;
861
861
  height: 12px;
862
862
  color: ${he.important};
863
- `;function el(){return t.jsx(_r,{children:t.jsxs(Vr,{children:[t.jsxs(Nr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Xs,{})]}),t.jsxs(Ur,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Xs,{})]})]})})}const Xs=()=>t.jsx(ns,{style:{minWidth:1088},children:t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[10],height:14})}),t.jsxs(pe,{style:{gap:f[2]},children:[t.jsx(ei,{height:f[4],width:f[4]}),t.jsx(Ue,{height:f[4],width:f[10]})]})]}),t.jsxs(re,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:101,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:203})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[9],height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:71})})]}),t.jsxs(re,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:t.jsx(Ue,{width:107,height:14})}),t.jsx(Ue,{height:f[4],width:68})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:73,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:49})})]})]}),t.jsxs(es,{children:[t.jsxs(re,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:49,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:158})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:88})})]}),t.jsxs(re,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:100})})]}),t.jsx(re,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]}}),t.jsx(re,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(is,{children:[t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}}),t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}})]})]})}),Ue=o(it)`
863
+ `;function Xr(){return t.jsx(Br,{children:t.jsxs(_r,{children:[t.jsxs(Vr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Zs,{})]}),t.jsxs(Nr,{children:[t.jsx(Ue,{width:f[9],height:27,style:{marginBottom:f[2]}}),t.jsx(Zs,{})]})]})})}const Zs=()=>t.jsx(ts,{style:{minWidth:1088},children:t.jsxs(es,{children:[t.jsxs(is,{children:[t.jsxs(Zo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[10],height:14})}),t.jsxs(pe,{style:{gap:f[2]},children:[t.jsx(Zn,{height:f[4],width:f[4]}),t.jsx(Ue,{height:f[4],width:f[10]})]})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:101,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:203})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:f[9],height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:71})})]}),t.jsxs(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:t.jsx(Ue,{width:107,height:14})}),t.jsx(Ue,{height:f[4],width:68})]}),t.jsxs(ae,{style:{alignItems:"flex-end",width:be.COLUMN_FIVE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:73,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:49})})]})]}),t.jsxs(Xo,{children:[t.jsxs(ae,{style:{width:be.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:t.jsx(Ue,{width:49,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:158})})]}),t.jsxs(ae,{children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:88})})]}),t.jsxs(ae,{style:{width:be.COLUMN_THREE},children:[t.jsx(ue,{children:t.jsx(Ue,{width:36,height:14})}),t.jsx(pe,{children:t.jsx(Ue,{height:f[4],width:100})})]}),t.jsx(ae,{style:{width:be.COLUMN_FOUR,paddingLeft:f[3]}}),t.jsx(ae,{style:{width:be.COLUMN_FIVE}})]})]}),t.jsxs(ns,{children:[t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}}),t.jsx(Ue,{height:29,width:53,style:{margin:`${n.sp0} ${n.sp3}`}})]})]})}),Ue=o(ot)`
864
864
  border-radius: ${n.sp1};
865
- `,{common:{create:$m,resolve:Im}}=me.getLocalizedStrings();function Tm({jeSchedules:e,vendorSearchAutoCompleteData:i,handleJeScheduleClick:l,onJESchedulesFormDataChange:r,onPostJESchedule:h,ignoreRecommendedJeSchedule:d,vendorSearchAutoCompleteActions:a,setCurrentFooterFormId:c}){const u=e.draftSchedules,m=e.jeScheduleLocalDataById,p=e.postStatusById,g=e.ignoreStatusById,x=s.useRef(!1),[y,C]=s.useState(!1),S=s.useRef(R=>{R&&!x.current&&(x.current=!0,C(!0))});Gn({componentName:"expense_automation.je_schedules",enabled:y});const $=e.resolveSchedules,v=e.uncategorizedAccounts,{allAccountList:T,allClassList:I,allDepreciationAccountList:w}=e,k=Jt(e.accountListNestedAccountHierarchy),j=Jt(e.allDepreciationAccountListNestedAccountHierarchy),b=$i(e.classListNestedAccountHierarchy),z=(R,F,V)=>{l(R,F,V)},A=(R,F,V,q)=>{let M=R.target;for(;M;){if(M.classList.contains("item-value-container")||M.classList.contains("hover-background")||M.classList.contains("auto-complete-single-select-field__input")||M.classList.contains("auto-complete-single-select-field__option")||M.classList.contains("grouped-single-select-field__input")||M.classList.contains("grouped-single-select-field__menu"))return;M=M.parentElement}l(F,V,q)};return s.useEffect(()=>{if($.length!==0){for(const R in m)if(Object.prototype.hasOwnProperty.call(m,R)){const{updatedAccumulatedDepreciationCategoryID:F,updatedCategoryId:V,updatedVendor:q}=m[R];if(F!=null||V!=null||q!=null&&q?.id!==""){c("expenseAutomationJESchedulePage");break}else c("expenseAutomationPage")}}else $.length===0&&c("expenseAutomationPage")}),s.useEffect(()=>()=>{c("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(el,{}):u.length!==0||$.length!==0?t.jsx(_r,{children:t.jsxs(Vr,{children:[u.length>0?t.jsxs(Nr,{children:[t.jsxs(na,{children:[$m,t.jsx(ia,{isCircular:u.length<10,children:t.jsx(oa,{children:u.length})})]}),t.jsx(ea,{"data-testid":D("expense-automation","draft-je-schedules"),children:u.map((R,F)=>t.jsx(ta,{ref:S.current,children:t.jsx(wm,{ignoreStatus:g[R.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:d,onReviewClickHandler:z,jeScheduleClickHandler:A,draft:R})},`${F}_${R.jeScheduleId}`))})]}):null,$.length>0?t.jsxs(Ur,{children:[t.jsxs(na,{children:[Im,t.jsx(ia,{isCircular:$.length<10,children:t.jsx(oa,{children:$.length})})]}),t.jsx(ea,{"data-testid":D("expense-automation","resolve-je-schedules"),children:$.map((R,F)=>m[R.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(ta,{ref:S.current,children:t.jsx(jm,{vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:i,jeScheduleClickHandler:A,onPostJESchedule:h,uncategorizedAccounts:v,allAccountList:T,allAccountGroupedOptions:k,allClassGroupedOptions:b,allClassList:I,allDepAccountGroupedOptions:j,allDepAccountList:w,draft:R,postStatus:p[R.scheduledJournalEntry.scheduledJournalEntryID],localData:m[R.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r})},`${F}_${R.jeScheduleTransactionKey}`))})]}):null]})}):null}const ea=o.div`
865
+ `,{common:{create:$m,resolve:Im}}=me.getLocalizedStrings();function Tm({jeSchedules:e,vendorSearchAutoCompleteData:i,handleJeScheduleClick:l,onJESchedulesFormDataChange:r,onPostJESchedule:h,ignoreRecommendedJeSchedule:d,vendorSearchAutoCompleteActions:a,setCurrentFooterFormId:c}){const u=e.draftSchedules,m=e.jeScheduleLocalDataById,p=e.postStatusById,g=e.ignoreStatusById,x=s.useRef(!1),[y,C]=s.useState(!1),S=s.useRef(R=>{R&&!x.current&&(x.current=!0,C(!0))});Jn({componentName:"expense_automation.je_schedules",enabled:y});const $=e.resolveSchedules,v=e.uncategorizedAccounts,{allAccountList:T,allClassList:I,allDepreciationAccountList:w}=e,k=Kt(e.accountListNestedAccountHierarchy),j=Kt(e.allDepreciationAccountListNestedAccountHierarchy),b=$i(e.classListNestedAccountHierarchy),P=(R,F,V)=>{l(R,F,V)},A=(R,F,V,q)=>{let M=R.target;for(;M;){if(M.classList.contains("item-value-container")||M.classList.contains("hover-background")||M.classList.contains("auto-complete-single-select-field__input")||M.classList.contains("auto-complete-single-select-field__option")||M.classList.contains("grouped-single-select-field__input")||M.classList.contains("grouped-single-select-field__menu"))return;M=M.parentElement}l(F,V,q)};return s.useEffect(()=>{if($.length!==0){for(const R in m)if(Object.prototype.hasOwnProperty.call(m,R)){const{updatedAccumulatedDepreciationCategoryID:F,updatedCategoryId:V,updatedVendor:q}=m[R];if(F!=null||V!=null||q!=null&&q?.id!==""){c("expenseAutomationJESchedulePage");break}else c("expenseAutomationPage")}}else $.length===0&&c("expenseAutomationPage")}),s.useEffect(()=>()=>{c("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Xr,{}):u.length!==0||$.length!==0?t.jsx(Br,{children:t.jsxs(_r,{children:[u.length>0?t.jsxs(Vr,{children:[t.jsxs(ta,{children:[$m,t.jsx(na,{isCircular:u.length<10,children:t.jsx(ia,{children:u.length})})]}),t.jsx(Xs,{"data-testid":D("expense-automation","draft-je-schedules"),children:u.map((R,F)=>t.jsx(ea,{ref:S.current,children:t.jsx(wm,{ignoreStatus:g[R.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:d,onReviewClickHandler:P,jeScheduleClickHandler:A,draft:R})},`${F}_${R.jeScheduleId}`))})]}):null,$.length>0?t.jsxs(Nr,{children:[t.jsxs(ta,{children:[Im,t.jsx(na,{isCircular:$.length<10,children:t.jsx(ia,{children:$.length})})]}),t.jsx(Xs,{"data-testid":D("expense-automation","resolve-je-schedules"),children:$.map((R,F)=>m[R.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(ea,{ref:S.current,children:t.jsx(jm,{vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:i,jeScheduleClickHandler:A,onPostJESchedule:h,uncategorizedAccounts:v,allAccountList:T,allAccountGroupedOptions:k,allClassGroupedOptions:b,allClassList:I,allDepAccountGroupedOptions:j,allDepAccountList:w,draft:R,postStatus:p[R.scheduledJournalEntry.scheduledJournalEntryID],localData:m[R.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r})},`${F}_${R.jeScheduleTransactionKey}`))})]}):null]})}):null}const Xs=o.div`
866
866
  display: flex;
867
867
  flex-direction: column;
868
868
  gap: ${n.sp4};
869
869
  min-width: 1088px;
870
- `,ta=o.div``,na=o(Qn)`
870
+ `,ea=o.div``,ta=o(Kn)`
871
871
  color: ${e=>e.theme.colors.primary};
872
872
  padding: ${n.sp2} ${n.sp0};
873
873
  display: flex;
874
874
  align-items: center;
875
875
  gap: ${n.sp1};
876
- `,ia=o.div`
876
+ `,na=o.div`
877
877
  border-radius: ${n.sp12};
878
878
  display: flex;
879
879
  justify-content: center;
@@ -885,9 +885,9 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
885
885
  padding: ${n.sp0};
886
886
  `:le`
887
887
  height: 18px;
888
- padding: ${Fc.padding};
888
+ padding: ${Pc.padding};
889
889
  `}
890
- `,oa=o(Bc)`
890
+ `,ia=o(Fc)`
891
891
  color: ${e=>e.theme.colors.hero};
892
892
  height: 100%;
893
893
  width: 100%;
@@ -895,10 +895,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
895
895
  align-items: center;
896
896
  justify-content: center;
897
897
  color: inherit;
898
- `;function Lm({expenseAutomationViewSelector:e,currentFooterFormId:i,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:h,onPostJESchedule:d,handleJeScheduleClick:a,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:p,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:x}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(el,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(pm,{setIsJeAccountSettingsOpened:x,setResetJeAccountSettingsForm:l,currentFooterFormId:i,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(It,{tab:e.currentSelectedView,title:We(e.currentSelectedView).allDoneText.title,subTitle:We(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Tm,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Am=72,tl=50,Rm=1,Em=["receipts"],sa=e=>Qo(e,Em),{common:{texts:{vendor:Dm,amount:Mm,receipts:Om,category:Pm,classText:zm,date:Fm}}}=me.getLocalizedStrings(),nl={key:"vendor",value:Dm,sortOrder:"ascending",width:new Q(18,18)},Bm={key:"category",value:Pm,sortOrder:"ascending",width:new Q(18,18)},_m={key:"class",value:zm,sortOrder:"ascending",width:new Q(18,18)},Vm={key:"date",value:Fm,sortOrder:"descending",width:new Q(11,11)},Nm={key:"receipts",value:Om,sortOrder:"descending",width:new Q(6,6)},il={key:"amount",value:Mm,sortOrder:"ascending",width:new Q(10,10)},Un=[nl,Bm,_m,Vm,Nm,il],ol=[{...nl,width:new Q(65,65)},{...il,width:new Q(30,30)}],eo={sortKey:"date",sortOrder:"descending"},sl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Ze(),d=h?ol:Un,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,h]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{sa(p.key)==null&&u(yd(p.key),p.sortOrder)};return t.jsx(Um,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||sa(p.key)!=null;return t.jsxs(Hm,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Qm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Gm,{children:p.value}),x?null:t.jsx(qm,{sortConfig:e,headerData:p,children:t.jsx(Km,{})})]}),x?null:t.jsx(Jm,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==eo.sortKey,children:t.jsx(Wm,{onClick:()=>{x||u(eo.sortKey,eo.sortOrder)},"data-testid":D("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Um=o.div`
898
+ `;function Lm({expenseAutomationViewSelector:e,currentFooterFormId:i,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:h,onPostJESchedule:d,handleJeScheduleClick:a,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:p,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:x}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(Xr,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(pm,{setIsJeAccountSettingsOpened:x,setResetJeAccountSettingsForm:l,currentFooterFormId:i,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:u,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(It,{tab:e.currentSelectedView,title:He(e.currentSelectedView).allDoneText.title,subTitle:He(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Tm,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Am=72,el=50,Rm=1,Em=["receipts"],oa=e=>Jo(e,Em),{common:{texts:{vendor:Dm,amount:Mm,receipts:Om,category:zm,classText:Pm,date:Fm}}}=me.getLocalizedStrings(),tl={key:"vendor",value:Dm,sortOrder:"ascending",width:new Q(18,18)},Bm={key:"category",value:zm,sortOrder:"ascending",width:new Q(18,18)},_m={key:"class",value:Pm,sortOrder:"ascending",width:new Q(18,18)},Vm={key:"date",value:Fm,sortOrder:"descending",width:new Q(11,11)},Nm={key:"receipts",value:Om,sortOrder:"descending",width:new Q(6,6)},nl={key:"amount",value:Mm,sortOrder:"ascending",width:new Q(10,10)},Vn=[tl,Bm,_m,Vm,Nm,nl],il=[{...tl,width:new Q(65,65)},{...nl,width:new Q(30,30)}],Xi={sortKey:"date",sortOrder:"descending"},ol=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Xe(),d=h?il:Vn,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,h]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{oa(p.key)==null&&u(yd(p.key),p.sortOrder)};return t.jsx(Um,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||oa(p.key)!=null;return t.jsxs(Wm,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Qm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Gm,{children:p.value}),x?null:t.jsx(qm,{sortConfig:e,headerData:p,children:t.jsx(Jm,{})})]}),x?null:t.jsx(Km,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==Xi.sortKey,children:t.jsx(Hm,{onClick:()=>{x||u(Xi.sortKey,Xi.sortOrder)},"data-testid":D("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Um=o.div`
899
899
  top: ${n.sp0};
900
900
  left: ${n.sp0};
901
- height: ${tl}px;
901
+ height: ${el}px;
902
902
  z-index: 2;
903
903
  display: flex;
904
904
  flex-wrap: nowrap;
@@ -915,7 +915,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
915
915
  `:le`
916
916
  padding: ${n.sp0} ${n.sp3};
917
917
  `}
918
- `,Hm=o.div`
918
+ `,Wm=o.div`
919
919
  color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
920
920
  padding-left: ${n.sp0};
921
921
  left: ${n.sp0};
@@ -945,7 +945,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
945
945
  min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
946
946
  max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
947
947
  `}
948
- `,Wm=o(ni)`
948
+ `,Hm=o(ei)`
949
949
  width: ${n.sp2};
950
950
  height: ${n.sp2};
951
951
  cursor: pointer;
@@ -953,14 +953,14 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
953
953
  display: flex;
954
954
  align-items: center;
955
955
  transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
956
- `,Jm=o.div`
956
+ `,Km=o.div`
957
957
  display: ${e=>e.isVisible?"flex":"none"};
958
958
  align-items: center;
959
959
  cursor: ${e=>e.isSortDisabled===!0?"not-allowed":"pointer"};
960
960
  &:hover {
961
961
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
962
962
  }
963
- `,Km=o(ti)`
963
+ `,Jm=o(Xn)`
964
964
  width: ${n.sp2};
965
965
  height: ${n.sp2};
966
966
  `,Qm=o.div`
@@ -970,14 +970,14 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
970
970
  &:hover {
971
971
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
972
972
  }
973
- `,Gm=o(Ye)`
973
+ `,Gm=o(Ze)`
974
974
  display: flex;
975
- `,{common:{strings:{underscore:al,hyphen:to,empty:aa},documents:{singleFileUploadSizeErrorMessage:Ym,multipleFileUploadSizeErrorMessage:Zm},snackBar:{missing_receipts_attachment:{failed:Xm}},tooltips:{addMissingReceipt:eg}},dateFormat:tg}=me.getLocalizedStrings(),jn={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[2],f[3])},ng=({transaction:e,uploadReceiptsFetchState:i,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:d,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:u})=>{const m=Ce(),p=Ze(),g=s.useRef(null),x=s.useCallback(async($,v,T,I,w)=>{c(e.id,"In-Progress"),await vd($,v,T,I,w).then(({uploadResponse:k,errorMessage:j})=>{k!=null?k.transaction.attachments!=null&&(u(k.transaction),setTimeout(()=>d(k.transaction,h),2e3)):c(e.id,"Error",{code:500,message:Xm},j)}).catch(k=>{c(e.id,"Error",k)})},[e.id,h,u,d,c]),y=s.useCallback($=>{if($.target.files!=null){const v=$.target.files,T=[],I=[];for(let w=0;w<v.length;w++)T.push(v[w].name),I.push(v[w]);x(l,r,v[0],v[0].name,{id:e.id,type:e.type})}},[r,x,l,e.id,e.type]),C=s.useCallback(()=>{p||g.current?.click()},[g,p]),S=p?ol:Un;return t.jsx(rl,{className:"missing-receipts-row-card",windowSize:m,isQuickViewMode:p,onClick:()=>a(e.id,e.type),"data-testid":D("missing-receipts-list-row",e.id),children:S.map(($,v)=>{const T=`${e.id}${al}${$.key}`;switch($.key){case"vendor":default:return t.jsx(dn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:v===S.length-1,children:t.jsxs(Li,{children:[t.jsx(Xn,{photoUrl:e.vendorId!=null?e.logo?.toString()??aa:aa,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(cg,{children:t.jsx(Kt,{name:e.vendorName??e.description,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},T);case"category":case"class":{const I=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:to,w=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:to,k=$.key==="category"?I:w;return t.jsx(dn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:k!==to?t.jsx(qe,{text:k,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(lg,{children:k})})})},T)}case"date":return t.jsx(dn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:t.jsx(qe,{text:e.date.format(tg.visual.MMMDCommaYYYYformat),itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},T);case"receipts":return t.jsx(dn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:v===S.length-1,style:{justifyContent:"center"},children:i.fetchState==="In-Progress"?t.jsx(Jn,{size:"Small",style:{display:"flex"},start:!0}):i.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(zc,{shouldDisplay:!0,width:f[4],height:f[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(rg,{onClick:I=>{I.stopPropagation()},children:t.jsx(Uo,{"data-testid":D("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Ii,multiple:!1,acceptableTypes:[...Rr],onFileChange:y,onFileSizeError:(I,w)=>{I&&c(e.id,"Error",{code:500,message:w===!0?Ym.replace("__maxFileSize__",xs(Ii,0)):Zm.replace("__maxFileSize__",xs(Ii,0))})}})}),t.jsx(xe,{display:"flex",placement:"bottom",title:eg,enterDelay:600,children:t.jsx(ag,{onClick:I=>{I.stopPropagation(),C()}})})]})})},T);case"amount":{const I=nt("0,0.[00]",e.amount);return t.jsx(dn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(un,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(qe,{text:e.amount.amount<0?`-${I}`:I,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},T)}}})})},ig=()=>{const e=Ce(),i=Ze(),l=s.useRef(null),[r,h]=s.useState(0);return s.useLayoutEffect(()=>{l.current&&h(l.current.offsetWidth)},[e]),t.jsx(rl,{windowSize:e,isQuickViewMode:i,ref:l,children:Un.map((d,a)=>{const c=`${a}${al}${d.key}`;switch(d.key){case"vendor":return t.jsx(dn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(un,{windowSize:e,isLastItem:a===Un.length-1,children:t.jsxs(Li,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},c);default:return t.jsx(dn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(un,{windowSize:e,isLastItem:a===Un.length-1,children:t.jsx(it,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},c)}})})},rl=o.div`
975
+ `,{common:{strings:{underscore:sl,hyphen:eo,empty:sa},documents:{singleFileUploadSizeErrorMessage:Ym,multipleFileUploadSizeErrorMessage:Zm},snackBar:{missing_receipts_attachment:{failed:Xm}},tooltips:{addMissingReceipt:eg}},dateFormat:tg}=me.getLocalizedStrings(),kn={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[2],f[3])},ng=({transaction:e,uploadReceiptsFetchState:i,receiptUploadEndpoint:l,authParams:r,selectedPeriod:h,onUploadReceiptComplete:d,onMissingReceiptsRowClick:a,onUploadReceiptFetchStatus:c,onUploadReceiptAttachment:u})=>{const m=Ce(),p=Xe(),g=s.useRef(null),x=s.useCallback(async($,v,T,I,w)=>{c(e.id,"In-Progress"),await vd($,v,T,I,w).then(({uploadResponse:k,errorMessage:j})=>{k!=null?k.transaction.attachments!=null&&(u(k.transaction),setTimeout(()=>d(k.transaction,h),2e3)):c(e.id,"Error",{code:500,message:Xm},j)}).catch(k=>{c(e.id,"Error",k)})},[e.id,h,u,d,c]),y=s.useCallback($=>{if($.target.files!=null){const v=$.target.files,T=[],I=[];for(let w=0;w<v.length;w++)T.push(v[w].name),I.push(v[w]);x(l,r,v[0],v[0].name,{id:e.id,type:e.type})}},[r,x,l,e.id,e.type]),C=s.useCallback(()=>{p||g.current?.click()},[g,p]),S=p?il:Vn;return t.jsx(al,{className:"missing-receipts-row-card",windowSize:m,isQuickViewMode:p,onClick:()=>a(e.id,e.type),"data-testid":D("missing-receipts-list-row",e.id),children:S.map(($,v)=>{const T=`${e.id}${sl}${$.key}`;switch($.key){case"vendor":default:return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsxs(Li,{children:[t.jsx(Yn,{photoUrl:e.vendorId!=null?e.logo?.toString()??sa:sa,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(cg,{children:t.jsx(Jt,{name:e.vendorName??e.description,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},T);case"category":case"class":{const I=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:eo,w=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:eo,k=$.key==="category"?I:w;return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:k!==eo?t.jsx(qe,{text:k,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(lg,{children:k})})})},T)}case"date":return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(Li,{children:t.jsx(qe,{text:e.date.format(tg.visual.MMMDCommaYYYYformat),itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},T);case"receipts":return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,style:{justifyContent:"center"},children:i.fetchState==="In-Progress"?t.jsx(Hn,{size:"Small",style:{display:"flex"},start:!0}):i.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(zc,{shouldDisplay:!0,width:f[4],height:f[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(rg,{onClick:I=>{I.stopPropagation()},children:t.jsx(No,{"data-testid":D("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Ii,multiple:!1,acceptableTypes:[...Ar],onFileChange:y,onFileSizeError:(I,w)=>{I&&c(e.id,"Error",{code:500,message:w===!0?Ym.replace("__maxFileSize__",gs(Ii,0)):Zm.replace("__maxFileSize__",gs(Ii,0))})}})}),t.jsx(xe,{display:"flex",placement:"bottom",title:eg,enterDelay:600,children:t.jsx(ag,{onClick:I=>{I.stopPropagation(),C()}})})]})})},T);case"amount":{const I=it("0,0.[00]",e.amount);return t.jsx(cn,{windowSize:m,wrapperWidth:$.width,isQuickViewMode:p,children:t.jsx(dn,{windowSize:m,isLastItem:v===S.length-1,children:t.jsx(qe,{text:e.amount.amount<0?`-${I}`:I,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},T)}}})})},ig=()=>{const e=Ce(),i=Xe(),l=s.useRef(null),[r,h]=s.useState(0);return s.useLayoutEffect(()=>{l.current&&h(l.current.offsetWidth)},[e]),t.jsx(al,{windowSize:e,isQuickViewMode:i,ref:l,children:Vn.map((d,a)=>{const c=`${a}${sl}${d.key}`;switch(d.key){case"vendor":return t.jsx(cn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(dn,{windowSize:e,isLastItem:a===Vn.length-1,children:t.jsxs(Li,{children:[t.jsx(Zn,{width:f[4],height:f[4]}),t.jsx(ot,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},c);default:return t.jsx(cn,{windowSize:e,wrapperWidth:d.width,isQuickViewMode:i,children:t.jsx(dn,{windowSize:e,isLastItem:a===Vn.length-1,children:t.jsx(ot,{width:r*d.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},c)}})})},al=o.div`
976
976
  display: flex;
977
977
  height: 100%;
978
978
  background-color: ${e=>e.theme.colors.grey5};
979
- padding-top: ${e=>jn.containerPaddingTopBottom.valuePx(e.windowSize)};
980
- padding-bottom: ${e=>jn.containerPaddingTopBottom.valuePx(e.windowSize)};
979
+ padding-top: ${e=>kn.containerPaddingTopBottom.valuePx(e.windowSize)};
980
+ padding-bottom: ${e=>kn.containerPaddingTopBottom.valuePx(e.windowSize)};
981
981
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
982
982
  box-shadow: ${e=>`${n.sp0} 2px ${n.sp1} ${e.theme.colors.dropShadowNormal}`};
983
983
  border-radius: ${n.sp2};
@@ -993,15 +993,15 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
993
993
  justify-content: space-between;
994
994
  ${e=>e.isQuickViewMode?le`
995
995
  flex: 1;
996
- padding-left: ${jn.containerPaddingLeftRight.valuePx(e.windowSize)};
997
- padding-right: ${jn.containerPaddingLeftRight.valuePx(e.windowSize)};
996
+ padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
997
+ padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
998
998
  width: 95%;
999
999
  `:le`
1000
1000
  min-width: min-content;
1001
- padding-left: ${jn.containerPaddingLeftRight.valuePx(e.windowSize)};
1002
- padding-right: ${jn.containerPaddingLeftRight.valuePx(e.windowSize)};
1001
+ padding-left: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
1002
+ padding-right: ${kn.containerPaddingLeftRight.valuePx(e.windowSize)};
1003
1003
  `}
1004
- `,dn=o.div`
1004
+ `,cn=o.div`
1005
1005
  display: flex;
1006
1006
  align-items: center;
1007
1007
  position: relative;
@@ -1039,7 +1039,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1039
1039
  &:hover {
1040
1040
  color: ${e=>e.theme.colors.primary};
1041
1041
  }
1042
- `,un=o(Re)`
1042
+ `,dn=o(Re)`
1043
1043
  overflow: hidden;
1044
1044
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1045
1045
  display: flex;
@@ -1055,7 +1055,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1055
1055
  color: inherit;
1056
1056
  `,cg=o.div`
1057
1057
  display: flex;
1058
- `,dg=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Ze();return t.jsxs(ug,{windowSize:h,children:[t.jsx(hg,{isQuickViewMode:d,children:t.jsx(sl,{sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(pg,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(ig,{},c))})]})},ug=o.div`
1058
+ `,dg=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe();return t.jsxs(ug,{windowSize:h,children:[t.jsx(hg,{isQuickViewMode:d,children:t.jsx(ol,{sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(pg,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(ig,{},c))})]})},ug=o.div`
1059
1059
  display: block;
1060
1060
  min-height: 100%;
1061
1061
  flex-direction: column;
@@ -1069,7 +1069,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1069
1069
  min-height: 100%;
1070
1070
  flex-direction: column;
1071
1071
  row-gap: ${n.sp3};
1072
- `,{common:mg}=me.getLocalizedStrings(),gg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=Ce(),x=Ze(),{fetchState:y,uiState:C,transactions:S}=e;Gn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const $=s.useRef(null),[v,T]=s.useState(!1);s.useEffect(()=>{$.current?.resetAfterIndex(0)},[g,$]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const I=k=>Am,w=(k,j)=>{m({sortOrder:j,sortKey:k})};return t.jsxs(yg,{children:[t.jsx(wg,{windowSize:g,children:y==="Error"?t.jsxs(Cg,{windowSize:g,children:[t.jsx(vg,{onClick:()=>p(),"data-testid":D("missing-receipts-list-table-reload-button"),children:t.jsx(No,{})}),t.jsx(Sg,{children:mg.reloadPage.label})]}):y==="Completed"&&S.length===0?t.jsx(It,{tab:"missing_receipts",title:We("missing_receipts").allDoneText.title,subTitle:We("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&S.length===0?t.jsx(dg,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(bg,{windowSize:g,children:t.jsx(Kn,{children:({height:k,width:j})=>t.jsxs(jg,{style:{height:k,width:j},children:[t.jsx(fg,{isQuickViewMode:x,children:t.jsx(sl,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},isDisabled:y==="In-Progress"?"readonly":h,onColumnSortConfigChanged:w})}),t.jsx(zi,{ref:$,height:k-tl,innerElementType:ll,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:h,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u},itemSize:I,width:j,style:{willChange:"auto"},overscanCount:Rm,onScroll:({scrollOffset:b})=>{m({scrollPosition:{scrollTop:b}})},initialScrollOffset:C.scrollPosition?.scrollTop,children:xg})]})})})}),t.jsx(Ge,{controller:v===!0,children:t.jsx($g,{children:t.jsx(Jn,{size:"Small",start:!0})})})]})},xg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Pi(),{missingReceipts:h,receiptUploadEndpoint:d,authParams:a,isQuickViewMode:c,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,selectedPeriod:x}=l,y=h.transactions[e],C=r!=null&&r===y.id;return t.jsx(kg,{isPanelSelected:C,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(ng,{transaction:y,receiptUploadEndpoint:d,authParams:a,selectedPeriod:x,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,uploadReceiptsFetchState:h.uploadReceiptStatusById[y.id]??{fetchState:"Not-Started",error:void 0}},y.id)})},fg=o.div`
1072
+ `,{common:mg}=me.getLocalizedStrings(),gg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:h,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=Ce(),x=Xe(),{fetchState:y,uiState:C,transactions:S}=e;Jn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const $=s.useRef(null),[v,T]=s.useState(!1);s.useEffect(()=>{$.current?.resetAfterIndex(0)},[g,$]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const I=k=>Am,w=(k,j)=>{m({sortOrder:j,sortKey:k})};return t.jsxs(yg,{children:[t.jsx(wg,{windowSize:g,children:y==="Error"?t.jsxs(Cg,{windowSize:g,children:[t.jsx(vg,{onClick:()=>p(),"data-testid":D("missing-receipts-list-table-reload-button"),children:t.jsx(Vo,{})}),t.jsx(Sg,{children:mg.reloadPage.label})]}):y==="Completed"&&S.length===0?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&S.length===0?t.jsx(dg,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(bg,{windowSize:g,children:t.jsx(qn,{children:({height:k,width:j})=>t.jsxs(jg,{style:{height:k,width:j},children:[t.jsx(fg,{isQuickViewMode:x,children:t.jsx(ol,{sortConfig:{sortKey:C.sortKey,sortOrder:C.sortOrder},isDisabled:y==="In-Progress"?"readonly":h,onColumnSortConfigChanged:w})}),t.jsx(Pi,{ref:$,height:k-el,innerElementType:rl,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:h,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:u},itemSize:I,width:j,style:{willChange:"auto"},overscanCount:Rm,onScroll:({scrollOffset:b})=>{m({scrollPosition:{scrollTop:b}})},initialScrollOffset:C.scrollPosition?.scrollTop,children:xg})]})})})}),t.jsx(Ye,{controller:v===!0,children:t.jsx($g,{children:t.jsx(Hn,{size:"Small",start:!0})})})]})},xg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{missingReceipts:h,receiptUploadEndpoint:d,authParams:a,isQuickViewMode:c,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,selectedPeriod:x}=l,y=h.transactions[e],C=r!=null&&r===y.id;return t.jsx(kg,{isPanelSelected:C,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(ng,{transaction:y,receiptUploadEndpoint:d,authParams:a,selectedPeriod:x,onMissingReceiptsRowClick:u,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,uploadReceiptsFetchState:h.uploadReceiptStatusById[y.id]??{fetchState:"Not-Started",error:void 0}},y.id)})},fg=o.div`
1073
1073
  flex: 1;
1074
1074
  width: auto;
1075
1075
  `,yg=o.div`
@@ -1086,7 +1086,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1086
1086
  `,Cg=o.div`
1087
1087
  display: flex;
1088
1088
  width: 100%;
1089
- height: ${e=>`calc(100% - ${yr.valuePx(e.windowSize)})`};
1089
+ height: ${e=>`calc(100% - ${fr.valuePx(e.windowSize)})`};
1090
1090
  flex-direction: column;
1091
1091
  justify-content: center;
1092
1092
  align-items: center;
@@ -1105,7 +1105,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1105
1105
  color: ${e=>e.theme.colors.primary};
1106
1106
  }
1107
1107
  }
1108
- `,Sg=o(Tc)`
1108
+ `,Sg=o(Ic)`
1109
1109
  margin-top: ${n.sp3};
1110
1110
  color: ${e=>e.theme.colors.hero};
1111
1111
  `,kg=o.div`
@@ -1115,12 +1115,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1115
1115
  box-sizing: border-box;
1116
1116
  ${e=>e.isPanelSelected===!0&&le`
1117
1117
  .missing-receipts-row-card {
1118
- ${Yo(e.theme)}
1118
+ ${Go(e.theme)}
1119
1119
  }
1120
1120
  `}
1121
1121
  `,jg=o.div`
1122
1122
  position: relative;
1123
- `,ll=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});ll.displayName="Missing receipts inner element type";const $g=o.div`
1123
+ `,rl=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});rl.displayName="Missing receipts inner element type";const $g=o.div`
1124
1124
  display: flex;
1125
1125
  width: 100%;
1126
1126
  height: ${n.sp3};
@@ -1130,8 +1130,8 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1130
1130
  margin-top: ${n.sp3};
1131
1131
  margin-bottom: ${n.sp3};
1132
1132
  `,Ig=[...md],Tg=7*1024*100,Lg=o.div`
1133
- width: ${Vn}px;
1134
- `,no=o.div`
1133
+ width: ${Bn}px;
1134
+ `,to=o.div`
1135
1135
  width: ${e=>`${e.availableWidth}px`};
1136
1136
  min-width: auto;
1137
1137
  position: relative;
@@ -1151,7 +1151,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1151
1151
  margin-bottom: ${n.sp2};
1152
1152
 
1153
1153
  // Disable select for Zeni Logo and File Separator
1154
- #${hr} img[alt*="company logo"],
1154
+ #${ur} img[alt*="company logo"],
1155
1155
  .attachFileSeparator {
1156
1156
  user-select: none;
1157
1157
  }
@@ -1163,7 +1163,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1163
1163
  margin-bottom: ${n.sp3};
1164
1164
  `,Eg=o.div`
1165
1165
  position: relative;
1166
- `,ra=o(Re)`
1166
+ `,aa=o(Re)`
1167
1167
  position: relative;
1168
1168
  `,Dg=o.div`
1169
1169
  background-color: ${e=>e.theme.colors.grey5};
@@ -1188,7 +1188,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1188
1188
  position: absolute;
1189
1189
  top: ${n.sp4}; // Attachment icon position from the top
1190
1190
  right: -${n.sp3}; // To show attachment icon on the edge
1191
- `,Pg=o.div`
1191
+ `,zg=o.div`
1192
1192
  margin-top: ${n.sp2};
1193
1193
  display: flex;
1194
1194
  flex-direction: column;
@@ -1199,10 +1199,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1199
1199
  .toolbar {
1200
1200
  user-select: none;
1201
1201
  }
1202
- `,zg=o(ot)`
1202
+ `,Pg=o(st)`
1203
1203
  color: ${e=>e.theme.colors.grey1};
1204
1204
  user-select: none;
1205
- `,Fg=o(fr)`
1205
+ `,Fg=o(xr)`
1206
1206
  color: ${e=>e.theme.colors.primary};
1207
1207
  `,Bg=o.div`
1208
1208
  flex-direction: column;
@@ -1230,12 +1230,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1230
1230
  right: ${n.sp0};
1231
1231
  top: ${n.sp0};
1232
1232
  z-index: ${f[2]};
1233
- min-width: ${cr}px;
1234
- max-width: ${lr}px;
1235
- `,Ai="monthEndReportFormSection",la="monthEndReportPage",dt=me.getLocalizedStrings();function Ug({companyId:e,enableZeniGPTFeature:i,monthEndReportView:l,previewMode:r,customerRequestData:h,allThreadsSectionOpen:d,filterMetaData:a,newThreadMetadata:c,isZeniUser:u,selectedPeriod:m,improveUsingZeniGPTClick:p,onRemoveFileAttachment:g,onUpdateFileAttachment:x,onCloseAllThreadsSection:y,previewMonthEndReport:C,saveMonthEndReport:S,onEditClick:$,onOpenFileAttachmentSnackBar:v,onClickCustomerRequest:T,sendMonthEndReport:I}){const w=Tt(),[k,j]=s.useState(),[b,z]=s.useState(0),[A,R]=s.useState(0),F=s.useRef(),V=s.useRef(null),q=s.useRef(null),{html:M,subject:O,improveUsingZeniGPTStatus:ae}=l,[B,L]=s.useState(),[U,X]=s.useState(!1),[ce,ge]=s.useState(!1),te=s.useRef(null),K=s.useRef(null),ee=ec(d,250),W=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:_,sortedThreads:ne,threadsPositions:H,observer:Z,unresolvedThreadsMap:oe,handleRemoveFloatingThread:J}=tc(a,te,!r,W,u),N=s.useCallback(()=>{d?K.current!=null&&R(Math.min((K.current.offsetWidth-Vn-f[4])/2,K.current.offsetWidth-Vn-lr-f[4])):K.current!=null&&z(Math.min((K.current.offsetWidth-Vn-f[4])/2,K.current.offsetWidth-Vn-cr-f[4]))},[d]);s.useEffect(()=>{N()},[d,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const P=u?er:tr,{openThread:se,addThread:Y,setOpenThread:G}=s.useContext(P),je=nc(hs,!1,!r),Te=te.current?.getBoundingClientRect(),E=je!=null&&je.coords&&Te?{left:je.coords.left-Te.left,top:je.coords.top-Te.top}:void 0,de=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),Ie=ic();if(!Ee||Ie==null)return;const Je={...c,...Ie,startPath:Ie.startPath.join(),endPath:Ie.endPath.join()},ye=`${ur()}${dr}`,_e=`cockpit_${e}`;Y(ye,{type:"thread",id:ye,roomId:_e,createdAt:new Date,comments:[],metadata:Je,updatedAt:new Date,resolved:!1}),G(ye)},[Y,e,c,G]);s.useEffect(()=>{se!=null&&d&&y()},[d,se,y]);const $e=ae.fetchState==="In-Progress",Me=xn({mode:"all",defaultValues:ca(l),values:ca(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:Ie,subject:Je}=Ee[Ai];if(r===!0)I?.(B?.id);else{const ye=k?.replace(oc,dt.common.strings.empty);Ie!=null&&Je!=null&&C(Ie,Je,B?.id,ye!=null&&ye.length>0?k:void 0)}}),Fe=()=>{V.current!=null&&V.current.click()},ve=()=>{B!==void 0&&B!=null&&(g([B.id]),L(void 0),X(!1))},Xe=Ee=>{const Ie=Ee.target.files?Ee.target.files[0]:null;if(Ie)if(!xd(Ie.type)||ce)console.warn("Please select a valid file.");else{const Je=new FileReader;Je.onload=function(ye){const _e=ye.target?.result;if(typeof _e=="string"){const wt={data:_e.split(",")[1],name:Ie.name,id:fd(e,Ie.name)};L(wt),X(!0),x([wt])}},Je.readAsDataURL(Ie)}},ht=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},et=()=>{const Ee=Me.getValues(),{recipientEmailList:Ie,subject:Je}=Ee[Ai];Ie!=null&&Je!=null&&S(Ie,Je,B?.id,k)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{F.current=B},[B]),s.useEffect(()=>{L(pd(l.attachmentFile)),X(!1)},[l.attachmentFile]),s.useEffect(()=>{ce&&v()},[ce,v]);const fe=Di(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),Be=M!=null?M.split(sc):[],Vt=l.concatenatedHtml,tt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Ic,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>u===!0?ee?t.jsxs(t.Fragment,{children:[t.jsx(Ng,{allThreadsSectionOpen:d,children:t.jsx(jc,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.colors.grey3}`,boxShadow:`${n.sp0} 1px 2px ${n.sp0} ${he.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${n.sp5} - ${n.sp5})`,backgroundColor:w.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":n.sp12},collapsibleThreadStyle:{width:`calc(100% - ${n.sp4})`},allowComposer:!1,drawerTitle:dt.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ee,Ie)=>{G(Ie);const Je=ne.findIndex(ye=>ye[0]===Ie);y(),_.current?.[Je]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(no,{availableWidth:b})]}):t.jsx($c,{observer:Z,canvasContainerRef:te,sortedThreads:ne,threadsPositions:H,threadsRefs:_,unresolvedThreadsMap:oe,editorMode:!r,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:J}):t.jsx(no,{availableWidth:b}),Lt=(l.zeniRequestsData??[]).length+ac(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ag,{ref:K,children:[t.jsx(no,{availableWidth:d?A:b}),t.jsxs(Lg,{children:[t.jsx(fn,{...Me,children:t.jsx("form",{id:da(la),onSubmit:De,children:t.jsxs(Bg,{children:[t.jsx(rc,{sectionId:Ai,previewMode:r,subject:O}),!r&&Lt>0?t.jsx(lc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Dg,{id:hs,ref:te,children:[t.jsxs(Mg,{className:"monthEndReportCanvasWrapper",children:[B!=null||ce?t.jsx(Og,{"data-testid":D("email-attachment-container"),onClick:ht,children:t.jsx(cc,{fileSizeError:ce,setFileSizeError:ge,loading:!1,showAnimation:!r&&U})}):null,r?t.jsx(ra,{dangerouslySetInnerHTML:{__html:dc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{id:uc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:Be[0]!=null?Be[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Rg,{children:[t.jsx(Fg,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(zg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Pg,{id:hc,children:t.jsx(pc,{handleFileInputClick:Fe,fileAttached:B!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:$e,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:h})}),t.jsx(ra,{id:hr,dangerouslySetInnerHTML:{__html:Be[1]!=null?"<html><body>"+Be[1]:dt.common.strings.empty}})]}),B!=null?t.jsx(mc,{ref:q,fileName:B.name,fileSize:gc(B.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(xc,{style:{zIndex:15},coords:E,alignment:je.alignment,onClick:de}):null,t.jsx(fc,{canvasContainerRef:te,sortedThreads:ne,editorMode:!r,isZeniUser:u})]})]})})}),t.jsx(Uo,{name:B?.name??dt.common.strings.empty,fileRef:V,sizeLimit:Tg,acceptableTypes:Ig,onFileChange:async Ee=>{Xe(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(nr,{style:{zIndex:10},leftSideComponent:tt(),formId:da(la),cancelBtn:{isDisabled:$e,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?$:et,style:{width:"136px",padding:`${n.sp0} ${n.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:$e,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?dt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",fe):dt.cockpit.monthEndReport.preview,size:"medium"}})]})}const ca=e=>({[Ai]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),da=e=>`${e}_form`;yt.smallBold.lineHeightValue;const Hg=1,Wg=50,ua=56,qg=["memo_and_receipt","activity","paymentAccount","receipt"],ha=e=>Qo(e,qg),io=905,Jg=1240,Kg=1440,Qg=1920;function _t(e,i,l,r){const h=i,d=Math.round(i*Jg/io),a=Math.round(i*Kg/io),c=Math.round(i*Qg/io),u=l??a,m=r??u;return new Q(e,i,h,Math.min(d,u),Math.min(a,u),Math.min(c,m))}const{common:{strings:{empty:Gg}},expenseAutomation:{transactions:{header:{vendors:Yg,category:Zg,classText:Xg,date:e1,type:t1,amount:n1,paymentAccount:i1,memoReceipt:o1}}}}=me.getLocalizedStrings(),cl={key:"vendor",value:Yg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},s1={key:"payment_account",value:i1,sortOrder:"ascending",width:_t(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},a1={key:"category",value:Zg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},r1={key:"class",value:Xg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},l1={key:"date",value:e1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},c1={key:"transaction_type",value:t1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:0}}},d1={key:"memo_and_receipt",value:o1,sortOrder:"ascending",width:_t(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},dl={key:"amount",value:n1,sortOrder:"ascending",width:_t(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},u1={key:"activity",value:Gg,sortOrder:"ascending",width:_t(f[6],f[6],48,54),customStyle:{common:{}}},as=e=>{const i=[cl,s1,a1,r1,l1,c1,d1,dl];return e===!0&&i.push(u1),i},rs=[{...cl,width:new Q(65,65)},{...dl,width:new Q(30,30)}],oo={sortKey:"date",sortOrder:"descending"},ul=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Ze(),a=d?rs:as(l),[c,u]=s.useState(Do(a));s.useEffect(()=>{const g=Do(a);for(const x of g)x.key===e.sortKey?x.sortOrder=e.sortOrder:x.sortOrder="ascending";u(g)},[e.sortKey,e.sortOrder,d]);const m=(g,x)=>{let y=x;e.sortKey===g&&(y=x==="ascending"?"descending":"ascending"),r(g,y)},p=g=>{ha(g.key)==null&&m(bd(g.key),g.sortOrder)};return t.jsx(h1,{windowSize:h,isQuickViewMode:d,"data-testid":D("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||ha(g.key)!=null;return t.jsxs(p1,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:d,windowSize:h,isLastItem:x===c.length-1,"data-testid":D("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(y1,{"data-testid":D("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(w1,{children:g.value}),y?null:t.jsx(g1,{sortConfig:e,headerData:g,"data-testid":D("transaction-categorization-sort-icon",g.key),children:t.jsx(f1,{})})]}),y?null:t.jsx(x1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==oo.sortKey,"data-testid":D("transaction-categorization-close-icon",g.key),children:t.jsx(m1,{onClick:()=>{m(oo.sortKey,oo.sortOrder)},"data-testid":D("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},h1=o.div`
1233
+ min-width: ${lr}px;
1234
+ max-width: ${rr}px;
1235
+ `,Ai="monthEndReportFormSection",ra="monthEndReportPage",dt=me.getLocalizedStrings();function Ug({companyId:e,enableZeniGPTFeature:i,monthEndReportView:l,previewMode:r,customerRequestData:h,allThreadsSectionOpen:d,filterMetaData:a,newThreadMetadata:c,isZeniUser:u,selectedPeriod:m,improveUsingZeniGPTClick:p,onRemoveFileAttachment:g,onUpdateFileAttachment:x,onCloseAllThreadsSection:y,previewMonthEndReport:C,saveMonthEndReport:S,onEditClick:$,onOpenFileAttachmentSnackBar:v,onClickCustomerRequest:T,sendMonthEndReport:I}){const w=Tt(),[k,j]=s.useState(),[b,P]=s.useState(0),[A,R]=s.useState(0),F=s.useRef(),V=s.useRef(null),q=s.useRef(null),{html:M,subject:O,improveUsingZeniGPTStatus:re}=l,[B,L]=s.useState(),[U,X]=s.useState(!1),[ce,ge]=s.useState(!1),te=s.useRef(null),J=s.useRef(null),ee=Xl(d,250),H=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:_,sortedThreads:ne,threadsPositions:W,observer:Z,unresolvedThreadsMap:ie,handleRemoveFloatingThread:K}=ec(a,te,!r,H,u),N=s.useCallback(()=>{d?J.current!=null&&R(Math.min((J.current.offsetWidth-Bn-f[4])/2,J.current.offsetWidth-Bn-rr-f[4])):J.current!=null&&P(Math.min((J.current.offsetWidth-Bn-f[4])/2,J.current.offsetWidth-Bn-lr-f[4]))},[d]);s.useEffect(()=>{N()},[d,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const z=u?Xa:er,{openThread:oe,addThread:Y,setOpenThread:G}=s.useContext(z),ke=tc(us,!1,!r),Ie=te.current?.getBoundingClientRect(),E=ke!=null&&ke.coords&&Ie?{left:ke.coords.left-Ie.left,top:ke.coords.top-Ie.top}:void 0,de=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),$e=nc();if(!Ee||$e==null)return;const Ke={...c,...$e,startPath:$e.startPath.join(),endPath:$e.endPath.join()},ye=`${dr()}${cr}`,_e=`cockpit_${e}`;Y(ye,{type:"thread",id:ye,roomId:_e,createdAt:new Date,comments:[],metadata:Ke,updatedAt:new Date,resolved:!1}),G(ye)},[Y,e,c,G]);s.useEffect(()=>{oe!=null&&d&&y()},[d,oe,y]);const je=re.fetchState==="In-Progress",Me=gn({mode:"all",defaultValues:la(l),values:la(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:$e,subject:Ke}=Ee[Ai];if(r===!0)I?.(B?.id);else{const ye=k?.replace(ic,dt.common.strings.empty);$e!=null&&Ke!=null&&C($e,Ke,B?.id,ye!=null&&ye.length>0?k:void 0)}}),Fe=()=>{V.current!=null&&V.current.click()},ve=()=>{B!==void 0&&B!=null&&(g([B.id]),L(void 0),X(!1))},et=Ee=>{const $e=Ee.target.files?Ee.target.files[0]:null;if($e)if(!xd($e.type)||ce)console.warn("Please select a valid file.");else{const Ke=new FileReader;Ke.onload=function(ye){const _e=ye.target?.result;if(typeof _e=="string"){const wt={data:_e.split(",")[1],name:$e.name,id:fd(e,$e.name)};L(wt),X(!0),x([wt])}},Ke.readAsDataURL($e)}},ht=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},tt=()=>{const Ee=Me.getValues(),{recipientEmailList:$e,subject:Ke}=Ee[Ai];$e!=null&&Ke!=null&&S($e,Ke,B?.id,k)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{F.current=B},[B]),s.useEffect(()=>{L(pd(l.attachmentFile)),X(!1)},[l.attachmentFile]),s.useEffect(()=>{ce&&v()},[ce,v]);const fe=Di(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),Be=M!=null?M.split(oc):[],Vt=l.concatenatedHtml,nt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx($c,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>u===!0?ee?t.jsxs(t.Fragment,{children:[t.jsx(Ng,{allThreadsSectionOpen:d,children:t.jsx(kc,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.colors.grey3}`,boxShadow:`${n.sp0} 1px 2px ${n.sp0} ${he.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${n.sp5} - ${n.sp5})`,backgroundColor:w.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":n.sp12},collapsibleThreadStyle:{width:`calc(100% - ${n.sp4})`},allowComposer:!1,drawerTitle:dt.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ee,$e)=>{G($e);const Ke=ne.findIndex(ye=>ye[0]===$e);y(),_.current?.[Ke]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(to,{availableWidth:b})]}):t.jsx(jc,{observer:Z,canvasContainerRef:te,sortedThreads:ne,threadsPositions:W,threadsRefs:_,unresolvedThreadsMap:ie,editorMode:!r,style:{minWidth:`${b}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:K}):t.jsx(to,{availableWidth:b}),Lt=(l.zeniRequestsData??[]).length+sc(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ag,{ref:J,children:[t.jsx(to,{availableWidth:d?A:b}),t.jsxs(Lg,{children:[t.jsx(xn,{...Me,children:t.jsx("form",{id:ca(ra),onSubmit:De,children:t.jsxs(Bg,{children:[t.jsx(ac,{sectionId:Ai,previewMode:r,subject:O}),!r&&Lt>0?t.jsx(rc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Dg,{id:us,ref:te,children:[t.jsxs(Mg,{className:"monthEndReportCanvasWrapper",children:[B!=null||ce?t.jsx(Og,{"data-testid":D("email-attachment-container"),onClick:ht,children:t.jsx(lc,{fileSizeError:ce,setFileSizeError:ge,loading:!1,showAnimation:!r&&U})}):null,r?t.jsx(aa,{dangerouslySetInnerHTML:{__html:cc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{id:dc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:Be[0]!=null?Be[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Rg,{children:[t.jsx(Fg,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(Pg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(zg,{id:uc,children:t.jsx(hc,{handleFileInputClick:Fe,fileAttached:B!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:je,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:h})}),t.jsx(aa,{id:ur,dangerouslySetInnerHTML:{__html:Be[1]!=null?"<html><body>"+Be[1]:dt.common.strings.empty}})]}),B!=null?t.jsx(pc,{ref:q,fileName:B.name,fileSize:mc(B.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(gc,{style:{zIndex:15},coords:E,alignment:ke.alignment,onClick:de}):null,t.jsx(xc,{canvasContainerRef:te,sortedThreads:ne,editorMode:!r,isZeniUser:u})]})]})})}),t.jsx(No,{name:B?.name??dt.common.strings.empty,fileRef:V,sizeLimit:Tg,acceptableTypes:Ig,onFileChange:async Ee=>{et(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(tr,{style:{zIndex:10},leftSideComponent:nt(),formId:ca(ra),cancelBtn:{isDisabled:je,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?$:tt,style:{width:"136px",padding:`${n.sp0} ${n.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:je,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?dt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",fe):dt.cockpit.monthEndReport.preview,size:"medium"}})]})}const la=e=>({[Ai]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),ca=e=>`${e}_form`;yt.smallBold.lineHeightValue;const Wg=1,Hg=50,da=56,qg=["memo_and_receipt","activity","paymentAccount","receipt"],ua=e=>Jo(e,qg),no=905,Kg=1240,Jg=1440,Qg=1920;function _t(e,i,l,r){const h=i,d=Math.round(i*Kg/no),a=Math.round(i*Jg/no),c=Math.round(i*Qg/no),u=l??a,m=r??u;return new Q(e,i,h,Math.min(d,u),Math.min(a,u),Math.min(c,m))}const{common:{strings:{empty:Gg}},expenseAutomation:{transactions:{header:{vendors:Yg,category:Zg,classText:Xg,date:e1,type:t1,amount:n1,paymentAccount:i1,memoReceipt:o1}}}}=me.getLocalizedStrings(),ll={key:"vendor",value:Yg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},s1={key:"payment_account",value:i1,sortOrder:"ascending",width:_t(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},a1={key:"category",value:Zg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},r1={key:"class",value:Xg,sortOrder:"ascending",width:_t(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},l1={key:"date",value:e1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},c1={key:"transaction_type",value:t1,sortOrder:"descending",width:_t(108,108,130,144),customStyle:{common:{paddingLeft:0}}},d1={key:"memo_and_receipt",value:o1,sortOrder:"ascending",width:_t(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},cl={key:"amount",value:n1,sortOrder:"ascending",width:_t(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},u1={key:"activity",value:Gg,sortOrder:"ascending",width:_t(f[6],f[6],48,54),customStyle:{common:{}}},ss=e=>{const i=[ll,s1,a1,r1,l1,c1,d1,cl];return e===!0&&i.push(u1),i},as=[{...ll,width:new Q(65,65)},{...cl,width:new Q(30,30)}],io={sortKey:"date",sortOrder:"descending"},dl=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe(),a=d?as:ss(l),[c,u]=s.useState(Eo(a));s.useEffect(()=>{const g=Eo(a);for(const x of g)x.key===e.sortKey?x.sortOrder=e.sortOrder:x.sortOrder="ascending";u(g)},[e.sortKey,e.sortOrder,d]);const m=(g,x)=>{let y=x;e.sortKey===g&&(y=x==="ascending"?"descending":"ascending"),r(g,y)},p=g=>{ua(g.key)==null&&m(bd(g.key),g.sortOrder)};return t.jsx(h1,{windowSize:h,isQuickViewMode:d,"data-testid":D("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||ua(g.key)!=null;return t.jsxs(p1,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:d,windowSize:h,isLastItem:x===c.length-1,"data-testid":D("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(y1,{"data-testid":D("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(w1,{children:g.value}),y?null:t.jsx(g1,{sortConfig:e,headerData:g,"data-testid":D("transaction-categorization-sort-icon",g.key),children:t.jsx(f1,{})})]}),y?null:t.jsx(x1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==io.sortKey,"data-testid":D("transaction-categorization-close-icon",g.key),children:t.jsx(m1,{onClick:()=>{m(io.sortKey,io.sortOrder)},"data-testid":D("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},h1=o.div`
1236
1236
  top: ${n.sp0};
1237
1237
  left: ${n.sp0};
1238
- height: ${Wg}px;
1238
+ height: ${Hg}px;
1239
1239
  z-index: 2;
1240
1240
  display: flex;
1241
1241
  flex-wrap: nowrap;
@@ -1269,7 +1269,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1269
1269
  width: ${e.wrapperWidth.valuePx(e.windowSize)};
1270
1270
  max-width: ${e.wrapperWidth.valuePx(e.windowSize)};
1271
1271
  `}
1272
- `,m1=o(ni)`
1272
+ `,m1=o(ei)`
1273
1273
  width: 12px;
1274
1274
  height: 12px;
1275
1275
  `,g1=o.div`
@@ -1285,7 +1285,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1285
1285
  &:hover {
1286
1286
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1287
1287
  }
1288
- `,f1=o(ti)`
1288
+ `,f1=o(Xn)`
1289
1289
  width: ${n.sp2};
1290
1290
  height: ${n.sp2};
1291
1291
  `,y1=o.div`
@@ -1295,9 +1295,9 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1295
1295
  &:hover {
1296
1296
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1297
1297
  }
1298
- `,w1=o(Ye)`
1298
+ `,w1=o(Ze)`
1299
1299
  display: flex;
1300
- `,so="expenseAutomationTransactionsPage",mn="transactionCategorizationListTable",ze="account",ut="class",jt="lineEntitySelection",b1="lineEntity",C1="recommendations",hl="lineInfo",v1="vendorDetails",S1="customerDetails",Ri="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,k1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),pl=e=>s.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),j1=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"})),$1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:I1,hyphen:Ht,empty:qt,colon:pa},tooltips:{addReceipt:T1,viewReceipt:L1,viewReceipts:A1}},expenseAutomation:{transactions:St},dateFormat:R1}=me.getLocalizedStrings(),Bt={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[1],f[2]),containerPaddingTopBottomEmpty:new Q(f[2],f[3]),nameLogoWidth:new Q(f[2],f[4]),nameLogoHeight:new Q(f[2],f[4])},E1=({transactionView:e,transaction:i,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,selectedTab:d,containerRef:a,listContainerRef:c,isCOTEnabled:u,cotTracking:m,onTransactionCategorizationRowClick:p,setCurrentTransactionInAction:g,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:$,isTransactionActivityEnabled:v,authParams:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Ze(),[j,b]=s.useState(!1),[z,A]=s.useState(!1),{lineItemById:R,sortedLineItems:F}=i.transactionReviewLocalData,V=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],q=F.filter(P=>V.indexOf(P)!==-1),M=[];q.forEach(P=>{M.push(R[P])});const{accountList:O,accountsHierarchyList:ae,classHierarchyList:B,classList:L,uncategorizedAccounts:U,transactions:X,selectedCheckBoxTransactionIds:ce}=e,ge=e.uploadReceiptStatusById,te=ce.includes(i.transactionId),K=Tt(),ee={control:()=>({marginLeft:-2,backgroundColor:j?K.colors.background:K.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:K.colors.grey5}),singleValue:()=>({color:j||te?K.colors.primary:K.colors.hero,paddingLeft:f[2]}),input:P=>({...P,color:j||te?K.colors.primary:K.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:P=>({...P,zIndex:10})},W={...ee,singleValue:P=>({...P,color:j||te?K.colors.primary:K.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:P=>({...P,color:j||te?K.colors.primary:K.colors.hero,textAlign:"left"})},_=X.find(P=>P.id===i.transactionId),ne=(P,se)=>{const{transactionType:Y}=se.transactionReviewLocalData;let G=P.target;for(;G;){if(G.classList.contains("select-value-container")||G.classList.contains("item-value-container")||G.classList.contains("grouped-single-select-field__value-container")||G.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||G.classList.contains("grouped-single-select-field__input")||G.classList.contains("grouped-single-select-field__menu"))return;G=G.parentElement}Y!=null&&p(se.transactionId,Y)},H=s.useRef(null),[Z,oe]=s.useState(void 0),[J,N]=s.useState("bottom");return s.useEffect(()=>{if(Z===void 0)return;const P=c?.current?._outerRef??null,se=()=>{const Y=H.current;if(Y==null||P==null)return;const G=Y.getBoundingClientRect(),je=P.getBoundingClientRect(),Te=P.scrollTop+(G.bottom-je.top),E=P.scrollHeight-Te;N(E>=288?"bottom":"top")};return se(),window.addEventListener("resize",se),P?.addEventListener("scroll",se),()=>{window.removeEventListener("resize",se),P?.removeEventListener("scroll",se)}},[c,Z]),t.jsxs(M1,{onMouseEnter:k?void 0:()=>b(!0),onMouseLeave:k?void 0:()=>b(!1),children:[t.jsx(P1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:k,isHovered:j,children:t.jsx(z1,{children:M.map((P,se)=>t.jsx(F1,{ref:Z===se?H:void 0,"data-testid":D("transaction-categorization-list-row",P.lineId),windowSize:w,isQuickViewMode:k,onClick:Y=>ne(Y,i),children:t.jsx(D1,{isTransactionActivityEnabled:v,line:P,isHovered:j||te,isSelected:te,isQuickViewMode:k,lineIndex:se,sectionId:l,transaction:i,currentTransaction:_,windowSize:w,accountsHierarchyList:ae,classHierarchyList:B,allAccountList:O,allClassList:L,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:ee,customStyleAutoComplete:W,recommendations:P.recommendationsWithCOT,selectedTab:d,isCOTEnabled:u,menuPlacement:J,cotTracking:m,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>oe(void 0),onDropdownOpen:()=>oe(se)})},`${i.transactionId}.${P.lineId}`))},i.transactionId)},i.transactionId),v===!0&&!k&&t.jsx(ox,{className:"activity-log-icon","data-testid":D("activity-log-icon",i.transactionId),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:P=>{P.stopPropagation(),$(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(sx,{style:{color:z?K.colors.primary:K.colors.hero}})})})]})},D1=({accountsHierarchyList:e,allAccountList:i,allClassList:l,classHierarchyList:r,customStyle:h,customStyleAutoComplete:d,line:a,lineIndex:c,transaction:u,currentTransaction:m,windowSize:p,uncategorizedAccounts:g,isHovered:x=!1,isSelected:y=!1,isQuickViewMode:C=!1,sectionId:S,recommendations:$,vendorSearchAutoCompleteData:v,selectedTab:T,isCOTEnabled:I,menuPlacement:w,cotTracking:k,openTooltipId:j,setCurrentTransactionInAction:b,vendorLoadOptions:z,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:R,isTransactionActivityEnabled:F,onDropdownClose:V,onDropdownOpen:q,authParams:M,uploadReceiptStatus:O,onUploadTransactionReceipt:ae})=>{const{transactionDate:B,transactionType:L,transactionTypeName:U,memo:X}=u.transactionReviewLocalData,{setValue:ce}=Jo(),ge=s.useCallback((ie,Se)=>{k?.onCOTView!=null&&k.onCOTView(a.lineId,u.transactionId,ie,Se)},[k,a.lineId,u.transactionId]),te=a.lineDescription,K=s.useMemo(()=>{if(te||X)return[{title:St.description,description:te||Ht},{title:St.header.memo,description:X||Ht}]},[X,te]),ee=Ut(S,jt,c.toString()),W=Ut(S,ze,c.toString()),_=Ut(S,ut,c.toString()),ne=(ie,Se)=>{if(C)return;let Le;switch(Se){case"vendor":Le=ee;break;case"category":Le=W;break;case"class":Le=_;break;default:return}ce(`${Le}.selectedOption`,ie,{shouldValidate:!0,shouldDirty:!0})},H=Tt(),Z=s.useMemo(()=>m!=null&&ln(m)===!0?{id:u.transactionReviewLocalData.customer?.id??"",logo:u.transactionReviewLocalData.customer?.logo,name:u.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,u.transactionReviewLocalData.customer?.id,u.transactionReviewLocalData.customer?.logo,u.transactionReviewLocalData.customer?.name]),oe=s.useMemo(()=>m!=null&&ln(m)===!0?{id:u.transactionReviewLocalData.vendor?.id??"",logo:u.transactionReviewLocalData.vendor?.logo,name:u.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,u.transactionReviewLocalData.vendor?.id,u.transactionReviewLocalData.vendor?.logo,u.transactionReviewLocalData.vendor?.name]),J=a[ut]?.classId,N=a[ze]?.qboId??a[ze]?.accountId,P=Z?.id,se=oe?.id,Y=oe?.name,[G,je]=s.useState(!J),[Te,E]=s.useState(!N||a[ze]?.qboId!=null&&Nn(g,a[ze].qboId,R===!0?["income"]:void 0)===!0),[de,$e]=s.useState(!se||!P),Me=ie=>$?.find(Se=>Se.vendor?.qboId===ie||Se.vendor?.id===ie||Se.vendor?.name===ie)?.vendor?.reason??"",De=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=$r(e,De),ve=jr(r,De),Xe=ie=>i.filter(Se=>Se.qboId===ie)[0]?.qboId,ht=ie=>l.filter(Se=>Se.classId===ie)[0]?.accountingClassNumber??void 0,et=s.useCallback(ie=>Nn(g,ie,R===!0?["income"]:void 0),[g,R]),[fe,Be]=s.useState(!1),[Vt,tt]=s.useState(!1),[pt,Lt]=s.useState(!1),[Ee,Ie]=s.useState(0),[Je,ye]=s.useState(null),[_e,wt]=s.useState([]),[yn,Qe]=s.useState(void 0),wn=s.useRef(null),[bn,bt]=s.useState(0),[Yt,Zt]=s.useState(0),Xt=Vc()?.url,[ii,Mn]=s.useState(!1),_i=(ie,Se)=>{b({transactionId:u.transactionId,lineItemId:a.lineId}),z(ie,Se)},en=()=>{$e(!(se||P)),Be(!1),V?.()},tn=()=>{N&&a[ze]?.qboId!=null&&Nn(g,a[ze].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0),Mn(!1),V?.()},On=()=>{je(!J),tt(!1),V?.()},oi=()=>{C||(se||P)&&(Be(!0),q?.())},Vi=()=>{C||(tt(!0),q?.())},Ni=()=>{C||(Mn(!0),q?.())};s.useEffect(()=>{N&&a[ze]?.qboId!=null&&Nn(g,a[ze].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0)},[N]),s.useEffect(()=>{je(!J)},[J]),s.useEffect(()=>{$e(!(se||P))},[se,P]);const si=u.transactionReviewLocalData.selectedEntity,ai=u.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,He=m!=null&&ln(m)===!0?si:ai,Cn=s.useMemo(()=>{const ie=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Se=v.entityAutoCompleteView;return{selectedOption:He?.qboId??He?.id,defaultOptions:Ho(Se,He,ie??[])}},[He,u.transactionReviewLocalData.lineItemById,a.lineId,v.entityAutoCompleteView]),Ae=()=>He!=null&&He.logo!=null?t.jsx(Xn,{photoUrl:He.logo.toString(),styles:{width:Bt.nameLogoWidth.valuePx(p),height:Bt.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(xa,{children:t.jsx(Kt,{name:He.name,size:n.sp4})})}):He!=null&&He.name!=null?t.jsx(xa,{children:t.jsx(Kt,{name:He.name,size:n.sp4})}):null,rt=(ie,Se)=>{if(Se==null||!Se)return;let Le=[];return ie.forEach(vt=>{Le=Le.concat(vt.options)}),Le.find(vt=>vt.value===Se)?.label??Se},At=rt(ve,J),ri=rt(Fe,N),Ct=T==="review",nn=Wi("vendor",Cn.defaultOptions,Cn.selectedOption),Pn=Wi("category",Fe,N),li=Wi("class",ve,J),Ui=ie=>{const Se=C?rs:as(ie);return Se.map((Le,vt)=>{const xt=`${u.transactionId}_${Le.key}_${a.lineId}`;if(c>0&&m!=null&&ln(m)===!0&&Le.key==="vendor")return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:C},xt);if(c>0&&(Le.key==="transaction_type"||Le.key==="payment_account"||Le.key==="memo_and_receipt"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:C},xt);switch(Le.key){case"activity":return t.jsx(gl,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:C,className:"item-value-container",children:[!C&&t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!He?.isPreFilled,isMisCategorized:nn,onRecommendationClick:ne,selectedValue:se,selectedValueLabel:Y,isReviewTab:Ct,isAccountOptionDisabled:et,existingOption:{label:m!=null&&ln(m)===!0?m?.vendor?.name:void 0,value:m!=null&&ln(m)===!0?m?.vendor?.id:void 0},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:de===!0?t.jsx(co,{isHovered:x,isQuickViewMode:C,children:t.jsxs(lo,{onClick:Ve=>{Ve.stopPropagation(),!C&&(q?.(),$e(!1),Be(!0))},"data-testid":D("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(tx,{"data-testid":D("vendor-selection-dropdown-container",Ut(S,jt,c.toString())),children:t.jsx(qc,{name:ee,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:Cn.selectedOption,defaultOptions:Cn.defaultOptions},type:"vendor",autoFocus:!de,style:{width:"100%"},pageSource:"list_page",transactionStatus:Ct?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:_i,showCOT:I,onCOTView:ge,menuPlacement:w})})}):t.jsx(ix,{children:t.jsxs(uo,{isHovered:x,isQuickViewMode:C,showOutline:!C&&nn&&He?.isPreFilled!==!0&&!y&&Ct,children:[Ae(),t.jsx(ex,{onClick:oi,"data-testid":D("vendor-name-text",S),children:He!=null&&He.name?t.jsx(qe,{text:He.name,itemTextStyle:{color:x?H.colors.primary:H.colors.hero}}):t.jsx(nx,{children:Ht})})]})})})]},xt);case"category":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:Ct,isEnabled:!!a[ze]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:Pn,onRecommendationClick:ne,selectedValue:N,selectedValueLabel:ri,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:Te===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),E(!1),Mn(!0))},"data-testid":D("category-selection-field",W),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addCategory]})}):ii===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(fa,{isHovered:x,"data-testid":D("category-selection-dropdown-container",W),children:t.jsx(Ss,{name:W,placeholder:St.addCategory,valueToId:ct=>Xe(ct),type:"category",pageSource:"list_page",transactionStatus:Ct?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:N,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ii,autoFocus:!Te&&(!N||a[ze]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[ze].qboId)),onMenuClose:tn,customStyleConfig:h,disableCurrentOption:et,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:Pn&&a[ze]?.isPreFilled!==!0&&!y&&Ct,children:t.jsx(ya,{onClick:Ni,"data-testid":D("category-label-text",W),children:t.jsx(qe,{text:ri??"",itemTextStyle:{color:x?H.colors.primary:H.colors.hero}})})})})]},xt)}case"class":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:Ct,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:li,onRecommendationClick:ne,selectedValue:J,selectedValueLabel:At,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:G===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),je(!1),tt(!0))},"data-testid":D("class-selection-field",_),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:On,children:t.jsx(fa,{isHovered:x,"data-testid":D("class-selection-dropdown-container",_),children:t.jsx(Ss,{name:_,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:I,defaultValue:{selectedOption:J,allOptions:ve},pageSource:"list_page",transactionStatus:Ct?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!G&&!J,customStyleConfig:h,onMenuClose:On,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&Ct,children:t.jsx(ya,{"data-testid":D("class-selection-field",_),onClick:Vi,children:t.jsx(qe,{text:At??"",itemTextStyle:{color:x?H.colors.primary:H.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(Fo,{"data-testid":D("date-field",Ut(S,ut,c.toString())),children:t.jsx(ro,{style:{color:x?H.colors.primary:H.colors.hero},children:B!=null?B.format(R1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,"data-testid":D("transaction-type-field",Ut(S,ut,c.toString())),isLastItem:vt===Se.length-1,children:U!=null?t.jsx(Hc,{textColor:x?new qo(H.colors.primary):Wc(void 0,H),text:U??L}):null})},xt);case"amount":{const Ve=nt("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:ie&&!C?f[0]:f[4]},wrapperWidth:Le.width,isQuickViewMode:C,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Fo,{"data-testid":D("transaction-amount-field",Ut(S,ut,c.toString())),style:{color:x?H.colors.primary:H.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(L==="expense"||L==="check"||L==="bill_payment"||L==="vendor_credit"||L==="credit_card_credit"||L==="deposit"||L==="sales_receipt"||L==="refund"||L==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(ro,{style:{textAlign:"center",width:"100%"},children:Ht})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,Fn=m?.paymentTypeName,ci=ct==="credit_card"?V1:ct==="cash"?N1:ct==="check"?H1:ct==="ach"?cx:U1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+pa,amount:Ve??Ht},...Fn!=null?[{text:St.paymentAccountTooltip.methodLabel+pa,amount:Fn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(xe,{display:"flex",placement:"bottom",variant:"list-description",data:ft,title:Ve??Ht,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(_1,{"data-testid":D("payment-account",S),style:{color:x?H.colors.primary:H.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?H.colors.primary:H.colors.hero}}),t.jsx(ro,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Ht})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=O?.fetchState==="In-Progress",Fn=ft=>{if(ft.stopPropagation(),Ve.length===0||m==null)return;if(Xt==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}Qe(Ve[0]),Ie(0),Lt(!0);const Bn=Ve.map(on=>on.id),di=`${Xt}/transaction_attachments`;vr(di,M,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:Bn}).then(on=>{wt(on),on.length>0&&ye(on[0])})},ci=ft=>{ft.stopPropagation(),wn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,"data-testid":D("memo-field",Ut(S,ut,c.toString())),children:t.jsxs(ax,{onClick:ft=>ft.stopPropagation(),children:[K!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:K,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(q1,{"data-testid":D("memo-icon",S),style:{color:x?H.colors.primary:H.colors.hero}})}):t.jsx(W1,{style:{margin:0},children:Ht}),ct?t.jsx(Jn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:T1,enterDelay:600,children:t.jsx(Ci,{"data-testid":D("upload-receipt-icon",S),style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:L1,enterDelay:600,children:t.jsx(rx,{"data-testid":D("view-receipt-icon",S),style:{color:x?H.colors.primary:H.colors.hero},onClick:Fn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(lx,{"data-testid":D("view-receipts-icon",S),style:{color:x?H.colors.primary:H.colors.hero},onClick:Fn})}),t.jsx(Uo,{name:`transaction-receipt-${u.transactionId}`,fileRef:wn,sizeLimit:Ii,multiple:!0,acceptableTypes:[...Rr],onFileChange:ft=>{const Bn=ft.target.files;if(Bn!=null&&Bn.length>0){const di=Array.from(Bn);ae(T,u.transactionId,L??qt,di,di.map(on=>on.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],zn=yn??lt[0];return t.jsxs(t.Fragment,{children:[Ui(F),pt&&lt.length>0&&zn!=null?Mi.createPortal(t.jsx(gr,{allFiles:_e,fileSource:Je,file:zn,title:zn.fileName,attachments:lt,showNavigation:!1,setFileSource:ye,setShowFullScreenView:Lt,onCrossClick:()=>{Lt(!1),ye(null),wt([]),Qe(void 0),Ie(0)},onNextClick:()=>{const ie=(Ee+1)%lt.length;Ie(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie])},onPreviousClick:()=>{const ie=(Ee-1+lt.length)%lt.length;Ie(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie])},setSelectedFileAttachment:ie=>{Qe(typeof ie=="function"?Se=>ie(Se??lt[0]):ie)},handleTouchStart:ie=>bt(ie.targetTouches[0].clientX),handleTouchMove:ie=>Zt(ie.targetTouches[0].clientX),handleTouchEnd:()=>{if(bn-Yt>50&&Yt!==0&&Ee<lt.length-1){const ie=Ee+1;Ie(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie]),bt(0),Zt(0)}else if(bn-Yt<-50&&Yt!==0&&Ee>0){const ie=Ee-1;Ie(ie),Qe(lt[ie]),_e[ie]!=null&&ye(_e[ie]),bt(0),Zt(0)}}}),document.body):null]})},ma=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1,type:d})=>e?i?h?t.jsx(Q1,{"data-testid":D("recommendation-icon",d)}):t.jsx(J1,{"data-testid":D("recommendation-icon",d)}):h?t.jsx(K1,{"data-testid":D("recommendation-icon",d)}):t.jsx(G1,{className:"ai-icon-selected-plain","data-testid":D("recommendation-icon",d)}):!e&&l||r?h?t.jsx(Z1,{"data-testid":D("recommendation-icon",d)}):t.jsx(Y1,{"data-testid":D("recommendation-icon",d)}):null,ga=({isFirstColumn:e,children:i})=>t.jsx(xl,{isFirstColumn:e,children:i}),ao=({recommendations:e,isCOTEnabled:i,type:l,isReviewTab:r,selectedValueLabel:h,isFirstColumn:d,isEnabled:a=!1,isMisCategorized:c=!1,selectedValue:u,existingOption:m,cotTracking:p,lineId:g,openTooltipId:x,transactionId:y,isAccountOptionDisabled:C,onRecommendationClick:S,setOpenTooltipId:$})=>{const v=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===v,I=Xc().analytics,{createAlternateRecommendationCallback:w}=ed(),k=s.useCallback(V=>{const q=e[1],M=e[0];w(l,{currentValue:h??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(O,ae,B,L)=>{p.onCOTView?.(O,ae,B,L)}}:void 0},q,M)(V)},[w,e,h,r,l,p,g,y]),j=td(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",S,k,u,C),b=nd(e,l),z=s.useCallback(()=>{$(v);const V=j?.recommendations[0]?.cot??[],q=j?.recommendations[1]?.cot??[],M=q.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:h??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:V,isRecommendationCotAvailable:V.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:fs(ys(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:q,isAlternativeRecommendationCotAvailable:M,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:M?fs(ys(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const O=id(j);O!=null&&p.onCOTView(g,y,l,O)}},[I,j,r,h,l,g,y,v,$]),A=s.useCallback(()=>{x===v&&$(void 0)},[x,v,$]),R=s.useMemo(()=>!u||!b?!1:e.some(V=>l==="vendor"&&V.vendor!=null?V.vendor.id===u||V.vendor.qboId===u:l==="category"&&V.account!=null?V.account.qboId===u||V.account.accountId===u:l==="class"&&V.class!=null?V.class.classId===u:!1),[u,b,e,l]);if(!b)return t.jsx(xl,{isFirstColumn:d});const F=a||R;return j?t.jsx(ga,{isFirstColumn:d,children:t.jsx(xe,{variant:"chain-of-thought",data:j,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:T,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:z,onClose:A,children:t.jsx(X1,{"data-testid":D("recommendation-icon",l),children:t.jsx(ma,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T})})})}):t.jsx(ga,{isFirstColumn:d,children:t.jsx(ma,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T,type:l})})},ml=({isTransactionActivityEnabled:e})=>{const i=Ce(),l=Ze(),r=l?rs:as(e);return t.jsx(O1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,d)=>{const a=`${d}${I1}${h.key}`;switch(h.key){case"activity":return t.jsx(gl,{},a);case"vendor":return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:l?{paddingLeft:n.sp0}:{paddingLeft:n.sp3},children:t.jsx(hn,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Fo,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const c=d===r.length-1;return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:{marginRight:c&&l?f[4]:void 0},children:t.jsx(hn,{windowSize:i,isLastItem:c,children:t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},gl=o.div`
1300
+ `,oo="expenseAutomationTransactionsPage",pn="transactionCategorizationListTable",Pe="account",ut="class",jt="lineEntitySelection",b1="lineEntity",C1="recommendations",ul="lineInfo",v1="vendorDetails",S1="customerDetails",Ri="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,k1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),hl=e=>s.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),j1=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"})),$1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:I1,hyphen:Wt,empty:qt,colon:ha},tooltips:{addReceipt:T1,viewReceipt:L1,viewReceipts:A1}},expenseAutomation:{transactions:St},dateFormat:R1}=me.getLocalizedStrings(),Bt={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[1],f[2]),containerPaddingTopBottomEmpty:new Q(f[2],f[3]),nameLogoWidth:new Q(f[2],f[4]),nameLogoHeight:new Q(f[2],f[4])},E1=({transactionView:e,transaction:i,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,selectedTab:d,containerRef:a,listContainerRef:c,isCOTEnabled:u,cotTracking:m,onTransactionCategorizationRowClick:p,setCurrentTransactionInAction:g,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:$,isTransactionActivityEnabled:v,authParams:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Xe(),[j,b]=s.useState(!1),[P,A]=s.useState(!1),{lineItemById:R,sortedLineItems:F}=i.transactionReviewLocalData,V=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],q=F.filter(z=>V.indexOf(z)!==-1),M=[];q.forEach(z=>{M.push(R[z])});const{accountList:O,accountsHierarchyList:re,classHierarchyList:B,classList:L,uncategorizedAccounts:U,transactions:X,selectedCheckBoxTransactionIds:ce}=e,ge=e.uploadReceiptStatusById,te=ce.includes(i.transactionId),J=Tt(),ee={control:()=>({marginLeft:-2,backgroundColor:j?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:j||te?J.colors.primary:J.colors.hero,paddingLeft:f[2]}),input:z=>({...z,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:z=>({...z,zIndex:10})},H={...ee,singleValue:z=>({...z,color:j||te?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:z=>({...z,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left"})},_=X.find(z=>z.id===i.transactionId),ne=(z,oe)=>{const{transactionType:Y}=oe.transactionReviewLocalData;let G=z.target;for(;G;){if(G.classList.contains("select-value-container")||G.classList.contains("item-value-container")||G.classList.contains("grouped-single-select-field__value-container")||G.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||G.classList.contains("grouped-single-select-field__input")||G.classList.contains("grouped-single-select-field__menu"))return;G=G.parentElement}Y!=null&&p(oe.transactionId,Y)},W=s.useRef(null),[Z,ie]=s.useState(void 0),[K,N]=s.useState("bottom");return s.useEffect(()=>{if(Z===void 0)return;const z=c?.current?._outerRef??null,oe=()=>{const Y=W.current;if(Y==null||z==null)return;const G=Y.getBoundingClientRect(),ke=z.getBoundingClientRect(),Ie=z.scrollTop+(G.bottom-ke.top),E=z.scrollHeight-Ie;N(E>=288?"bottom":"top")};return oe(),window.addEventListener("resize",oe),z?.addEventListener("scroll",oe),()=>{window.removeEventListener("resize",oe),z?.removeEventListener("scroll",oe)}},[c,Z]),t.jsxs(M1,{onMouseEnter:k?void 0:()=>b(!0),onMouseLeave:k?void 0:()=>b(!1),children:[t.jsx(z1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:k,isHovered:j,children:t.jsx(P1,{children:M.map((z,oe)=>t.jsx(F1,{ref:Z===oe?W:void 0,"data-testid":D("transaction-categorization-list-row",z.lineId),windowSize:w,isQuickViewMode:k,onClick:Y=>ne(Y,i),children:t.jsx(D1,{isTransactionActivityEnabled:v,line:z,isHovered:j||te,isSelected:te,isQuickViewMode:k,lineIndex:oe,sectionId:l,transaction:i,currentTransaction:_,windowSize:w,accountsHierarchyList:re,classHierarchyList:B,allAccountList:O,allClassList:L,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:ee,customStyleAutoComplete:H,recommendations:z.recommendationsWithCOT,selectedTab:d,isCOTEnabled:u,menuPlacement:K,cotTracking:m,openTooltipId:y,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:S,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>ie(void 0),onDropdownOpen:()=>ie(oe)})},`${i.transactionId}.${z.lineId}`))},i.transactionId)},i.transactionId),v===!0&&!k&&t.jsx(ox,{className:"activity-log-icon","data-testid":D("activity-log-icon",i.transactionId),onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:z=>{z.stopPropagation(),$(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(sx,{style:{color:P?J.colors.primary:J.colors.hero}})})})]})},D1=({accountsHierarchyList:e,allAccountList:i,allClassList:l,classHierarchyList:r,customStyle:h,customStyleAutoComplete:d,line:a,lineIndex:c,transaction:u,currentTransaction:m,windowSize:p,uncategorizedAccounts:g,isHovered:x=!1,isSelected:y=!1,isQuickViewMode:C=!1,sectionId:S,recommendations:$,vendorSearchAutoCompleteData:v,selectedTab:T,isCOTEnabled:I,menuPlacement:w,cotTracking:k,openTooltipId:j,setCurrentTransactionInAction:b,vendorLoadOptions:P,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:R,isTransactionActivityEnabled:F,onDropdownClose:V,onDropdownOpen:q,authParams:M,uploadReceiptStatus:O,onUploadTransactionReceipt:re})=>{const{transactionDate:B,transactionType:L,transactionTypeName:U,memo:X}=u.transactionReviewLocalData,{setValue:ce}=qo(),ge=s.useCallback((se,Te)=>{k?.onCOTView!=null&&k.onCOTView(a.lineId,u.transactionId,se,Te)},[k,a.lineId,u.transactionId]),te=a.lineDescription,J=s.useMemo(()=>{if(te||X)return[{title:St.description,description:te||Wt},{title:St.header.memo,description:X||Wt}]},[X,te]),ee=Ut(S,jt,c.toString()),H=Ut(S,Pe,c.toString()),_=Ut(S,ut,c.toString()),ne=(se,Te)=>{if(C)return;let Ae;switch(Te){case"vendor":Ae=ee;break;case"category":Ae=H;break;case"class":Ae=_;break;default:return}ce(`${Ae}.selectedOption`,se,{shouldValidate:!0,shouldDirty:!0})},W=Tt(),Z=s.useMemo(()=>m!=null&&rn(m)===!0?{id:u.transactionReviewLocalData.customer?.id??"",logo:u.transactionReviewLocalData.customer?.logo,name:u.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,u.transactionReviewLocalData.customer?.id,u.transactionReviewLocalData.customer?.logo,u.transactionReviewLocalData.customer?.name]),ie=s.useMemo(()=>m!=null&&rn(m)===!0?{id:u.transactionReviewLocalData.vendor?.id??"",logo:u.transactionReviewLocalData.vendor?.logo,name:u.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,u.transactionReviewLocalData.vendor?.id,u.transactionReviewLocalData.vendor?.logo,u.transactionReviewLocalData.vendor?.name]),K=a[ut]?.classId,N=a[Pe]?.qboId??a[Pe]?.accountId,z=Z?.id,oe=ie?.id,Y=ie?.name,[G,ke]=s.useState(!K),[Ie,E]=s.useState(!N||a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!0),[de,je]=s.useState(!oe||!z),Me=se=>$?.find(Te=>Te.vendor?.qboId===se||Te.vendor?.id===se||Te.vendor?.name===se)?.vendor?.reason??"",De=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=jr(e,De),ve=kr(r,De),et=se=>i.filter(Te=>Te.qboId===se)[0]?.qboId,ht=se=>l.filter(Te=>Te.classId===se)[0]?.accountingClassNumber??void 0,tt=s.useCallback(se=>_n(g,se,R===!0?["income"]:void 0),[g,R]),[fe,Be]=s.useState(!1),[Vt,nt]=s.useState(!1),[pt,Lt]=s.useState(!1),[Ee,$e]=s.useState(0),[Ke,ye]=s.useState(null),[_e,wt]=s.useState([]),[fn,Qe]=s.useState(void 0),yn=s.useRef(null),[wn,bt]=s.useState(0),[Yt,Zt]=s.useState(0),Xt=_c()?.url,[ti,Dn]=s.useState(!1),_i=(se,Te)=>{b({transactionId:u.transactionId,lineItemId:a.lineId}),P(se,Te)},en=()=>{je(!(oe||z)),Be(!1),V?.()},tn=()=>{N&&a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0),Dn(!1),V?.()},Mn=()=>{ke(!K),nt(!1),V?.()},ni=()=>{C||(oe||z)&&(Be(!0),q?.())},Vi=()=>{C||(nt(!0),q?.())},Ni=()=>{C||(Dn(!0),q?.())};s.useEffect(()=>{N&&a[Pe]?.qboId!=null&&_n(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0)},[N]),s.useEffect(()=>{ke(!K)},[K]),s.useEffect(()=>{je(!(oe||z))},[oe,z]);const ii=u.transactionReviewLocalData.selectedEntity,oi=u.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,We=m!=null&&rn(m)===!0?ii:oi,bn=s.useMemo(()=>{const se=u.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Te=v.entityAutoCompleteView;return{selectedOption:We?.qboId??We?.id,defaultOptions:Uo(Te,We,se??[])}},[We,u.transactionReviewLocalData.lineItemById,a.lineId,v.entityAutoCompleteView]),Le=()=>We!=null&&We.logo!=null?t.jsx(Yn,{photoUrl:We.logo.toString(),styles:{width:Bt.nameLogoWidth.valuePx(p),height:Bt.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(ga,{children:t.jsx(Jt,{name:We.name,size:n.sp4})})}):We!=null&&We.name!=null?t.jsx(ga,{children:t.jsx(Jt,{name:We.name,size:n.sp4})}):null,Ge=(se,Te)=>{if(Te==null||!Te)return;let Ae=[];return se.forEach(Ot=>{Ae=Ae.concat(Ot.options)}),Ae.find(Ot=>Ot.value===Te)?.label??Te},Ct=Ge(ve,K),si=Ge(Fe,N),vt=T==="review",ai=Hi("vendor",bn.defaultOptions,bn.selectedOption),ri=Hi("category",Fe,N),li=Hi("class",ve,K),Ui=se=>{const Te=C?as:ss(se);return Te.map((Ae,Ot)=>{const xt=`${u.transactionId}_${Ae.key}_${a.lineId}`;if(c>0&&m!=null&&rn(m)===!0&&Ae.key==="vendor")return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C},xt);if(c>0&&(Ae.key==="transaction_type"||Ae.key==="payment_account"||Ae.key==="memo_and_receipt"))return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C},xt);switch(Ae.key){case"activity":return t.jsx(ml,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,isQuickViewMode:C,className:"item-value-container",children:[!C&&t.jsx(so,{isCOTEnabled:I,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!We?.isPreFilled,isMisCategorized:ai,onRecommendationClick:ne,selectedValue:oe,selectedValueLabel:Y,isReviewTab:vt,isAccountOptionDisabled:tt,existingOption:{label:m!=null&&rn(m)===!0?m?.vendor?.name:void 0,value:m!=null&&rn(m)===!0?m?.vendor?.id:void 0},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:de===!0?t.jsx(lo,{isHovered:x,isQuickViewMode:C,children:t.jsxs(ro,{onClick:Ve=>{Ve.stopPropagation(),!C&&(q?.(),je(!1),Be(!0))},"data-testid":D("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(tx,{"data-testid":D("vendor-selection-dropdown-container",Ut(S,jt,c.toString())),children:t.jsx(Hc,{name:ee,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:bn.selectedOption,defaultOptions:bn.defaultOptions},type:"vendor",autoFocus:!de,style:{width:"100%"},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:_i,showCOT:I,onCOTView:ge,menuPlacement:w})})}):t.jsx(ix,{children:t.jsxs(co,{isHovered:x,isQuickViewMode:C,showOutline:!C&&ai&&We?.isPreFilled!==!0&&!y&&vt,children:[Le(),t.jsx(ex,{onClick:ni,"data-testid":D("vendor-name-text",S),children:We!=null&&We.name?t.jsx(qe,{text:We.name,itemTextStyle:{color:x?W.colors.primary:W.colors.hero}}):t.jsx(nx,{children:Wt})})]})})})]},xt);case"category":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,className:"item-value-container",children:[t.jsx(so,{isCOTEnabled:I,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[Pe]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:ri,onRecommendationClick:ne,selectedValue:N,selectedValueLabel:si,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:Ie===!0?t.jsx(lo,{isHovered:x,children:t.jsxs(ro,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),E(!1),Dn(!0))},"data-testid":D("category-selection-field",H),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addCategory]})}):ti===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(xa,{isHovered:x,"data-testid":D("category-selection-dropdown-container",H),children:t.jsx(vs,{name:H,placeholder:St.addCategory,valueToId:ct=>et(ct),type:"category",pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:N,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ti,autoFocus:!Ie&&(!N||a[Pe]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[Pe].qboId)),onMenuClose:tn,customStyleConfig:h,disableCurrentOption:tt,menuPlacement:w,onCOTView:ge})})}):t.jsx(co,{isHovered:x,showOutline:ri&&a[Pe]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(fa,{onClick:Ni,"data-testid":D("category-label-text",H),children:t.jsx(qe,{text:si??"",itemTextStyle:{color:x?W.colors.primary:W.colors.hero}})})})})]},xt)}case"class":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Ae.width,className:"item-value-container",children:[t.jsx(so,{isCOTEnabled:I,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:vt,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:tt,isMisCategorized:li,onRecommendationClick:ne,selectedValue:K,selectedValueLabel:Ct,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:k,lineId:a.lineId,transactionId:u.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(uo,{children:G===!0?t.jsx(lo,{isHovered:x,children:t.jsxs(ro,{onClick:ct=>{ct.stopPropagation(),!C&&(q?.(),ke(!1),nt(!0))},"data-testid":D("class-selection-field",_),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(Ci,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:Mn,children:t.jsx(xa,{isHovered:x,"data-testid":D("class-selection-dropdown-container",_),children:t.jsx(vs,{name:_,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:I,defaultValue:{selectedOption:K,allOptions:ve},pageSource:"list_page",transactionStatus:vt?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!G&&!K,customStyleConfig:h,onMenuClose:Mn,menuPlacement:w,onCOTView:ge})})}):t.jsx(co,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&vt,children:t.jsx(fa,{"data-testid":D("class-selection-field",_),onClick:Vi,children:t.jsx(qe,{text:Ct??"",itemTextStyle:{color:x?W.colors.primary:W.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(Po,{"data-testid":D("date-field",Ut(S,ut,c.toString())),children:t.jsx(ao,{style:{color:x?W.colors.primary:W.colors.hero},children:B!=null?B.format(R1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,"data-testid":D("transaction-type-field",Ut(S,ut,c.toString())),isLastItem:Ot===Te.length-1,children:U!=null?t.jsx(Uc,{textColor:x?new Ho(W.colors.primary):Wc(void 0,W),text:U??L}):null})},xt);case"amount":{const Ve=it("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:se&&!C?f[0]:f[4]},wrapperWidth:Ae.width,isQuickViewMode:C,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Po,{"data-testid":D("transaction-amount-field",Ut(S,ut,c.toString())),style:{color:x?W.colors.primary:W.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(L==="expense"||L==="check"||L==="bill_payment"||L==="vendor_credit"||L==="credit_card_credit"||L==="deposit"||L==="sales_receipt"||L==="refund"||L==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(ao,{style:{textAlign:"center",width:"100%"},children:Wt})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,zn=m?.paymentTypeName,ci=ct==="credit_card"?V1:ct==="cash"?N1:ct==="check"?W1:ct==="ach"?cx:U1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+ha,amount:Ve??Wt},...zn!=null?[{text:St.paymentAccountTooltip.methodLabel+ha,amount:zn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,children:t.jsx(un,{windowSize:p,isLastItem:Ot===Te.length-1,children:t.jsx(xe,{display:"flex",placement:"bottom",variant:"list-description",data:ft,title:Ve??Wt,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(_1,{"data-testid":D("payment-account",S),style:{color:x?W.colors.primary:W.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?W.colors.primary:W.colors.hero}}),t.jsx(ao,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Wt})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=O?.fetchState==="In-Progress",zn=ft=>{if(ft.stopPropagation(),Ve.length===0||m==null)return;if(Xt==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}Qe(Ve[0]),$e(0),Lt(!0);const Pn=Ve.map(nn=>nn.id),di=`${Xt}/transaction_attachments`;Cr(di,M,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:Pn}).then(nn=>{wt(nn),nn.length>0&&ye(nn[0])})},ci=ft=>{ft.stopPropagation(),yn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Ae.width,"data-testid":D("memo-field",Ut(S,ut,c.toString())),children:t.jsxs(ax,{onClick:ft=>ft.stopPropagation(),children:[J!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:J,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(q1,{"data-testid":D("memo-icon",S),style:{color:x?W.colors.primary:W.colors.hero}})}):t.jsx(H1,{style:{margin:0},children:Wt}),ct?t.jsx(Hn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:T1,enterDelay:600,children:t.jsx(Ci,{"data-testid":D("upload-receipt-icon",S),style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:L1,enterDelay:600,children:t.jsx(rx,{"data-testid":D("view-receipt-icon",S),style:{color:x?W.colors.primary:W.colors.hero},onClick:zn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(lx,{"data-testid":D("view-receipts-icon",S),style:{color:x?W.colors.primary:W.colors.hero},onClick:zn})}),t.jsx(No,{name:`transaction-receipt-${u.transactionId}`,fileRef:yn,sizeLimit:Ii,multiple:!0,acceptableTypes:[...Ar],onFileChange:ft=>{const Pn=ft.target.files;if(Pn!=null&&Pn.length>0){const di=Array.from(Pn);re(T,u.transactionId,L??qt,di,di.map(nn=>nn.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],On=fn??lt[0];return t.jsxs(t.Fragment,{children:[Ui(F),pt&&lt.length>0&&On!=null?Mi.createPortal(t.jsx(mr,{allFiles:_e,fileSource:Ke,file:On,title:On.fileName,attachments:lt,showNavigation:!1,setFileSource:ye,setShowFullScreenView:Lt,onCrossClick:()=>{Lt(!1),ye(null),wt([]),Qe(void 0),$e(0)},onNextClick:()=>{const se=(Ee+1)%lt.length;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se])},onPreviousClick:()=>{const se=(Ee-1+lt.length)%lt.length;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se])},setSelectedFileAttachment:se=>{Qe(typeof se=="function"?Te=>se(Te??lt[0]):se)},handleTouchStart:se=>bt(se.targetTouches[0].clientX),handleTouchMove:se=>Zt(se.targetTouches[0].clientX),handleTouchEnd:()=>{if(wn-Yt>50&&Yt!==0&&Ee<lt.length-1){const se=Ee+1;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se]),bt(0),Zt(0)}else if(wn-Yt<-50&&Yt!==0&&Ee>0){const se=Ee-1;$e(se),Qe(lt[se]),_e[se]!=null&&ye(_e[se]),bt(0),Zt(0)}}}),document.body):null]})},pa=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:h=!1,type:d})=>e?i?h?t.jsx(Q1,{"data-testid":D("recommendation-icon",d)}):t.jsx(K1,{"data-testid":D("recommendation-icon",d)}):h?t.jsx(J1,{"data-testid":D("recommendation-icon",d)}):t.jsx(G1,{className:"ai-icon-selected-plain","data-testid":D("recommendation-icon",d)}):!e&&l||r?h?t.jsx(Z1,{"data-testid":D("recommendation-icon",d)}):t.jsx(Y1,{"data-testid":D("recommendation-icon",d)}):null,ma=({isFirstColumn:e,children:i})=>t.jsx(gl,{isFirstColumn:e,children:i}),so=({recommendations:e,isCOTEnabled:i,type:l,isReviewTab:r,selectedValueLabel:h,isFirstColumn:d,isEnabled:a=!1,isMisCategorized:c=!1,selectedValue:u,existingOption:m,cotTracking:p,lineId:g,openTooltipId:x,transactionId:y,isAccountOptionDisabled:C,onRecommendationClick:S,setOpenTooltipId:$})=>{const v=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===v,I=Zc().analytics,{createAlternateRecommendationCallback:w}=Xc(),k=s.useCallback(V=>{const q=e[1],M=e[0];w(l,{currentValue:h??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(O,re,B,L)=>{p.onCOTView?.(O,re,B,L)}}:void 0},q,M)(V)},[w,e,h,r,l,p,g,y]),j=ed(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",S,k,u,C),b=td(e,l),P=s.useCallback(()=>{$(v);const V=j?.recommendations[0]?.cot??[],q=j?.recommendations[1]?.cot??[],M=q.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:h??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:V,isRecommendationCotAvailable:V.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:xs(fs(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:q,isAlternativeRecommendationCotAvailable:M,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:M?xs(fs(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const O=nd(j);O!=null&&p.onCOTView(g,y,l,O)}},[I,j,r,h,l,g,y,v,$]),A=s.useCallback(()=>{x===v&&$(void 0)},[x,v,$]),R=s.useMemo(()=>!u||!b?!1:e.some(V=>l==="vendor"&&V.vendor!=null?V.vendor.id===u||V.vendor.qboId===u:l==="category"&&V.account!=null?V.account.qboId===u||V.account.accountId===u:l==="class"&&V.class!=null?V.class.classId===u:!1),[u,b,e,l]);if(!b)return t.jsx(gl,{isFirstColumn:d});const F=a||R;return j?t.jsx(ma,{isFirstColumn:d,children:t.jsx(xe,{variant:"chain-of-thought",data:j,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:T,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:P,onClose:A,children:t.jsx(X1,{"data-testid":D("recommendation-icon",l),children:t.jsx(pa,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T})})})}):t.jsx(ma,{isFirstColumn:d,children:t.jsx(pa,{isEnabled:F,isReviewTab:r,isMisCategorized:c,hasRecommendations:b,isTooltipVisible:T,type:l})})},pl=({isTransactionActivityEnabled:e})=>{const i=Ce(),l=Xe(),r=l?as:ss(e);return t.jsx(O1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((h,d)=>{const a=`${d}${I1}${h.key}`;switch(h.key){case"activity":return t.jsx(ml,{},a);case"vendor":return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:l?{paddingLeft:n.sp0}:{paddingLeft:n.sp3},children:t.jsx(un,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Po,{children:[t.jsx(Zn,{width:f[4],height:f[4]}),t.jsx(ot,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const c=d===r.length-1;return t.jsx(mt,{windowSize:i,wrapperWidth:h.width,isQuickViewMode:l,style:{marginRight:c&&l?f[4]:void 0},children:t.jsx(un,{windowSize:i,isLastItem:c,children:t.jsx(ot,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},ml=o.div`
1301
1301
  width: ${n.sp0};
1302
1302
  height: ${n.sp0};
1303
1303
  `,M1=o.div`
@@ -1336,7 +1336,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1336
1336
  column-gap: ${n.sp4};
1337
1337
  min-width: min-content;
1338
1338
  `}
1339
- `,P1=o.div`
1339
+ `,z1=o.div`
1340
1340
  display: flex;
1341
1341
  height: 100%;
1342
1342
  background-color: ${e=>e.theme.colors.grey5};
@@ -1369,7 +1369,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1369
1369
  color: ${i.colors.primary};
1370
1370
  }
1371
1371
  `:null};
1372
- `,z1=o.div`
1372
+ `,P1=o.div`
1373
1373
  display: flex;
1374
1374
  flex: 1;
1375
1375
  flex-direction: column;
@@ -1423,22 +1423,22 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1423
1423
  overflow: hidden;
1424
1424
  text-overflow: ellipsis;
1425
1425
  display: -webkit-box;
1426
- `,hn=o(Re)`
1426
+ `,un=o(Re)`
1427
1427
  overflow: hidden;
1428
1428
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1429
1429
  display: flex;
1430
1430
  width: 100%;
1431
1431
  align-items: center;
1432
- `,Fo=o.div`
1432
+ `,Po=o.div`
1433
1433
  display: flex;
1434
1434
  flex-direction: row;
1435
1435
  column-gap: ${n.sp2};
1436
1436
  align-items: center;
1437
- `,ro=o(Re)`
1437
+ `,ao=o(Re)`
1438
1438
  ${B1};
1439
1439
  min-width: 0;
1440
1440
  color: ${e=>e.theme.colors.hero};
1441
- `,lo=o(Re)`
1441
+ `,ro=o(Re)`
1442
1442
  color: ${e=>e.theme.colors.hero};
1443
1443
  `,_1=o.div`
1444
1444
  display: flex;
@@ -1447,19 +1447,19 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1447
1447
  cursor: default;
1448
1448
  overflow: hidden;
1449
1449
  min-width: 0;
1450
- `,V1=o(Qc)`
1450
+ `,V1=o(Jc)`
1451
1451
  width: ${n.sp3};
1452
1452
  height: ${n.sp3};
1453
1453
  flex-shrink: 0;
1454
- `,N1=o(Gc)`
1454
+ `,N1=o(Qc)`
1455
1455
  width: ${n.sp3};
1456
1456
  height: ${n.sp3};
1457
1457
  flex-shrink: 0;
1458
- `,U1=o(Zc)`
1458
+ `,U1=o(Yc)`
1459
1459
  width: ${n.sp3};
1460
1460
  height: ${n.sp3};
1461
1461
  flex-shrink: 0;
1462
- `,H1=o(k1)`
1462
+ `,W1=o(k1)`
1463
1463
  width: ${n.sp3};
1464
1464
  height: ${n.sp3};
1465
1465
  flex-shrink: 0;
@@ -1472,18 +1472,18 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1472
1472
  &:hover {
1473
1473
  color: ${e=>e.theme.colors.primary};
1474
1474
  }
1475
- `,W1=o.div`
1475
+ `,H1=o.div`
1476
1476
  margin: ${n.sp3};
1477
1477
  `,q1=o(j1)`
1478
1478
  width: ${n.sp3};
1479
1479
  height: ${n.sp3};
1480
- `,J1=o(rd)`
1480
+ `,K1=o(ad)`
1481
1481
  width: ${n.sp5};
1482
1482
  height: ${n.sp5};
1483
- `,K1=o(Sd)`
1483
+ `,J1=o(Sd)`
1484
1484
  width: ${n.sp5};
1485
1485
  height: ${n.sp5};
1486
- `,Q1=o(ad)`
1486
+ `,Q1=o(sd)`
1487
1487
  width: ${n.sp5};
1488
1488
  height: ${n.sp5};
1489
1489
  `,G1=o(kd)`
@@ -1495,10 +1495,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1495
1495
  path {
1496
1496
  stroke-width: 2;
1497
1497
  }
1498
- `,Z1=o(ld)`
1498
+ `,Z1=o(rd)`
1499
1499
  width: ${n.sp3};
1500
1500
  height: ${n.sp3};
1501
- `,xl=o.div`
1501
+ `,gl=o.div`
1502
1502
  display: flex;
1503
1503
  align-items: center;
1504
1504
  justify-content: center;
@@ -1520,7 +1520,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1520
1520
  align-items: center;
1521
1521
  overflow: hidden;
1522
1522
  display: flex;
1523
- `,xa=o.div`
1523
+ `,ga=o.div`
1524
1524
  display: flex;
1525
1525
  `,tx=o.div`
1526
1526
  width: 100%;
@@ -1531,13 +1531,13 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1531
1531
  display: flex;
1532
1532
  align-items: center;
1533
1533
  flex-direction: row;
1534
- `,co=o.div`
1534
+ `,lo=o.div`
1535
1535
  padding: ${n.sp0} ${n.sp2};
1536
1536
  border-radius: ${n.sp1};
1537
1537
  margin-left: ${n.sp0};
1538
1538
  width: 100%;
1539
1539
  background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1540
- `,fa=o.div`
1540
+ `,xa=o.div`
1541
1541
  width: 100%;
1542
1542
  border-radius: ${n.sp1};
1543
1543
  padding-left: 2px;
@@ -1550,7 +1550,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1550
1550
  width: 100%;
1551
1551
  display: flex;
1552
1552
  padding-left: ${n.sp0};
1553
- `,uo=o.div`
1553
+ `,co=o.div`
1554
1554
  width: 100%;
1555
1555
  display: flex;
1556
1556
  flex-direction: row;
@@ -1562,7 +1562,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1562
1562
  background-color: ${e=>e.isQuickViewMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1563
1563
  outline: ${e=>e.showOutline?`1px dashed ${e.theme.colors.grey1}`:"none"};
1564
1564
  outline-color: ${e=>e.isHovered&&e.theme.colors.primary};
1565
- `,ya=o.div``,ho=o.div`
1565
+ `,fa=o.div``,uo=o.div`
1566
1566
  display: flex;
1567
1567
  align-items: center;
1568
1568
  width: calc(100% - ${n.sp5});
@@ -1574,7 +1574,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1574
1574
  visibility: hidden;
1575
1575
  flex-shrink: 0;
1576
1576
  margin-left: ${n.sp3};
1577
- `,sx=o(pl)`
1577
+ `,sx=o(hl)`
1578
1578
  width: ${n.sp3};
1579
1579
  height: ${n.sp3};
1580
1580
  `,ax=o.div`
@@ -1583,7 +1583,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1583
1583
  justify-content: center;
1584
1584
  width: 100%;
1585
1585
  gap: ${n.sp5};
1586
- `,rx=o(Cr)`
1586
+ `,rx=o(br)`
1587
1587
  width: ${n.sp3};
1588
1588
  height: ${n.sp3};
1589
1589
  cursor: pointer;
@@ -1591,11 +1591,11 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1591
1591
  width: ${n.sp3};
1592
1592
  height: ${n.sp3};
1593
1593
  cursor: pointer;
1594
- `,cx=o(Yc)`
1594
+ `,cx=o(Gc)`
1595
1595
  width: ${n.sp3};
1596
1596
  height: ${n.sp3};
1597
1597
  cursor: pointer;
1598
- `,dx=({sortConfig:e,fetchState:i,isDisabled:l,isTransactionActivityEnabled:r,onColumnSortConfigChanged:h})=>{const d=Ce();return t.jsxs(ux,{windowSize:d,children:[t.jsx(ul,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:h,"data-testid":D("transaction-categorization-list-empty-table-header")}),t.jsx(hx,{windowSize:d,"data-testid":D("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((a,c)=>t.jsx(ml,{isTransactionActivityEnabled:r,"data-testid":D("transaction-categorization-list-empty-row",c.toString())},c))})]})},ux=o.div`
1598
+ `,dx=({sortConfig:e,fetchState:i,isDisabled:l,isTransactionActivityEnabled:r,onColumnSortConfigChanged:h})=>{const d=Ce();return t.jsxs(ux,{windowSize:d,children:[t.jsx(dl,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:i==="In-Progress"?"readonly":l,onColumnSortConfigChanged:h,"data-testid":D("transaction-categorization-list-empty-table-header")}),t.jsx(hx,{windowSize:d,"data-testid":D("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((a,c)=>t.jsx(pl,{isTransactionActivityEnabled:r,"data-testid":D("transaction-categorization-list-empty-row",c.toString())},c))})]})},ux=o.div`
1599
1599
  display: block;
1600
1600
  min-height: 100%;
1601
1601
  flex-direction: column;
@@ -1610,7 +1610,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1610
1610
  min-height: 100%;
1611
1611
  flex-direction: column;
1612
1612
  row-gap: ${n.sp3};
1613
- `,{common:px,transactionDetail:{notCategorizedTooltipText:mx}}=me.getLocalizedStrings(),po={rowGap:new Q(f[0],f[2],f[3])},gx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,isCOTEnabled:h,isDisabled:d,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:c,vendorSearchAutoCompleteData:u,setCurrentTransactionInAction:m,vendorLoadOptions:p,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,containerRef:S,cotTracking:$,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Ze(),[j,b]=s.useState(void 0),{fetchState:z,uiState:A,transactionLocalData:R,selectedCheckBoxTransactionIds:F,transactionIdsWithUnsavedData:V,transactions:q,uncategorizedAccounts:M}=i;Gn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:z==="Completed"});const O=s.useRef(null),ae=s.useRef({}),{control:B}=Jo();s.useEffect(()=>{O.current?.resetAfterIndex(0,!0)},[w,O,R]),s.useEffect(()=>{O.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const L=s.useCallback(P=>{if(ae.current?.[P]!=null){const G=w==="small"&&A.pageToken==null&&P===R.length-1?po.rowGap.value("medium-regular"):po.rowGap.value(w);return ae.current[P]+G}if(R[P]==null)return 0;const se=R[P].transactionReviewLocalData,Y=Object.keys(se.lineItemById).length;return Y!=null&&!isNaN(Y)&&Y>1?ua*Y+po.rowGap.value(w)*(Y-1):ua},[R,w,A.pageToken,A.sortKey,A.sortOrder]),U=s.useCallback((P,se)=>{ae.current={...ae.current,[P]:se},O.current?.resetAfterIndex(0,!0)},[w,O,R,A.sortKey,A.sortOrder]),X=s.useCallback(()=>{(A.pageToken!=null&&i.refreshStatus.fetchState!=="In-Progress"||i.refreshStatus.fetchState==="Completed")&&C(e,A.searchString,!0,A.pageToken,!0,!1)},[i.refreshStatus.fetchState,C,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),ce=s.useCallback(()=>{A.pageToken!=null&&X()},[X,A.pageToken,A.sortKey,A.sortOrder]),ge=Lc(P=>y(e,{scrollPosition:{scrollTop:P}}),1e3,{trailing:!0}),te=P=>P<i.transactionLocalData.length,K=(P,se)=>{x(e,{sortOrder:se,sortKey:P}),C(e,A.searchString,!1,null,!1,!0)},ee=P=>{if(e==="autoCategorized")return!F.includes(P);const se=R.find(G=>G.transactionId===P)?.transactionReviewLocalData,Y=q.find(G=>G.id===P);return Y!=null&&se!=null?wd(Y,se,M,v)?v===!0&&Cs(M,se.lineItemById,["expense"])?V.includes(P)===!1:!1:!0:F.length===0?!0:!F.includes(P)};let W=[],_=[];(z==="Completed"||i.transactionLocalData.length>0)&&(_=i.transactionLocalData.map((P,se)=>{const Y=ee(P.transactionId);let G=!1;v===!0&&Y===!0&&e==="review"&&Cs(M,P.transactionReviewLocalData.lineItemById,["expense"])&&(G=!V.includes(P.transactionId));const je=P.transactionReviewLocalData;return{label:t.jsx(E1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${se}.${hl}`,transaction:P,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:u,selectedTab:e,containerRef:S,listContainerRef:O,isCOTEnabled:h,cotTracking:$,openTooltipId:j,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I},`${P.transactionId}.${je.transactionType}`),value:P.transactionId,defaultChecked:!1,groupLabel:!1,isException:G,exceptionMode:G===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Y===!0?"readonly":void 0,exceptionType:G===!0?"alert":void 0,exceptionInfo:G===!0?mx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),W=_.map(P=>P.value));const ne={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:H,subTitle:Z}=We("transaction_categorization").allDoneText,oe=R.map(P=>P.transactionId),J=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),N=s.useMemo(()=>R.reduce((P,se)=>{const Y=Object.keys(se.transactionReviewLocalData.lineItemById).length;return P+(Y>0?Y:1)},0)<i.totalCountByTab[e]?R.length+1:R.length,[R,i.totalCountByTab,e]);return t.jsx(bx,{windowSize:w,"data-testid":D("transaction-categorization-list-wrapper"),children:t.jsx(Cx,{windowSize:w,"data-testid":D("transaction-categorization-list-container"),children:z==="Error"?t.jsxs(Sx,{windowSize:w,"data-testid":D("transaction-categorization-reload-page"),children:[t.jsx(kx,{onClick:()=>C(e,void 0,!0,null,!1,!0),"data-testid":D("transaction-categorization-reload-icon"),children:t.jsx(No,{})}),t.jsx(jx,{"data-testid":D("transaction-categorization-reload-label"),children:px.reloadPage.label})]}):z==="Completed"&&R.length===0?t.jsx(It,{tab:"transaction_categorization",title:H,subTitle:Z,"data-testid":D("transaction-categorization-empty-table-section")}):z==="Not-Started"||z==="In-Progress"&&R.length===0?t.jsx(dx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:z,onColumnSortConfigChanged:K,"data-testid":D("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(vx,{windowSize:w,"data-testid":D("transaction-categorization-list-view"),children:t.jsx(wr,{control:B,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:P,ref:se,onChange:Y}})=>t.jsx(fl.Provider,{value:{value:P,mode:"off",allCheckBoxValues:W,index:0,isQuickViewMode:k,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:z,isDisabled:d,groupLabelCheckBox:ne,isTransactionActivityEnabled:c,onColumnSortConfigChanged:K,ref:se,onChange:Y,selectedTab:e},children:t.jsx(Kn,{children:({height:G,width:je})=>t.jsx(ir,{isItemLoaded:te,itemCount:J,loadMoreItems:ce,children:({onItemsRendered:Te,ref:E})=>t.jsx(zi,{ref:de=>{E(de),O.current=de},height:G,itemCount:N,itemKey:de=>`${R[de]?.transactionId??""}-row-${de}`,innerElementType:xx,onItemsRendered:Te,width:je,style:{willChange:"auto"},overscanCount:Hg,itemSize:L,itemData:{checkboxes:_,value:P,allCheckBoxValues:W,groupLabelCheckBox:ne,categorizationGroupValue:oe,transactionLocalData:R,isQuickViewMode:k,mode:"always_on",setRowHeight:U,isItemLoaded:te,ref:E,onChange:Y,selectedCheckBoxTransactionIds:F,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:de})=>{ge(de)},children:yx})})})})})})})})},xx=e=>{const{isQuickViewMode:i,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,index:d,isDisabled:a,fetchState:c,sortKey:u,sortOrder:m,mode:p,isTransactionActivityEnabled:g,ref:x,onChange:y,onColumnSortConfigChanged:C}=fx(),S=Tt(),{children:$,style:v,...T}=e;return c==="Completed"?t.jsxs($x,{ref:x,style:{...v,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Ix,{children:t.jsx(Eo,{selectionLimit:qn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:S.colors.grey4},checkBox:{label:t.jsx(wx,{isQuickViewMode:i,children:t.jsx(ul,{isTransactionActivityEnabled:g,sortConfig:{sortKey:u,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:C})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:h,allCheckBoxValues:r,mode:i?"off":p,draggable:!1,checkBoxStyle:i?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},name:"transactionCategorizationHeader",index:d,onChangeHandler:I=>Ir({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,onChange:y}),ref:x})}),t.jsx(Tx,{children:$})]},`${r[d]}-${d}`):null},fl=s.createContext(void 0),fx=()=>{const e=s.useContext(fl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},yx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=Pi(),{checkboxes:h,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:u,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:C,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:$}=l,v=s.useRef(null),T=Ce();if(s.useEffect(()=>{v.current?.firstElementChild!=null&&x(e,v.current.firstElementChild.clientHeight)},[e,v,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=h[e],w=r!=null&&r===c[e];return t.jsx(wa,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{selectionLimit:qn,checkBox:p===!0?{...I,isException:!1}:I,value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:p===!0||I.isDisabled==="readonly"||S.includes(I.value)===!1&&S.length>=qn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${mn}.${d}`,ref:y,index:e,onChangeHandler:k=>Ir({event:k,value:d,allCheckBoxValues:u,groupLabelCheckBox:a,onChange:C})})},c[e])}else return t.jsx(wa,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{checkBox:{label:t.jsx(ml,{isTransactionActivityEnabled:$}),value:"loading",defaultChecked:!1,groupLabel:!1},value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:"off",draggable:!1,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},ur())},wx=o.div`
1613
+ `,{common:px,transactionDetail:{notCategorizedTooltipText:mx}}=me.getLocalizedStrings(),ho={rowGap:new Q(f[0],f[2],f[3])},gx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,isCOTEnabled:h,isDisabled:d,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:c,vendorSearchAutoCompleteData:u,setCurrentTransactionInAction:m,vendorLoadOptions:p,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:C,containerRef:S,cotTracking:$,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const w=Ce(),k=Xe(),[j,b]=s.useState(void 0),{fetchState:P,uiState:A,transactionLocalData:R,selectedCheckBoxTransactionIds:F,transactionIdsWithUnsavedData:V,transactions:q,uncategorizedAccounts:M}=i;Jn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:P==="Completed"});const O=s.useRef(null),re=s.useRef({}),{control:B}=qo();s.useEffect(()=>{O.current?.resetAfterIndex(0,!0)},[w,O,R]),s.useEffect(()=>{O.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const L=s.useCallback(z=>{if(re.current?.[z]!=null){const G=w==="small"&&A.pageToken==null&&z===R.length-1?ho.rowGap.value("medium-regular"):ho.rowGap.value(w);return re.current[z]+G}if(R[z]==null)return 0;const oe=R[z].transactionReviewLocalData,Y=Object.keys(oe.lineItemById).length;return Y!=null&&!isNaN(Y)&&Y>1?da*Y+ho.rowGap.value(w)*(Y-1):da},[R,w,A.pageToken,A.sortKey,A.sortOrder]),U=s.useCallback((z,oe)=>{re.current={...re.current,[z]:oe},O.current?.resetAfterIndex(0,!0)},[w,O,R,A.sortKey,A.sortOrder]),X=s.useCallback(()=>{(A.pageToken!=null&&i.refreshStatus.fetchState!=="In-Progress"||i.refreshStatus.fetchState==="Completed")&&C(e,A.searchString,!0,A.pageToken,!0,!1)},[i.refreshStatus.fetchState,C,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),ce=s.useCallback(()=>{A.pageToken!=null&&X()},[X,A.pageToken,A.sortKey,A.sortOrder]),ge=Tc(z=>y(e,{scrollPosition:{scrollTop:z}}),1e3,{trailing:!0}),te=z=>z<i.transactionLocalData.length,J=(z,oe)=>{x(e,{sortOrder:oe,sortKey:z}),C(e,A.searchString,!1,null,!1,!0)},ee=z=>{if(e==="autoCategorized")return!F.includes(z);const oe=R.find(G=>G.transactionId===z)?.transactionReviewLocalData,Y=q.find(G=>G.id===z);return Y!=null&&oe!=null?wd(Y,oe,M,v)?v===!0&&bs(M,oe.lineItemById,["expense"])?V.includes(z)===!1:!1:!0:F.length===0?!0:!F.includes(z)};let H=[],_=[];(P==="Completed"||i.transactionLocalData.length>0)&&(_=i.transactionLocalData.map((z,oe)=>{const Y=ee(z.transactionId);let G=!1;v===!0&&Y===!0&&e==="review"&&bs(M,z.transactionReviewLocalData.lineItemById,["expense"])&&(G=!V.includes(z.transactionId));const ke=z.transactionReviewLocalData;return{label:t.jsx(E1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${oe}.${ul}`,transaction:z,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:u,selectedTab:e,containerRef:S,listContainerRef:O,isCOTEnabled:h,cotTracking:$,openTooltipId:j,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I},`${z.transactionId}.${ke.transactionType}`),value:z.transactionId,defaultChecked:!1,groupLabel:!1,isException:G,exceptionMode:G===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Y===!0?"readonly":void 0,exceptionType:G===!0?"alert":void 0,exceptionInfo:G===!0?mx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),H=_.map(z=>z.value));const ne={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:W,subTitle:Z}=He("transaction_categorization").allDoneText,ie=R.map(z=>z.transactionId),K=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),N=s.useMemo(()=>R.reduce((z,oe)=>{const Y=Object.keys(oe.transactionReviewLocalData.lineItemById).length;return z+(Y>0?Y:1)},0)<i.totalCountByTab[e]?R.length+1:R.length,[R,i.totalCountByTab,e]);return t.jsx(bx,{windowSize:w,"data-testid":D("transaction-categorization-list-wrapper"),children:t.jsx(Cx,{windowSize:w,"data-testid":D("transaction-categorization-list-container"),children:P==="Error"?t.jsxs(Sx,{windowSize:w,"data-testid":D("transaction-categorization-reload-page"),children:[t.jsx(kx,{onClick:()=>C(e,void 0,!0,null,!1,!0),"data-testid":D("transaction-categorization-reload-icon"),children:t.jsx(Vo,{})}),t.jsx(jx,{"data-testid":D("transaction-categorization-reload-label"),children:px.reloadPage.label})]}):P==="Completed"&&R.length===0?t.jsx(It,{tab:"transaction_categorization",title:W,subTitle:Z,"data-testid":D("transaction-categorization-empty-table-section")}):P==="Not-Started"||P==="In-Progress"&&R.length===0?t.jsx(dx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:P,onColumnSortConfigChanged:J,"data-testid":D("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(vx,{windowSize:w,"data-testid":D("transaction-categorization-list-view"),children:t.jsx(yr,{control:B,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:z,ref:oe,onChange:Y}})=>t.jsx(xl.Provider,{value:{value:z,mode:"off",allCheckBoxValues:H,index:0,isQuickViewMode:k,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:P,isDisabled:d,groupLabelCheckBox:ne,isTransactionActivityEnabled:c,onColumnSortConfigChanged:J,ref:oe,onChange:Y,selectedTab:e},children:t.jsx(qn,{children:({height:G,width:ke})=>t.jsx(nr,{isItemLoaded:te,itemCount:K,loadMoreItems:ce,children:({onItemsRendered:Ie,ref:E})=>t.jsx(Pi,{ref:de=>{E(de),O.current=de},height:G,itemCount:N,itemKey:de=>`${R[de]?.transactionId??""}-row-${de}`,innerElementType:xx,onItemsRendered:Ie,width:ke,style:{willChange:"auto"},overscanCount:Wg,itemSize:L,itemData:{checkboxes:_,value:z,allCheckBoxValues:H,groupLabelCheckBox:ne,categorizationGroupValue:ie,transactionLocalData:R,isQuickViewMode:k,mode:"always_on",setRowHeight:U,isItemLoaded:te,ref:E,onChange:Y,selectedCheckBoxTransactionIds:F,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:de})=>{ge(de)},children:yx})})})})})})})})},xx=e=>{const{isQuickViewMode:i,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,index:d,isDisabled:a,fetchState:c,sortKey:u,sortOrder:m,mode:p,isTransactionActivityEnabled:g,ref:x,onChange:y,onColumnSortConfigChanged:C}=fx(),S=Tt(),{children:$,style:v,...T}=e;return c==="Completed"?t.jsxs($x,{ref:x,style:{...v,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Ix,{children:t.jsx(Ro,{selectionLimit:Wn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:S.colors.grey4},checkBox:{label:t.jsx(wx,{isQuickViewMode:i,children:t.jsx(dl,{isTransactionActivityEnabled:g,sortConfig:{sortKey:u,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:C})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:h,allCheckBoxValues:r,mode:i?"off":p,draggable:!1,checkBoxStyle:i?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},name:"transactionCategorizationHeader",index:d,onChangeHandler:I=>$r({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:h,onChange:y}),ref:x})}),t.jsx(Tx,{children:$})]},`${r[d]}-${d}`):null},xl=s.createContext(void 0),fx=()=>{const e=s.useContext(xl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},yx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{checkboxes:h,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:u,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:C,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:$}=l,v=s.useRef(null),T=Ce();if(s.useEffect(()=>{v.current?.firstElementChild!=null&&x(e,v.current.firstElementChild.clientHeight)},[e,v,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=h[e],w=r!=null&&r===c[e];return t.jsx(ya,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Ro,{selectionLimit:Wn,checkBox:p===!0?{...I,isException:!1}:I,value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:p===!0||I.isDisabled==="readonly"||S.includes(I.value)===!1&&S.length>=Wn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${pn}.${d}`,ref:y,index:e,onChangeHandler:k=>$r({event:k,value:d,allCheckBoxValues:u,groupLabelCheckBox:a,onChange:C})})},c[e])}else return t.jsx(ya,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Ro,{checkBox:{label:t.jsx(pl,{isTransactionActivityEnabled:$}),value:"loading",defaultChecked:!1,groupLabel:!1},value:d,groupLabelCheckBox:a,allCheckBoxValues:u,mode:"off",draggable:!1,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},dr())},wx=o.div`
1614
1614
  flex: 1;
1615
1615
  width: auto;
1616
1616
  padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
@@ -1629,7 +1629,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1629
1629
  `,Sx=o.div`
1630
1630
  display: flex;
1631
1631
  width: 100%;
1632
- height: ${e=>`calc(100% - ${yr.valuePx(e.windowSize)})`};
1632
+ height: ${e=>`calc(100% - ${fr.valuePx(e.windowSize)})`};
1633
1633
  flex-direction: column;
1634
1634
  justify-content: center;
1635
1635
  align-items: center;
@@ -1648,10 +1648,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1648
1648
  color: ${e=>e.theme.colors.primary};
1649
1649
  }
1650
1650
  }
1651
- `,jx=o(ot)`
1651
+ `,jx=o(st)`
1652
1652
  margin-top: ${n.sp3};
1653
1653
  color: ${e=>e.theme.colors.hero};
1654
- `,wa=o.div`
1654
+ `,ya=o.div`
1655
1655
  top: ${n.sp0};
1656
1656
  left: ${n.sp0};
1657
1657
  padding-bottom: ${n.sp3};
@@ -1660,7 +1660,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1660
1660
  box-sizing: border-box;
1661
1661
  ${e=>e.isPanelSelected===!0&&le`
1662
1662
  .categorization-row-card {
1663
- ${Yo(e.theme)}
1663
+ ${Go(e.theme)}
1664
1664
  }
1665
1665
  `}
1666
1666
  `,$x=o.div`
@@ -1679,7 +1679,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1679
1679
  position: relative;
1680
1680
  width: auto;
1681
1681
  height: 100%;
1682
- `,Lx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,isCOTEnabled:a,isTransactionActivityEnabled:c,setCurrentFooterFormId:u,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:p,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:C,onUpdateSelectedCheckboxTransactionIds:S,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const[w,k]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),b=s.useRef({}),{useDynamicConfig:z}=pr(),{configValue:A}=z(mr.enableUncategorizedExpenseCategory),R=A?.uncategorized_expense_category_enabled===!0,F=(ee,W,_,ne)=>{const H={...b.current};H[W]==null&&(H[W]=[]);let Z=H[W].findIndex(oe=>oe.lineId===ee);if(Z===-1){const oe={lineId:ee,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};H[W].push(oe),Z=H[W].length-1}else{const oe=H[W][Z];H[W][Z]={...oe,category:{...oe.category,recommendationTypesViewed:[...oe.category.recommendationTypesViewed]},class:{...oe.class,recommendationTypesViewed:[...oe.class.recommendationTypesViewed]},vendor:{...oe.vendor,recommendationTypesViewed:[...oe.vendor.recommendationTypesViewed]}}}ne!=null&&ne!==""&&!H[W][Z][_].recommendationTypesViewed.includes(ne)&&H[W][Z][_].recommendationTypesViewed.push(ne),b.current=H},{transactions:V,transactionLocalData:q,accountsHierarchyList:M,classHierarchyList:O,accountList:ae,classList:B,selectedCheckBoxTransactionIds:L,uncategorizedAccounts:U}=i,X=xn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>Ca(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),values:s.useMemo(()=>Ca(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{u("expenseAutomationPage")},[]),s.useEffect(()=>{L.length>0?u(so):u("expenseAutomationPage")},[L,u]);const ce=X.handleSubmit(ee=>{const W=ee[Ri],_=b.current;C(e,W,_),W.forEach(ne=>{delete b.current[ne]})}),ge=async(ee,W)=>{if(ee!=null){if(ee===Ri){const _=X.getValues(Ri);if(_.length<L.length){S(e,_);return}if(_.length===qn){S(e,_);return}const ne=_[_.length-1],H=W[mn].findIndex(oe=>oe.transactionId===ne),Z=X.getValues(`${mn}.${H}.lineInfo`);if(Z!=null){let oe=!1;if(Z.every(J=>(oe=Nn(U,J[ze].selectedOption,R?["income"]:void 0),!!J[ze].selectedOption&&J[ze].selectedOption!=null&&!oe&&!!J[ut].selectedOption&&!!J[jt].selectedOption))===!0){S(e,_);return}else{const J=_.filter(N=>N!==ne);S(e,J);return}}return}if(ee.includes(ze)===!0||ee.includes(ut)===!0){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),H=X.getValues(`${mn}.${_}.lineInfo`),Z=H[ne];if(ee.includes(ze)||ee.includes(ut)){const{transactionId:oe,lineId:J,recommendations:N}=Z;if(H!=null){const P=Z[ze].selectedOption,se=Z[ut].selectedOption,Y=Z[jt].selectedOption,G=Z[jt].selectedOption,je=Z[jt].defaultOptions,Te=je?.find(fe=>fe.options?.find(Be=>Be.value===Y))?.options?.find(fe=>fe.value===Y)?.label,E=je?.find(fe=>fe.options?.find(Be=>Be.value===G))?.options?.find(fe=>fe.value===G)?.label,de=h.entityAutoCompleteView.vendor.find(fe=>fe.qboId===Y),$e=h.entityAutoCompleteView.customer.find(fe=>fe.qboId===G),Me=N.find(fe=>fe.vendor?.qboId===Y)?.vendor,De=Y||de?.qboId||Me?.qboId?{id:Y??de?.qboId??Me?.qboId??"",name:Te??de?.name??Me?.name??"",logo:de?.logo??Me?.logo}:void 0,Fe=G||$e?.qboId?{id:G??$e?.qboId??"",name:E??$e?.name??"",logo:$e?.logo}:void 0,ve=ae.find(fe=>fe.qboId===P),Xe=B.find(fe=>fe.classId===se),ht=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[J].account,et=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[J].class;m(e,oe,J,V,De?.id,Fe?.id,ee.includes(ze)&&ve!=null?{...ve,isPreFilled:!1}:ht,ee.includes(ut)&&Xe!=null?{...Xe,isPreFilled:!1}:et,void 0,N,R)}return}}if(ee.includes(jt)){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),H=X.getValues(`${mn}.${_}.lineInfo`);if(H!=null){const Z=H[ne],{transactionId:oe,recommendations:J}=Z,N=Z[jt].selectedOption,P=Z[jt].selectedOption,se=Z[jt].defaultOptions,Y=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===N)?.label,G=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===P)?.label,je=h.entityAutoCompleteView.vendor.find(ve=>ve.qboId===N),Te=h.entityAutoCompleteView.customer.find(ve=>ve.qboId===P),E=J.find(ve=>ve.vendor?.qboId===N)?.vendor,de=N!==""&&N!=null?N:Y!==""&&Y!=null?Y:"",$e=(je?.qboId!=null&&je.qboId!==""?je.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(N!=null&&N!==""?N:null),Me={id:$e??Y??"",name:Y??je?.name??E?.name??"",logo:je?.logo??E?.logo},De=Te?.qboId!=null&&Te.qboId!==""?{id:Te.qboId??P??"",name:G??Te.name??"",logo:Te.logo}:void 0,Fe=V.find(ve=>ve.id===oe);if(Fe!=null){const ve=i.transactionLocalData.find(Be=>Be.transactionId===Fe.id)?.transactionReviewLocalData,Xe=ve?.lineItemById[Z.lineId],ht=ln(Fe)===!0?ve?.selectedEntity:Xe?.selectedEntityLine,et=De?.id!=null&&De.id!==""?{id:De.id,name:De.name,type:"customer",qboId:De.id,zeniId:De.id,logo:De.logo}:Me.id!==""&&Me.id!=null?{id:de,name:Y??de,type:"vendor",qboId:de,zeniId:de,logo:Me.logo,isPreFilled:ht?.id===$e&&ht?.isPreFilled}:void 0,fe={transactionId:{id:Fe.id,type:Fe.type},transaction:Fe,lineIds:Fe.type!=="journal_entry"?Fe.lines?.map(Be=>Be.id)??[]:[Z.lineId]};et?.type==="customer"?v(Z.amount.amount,fe,!1,e,et,De,R):$(Z.amount.amount,fe,!1,e,et,Me,R)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const ee=X.watch((W,{name:_})=>{_!=null&&W!=null&&Yn(()=>ge(_,W))});return()=>{ee.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const ee=i.transactionLocalData.find(W=>W.transactionId===w.transactionId);if(ee){const{transactionReviewLocalData:W}=ee,{selectedEntity:_}=W,ne=w?.lineItemId??W.sortedLineItems[0],H=W.lineItemById[ne],Z=H.selectedEntityLine;j.current?.(Ho(h.entityAutoCompleteView,_??Z,H?.recommendationsWithCOT??[]))}k({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(ee,W)=>{d.onAutoCompleteInputChange?.(ee),j.current=W},K=s.useRef(null);return t.jsx(Rx,{ref:K,"data-testid":D("transaction-categorization-list-page"),children:t.jsx(fn,{...X,children:t.jsx("form",{id:ba(so),onSubmit:ce,style:{height:"100%",width:"100%"},"data-testid":D(ba(so)),children:t.jsx(gx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:k,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,containerRef:K,isCOTEnabled:a,cotTracking:{onCOTView:F},isUncategorizedExpenseCategoryEnabled:R,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})})})})},ba=e=>`${e}_form`,Ca=(e,i,l,r,h)=>({[mn]:i.map(d=>Ax(d.transactionId,d.transactionReviewLocalData,l,r,h)),[Ri]:e}),Ax=(e,i,l,r,h)=>{const{lineItemById:d,sortedLineItems:a,selectedEntity:c}=i,u=Object.values(d).sort((p,g)=>a.indexOf(p.lineId)-a.indexOf(g.lineId)),m=u[0]?.lineId;return{[hl]:u.map(p=>{const g=p.account?.qboId??p.account?.accountId,x=p.class?.classId,y=p.selectedEntityLine;return{id:p.id,transactionId:p.transactionId,type:p.type,amount:p.amount,lineDetailType:p.lineDetailType,platformLineDetailType:p.platformLineDetailType,lineTransactionType:p.lineTransactionType,postingType:p.postingType,postingTypeName:p.postingTypeName,customer:p.customer,vendor:p.vendor,billable:p.billable,item:p.item,isCategoryMiscategorized:p.isCategoryMiscategorized,isClassMiscategorized:p.isClassMiscategorized,lineId:p.id,[ze]:{selectedOption:g,allOptions:$r(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:jr(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Ho(h,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[b1]:p.lineEntity,[C1]:p.recommendationsWithCOT??[]}}),transactionId:e,[v1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[S1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Rx=o.div`
1682
+ `,Lx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,isCOTEnabled:a,isTransactionActivityEnabled:c,setCurrentFooterFormId:u,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:p,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:C,onUpdateSelectedCheckboxTransactionIds:S,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const[w,k]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),b=s.useRef({}),{useDynamicConfig:P}=hr(),{configValue:A}=P(pr.enableUncategorizedExpenseCategory),R=A?.uncategorized_expense_category_enabled===!0,F=(ee,H,_,ne)=>{const W={...b.current};W[H]==null&&(W[H]=[]);let Z=W[H].findIndex(ie=>ie.lineId===ee);if(Z===-1){const ie={lineId:ee,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};W[H].push(ie),Z=W[H].length-1}else{const ie=W[H][Z];W[H][Z]={...ie,category:{...ie.category,recommendationTypesViewed:[...ie.category.recommendationTypesViewed]},class:{...ie.class,recommendationTypesViewed:[...ie.class.recommendationTypesViewed]},vendor:{...ie.vendor,recommendationTypesViewed:[...ie.vendor.recommendationTypesViewed]}}}ne!=null&&ne!==""&&!W[H][Z][_].recommendationTypesViewed.includes(ne)&&W[H][Z][_].recommendationTypesViewed.push(ne),b.current=W},{transactions:V,transactionLocalData:q,accountsHierarchyList:M,classHierarchyList:O,accountList:re,classList:B,selectedCheckBoxTransactionIds:L,uncategorizedAccounts:U}=i,X=gn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>ba(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),values:s.useMemo(()=>ba(L,q,M,O,h.entityAutoCompleteView),[M,O,L,q,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{u("expenseAutomationPage")},[]),s.useEffect(()=>{L.length>0?u(oo):u("expenseAutomationPage")},[L,u]);const ce=X.handleSubmit(ee=>{const H=ee[Ri],_=b.current;C(e,H,_),H.forEach(ne=>{delete b.current[ne]})}),ge=async(ee,H)=>{if(ee!=null){if(ee===Ri){const _=X.getValues(Ri);if(_.length<L.length){S(e,_);return}if(_.length===Wn){S(e,_);return}const ne=_[_.length-1],W=H[pn].findIndex(ie=>ie.transactionId===ne),Z=X.getValues(`${pn}.${W}.lineInfo`);if(Z!=null){let ie=!1;if(Z.every(K=>(ie=_n(U,K[Pe].selectedOption,R?["income"]:void 0),!!K[Pe].selectedOption&&K[Pe].selectedOption!=null&&!ie&&!!K[ut].selectedOption&&!!K[jt].selectedOption))===!0){S(e,_);return}else{const K=_.filter(N=>N!==ne);S(e,K);return}}return}if(ee.includes(Pe)===!0||ee.includes(ut)===!0){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${pn}.${_}.lineInfo`),Z=W[ne];if(ee.includes(Pe)||ee.includes(ut)){const{transactionId:ie,lineId:K,recommendations:N}=Z;if(W!=null){const z=Z[Pe].selectedOption,oe=Z[ut].selectedOption,Y=Z[jt].selectedOption,G=Z[jt].selectedOption,ke=Z[jt].defaultOptions,Ie=ke?.find(fe=>fe.options?.find(Be=>Be.value===Y))?.options?.find(fe=>fe.value===Y)?.label,E=ke?.find(fe=>fe.options?.find(Be=>Be.value===G))?.options?.find(fe=>fe.value===G)?.label,de=h.entityAutoCompleteView.vendor.find(fe=>fe.qboId===Y),je=h.entityAutoCompleteView.customer.find(fe=>fe.qboId===G),Me=N.find(fe=>fe.vendor?.qboId===Y)?.vendor,De=Y||de?.qboId||Me?.qboId?{id:Y??de?.qboId??Me?.qboId??"",name:Ie??de?.name??Me?.name??"",logo:de?.logo??Me?.logo}:void 0,Fe=G||je?.qboId?{id:G??je?.qboId??"",name:E??je?.name??"",logo:je?.logo}:void 0,ve=re.find(fe=>fe.qboId===z),et=B.find(fe=>fe.classId===oe),ht=i.transactionLocalData.find(fe=>fe.transactionId===ie)?.transactionReviewLocalData.lineItemById[K].account,tt=i.transactionLocalData.find(fe=>fe.transactionId===ie)?.transactionReviewLocalData.lineItemById[K].class;m(e,ie,K,V,De?.id,Fe?.id,ee.includes(Pe)&&ve!=null?{...ve,isPreFilled:!1}:ht,ee.includes(ut)&&et!=null?{...et,isPreFilled:!1}:tt,void 0,N,R)}return}}if(ee.includes(jt)){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${pn}.${_}.lineInfo`);if(W!=null){const Z=W[ne],{transactionId:ie,recommendations:K}=Z,N=Z[jt].selectedOption,z=Z[jt].selectedOption,oe=Z[jt].defaultOptions,Y=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===N)?.label,G=oe?.flatMap(ve=>ve.options)?.find(ve=>ve.value===z)?.label,ke=h.entityAutoCompleteView.vendor.find(ve=>ve.qboId===N),Ie=h.entityAutoCompleteView.customer.find(ve=>ve.qboId===z),E=K.find(ve=>ve.vendor?.qboId===N)?.vendor,de=N!==""&&N!=null?N:Y!==""&&Y!=null?Y:"",je=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(N!=null&&N!==""?N:null),Me={id:je??Y??"",name:Y??ke?.name??E?.name??"",logo:ke?.logo??E?.logo},De=Ie?.qboId!=null&&Ie.qboId!==""?{id:Ie.qboId??z??"",name:G??Ie.name??"",logo:Ie.logo}:void 0,Fe=V.find(ve=>ve.id===ie);if(Fe!=null){const ve=i.transactionLocalData.find(Be=>Be.transactionId===Fe.id)?.transactionReviewLocalData,et=ve?.lineItemById[Z.lineId],ht=rn(Fe)===!0?ve?.selectedEntity:et?.selectedEntityLine,tt=De?.id!=null&&De.id!==""?{id:De.id,name:De.name,type:"customer",qboId:De.id,zeniId:De.id,logo:De.logo}:Me.id!==""&&Me.id!=null?{id:de,name:Y??de,type:"vendor",qboId:de,zeniId:de,logo:Me.logo,isPreFilled:ht?.id===je&&ht?.isPreFilled}:void 0,fe={transactionId:{id:Fe.id,type:Fe.type},transaction:Fe,lineIds:Fe.type!=="journal_entry"?Fe.lines?.map(Be=>Be.id)??[]:[Z.lineId]};tt?.type==="customer"?v(Z.amount.amount,fe,!1,e,tt,De,R):$(Z.amount.amount,fe,!1,e,tt,Me,R)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const ee=X.watch((H,{name:_})=>{_!=null&&H!=null&&Qn(()=>ge(_,H))});return()=>{ee.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const ee=i.transactionLocalData.find(H=>H.transactionId===w.transactionId);if(ee){const{transactionReviewLocalData:H}=ee,{selectedEntity:_}=H,ne=w?.lineItemId??H.sortedLineItems[0],W=H.lineItemById[ne],Z=W.selectedEntityLine;j.current?.(Uo(h.entityAutoCompleteView,_??Z,W?.recommendationsWithCOT??[]))}k({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const te=(ee,H)=>{d.onAutoCompleteInputChange?.(ee),j.current=H},J=s.useRef(null);return t.jsx(Rx,{ref:J,"data-testid":D("transaction-categorization-list-page"),children:t.jsx(xn,{...X,children:t.jsx("form",{id:wa(oo),onSubmit:ce,style:{height:"100%",width:"100%"},"data-testid":D(wa(oo)),children:t.jsx(gx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:k,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:d,containerRef:J,isCOTEnabled:a,cotTracking:{onCOTView:F},isUncategorizedExpenseCategoryEnabled:R,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})})})})},wa=e=>`${e}_form`,ba=(e,i,l,r,h)=>({[pn]:i.map(d=>Ax(d.transactionId,d.transactionReviewLocalData,l,r,h)),[Ri]:e}),Ax=(e,i,l,r,h)=>{const{lineItemById:d,sortedLineItems:a,selectedEntity:c}=i,u=Object.values(d).sort((p,g)=>a.indexOf(p.lineId)-a.indexOf(g.lineId)),m=u[0]?.lineId;return{[ul]:u.map(p=>{const g=p.account?.qboId??p.account?.accountId,x=p.class?.classId,y=p.selectedEntityLine;return{id:p.id,transactionId:p.transactionId,type:p.type,amount:p.amount,lineDetailType:p.lineDetailType,platformLineDetailType:p.platformLineDetailType,lineTransactionType:p.lineTransactionType,postingType:p.postingType,postingTypeName:p.postingTypeName,customer:p.customer,vendor:p.vendor,billable:p.billable,item:p.item,isCategoryMiscategorized:p.isCategoryMiscategorized,isClassMiscategorized:p.isClassMiscategorized,lineId:p.id,[Pe]:{selectedOption:g,allOptions:jr(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:kr(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Uo(h,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[b1]:p.lineEntity,[C1]:p.recommendationsWithCOT??[]}}),transactionId:e,[v1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[S1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Rx=o.div`
1683
1683
  display: flex;
1684
1684
  min-height: 100%;
1685
1685
  width: 100%;
@@ -1687,7 +1687,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1687
1687
  flex-direction: column;
1688
1688
  background-color: ${e=>e.theme.colors.grey4};
1689
1689
  z-index: 2;
1690
- `,va={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},Ex=o.div`
1690
+ `,Ca={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},Ex=o.div`
1691
1691
  width: 100%;
1692
1692
  display: flex;
1693
1693
  justify-content: center;
@@ -1699,10 +1699,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1699
1699
  display: flex;
1700
1700
  flex-direction: column;
1701
1701
  width: 100%;
1702
- `,Mx=e=>{const{currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:d,isTransactionActivityEnabled:a,authParams:c,receiptUploadEndpoint:u,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:C,allThreadsSectionOpen:S,loggedInUser:$,isCOTEnabled:v,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:k,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:b,onUploadReceiptAttachment:z,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onReconTabColumnSortConfigChanged:F,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:M,onFetchTransactionCategorizationList:O,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:B,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:W,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:ne,onUpdateFileAttachment:H,onCloseAllThreadsSection:Z,onEditMonthEndInsightsClick:oe,previewMonthEndReport:J,saveMonthEndReport:N,onOpenFileAttachmentSnackBar:P,onCloseFileAttachmentSnackBar:se,onClickCustomerRequest:Y,sendMonthEndReport:G,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:de,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,setIsJeAccountSettingsOpened:ve,onReviewClicked:Xe,setOpenDrawerClicked:ht,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee,redirectToVendorDetailPage:Ie,setActivityLogTransactionId:Je}=e,{currentSelectedView:ye,missingReceipts:_e,transactionView:wt,selectedPeriod:yn,monthEndInsights:Qe,selectedTransactionCategorizationTab:wn,reconciliation:bn}=d;switch(ye){case"transaction_categorization":return wt.fetchState==="Completed"&&wt.transactionLocalData.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(Lx,{setCurrentFooterFormId:T,selectedPeriod:yn,selectedTab:wn,sectionId:mn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:B,onFetchTransactionCategorizationList:O,onTransactionCategorizationRowClick:k,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:K,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:W,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:v,setActivityLogTransactionId:Je,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Lm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:h,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g});case"missing_receipts":return _e.fetchState==="Completed"&&_e.transactions.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(gg,{onUpdateMissingReceiptsUIState:M,onFetchMissingReceiptsList:j,missingReceipts:_e,receiptUploadEndpoint:u,authParams:c,selectedPeriod:yn,onMissingReceiptsRowClick:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onUploadReceiptAttachment:z});case"month_end_insights":if(Qe!=null&&d.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Qe.fetchState==="Not-Started"||Qe.fetchState==="In-Progress"||Qe.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Qe.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Jl,{fetchState:"In-Progress"});{const bt={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Yt,...Zt}=bt,Xt={...Zt};return t.jsx(Dx,{children:t.jsx(Ug,{allThreadsSectionOpen:S,customerRequestData:C,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:$?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:bt,onClickCustomerRequest:Y,onCloseAllThreadsSection:Z,onCloseFileAttachmentSnackBar:se,onOpenFileAttachmentSnackBar:P,onRemoveFileAttachment:ne,onUpdateFileAttachment:H,previewMode:y,previewMonthEndReport:J,saveMonthEndReport:N,onEditClick:oe,sendMonthEndReport:G})})}}else return null;case"flux_analysis":return d.fluxAnalysis.fetchStatus.fetchState==="Completed"&&d.fluxAnalysis.sections.generalExpense.vendors.length===0&&d.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(sm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:de,redirectToVendorDetailPage:Ie});case"reconciliation":return t.jsx(Np,{onReloadReconciliationListPage:V,currentFooterFormId:i,reconciliation:bn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:Xe,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:F,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee});default:return t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle})}};function yl(e){const i=Ce(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Ex,{windowSize:i,style:{...h===!0?{paddingLeft:va.subSectionContainerLeftRightPadding.value(i),paddingRight:va.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Mx,{...e})})}const Ox=70,wl=50,Px=3,zx=["receipts"],Sa=e=>Qo(e,zx),{common:{texts:{vendor:Fx,amount:Bx,receipts:_x,category:Vx,classText:Nx,date:Ux}}}=me.getLocalizedStrings(),bl={key:"vendor",value:Fx,sortOrder:"ascending",width:new Q(18,18)},Hx={key:"category",value:Vx,sortOrder:"ascending",width:new Q(18,18)},Wx={key:"class",value:Nx,sortOrder:"ascending",width:new Q(18,18)},qx={key:"date",value:Ux,sortOrder:"descending",width:new Q(11,11)},Jx={key:"receipts",value:_x,sortOrder:"descending",width:new Q(6,6)},Cl={key:"amount",value:Bx,sortOrder:"ascending",width:new Q(10,10)},ls=[bl,Hx,Wx,qx,Jx,Cl],cs=[{...bl,width:new Q(65,65)},{...Cl,width:new Q(30,30)}],mo={sortKey:"date",sortOrder:"descending"},vl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Ze(),d=h?cs:ls,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,h]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{Sa(p.key)==null&&u(gd(p.key),p.sortOrder)};return t.jsx(Kx,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||Sa(p.key)!=null;return t.jsxs(Qx,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(ef,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(tf,{children:p.value}),x?null:t.jsx(Yx,{sortConfig:e,headerData:p,children:t.jsx(Xx,{})})]}),x?null:t.jsx(Zx,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==mo.sortKey,children:t.jsx(Gx,{onClick:()=>{x||u(mo.sortKey,mo.sortOrder)},"data-testid":D("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Kx=o.div`
1702
+ `,Mx=e=>{const{currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:d,isTransactionActivityEnabled:a,authParams:c,receiptUploadEndpoint:u,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:C,allThreadsSectionOpen:S,loggedInUser:$,isCOTEnabled:v,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:k,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:b,onUploadReceiptAttachment:P,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onReconTabColumnSortConfigChanged:F,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:M,onFetchTransactionCategorizationList:O,onUpdateTransactionCategorizationUIState:re,onUpdateScrollYOffSetTransactionCategorizationUIState:B,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,onCloseAllThreadsSection:Z,onEditMonthEndInsightsClick:ie,previewMonthEndReport:K,saveMonthEndReport:N,onOpenFileAttachmentSnackBar:z,onCloseFileAttachmentSnackBar:oe,onClickCustomerRequest:Y,sendMonthEndReport:G,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:de,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Me,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,setIsJeAccountSettingsOpened:ve,onReviewClicked:et,setOpenDrawerClicked:ht,onEstablishConnectionClick:tt,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:nt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee,redirectToVendorDetailPage:$e,setActivityLogTransactionId:Ke}=e,{currentSelectedView:ye,missingReceipts:_e,transactionView:wt,selectedPeriod:fn,monthEndInsights:Qe,selectedTransactionCategorizationTab:yn,reconciliation:wn}=d;switch(ye){case"transaction_categorization":return wt.fetchState==="Completed"&&wt.transactionLocalData.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(Lx,{setCurrentFooterFormId:T,selectedPeriod:fn,selectedTab:yn,sectionId:pn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:re,onUpdateScrollYOffSetTransactionCategorizationUIState:B,onFetchTransactionCategorizationList:O,onTransactionCategorizationRowClick:k,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:v,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Lm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:h,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g});case"missing_receipts":return _e.fetchState==="Completed"&&_e.transactions.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(gg,{onUpdateMissingReceiptsUIState:M,onFetchMissingReceiptsList:j,missingReceipts:_e,receiptUploadEndpoint:u,authParams:c,selectedPeriod:fn,onMissingReceiptsRowClick:b,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onUploadReceiptAttachment:P});case"month_end_insights":if(Qe!=null&&d.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Qe.fetchState==="Not-Started"||Qe.fetchState==="In-Progress"||Qe.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Qe.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(ql,{fetchState:"In-Progress"});{const bt={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Yt,...Zt}=bt,Xt={...Zt};return t.jsx(Dx,{children:t.jsx(Ug,{allThreadsSectionOpen:S,customerRequestData:C,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:$?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:bt,onClickCustomerRequest:Y,onCloseAllThreadsSection:Z,onCloseFileAttachmentSnackBar:oe,onOpenFileAttachmentSnackBar:z,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,previewMode:y,previewMonthEndReport:K,saveMonthEndReport:N,onEditClick:ie,sendMonthEndReport:G})})}}else return null;case"flux_analysis":return d.fluxAnalysis.fetchStatus.fetchState==="Completed"&&d.fluxAnalysis.sections.generalExpense.vendors.length===0&&d.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(sm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:ke,onReloadPage:Ie,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:je,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:de,redirectToVendorDetailPage:$e});case"reconciliation":return t.jsx(Np,{onReloadReconciliationListPage:V,currentFooterFormId:i,reconciliation:wn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:et,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:F,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:tt,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:Be,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:nt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee});default:return t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle})}};function fl(e){const i=Ce(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Ex,{windowSize:i,style:{...h===!0?{paddingLeft:Ca.subSectionContainerLeftRightPadding.value(i),paddingRight:Ca.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Mx,{...e})})}const Ox=70,yl=50,zx=3,Px=["receipts"],va=e=>Jo(e,Px),{common:{texts:{vendor:Fx,amount:Bx,receipts:_x,category:Vx,classText:Nx,date:Ux}}}=me.getLocalizedStrings(),wl={key:"vendor",value:Fx,sortOrder:"ascending",width:new Q(18,18)},Wx={key:"category",value:Vx,sortOrder:"ascending",width:new Q(18,18)},Hx={key:"class",value:Nx,sortOrder:"ascending",width:new Q(18,18)},qx={key:"date",value:Ux,sortOrder:"descending",width:new Q(11,11)},Kx={key:"receipts",value:_x,sortOrder:"descending",width:new Q(6,6)},bl={key:"amount",value:Bx,sortOrder:"ascending",width:new Q(10,10)},rs=[wl,Wx,Hx,qx,Kx,bl],ls=[{...wl,width:new Q(65,65)},{...bl,width:new Q(30,30)}],po={sortKey:"date",sortOrder:"descending"},Cl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=Ce(),h=Xe(),d=h?ls:rs,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,h]);const u=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{va(p.key)==null&&u(gd(p.key),p.sortOrder)};return t.jsx(Jx,{windowSize:r,isQuickViewMode:h,children:a.map((p,g)=>{const x=i!=null||va(p.key)!=null;return t.jsxs(Qx,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:h,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(ef,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(tf,{children:p.value}),x?null:t.jsx(Yx,{sortConfig:e,headerData:p,children:t.jsx(Xx,{})})]}),x?null:t.jsx(Zx,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==po.sortKey,children:t.jsx(Gx,{onClick:()=>{x||u(po.sortKey,po.sortOrder)},"data-testid":D("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Jx=o.div`
1703
1703
  top: ${n.sp0};
1704
1704
  left: ${n.sp0};
1705
- height: ${wl}px;
1705
+ height: ${yl}px;
1706
1706
  z-index: 2;
1707
1707
  display: flex;
1708
1708
  flex-wrap: nowrap;
@@ -1748,7 +1748,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1748
1748
  min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1749
1749
  max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1750
1750
  `}
1751
- `,Gx=o(ni)`
1751
+ `,Gx=o(ei)`
1752
1752
  width: ${n.sp2};
1753
1753
  height: ${n.sp2};
1754
1754
  cursor: pointer;
@@ -1763,7 +1763,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1763
1763
  &:hover {
1764
1764
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1765
1765
  }
1766
- `,Xx=o(ti)`
1766
+ `,Xx=o(Xn)`
1767
1767
  width: ${n.sp2};
1768
1768
  height: ${n.sp2};
1769
1769
  `,ef=o.div`
@@ -1773,9 +1773,9 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1773
1773
  &:hover {
1774
1774
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1775
1775
  }
1776
- `,tf=o(Ye)`
1776
+ `,tf=o(Ze)`
1777
1777
  display: flex;
1778
- `,{dateFormat:nf,common:{strings:{underscore:Sl,hyphen:$n,empty:ka}}}=me.getLocalizedStrings(),vi={containerPaddingLeftRight:new Q(f[3],f[4])},of=({transaction:e,authParams:i,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:r})=>{const h=Ce(),d=Ze(),a=d?cs:ls,[c,u]=s.useState(!1),[m,p]=s.useState([]),[g,x]=s.useState(null),y=e.attachments?.filter(w=>w.contentType!=null&&vc.includes(w.contentType))??[],[C,S]=s.useState(y[0]),$=e.attachments!=null&&e.attachments.length>0,v=e.date?.format?.(nf.visual.MMMDCommaYYYYformat)??$n,T=()=>{u(!0),S(y[0]);const w=y.map(k=>k.id);vr(l,i,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:w}).then(k=>{p(k),k.length>0&&x(k[0])})},I=()=>{u(!1),x(null),p([]),y.length>0&&S(y[0])};return t.jsxs(kl,{windowSize:h,isQuickViewMode:d,onClick:()=>r(e.id,e.type),"data-testid":D("completed-tab-list-row",e.id),children:[a.map((w,k)=>{const j=`${e.id}${Sl}${w.key}`;switch(w.key){case"vendor":default:return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(An,{windowSize:h,isLastItem:k===a.length-1,children:t.jsxs(Ei,{children:[t.jsx(Xn,{photoUrl:e.vendorId!=null?e.logo?.toString()??ka:ka,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(rf,{children:t.jsx(Kt,{name:e.vendorName??e.description??$n,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description??$n,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},j);case"category":case"class":{const b=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:$n,z=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:$n,A=w.key==="category"?b:z;return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(An,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:A!==$n?t.jsx(qe,{text:A,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(af,{children:A})})})},j)}case"date":return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(An,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:t.jsx(qe,{text:v,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},j);case"receipts":return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,style:{justifyContent:"center"},children:$?t.jsx(lf,{onClick:b=>{b.stopPropagation(),T()}}):null},j);case"amount":{const b=nt("0,0.[00]",e.amount);return t.jsx(pn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(An,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(qe,{text:e.amount!=null&&e.amount.amount<0?`-${b}`:b,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},j)}}}),c&&y.length>0?Mi.createPortal(t.jsx(gr,{allFiles:m,fileSource:g,file:C,title:C.fileName,attachments:y,setFileSource:x,setShowFullScreenView:u,onCrossClick:I,setSelectedFileAttachment:S,handleTouchStart:()=>{},handleTouchMove:()=>{},handleTouchEnd:()=>{}}),document.body):null]})},sf=()=>{const e=Ce(),i=Ze(),l=i?cs:ls,r=s.useRef(null),[h,d]=s.useState(0);return s.useLayoutEffect(()=>{r.current&&d(r.current.offsetWidth)},[e]),t.jsx(kl,{windowSize:e,isQuickViewMode:i,ref:r,children:l.map((a,c)=>{const u=`${c}${Sl}${a.key}`;switch(a.key){case"vendor":return t.jsx(pn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(An,{windowSize:e,isLastItem:c===l.length-1,children:t.jsxs(Ei,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},u);default:return t.jsx(pn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(An,{windowSize:e,isLastItem:c===l.length-1,children:t.jsx(it,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},u)}})})},kl=o.div`
1778
+ `,{dateFormat:nf,common:{strings:{underscore:vl,hyphen:jn,empty:Sa}}}=me.getLocalizedStrings(),vi={containerPaddingLeftRight:new Q(f[3],f[4])},of=({transaction:e,authParams:i,transactionAttachmentsEndpoint:l,onMissingReceiptsRowClick:r})=>{const h=Ce(),d=Xe(),a=d?ls:rs,[c,u]=s.useState(!1),[m,p]=s.useState([]),[g,x]=s.useState(null),y=e.attachments?.filter(w=>w.contentType!=null&&Cc.includes(w.contentType))??[],[C,S]=s.useState(y[0]),$=e.attachments!=null&&e.attachments.length>0,v=e.date?.format?.(nf.visual.MMMDCommaYYYYformat)??jn,T=()=>{u(!0),S(y[0]);const w=y.map(k=>k.id);Cr(l,i,{transaction_key:{transaction_id:e.id,transaction_type:e.type},attachment_ids:w}).then(k=>{p(k),k.length>0&&x(k[0])})},I=()=>{u(!1),x(null),p([]),y.length>0&&S(y[0])};return t.jsxs(Sl,{windowSize:h,isQuickViewMode:d,onClick:()=>r(e.id,e.type),"data-testid":D("completed-tab-list-row",e.id),children:[a.map((w,k)=>{const j=`${e.id}${vl}${w.key}`;switch(w.key){case"vendor":default:return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsxs(Ei,{children:[t.jsx(Yn,{photoUrl:e.vendorId!=null?e.logo?.toString()??Sa:Sa,styles:{width:n.sp4,height:n.sp4,borderRadius:n.sp0},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(rf,{children:t.jsx(Jt,{name:e.vendorName??e.description??jn,size:n.sp4})})}),t.jsx(qe,{text:e.vendorName??e.description??jn,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})]})})},j);case"category":case"class":{const b=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:jn,P=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:jn,A=w.key==="category"?b:P;return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:A!==jn?t.jsx(qe,{text:A,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}}):t.jsx(af,{children:A})})})},j)}case"date":return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(Ei,{children:t.jsx(qe,{text:v,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})})},j);case"receipts":return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,style:{justifyContent:"center"},children:$?t.jsx(lf,{onClick:b=>{b.stopPropagation(),T()}}):null},j);case"amount":{const b=it("0,0.[00]",e.amount);return t.jsx(hn,{windowSize:h,wrapperWidth:w.width,isQuickViewMode:d,children:t.jsx(Ln,{windowSize:h,isLastItem:k===a.length-1,children:t.jsx(qe,{text:e.amount!=null&&e.amount.amount<0?`-${b}`:b,itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"}})})},j)}}}),c&&y.length>0?Mi.createPortal(t.jsx(mr,{allFiles:m,fileSource:g,file:C,title:C.fileName,attachments:y,setFileSource:x,setShowFullScreenView:u,onCrossClick:I,setSelectedFileAttachment:S,handleTouchStart:()=>{},handleTouchMove:()=>{},handleTouchEnd:()=>{}}),document.body):null]})},sf=()=>{const e=Ce(),i=Xe(),l=i?ls:rs,r=s.useRef(null),[h,d]=s.useState(0);return s.useLayoutEffect(()=>{r.current&&d(r.current.offsetWidth)},[e]),t.jsx(Sl,{windowSize:e,isQuickViewMode:i,ref:r,children:l.map((a,c)=>{const u=`${c}${vl}${a.key}`;switch(a.key){case"vendor":return t.jsx(hn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(Ln,{windowSize:e,isLastItem:c===l.length-1,children:t.jsxs(Ei,{children:[t.jsx(Zn,{width:f[4],height:f[4]}),t.jsx(ot,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})]})})},u);default:return t.jsx(hn,{windowSize:e,wrapperWidth:a.width,isQuickViewMode:i,children:t.jsx(Ln,{windowSize:e,isLastItem:c===l.length-1,children:t.jsx(ot,{width:h*a.width.value(e)/100,height:f[4],style:{display:"flex",alignItems:"center"}})})},u)}})})},Sl=o.div`
1779
1779
  display: flex;
1780
1780
  height: 100%;
1781
1781
  background-color: ${e=>e.theme.colors.grey5};
@@ -1802,7 +1802,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1802
1802
  padding-left: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
1803
1803
  padding-right: ${vi.containerPaddingLeftRight.valuePx(e.windowSize)};
1804
1804
  `}
1805
- `,pn=o.div`
1805
+ `,hn=o.div`
1806
1806
  display: flex;
1807
1807
  align-items: center;
1808
1808
  position: relative;
@@ -1822,7 +1822,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1822
1822
  width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1823
1823
  min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
1824
1824
  `}
1825
- `,An=o(Re)`
1825
+ `,Ln=o(Re)`
1826
1826
  overflow: hidden;
1827
1827
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1828
1828
  display: flex;
@@ -1844,11 +1844,11 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1844
1844
  color: inherit;
1845
1845
  `,rf=o.div`
1846
1846
  display: flex;
1847
- `,lf=o(Cr)`
1847
+ `,lf=o(br)`
1848
1848
  width: 16px;
1849
1849
  height: 16px;
1850
1850
  color: inherit;
1851
- `,cf=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Ze();return t.jsxs(df,{windowSize:h,children:[t.jsx(uf,{isQuickViewMode:d,children:t.jsx(vl,{sortConfig:e,isDisabled:i.fetchState==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(hf,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(sf,{},c))})]})},df=o.div`
1851
+ `,cf=({sortConfig:e,fetchState:i,isDisabled:l,onColumnSortConfigChanged:r})=>{const h=Ce(),d=Xe();return t.jsxs(df,{windowSize:h,children:[t.jsx(uf,{isQuickViewMode:d,children:t.jsx(Cl,{sortConfig:e,isDisabled:i.fetchState==="In-Progress"?"readonly":l,onColumnSortConfigChanged:r})}),t.jsx(hf,{windowSize:h,children:[...Array(3)].map((a,c)=>t.jsx(sf,{},c))})]})},df=o.div`
1852
1852
  display: block;
1853
1853
  min-height: 100%;
1854
1854
  flex-direction: column;
@@ -1862,7 +1862,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1862
1862
  min-height: 100%;
1863
1863
  flex-direction: column;
1864
1864
  row-gap: ${n.sp3};
1865
- `,pf=({authParams:e,fetchState:i,nextPageToken:l,sortKey:r,sortOrder:h,totalCount:d,transactionAttachmentsEndpoint:a,transactions:c,onFetchMore:u,onMissingReceiptsRowClick:m,onSortConfigChanged:p,onSortReset:g})=>{const x=Ce(),y=Ze(),C=s.useRef(null),S=(j,b)=>{p?.(j,b)},$=s.useCallback(j=>j<c.length,[c.length]),v=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&u(l)},[l,i.fetchState,u]),T=s.useMemo(()=>d,[d]),I=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,k=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(gf,{children:t.jsx(xf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:We("missing_receipts").allDoneText.title,subTitle:We("missing_receipts").allDoneText.subTitle}):k?t.jsx(cf,{sortConfig:{sortKey:r??"date",sortOrder:h},fetchState:i,onColumnSortConfigChanged:S}):t.jsx(ff,{windowSize:x,children:t.jsx(Kn,{children:({height:j,width:b})=>t.jsxs(wf,{style:{height:j,width:b},children:[t.jsx(yf,{isQuickViewMode:y,children:t.jsx(vl,{sortConfig:{sortKey:r??"date",sortOrder:h},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:S})}),t.jsx(ir,{isItemLoaded:$,itemCount:T,loadMoreItems:v,children:({onItemsRendered:z,ref:A})=>t.jsx(ql,{ref:R=>{A(R),C.current=R},height:j-wl,innerElementType:jl,itemCount:I,itemSize:Ox,width:b,style:{willChange:"auto"},overscanCount:Px,onItemsRendered:z,itemKey:R=>c[R]?.id??`loading-${R}`,itemData:{transactions:c,isItemLoaded:$,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:mf})})]})})})})})},mf=({index:e,style:i,data:l})=>{const{transactions:r,isItemLoaded:h,authParams:d,isQuickViewMode:a,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u}=l;if(h(e)===!1)return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(bf,{})});const m=r[e];return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(of,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u},m.id)})},gf=o.div`
1865
+ `,pf=({authParams:e,fetchState:i,nextPageToken:l,sortKey:r,sortOrder:h,totalCount:d,transactionAttachmentsEndpoint:a,transactions:c,onFetchMore:u,onMissingReceiptsRowClick:m,onSortConfigChanged:p,onSortReset:g})=>{const x=Ce(),y=Xe(),C=s.useRef(null),S=(j,b)=>{p?.(j,b)},$=s.useCallback(j=>j<c.length,[c.length]),v=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&u(l)},[l,i.fetchState,u]),T=s.useMemo(()=>d,[d]),I=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,k=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(gf,{children:t.jsx(xf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):k?t.jsx(cf,{sortConfig:{sortKey:r??"date",sortOrder:h},fetchState:i,onColumnSortConfigChanged:S}):t.jsx(ff,{windowSize:x,children:t.jsx(qn,{children:({height:j,width:b})=>t.jsxs(wf,{style:{height:j,width:b},children:[t.jsx(yf,{isQuickViewMode:y,children:t.jsx(Cl,{sortConfig:{sortKey:r??"date",sortOrder:h},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:S})}),t.jsx(nr,{isItemLoaded:$,itemCount:T,loadMoreItems:v,children:({onItemsRendered:P,ref:A})=>t.jsx(Hl,{ref:R=>{A(R),C.current=R},height:j-yl,innerElementType:kl,itemCount:I,itemSize:Ox,width:b,style:{willChange:"auto"},overscanCount:zx,onItemsRendered:P,itemKey:R=>c[R]?.id??`loading-${R}`,itemData:{transactions:c,isItemLoaded:$,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:mf})})]})})})})})},mf=({index:e,style:i,data:l})=>{const{transactions:r,isItemLoaded:h,authParams:d,isQuickViewMode:a,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u}=l;if(h(e)===!1)return t.jsx(ka,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(bf,{})});const m=r[e];return t.jsx(ka,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(of,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:u},m.id)})},gf=o.div`
1866
1866
  display: flex;
1867
1867
  flex-direction: column;
1868
1868
  flex: 1;
@@ -1883,12 +1883,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1883
1883
  width: auto;
1884
1884
  `,wf=o.div`
1885
1885
  position: relative;
1886
- `,ja=o.div`
1886
+ `,ka=o.div`
1887
1887
  top: ${n.sp0};
1888
1888
  left: ${n.sp0};
1889
1889
  padding-bottom: ${n.sp3};
1890
1890
  box-sizing: border-box;
1891
- `,jl=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});jl.displayName="Completed tab inner element type";const bf=o.div`
1891
+ `,kl=s.forwardRef((e,i)=>{const{style:l,...r}=e;return t.jsx("div",{ref:i,style:{...l,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});kl.displayName="Completed tab inner element type";const bf=o.div`
1892
1892
  display: flex;
1893
1893
  align-items: center;
1894
1894
  justify-content: space-between;
@@ -1909,10 +1909,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1909
1909
  opacity: 0.4;
1910
1910
  }
1911
1911
  }
1912
- `;function $l(e){const{bulkUploadSelector:i,isUploading:l}=e;if(i==null)return!1;const r=(i.unmatchedFiles?.length??0)>0||(i.pastUnmatchedFiles?.length??0)>0;if(r)return!1;const h=i.batchListFetchState?.fetchState,d=i.batchDetailsPaginationState?.fetchState,a=h==="In-Progress"||h==="Not-Started",c=d==="In-Progress",u=i.batchList?.length??0,m=i.hasMoreBatchDetails===!0,p=h==="Completed"&&d==="Not-Started"&&(m||u>0);return l===!0||a||c||p||m===!0&&!r}const Bo=5,Cf=`calc(
1913
- ${Bo} * (${n.sp4} + 2 * ${n.sp3}) +
1914
- (${Bo} - 1) * ${n.sp3}
1915
- )`,ds=o.div`
1912
+ `;function jl(e){const{bulkUploadSelector:i,isUploading:l}=e;if(i==null)return!1;const r=(i.unmatchedFiles?.length??0)>0||(i.pastUnmatchedFiles?.length??0)>0;if(r)return!1;const h=i.batchListFetchState?.fetchState,d=i.batchDetailsPaginationState?.fetchState,a=h==="In-Progress"||h==="Not-Started",c=d==="In-Progress",u=i.batchList?.length??0,m=i.hasMoreBatchDetails===!0,p=h==="Completed"&&d==="Not-Started"&&(m||u>0);return l===!0||a||c||p||m===!0&&!r}const Fo=5,Cf=`calc(
1913
+ ${Fo} * (${n.sp4} + 2 * ${n.sp3}) +
1914
+ (${Fo} - 1) * ${n.sp3}
1915
+ )`,cs=o.div`
1916
1916
  display: flex;
1917
1917
  flex-direction: column;
1918
1918
  gap: ${n.sp3};
@@ -1924,7 +1924,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1924
1924
  scrollbar-width: thin;
1925
1925
  scrollbar-color: ${e=>e.theme.colors.grey1} transparent;
1926
1926
  width: 100%;
1927
- `,go=[new Q(50,50),new Q(25,25),new Q(25,25)],Il=()=>t.jsx(Tf,{children:t.jsx(it,{width:"100%",height:f[3],style:{borderRadius:n.sp1,height:f[4],display:"block"}})}),vf=()=>{const e=Ce(),i=s.useRef(null),[l,r]=s.useState(0);return s.useLayoutEffect(()=>{i.current&&r(i.current.offsetWidth)},[e]),t.jsx(Lf,{children:t.jsxs(Af,{ref:i,children:[t.jsx(Rf,{children:t.jsxs(Ef,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:l>0?l*go[0].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})}),t.jsx(Df,{children:t.jsx(it,{width:l>0?l*go[1].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})}),t.jsx(Mf,{children:t.jsx(it,{width:l>0?l*go[2].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})]})})},Tl=({rowCount:e=Bo})=>t.jsx(ds,{"aria-hidden":!0,children:Array.from({length:e},(i,l)=>t.jsx(vf,{},l))}),Sf=()=>t.jsxs(jf,{children:[t.jsx($f,{children:t.jsx(it,{width:200,height:31,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(Il,{}),t.jsx(Tl,{rowCount:2})]}),kf=()=>t.jsxs(If,{children:[t.jsx(Il,{}),t.jsx(Tl,{rowCount:1})]}),jf=o.div`
1927
+ `,mo=[new Q(50,50),new Q(25,25),new Q(25,25)],$l=()=>t.jsx(Tf,{children:t.jsx(ot,{width:"100%",height:f[3],style:{borderRadius:n.sp1,height:f[4],display:"block"}})}),vf=()=>{const e=Ce(),i=s.useRef(null),[l,r]=s.useState(0);return s.useLayoutEffect(()=>{i.current&&r(i.current.offsetWidth)},[e]),t.jsx(Lf,{children:t.jsxs(Af,{ref:i,children:[t.jsx(Rf,{children:t.jsxs(Ef,{children:[t.jsx(Zn,{width:f[4],height:f[4]}),t.jsx(ot,{width:l>0?l*mo[0].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})}),t.jsx(Df,{children:t.jsx(ot,{width:l>0?l*mo[1].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})}),t.jsx(Mf,{children:t.jsx(ot,{width:l>0?l*mo[2].value(e)/100:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})]})})},Il=({rowCount:e=Fo})=>t.jsx(cs,{"aria-hidden":!0,children:Array.from({length:e},(i,l)=>t.jsx(vf,{},l))}),Sf=()=>t.jsxs(jf,{children:[t.jsx($f,{children:t.jsx(ot,{width:200,height:31,style:{display:"block",borderRadius:n.sp1}})}),t.jsx($l,{}),t.jsx(Il,{rowCount:2})]}),kf=()=>t.jsxs(If,{children:[t.jsx($l,{}),t.jsx(Il,{rowCount:1})]}),jf=o.div`
1928
1928
  display: flex;
1929
1929
  flex-direction: column;
1930
1930
  gap: ${n.sp3};
@@ -1990,14 +1990,14 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
1990
1990
  min-width: 0;
1991
1991
  padding: ${n.sp0} ${n.sp5};
1992
1992
  text-align: right;
1993
- `,Of="0,0.[00]";function Ll(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function Pf(e){return e.format(Ll())}function Al(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Ll(),r=Di(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function zf(e){if(e==null||e==="")return"";if(!/^[A-Z]{3}$/.test(e))return e;try{return new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}}function Rl(e,i){return Ko(Of,e,zf(i))}const{common:{texts:{vendor:Ff,amount:Bf,date:_f}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:xo}}}=me.getLocalizedStrings(),Vf=({hasCandidates:e,interactionLocked:i=!1,isLoadingMore:l,isSearching:r,manualSearchNextPageToken:h,searchResults:d,selectedTransactionId:a,onClearSelection:c,onSearch:u,onSelectionChange:m,onLoadMore:p})=>{const[g,x]=s.useState(""),y=s.useRef(null),C=s.useRef(null),S=s.useRef(!1),$=s.useCallback(w=>{const[k]=w;i!==!0&&k.isIntersecting&&h!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,h,p]);s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null)return;const j=new IntersectionObserver($,{root:w,rootMargin:"120px"});return j.observe(k),()=>j.disconnect()},[$,h,p,d?.length]),s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null){S.current=l===!0;return}const j=S.current===!0&&l!==!0;if(S.current=l===!0,!j)return;const b=w.getBoundingClientRect(),z=k.getBoundingClientRect();z.top<b.bottom&&z.bottom>b.top&&z.left<b.right&&z.right>b.left&&requestAnimationFrame(()=>{p()})},[l,h,p,d?.length]);const v=s.useCallback(w=>{i||w.key==="Enter"&&g.trim().length>=2&&u(g.trim())},[i,g,u]),T=s.useCallback(w=>{if(i)return;const k=w.target.value;x(k);const j=k.trim();j.length>=2?u(j):u("")},[i,u]),I=s.useCallback(()=>{i||(x(""),c(),u(""))},[i,c,u]);return t.jsxs(Nf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Uf,{children:t.jsx(Qn,{children:e?xo.orSearchManually:xo.searchManually})}),t.jsxs(Hf,{children:[t.jsx(Wf,{}),t.jsx(qf,{type:"text",placeholder:xo.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:v,disabled:i,"data-testid":D("manual-search-input")}),g.length>0?t.jsx(Jf,{type:"button",disabled:i,onClick:I,children:t.jsx(Kf,{})}):null]}),d!=null&&d.length>0?t.jsxs(Qf,{children:[t.jsxs(Gf,{children:[t.jsx(fo,{style:{flex:2},children:t.jsx(Ye,{children:Ff})}),t.jsx(fo,{children:t.jsx(Ye,{children:_f})}),t.jsx(fo,{style:{textAlign:"right"},children:t.jsx(Ye,{children:Bf})})]}),t.jsxs(ds,{ref:y,children:[d.map(w=>t.jsxs(Yf,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":D("search-result",w.transactionId),children:[t.jsx(Xf,{children:t.jsx(e0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(Zf,{isSelected:a===w.transactionId,children:[t.jsxs(t0,{children:[t.jsx(Xn,{photoUrl:w.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Kt,{name:w.vendorName,size:n.sp4})}),t.jsx(qe,{text:w.vendorName,maxWidth:"120px"})]}),t.jsx(n0,{children:t.jsx(ot,{children:Al(w.transactionDate)})}),t.jsx(i0,{children:t.jsx(ot,{children:Rl(w.amount,w.currencyCode)})})]})]},w.transactionId)),h!=null?t.jsx(o0,{ref:C,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(kf,{}):null]})},Nf=o.div`
1993
+ `,Of="0,0.[00]";function Tl(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function zf(e){return e.format(Tl())}function Ll(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Tl(),r=Di(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function Pf(e){if(e==null||e==="")return"";if(!/^[A-Z]{3}$/.test(e))return e;try{return new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}}function Al(e,i){return Ko(Of,e,Pf(i))}const{common:{texts:{vendor:Ff,amount:Bf,date:_f}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:go}}}=me.getLocalizedStrings(),Vf=({hasCandidates:e,interactionLocked:i=!1,isLoadingMore:l,isSearching:r,manualSearchNextPageToken:h,searchResults:d,selectedTransactionId:a,onClearSelection:c,onSearch:u,onSelectionChange:m,onLoadMore:p})=>{const[g,x]=s.useState(""),y=s.useRef(null),C=s.useRef(null),S=s.useRef(!1),$=s.useCallback(w=>{const[k]=w;i!==!0&&k.isIntersecting&&h!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,h,p]);s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null)return;const j=new IntersectionObserver($,{root:w,rootMargin:"120px"});return j.observe(k),()=>j.disconnect()},[$,h,p,d?.length]),s.useEffect(()=>{const w=y.current,k=C.current;if(w==null||k==null||h==null||p==null){S.current=l===!0;return}const j=S.current===!0&&l!==!0;if(S.current=l===!0,!j)return;const b=w.getBoundingClientRect(),P=k.getBoundingClientRect();P.top<b.bottom&&P.bottom>b.top&&P.left<b.right&&P.right>b.left&&requestAnimationFrame(()=>{p()})},[l,h,p,d?.length]);const v=s.useCallback(w=>{i||w.key==="Enter"&&g.trim().length>=2&&u(g.trim())},[i,g,u]),T=s.useCallback(w=>{if(i)return;const k=w.target.value;x(k);const j=k.trim();j.length>=2?u(j):u("")},[i,u]),I=s.useCallback(()=>{i||(x(""),c(),u(""))},[i,c,u]);return t.jsxs(Nf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Uf,{children:t.jsx(Kn,{children:e?go.orSearchManually:go.searchManually})}),t.jsxs(Wf,{children:[t.jsx(Hf,{}),t.jsx(qf,{type:"text",placeholder:go.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:v,disabled:i,"data-testid":D("manual-search-input")}),g.length>0?t.jsx(Kf,{type:"button",disabled:i,onClick:I,children:t.jsx(Jf,{})}):null]}),d!=null&&d.length>0?t.jsxs(Qf,{children:[t.jsxs(Gf,{children:[t.jsx(xo,{style:{flex:2},children:t.jsx(Ze,{children:Ff})}),t.jsx(xo,{children:t.jsx(Ze,{children:_f})}),t.jsx(xo,{style:{textAlign:"right"},children:t.jsx(Ze,{children:Bf})})]}),t.jsxs(cs,{ref:y,children:[d.map(w=>t.jsxs(Yf,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":D("search-result",w.transactionId),children:[t.jsx(Xf,{children:t.jsx(e0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(Zf,{isSelected:a===w.transactionId,children:[t.jsxs(t0,{children:[t.jsx(Yn,{photoUrl:w.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:w.vendorName,size:n.sp4})}),t.jsx(qe,{text:w.vendorName,maxWidth:"120px"})]}),t.jsx(n0,{children:t.jsx(st,{children:Ll(w.transactionDate)})}),t.jsx(i0,{children:t.jsx(st,{children:Al(w.amount,w.currencyCode)})})]})]},w.transactionId)),h!=null?t.jsx(o0,{ref:C,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(kf,{}):null]})},Nf=o.div`
1994
1994
  display: flex;
1995
1995
  flex-direction: column;
1996
1996
  gap: ${n.sp2};
1997
1997
  padding-top: ${e=>e.hasCandidates?n.sp4:n.sp0};
1998
1998
  pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
1999
1999
  opacity: ${e=>e.$interactionLocked?.65:1};
2000
- `,Uf=o.div``,Hf=o.div`
2000
+ `,Uf=o.div``,Wf=o.div`
2001
2001
  display: flex;
2002
2002
  align-items: center;
2003
2003
  gap: ${n.sp1};
@@ -2006,18 +2006,18 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2006
2006
  border-radius: ${n.sp2};
2007
2007
  background-color: ${e=>e.theme.colors.background};
2008
2008
  box-sizing: border-box;
2009
- `,Wf=o(Mc)`
2009
+ `,Hf=o(Dc)`
2010
2010
  width: ${n.sp3};
2011
2011
  height: ${n.sp3};
2012
2012
  color: ${e=>e.theme.colors.hero};
2013
2013
  flex-shrink: 0;
2014
- `,qf=o(Oc)`
2014
+ `,qf=o(Mc)`
2015
2015
  flex: 1;
2016
2016
  border: none;
2017
2017
  outline: none;
2018
2018
  color: ${e=>e.theme.colors.grey1};
2019
2019
  background-color: transparent;
2020
- `,Jf=o.button`
2020
+ `,Kf=o.button`
2021
2021
  display: flex;
2022
2022
  align-items: center;
2023
2023
  justify-content: center;
@@ -2026,7 +2026,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2026
2026
  cursor: pointer;
2027
2027
  padding: 0;
2028
2028
  flex-shrink: 0;
2029
- `,Kf=o(Wo)`
2029
+ `,Jf=o(Wo)`
2030
2030
  width: ${n.sp3};
2031
2031
  height: ${n.sp3};
2032
2032
  color: ${e=>e.theme.colors.hero};
@@ -2045,7 +2045,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2045
2045
  align-items: center;
2046
2046
  padding: ${n.sp0} ${n.sp3};
2047
2047
  margin-left: ${n.sp5};
2048
- `,fo=o.div`
2048
+ `,xo=o.div`
2049
2049
  flex: 1;
2050
2050
  color: ${e=>e.theme.colors.hero};
2051
2051
  `,Yf=o.div`
@@ -2092,7 +2092,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2092
2092
  height: 1px;
2093
2093
  width: 100%;
2094
2094
  flex-shrink: 0;
2095
- `,{common:{texts:{vendor:s0,amount:a0,date:r0}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:$a}}}=me.getLocalizedStrings(),l0=({attachmentId:e,candidates:i,selectedTransactionId:l,interactionLocked:r=!1,onSelectionChange:h})=>{const d=[...i].sort((c,u)=>u.matchScore-c.matchScore),a=i.length===1?$a.possibleMatch:$a.possibleMatches.replace("__count__",i.length.toString());return t.jsxs(c0,{$interactionLocked:r,children:[t.jsx(d0,{children:t.jsx(Qn,{children:a})}),t.jsxs(u0,{children:[t.jsx(yo,{style:{flex:2},children:t.jsx(Ye,{children:s0})}),t.jsx(yo,{children:t.jsx(Ye,{children:r0})}),t.jsx(yo,{style:{textAlign:"right"},children:t.jsx(Ye,{children:a0})})]}),t.jsx(ds,{children:d.map(c=>t.jsxs(h0,{onClick:()=>h(c.transactionId,c.transactionType),"data-testid":D("candidate-row",c.transactionId),children:[t.jsx(m0,{children:t.jsx(g0,{type:"radio",name:`match-${e}`,checked:l===c.transactionId,onChange:()=>h(c.transactionId,c.transactionType)})}),t.jsxs(p0,{isSelected:l===c.transactionId,children:[t.jsxs(x0,{children:[t.jsx(Xn,{photoUrl:c.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Kt,{name:c.vendorName,size:n.sp4})}),t.jsx(qe,{text:c.vendorName,maxWidth:"120px"})]}),t.jsx(f0,{children:t.jsx(ot,{children:Al(c.transactionDate)})}),t.jsx(y0,{children:t.jsx(ot,{children:Rl(c.amount,c.currencyCode)})})]})]},c.transactionId))})]})},c0=o.div`
2095
+ `,{common:{texts:{vendor:s0,amount:a0,date:r0}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:ja}}}=me.getLocalizedStrings(),l0=({attachmentId:e,candidates:i,selectedTransactionId:l,interactionLocked:r=!1,onSelectionChange:h})=>{const d=[...i].sort((c,u)=>u.matchScore-c.matchScore),a=i.length===1?ja.possibleMatch:ja.possibleMatches.replace("__count__",i.length.toString());return t.jsxs(c0,{$interactionLocked:r,children:[t.jsx(d0,{children:t.jsx(Kn,{children:a})}),t.jsxs(u0,{children:[t.jsx(fo,{style:{flex:2},children:t.jsx(Ze,{children:s0})}),t.jsx(fo,{children:t.jsx(Ze,{children:r0})}),t.jsx(fo,{style:{textAlign:"right"},children:t.jsx(Ze,{children:a0})})]}),t.jsx(cs,{children:d.map(c=>t.jsxs(h0,{onClick:()=>h(c.transactionId,c.transactionType),"data-testid":D("candidate-row",c.transactionId),children:[t.jsx(m0,{children:t.jsx(g0,{type:"radio",name:`match-${e}`,checked:l===c.transactionId,onChange:()=>h(c.transactionId,c.transactionType)})}),t.jsxs(p0,{isSelected:l===c.transactionId,children:[t.jsxs(x0,{children:[t.jsx(Yn,{photoUrl:c.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:c.vendorName,size:n.sp4})}),t.jsx(qe,{text:c.vendorName,maxWidth:"120px"})]}),t.jsx(f0,{children:t.jsx(st,{children:Ll(c.transactionDate)})}),t.jsx(y0,{children:t.jsx(st,{children:Al(c.amount,c.currencyCode)})})]})]},c.transactionId))})]})},c0=o.div`
2096
2096
  display: flex;
2097
2097
  flex-direction: column;
2098
2098
  gap: ${n.sp3};
@@ -2102,7 +2102,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2102
2102
  display: flex;
2103
2103
  align-items: center;
2104
2104
  padding: ${n.sp0} ${n.sp3};
2105
- `,yo=o.div`
2105
+ `,fo=o.div`
2106
2106
  flex: 1;
2107
2107
  color: ${e=>e.theme.colors.hero};
2108
2108
  `,h0=o.div`
@@ -2145,7 +2145,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2145
2145
  `,y0=o.div`
2146
2146
  flex: 1;
2147
2147
  text-align: right;
2148
- `,w0=48,Mt=new Map,wo=new Map;function b0(e,i,l){return i!=null&&i!==""?`${e}::att::${i}`:`${e}::url::${l}`}function C0(e){const i=Mt.get(e);return i!=null&&(Mt.delete(e),Mt.set(e,i)),i}function v0(){for(;Mt.size>w0;){const e=Mt.keys().next().value;if(e===void 0)break;const i=Mt.get(e);Mt.delete(e),i!=null&&URL.revokeObjectURL(i)}}function S0(e,i){const l=Mt.get(e);l!=null&&l!==i&&URL.revokeObjectURL(l),Mt.delete(e),Mt.set(e,i),v0()}function El(e){return C0(e)}function k0(e,i,l){return fetch(e,{method:"GET",headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}}).then(r=>{if(!r.ok)throw new Error(`File fetch failed: ${r.status}`);return r.blob()})}function j0(e,i,l,r){const h=El(e);if(h!=null)return Promise.resolve(h);const d=wo.get(e);if(d!=null)return d;const a=k0(i,l).then(c=>{const u=URL.createObjectURL(c);return S0(e,u),u}).finally(()=>{wo.delete(e)});return wo.set(e,a),a}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:$0}}}=me.getLocalizedStrings(),I0=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail;function T0(e){return e.toLowerCase().endsWith(".pdf")}function L0(e,i,l){const[r,h]=s.useState(null);return s.useLayoutEffect(()=>{if(e==null){h(null);return}const d=b0(i.tenantId,l,e),a=El(d);if(a!=null){h(a);return}let c=!1;return j0(d,e,i).then(u=>{c||h(u)}).catch(u=>{(u instanceof Error?u.name:"")!=="AbortError"&&console.error("Failed to fetch file with auth:",u)}),()=>{c=!0}},[e,i.userId,i.tenantId,i.sessionId,l,i]),r}function Ia({title:e,windowSize:i,onDeleteClick:l,deleteDataTestId:r}){const h=l!=null;return t.jsxs(D0,{children:[t.jsx(M0,{children:e}),h?t.jsx(O0,{className:"actionIcons",children:i==="small"?t.jsx(z0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}}):t.jsx(xe,{enterDelay:600,display:"flex",title:I0.delete,placement:"top",children:t.jsx(P0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}})})}):null]})}const A0=({authParams:e,attachmentTitle:i,attachmentId:l,fileDownloadUrl:r,filename:h,filePreviewUrl:d,onDeleteClick:a})=>{const[c,u]=s.useState(!1),m=Ce(),p=L0(r,e,l),g=d??p,x=p??d,y=T0(h),C=D("receipt-card-delete",l??h),S=s.useCallback(()=>{x!=null&&u(!0)},[x]),$=s.useCallback(()=>{u(!1)},[]);return y&&x!=null?t.jsxs(t.Fragment,{children:[t.jsx(R0,{"data-testid":D("receipt-pdf-preview",h),children:t.jsx(ps,{fileUrl:x,isFullScreen:!1,setShowFullScreenView:u,showTitlebar:!0,pdfTitle:i,showTitlebarIcon:a!=null,showReplaceIcon:!1,onDeleteClick:a,deleteAttachmentDataTestId:a!=null?C:void 0})}),c?Mi.createPortal(t.jsxs(Ta,{children:[t.jsxs(La,{children:[t.jsx(ms,{children:h}),t.jsx(Aa,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Ra,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ea,{children:t.jsx(ps,{fileUrl:x,isFullScreen:!0,setShowFullScreenView:u,onCrossClick:$})})})]}),document.body):null]}):g!=null&&g!==""?t.jsxs(t.Fragment,{children:[t.jsxs(E0,{windowSize:m,children:[t.jsx(Ia,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(F0,{children:t.jsx(B0,{src:g,alt:h,onClick:S,"data-testid":D("receipt-img-preview",h)})})]}),c&&x!=null?Mi.createPortal(t.jsxs(Ta,{children:[t.jsxs(La,{children:[t.jsx(ms,{children:h}),t.jsx(Aa,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Ra,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ea,{children:t.jsx(N0,{src:x,alt:h})})})]}),document.body):null]}):t.jsxs(_0,{windowSize:m,children:[t.jsx(Ia,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(V0,{children:t.jsx(ot,{children:$0.noPreview})})]})},R0=o.div`
2148
+ `,w0=48,Dt=new Map,yo=new Map;function b0(e,i,l){return i!=null&&i!==""?`${e}::att::${i}`:`${e}::url::${l}`}function C0(e){const i=Dt.get(e);return i!=null&&(Dt.delete(e),Dt.set(e,i)),i}function v0(){for(;Dt.size>w0;){const e=Dt.keys().next().value;if(e===void 0)break;const i=Dt.get(e);Dt.delete(e),i!=null&&URL.revokeObjectURL(i)}}function S0(e,i){const l=Dt.get(e);l!=null&&l!==i&&URL.revokeObjectURL(l),Dt.delete(e),Dt.set(e,i),v0()}function Rl(e){return C0(e)}function k0(e,i,l){return fetch(e,{method:"GET",headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}}).then(r=>{if(!r.ok)throw new Error(`File fetch failed: ${r.status}`);return r.blob()})}function j0(e,i,l,r){const h=Rl(e);if(h!=null)return Promise.resolve(h);const d=yo.get(e);if(d!=null)return d;const a=k0(i,l).then(c=>{const u=URL.createObjectURL(c);return S0(e,u),u}).finally(()=>{yo.delete(e)});return yo.set(e,a),a}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:$0}}}=me.getLocalizedStrings(),I0=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail;function T0(e){return e.toLowerCase().endsWith(".pdf")}function L0(e,i,l){const[r,h]=s.useState(null);return s.useLayoutEffect(()=>{if(e==null){h(null);return}const d=b0(i.tenantId,l,e),a=Rl(d);if(a!=null){h(a);return}let c=!1;return j0(d,e,i).then(u=>{c||h(u)}).catch(u=>{(u instanceof Error?u.name:"")!=="AbortError"&&console.error("Failed to fetch file with auth:",u)}),()=>{c=!0}},[e,i.userId,i.tenantId,i.sessionId,l,i]),r}function $a({title:e,windowSize:i,onDeleteClick:l,deleteDataTestId:r}){const h=l!=null;return t.jsxs(D0,{children:[t.jsx(M0,{children:e}),h?t.jsx(O0,{className:"actionIcons",children:i==="small"?t.jsx(P0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}}):t.jsx(xe,{enterDelay:600,display:"flex",title:I0.delete,placement:"top",children:t.jsx(z0,{"data-testid":r,onClick:d=>{d.stopPropagation(),l?.()}})})}):null]})}const A0=({authParams:e,attachmentTitle:i,attachmentId:l,fileDownloadUrl:r,filename:h,filePreviewUrl:d,onDeleteClick:a})=>{const[c,u]=s.useState(!1),m=Ce(),p=L0(r,e,l),g=d??p,x=p??d,y=T0(h),C=D("receipt-card-delete",l??h),S=s.useCallback(()=>{x!=null&&u(!0)},[x]),$=s.useCallback(()=>{u(!1)},[]);return y&&x!=null?t.jsxs(t.Fragment,{children:[t.jsx(R0,{"data-testid":D("receipt-pdf-preview",h),children:t.jsx(hs,{fileUrl:x,isFullScreen:!1,setShowFullScreenView:u,showTitlebar:!0,pdfTitle:i,showTitlebarIcon:a!=null,showReplaceIcon:!1,onDeleteClick:a,deleteAttachmentDataTestId:a!=null?C:void 0})}),c?Mi.createPortal(t.jsxs(Ia,{children:[t.jsxs(Ta,{children:[t.jsx(ps,{children:h}),t.jsx(La,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Aa,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ra,{children:t.jsx(hs,{fileUrl:x,isFullScreen:!0,setShowFullScreenView:u,onCrossClick:$})})})]}),document.body):null]}):g!=null&&g!==""?t.jsxs(t.Fragment,{children:[t.jsxs(E0,{windowSize:m,children:[t.jsx($a,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(F0,{children:t.jsx(B0,{src:g,alt:h,onClick:S,"data-testid":D("receipt-img-preview",h)})})]}),c&&x!=null?Mi.createPortal(t.jsxs(Ia,{children:[t.jsxs(Ta,{children:[t.jsx(ps,{children:h}),t.jsx(La,{onClick:$,"data-testid":D("close-receipt-preview",h),children:t.jsx(Aa,{})})]}),t.jsx($t,{onClickAway:$,children:t.jsx(Ra,{children:t.jsx(N0,{src:x,alt:h})})})]}),document.body):null]}):t.jsxs(_0,{windowSize:m,children:[t.jsx($a,{title:i,windowSize:m,onDeleteClick:a,deleteDataTestId:C}),t.jsx(V0,{children:t.jsx(st,{children:$0.noPreview})})]})},R0=o.div`
2149
2149
  width: 100%;
2150
2150
  min-height: 300px;
2151
2151
  max-height: 650px;
@@ -2187,10 +2187,10 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2187
2187
  padding-bottom: ${n.sp3};
2188
2188
  cursor: default;
2189
2189
  flex-shrink: 0;
2190
- `,M0=o(rr)``,O0=o.div`
2190
+ `,M0=o(ar)``,O0=o.div`
2191
2191
  display: none;
2192
2192
  flex-direction: row;
2193
- `,P0=o(Tr)`
2193
+ `,z0=o(Ir)`
2194
2194
  cursor: pointer;
2195
2195
  width: ${n.sp3};
2196
2196
  height: ${n.sp3};
@@ -2198,7 +2198,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2198
2198
  :hover {
2199
2199
  color: ${he.important};
2200
2200
  }
2201
- `,z0=o(Tr)`
2201
+ `,P0=o(Ir)`
2202
2202
  cursor: pointer;
2203
2203
  width: ${n.sp3};
2204
2204
  height: ${n.sp3};
@@ -2248,7 +2248,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2248
2248
  align-items: center;
2249
2249
  justify-content: center;
2250
2250
  min-height: 200px;
2251
- `,Ta=o.div`
2251
+ `,Ia=o.div`
2252
2252
  position: fixed;
2253
2253
  top: 0;
2254
2254
  left: 0;
@@ -2258,7 +2258,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2258
2258
  display: flex;
2259
2259
  flex-direction: column;
2260
2260
  background: ${he.overlayDark};
2261
- `,La=o.div`
2261
+ `,Ta=o.div`
2262
2262
  width: 100%;
2263
2263
  height: 59px;
2264
2264
  display: flex;
@@ -2268,14 +2268,14 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2268
2268
  color: ${he.neutralGrey5Light};
2269
2269
  box-sizing: border-box;
2270
2270
  flex-shrink: 0;
2271
- `,Aa=o.button`
2271
+ `,La=o.button`
2272
2272
  background: none;
2273
2273
  border: none;
2274
2274
  cursor: pointer;
2275
2275
  padding: ${n.sp0};
2276
2276
  display: flex;
2277
2277
  align-items: center;
2278
- `,Ra=o(Wo)`
2278
+ `,Aa=o(Wo)`
2279
2279
  width: ${n.sp4};
2280
2280
  height: ${n.sp4};
2281
2281
  color: ${he.neutralGrey5Light};
@@ -2283,7 +2283,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2283
2283
  &:hover {
2284
2284
  color: ${he.primaryDark};
2285
2285
  }
2286
- `,Ea=o.div`
2286
+ `,Ra=o.div`
2287
2287
  flex: 1;
2288
2288
  display: flex;
2289
2289
  align-items: center;
@@ -2295,19 +2295,19 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2295
2295
  max-width: 100%;
2296
2296
  max-height: 100%;
2297
2297
  object-fit: contain;
2298
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Da}}}=me.getLocalizedStrings(),Ma=({authParams:e,file:i,index:l,isLoadingMoreManualSearch:r,isSearching:h,manualSearchUiResetKey:d=0,isConfirmMatchInProgress:a=!1,manualSearchNextPageToken:c,manualSearchTotalCount:u,selectedTransactionId:m,onClearSelection:p,onDelete:g,onLoadMoreManualSearch:x,onSearchTransactions:y,onSelectionChange:C,searchResults:S})=>{const $=i.status==="possible_matches",v=i.status==="no_match",T=$&&i.candidates!=null&&i.candidates.length>0,I=Ce(),w=i.candidates?.map(b=>({amount:b.transaction.amount.amount,currencyCode:b.transaction.amount.currencySymbol||b.transaction.amount.currencyCode||"",matchScore:b.matchScore,transactionDate:Pf(b.transaction.date),transactionId:b.transaction.id,transactionType:b.transaction.type??"",vendorName:b.transaction.vendorName??"",vendorLogo:b.transaction.logo?.href})),k=s.useCallback((b,z)=>{a||C(b,z)},[a,C]),j=`${i.attachmentId}-${d}`;return t.jsxs(U0,{windowSize:I,"data-testid":D("receipt-card",i.attachmentId),children:[t.jsx(H0,{children:t.jsx(W0,{children:t.jsx(A0,{authParams:e,attachmentId:i.attachmentId,attachmentTitle:`#${l+1} ${i.filename}`,fileDownloadUrl:i.fileDownloadUrl,filename:i.filename,filePreviewUrl:i.filePreviewUrl,onDeleteClick:g!=null?()=>g(i.attachmentId):void 0})})}),t.jsxs(q0,{children:[T&&w!=null?t.jsx(l0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:k}):null,v?t.jsxs(J0,{children:[t.jsx(K0,{children:t.jsx(Qn,{children:Da.noPossibleMatch})}),t.jsx(Q0,{children:t.jsx(ot,{children:Da.noMatchFound})})]}):null,$||v?t.jsx(Vf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:h,manualSearchNextPageToken:c,manualSearchTotalCount:u,searchResults:S,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:k},j):null]})]})},U0=o.div`
2298
+ `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ea}}}=me.getLocalizedStrings(),Da=({authParams:e,file:i,index:l,isLoadingMoreManualSearch:r,isSearching:h,manualSearchUiResetKey:d=0,isConfirmMatchInProgress:a=!1,manualSearchNextPageToken:c,manualSearchTotalCount:u,selectedTransactionId:m,onClearSelection:p,onDelete:g,onLoadMoreManualSearch:x,onSearchTransactions:y,onSelectionChange:C,searchResults:S})=>{const $=i.status==="possible_matches",v=i.status==="no_match",T=$&&i.candidates!=null&&i.candidates.length>0,I=Ce(),w=i.candidates?.map(b=>({amount:b.transaction.amount.amount,currencyCode:b.transaction.amount.currencySymbol||b.transaction.amount.currencyCode||"",matchScore:b.matchScore,transactionDate:zf(b.transaction.date),transactionId:b.transaction.id,transactionType:b.transaction.type??"",vendorName:b.transaction.vendorName??"",vendorLogo:b.transaction.logo?.href})),k=s.useCallback((b,P)=>{a||C(b,P)},[a,C]),j=`${i.attachmentId}-${d}`;return t.jsxs(U0,{windowSize:I,"data-testid":D("receipt-card",i.attachmentId),children:[t.jsx(W0,{children:t.jsx(H0,{children:t.jsx(A0,{authParams:e,attachmentId:i.attachmentId,attachmentTitle:`#${l+1} ${i.filename}`,fileDownloadUrl:i.fileDownloadUrl,filename:i.filename,filePreviewUrl:i.filePreviewUrl,onDeleteClick:g!=null?()=>g(i.attachmentId):void 0})})}),t.jsxs(q0,{children:[T&&w!=null?t.jsx(l0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:k}):null,v?t.jsxs(K0,{children:[t.jsx(J0,{children:t.jsx(Kn,{children:Ea.noPossibleMatch})}),t.jsx(Q0,{children:t.jsx(st,{children:Ea.noMatchFound})})]}):null,$||v?t.jsx(Vf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:h,manualSearchNextPageToken:c,manualSearchTotalCount:u,searchResults:S,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:k},j):null]})]})},U0=o.div`
2299
2299
  display: grid;
2300
2300
  grid-template-columns: ${e=>e.windowSize==="small"?"1fr":"1fr 1fr"};
2301
2301
  grid-template-rows: ${e=>e.windowSize==="small"?"1fr 1fr 1fr 1fr":"auto"};
2302
2302
  align-items: start;
2303
2303
  gap: ${n.sp4};
2304
2304
  min-width: 0;
2305
- `,H0=o.div`
2305
+ `,W0=o.div`
2306
2306
  display: flex;
2307
2307
  flex-direction: column;
2308
2308
  min-width: 0;
2309
2309
  max-width: 94%;
2310
- `,W0=o.div`
2310
+ `,H0=o.div`
2311
2311
  display: flex;
2312
2312
  flex-direction: column;
2313
2313
  width: 100%;
@@ -2321,11 +2321,11 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2321
2321
  min-width: 0;
2322
2322
  gap: ${n.sp5};
2323
2323
  margin-top: ${n.sp3};
2324
- `,J0=o.div`
2324
+ `,K0=o.div`
2325
2325
  display: flex;
2326
2326
  flex-direction: column;
2327
2327
  gap: ${n.sp3};
2328
- `,K0=o.div`
2328
+ `,J0=o.div`
2329
2329
  color: ${e=>e.theme.colors.primary};
2330
2330
  `,Q0=o.div`
2331
2331
  display: flex;
@@ -2336,7 +2336,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2336
2336
  background-color: ${e=>e.theme.colors.background};
2337
2337
  border-radius: ${n.sp2};
2338
2338
  color: ${e=>e.theme.colors.grey1};
2339
- `,G0=()=>t.jsx(Y0,{children:t.jsxs(Z0,{children:[t.jsxs(X0,{children:[t.jsx(ny,{children:t.jsx(it,{width:286,height:27,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(ey,{children:t.jsx(ty,{children:t.jsx(iy,{children:t.jsx(Jn,{size:"Large",start:!0})})})})]}),t.jsx(oy,{children:t.jsx(Sf,{})})]})}),Y0=o.div`
2339
+ `,G0=()=>t.jsx(Y0,{children:t.jsxs(Z0,{children:[t.jsxs(X0,{children:[t.jsx(ny,{children:t.jsx(ot,{width:286,height:27,style:{display:"block",borderRadius:n.sp1}})}),t.jsx(ey,{children:t.jsx(ty,{children:t.jsx(iy,{children:t.jsx(Hn,{size:"Large",start:!0})})})})]}),t.jsx(oy,{children:t.jsx(Sf,{})})]})}),Y0=o.div`
2340
2340
  display: flex;
2341
2341
  flex-direction: column;
2342
2342
  flex: 1;
@@ -2393,7 +2393,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2393
2393
  gap: ${n.sp5};
2394
2394
  min-width: 0;
2395
2395
  margin-top: ${n.sp8};
2396
- `,sy=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Oa}}}=me.getLocalizedStrings(),ay=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:h,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:u,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,isConfirmMatchInProgress:g=!1,pendingMatchAttachmentId:x,pendingMatchTransactionId:y,onDelete:C,onLoadMoreBatchDetails:S,onLoadMoreManualSearch:$,onPendingMatchChange:v,onSearchTransactions:T,manualSearchResultsAttachmentId:I,scrollRoot:w,searchResults:k})=>{const j=s.useRef(null),b=s.useRef(!1),[z,A]=s.useState(null),R=I??z,F=s.useCallback((L,U)=>{g||(U.trim().length>=2&&A(L),T?.(U))},[g,T]);s.useEffect(()=>{I==null&&(k?.length??0)===0&&c!==!0&&A(null)},[k,c,I]);const V=s.useCallback(L=>{const[U]=L;U.isIntersecting&&r===!0&&d!==!0&&S?.()},[r,d,S]);if(s.useEffect(()=>{if(h===!0||w==null)return;const L=j.current;if(L==null)return;const U=new IntersectionObserver(V,{root:w,rootMargin:"200px"});return U.observe(L),()=>U.disconnect()},[V,h,w]),s.useEffect(()=>{if(h===!0||w==null||r!==!0){b.current=d===!0;return}const L=b.current===!0&&d!==!0;if(b.current=d===!0,!L)return;const U=j.current;if(U==null)return;const X=w.getBoundingClientRect(),ce=U.getBoundingClientRect();ce.top<X.bottom&&ce.bottom>X.top&&ce.left<X.right&&ce.right>X.left&&requestAnimationFrame(()=>{S?.()})},[h,d,r,w,S]),h===!0)return t.jsx(G0,{});const q=i.length>0,M=l!=null&&l.length>0;if(!q&&!M&&r!==!0&&d!==!0){const{title:L,subTitle:U}=We("missing_receipts").allDoneText;return t.jsx(ry,{children:t.jsx(cy,{children:t.jsx(It,{tab:"missing_receipts",title:L,subTitle:U})})})}const O=M,ae=Oa.unmatchedReceipts.replace("__count__",i.length.toString()),B=i.length>0;return t.jsxs(ly,{children:[B?t.jsxs(hy,{children:[t.jsx(Pa,{"aria-hidden":!0}),t.jsx(py,{children:ae})]}):null,t.jsx(dy,{children:t.jsxs(uy,{children:[i.length>0?t.jsx(za,{children:i.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))}):null,O?t.jsxs(t.Fragment,{children:[t.jsxs(my,{children:[t.jsx(Pa,{"aria-hidden":!0}),t.jsx(gy,{children:Oa.pastUnmatchedReceipts.replace("__count__",l.length.toString())})]}),t.jsx(za,{children:l.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:i.length+U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))})]}):null,t.jsx(xy,{ref:j}),d===!0?t.jsx(fy,{children:t.jsx(Jn,{size:"Small",start:!0})}):null]})})]})},ry=o.div`
2396
+ `,sy=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ma}}}=me.getLocalizedStrings(),ay=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:h,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:u,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,isConfirmMatchInProgress:g=!1,pendingMatchAttachmentId:x,pendingMatchTransactionId:y,onDelete:C,onLoadMoreBatchDetails:S,onLoadMoreManualSearch:$,onPendingMatchChange:v,onSearchTransactions:T,manualSearchResultsAttachmentId:I,scrollRoot:w,searchResults:k})=>{const j=s.useRef(null),b=s.useRef(!1),[P,A]=s.useState(null),R=I??P,F=s.useCallback((L,U)=>{g||(U.trim().length>=2&&A(L),T?.(U))},[g,T]);s.useEffect(()=>{I==null&&(k?.length??0)===0&&c!==!0&&A(null)},[k,c,I]);const V=s.useCallback(L=>{const[U]=L;U.isIntersecting&&r===!0&&d!==!0&&S?.()},[r,d,S]);if(s.useEffect(()=>{if(h===!0||w==null)return;const L=j.current;if(L==null)return;const U=new IntersectionObserver(V,{root:w,rootMargin:"200px"});return U.observe(L),()=>U.disconnect()},[V,h,w]),s.useEffect(()=>{if(h===!0||w==null||r!==!0){b.current=d===!0;return}const L=b.current===!0&&d!==!0;if(b.current=d===!0,!L)return;const U=j.current;if(U==null)return;const X=w.getBoundingClientRect(),ce=U.getBoundingClientRect();ce.top<X.bottom&&ce.bottom>X.top&&ce.left<X.right&&ce.right>X.left&&requestAnimationFrame(()=>{S?.()})},[h,d,r,w,S]),h===!0)return t.jsx(G0,{});const q=i.length>0,M=l!=null&&l.length>0;if(!q&&!M&&r!==!0&&d!==!0){const{title:L,subTitle:U}=He("missing_receipts").allDoneText;return t.jsx(ry,{children:t.jsx(cy,{children:t.jsx(It,{tab:"missing_receipts",title:L,subTitle:U})})})}const O=M,re=Ma.unmatchedReceipts.replace("__count__",i.length.toString()),B=i.length>0;return t.jsxs(ly,{children:[B?t.jsxs(hy,{children:[t.jsx(Oa,{"aria-hidden":!0}),t.jsx(py,{children:re})]}):null,t.jsx(dy,{children:t.jsxs(uy,{children:[i.length>0?t.jsx(za,{children:i.map((L,U)=>t.jsx(Da,{authParams:e,file:L,index:U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))}):null,O?t.jsxs(t.Fragment,{children:[t.jsxs(my,{children:[t.jsx(Oa,{"aria-hidden":!0}),t.jsx(gy,{children:Ma.pastUnmatchedReceipts.replace("__count__",l.length.toString())})]}),t.jsx(za,{children:l.map((L,U)=>t.jsx(Da,{authParams:e,file:L,index:i.length+U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:u,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:C,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>F(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))})]}):null,t.jsx(xy,{ref:j}),d===!0?t.jsx(fy,{children:t.jsx(Hn,{size:"Small",start:!0})}):null]})})]})},ry=o.div`
2397
2397
  display: flex;
2398
2398
  flex-direction: column;
2399
2399
  flex: 1;
@@ -2437,12 +2437,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2437
2437
  z-index: 1;
2438
2438
  width: 100%;
2439
2439
  margin-top: ${n.sp4};
2440
- `,Pa=o(sy)`
2440
+ `,Oa=o(sy)`
2441
2441
  width: ${n.sp4};
2442
2442
  height: ${n.sp4};
2443
2443
  color: ${he.important};
2444
2444
  flex-shrink: 0;
2445
- `,py=o(Vo)`
2445
+ `,py=o(_o)`
2446
2446
  color: ${he.important};
2447
2447
  `,my=o.div`
2448
2448
  display: flex;
@@ -2453,7 +2453,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2453
2453
  position: relative;
2454
2454
  z-index: 1;
2455
2455
  width: 100%;
2456
- `,gy=o(Vo)`
2456
+ `,gy=o(_o)`
2457
2457
  color: ${he.important};
2458
2458
  `,za=o.div`
2459
2459
  display: flex;
@@ -2469,7 +2469,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2469
2469
  display: flex;
2470
2470
  justify-content: center;
2471
2471
  padding: ${n.sp3};
2472
- `,yy=e=>{const{missingReceiptsTab:i,missingTransactionCount:l,bulkUploadSelector:r,selectedPeriod:h,authParams:d,bulkUploadEndpoint:a,onBulkUploadFiles:c,onFetchBulkUploadBatches:u,onPendingMatchChange:m,setMissingReceiptsTab:p,tableSectionProps:g,bulkUploadInteractions:x,missingReceiptsBulkUploadChromeInPageBody:y,missingReceiptsCompletedChromeInPageBody:C}=e,S=Ce(),[$,v]=s.useState(null),{isUploading:T,handleDragOver:I,handleDragLeave:w,handleDrop:k}=x,j=r?.phase,b=a!=null||c!=null,z=r?.manualSearch;s.useEffect(()=>{if(b&&j==="completed"){const B=(r?.unmatchedFiles.length??0)+(r?.pastUnmatchedFiles.length??0);l===0&&B===0?p("completed"):B>0&&p("unmatched")}},[b,j,l,r?.unmatchedFiles.length,r?.pastUnmatchedFiles.length,p]);const A=r?.completedTransactions?.fetchState?.fetchState,R=e.onFetchCompletedTransactions;s.useEffect(()=>{b&&i==="completed"&&h!=null&&A==="Not-Started"&&R?.()},[b,i,h,A,R]);const F=r?.batchListFetchState?.fetchState,V=$l({bulkUploadSelector:r,isUploading:T}),q=s.useRef(null);s.useEffect(()=>{if(!b||h==null)return;const B={month:h.month,tenantId:d.tenantId,year:h.year},L=q.current,U=L!=null&&(L.month!==B.month||L.tenantId!==B.tenantId||L.year!==B.year),X=()=>{q.current=B};if(!(j==="uploading"||j==="matching"||!(j==="completed"||i==="unmatched"))){if(U){u?.({cacheOverride:!0,invalidateBatchDetailsCache:!0}),X();return}if(F==="Not-Started"){u?.(),X();return}X()}},[b,j,i,h,F,d.tenantId,u]),s.useEffect(()=>{i!=="unmatched"&&m(null)},[i,m]);const M=b&&i==="unmatched"&&r!=null&&S!=="small",O=r!=null&&(r.unmatchedFiles.length>0||(r.pastUnmatchedFiles?.length??0)>0),ae=M&&V!==!0&&O;return t.jsxs(wy,{ref:v,windowSize:S,onDragOver:b?I:void 0,onDragLeave:b?w:void 0,onDrop:b?k:void 0,children:[y,C,i==="missing"?t.jsx(Cy,{windowSize:S,children:t.jsx(yl,{...g.parentProps,isCOTEnabled:g.isCOTEnabled,setIsJeAccountSettingsOpened:g.setIsJeAccountSettingsOpened,setResetJeAccountSettingsForm:g.setResetJeAccountSettingsForm,allThreadsSectionOpen:g.allThreadsSectionOpen,setCurrentFooterFormId:g.setCurrentFooterFormId,currentFooterFormId:g.currentFooterFormId,onCloseAllThreadsSection:g.onCloseAllThreadsSection})}):null,b&&i==="unmatched"&&r!=null?t.jsx(by,{$desktopRail:ae,"data-testid":ae?D("unmatched-page-splitter"):void 0,children:t.jsx(ay,{authParams:e.authParams,unmatchedFiles:r.unmatchedFiles,pastUnmatchedFiles:r.pastUnmatchedFiles,manualSearchUiResetKey:r.manualSearchUiResetKey??0,isConfirmMatchInProgress:r.confirmMatchStatus.fetchState==="In-Progress",isLoading:V,isLoadingMore:r.batchDetailsPaginationState.fetchState==="In-Progress",hasMoreBatchDetails:r.hasMoreBatchDetails,isLoadingMoreManualSearch:z?.isLoadingMore===!0,isSearching:z?.fetchState.fetchState==="In-Progress"&&z?.isLoadingMore!==!0,manualSearchNextPageToken:z?.nextPageToken,manualSearchTotalCount:z?.totalCount,searchResults:r.manualSearch.results,manualSearchResultsAttachmentId:r.manualSearch.attachmentId,pendingMatchAttachmentId:e.pendingMatchAttachmentId,pendingMatchTransactionId:e.pendingMatchTransactionId,onDelete:e.onDeleteUnmatchedReceipt,onLoadMoreBatchDetails:e.onFetchMoreBatchDetails,onPendingMatchChange:m,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactions:e.onSearchTransactionsForManualMatch,scrollRoot:$})}):null,b&&i==="completed"&&r!=null?t.jsx(pf,{authParams:e.authParams,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint??"",transactions:r.completedTransactions.transactions,totalCount:r.completedTransactions.totalCount,nextPageToken:r.completedTransactions.nextPageToken,fetchState:r.completedTransactions.fetchState,sortKey:r.sortKey,sortOrder:r.sortOrder,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSortConfigChanged:e.onSetBulkUploadSortConfig,onSortReset:e.onResetBulkUploadSort,onFetchMore:B=>e.onFetchCompletedTransactions?.(B)}):null]})},Oi={contentPadding:new Q(f[3],f[6],f[8])},wy=o("div",{shouldForwardProp:e=>e!=="windowSize"})`
2472
+ `,yy=e=>{const{missingReceiptsTab:i,missingTransactionCount:l,bulkUploadSelector:r,selectedPeriod:h,authParams:d,bulkUploadEndpoint:a,onBulkUploadFiles:c,onFetchBulkUploadBatches:u,onPendingMatchChange:m,setMissingReceiptsTab:p,tableSectionProps:g,bulkUploadInteractions:x,missingReceiptsBulkUploadChromeInPageBody:y,missingReceiptsCompletedChromeInPageBody:C}=e,S=Ce(),[$,v]=s.useState(null),{isUploading:T,handleDragOver:I,handleDragLeave:w,handleDrop:k}=x,j=r?.phase,b=a!=null||c!=null,P=r?.manualSearch;s.useEffect(()=>{if(b&&j==="completed"){const B=(r?.unmatchedFiles.length??0)+(r?.pastUnmatchedFiles.length??0);l===0&&B===0?p("completed"):B>0&&p("unmatched")}},[b,j,l,r?.unmatchedFiles.length,r?.pastUnmatchedFiles.length,p]);const A=r?.completedTransactions?.fetchState?.fetchState,R=e.onFetchCompletedTransactions;s.useEffect(()=>{b&&i==="completed"&&h!=null&&A==="Not-Started"&&R?.()},[b,i,h,A,R]);const F=r?.batchListFetchState?.fetchState,V=jl({bulkUploadSelector:r,isUploading:T}),q=s.useRef(null);s.useEffect(()=>{if(!b||h==null)return;const B={month:h.month,tenantId:d.tenantId,year:h.year},L=q.current,U=L!=null&&(L.month!==B.month||L.tenantId!==B.tenantId||L.year!==B.year),X=()=>{q.current=B};if(!(j==="uploading"||j==="matching"||!(j==="completed"||i==="unmatched"))){if(U){u?.({cacheOverride:!0,invalidateBatchDetailsCache:!0}),X();return}if(F==="Not-Started"){u?.(),X();return}X()}},[b,j,i,h,F,d.tenantId,u]),s.useEffect(()=>{i!=="unmatched"&&m(null)},[i,m]);const M=b&&i==="unmatched"&&r!=null&&S!=="small",O=r!=null&&(r.unmatchedFiles.length>0||(r.pastUnmatchedFiles?.length??0)>0),re=M&&V!==!0&&O;return t.jsxs(wy,{ref:v,windowSize:S,onDragOver:b?I:void 0,onDragLeave:b?w:void 0,onDrop:b?k:void 0,children:[y,C,i==="missing"?t.jsx(Cy,{windowSize:S,children:t.jsx(fl,{...g.parentProps,isCOTEnabled:g.isCOTEnabled,setIsJeAccountSettingsOpened:g.setIsJeAccountSettingsOpened,setResetJeAccountSettingsForm:g.setResetJeAccountSettingsForm,allThreadsSectionOpen:g.allThreadsSectionOpen,setCurrentFooterFormId:g.setCurrentFooterFormId,currentFooterFormId:g.currentFooterFormId,onCloseAllThreadsSection:g.onCloseAllThreadsSection})}):null,b&&i==="unmatched"&&r!=null?t.jsx(by,{$desktopRail:re,"data-testid":re?D("unmatched-page-splitter"):void 0,children:t.jsx(ay,{authParams:e.authParams,unmatchedFiles:r.unmatchedFiles,pastUnmatchedFiles:r.pastUnmatchedFiles,manualSearchUiResetKey:r.manualSearchUiResetKey??0,isConfirmMatchInProgress:r.confirmMatchStatus.fetchState==="In-Progress",isLoading:V,isLoadingMore:r.batchDetailsPaginationState.fetchState==="In-Progress",hasMoreBatchDetails:r.hasMoreBatchDetails,isLoadingMoreManualSearch:P?.isLoadingMore===!0,isSearching:P?.fetchState.fetchState==="In-Progress"&&P?.isLoadingMore!==!0,manualSearchNextPageToken:P?.nextPageToken,manualSearchTotalCount:P?.totalCount,searchResults:r.manualSearch.results,manualSearchResultsAttachmentId:r.manualSearch.attachmentId,pendingMatchAttachmentId:e.pendingMatchAttachmentId,pendingMatchTransactionId:e.pendingMatchTransactionId,onDelete:e.onDeleteUnmatchedReceipt,onLoadMoreBatchDetails:e.onFetchMoreBatchDetails,onPendingMatchChange:m,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactions:e.onSearchTransactionsForManualMatch,scrollRoot:$})}):null,b&&i==="completed"&&r!=null?t.jsx(pf,{authParams:e.authParams,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint??"",transactions:r.completedTransactions.transactions,totalCount:r.completedTransactions.totalCount,nextPageToken:r.completedTransactions.nextPageToken,fetchState:r.completedTransactions.fetchState,sortKey:r.sortKey,sortOrder:r.sortOrder,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSortConfigChanged:e.onSetBulkUploadSortConfig,onSortReset:e.onResetBulkUploadSort,onFetchMore:B=>e.onFetchCompletedTransactions?.(B)}):null]})},Oi={contentPadding:new Q(f[3],f[6],f[8])},wy=o("div",{shouldForwardProp:e=>e!=="windowSize"})`
2473
2473
  display: flex;
2474
2474
  flex-direction: column;
2475
2475
  flex: 1;
@@ -2520,7 +2520,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2520
2520
  margin-right: -${e=>Oi.contentPadding.valuePx(e.windowSize)};
2521
2521
  flex: 1;
2522
2522
  display: flex;
2523
- `;function Fa({children:e,onDragLeave:i,onDragOver:l,onDrop:r}){return t.jsx("div",{style:{width:"100%"},onDragLeave:i,onDragOverCapture:l,onDrop:r,children:e})}function Dl(e,i,l,r){const h=i===1?l:r;return e.replace("__count__",String(i)).replace("__receiptWord__",h)}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:bo}}}=me.getLocalizedStrings(),vy=({total:e})=>{const i=Dl(bo.autoMatchingReceipts,e,bo.receiptWordSingular,bo.receiptWordPlural);return t.jsx(ky,{children:t.jsxs(jy,{children:[t.jsx($y,{}),t.jsx(Iy,{children:i})]})})},Sy=Bi`
2523
+ `;function Pa({children:e,onDragLeave:i,onDragOver:l,onDrop:r}){return t.jsx("div",{style:{width:"100%"},onDragLeave:i,onDragOverCapture:l,onDrop:r,children:e})}function El(e,i,l,r){const h=i===1?l:r;return e.replace("__count__",String(i)).replace("__receiptWord__",h)}const{uncategorizedTransactionList:{missingReceipt:{bulkUpload:wo}}}=me.getLocalizedStrings(),vy=({total:e})=>{const i=El(wo.autoMatchingReceipts,e,wo.receiptWordSingular,wo.receiptWordPlural);return t.jsx(ky,{children:t.jsxs(jy,{children:[t.jsx($y,{}),t.jsx(Iy,{children:i})]})})},Sy=Bi`
2524
2524
  0% {
2525
2525
  background-position: -200% center;
2526
2526
  }
@@ -2578,16 +2578,16 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2578
2578
  -webkit-background-clip: text;
2579
2579
  -webkit-text-fill-color: transparent;
2580
2580
  animation: ${Sy} 2.5s ease-in-out infinite;
2581
- `,Dn=20,us=["application/pdf","image/jpeg","image/png"],Ml=us.join(","),Ty=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:378,viewBox:"0 0 1088 378",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:377,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ba}}}=me.getLocalizedStrings(),Ly=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!0);Zl();const h=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),r(!1);const u=[],{files:m}=c.dataTransfer;for(let p=0;p<m.length;p+=1){const g=m.item(p);if(g==null)continue;const x=String(g.type);if(us.some(y=>y===x)===!0&&(u.push(g),u.length>=Dn))break}u.length>0&&e(u)},[e]),d=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),c.type==="dragenter"||c.type==="dragover"?r(!0):c.type==="dragleave"&&r(!1)},[]),a=s.useCallback(()=>{i.current?.click()},[]);return t.jsxs(Ay,{onClick:a,onDrop:h,onDragEnter:d,onDragLeave:d,onDragOver:d,isDragActive:l,"data-testid":D("bulk-upload-inline-drop-zone"),children:[t.jsx(Ry,{"aria-hidden":!0,children:t.jsx(Ty,{})}),t.jsxs(Ey,{children:[t.jsx(Dy,{}),t.jsx(My,{children:t.jsx(ar,{children:Ba.dropYourFilesHere})}),l?null:t.jsx(Oy,{children:t.jsx(rr,{children:Ba.orBrowseFiles})})]}),t.jsx(Py,{ref:i,type:"file",multiple:!0,accept:Ml,onClick:c=>c.stopPropagation(),onChange:c=>{const u=c.target.files?Array.from(c.target.files):[];u.length>0&&e(u.slice(0,Dn)),c.target.value=""}})]})},_a=200,Va=378,Ay=o.div`
2581
+ `,En=20,ds=["application/pdf","image/jpeg","image/png"],Dl=ds.join(","),Ty=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:378,viewBox:"0 0 1088 378",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:377,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Fa}}}=me.getLocalizedStrings(),Ly=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!0);Yl();const h=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),r(!1);const u=[],{files:m}=c.dataTransfer;for(let p=0;p<m.length;p+=1){const g=m.item(p);if(g==null)continue;const x=String(g.type);if(ds.some(y=>y===x)===!0&&(u.push(g),u.length>=En))break}u.length>0&&e(u)},[e]),d=s.useCallback(c=>{c.preventDefault(),c.stopPropagation(),c.type==="dragenter"||c.type==="dragover"?r(!0):c.type==="dragleave"&&r(!1)},[]),a=s.useCallback(()=>{i.current?.click()},[]);return t.jsxs(Ay,{onClick:a,onDrop:h,onDragEnter:d,onDragLeave:d,onDragOver:d,isDragActive:l,"data-testid":D("bulk-upload-inline-drop-zone"),children:[t.jsx(Ry,{"aria-hidden":!0,children:t.jsx(Ty,{})}),t.jsxs(Ey,{children:[t.jsx(Dy,{}),t.jsx(My,{children:t.jsx(sr,{children:Fa.dropYourFilesHere})}),l?null:t.jsx(Oy,{children:t.jsx(ar,{children:Fa.orBrowseFiles})})]}),t.jsx(zy,{ref:i,type:"file",multiple:!0,accept:Dl,onClick:c=>c.stopPropagation(),onChange:c=>{const u=c.target.files?Array.from(c.target.files):[];u.length>0&&e(u.slice(0,En)),c.target.value=""}})]})},Ba=200,_a=378,Ay=o.div`
2582
2582
  display: flex;
2583
2583
  flex-direction: column;
2584
2584
  justify-content: center;
2585
2585
  align-items: center;
2586
- min-height: ${e=>e.isDragActive?Va:_a}px;
2586
+ min-height: ${e=>e.isDragActive?_a:Ba}px;
2587
2587
  box-sizing: border-box;
2588
2588
  border-radius: ${n.sp2};
2589
2589
  margin: ${n.sp3} ${n.sp0};
2590
- margin-bottom: ${e=>e.isDragActive?`calc(-${Va-_a}px + ${n.sp3})`:n.sp3};
2590
+ margin-bottom: ${e=>e.isDragActive?`calc(-${_a-Ba}px + ${n.sp3})`:n.sp3};
2591
2591
  padding: ${n.sp4};
2592
2592
  background-color: ${e=>e.theme.colors.background};
2593
2593
  cursor: pointer;
@@ -2628,9 +2628,9 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2628
2628
  text-align: center;
2629
2629
  `,Oy=o.div`
2630
2630
  color: ${e=>e.theme.colors.primary};
2631
- `,Py=o.input`
2631
+ `,zy=o.input`
2632
2632
  display: none;
2633
- `,zy=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),Na="receipts@zeni.ai",Fy=2e3,By=400,_y=1200,Vy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Si}},common:{copyToClipBoard:ki}}=me.getLocalizedStrings(),Ny=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!1),[h,d]=s.useState(0),[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1);s.useEffect(()=>{const v=window.setInterval(()=>{d(T=>{const I=(T+1)%3;return T===2&&I===0&&c(!0),I})},Fy);return()=>window.clearInterval(v)},[]),s.useEffect(()=>{if(!a)return;const v=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(v)},[a]),s.useEffect(()=>{if(h===1){g(!1),m(360);return}g(!0),m(0);const v=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(v)},[h]);const x=s.useCallback(v=>{v.stopPropagation(),navigator.clipboard.writeText(Na).then(()=>{r(!0),setTimeout(()=>r(!1),Vy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),C=s.useCallback(v=>{v.preventDefault(),v.stopPropagation();const T=[],{files:I}=v.dataTransfer;for(let w=0;w<I.length;w+=1){const k=I.item(w);if(k==null)continue;const j=String(k.type);if(us.some(b=>b===j)===!0&&(T.push(k),T.length>=Dn))break}T.length>0&&e(T)},[e]),S=s.useCallback(v=>{v.preventDefault()},[]),$=()=>t.jsxs(Ky,{children:[t.jsx(Ua,{children:Si.emailBannerUploadLead}),t.jsx(_o,{children:Si.emailBannerUploadSuffix}),t.jsxs(Qy,{children:[t.jsx(Jy,{children:Na}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?ki.copied:ki.copy,enterDelay:300,leaveDelay:0,children:t.jsx(Gy,{type:"button","aria-label":l?ki.copied:ki.copy,onClick:x,children:l?t.jsx(Zy,{}):t.jsx(Yy,{})})})]})]});return t.jsxs(Hy,{onClick:y,onDrop:C,onDragOver:S,children:[t.jsx(Uy,{"aria-hidden":!0,children:t.jsx(zy,{})}),t.jsx(Wy,{children:t.jsxs(qy,{$phase:h,$skipTransition:a,children:[t.jsx(Co,{children:$()}),t.jsx(Co,{children:t.jsxs(Xy,{children:[t.jsx(e2,{$deg:u,$skipTransition:p,"aria-hidden":!0,children:t.jsx(t2,{})}),t.jsx(Ua,{children:Si.emailBannerAiLead}),t.jsx(_o,{children:Si.emailBannerAiTail})]})}),t.jsx(Co,{children:$()})]})}),t.jsx(n2,{ref:i,type:"file",multiple:!0,accept:Ml,onClick:v=>v.stopPropagation(),onChange:v=>{const T=v.target.files?Array.from(v.target.files):[];T.length>0&&e(T.slice(0,Dn)),v.target.value=""}})]})},Uy=o.div`
2633
+ `,Py=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),Va="receipts@zeni.ai",Fy=2e3,By=400,_y=1200,Vy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Si}},common:{copyToClipBoard:ki}}=me.getLocalizedStrings(),Ny=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!1),[h,d]=s.useState(0),[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1);s.useEffect(()=>{const v=window.setInterval(()=>{d(T=>{const I=(T+1)%3;return T===2&&I===0&&c(!0),I})},Fy);return()=>window.clearInterval(v)},[]),s.useEffect(()=>{if(!a)return;const v=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(v)},[a]),s.useEffect(()=>{if(h===1){g(!1),m(360);return}g(!0),m(0);const v=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(v)},[h]);const x=s.useCallback(v=>{v.stopPropagation(),navigator.clipboard.writeText(Va).then(()=>{r(!0),setTimeout(()=>r(!1),Vy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),C=s.useCallback(v=>{v.preventDefault(),v.stopPropagation();const T=[],{files:I}=v.dataTransfer;for(let w=0;w<I.length;w+=1){const k=I.item(w);if(k==null)continue;const j=String(k.type);if(ds.some(b=>b===j)===!0&&(T.push(k),T.length>=En))break}T.length>0&&e(T)},[e]),S=s.useCallback(v=>{v.preventDefault()},[]),$=()=>t.jsxs(Jy,{children:[t.jsx(Na,{children:Si.emailBannerUploadLead}),t.jsx(Bo,{children:Si.emailBannerUploadSuffix}),t.jsxs(Qy,{children:[t.jsx(Ky,{children:Va}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?ki.copied:ki.copy,enterDelay:300,leaveDelay:0,children:t.jsx(Gy,{type:"button","aria-label":l?ki.copied:ki.copy,onClick:x,children:l?t.jsx(Zy,{}):t.jsx(Yy,{})})})]})]});return t.jsxs(Wy,{onClick:y,onDrop:C,onDragOver:S,children:[t.jsx(Uy,{"aria-hidden":!0,children:t.jsx(Py,{})}),t.jsx(Hy,{children:t.jsxs(qy,{$phase:h,$skipTransition:a,children:[t.jsx(bo,{children:$()}),t.jsx(bo,{children:t.jsxs(Xy,{children:[t.jsx(e2,{$deg:u,$skipTransition:p,"aria-hidden":!0,children:t.jsx(t2,{})}),t.jsx(Na,{children:Si.emailBannerAiLead}),t.jsx(Bo,{children:Si.emailBannerAiTail})]})}),t.jsx(bo,{children:$()})]})}),t.jsx(n2,{ref:i,type:"file",multiple:!0,accept:Dl,onClick:v=>v.stopPropagation(),onChange:v=>{const T=v.target.files?Array.from(v.target.files):[];T.length>0&&e(T.slice(0,En)),v.target.value=""}})]})},Uy=o.div`
2634
2634
  position: absolute;
2635
2635
  inset: 0;
2636
2636
  z-index: 0;
@@ -2644,7 +2644,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2644
2644
  width: 100%;
2645
2645
  height: 100%;
2646
2646
  }
2647
- `,Hy=o.div`
2647
+ `,Wy=o.div`
2648
2648
  position: relative;
2649
2649
  display: flex;
2650
2650
  align-items: center;
@@ -2664,7 +2664,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2664
2664
  position: relative;
2665
2665
  z-index: 1;
2666
2666
  }
2667
- `,Wy=o.div`
2667
+ `,Hy=o.div`
2668
2668
  flex: 1;
2669
2669
  min-width: 0;
2670
2670
  height: ${n.sp4};
@@ -2674,15 +2674,15 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2674
2674
  flex-direction: column;
2675
2675
  transition: ${e=>e.$skipTransition?"none":`transform ${By}ms ease-in-out`};
2676
2676
  transform: translateY(${e=>`-${e.$phase*f[4]}px`});
2677
- `,Co=o.div`
2677
+ `,bo=o.div`
2678
2678
  flex-shrink: 0;
2679
2679
  height: ${n.sp4};
2680
2680
  line-height: ${n.sp4};
2681
2681
  display: flex;
2682
2682
  align-items: center;
2683
2683
  justify-content: center;
2684
- `,Ol=o.span`
2685
- font-family: ${Dc};
2684
+ `,Ml=o.span`
2685
+ font-family: ${Ec};
2686
2686
  font-size: ${n.sp3};
2687
2687
  line-height: ${n.sp4};
2688
2688
  letter-spacing: 0;
@@ -2690,17 +2690,17 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2690
2690
  text-decoration: none;
2691
2691
  border-bottom: none;
2692
2692
  box-shadow: none;
2693
- `,Ua=o(Ol)`
2694
- font-weight: ${Zn.medium};
2695
- `,_o=o(Ol)`
2696
- font-weight: ${Zn.regular};
2697
- `,Jy=o(_o)`
2693
+ `,Na=o(Ml)`
2694
+ font-weight: ${Gn.medium};
2695
+ `,Bo=o(Ml)`
2696
+ font-weight: ${Gn.regular};
2697
+ `,Ky=o(Bo)`
2698
2698
  text-decoration: underline;
2699
2699
  text-decoration-color: ${he.neutralGrey2Light};
2700
2700
  text-underline-offset: 0.15em;
2701
2701
  border-bottom: none;
2702
2702
  box-shadow: none;
2703
- `,Ky=o.span`
2703
+ `,Jy=o.span`
2704
2704
  display: inline-flex;
2705
2705
  align-items: center;
2706
2706
  flex-wrap: nowrap;
@@ -2727,12 +2727,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2727
2727
  cursor: pointer;
2728
2728
  line-height: 1;
2729
2729
  flex-shrink: 0;
2730
- `,Yy=o(br)`
2730
+ `,Yy=o(wr)`
2731
2731
  width: ${n.sp3};
2732
2732
  height: ${n.sp3};
2733
2733
  flex-shrink: 0;
2734
2734
  color: ${e=>e.theme.colors.primary};
2735
- `,Zy=o(Ec)`
2735
+ `,Zy=o(Rc)`
2736
2736
  width: ${n.sp3};
2737
2737
  height: ${n.sp3};
2738
2738
  flex-shrink: 0;
@@ -2771,7 +2771,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2771
2771
  text-align: center;
2772
2772
  padding: ${n.sp4} ${n.sp4};
2773
2773
  color: ${e=>e.theme.colors.hero};
2774
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:vo}}}=me.getLocalizedStrings(),ji=3e4,Ha=3e4,So=99;function a2(e){if(e<=ji)return e/ji*So;if(e<=ji+Ha){const i=e-ji;return So+i/Ha*(100-So)}return 100}const r2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(a2(m))};c();const u=window.setInterval(c,100);return()=>window.clearInterval(u)},[]);const h=Math.min(100,Math.max(l,i)),d=Dl(vo.uploadingReceipts,e,vo.receiptWordSingular,vo.receiptWordPlural);return t.jsxs(l2,{children:[t.jsx(c2,{children:t.jsx(d2,{style:{width:`${h}%`}})}),t.jsx(u2,{children:t.jsx(h2,{children:d})})]})},l2=o.div`
2774
+ `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Co}}}=me.getLocalizedStrings(),ji=3e4,Ua=3e4,vo=99;function a2(e){if(e<=ji)return e/ji*vo;if(e<=ji+Ua){const i=e-ji;return vo+i/Ua*(100-vo)}return 100}const r2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(a2(m))};c();const u=window.setInterval(c,100);return()=>window.clearInterval(u)},[]);const h=Math.min(100,Math.max(l,i)),d=El(Co.uploadingReceipts,e,Co.receiptWordSingular,Co.receiptWordPlural);return t.jsxs(l2,{children:[t.jsx(c2,{children:t.jsx(d2,{style:{width:`${h}%`}})}),t.jsx(u2,{children:t.jsx(h2,{children:d})})]})},l2=o.div`
2775
2775
  position: relative;
2776
2776
  display: flex;
2777
2777
  align-items: center;
@@ -2810,7 +2810,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2810
2810
  border-radius: ${n.sp2};
2811
2811
  color: ${he.important};
2812
2812
  text-align: center;
2813
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:gn}}}=me.getLocalizedStrings(),g2=[{id:"all",label:gn.completedSubTabAll},{id:"ai_accountant",label:gn.completedSubTabAiAccountant},{id:"manual",label:gn.completedSubTabManual}],qa=({activeSubTab:e,totalCount:i,onSubTabChange:l,completedTransactionsFetchState:r,completedTransactionsLoadedCount:h=0})=>{const d=r?.fetchState,a=(h>0||r!=null&&d!=="Not-Started"&&d!=="In-Progress")&&i>0,c=s.useMemo(()=>{switch(e){case"all":return gn.completedDescriptionAll;case"ai_accountant":return gn.completedDescriptionAi.replace("__count__",i.toString());case"manual":return gn.completedDescriptionManual;default:return gn.completedDescriptionAll}},[e,i]);return t.jsxs(x2,{children:[t.jsx(f2,{children:g2.map(u=>t.jsx(y2,{isActive:e===u.id,onClick:()=>{l(u.id)},children:t.jsx(ot,{children:u.label})},u.id))}),a?t.jsxs(w2,{children:[e==="ai_accountant"?t.jsx(b2,{}):null,t.jsx(C2,{children:t.jsx(Re,{children:c})})]}):null]})},x2=o.div`
2813
+ `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:mn}}}=me.getLocalizedStrings(),g2=[{id:"all",label:mn.completedSubTabAll},{id:"ai_accountant",label:mn.completedSubTabAiAccountant},{id:"manual",label:mn.completedSubTabManual}],Ha=({activeSubTab:e,totalCount:i,onSubTabChange:l,completedTransactionsFetchState:r,completedTransactionsLoadedCount:h=0})=>{const d=r?.fetchState,a=(h>0||r!=null&&d!=="Not-Started"&&d!=="In-Progress")&&i>0,c=s.useMemo(()=>{switch(e){case"all":return mn.completedDescriptionAll;case"ai_accountant":return mn.completedDescriptionAi.replace("__count__",i.toString());case"manual":return mn.completedDescriptionManual;default:return mn.completedDescriptionAll}},[e,i]);return t.jsxs(x2,{children:[t.jsx(f2,{children:g2.map(u=>t.jsx(y2,{isActive:e===u.id,onClick:()=>{l(u.id)},children:t.jsx(st,{children:u.label})},u.id))}),a?t.jsxs(w2,{children:[e==="ai_accountant"?t.jsx(b2,{}):null,t.jsx(C2,{children:t.jsx(Re,{children:c})})]}):null]})},x2=o.div`
2814
2814
  display: flex;
2815
2815
  flex-direction: column;
2816
2816
  width: 100%;
@@ -2849,7 +2849,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2849
2849
  `,C2=o.div`
2850
2850
  color: ${e=>e.theme.colors.champion};
2851
2851
  text-align: center;
2852
- `;async function v2(e,i,l,r){const h=new FormData;l.forEach((d,a)=>{h.append(`attachment_file_${a}`,d);const c=JSON.stringify({file_name:d.name,content_type:d.type,size:d.size});h.append(`attachment_json_${a}`,c)});try{const d=await(await Ul(e,{method:"POST",body:h,headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}})).json();if(d.status.code>=200&&d.status.code<300)return d.data;throw console.error(`Bulk upload failed with ${d.status.message}`),r?.(d.status.message),new Error(`Bulk upload failed: ${d.status.message}`)}catch(d){throw console.error(`Bulk upload failed: ${JSON.stringify(d)}`),d}}function S2(e){const{authParams:i,bulkUploadEndpoint:l,onBulkUploadFilesFallback:r,onBulkUploadProgress:h,onBulkUploadSuccess:d}=e,[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1),[x,y]=s.useState(null),C=s.useCallback(async T=>{const I=T.slice(0,Dn);if(m(I.length),c(!1),y(null),l!=null){g(!0);try{const w=await v2(l,i,I,y);h?.(100),await new Promise(k=>{window.setTimeout(k,dd)}),d?.(w.batch_id)}catch{y("Upload failed. Please try again.")}finally{g(!1)}}else r?.(I)},[l,i,h,d,r]),S=s.useCallback(T=>{T.preventDefault(),T.stopPropagation(),c(!0)},[]),$=s.useCallback(T=>{const I=T.relatedTarget,w=T.currentTarget;I&&w.contains(I)||(T.preventDefault(),T.stopPropagation(),c(!1))},[]),v=s.useCallback(T=>{T.preventDefault(),T.stopPropagation();const I=Array.from(T.dataTransfer.files).slice(0,Dn);I.length>0?C(I):c(!1)},[C]);return{isDraggingFiles:a,uploadFileCount:u,isUploading:p,uploadError:x,handleBulkUploadFiles:C,handleDragOver:S,handleDragLeave:$,handleDrop:v}}const k2=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"})),j2=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"})),$2=o.div`
2852
+ `;async function v2(e,i,l,r){const h=new FormData;l.forEach((d,a)=>{h.append(`attachment_file_${a}`,d);const c=JSON.stringify({file_name:d.name,content_type:d.type,size:d.size});h.append(`attachment_json_${a}`,c)});try{const d=await(await Nl(e,{method:"POST",body:h,headers:{"zeni-user-id":i.userId,"zeni-tenant-id":i.tenantId,"zeni-session-id":i.sessionId}})).json();if(d.status.code>=200&&d.status.code<300)return d.data;throw console.error(`Bulk upload failed with ${d.status.message}`),r?.(d.status.message),new Error(`Bulk upload failed: ${d.status.message}`)}catch(d){throw console.error(`Bulk upload failed: ${JSON.stringify(d)}`),d}}function S2(e){const{authParams:i,bulkUploadEndpoint:l,onBulkUploadFilesFallback:r,onBulkUploadProgress:h,onBulkUploadSuccess:d}=e,[a,c]=s.useState(!1),[u,m]=s.useState(0),[p,g]=s.useState(!1),[x,y]=s.useState(null),C=s.useCallback(async T=>{const I=T.slice(0,En);if(m(I.length),c(!1),y(null),l!=null){g(!0);try{const w=await v2(l,i,I,y);h?.(100),await new Promise(k=>{window.setTimeout(k,dd)}),d?.(w.batch_id)}catch{y("Upload failed. Please try again.")}finally{g(!1)}}else r?.(I)},[l,i,h,d,r]),S=s.useCallback(T=>{T.preventDefault(),T.stopPropagation(),c(!0)},[]),$=s.useCallback(T=>{const I=T.relatedTarget,w=T.currentTarget;I&&w.contains(I)||(T.preventDefault(),T.stopPropagation(),c(!1))},[]),v=s.useCallback(T=>{T.preventDefault(),T.stopPropagation();const I=Array.from(T.dataTransfer.files).slice(0,En);I.length>0?C(I):c(!1)},[C]);return{isDraggingFiles:a,uploadFileCount:u,isUploading:p,uploadError:x,handleBulkUploadFiles:C,handleDragOver:S,handleDragLeave:$,handleDrop:v}}const k2=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"})),j2=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"})),$2=o.div`
2853
2853
  width: 100%;
2854
2854
  height: 100vh;
2855
2855
  display: flex;
@@ -2868,7 +2868,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2868
2868
  width: 100%;
2869
2869
  padding-left: ${n.sp0};
2870
2870
  }
2871
- `,Ja=o(Hl)`
2871
+ `,qa=o(Ul)`
2872
2872
  height: ${n.sp3};
2873
2873
  width: ${n.sp3};
2874
2874
  cursor: pointer;
@@ -2878,13 +2878,13 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2878
2878
  width: ${n.sp3};
2879
2879
  cursor: pointer;
2880
2880
  color: inherit;
2881
- `,{common:{footer:Pe,texts:{maxLimitReached:T2,confirmAction:L2},headers:Pl,create:A2,strings:Hn,texts:Rn,cancel:R2,confirm:E2,monthsByIndex:D2},dateFormat:{visual:{MMMDCommaYYYYformat:Qa}},expenseAutomation:En,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ga}}}=me.getLocalizedStrings(),M2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=Pi(),l=Tt(),[r,h]=s.useState(!1);return i==null?null:t.jsx(xe,{title:En.transactions.header.activity,placement:"bottom",children:t.jsx(X2,{"data-testid":D("panel-activity-button"),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(ew,{style:{color:r?l.colors.primary:l.colors.hero}})})})},bw=e=>{const{expenseAutomationViewSelector:i,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:d,onUpdateTab:a,onReconTabUpdate:c,onUpdateStep:u,onSearchTextChanged:m,onRefresh:p,onClose:g,onBack:x,onBulkUploadConfirmMatchAcknowledged:y,onClearMissingReceiptsTabNavigation:C,closeSidePanel:S,initialMissingReceiptsTab:$,resetTransactionCategorizationLocalData:v,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:I,onSaveReconciliation:w}=e,k=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=S2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:b,allSteps:z,missingReceipts:A,jeSchedules:R,fluxAnalysis:F,monthEndInsights:V,transactionView:q,selectedTransactionCategorizationTab:M,reconciliation:O,selectedPeriod:ae}=i,{pendingMissingReceiptsTabNavigation:B}=A,[L,U]=s.useState("expenseAutomationPage"),[X,ce]=s.useState(()=>{}),[ge,te]=s.useState(!1),K=Ce(),ee=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),W=ee?er:tr,{openThread:_,setOpenThread:ne}=s.useContext(W),[H,Z]=s.useState(!1),[oe,J]=s.useState(!1),[N,P]=s.useState($??"missing"),se=s.useRef(null);s.useEffect(()=>{const Ae=se.current;Ae!==null&&Ae!==N&&S?.(),se.current=N},[N,S]);const Y=s.useCallback(Ae=>{P(Ae)},[]),[G,je]=s.useState(null),Te=s.useCallback(Ae=>{je(Ae),U(Ae!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[U]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,de=s.useRef(void 0);s.useEffect(()=>{de.current==="In-Progress"&&E==="Completed"&&G!=null&&(Te(null),y?.()),de.current=E},[E,G,Te,y]),s.useEffect(()=>{N!=="unmatched"&&Te(null)},[N,Te]),s.useEffect(()=>{B==="unmatched"&&(k&&Y("unmatched"),C?.())},[B,C,k,Y]),s.useEffect(()=>{k===!1&&(N==="unmatched"||N==="completed")&&Y("missing")},[k,N,Y]);const $e=z.find(Ae=>Ae.step===b),{nextStep:Me,previousStep:De}=z2(z,b),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:Xe,transactions:ht,fetchStateByTransactionTabs:et,transactionLocalData:fe}=q,{selectedReconAccount:Be,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=O;let tt="Not-Started",pt="complete";switch(b){case"missing_receipts":tt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":tt=R.refreshStatus.fetchState,pt=R.completionStatus;break;case"month_end_insights":V!=null&&(tt=V?.fetchState);break;case"flux_analysis":tt=F.refreshStatus.fetchState,pt=F.completionStatus;break;case"transaction_categorization":tt=q.refreshStatus.fetchState,pt=q.completionStatus;break;case"reconciliation":Be==null?(tt=O.refreshStatus.fetchState,pt=O.completionStatus):(tt=O.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=O.completionStatus)}const Lt=()=>{X()},{saveStatus:Ee,selectedCheckBoxTransactionIds:Ie}=q,Je=()=>{const Ae=Zr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds),rt=Ji(),{month:At,year:ri}=ae,Ct=Ji().set("month",At-1).set("year",ri).endOf("month");switch(L){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ae===!0?Pe.markAsReviewed:Rn.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(i.fluxAnalysis.reviewOperatingExpensesIds.length,zr,K,Rn.vendor,b),cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(Ie.length,qn,K,Rn.transaction,b),cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{v(M,ht.map(nn=>nn.id),ae,!1,Xe[M],ws(fe,M),h,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Pe.next,backBtnLabel:Pe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.next,style:{justifyContent:"space-evenly"},isDisabled:l||$e?.isNextDisabled,suffixIcon:t.jsx(Ja,{}),onClick:()=>{u(Me.step)}},cancelBtn:{label:Pe.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{u(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Pe.reconcile,backBtnLabel:Pe.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:!(O.reconciliationTabsState.balances.variance.amount===0&&rt.isAfter(Ct)),isLoading:O.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:ko(Vt.length,1/0,K,Rn.transaction,b),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:O.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Pe.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Pe.save,backBtnLabel:Pe.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Pe.save,isLoading:R.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:Pe.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ga.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:G==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{G!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(G.batchId,G.attachmentId,G.transactionId,G.transactionType,G.fileName)}},cancelBtn:{label:Pe.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Te(null)}};default:{const nn=b==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,Pn=b==="reconciliation"&&i.reconciliation.selectedAccountId==null,li=b==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,Ui=Me.step==="month_end_insights"&&(b==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Pn),lt=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",zn=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",ie=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(vt=>vt.id==="month_end_insights"),Se=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&ie?.isDisabled===!1&&(r||$e?.isNextDisabled===!1),Le=Me.step==="month_end_insights"&&(Pn||b==="flux_analysis")?!Se:$e?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Pe.next,backBtnLabel:Pe.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ui===!0?P2(i.selectedPeriod.month):Pe.next,style:{justifyContent:"space-evenly"},isDisabled:Le,suffixIcon:t.jsx(Ja,{}),onClick:()=>{lt?a("autoCategorized"):nn?c("reconcile"):u(Me.step)}},cancelBtn:{label:Pe.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{zn?a("review"):li?c("review"):nn?x():u(De.step)}}}}}},ye=()=>{switch(L){case"expenseAutomationFluxPage":return{confirmAction:()=>{Z(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Z(!1),v(M,ht.map(Ae=>Ae.id),ae,!1,Xe[M],ws(fe,M),h,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Z(!1),I(),g()}};default:return{confirmAction:()=>{Z(!1)},confirmationDescription:Hn.empty}}},_e=()=>{L==="expenseAutomationFluxPage"||L==="expenseAutomationJESchedulePage"||L==="expenseAutomationTransactionsPage"?Z(!0):g()},{primaryBtn:wt,cancelBtn:yn,leftSideComponent:Qe}=Je(),{confirmAction:wn}=ye(),bn=Ae=>{if(b==="transaction_categorization"&&(Ae==="autoCategorized"||Ae==="review")){const rt=Ae;return{hideCountInTab:Xe[rt]>En.common.numbers.maximumCount,count:Xe[rt],isFetching:et[rt].fetchState==="In-Progress"}}if(b==="reconciliation"){const{reconciliation:rt}=i,{selectedAccountId:At}=rt;return At==null?{count:0,isFetching:!1}:Ae==="review"?{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReview.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}:{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReconcile.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}}if(b==="missing_receipts"){if(Ae==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Ae==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:N==="unmatched"&&$l({bulkUploadSelector:e.bulkUploadSelector})};if(Ae==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},bt=b==="reconciliation"&&O.selectedAccountId!=null&&O.selectedReconAccount!=null,{month:Yt,year:Zt}=ae,Xt=Ji().set("month",Yt-1).set("year",Zt),ii=Xt.startOf("month").format(Qa),Mn=Xt.endOf("month").format(Qa),_i=`${ii} ${Hn.hyphen} ${Mn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,On=b==="missing_receipts"&&N==="missing"&&k,oi=e.bulkUploadSelector?.phase,Vi=e.bulkUploadSelector?.progress.total!=null&&e.bulkUploadSelector.progress.total>0?e.bulkUploadSelector.progress.total:j.uploadFileCount,Ni=N==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,si={bulkUploadPhase:oi,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Vi,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Ni?"":Ga.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&oi!=="matching",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},ai=b==="missing_receipts"&&N==="completed"&&k&&e.bulkUploadSelector!=null,He={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},Cn=On===!0&&!(en&&tn)?t.jsx(Fa,{...He,children:t.jsx(Wa,{...si})}):ai===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null;return t.jsxs($2,{children:[H?t.jsx(Fl,{containerStyle:{width:356},titleComponent:t.jsx(U2,{children:L2}),primaryButtonText:E2,secondaryButtonText:R2,proceedButtonVariant:"danger",action:{onOkClick:()=>{wn()},onCancelClick:()=>Z(!1)},descriptionComponent:t.jsx(H2,{children:En.confirmationDescription})}):null,t.jsx(Bl,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(M2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(iu,{hideEmptyDivBelowTabs:b==="missing_receipts",onBack:x,navBarCustomElement:b==="reconciliation"&&O.selectedAccountId!=null?t.jsx(O2,{reconciliation:O}):void 0,onReconTabUpdate:c,currentRecontab:O.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:N,onMissingReceiptsTabUpdate:Y,reconcileDetailPageFetchState:O.selectedAccountId!=null?O.accountReconciliationsByAccountID[O.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:bt?O.selectedAccountId:void 0,currentSelectedView:b,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:We(b,Xe.autoCategorized,bt?O.selectedAccountId:void 0,bt?O.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,bt?_i:void 0,b==="missing_receipts"?{includeBulkUploadTabs:k,navTitle:k?Pl.receipts:void 0}:void 0),searchText:Fe,currentTab:M,getTabCountAndFetchState:bn,completionStatus:pt,forceShowSubtitle:ge===!0||b==="je_schedules"&&(R.fetchState==="In-Progress"||R.accountSettingsView.fetchState==="In-Progress"),refreshStatus:tt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Hn.empty,isZeniUser:ee,onAllThreadsClick:()=>{_!=null&&ne(null),J(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:b==="missing_receipts"?()=>{switch(N){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0);break}}:p,onClose:_e,belowTabsSlot:Cn}),listContent:t.jsxs(I2,{children:[b==="missing_receipts"?t.jsx(yy,{missingReceiptsTab:N,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:On===!0&&en&&tn?t.jsx(Fa,{...He,children:t.jsx(Wa,{...si})}):null,missingReceiptsCompletedChromeInPageBody:ai===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:j,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:ae,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:Te,pendingMatchAttachmentId:G?.attachmentId??null,pendingMatchTransactionId:G?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:Y,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>J(!1)}}):t.jsx(yl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>J(!1)}),t.jsx(Ge,{controller:b!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(nr,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:F2(L),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:yn,separatorStyle:{marginRight:n.sp4}})})]})})]})},O2=({reconciliation:e})=>{const i=Tt(),{clearedBalance:l,variance:r,variancePercentage:h,deposits:d,payments:a}=e.reconciliationTabsState.balances,{balance:c}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:u}=e,{transactionFetchState:m}=u??{};return t.jsx(W2,{children:t.jsxs(q2,{children:[t.jsxs(jo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx($o,{children:t.jsx(J2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",c)}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(jo,{children:[t.jsx($o,{children:t.jsx(Q2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",l)}),t.jsxs(Y2,{children:[t.jsx(To,{children:En.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(Z2,{children:[t.jsxs(Ya,{children:[t.jsxs(Za,{children:[a.count," ",Rn.payments]}),t.jsx(Xa,{children:nt("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ya,{children:[t.jsxs(Za,{children:[d.count," ",Rn.deposits]}),t.jsx(Xa,{children:nt("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(G2,{})})]})]})})]}),t.jsxs(jo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx($o,{children:t.jsx(K2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Lo,{children:[t.jsx("span",{style:{color:r.amount===0?i.colors.brandColorJadeDark:i.colors.primary},children:nt("0,0.00",r)}),h!=null&&r.amount!==0?t.jsx("span",{style:{color:i.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.variance})]})})]})]})})},ko=(e,i,l,r,h)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(B2,{currentView:h,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(_2,{multiDigit:e>=5,children:e}),t.jsx(V2,{children:a}),e===i?t.jsx(N2,{children:`(${T2})`}):null]}):null},P2=e=>{const i=D2[e];return`${A2}${Hn.space}${i}${Hn.space}${Pl.insights}`};function z2(e,i){const l=e.findIndex(c=>c.step===i);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,h=(l-1+e.length)%e.length,d=e[r],a=e[h];return{nextStep:d,previousStep:a}}const F2=e=>`${e}_form`,B2=o.div`
2881
+ `,{common:{footer:ze,texts:{maxLimitReached:T2,confirmAction:L2},headers:Ol,create:A2,strings:Nn,texts:An,cancel:R2,confirm:E2,monthsByIndex:D2},dateFormat:{visual:{MMMDCommaYYYYformat:Ja}},expenseAutomation:Rn,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Qa}}}=me.getLocalizedStrings(),M2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=zi(),l=Tt(),[r,h]=s.useState(!1);return i==null?null:t.jsx(xe,{title:Rn.transactions.header.activity,placement:"bottom",children:t.jsx(X2,{"data-testid":D("panel-activity-button"),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(ew,{style:{color:r?l.colors.primary:l.colors.hero}})})})},bw=e=>{const{expenseAutomationViewSelector:i,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:d,onUpdateTab:a,onReconTabUpdate:c,onUpdateStep:u,onSearchTextChanged:m,onRefresh:p,onClose:g,onBack:x,onBulkUploadConfirmMatchAcknowledged:y,onClearMissingReceiptsTabNavigation:C,closeSidePanel:S,initialMissingReceiptsTab:$,resetTransactionCategorizationLocalData:v,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:I,onSaveReconciliation:w}=e,k=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=S2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:b,allSteps:P,missingReceipts:A,jeSchedules:R,fluxAnalysis:F,monthEndInsights:V,transactionView:q,selectedTransactionCategorizationTab:M,reconciliation:O,selectedPeriod:re}=i,{pendingMissingReceiptsTabNavigation:B}=A,[L,U]=s.useState("expenseAutomationPage"),[X,ce]=s.useState(()=>{}),[ge,te]=s.useState(!1),J=Ce(),ee=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),H=ee?Xa:er,{openThread:_,setOpenThread:ne}=s.useContext(H),[W,Z]=s.useState(!1),[ie,K]=s.useState(!1),[N,z]=s.useState($??"missing"),oe=s.useRef(null);s.useEffect(()=>{const Le=oe.current;Le!==null&&Le!==N&&S?.(),oe.current=N},[N,S]);const Y=s.useCallback(Le=>{z(Le)},[]),[G,ke]=s.useState(null),Ie=s.useCallback(Le=>{ke(Le),U(Le!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[U]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,de=s.useRef(void 0);s.useEffect(()=>{de.current==="In-Progress"&&E==="Completed"&&G!=null&&(Ie(null),y?.()),de.current=E},[E,G,Ie,y]),s.useEffect(()=>{N!=="unmatched"&&Ie(null)},[N,Ie]),s.useEffect(()=>{B==="unmatched"&&(k&&Y("unmatched"),C?.())},[B,C,k,Y]),s.useEffect(()=>{k===!1&&(N==="unmatched"||N==="completed")&&Y("missing")},[k,N,Y]);const je=P.find(Le=>Le.step===b),{nextStep:Me,previousStep:De}=P2(P,b),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:et,transactions:ht,fetchStateByTransactionTabs:tt,transactionLocalData:fe}=q,{selectedReconAccount:Be,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=O;let nt="Not-Started",pt="complete";switch(b){case"missing_receipts":nt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":nt=R.refreshStatus.fetchState,pt=R.completionStatus;break;case"month_end_insights":V!=null&&(nt=V?.fetchState);break;case"flux_analysis":nt=F.refreshStatus.fetchState,pt=F.completionStatus;break;case"transaction_categorization":nt=q.refreshStatus.fetchState,pt=q.completionStatus;break;case"reconciliation":Be==null?(nt=O.refreshStatus.fetchState,pt=O.completionStatus):(nt=O.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=O.completionStatus)}const Lt=()=>{X()},{saveStatus:Ee,selectedCheckBoxTransactionIds:$e}=q,Ke=()=>{const Le=Yr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds);switch(L){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Le===!0?ze.markAsReviewed:An.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:So(i.fluxAnalysis.reviewOperatingExpensesIds.length,zr,J,An.vendor,b),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:So($e.length,Wn,J,An.transaction,b),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{v(M,ht.map(Ge=>Ge.id),re,!1,et[M],ys(fe,M),h,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.next,style:{justifyContent:"space-evenly"},isDisabled:l||je?.isNextDisabled,suffixIcon:t.jsx(qa,{}),onClick:()=>{u(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{u(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:ze.reconcile,backBtnLabel:ze.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:O.reconciliationTabsState.balances.variance.amount!==0,isLoading:O.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:So(Vt.length,1/0,J,An.transaction,b),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:O.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:ze.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:ze.save,backBtnLabel:ze.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,isLoading:R.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:ze.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Qa.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:G==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{G!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(G.batchId,G.attachmentId,G.transactionId,G.transactionType,G.fileName)}},cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Ie(null)}};default:{const Ge=b==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,Ct=b==="reconciliation"&&i.reconciliation.selectedAccountId==null,si=b==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,vt=Me.step==="month_end_insights"&&(b==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Ct),ai=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",ri=b==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",li=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(On=>On.id==="month_end_insights"),Ui=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&li?.isDisabled===!1&&(r||je?.isNextDisabled===!1),lt=Me.step==="month_end_insights"&&(Ct||b==="flux_analysis")?!Ui:je?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:vt===!0?z2(i.selectedPeriod.month):ze.next,style:{justifyContent:"space-evenly"},isDisabled:lt,suffixIcon:t.jsx(qa,{}),onClick:()=>{ai?a("autoCategorized"):Ge?c("reconcile"):u(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||je?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ka,{}),onClick:()=>{ri?a("review"):si?c("review"):Ge?x():u(De.step)}}}}}},ye=()=>{switch(L){case"expenseAutomationFluxPage":return{confirmAction:()=>{Z(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Z(!1),v(M,ht.map(Le=>Le.id),re,!1,et[M],ys(fe,M),h,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Z(!1),I(),g()}};default:return{confirmAction:()=>{Z(!1)},confirmationDescription:Nn.empty}}},_e=()=>{L==="expenseAutomationFluxPage"||L==="expenseAutomationJESchedulePage"||L==="expenseAutomationTransactionsPage"?Z(!0):g()},{primaryBtn:wt,cancelBtn:fn,leftSideComponent:Qe}=Ke(),{confirmAction:yn}=ye(),wn=Le=>{if(b==="transaction_categorization"&&(Le==="autoCategorized"||Le==="review")){const Ge=Le;return{hideCountInTab:et[Ge]>Rn.common.numbers.maximumCount,count:et[Ge],isFetching:tt[Ge].fetchState==="In-Progress"}}if(b==="reconciliation"){const{reconciliation:Ge}=i,{selectedAccountId:Ct}=Ge;return Ct==null?{count:0,isFetching:!1}:Le==="review"?{count:Ge.accountReconciliationsByAccountID[Ct]?.accountReconEntity?.transactionsToReview.length,isFetching:Ge.accountReconciliationsByAccountID[Ct]?.transactionFetchState.fetchState==="In-Progress"}:{count:Ge.accountReconciliationsByAccountID[Ct]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Ge.accountReconciliationsByAccountID[Ct]?.transactionFetchState.fetchState==="In-Progress"}}if(b==="missing_receipts"){if(Le==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Le==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:N==="unmatched"&&jl({bulkUploadSelector:e.bulkUploadSelector})};if(Le==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},bt=b==="reconciliation"&&O.selectedAccountId!=null&&O.selectedReconAccount!=null,{month:Yt,year:Zt}=re,Xt=cd().set("month",Yt-1).set("year",Zt),ti=Xt.startOf("month").format(Ja),Dn=Xt.endOf("month").format(Ja),_i=`${ti} ${Nn.hyphen} ${Dn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,Mn=b==="missing_receipts"&&N==="missing"&&k,ni=e.bulkUploadSelector?.phase,Vi=e.bulkUploadSelector?.progress.total!=null&&e.bulkUploadSelector.progress.total>0?e.bulkUploadSelector.progress.total:j.uploadFileCount,Ni=N==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,ii={bulkUploadPhase:ni,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Vi,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Ni?"":Qa.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&ni!=="matching",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},oi=b==="missing_receipts"&&N==="completed"&&k&&e.bulkUploadSelector!=null,We={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},bn=Mn===!0&&!(en&&tn)?t.jsx(Pa,{...We,children:t.jsx(Wa,{...ii})}):oi===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(Ha,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Le=>{e.onSetBulkUploadCompletedSubTab?.(Le)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null;return t.jsxs($2,{children:[W?t.jsx(Pl,{containerStyle:{width:356},titleComponent:t.jsx(U2,{children:L2}),primaryButtonText:E2,secondaryButtonText:R2,proceedButtonVariant:"danger",action:{onOkClick:()=>{yn()},onCancelClick:()=>Z(!1)},descriptionComponent:t.jsx(W2,{children:Rn.confirmationDescription})}):null,t.jsx(Fl,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(M2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(iu,{hideEmptyDivBelowTabs:b==="missing_receipts",onBack:x,navBarCustomElement:b==="reconciliation"&&O.selectedAccountId!=null?t.jsx(O2,{reconciliation:O}):void 0,onReconTabUpdate:c,currentRecontab:O.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:N,onMissingReceiptsTabUpdate:Y,reconcileDetailPageFetchState:O.selectedAccountId!=null?O.accountReconciliationsByAccountID[O.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:bt?O.selectedAccountId:void 0,currentSelectedView:b,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:He(b,et.autoCategorized,bt?O.selectedAccountId:void 0,bt?O.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,bt?_i:void 0,b==="missing_receipts"?{includeBulkUploadTabs:k,navTitle:k?Ol.receipts:void 0}:void 0),searchText:Fe,currentTab:M,getTabCountAndFetchState:wn,completionStatus:pt,forceShowSubtitle:ge===!0||b==="je_schedules"&&(R.fetchState==="In-Progress"||R.accountSettingsView.fetchState==="In-Progress"),refreshStatus:nt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Nn.empty,isZeniUser:ee,onAllThreadsClick:()=>{_!=null&&ne(null),K(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:b==="missing_receipts"?()=>{switch(N){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0);break}}:p,onClose:_e,belowTabsSlot:bn}),listContent:t.jsxs(I2,{children:[b==="missing_receipts"?t.jsx(yy,{missingReceiptsTab:N,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:Mn===!0&&en&&tn?t.jsx(Pa,{...We,children:t.jsx(Wa,{...ii})}):null,missingReceiptsCompletedChromeInPageBody:oi===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(Ha,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Le=>{e.onSetBulkUploadCompletedSubTab?.(Le)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:j,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:re,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:Ie,pendingMatchAttachmentId:G?.attachmentId??null,pendingMatchTransactionId:G?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:Y,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:ie,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}}):t.jsx(fl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:ie,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(Ye,{controller:b!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(tr,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:F2(L),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:fn,separatorStyle:{marginRight:n.sp4}})})]})})]})},O2=({reconciliation:e})=>{const i=Tt(),{clearedBalance:l,variance:r,variancePercentage:h,deposits:d,payments:a}=e.reconciliationTabsState.balances,{balance:c}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:u}=e,{transactionFetchState:m}=u??{};return t.jsx(H2,{children:t.jsxs(q2,{children:[t.jsxs(ko,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(jo,{children:t.jsx(K2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(To,{children:it("0,0.00",c)}),t.jsx(Io,{children:Rn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(ko,{children:[t.jsx(jo,{children:t.jsx(Q2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(To,{children:it("0,0.00",l)}),t.jsxs(Y2,{children:[t.jsx(Io,{children:Rn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(Z2,{children:[t.jsxs(Ga,{children:[t.jsxs(Ya,{children:[a.count," ",An.payments]}),t.jsx(Za,{children:it("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ga,{children:[t.jsxs(Ya,{children:[d.count," ",An.deposits]}),t.jsx(Za,{children:it("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(G2,{})})]})]})})]}),t.jsxs(ko,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(jo,{children:t.jsx(J2,{})}),t.jsx($o,{children:m?.fetchState==="In-Progress"?t.jsxs(Lo,{children:[t.jsx($n,{height:25,width:120}),t.jsx($n,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(To,{children:[t.jsx("span",{style:{color:r.amount===0?i.colors.brandColorJadeDark:i.colors.primary},children:it("0,0.00",r)}),h!=null&&r.amount!==0?t.jsx("span",{style:{color:i.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(Io,{children:Rn.accountRecon.reconciliation.headers.variance})]})})]})]})})},So=(e,i,l,r,h)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(B2,{currentView:h,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(_2,{multiDigit:e>=5,children:e}),t.jsx(V2,{children:a}),e===i?t.jsx(N2,{children:`(${T2})`}):null]}):null},z2=e=>{const i=D2[e];return`${A2}${Nn.space}${i}${Nn.space}${Ol.insights}`};function P2(e,i){const l=e.findIndex(c=>c.step===i);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,h=(l-1+e.length)%e.length,d=e[r],a=e[h];return{nextStep:d,previousStep:a}}const F2=e=>`${e}_form`,B2=o.div`
2882
2882
  display: flex;
2883
2883
  justify-content: flex-start;
2884
2884
  align-items: center;
2885
2885
  gap: ${n.sp2};
2886
2886
  margin-left: ${e=>e.currentView==="flux_analysis"?"36px":n.sp8};
2887
- `,_2=o(Ye)`
2887
+ `,_2=o(Ze)`
2888
2888
  height: 18px;
2889
2889
  width: ${e=>e.multiDigit?"auto":"18px"};
2890
2890
  padding: ${n.sp0} 6px;
@@ -2895,7 +2895,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2895
2895
  align-items: center;
2896
2896
  `,V2=o(Re)`
2897
2897
  color: ${e=>e.theme.colors.primary};
2898
- `,N2=o(ot)`
2898
+ `,N2=o(st)`
2899
2899
  color: ${he.important};
2900
2900
  `,U2=o(zl)`
2901
2901
  margin-top: ${n.sp5};
@@ -2903,11 +2903,11 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2903
2903
  padding-right: ${n.sp8};
2904
2904
  color: ${e=>e.theme.colors.primary};
2905
2905
  word-break: break-word;
2906
- `,H2=o(_l)`
2906
+ `,W2=o(Bl)`
2907
2907
  color: ${e=>e.theme.colors.primary};
2908
2908
  margin-top: ${n.sp2};
2909
2909
  margin-bottom: ${n.sp2};
2910
- `,W2=o.div`
2910
+ `,H2=o.div`
2911
2911
  display: flex;
2912
2912
  justify-content: center;
2913
2913
  align-items: center;
@@ -2918,12 +2918,12 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2918
2918
  justify-content: center;
2919
2919
  align-items: center;
2920
2920
  gap: ${n.sp1};
2921
- `,jo=o.div`
2921
+ `,ko=o.div`
2922
2922
  display: flex;
2923
2923
  justify-content: center;
2924
2924
  align-items: center;
2925
2925
  gap: ${n.sp3};
2926
- `,$o=o.div`
2926
+ `,jo=o.div`
2927
2927
  width: ${n.sp7};
2928
2928
  height: ${n.sp7};
2929
2929
  border-radius: 50%;
@@ -2931,19 +2931,19 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2931
2931
  justify-content: center;
2932
2932
  align-items: center;
2933
2933
  background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
2934
- `,Io=o.div`
2934
+ `,$o=o.div`
2935
2935
  display: flex;
2936
2936
  flex-direction: column;
2937
- `,To=o(ot)`
2937
+ `,Io=o(st)`
2938
2938
  color: ${e=>e.theme.colors.hero};
2939
- `,Lo=o(Qn)`
2939
+ `,To=o(Kn)`
2940
2940
  min-width: 180px;
2941
2941
  color: ${e=>e.theme.colors.primary};
2942
- `,J2=o(Gl)`
2942
+ `,K2=o(Ql)`
2943
2943
  color: ${e=>e.theme.colors.primary};
2944
2944
  width: ${n.sp4};
2945
2945
  height: ${n.sp4};
2946
- `,K2=o(Yl)`
2946
+ `,J2=o(Gl)`
2947
2947
  color: ${e=>e.theme.colors.primary};
2948
2948
  width: ${n.sp4};
2949
2949
  height: ${n.sp4};
@@ -2951,7 +2951,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2951
2951
  color: ${e=>e.theme.colors.primary};
2952
2952
  width: ${n.sp4};
2953
2953
  height: ${n.sp4};
2954
- `,G2=o(sr)`
2954
+ `,G2=o(or)`
2955
2955
  width: ${n.sp3};
2956
2956
  height: ${n.sp3};
2957
2957
  color: ${e=>e.theme.colors.hero};
@@ -2966,18 +2966,18 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2966
2966
  background-color: ${he.overlayDark};
2967
2967
  padding: 2px ${n.sp2};
2968
2968
  border-radius: ${n.sp1};
2969
- `,Ya=o.div`
2969
+ `,Ga=o.div`
2970
2970
  display: flex;
2971
2971
  justify-content: space-between;
2972
2972
  gap: ${n.sp2};
2973
- `,Za=o.div`
2973
+ `,Ya=o.div`
2974
2974
  text-transform: capitalize;
2975
- `,Xa=o(ot)`
2975
+ `,Za=o(st)`
2976
2976
  color: ${he.primaryDark};
2977
2977
  align-self: "flex-end";
2978
- `,In=o(it)`
2978
+ `,$n=o(ot)`
2979
2979
  border-radius: ${n.sp2};
2980
- `,Ao=o.div`
2980
+ `,Lo=o.div`
2981
2981
  display: flex;
2982
2982
  flex-direction: column;
2983
2983
  min-width: 180px;
@@ -2995,7 +2995,7 @@ import{o as n,bZ as zl,K as Ce,go as er,gp as tr,V as t,ct as Fl,bD as Bl,ab as
2995
2995
  &:hover {
2996
2996
  background: ${({theme:e})=>e.colors.grey4};
2997
2997
  }
2998
- `,ew=o(pl)`
2998
+ `,ew=o(hl)`
2999
2999
  width: ${n.sp4};
3000
3000
  height: ${n.sp4};
3001
- `;export{U2 as ConfirmationPopUpTitle,bw as default,z2 as getNextAndPreviousSteps,F2 as uniqueFormName};
3001
+ `;export{U2 as ConfirmationPopUpTitle,bw as default,P2 as getNextAndPreviousSteps,F2 as uniqueFormName};