@zeniai/web-cockpit-ui 1.15.22-qa → 1.15.23-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 (304) hide show
  1. package/dist/assets/{ACHDetailsPage-CZfTXGMr-Lnh65l9r.js → ACHDetailsPage-BOZmOJHO-DA9D4iJH.js} +2 -2
  2. package/dist/assets/{AIPerformancePage-CpfWdGaC-uJXPs-cJ.js → AIPerformancePage-ZVCJizP9-D55hw0l8.js} +16 -16
  3. package/dist/assets/AccountInfoPage-DF6IU0EG-CK0AD-ot.js +18 -0
  4. package/dist/assets/{AccountInfoPageContent-CYZIBmtA-Cc8jicZs.js → AccountInfoPageContent-D0wuuzMd-YMtVFfpn.js} +18 -18
  5. package/dist/assets/{AccountLockedInfoModal-BFBjEOzC-CW9VKIHW.js → AccountLockedInfoModal-Cfx-lPAZ-B55UQ1W3.js} +6 -6
  6. package/dist/assets/{AccountReconDetailsDrawerPage-DSFCBgAM-DRW_32Fg.js → AccountReconDetailsDrawerPage-DbHX6rPG-BwmWp-T3.js} +15 -15
  7. package/dist/assets/{AccountRow-Gn7g3D_F-BBQfly-U.js → AccountRow-Bk_25FCy-D03inSab.js} +21 -21
  8. package/dist/assets/{AccountsPromoCardStack-DOMli4-L-CRu-629U.js → AccountsPromoCardStack-DAXRwY1f-DegwS44K.js} +28 -28
  9. package/dist/assets/AddAddressForCardDrawer-DNGQGGYg-AmBvQD8m.js +6 -0
  10. package/dist/assets/{AddToWalletPage-D-Z-ZVZn-DWs7ZCUy.js → AddToWalletPage-CzziHgi7-j3gMOtad.js} +22 -22
  11. package/dist/assets/{AgingReportsPage-CdqPmA60-xeaigsqC.js → AgingReportsPage-Bdi3krKK-Bf-4bvXh.js} +5 -5
  12. package/dist/assets/{AllUserItems-DWLkEF2p-Cu4TKU61.js → AllUserItems-XWDuiug6-DkHHRN56.js} +10 -10
  13. package/dist/assets/{ApAgingDetailPage-CdtqprUm-UvzFtkee.js → ApAgingDetailPage-CaM_AzrU-DCtFqylK.js} +7 -7
  14. package/dist/assets/AppBasePage-B7_L4R6d-DSvQT3A9.js +71 -0
  15. package/dist/assets/{AppDrawerContent-DCMK2lRO-h01OkeSR.js → AppDrawerContent-DSX1364T-CNP-B7uf.js} +7 -7
  16. package/dist/assets/ApprovalRulesSettingsPage-DrjPOeyp-BrhLSwXJ.js +47 -0
  17. package/dist/assets/{ArAgingChart-DOYvVptv-DR9dm5ZT.js → ArAgingChart-M7KUNA4G-DKIpaPUv.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-BCaRO749-DXQQQ2B5.js → ArAgingDetailPage-7lby5mXn-BtLBFlEX.js} +6 -6
  19. package/dist/assets/{AttachmentView-CnfHYBMC-GPUL-heq.js → AttachmentView-Bsa0u92o-BEQFOxXv.js} +7 -7
  20. package/dist/assets/{BankAccountSection-P9w-MOrg-CGYV7ljA.js → BankAccountSection-BkOlwayA-DP864Lrq.js} +6 -6
  21. package/dist/assets/{BankAccountWarningSection-BDEZ6LKQ-6TRhx7Zc.js → BankAccountWarningSection-uMOXLH0B-ZXC_xQuj.js} +9 -9
  22. package/dist/assets/{BankConnectionsSettingsPage-dE7WxsGo-DOI-arB-.js → BankConnectionsSettingsPage-C_YytTke-B8k-pddW.js} +21 -21
  23. package/dist/assets/{BillDetailPage-CAbohg1r-BBfYosTz.js → BillDetailPage-DvU5_Rsp-C9dpUiI6.js} +12 -12
  24. package/dist/assets/BillPayApprovalRuleDetailPage-UeVxIxfF-CFPoQw5A.js +27 -0
  25. package/dist/assets/{BillPayApprovalRulesPage-wy4fIDHo-0_ycq9ss.js → BillPayApprovalRulesPage-CA9eufjt-BNyCnVeE.js} +14 -14
  26. package/dist/assets/{BillPayPromoPage-CbXq0YNV-NkwCl8Xq.js → BillPayPromoPage-DsXPWKAf-BqLcGJ_H.js} +10 -10
  27. package/dist/assets/{BillPaySetUpPage-CwP6Aw2I-eUmg7lOc.js → BillPaySetUpPage-CeMhzZ_3-BI9-weFw.js} +7 -7
  28. package/dist/assets/BillingSettingsPage-BygJjDSp-C0Ia6obD.js +44 -0
  29. package/dist/assets/{BillsBulkReviewDrawerPage-QsGKIhW0-DYTD3gNy.js → BillsBulkReviewDrawerPage-WrR46NRa-CKI5pK1F.js} +1 -1
  30. package/dist/assets/{BoxItem-CgrlwejJ-SY_ufI2M.js → BoxItem-C0M4PSXY-D0kSlmNN.js} +1 -1
  31. package/dist/assets/BusinessVerificationPage-C63pUk4d-C1yyAjbf.js +138 -0
  32. package/dist/assets/{CardNumberSubText-DPlqciQh-IidQQCet.js → CardNumberSubText-B4dAoYDE-B1SbTgmV.js} +2 -2
  33. package/dist/assets/{CashbackDetailPage-DvxlixOz-BLcSoq8t.js → CashbackDetailPage-B6xvn-y3-CO89J05d.js} +16 -16
  34. package/dist/assets/{ChargeCardDetailPage-BwsPpOzj-BfT6wPmj.js → ChargeCardDetailPage-eJJ4MEE6-BXMqrqi9.js} +25 -25
  35. package/dist/assets/{ChargeCardListPage-BKu9-MWp-D4Kr8c-a.js → ChargeCardListPage-BYI2HIjA-B0giUbEV.js} +19 -19
  36. package/dist/assets/{ChargeCardListTable-BkAggUNy-DdMJhtGO.js → ChargeCardListTable-DAVYmKCK-DEY8KXB2.js} +44 -44
  37. package/dist/assets/{ChargeCardPaymentHistoryPage-BddAvqUm-D_kTbujS.js → ChargeCardPaymentHistoryPage-BX5HtOxd-BV2ugIHB.js} +47 -47
  38. package/dist/assets/ChargeCardPromoPage-DuQe7BpX-B1bYsTBb.js +222 -0
  39. package/dist/assets/{ChargeCardSetupPage-B3vasCMt-i66Fofvm.js → ChargeCardSetupPage-DG1eKhYR-BVTvcCk1.js} +6 -6
  40. package/dist/assets/{ChargeCardStatementsPage-BOscGNXN-BaohNBwD.js → ChargeCardStatementsPage-CvtZtuVC-BbTDMJQ9.js} +9 -9
  41. package/dist/assets/{CheckDepositDrawerPage-BEEyhU4L-BWlcFHrW.js → CheckDepositDrawerPage-BdacGDpy-CN6aGowb.js} +15 -15
  42. package/dist/assets/{CollapsableReportTable-BpZbn8JV-BJBRRzKX.js → CollapsableReportTable-UADp1m_8-C887iUXZ.js} +81 -81
  43. package/dist/assets/CompanyOfficerDetailsSection-CaAR0Wvk-CmXyx64P.js +331 -0
  44. package/dist/assets/{CompanyPassportCard-DnpS3cSu-DrHqCrTH.js → CompanyPassportCard-BJN2GEVm-LlIc7P9q.js} +5 -5
  45. package/dist/assets/CompanyPassportPage-D2ALJDF_-B0BzydTg.js +417 -0
  46. package/dist/assets/{CompleteProfile-E7yJ6AqT-Jh4pB2E8.js → CompleteProfile-C8X8Z3C2-Bzf6-WNu.js} +4 -4
  47. package/dist/assets/ConfettiBurst-DxHzdDPp-BHPKFQrr.js +1 -0
  48. package/dist/assets/{ConstrainedInnerElement-BeIpAPjB-BrcJvid9.js → ConstrainedInnerElement-BeIpAPjB-D4MBpZa1.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-CqGWKAVs-7gjtNzWv.js → CreateOrEditVendorPage-y-COpdhs-CywEWB6a.js} +15 -15
  50. package/dist/assets/{CreditCardPaymentDrawerPage-CO7njZlm-C-d7vRgi.js → CreditCardPaymentDrawerPage-CntYJJ8v-CZ68p-k6.js} +16 -16
  51. package/dist/assets/{CurrencySelectField-DxdAWtY0-CBQRJAjO.js → CurrencySelectField-Dn-hE2az-n1RHeHxE.js} +3 -3
  52. package/dist/assets/{CustomerOnboardingActivationPage-CEaKVaVS-DcV5VN2r.js → CustomerOnboardingActivationPage-B9MZHJVc-BxzBFrW0.js} +5 -5
  53. package/dist/assets/CustomerOnboardingContainerPage-eR0yY2uX-CZ-wHAQI.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-Bk-UD_xZ-DMv5b6Tt.js → CustomerOnboardingDetailPageSkeleton-BCe8BvQF-DaEKstx7.js} +13 -13
  55. package/dist/assets/CustomerOnboardingNoStepsPage-BHk7rDAg-B5ZKgZir.js +66 -0
  56. package/dist/assets/{CustomerOnboardingPage-D2g6ose5-Be4Xr3ip.js → CustomerOnboardingPage-1LvpVpHC-Cr4NP9fC.js} +8 -8
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-BowJfyTX-BfHzAcC6.js → CustomerOnboardingProductSuitePage-DMYHMJXg-DeyKCfXK.js} +8 -8
  58. package/dist/assets/{Dashboard-46VwWQSI-DkmTwrc_.js → Dashboard-CCV0_aCP-BoBmH13Z.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-BA6k3bPl-Ckr1Cj4h.js → DashboardReportPage-CmoH9Vrc-CzA5O7KO.js} +13 -13
  60. package/dist/assets/{DashboardSidebarBackgroundAnimation-Dh7RFAmH-Bd8SKLYF.js → DashboardSidebarBackgroundAnimation-hw3einS7-DUVXWx2a.js} +1 -1
  61. package/dist/assets/{DepositAccTransactionItem-Dql1IjYZ-CuunBLNt.js → DepositAccTransactionItem-DgdkYGjP-BkMVZWVv.js} +5 -5
  62. package/dist/assets/{DepositAccTransactionListPage-BjKtMY47-QOEpFUZh.js → DepositAccTransactionListPage-CF0WJn9M-DlPgp9dm.js} +5 -5
  63. package/dist/assets/{DomesticWireDetailsPage-DeXdHoem-D64dC2Fm.js → DomesticWireDetailsPage-B12tNa6e-DRCqor_l.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-C9lm7jRS-CeHdqCLM.js → DownloadOverlay-Dt9yt4Fz-OGiiWSIN.js} +1 -1
  65. package/dist/assets/{DrawerPage-DwjcM3hz-DN4jvr6d.js → DrawerPage-Clki97FA-CqA84wbo.js} +13 -13
  66. package/dist/assets/EditPeoplePage-CKS_aEZm-B7Tw7FjE.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage-BerHadSD-BZkriWLo.js → EditReimbursementDetailPage-CXy2ZWfZ-BrOpTSUf.js} +41 -41
  68. package/dist/assets/EntityDetailPage-B3TQ5hCP-IVMsCeoo.js +18 -0
  69. package/dist/assets/{EntitySummarySection-BvXgw7DC-CQCJSWNO.js → EntitySummarySection-D_YLsP_P-CSh4l-FA.js} +8 -8
  70. package/dist/assets/{ExpenseAutomationOverviewPage-ySXotmyY-CJVvqVP_.js → ExpenseAutomationOverviewPage-4z3yzHEA-ChRwE60S.js} +10 -10
  71. package/dist/assets/{ExpenseAutomationPage-CieCVy8t-QWzCgCzs.js → ExpenseAutomationPage-BJ4H_c2z-FgmOcOvc.js} +146 -146
  72. package/dist/assets/{ExpressPayPage-BnUc-3ye-C1dh3GPA.js → ExpressPayPage-CTBD4y1v-NYjAlIxO.js} +15 -15
  73. package/dist/assets/{FeaturePreviewPage-rGKH26mO-DT9io36R.js → FeaturePreviewPage-CYuTQWpP-Bl8VAq6v.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-Cul0Cxvm-Cn0WFUN2.js → FollowStepsSection-BrpI2HyW-DNSECr6B.js} +9 -9
  75. package/dist/assets/{GlobalReviewListPage-CC2ACTah-DpbOnqO_.js → GlobalReviewListPage-BcvxLqIL-CD9rfA0-.js} +12 -12
  76. package/dist/assets/{InformationCardStack-geyzh82K-DogR-UgS.js → InformationCardStack-CU4Moqky-Bc_PhxNK.js} +4 -4
  77. package/dist/assets/{InsightsCardStack-DmEWXOXG-w9gyiHl5.js → InsightsCardStack-D8UQiuXZ-DRkswx9n.js} +8 -8
  78. package/dist/assets/InsightsSection-C3X6ZNEt-CSaE3QjL.js +27 -0
  79. package/dist/assets/{IntegrationsSettingsPage-D8DA20vr-kp4AqUjm.js → IntegrationsSettingsPage-CsLv00HW-c8_zALL5.js} +7 -7
  80. package/dist/assets/{InternationalWireSwiftDetailsPage-C0p3_QQy-B1pmkx4O.js → InternationalWireSwiftDetailsPage-DgrN5Xg7-ik2bKR2J.js} +21 -21
  81. package/dist/assets/InternationalWireVerificationPage-CvysJNBQ-Q67xp-Zv.js +65 -0
  82. package/dist/assets/{InviteFormPage-CH4FYGl4-C_KdwWPO.js → InviteFormPage-B3KmRWXd-DZboWDF0.js} +23 -23
  83. package/dist/assets/{InvitePageListView-C-RG9OiM-CB7Rd6Dr.js → InvitePageListView-DfpJBZru-8z8nAtFG.js} +66 -66
  84. package/dist/assets/InvitePeoplePage-C5Qgk24s-U6BHBwDh.js +12 -0
  85. package/dist/assets/{InvoiceUploadSection-YQHXVR_6-CHAjSpjl.js → InvoiceUploadSection-BO1i-e_D-S9qpWOlw.js} +21 -21
  86. package/dist/assets/{IssueChargeCardPage-CKhRoUiP-D72FC7LA.js → IssueChargeCardPage-mPsxt52d-PfQTvSAJ.js} +20 -20
  87. package/dist/assets/{LabeledAddressValue-D_-0VDjZ-CEjisdoE.js → LabeledAddressValue-C4fnQSyi-BYyUYLsR.js} +2 -2
  88. package/dist/assets/{LabeledAddressValueField-BNPvRvHU-DSWtQeav.js → LabeledAddressValueField-D6dEaI69-DANZLTzI.js} +4 -4
  89. package/dist/assets/LabeledControlledCheckBoxField-B1QdZmvd-DW7Mu6XT.js +16 -0
  90. package/dist/assets/LabeledCountryMultiSelectField-XeBih_-f-O6Y-iu_1.js +237 -0
  91. package/dist/assets/{LabeledCreatableSingleSelectField-C1dHZ9ym-BSUe-QeQ.js → LabeledCreatableSingleSelectField-BPX2Nrlf-VQgMHUfl.js} +21 -17
  92. package/dist/assets/LabeledDocumentField-Bjg8sNsg-C-PR2ZST.js +41 -0
  93. package/dist/assets/{LabeledDropDownFormattedTextField-QdvkGLEh-btByp1Dy.js → LabeledDropDownFormattedTextField-A-rgip1E-DXyiM_iz.js} +6 -6
  94. package/dist/assets/LabeledMultiSelectField-Di9Wnifv-CqQm8lOX.js +223 -0
  95. package/dist/assets/{LabeledText-CQiPSE0v-DtyhIBYN.js → LabeledText-38fqkkE--BV0pTSSz.js} +6 -6
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CcmaUIGJ-BtTLvsY7.js → LabeledUserSingleSelectWithSubtitlesField-BbF25dUP-Bm5BEKWh.js} +17 -17
  97. package/dist/assets/{LabeledZeniRolesDropDownField-k0YihYN--BEaphyAB.js → LabeledZeniRolesDropDownField-Dg9_Ww-A-6LCZnv3_.js} +24 -24
  98. package/dist/assets/{LinkJETransactionPage-DUaT91O5-CYUXtAbL.js → LinkJETransactionPage-66mQ4nrK-Blq1QPxg.js} +16 -16
  99. package/dist/assets/{LockCardPage-DYD2_HzF-0LLriE_o.js → LockCardPage-BCqN4K17-BFhQlELS.js} +26 -26
  100. package/dist/assets/{LowBalancePopup-DiycrXpa-CTxg_4OL.js → LowBalancePopup-BPk1-eAb-DPKxi1xa.js} +5 -5
  101. package/dist/assets/MagicLinkACHDetailsPage-DM7EUUU7-6n4CruRX.js +1 -0
  102. package/dist/assets/MagicLinkDomesticWireDetailsPage-DKrGgFTu-DYmL1ff3.js +1 -0
  103. package/dist/assets/{MagicLinkInternationalWireDetailsPage-eZNTvlJK-uMbPktxq.js → MagicLinkInternationalWireDetailsPage-B3OpSWB3-BbCH3bCn.js} +1 -1
  104. package/dist/assets/MagicLinkSuccessPage-CphaJa4k-C1L3trsn.js +31 -0
  105. package/dist/assets/{MagicLinkTitleSection-D6bdQGfS-RYgbBPda.js → MagicLinkTitleSection-77rxhjLm-DuK-hJU3.js} +10 -10
  106. package/dist/assets/{MailingDetailsSection-Db8X4a09-Ca6nJ4bp.js → MailingDetailsSection-BJfZvT0b-Cqv93bBS.js} +6 -6
  107. package/dist/assets/{MyBankConnectionsSettingsPage-C9rAs8AC-CPgToLwh.js → MyBankConnectionsSettingsPage-z0tHaSl1-D8NpXmDe.js} +13 -13
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-Dhz5e_Uu-CbKEq9X-.js → MyPendingActivationChargeCardListPage-CwGYwufd-BhPm_tq1.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-CxZER675-DWy9A37H.js → MyProfileSettingsPage-8yBXAre6-Bs5xqc-e.js} +8 -8
  110. package/dist/assets/{NavBarWithPicker-BSVBMx7T-7ctXnXTR.js → NavBarWithPicker-C3LVyiC9-QHhc6aBd.js} +5 -5
  111. package/dist/assets/{NavigationArrow-Ca-B5zfh-DOkEZ23Y.js → NavigationArrow-NuJEpE7O-BsQF0lUP.js} +1 -1
  112. package/dist/assets/{NavigationDots-CjxNj1Qo-DUSolsbK.js → NavigationDots-C7Na64B9-CHGprwD5.js} +3 -3
  113. package/dist/assets/{NewGlobalMerchantPage-LykCdab5-BSlnLQR0.js → NewGlobalMerchantPage-Cus6zYV_-DyfxnG1c.js} +41 -41
  114. package/dist/assets/NoDataChart-B3s_7m2n-DuPBFXV2.js +26 -0
  115. package/dist/assets/NoDataTable-CMpypnTw-C6S_V6d0.js +8 -0
  116. package/dist/assets/{NotFoundPage-C4BU4sH8-DZzAQ8sH.js → NotFoundPage-RjXioqc8-DMQ0F7IL.js} +9 -9
  117. package/dist/assets/{NotificationSettingsPage-BcZEeTzA-CPfHSoWp.js → NotificationSettingsPage-DrDW_LU_-mWZ117zO.js} +21 -21
  118. package/dist/assets/{NotificationsListConfig-CYqB9pO5-DEDNzQZY.js → NotificationsListConfig-C6_ap0JT-D0MspRwp.js} +1 -1
  119. package/dist/assets/{NotificationsPage-BpE7xDxK-D8yClJTG.js → NotificationsPage-DOM-Gf5P-BRdHJwOp.js} +15 -15
  120. package/dist/assets/{OpExByVendorPage-CzAB4zqP-CULV3aDc.js → OpExByVendorPage-CTuBB827-Bbt1veu8.js} +20 -20
  121. package/dist/assets/OverlayContainerPage-D4QU0p4o-Bbmz6FH4.js +11 -0
  122. package/dist/assets/{PandLWithForecastPage-CDkHjqzy-DUlj3c64.js → PandLWithForecastPage-BXaENYdR-DDSkVfM3.js} +11 -11
  123. package/dist/assets/PaymentAccountSetupBillingAddressSection-DSnQX90O-Dx1jHuZ7.js +107 -0
  124. package/dist/assets/{PeoplePage-C_FZL-mx-C-bfDUUk.js → PeoplePage-BlyVVthI-fFVSXzpH.js} +36 -36
  125. package/dist/assets/{Preview-D3Bnt1d1.js → Preview-DuIVCswF.js} +1 -1
  126. package/dist/assets/{ProductsCarousel-lJBWrgjU-DonlKGOT.js → ProductsCarousel-CAcPH--E-BIuBBeKB.js} +6 -6
  127. package/dist/assets/{PromoBaseCards-BHeLFDFF-D9FOKv3v.js → PromoBaseCards-BVwZMVeE-DstwmvWv.js} +2 -2
  128. package/dist/assets/{QBOConnectionDialog-BfBk1GDG-BMfCjZzO.js → QBOConnectionDialog-C3OYyhYO-5hTjd5-l.js} +5 -5
  129. package/dist/assets/{QBOSetupSection-BO8FYRd_-Qn6LUGzs.js → QBOSetupSection-DQjol-D0-05cxakPz.js} +11 -11
  130. package/dist/assets/ReimbursementApprovalRuleDetailPage-llw4ONPo-DjqdHx3S.js +32 -0
  131. package/dist/assets/{ReimbursementApprovalRulesPage-2-dvUngC-DoA4Aa6y.js → ReimbursementApprovalRulesPage-Cx0gs7sS-B-krQa99.js} +9 -9
  132. package/dist/assets/{ReimbursementDetailPage-CCBrKxup-eMdyzTTS.js → ReimbursementDetailPage-Cs_rmkS8-DW1o_189.js} +13 -13
  133. package/dist/assets/{ReimbursementPromoPage-C1DzNWh1-IOjKQSRs.js → ReimbursementPromoPage-CCFl0kQK-B9O9Pssf.js} +8 -8
  134. package/dist/assets/{ReimbursementSetUpPage-Bs1pChM5-DSiQEn3A.js → ReimbursementSetUpPage-lf3xTVFh-COXeJ33g.js} +12 -12
  135. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BY1ivHX0-YGjjSYE0.js → ReimbursementsBulkReviewDrawerPage-C5MTFJLG-CJIWqV-7.js} +1 -1
  136. package/dist/assets/{ReloadCard-Ci1JfueA-DAWS8WWx.js → ReloadCard-V_tv6YLR-pIKKLA9H.js} +6 -6
  137. package/dist/assets/{ReportTableViewSelector-FSUjS0tA-BxIJxG6X.js → ReportTableViewSelector-CWEvGn8L-CcECbGsj.js} +6 -6
  138. package/dist/assets/{ReportsPage-2XGgGATP-w9xnPMQA.js → ReportsPage-BJOH1wgv-CXqYsJPZ.js} +6 -6
  139. package/dist/assets/{RevenueChart-DhiHl3J4-BhIufAgU.js → RevenueChart-C_tSBw_N-Cwj-E2UP.js} +19 -19
  140. package/dist/assets/{ReviewDetailsPage-JfBmJL7T-BkX_u_VB.js → ReviewDetailsPage-CScPf4w3-Cz00WVXv.js} +25 -25
  141. package/dist/assets/{ReviewOverlay-B8Quli7Z-BlSCP7tq.js → ReviewOverlay-BQVwPzKa-BxRw_iSk.js} +31 -31
  142. package/dist/assets/{RoleWithToolTip-DL78JlR8-CjxKYGM4.js → RoleWithToolTip-GCV_l8Ly-GZKD9YbI.js} +2 -2
  143. package/dist/assets/{ScheduleDetailsFixedAssetsPage-B-mkt12S-BfkvZ3VG.js → ScheduleDetailsFixedAssetsPage-Cgqgn7nk-B00K9FnO.js} +13 -13
  144. package/dist/assets/{ScheduleDetailsPage-BUZcySac-MhIHJ681.js → ScheduleDetailsPage-D1EJbzxN-l7ivTR2t.js} +3 -3
  145. package/dist/assets/{ScheduleSequenceTable-CdKMmZqy-YJzhKMlw.js → ScheduleSequenceTable-DDhoyPGX-CcxwU9B1.js} +37 -37
  146. package/dist/assets/{ScreenRoutes-zyk3b_eT.js → ScreenRoutes-CbhRMGYb.js} +1 -1
  147. package/dist/assets/{SetUpAccountSection-D1MXUm9M-DRyEln1s.js → SetUpAccountSection-AVL_16HQ-CfJdXpM8.js} +9 -9
  148. package/dist/assets/{SignIn-CPWFfFe2-DWSC_Uuu.js → SignIn-BLUwTp1l-Diu2Dl0P.js} +12 -12
  149. package/dist/assets/SignInScreen-BAFcpgXM.js +1 -0
  150. package/dist/assets/{SpendManagementListViewPage--cVcOp1f-D8QFk4lP.js → SpendManagementListViewPage-DJbNFHvP-HVPQNsga.js} +15 -15
  151. package/dist/assets/{SpendManagementPerTabPage-DPxjzKS8-BPBxP33H.js → SpendManagementPerTabPage-J5pIRm-Q-zn5Z_C9i.js} +38 -38
  152. package/dist/assets/{SpendManagementSection-CA8SwNCI-CvoMroBv.js → SpendManagementSection-DZaP5ai6-BivazJAu.js} +17 -17
  153. package/dist/assets/{StatementItem-UzV0xHzG-DvTqvxWA.js → StatementItem-D2Fx65LN-DEt1HHDA.js} +6 -6
  154. package/dist/assets/{StatementsPage-CksjCH5w-DHQ77cv-.js → StatementsPage-BCh51lDW-DEzdN4yP.js} +1 -1
  155. package/dist/assets/{StatusSwitcher-BDDVmn-K-DeuB9OqT.js → StatusSwitcher-C5ZrzI8Y-RGx-Rq5m.js} +1 -1
  156. package/dist/assets/{SubTabSwitcher-CMsdXoCD-WAW9EP3o.js → SubTabSwitcher-BXZxKeq9-N3T4zPQn.js} +2 -2
  157. package/dist/assets/{SummaryCard-B4km1rL_-BMpuE5I6.js → SummaryCard-194UToy6-ZSyhRMcE.js} +1 -1
  158. package/dist/assets/{TaskManagementPage-CDi3YMVo-BCVU9Q83.js → TaskManagementPage-zcxDUo0t-CfkgE02v.js} +35 -35
  159. package/dist/assets/{TimeRangeSwitcher-D1boW3u5-CiXr6wR1.js → TimeRangeSwitcher-Bsv7zQmN-0uKzxEGk.js} +11 -11
  160. package/dist/assets/{TimeframeSwitcher-NWdUWC8r-BeE5s881.js → TimeframeSwitcher-DtxsNy1Z-Dpwd2ynA.js} +6 -6
  161. package/dist/assets/{TimeframeSwitcherWithToggle-BCRqmVAB-c94605Tu.js → TimeframeSwitcherWithToggle-B5bFhbvL-C0I_F7ow.js} +1 -1
  162. package/dist/assets/{TopExCard-B7nDaKGC-Bg814R6B.js → TopExCard-CBua66Cj-CBuXuQOS.js} +12 -12
  163. package/dist/assets/{TopExDetailPage-CFC5Kzob-ujXs8dCt.js → TopExDetailPage-DtMA-XMp-EMAyiYoo.js} +10 -10
  164. package/dist/assets/{TransactionActivityLogPage-dLfey-Pj-71cBX4RW.js → TransactionActivityLogPage-C3BPL8hi-rjH_p-06.js} +9 -9
  165. package/dist/assets/{TransactionDetailPage-DUFj8B1S-C57lmiLq.js → TransactionDetailPage-CeKaduBe-gc3Brzcv.js} +35 -35
  166. package/dist/assets/{TransactionList-BDaoHCk7-RJMTG3DX.js → TransactionList-CSx8ZCZ--BfPEmkgj.js} +12 -12
  167. package/dist/assets/{TransactionListBig-DxOGEDcA-Bpd7KyjM.js → TransactionListBig-B4cNQY2d-xUQ7gipo.js} +11 -11
  168. package/dist/assets/TransactionListPage-DHr64V-b-DDnZn40X.js +35 -0
  169. package/dist/assets/{TransactionVendorDetailPage-CliQXg5L-mqUw7M0R.js → TransactionVendorDetailPage-DsxI8U5b-BIfZV2Ct.js} +7 -7
  170. package/dist/assets/{TransferDrawerPage-kbzn1dkx-B-gXa4jg.js → TransferDrawerPage-C91TQwZi-B3ongtBQ.js} +34 -34
  171. package/dist/assets/{TreasuryOverviewPage-j8Dtk2Q8-CYEQwDNB.js → TreasuryOverviewPage-BoBn_gtF-1-z_98qx.js} +48 -48
  172. package/dist/assets/{TreasuryPromoPage-BlgxNE0U-C8L5Aqll.js → TreasuryPromoPage-CQ-VYEQC-DBZ3Ca-z.js} +17 -17
  173. package/dist/assets/{TreasuryStatementsPage-Bd70Y2Yv-CGUVJxwW.js → TreasuryStatementsPage-taTRE54D-s03VARjq.js} +1 -1
  174. package/dist/assets/{TreasuryTaxLetterPage-DL4GDdXJ-ReKQk0DV.js → TreasuryTaxLetterPage-Cxhr51TD-DSRIuJm4.js} +1 -1
  175. package/dist/assets/{TrendChart-BS6VOoj_-B4CrrKxh.js → TrendChart-DATgAEKG-BGhvWXdf.js} +4 -4
  176. package/dist/assets/{TrendWithTransactions-DMAMnr7F-BuabV9Xz.js → TrendWithTransactions-DqPFuOvC-Bu3TdK3s.js} +6 -6
  177. package/dist/assets/{UncategorizedAccountsMappingPage-stLOvAUg-B8dn25ti.js → UncategorizedAccountsMappingPage-BQjXazj4-BOpLaunW.js} +14 -14
  178. package/dist/assets/{UnitIntegrationPage-D39cXlRw-DGhe8Ell.js → UnitIntegrationPage-BiRGRtpI-DxaSFD1H.js} +6 -6
  179. package/dist/assets/{UploadAdditionalDocumentOverlay-BmiNa89K-BTN8zH3K.js → UploadAdditionalDocumentOverlay-DCldWCol-B3iVz4fI.js} +1 -1
  180. package/dist/assets/Vendor2FAPopup-BpkAiYTA-99TJd7nU.js +1 -0
  181. package/dist/assets/VendorACHDetailsPage-tUuZzJnN-BFUuaQ6q.js +1 -0
  182. package/dist/assets/{VendorDetailPage-Ck26EgtS-J34I2iWH.js → VendorDetailPage-DY4iaLtz-AjIptjjy.js} +30 -30
  183. package/dist/assets/VendorDomesticWireDetailsPage-B5Nym5J9-CpOxRXxZ.js +1 -0
  184. package/dist/assets/{VendorFiling1099EditablePage-PYVQaWMk-IQ6BXnnM.js → VendorFiling1099EditablePage-Dep7O8Uz-Do-rxCWR.js} +38 -38
  185. package/dist/assets/{VendorFirstReviewPage-hKEEnsZq-Dg2mNc4d.js → VendorFirstReviewPage-CJQIZn8g-DkET_08K.js} +36 -36
  186. package/dist/assets/{VendorInternationalWireDetailsPage-qv2qL6Xn-cR3M50rU.js → VendorInternationalWireDetailsPage-CJG5RIa2-DsTS-Uh9.js} +15 -15
  187. package/dist/assets/VendorInternationalWireSwiftDetailsPage-DZabfieM-a851bv0Y.js +1 -0
  188. package/dist/assets/{VendorsAccountsSection-BeiK6LWK-B3NLg17b.js → VendorsAccountsSection-D65ewlO6-DU6ZIrZA.js} +3 -3
  189. package/dist/assets/{VerifyDevice-BVtSQLC2-B413l5qj.js → VerifyDevice-B1_jgwgY-DAz-KAtd.js} +3 -3
  190. package/dist/assets/{VideoPlayer-DcPwSvda-CZGYvE6C.js → VideoPlayer-vWSXteQ6-D5qS5__p.js} +2 -2
  191. package/dist/assets/{VideoPopup-CSSLhfoi-CggaWf4Q.js → VideoPopup-CdsmU6H4-Du7UVtqu.js} +3 -3
  192. package/dist/assets/{WarningsDrawerPage-y9CUfPu5-BXiOCc9G.js → WarningsDrawerPage-CjgOsD00-Denf4Sio.js} +9 -9
  193. package/dist/assets/{ZeniAccountDetailPage-CeL_e1NL-uckQ70j3.js → ZeniAccountDetailPage-DiLnoonB-DZ1tpmUL.js} +30 -30
  194. package/dist/assets/{ZeniAccountListViewPage-C-rGqw9i-CZZ4qFYr.js → ZeniAccountListViewPage-YfPsO8ls-CfUQiafE.js} +11 -11
  195. package/dist/assets/{ZeniAccountNavBarPieces-CSy5vlQ--B5sUMcLP.js → ZeniAccountNavBarPieces-CHStBvRa-5ll2dkEQ.js} +3 -3
  196. package/dist/assets/{ZeniAccountPromoPage-ByNyhhoa-DoFBMtzK.js → ZeniAccountPromoPage-cEfW88p8-BvUDgJZp.js} +12 -12
  197. package/dist/assets/{ZeniAccountSetupPage-YbvbQFzj-DTMXRwPe.js → ZeniAccountSetupPage-B20DHYex-DsTq1nG1.js} +4 -4
  198. package/dist/assets/{ZeniCopyright-D5ywJMrC-BNrbqyo3.js → ZeniCopyright-BROHmszx-VivYqHvz.js} +1 -1
  199. package/dist/assets/{ZeniTransferAmountSlider-CKFCKGRC-Bm4EEGGu.js → ZeniTransferAmountSlider-DZZrrFXf-DAQs85Xb.js} +4 -4
  200. package/dist/assets/{add-to-wallet-DgdBD8_G-8P7CIdyf.js → add-to-wallet-DgdBD8_G-DBbMptVC.js} +1 -1
  201. package/dist/assets/{analytics-BgoqoHps.js → analytics-DH2FWXQR.js} +1 -1
  202. package/dist/assets/analyticsHelper-CeC4SQzK.js +1 -0
  203. package/dist/assets/{analyticsHelper-nJyKiOwQ-Bz7HQ3Wp.js → analyticsHelper-FJ-cS8qS-Bs47KEMI.js} +1 -1
  204. package/dist/assets/{arrow-south-east-round-PEovUgvH-PYswqry-.js → arrow-south-east-round-PEovUgvH-DzFpwdLa.js} +1 -1
  205. package/dist/assets/{auto-transfer-rule-mbafm5D3-jFxp1S6C.js → auto-transfer-rule-mbafm5D3-C9AIqfs3.js} +1 -1
  206. package/dist/assets/chartTypes-DJdbX13L-BnqLcj4-.js +1 -0
  207. package/dist/assets/{commonDimensions-Upfg-PB1-BJB9saec.js → commonDimensions-BpYNnQtf-BVrF2eSg.js} +1 -1
  208. package/dist/assets/commonTypes-BVbA7QjV-rrrVgiRE.js +1 -0
  209. package/dist/assets/{constants-DwGCeqFm.js → constants-nz8RVtEp.js} +1 -1
  210. package/dist/assets/{core-B5JTMc-Y.js → core-Be77t6wT.js} +1 -1
  211. package/dist/assets/{dash.all.min-CALjDmjw.js → dash.all.min-1JaBh8EA.js} +1 -1
  212. package/dist/assets/{detailCommon-_wEL82NI-CwSBrbUn.js → detailCommon-BRja9H93-BgDpKJS8.js} +5 -5
  213. package/dist/assets/{downloadPdf-CMFOff-_-CRKBzHJP.js → downloadPdf-WDHjFv79-x1y7Noz9.js} +1 -1
  214. package/dist/assets/{empty-B_TE5-ZP.js → empty-CVHCqPg8.js} +1 -1
  215. package/dist/assets/{empty-mBRZ5aW0.js → empty-DqMX1iak.js} +1 -1
  216. package/dist/assets/epic-upTynnWU.js +2 -0
  217. package/dist/assets/{gift-box-Cmt9OgIZ-DlDZOX77.js → gift-box-Cmt9OgIZ-hRxp85e2.js} +1 -1
  218. package/dist/assets/{graphic-no-data-l-DU4J8fDt-DEI87UY9.js → graphic-no-data-l-DU4J8fDt-DdG5b35f.js} +1 -1
  219. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-CQMUgr0O.js → graphic-no-data-net-burn-l-CzmycA0m-CRLCiMSY.js} +1 -1
  220. package/dist/assets/{handshake-BPg58FML-CTRgrDfQ.js → handshake-BPg58FML-Ts-GBzII.js} +1 -1
  221. package/dist/assets/{index-DtsBa1Px.js → index-BIQvGH1Z.js} +1 -1
  222. package/dist/assets/{index-CEB0S5G3.js → index-CHDWslZ9.js} +1 -1
  223. package/dist/assets/{index-BDOnIbbU.js → index-CNJQ6T57.js} +4094 -4048
  224. package/dist/assets/{index-BCxrNetx.js → index-Cyi12XGG.js} +1 -1
  225. package/dist/assets/{index-PvEc74OO.js → index-Q1D5afUf.js} +1 -1
  226. package/dist/assets/{index-CMcDE-0x.js → index-WLQ2kK4T.js} +1 -1
  227. package/dist/assets/{index-Ddw0lsYO.js → index-gGz0-y9K.js} +1 -1
  228. package/dist/assets/{lexical-C4hGDQy7.js → lexical-4qH-Yr6_.js} +1 -1
  229. package/dist/assets/{liveblocks-DXXqIP7n.js → liveblocks-CUDrE-0X.js} +1 -1
  230. package/dist/assets/{lottie-DruO0Lf9.js → lottie-C5G-hUN3.js} +1 -1
  231. package/dist/assets/{mapLoadingInProgressToTreeNode-ll9NZ-I4-PX4nSrtX.js → mapLoadingInProgressToTreeNode-C_5Bb47i-KSj20Sfu.js} +1 -1
  232. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-DcevOSiz-CpiaZ_e5.js → mapSectionWithAcOnlyToTreeNode-BlrJTKah-BOJoZ8nO.js} +1 -1
  233. package/dist/assets/{mapSpacerToTreeNode-6Qxn340N-B35_Y-l2.js → mapSpacerToTreeNode-DvdWKHfX-D62umWzQ.js} +1 -1
  234. package/dist/assets/mapTimeframeBalancesToTreeNode-88qIN3FA-CB8prKZU.js +1 -0
  235. package/dist/assets/mapTimeframeBalancesToTreeNode-AkxvYRty-Dd11welj.js +1 -0
  236. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-B5MDTbLz-BEBQ7_uD.js +1 -0
  237. package/dist/assets/{mui-Dn-FysqD.js → mui-DsjrNjDe.js} +1 -1
  238. package/dist/assets/{page-detail-CWX5S47F-B9Rmi6ZE.js → page-detail-CWX5S47F--SwzhZlk.js} +1 -1
  239. package/dist/assets/{panelSelectedMixin-CzfD5-Zs-BOU4oLTL.js → panelSelectedMixin-CzfD5-Zs-Cev-MiVu.js} +1 -1
  240. package/dist/assets/{radio-default-CiSgisfh-CI2BOyaZ.js → radio-default-CiSgisfh-YvmWy399.js} +1 -1
  241. package/dist/assets/{react-CZCD-bbf.js → react-BCXSKYRr.js} +1 -1
  242. package/dist/assets/{react-B3mq597j.js → react-BWkra2hE.js} +1 -1
  243. package/dist/assets/{react-x-g8LEzo.js → react-Bqp70D_u.js} +1 -1
  244. package/dist/assets/{react-BfeKj8Ah.js → react-CSCeF-Sb.js} +1 -1
  245. package/dist/assets/{react-CHfBVTZT.js → react-Ci_HLnoa.js} +2 -2
  246. package/dist/assets/{react-CiMMCOh1.js → react-DL4wn98u.js} +2 -2
  247. package/dist/assets/{react-BYfEdX_w.js → react-XG3-S5t1.js} +1 -1
  248. package/dist/assets/{react-B7JtqvO2.js → react-eUpxlpRg.js} +1 -1
  249. package/dist/assets/{recharts-CprInlbt.js → recharts-CmZa-egc.js} +1 -1
  250. package/dist/assets/{sentry-7iaVxNzj.js → sentry-9b1mvxJ5.js} +1 -1
  251. package/dist/assets/{shield-DOlUxcFf-D1oOjbdU.js → shield-DOlUxcFf-B8zzGKQS.js} +1 -1
  252. package/dist/assets/toCOABalancesWithID-Bq4Xe7az-D4N9dB70.js +1 -0
  253. package/dist/assets/{toChartData-BpfWXnJ--YGdVm4SB.js → toChartData-B3ouXKAd-thMI2fiV.js} +1 -1
  254. package/dist/assets/{uploadAttachment-ukKU1LbX-BZiZFUOo.js → uploadAttachment-DNNG-CMy-D87O59Xy.js} +21 -21
  255. package/dist/assets/{uploadReceipts-Dge0cNF1-COjJQAAp.js → uploadReceipts-Dge0cNF1-C_Z21T_D.js} +1 -1
  256. package/dist/assets/{url-Zc4cev1o.js → url-BiBhYcFe.js} +1 -1
  257. package/dist/assets/{url-CDntiqej.js → url-RTB-DW5V.js} +1 -1
  258. package/dist/assets/{useLongPress-GCK2COYQ-CMas3sgk.js → useLongPress-GCK2COYQ-CsE5mUiU.js} +1 -1
  259. package/dist/assets/{usp-line-BBd1wKwW-BZQcBi21.js → usp-line-BBd1wKwW-5m5uF-Rf.js} +1 -1
  260. package/dist/assets/{utils-BV_yqPM7.js → utils-VcZ1Xqjg.js} +1 -1
  261. package/dist/assets/{zeni-epic-state-CMxzji9D.js → zeni-epic-state-DJX8u9R8.js} +17 -17
  262. package/dist/index.html +1 -1
  263. package/package.json +4 -4
  264. package/dist/assets/AccountInfoPage-BUVWxmzs-BU0QFXPz.js +0 -18
  265. package/dist/assets/AddAddressForCardDrawer-DlGL-3yf-CEM_OSu4.js +0 -6
  266. package/dist/assets/AppBasePage-CPdKfb57-CdKaM3Y7.js +0 -71
  267. package/dist/assets/ApprovalRulesSettingsPage-C8P04Y3s-DdNhWE6a.js +0 -47
  268. package/dist/assets/BillPayApprovalRuleDetailPage-CKr-k2kC-DLLdfful.js +0 -27
  269. package/dist/assets/BillingSettingsPage-Bqj_AXGq-B80HR_0l.js +0 -44
  270. package/dist/assets/BusinessVerificationPage-G8uzN4Ws-Dg4HUFd7.js +0 -138
  271. package/dist/assets/ChargeCardPromoPage-B4yj7KP9-9bE0RFY5.js +0 -222
  272. package/dist/assets/CompanyOfficerDetailsSection-1BDesjjs-CGxHxKUo.js +0 -260
  273. package/dist/assets/CompanyPassportPage-DPNROicI-DkVd0IVN.js +0 -574
  274. package/dist/assets/ConfettiBurst-BUf7AIFk-dPsmZWRd.js +0 -1
  275. package/dist/assets/CustomerOnboardingContainerPage-ihPd9hEn-DodGm-su.js +0 -1
  276. package/dist/assets/CustomerOnboardingNoStepsPage-zMwJiFSO-Ca3ln1bs.js +0 -66
  277. package/dist/assets/EditPeoplePage-D-vaUQbG-Bt1U4fZO.js +0 -55
  278. package/dist/assets/EntityDetailPage-B2Tmq0cV-iHRdD8Pd.js +0 -18
  279. package/dist/assets/InsightsSection-Ldcdpf_t-BcIZl-SB.js +0 -27
  280. package/dist/assets/InternationalWireVerificationPage-mHew9ruS-CuqmXfkC.js +0 -292
  281. package/dist/assets/InvitePeoplePage-y0gl_wqg-Bpnr6fsx.js +0 -12
  282. package/dist/assets/LabeledControlledCheckBoxField-CkG-jIW7-BnIEsD6z.js +0 -16
  283. package/dist/assets/LabeledDocumentField-ffpHZV4a-B_2ABBG3.js +0 -41
  284. package/dist/assets/MagicLinkACHDetailsPage-DIpNQrGA-BqjoWUr8.js +0 -1
  285. package/dist/assets/MagicLinkDomesticWireDetailsPage-B9wywDCI-EJ8yrlbL.js +0 -1
  286. package/dist/assets/MagicLinkSuccessPage-RQtS7ohy-5LyL6Vux.js +0 -31
  287. package/dist/assets/NoDataChart-Dm8c31gV-Bqmql54J.js +0 -26
  288. package/dist/assets/NoDataTable-BLcYAK9T-wg_yL59b.js +0 -8
  289. package/dist/assets/OverlayContainerPage-D4QU0p4o-BX1xnMzK.js +0 -11
  290. package/dist/assets/PaymentAccountSetupBillingAddressSection-ChGcOYcG-CO6Awyg6.js +0 -107
  291. package/dist/assets/ReimbursementApprovalRuleDetailPage-BScdJYcI-bNfeq7vv.js +0 -32
  292. package/dist/assets/SignInScreen-C3Ba0wdc.js +0 -1
  293. package/dist/assets/TransactionListPage-4nFAQM97-ClFT8B5K.js +0 -35
  294. package/dist/assets/Vendor2FAPopup-Cn7Bst-t-DMIJpNIO.js +0 -1
  295. package/dist/assets/VendorACHDetailsPage-yJs4pSeb-BHrP3K1V.js +0 -1
  296. package/dist/assets/VendorDomesticWireDetailsPage-BZatg69M-Dhf3MU0Y.js +0 -1
  297. package/dist/assets/VendorInternationalWireSwiftDetailsPage-Co_Kax4L-J_6dAVTd.js +0 -1
  298. package/dist/assets/analyticsHelper-CuUU34nx.js +0 -1
  299. package/dist/assets/chartTypes-BKexR59e-B1u-Nki8.js +0 -1
  300. package/dist/assets/epic-VnsPu9_V.js +0 -2
  301. package/dist/assets/mapTimeframeBalancesToTreeNode-BlKa4mAP-yheruBM4.js +0 -1
  302. package/dist/assets/mapTimeframeBalancesToTreeNode-tYVPqkGh-BqdeYyQR.js +0 -1
  303. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-C92aroSy-EW-HNrEx.js +0 -1
  304. package/dist/assets/toCOABalancesWithID-DtqUradx-DwvWuPd5.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR as ds,u as x,F as Ie,cq as Ta,y as Z,e as kt,bC as La,i6 as Aa,aN as Je,bT as we,bv as Ea,g6 as Ra,aP as z,i3 as Da,al as Pe,gZ as Oa,gR as us,bw as Ma,bP as Mt,b7 as hs,ai as It,bK as ps,p as Qe,kj as Fa,am as gt,cd as Cn,a9 as Jt,bO as Ao,ac as Gt,kk as za,kl as _a,km as Pa,kn as un,ko as ms,kp as gs,kq as Ba,kr as Go,ks as Na,gk as xs,dm as fs,kt as Va,ku as Wa,kv as Ha,kw as Ua,kx as qa,ky as Ka,kz as Ja,kA as Ga,kB as Za,kC as Ya,kD as ys,kE as Xa,kF as Qa,kG as er,kH as tr,gz as Cs,b3 as Nn,ct as Vn,T as ws,n as bs,q as vs,cF as wn,dV as Eo,C as nr,gj as or,bo as ir,ck as sr,c2 as ar,eF as bn,b$ as Ro,aq as rr,d as lr,fA as cr,aD as Ss,kI as dr,aV as Do,aQ as Zo,gT as js,kJ as ur,kK as hr,kL as pr,bF as ks,aT as mr,i4 as Ft,dj as Oo,gH as Ot,hV as qn,eD as Fn,cS as Mo,ay as gr,c$ as Is,dp as xr,gu as fr,fP as yr,h0 as Cr,iS as wr,du as Fo,cz as Wn,cC as Hn,iz as it,b as Dt,hI as br,gA as Kn,jh as Yo,dk as $s,d2 as xn,kM as vr,aZ as Sr,dt as Ts,r as fn,iq as Ls,iA as vo,kN as on,eg as As,ei as Es,iV as Rs,iW as Ds,kO as jr,d0 as Un,ir as Os,fo as Ms,ev as Jn,aJ as So,kP as kr,cY as Ir,aY as Fs,iH as $r,dT as Tr,ao as bt,kQ as Lr,kR as Ar,b1 as Gn,er as Er,a8 as Rr,es as Dr,et as Or,eu as Mr,ew as Xo,ex as Qo,ey as Fr,kS as zr,a$ as _r,eH as Pr,eI as Br,eJ as Nr}from"./index-BDOnIbbU.js";import{a as s,P as Vr}from"./sentry-7iaVxNzj.js";import{n as a,c as De,k as zo}from"./mui-Dn-FysqD.js";import{bh as Zn,Gm as ei,Gn as yn,Go as Wr,Gp as Hr,cx as Ur,bL as jo,cy as qr,ER as ti,cz as Kr,cA as Jr,l8 as hn,bE as Wt,Gq as ni,c4 as zs,Gr,bY as Zr,bo as Ht,Gs as Yr,Gt as _s,Gu as Ps,Gv as Bs,Gw as Ns,Gx as Vs,Gy as _o,kU as Xr}from"./zeni-epic-state-CMxzji9D.js";import{l as Po}from"./panelSelectedMixin-CzfD5-Zs-BOU4oLTL.js";import{r as Ws,I as Hs,n as sn,R as mt}from"./CollapsableReportTable-BpZbn8JV-BJBRRzKX.js";import{N as Yn}from"./AccountRow-Gn7g3D_F-BBQfly-U.js";import{o as Us}from"./mapTimeframeBalancesToTreeNode-tYVPqkGh-BqdeYyQR.js";import{d as oi}from"./mapLoadingInProgressToTreeNode-ll9NZ-I4-PX4nSrtX.js";import{h as Qr}from"./VendorsAccountsSection-BeiK6LWK-B3NLg17b.js";import{u as el,c as ii,d as tl,m as nl}from"./uploadAttachment-ukKU1LbX-BZiZFUOo.js";import"./liveblocks-DXXqIP7n.js";import"./core-B5JTMc-Y.js";import"./recharts-CprInlbt.js";import"./lottie-DruO0Lf9.js";import"./analytics-BgoqoHps.js";import"./lexical-C4hGDQy7.js";import"./utils-BV_yqPM7.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3de1adf2-a5bc-443e-bcca-b950f2e5c38d",e._sentryDebugIdIdentifier="sentry-dbid-3de1adf2-a5bc-443e-bcca-b950f2e5c38d")}catch{}})();const{common:{navBar:{back:ol},texts:{refresh:il,close:sl,copy:al,copied:rl,open:ll}},expenseAutomation:{common:{numbers:{maximumCount:cl}}}}=Ie.getLocalizedStrings(),dl=a(fr)`
1
+ import{o,bV as ja,J as ke,gk as rs,gl as ls,V as t,cp as ka,bB as Ia,aa as We,aR as cs,u as x,F as Ie,cq as $a,y as Z,d as kt,bC as Ta,i9 as La,aN as Je,bT as we,bv as Aa,g8 as Ea,aP as z,i6 as Ra,al as Be,h0 as Da,gU as ds,bw as Oa,bP as Mt,b7 as us,ai as It,bK as hs,p as Qe,km as Ma,am as gt,a9 as Jt,bO as Lo,ac as Gt,kn as Fa,ko as za,kp as _a,kq as un,kr as ps,ks as ms,kt as Ba,ku as Jo,kv as Pa,gn as gs,dl as xs,kw as Na,kx as Va,ky as Wa,kz as Ha,kA as Ua,kB as qa,kC as Ka,kD as Ja,kE as Ga,kF as Za,kG as fs,kH as Ya,kI as Xa,kJ as Qa,kK as er,gC as ys,b3 as Pn,ct as Nn,T as Cs,n as ws,P as bs,cF as Cn,dU as Ao,x as tr,gm as nr,bo as or,ck as ir,c2 as sr,eG as wn,b$ as Eo,aq as ar,c as rr,fC as lr,cd as cr,aD as vs,kL as dr,aV as Ro,aQ as Go,gW as Ss,kM as ur,kN as hr,kO as pr,bF as js,aT as mr,i7 as Ft,di as Do,gK as Ot,hY as Un,eD as Mn,cJ as Oo,ay as gr,eE as ks,dn as xr,gx as fr,fR as yr,h3 as Cr,iV as wr,dt as Mo,cz as Vn,cC as Wn,iC as it,b as Dt,hL as br,gD as qn,jk as Zo,dj as Is,d1 as xn,kP as vr,aZ as Sr,ds as $s,r as fn,it as Ts,iD as bo,kQ as on,ef as Ls,eh as As,iY as Es,iZ as Rs,kR as jr,c$ as Hn,iu as Ds,fq as Os,eu as Kn,aJ as vo,kS as kr,cO as Ir,aY as Ms,iK as $r,dS as Tr,ao as bt,kT as Lr,kU as Ar,b1 as Jn,eq as Er,a8 as Rr,er as Dr,es as Or,et as Mr,ew as Yo,ex as Xo,ey as Fr,kV as zr,a$ as _r,eI as Br,eJ as Pr,eK as Nr}from"./index-CNJQ6T57.js";import{a as s,P as Vr}from"./sentry-9b1mvxJ5.js";import{n as a,c as De,k as Fo}from"./mui-DsjrNjDe.js";import{bh as Gn,Gm as Qo,Gn as yn,Go as Wr,Gp as Hr,cx as Ur,bL as So,cy as qr,ER as ei,cz as Kr,cA as Jr,l8 as hn,bE as Wt,Gq as ti,c4 as Fs,Gr,bY as Zr,bo as Ht,Gs as Yr,Gt as zs,Gu as _s,Gv as Bs,Gw as Ps,Gx as Ns,Gy as zo,kU as Xr}from"./zeni-epic-state-DJX8u9R8.js";import{l as _o}from"./panelSelectedMixin-CzfD5-Zs-Cev-MiVu.js";import{r as Vs,I as Ws,n as sn,R as mt}from"./CollapsableReportTable-UADp1m_8-C887iUXZ.js";import{N as Zn}from"./AccountRow-Bk_25FCy-D03inSab.js";import{o as Hs}from"./mapTimeframeBalancesToTreeNode-AkxvYRty-Dd11welj.js";import{d as ni}from"./mapLoadingInProgressToTreeNode-C_5Bb47i-KSj20Sfu.js";import{h as Qr}from"./VendorsAccountsSection-D65ewlO6-DU6ZIrZA.js";import{u as el,c as oi,d as tl,m as nl}from"./uploadAttachment-DNNG-CMy-D87O59Xy.js";import"./liveblocks-CUDrE-0X.js";import"./core-Be77t6wT.js";import"./recharts-CmZa-egc.js";import"./lottie-C5G-hUN3.js";import"./analytics-DH2FWXQR.js";import"./lexical-4qH-Yr6_.js";import"./utils-VcZ1Xqjg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7a1d679d-92ef-41a2-8bb0-532036e05e18",e._sentryDebugIdIdentifier="sentry-dbid-7a1d679d-92ef-41a2-8bb0-532036e05e18")}catch{}})();const{common:{navBar:{back:ol},texts:{refresh:il,close:sl,copy:al,copied:rl,open:ll}},expenseAutomation:{common:{numbers:{maximumCount:cl}}}}=Ie.getLocalizedStrings(),dl=a(fr)`
2
2
  display: flex;
3
3
  width: ${o.sp4};
4
4
  height: ${o.sp4};
@@ -28,8 +28,8 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  align-items: center;
31
- padding-left: ${e=>ai.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
- padding-right: ${e=>ai.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
31
+ padding-left: ${e=>si.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
+ padding-right: ${e=>si.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
33
33
  `,ml=a.div`
34
34
  display: flex;
35
35
  align-items: baseline;
@@ -53,7 +53,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
53
53
  height: ${o.sp3};
54
54
  margin-left: ${o.sp1};
55
55
  color: ${Qe.success};
56
- `,yl=a(nr)`
56
+ `,yl=a(tr)`
57
57
  cursor: pointer;
58
58
  width: ${o.sp4};
59
59
  height: ${o.sp4};
@@ -61,7 +61,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
61
61
  &:hover {
62
62
  color: ${e=>e.theme.colors.primary};
63
63
  }
64
- `,Cl=a(ar)`
64
+ `,Cl=a(sr)`
65
65
  cursor: pointer;
66
66
  width: ${o.sp4};
67
67
  height: ${o.sp4};
@@ -69,7 +69,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
69
69
  &:hover {
70
70
  color: ${e=>e.theme.colors.primary};
71
71
  }
72
- `,wl=a(sr,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
72
+ `,wl=a(ir,{shouldForwardProp:e=>typeof e=="string"&&e!=="$spinning"})`
73
73
  cursor: pointer;
74
74
  width: ${o.sp4};
75
75
  height: ${o.sp4};
@@ -80,7 +80,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
80
80
  &:hover {
81
81
  color: ${e=>e.theme.colors.primary};
82
82
  }
83
- `,bl=zo`
83
+ `,bl=Fo`
84
84
  0% {
85
85
  transform: rotate(0deg);
86
86
  }
@@ -90,7 +90,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
90
90
  `,vl=a.div`
91
91
  padding-top: ${o.sp0};
92
92
  padding-bottom: ${o.sp0};
93
- `,si=a(Pe)`
93
+ `,ii=a(Be)`
94
94
  color: ${e=>e.theme.colors.hero};
95
95
  text-align: center;
96
96
  display: flex;
@@ -120,18 +120,18 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
120
120
  `,$l=a.div`
121
121
  display: flex;
122
122
  flex-direction: column;
123
- `,Tl=a(bn)`
123
+ `,Tl=a(wn)`
124
124
  width: ${o.sp3};
125
125
  height: ${o.sp3};
126
126
  margin-right: ${o.sp1};
127
127
  path {
128
128
  stroke-width: 2;
129
129
  }
130
- `,jn=a.span`
131
- font-weight: ${Ro.regular};
130
+ `,Sn=a.span`
131
+ font-weight: ${Eo.regular};
132
132
  color: ${e=>e.theme.colors.primary};
133
133
  `,Ll=a.span`
134
- font-weight: ${Ro.medium};
134
+ font-weight: ${Eo.medium};
135
135
  color: ${e=>e.theme.colors.primary};
136
136
  `,Al=a.span`
137
137
  color: ${e=>e.theme.colors.primary};
@@ -151,12 +151,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
151
151
  }
152
152
  text-decoration-color: ${e=>e.theme.colors.primary};
153
153
  }
154
- `,ai={subSectionContainerLeftRightPadding:new Z(x[3],x[6],x[8])},El=({onAllThreadsClick:e,companyId:n,companyName:c})=>{const r={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:c,url:window.location.href},{url:p,...h}=r,i={...h},{threads:d,isLoading:l}=or(i,!1,!1),m=d.filter(u=>u.id.includes(xs)===!1);return t.jsxs(ul,{isDisabled:l,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(ir,{count:m.length,isLoading:l}),t.jsx(dl,{})]})},Rl=({headerData:e,refreshStatus:n,searchText:c,companyName:r,companyId:p,isZeniUser:h,onAllThreadsClick:i,onClose:d,onRefresh:l,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&l()};return t.jsx(ml,{children:e.rightSection.map((g,f)=>{switch(g){case"search":return t.jsx(Da,{isSearchOpen:(c.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:c,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},f+g);case"refresh":return t.jsx(we,{display:"block",placement:"bottom",title:il,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(wl,{onClick:u,$spinning:n==="In-Progress","data-testid":z("refresh-icon")})},f+g);case"comment":return h===!1?null:t.jsx(El,{companyId:p,companyName:r,onAllThreadsClick:i});case"close":default:return t.jsx(we,{display:"block",placement:"bottom",title:sl,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(yl,{onClick:d,"data-testid":z("close-icon")})},f+g)}})})},Dl=({headerData:e,onBack:n})=>t.jsx(gl,{children:e.leftSection.map((c,r)=>{switch(c){case"back":default:return t.jsx(we,{display:"block",placement:"bottom",title:ol,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Cl,{onClick:n,"data-testid":z("back-button")})},r+c)}})}),ri=({text:e,linkText:n,windowSize:c,isCopied:r,onLinkClick:p})=>{if(n==null||!n)return t.jsxs(jn,{windowSize:c,children:[e," "]});const h=e.indexOf(n);if(h===-1)return t.jsxs(jn,{windowSize:c,children:[e," "]});const i=e.substring(0,h),d=e.substring(h+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(jn,{windowSize:c,children:[i.trim()," "]}):null,t.jsx(we,{display:"flex",placement:"right",title:us.test(n)?r?rl:al:ll,enterTouchDelay:600,children:t.jsxs(Al,{onClick:()=>p?.(n),"data-testid":z("pre-link"),children:[n,r?t.jsx(fl,{className:"success-icon"}):t.jsx(xl,{className:"copy-icon"})]})}),d?t.jsxs(jn,{windowSize:c,children:[d," "]}):null]})},li=({subTitles:e})=>{const n=ke(),[,c]=Oa(),[r,p]=s.useState(!1),h=s.useRef(null),i=s.useCallback(d=>{us.test(d)?(c(d),p(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!1)},2e3)):window.open(d,"_blank","noopener,noreferrer")},[c]);return s.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),t.jsx($l,{children:e.map((d,l)=>t.jsxs(Il,{children:[d.pre?t.jsx(ri,{text:d.pre,linkText:d.preLink,windowSize:n,isCopied:r,onLinkClick:i}):null,d.prefixIconName?t.jsx(t.Fragment,{children:d.prefixIconName==="zeniAIIcon"?t.jsx(Tl,{}):t.jsx(t.Fragment,{})}):null,d.bold?t.jsx(t.Fragment,{children:t.jsxs(Ll,{windowSize:n,children:[d.bold," "]})}):null,d.post?t.jsx(ri,{text:d.post,linkText:d.postLink,windowSize:n,isCopied:r,onLinkClick:i}):null]},l+d.bold+d.pre+d.post))})};function Ol(e){const{headerData:n,currentTab:c,completionStatus:r,onUpdateTab:p,selectedReconAccountId:h,getTabCountAndFetchState:i,reconcileDetailPageFetchState:d,forceShowSubtitle:l,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:g,navBarCustomElement:f,titleStyle:y={}}=e,b=i("autoCategorized")?.count??0,S=i("review")?.count??0,k=i("reconcile")?.count??0,C=n.tabs.length>0||n.subTitle.length>0,L=m==="transaction_categorization"&&c==="autoCategorized",j=m==="reconciliation"&&g==="review"&&h!=null,v=m==="reconciliation"&&g==="reconcile"&&h!=null,A=L?b>0:j?d==="In-Progress"?!0:S>0:v?d==="In-Progress"?!0:k>0:r!=="complete",T=kt(),I=ke();let R=[];return n.tabs.length>0&&(R=n.tabs.map(w=>({label:w.label,id:w.id,countDetails:i(w.id)}))),t.jsxs(hl,{children:[t.jsx(La,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:T.colors.grey4,onBackClick:()=>null,titleStyle:y,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(Dl,{...e}),rightSideComponent:t.jsx(Rl,{...e}),source:"NavBarWithHeader"}),f??null,t.jsx(We,{controller:C===!0,children:t.jsx(pl,{windowSize:I,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(vl,{windowSize:I,children:t.jsx(Aa,{allTabs:R,selectedTab:m==="transaction_categorization"?c??R[0].id:g??R[0].id,onTabChange:w=>{if(m==="transaction_categorization"){const D=Wr(w.id);D!=null&&p(D)}else if(m==="reconciliation"){const D=Hr(w.id);D!=null&&u(D)}},maximumCountLimit:cl})}),t.jsx(jl,{windowSize:I}),t.jsx(kl,{}),t.jsx(We,{controller:A===!0||l===!0,children:t.jsx(si,{windowSize:I,children:n.tabs.map((w,D)=>(m==="reconciliation"?w.id===g:w.id===c)?t.jsx(Sl,{children:t.jsx(li,{subTitles:w.subTitle})},D+w.id):null)})})]}):t.jsx(We,{controller:A===!0||l===!0,children:t.jsx(si,{windowSize:I,children:t.jsx(li,{subTitles:n.subTitle})})})})})]})}const Ml=1;function Fl({name:e,checkBoxes:n,mode:c,isDisabled:r,style:p,labelStyle:h,labelCheckBoxStyle:i,checkBoxStyle:d,width:l,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:g,checkBoxContainerStyle:f,draggable:y=!1,selectionLimit:b,infoIconContainerStyle:S,onDragStart:k,rowHeight:C=40,initialScrollOffSet:L,onScroll:j}){const v=ke(),A=s.useRef(null),{control:T}=Mo(),I=n.find(V=>V.groupLabel),R=n.filter(V=>!V.groupLabel),w=[];for(const V of R)if(V.isException||w.push(V.value),b!=null&&w.length===b+1)break;const D=n.filter(V=>V.defaultChecked).map(V=>V.value);return t.jsx(Is,{control:T,name:e,rules:m,defaultValue:D,render:({field:{value:V,ref:q,onChange:B}})=>{const N=P=>{_l({event:P,value:V,allCheckBoxValues:w,groupLabelCheckBox:I,onChange:B})};return t.jsxs(Pl,{style:p,windowSize:v,children:[I&&t.jsx(Bo,{checkBox:I,index:0,value:V,allCheckBoxValues:w,mode:c,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:i,labelStyle:h,width:l,draggable:y,groupLabelCheckBox:I,infoIconContainerStyle:S,checkedIconColor:u,isDisabled:r,selectionLimit:b,onDragStart:k,ref:q,onChangeHandler:N}),t.jsx(Bl,{children:t.jsx(Nn,{style:{height:"100%",width:"100%"},children:({height:P,width:ie})=>t.jsx(Vn,{ref:A,height:P,width:ie,itemCount:R.length,itemSize:()=>C,estimatedItemSize:C,initialScrollOffset:L??0,onScroll:({scrollOffset:U})=>{j?.(U)},overscanCount:Ml,itemKey:U=>R[U].value,itemData:{checkBoxes:R,value:V,allCheckBoxValues:w,mode:c,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:i,labelStyle:h,width:l,draggable:y,groupLabelCheckBox:I,infoIconContainerStyle:S,checkedIconColor:u,isDisabled:r,selectionLimit:b,onDragStart:k,ref:q,onChange:B,handleChangeEvent:N,rowHeight:C},children:zl})})})]})}})}const zl=({index:e,style:n,data:c})=>{const r=s.useRef(null),{checkBoxes:p,value:h,allCheckBoxValues:i,mode:d,name:l,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:L,isDisabled:j,selectionLimit:v,onDragStart:A,ref:T,handleChangeEvent:I}=c,R=p[e];return t.jsx(ql,{style:{...n,width:"100%"},ref:r,children:t.jsx(Bo,{checkBox:R,index:e,value:h,allCheckBoxValues:i,mode:d,name:l,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:L,isDisabled:j,selectionLimit:v,onDragStart:A,ref:T,onChangeHandler:I})})},Bo=s.forwardRef((e,n)=>{const{value:c,checkBox:r,groupLabelCheckBox:p,allCheckBoxValues:h,selectionLimit:i,mode:d,checkBoxStyle:l,labelCheckBoxStyle:m,isDisabled:u,draggable:g,checkBoxContainerStyle:f,infoIconContainerStyle:y,name:b,index:S,width:k,checkedIconColor:C,checkBoxIconStyle:L,labelStyle:j,onDragStart:v,onChangeHandler:A}=e,T=ke(),I=V=>{typeof n=="function"?n(V):n&&(n.current=V)};let R=c.includes(r.value);const w=Array.from(new Set([...c,r.value]));p?.value===r.value&&c.length>0&&(i!=null?R=w.length===h.length||w.length===i+1:R=h.every(V=>w.includes(V)===!0));const D=()=>d==="off"||r.isException?T==="small"?{display:"none",...l}:{visibility:"hidden",...l}:r.groupLabel?h.length===1&&h[0]===p?.value?{visibility:"hidden",...m}:m:l;return t.jsxs(Vl,{mode:d,draggable:g===!0,onDragStart:V=>{v?.(V,r.value)},style:f,isDisabled:u,isSelected:R,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(Nl,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(Wl,{style:y,className:"checkbox-alert",children:t.jsx(we,{style:{padding:`12px ${o.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(Hl,{}):t.jsx(Ul,{})})}):t.jsx(kr,{name:`${b}.${r.value}`,checkBoxValue:r.value,value:R,checkedIconColor:C,isDisabled:u||!r.groupLabel&&!R&&i!=null&&w.length===i+1?"disabled":void 0,checkBoxStyle:D(),checkBoxIconStyle:L,ref:I,onChange:A}),typeof r.label=="string"&&r.label?t.jsx(Ir,{isDisabled:u,label:r.label,labelStyle:j,htmlFor:`${b}.${r.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:k,backgroundColor:"inherit",...j}}):r.label]},`${r.value}_${S}`)});Bo.displayName="CheckBoxWithLabel";const _l=({event:e,value:n,allCheckBoxValues:c,groupLabelCheckBox:r,onChange:p})=>{const h=e.currentTarget.value,i=e.currentTarget.checked,d=r?.value,l=new Set(n);if(h===d){p(i?Array.from(new Set([d,...c])):[]);return}i?l.add(h):l.delete(h);const m=c.every(u=>l.has(u));d!=null&&(m&&!l.has(d)?l.add(d):!m&&l.has(d)&&l.delete(d)),p(Array.from(l))},Pl=a.div`
154
+ `,si={subSectionContainerLeftRightPadding:new Z(x[3],x[6],x[8])},El=({onAllThreadsClick:e,companyId:n,companyName:c})=>{const r={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:c,url:window.location.href},{url:p,...h}=r,i={...h},{threads:d,isLoading:l}=nr(i,!1,!1),m=d.filter(u=>u.id.includes(gs)===!1);return t.jsxs(ul,{isDisabled:l,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(or,{count:m.length,isLoading:l}),t.jsx(dl,{})]})},Rl=({headerData:e,refreshStatus:n,searchText:c,companyName:r,companyId:p,isZeniUser:h,onAllThreadsClick:i,onClose:d,onRefresh:l,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&l()};return t.jsx(ml,{children:e.rightSection.map((g,f)=>{switch(g){case"search":return t.jsx(Ra,{isSearchOpen:(c.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:c,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},f+g);case"refresh":return t.jsx(we,{display:"block",placement:"bottom",title:il,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(wl,{onClick:u,$spinning:n==="In-Progress","data-testid":z("refresh-icon")})},f+g);case"comment":return h===!1?null:t.jsx(El,{companyId:p,companyName:r,onAllThreadsClick:i});case"close":default:return t.jsx(we,{display:"block",placement:"bottom",title:sl,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(yl,{onClick:d,"data-testid":z("close-icon")})},f+g)}})})},Dl=({headerData:e,onBack:n})=>t.jsx(gl,{children:e.leftSection.map((c,r)=>{switch(c){case"back":default:return t.jsx(we,{display:"block",placement:"bottom",title:ol,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Cl,{onClick:n,"data-testid":z("back-button")})},r+c)}})}),ai=({text:e,linkText:n,windowSize:c,isCopied:r,onLinkClick:p})=>{if(n==null||!n)return t.jsxs(Sn,{windowSize:c,children:[e," "]});const h=e.indexOf(n);if(h===-1)return t.jsxs(Sn,{windowSize:c,children:[e," "]});const i=e.substring(0,h),d=e.substring(h+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(Sn,{windowSize:c,children:[i.trim()," "]}):null,t.jsx(we,{display:"flex",placement:"right",title:ds.test(n)?r?rl:al:ll,enterTouchDelay:600,children:t.jsxs(Al,{onClick:()=>p?.(n),"data-testid":z("pre-link"),children:[n,r?t.jsx(fl,{className:"success-icon"}):t.jsx(xl,{className:"copy-icon"})]})}),d?t.jsxs(Sn,{windowSize:c,children:[d," "]}):null]})},ri=({subTitles:e})=>{const n=ke(),[,c]=Da(),[r,p]=s.useState(!1),h=s.useRef(null),i=s.useCallback(d=>{ds.test(d)?(c(d),p(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!1)},2e3)):window.open(d,"_blank","noopener,noreferrer")},[c]);return s.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),t.jsx($l,{children:e.map((d,l)=>t.jsxs(Il,{children:[d.pre?t.jsx(ai,{text:d.pre,linkText:d.preLink,windowSize:n,isCopied:r,onLinkClick:i}):null,d.prefixIconName?t.jsx(t.Fragment,{children:d.prefixIconName==="zeniAIIcon"?t.jsx(Tl,{}):t.jsx(t.Fragment,{})}):null,d.bold?t.jsx(t.Fragment,{children:t.jsxs(Ll,{windowSize:n,children:[d.bold," "]})}):null,d.post?t.jsx(ai,{text:d.post,linkText:d.postLink,windowSize:n,isCopied:r,onLinkClick:i}):null]},l+d.bold+d.pre+d.post))})};function Ol(e){const{headerData:n,currentTab:c,completionStatus:r,onUpdateTab:p,selectedReconAccountId:h,getTabCountAndFetchState:i,reconcileDetailPageFetchState:d,forceShowSubtitle:l,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:g,navBarCustomElement:f,titleStyle:y={}}=e,b=i("autoCategorized")?.count??0,S=i("review")?.count??0,k=i("reconcile")?.count??0,C=n.tabs.length>0||n.subTitle.length>0,L=m==="transaction_categorization"&&c==="autoCategorized",j=m==="reconciliation"&&g==="review"&&h!=null,v=m==="reconciliation"&&g==="reconcile"&&h!=null,A=L?b>0:j?d==="In-Progress"?!0:S>0:v?d==="In-Progress"?!0:k>0:r!=="complete",T=kt(),I=ke();let R=[];return n.tabs.length>0&&(R=n.tabs.map(w=>({label:w.label,id:w.id,countDetails:i(w.id)}))),t.jsxs(hl,{children:[t.jsx(Ta,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:T.colors.grey4,onBackClick:()=>null,titleStyle:y,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(Dl,{...e}),rightSideComponent:t.jsx(Rl,{...e}),source:"NavBarWithHeader"}),f??null,t.jsx(We,{controller:C===!0,children:t.jsx(pl,{windowSize:I,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(vl,{windowSize:I,children:t.jsx(La,{allTabs:R,selectedTab:m==="transaction_categorization"?c??R[0].id:g??R[0].id,onTabChange:w=>{if(m==="transaction_categorization"){const D=Wr(w.id);D!=null&&p(D)}else if(m==="reconciliation"){const D=Hr(w.id);D!=null&&u(D)}},maximumCountLimit:cl})}),t.jsx(jl,{windowSize:I}),t.jsx(kl,{}),t.jsx(We,{controller:A===!0||l===!0,children:t.jsx(ii,{windowSize:I,children:n.tabs.map((w,D)=>(m==="reconciliation"?w.id===g:w.id===c)?t.jsx(Sl,{children:t.jsx(ri,{subTitles:w.subTitle})},D+w.id):null)})})]}):t.jsx(We,{controller:A===!0||l===!0,children:t.jsx(ii,{windowSize:I,children:t.jsx(ri,{subTitles:n.subTitle})})})})})]})}const Ml=1;function Fl({name:e,checkBoxes:n,mode:c,isDisabled:r,style:p,labelStyle:h,labelCheckBoxStyle:i,checkBoxStyle:d,width:l,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:g,checkBoxContainerStyle:f,draggable:y=!1,selectionLimit:b,infoIconContainerStyle:S,onDragStart:k,rowHeight:C=40,initialScrollOffSet:L,onScroll:j}){const v=ke(),A=s.useRef(null),{control:T}=Oo(),I=n.find(V=>V.groupLabel),R=n.filter(V=>!V.groupLabel),w=[];for(const V of R)if(V.isException||w.push(V.value),b!=null&&w.length===b+1)break;const D=n.filter(V=>V.defaultChecked).map(V=>V.value);return t.jsx(ks,{control:T,name:e,rules:m,defaultValue:D,render:({field:{value:V,ref:q,onChange:P}})=>{const N=B=>{_l({event:B,value:V,allCheckBoxValues:w,groupLabelCheckBox:I,onChange:P})};return t.jsxs(Bl,{style:p,windowSize:v,children:[I&&t.jsx(Bo,{checkBox:I,index:0,value:V,allCheckBoxValues:w,mode:c,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:i,labelStyle:h,width:l,draggable:y,groupLabelCheckBox:I,infoIconContainerStyle:S,checkedIconColor:u,isDisabled:r,selectionLimit:b,onDragStart:k,ref:q,onChangeHandler:N}),t.jsx(Pl,{children:t.jsx(Pn,{style:{height:"100%",width:"100%"},children:({height:B,width:ie})=>t.jsx(Nn,{ref:A,height:B,width:ie,itemCount:R.length,itemSize:()=>C,estimatedItemSize:C,initialScrollOffset:L??0,onScroll:({scrollOffset:U})=>{j?.(U)},overscanCount:Ml,itemKey:U=>R[U].value,itemData:{checkBoxes:R,value:V,allCheckBoxValues:w,mode:c,name:e,checkBoxContainerStyle:f,checkBoxIconStyle:g,checkBoxStyle:d,labelCheckBoxStyle:i,labelStyle:h,width:l,draggable:y,groupLabelCheckBox:I,infoIconContainerStyle:S,checkedIconColor:u,isDisabled:r,selectionLimit:b,onDragStart:k,ref:q,onChange:P,handleChangeEvent:N,rowHeight:C},children:zl})})})]})}})}const zl=({index:e,style:n,data:c})=>{const r=s.useRef(null),{checkBoxes:p,value:h,allCheckBoxValues:i,mode:d,name:l,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:L,isDisabled:j,selectionLimit:v,onDragStart:A,ref:T,handleChangeEvent:I}=c,R=p[e];return t.jsx(ql,{style:{...n,width:"100%"},ref:r,children:t.jsx(Bo,{checkBox:R,index:e,value:h,allCheckBoxValues:i,mode:d,name:l,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:g,labelCheckBoxStyle:f,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:k,infoIconContainerStyle:C,checkedIconColor:L,isDisabled:j,selectionLimit:v,onDragStart:A,ref:T,onChangeHandler:I})})},Bo=s.forwardRef((e,n)=>{const{value:c,checkBox:r,groupLabelCheckBox:p,allCheckBoxValues:h,selectionLimit:i,mode:d,checkBoxStyle:l,labelCheckBoxStyle:m,isDisabled:u,draggable:g,checkBoxContainerStyle:f,infoIconContainerStyle:y,name:b,index:S,width:k,checkedIconColor:C,checkBoxIconStyle:L,labelStyle:j,onDragStart:v,onChangeHandler:A}=e,T=ke(),I=V=>{typeof n=="function"?n(V):n&&(n.current=V)};let R=c.includes(r.value);const w=Array.from(new Set([...c,r.value]));p?.value===r.value&&c.length>0&&(i!=null?R=w.length===h.length||w.length===i+1:R=h.every(V=>w.includes(V)===!0));const D=()=>d==="off"||r.isException?T==="small"?{display:"none",...l}:{visibility:"hidden",...l}:r.groupLabel?h.length===1&&h[0]===p?.value?{visibility:"hidden",...m}:m:l;return t.jsxs(Vl,{mode:d,draggable:g===!0,onDragStart:V=>{v?.(V,r.value)},style:f,isDisabled:u,isSelected:R,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(Nl,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(Wl,{style:y,className:"checkbox-alert",children:t.jsx(we,{style:{padding:`12px ${o.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(Hl,{}):t.jsx(Ul,{})})}):t.jsx(kr,{name:`${b}.${r.value}`,checkBoxValue:r.value,value:R,checkedIconColor:C,isDisabled:u||!r.groupLabel&&!R&&i!=null&&w.length===i+1?"disabled":void 0,checkBoxStyle:D(),checkBoxIconStyle:L,ref:I,onChange:A}),typeof r.label=="string"&&r.label?t.jsx(Ir,{isDisabled:u,label:r.label,labelStyle:j,htmlFor:`${b}.${r.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:k,backgroundColor:"inherit",...j}}):r.label]},`${r.value}_${S}`)});Bo.displayName="CheckBoxWithLabel";const _l=({event:e,value:n,allCheckBoxValues:c,groupLabelCheckBox:r,onChange:p})=>{const h=e.currentTarget.value,i=e.currentTarget.checked,d=r?.value,l=new Set(n);if(h===d){p(i?Array.from(new Set([d,...c])):[]);return}i?l.add(h):l.delete(h);const m=c.every(u=>l.has(u));d!=null&&(m&&!l.has(d)?l.add(d):!m&&l.has(d)&&l.delete(d)),p(Array.from(l))},Bl=a.div`
155
155
  display: flex;
156
156
  flex-direction: column;
157
157
  width: 100%;
158
158
  height: 100%;
159
- `,Bl=a.div`
159
+ `,Pl=a.div`
160
160
  flex: 1;
161
161
  overflow: hidden;
162
162
  `,Nl=a.div`
@@ -224,13 +224,13 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
224
224
  `}
225
225
  `,Wl=a.div`
226
226
  cursor: pointer;
227
- `,Hl=a(ps)`
227
+ `,Hl=a(hs)`
228
228
  height: ${o.sp3};
229
229
  width: ${o.sp3};
230
230
  color: ${e=>e.theme.colors.hero};
231
231
  background-color: ${e=>e.theme.colors.grey4};
232
232
  border-radius: 50%;
233
- `,Ul=a(Ms)`
233
+ `,Ul=a(Os)`
234
234
  height: ${o.sp3};
235
235
  width: ${o.sp3};
236
236
  color: ${e=>e.theme.colors.hero};
@@ -264,12 +264,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
264
264
  align-items: center;
265
265
  justify-content: center;
266
266
  flex-direction: column;
267
- `,oc=a(rr)`
267
+ `,oc=a(ar)`
268
268
  margin-top: ${o.sp2};
269
269
  color: ${e=>e.theme.colors.brandColorJade};
270
- `,ic=a(lr)`
270
+ `,ic=a(rr)`
271
271
  color: ${e=>e.theme.colors.primary};
272
- `,sc=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Xl,{});case"je_schedules":case"reconciliation":return t.jsx(tc,{});case"flux_analysis":return t.jsx(ec,{});case"missing_receipts":default:return t.jsx(Ql,{})}};function St(e){const{title:n,subTitle:c}=e;return t.jsx(Yl,{children:t.jsxs(nc,{children:[t.jsx(sc,{...e}),t.jsx(oc,{children:n}),t.jsx(ic,{children:c})]})})}const{common:{headers:{transactions:ac,jeSchedules:rc,fluxAnalysis:lc,missingReceipts:cc,insights:dc,reconciliation:ci},strings:{empty:Bt}},expenseAutomation:{transactions:{tabs:di,subTitles:{review:{item1:kn,item2:In},autoCategorized:{item1:$n,item2:uc}},searchPlaceholder:hc,allDoneText:pc},jeSchedules:{subTitles:{item1:mc,item2:gc},searchPlaceholder:xc,allDoneText:fc},missingReceipts:{subTitles:yc,searchPlaceholder:Cc,allDoneText:wc},fluxAnalysis:{subTitles:{item1:bc,item2:vc},searchPlaceholder:Sc,emptyPageTexts:{youDidIt:jc,allReviewed:kc}},accountRecon:{review:{allDoneText:ui},reconcile:{allDoneText:Ic},tabs:hi,titles:{item1:$c,item2:Tc},subTitles:{review:{item1:Lc,item2:Tn},reconcile:{item1:Ln,item2:Ac}}}}}=Ie.getLocalizedStrings(),He=(e,n,c,r,p)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:ac,subTitle:[],tabs:[{label:di.review,id:"review",subTitle:[{pre:kn.pre,bold:kn.bold,prefixIconName:kn.prefixIconName,post:kn.post},{pre:In.pre,bold:In.bold,prefixIconName:In.prefixIconName,post:In.post}]},{label:di.autoCategorized,id:"autoCategorized",subTitle:[{pre:$n.pre,bold:$n.bold,prefixIconName:$n.prefixIconName,post:$n.post.replace("#number",n!=null&&n!=0?n.toString():"")},uc]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:hc,allDoneText:pc};case"je_schedules":return{key:"je_schedules",title:rc,subTitle:[mc,gc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:xc,allDoneText:fc};case"missing_receipts":return{key:"missing_receipts",title:cc,subTitle:[yc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Cc,allDoneText:wc};case"flux_analysis":return{key:"flux_analysis",title:lc,subTitle:[bc,vc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Sc,allDoneText:{title:jc,subTitle:kc}};case"month_end_insights":return{key:"month_end_insights",title:dc,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:Bt,allDoneText:{title:Bt,subTitle:Bt}};case"reconciliation":return c==null?{key:"reconciliation",title:ci,subTitle:[$c,Tc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Bt,allDoneText:{title:Bt,subTitle:Bt}}:{key:"reconciliation",title:r??ci,subText:p??void 0,subTitle:[],tabs:[{label:hi.review,id:"review",subTitle:[Lc,{pre:Tn.pre,bold:Tn.bold,prefixIconName:Tn.prefixIconName,post:Tn.post}],allDoneText:ui},{label:hi.reconcile,id:"reconcile",subTitle:[{pre:Ln.pre,bold:Ln.bold,prefixIconName:Ln.prefixIconName,post:Ln.post},Ac],allDoneText:Ic}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:Bt,allDoneText:ui}}},{common:{strings:{empty:Ec}},expenseAutomation:{accountRecon:{reconcile:{header:zt}}}}=Ie.getLocalizedStrings(),Rc={key:"date",value:zt.date,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginLeft:x[4],marginRight:x[3]}},Dc={key:"clearedDate",value:zt.clearedDate,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3],display:"none"}},Oc={key:"type",value:zt.type,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Mc={key:"payee",value:zt.payee,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Fc={key:"account",value:zt.account,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},zc={key:"transactionDirection",value:zt.direction,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},_c={key:"memo",value:zt.memo,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Pc={key:"amount",value:zt.amount,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Bc={key:"recommended",value:Ec,sortOrder:"ascending",width:new Z(1.25,1.25,1.25),customStyle:{marginRight:x[4],marginLeft:x[0]}},Fe=[Rc,Dc,Oc,Mc,Fc,zc,_c,Pc,Bc],Nc=50,dn={sortKey:"date",sortOrder:"descending"};function Vc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const c=ke(),[r,p]=s.useState(So(Fe));s.useEffect(()=>{const d=[...r];for(const l of d)l.key===e.sortKey?l.sortOrder=e.sortOrder:l.sortOrder="ascending";p(d)},[e.sortKey,e.sortOrder]);const h=(d,l)=>{let m=l;e.sortKey===d&&(m=l==="ascending"?"descending":"ascending"),n(d,m)},i=d=>{h(d.key,d.sortOrder)};return t.jsx(qc,{headerHeight:Nc,children:r.map(d=>t.jsx(Hc,{columnWidth:d.width,windowSize:c,sortDataValue:e.sortKey,actualDataValue:d.key,style:d.customStyle,children:t.jsxs(Yc,{isVisible:d.key!=="recommended",children:[t.jsx(Uc,{"data-testid":z("reconcile-tab-list-sort",d.value),onClick:()=>i(d),children:t.jsx(gt,{children:d.value})}),t.jsx(Kc,{sortConfig:e,headerData:d,children:t.jsx(Jc,{})}),t.jsx(Gc,{isVisible:e.sortKey===d.key&&(e.sortKey!==dn.sortKey||e.sortOrder!==dn.sortOrder),children:t.jsx(Zc,{"data-testid":z("reconcile-tab-list-reset-sort",dn.sortKey),onClick:()=>n(dn.sortKey,dn.sortOrder)})})]})},d.key))})}const Wc=Vr.memo(Vc),Hc=a.div`
272
+ `,sc=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Xl,{});case"je_schedules":case"reconciliation":return t.jsx(tc,{});case"flux_analysis":return t.jsx(ec,{});case"missing_receipts":default:return t.jsx(Ql,{})}};function St(e){const{title:n,subTitle:c}=e;return t.jsx(Yl,{children:t.jsxs(nc,{children:[t.jsx(sc,{...e}),t.jsx(oc,{children:n}),t.jsx(ic,{children:c})]})})}const{common:{headers:{transactions:ac,jeSchedules:rc,fluxAnalysis:lc,missingReceipts:cc,insights:dc,reconciliation:li},strings:{empty:Pt}},expenseAutomation:{transactions:{tabs:ci,subTitles:{review:{item1:jn,item2:kn},autoCategorized:{item1:In,item2:uc}},searchPlaceholder:hc,allDoneText:pc},jeSchedules:{subTitles:{item1:mc,item2:gc},searchPlaceholder:xc,allDoneText:fc},missingReceipts:{subTitles:yc,searchPlaceholder:Cc,allDoneText:wc},fluxAnalysis:{subTitles:{item1:bc,item2:vc},searchPlaceholder:Sc,emptyPageTexts:{youDidIt:jc,allReviewed:kc}},accountRecon:{review:{allDoneText:di},reconcile:{allDoneText:Ic},tabs:ui,titles:{item1:$c,item2:Tc},subTitles:{review:{item1:Lc,item2:$n},reconcile:{item1:Tn,item2:Ac}}}}}=Ie.getLocalizedStrings(),He=(e,n,c,r,p)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:ac,subTitle:[],tabs:[{label:ci.review,id:"review",subTitle:[{pre:jn.pre,bold:jn.bold,prefixIconName:jn.prefixIconName,post:jn.post},{pre:kn.pre,bold:kn.bold,prefixIconName:kn.prefixIconName,post:kn.post}]},{label:ci.autoCategorized,id:"autoCategorized",subTitle:[{pre:In.pre,bold:In.bold,prefixIconName:In.prefixIconName,post:In.post.replace("#number",n!=null&&n!=0?n.toString():"")},uc]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:hc,allDoneText:pc};case"je_schedules":return{key:"je_schedules",title:rc,subTitle:[mc,gc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:xc,allDoneText:fc};case"missing_receipts":return{key:"missing_receipts",title:cc,subTitle:[yc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Cc,allDoneText:wc};case"flux_analysis":return{key:"flux_analysis",title:lc,subTitle:[bc,vc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Sc,allDoneText:{title:jc,subTitle:kc}};case"month_end_insights":return{key:"month_end_insights",title:dc,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:Pt,allDoneText:{title:Pt,subTitle:Pt}};case"reconciliation":return c==null?{key:"reconciliation",title:li,subTitle:[$c,Tc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Pt,allDoneText:{title:Pt,subTitle:Pt}}:{key:"reconciliation",title:r??li,subText:p??void 0,subTitle:[],tabs:[{label:ui.review,id:"review",subTitle:[Lc,{pre:$n.pre,bold:$n.bold,prefixIconName:$n.prefixIconName,post:$n.post}],allDoneText:di},{label:ui.reconcile,id:"reconcile",subTitle:[{pre:Tn.pre,bold:Tn.bold,prefixIconName:Tn.prefixIconName,post:Tn.post},Ac],allDoneText:Ic}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:Pt,allDoneText:di}}},{common:{strings:{empty:Ec}},expenseAutomation:{accountRecon:{reconcile:{header:zt}}}}=Ie.getLocalizedStrings(),Rc={key:"date",value:zt.date,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginLeft:x[4],marginRight:x[3]}},Dc={key:"clearedDate",value:zt.clearedDate,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3],display:"none"}},Oc={key:"type",value:zt.type,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Mc={key:"payee",value:zt.payee,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Fc={key:"account",value:zt.account,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},zc={key:"transactionDirection",value:zt.direction,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},_c={key:"memo",value:zt.memo,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Bc={key:"amount",value:zt.amount,sortOrder:"ascending",width:new Z(12.75,12.75,12.75),customStyle:{marginRight:x[3]}},Pc={key:"recommended",value:Ec,sortOrder:"ascending",width:new Z(1.25,1.25,1.25),customStyle:{marginRight:x[4],marginLeft:x[0]}},Fe=[Rc,Dc,Oc,Mc,Fc,zc,_c,Bc,Pc],Nc=50,dn={sortKey:"date",sortOrder:"descending"};function Vc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const c=ke(),[r,p]=s.useState(vo(Fe));s.useEffect(()=>{const d=[...r];for(const l of d)l.key===e.sortKey?l.sortOrder=e.sortOrder:l.sortOrder="ascending";p(d)},[e.sortKey,e.sortOrder]);const h=(d,l)=>{let m=l;e.sortKey===d&&(m=l==="ascending"?"descending":"ascending"),n(d,m)},i=d=>{h(d.key,d.sortOrder)};return t.jsx(qc,{headerHeight:Nc,children:r.map(d=>t.jsx(Hc,{columnWidth:d.width,windowSize:c,sortDataValue:e.sortKey,actualDataValue:d.key,style:d.customStyle,children:t.jsxs(Yc,{isVisible:d.key!=="recommended",children:[t.jsx(Uc,{"data-testid":z("reconcile-tab-list-sort",d.value),onClick:()=>i(d),children:t.jsx(gt,{children:d.value})}),t.jsx(Kc,{sortConfig:e,headerData:d,children:t.jsx(Jc,{})}),t.jsx(Gc,{isVisible:e.sortKey===d.key&&(e.sortKey!==dn.sortKey||e.sortOrder!==dn.sortOrder),children:t.jsx(Zc,{"data-testid":z("reconcile-tab-list-reset-sort",dn.sortKey),onClick:()=>n(dn.sortKey,dn.sortOrder)})})]})},d.key))})}const Wc=Vr.memo(Vc),Hc=a.div`
273
273
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
274
274
  :hover {
275
275
  color: ${e=>e.theme.colors.primary};
@@ -303,7 +303,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
303
303
  align-items: center;
304
304
  transform: ${e=>e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
305
305
  ${e=>e.headerData.sortOrder==="ascending"?"padding-top: 2px":"padding-bottom: 2px"};
306
- `,Jc=a(Wn)`
306
+ `,Jc=a(Vn)`
307
307
  width: ${o.sp2};
308
308
  height: ${o.sp2};
309
309
  `,Gc=a.div`
@@ -315,12 +315,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
315
315
  &:hover {
316
316
  color: ${e=>e.theme.colors.primary};
317
317
  }
318
- `,Zc=a(Hn)`
318
+ `,Zc=a(Wn)`
319
319
  width: 12px;
320
320
  height: 12px;
321
321
  `,Yc=a.div`
322
322
  display: ${e=>e.isVisible?"flex":"none"};
323
- `,Xc=54,Qc=72,{common:{strings:{hyphen:Xn}}}=Ie.getLocalizedStrings(),{dateFormat:pi}=Ie.getLocalizedStrings();function ed({selectedTransactionIds:e,transaction:n,transactionId:c}){const r=ke(),p=kt(),[h,i]=s.useState(!1),d=e.includes(c),l=h||d;return t.jsx(td,{id:c,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:t.jsxs(nd,{isSelected:l,totalHeight:Xc,children:[t.jsx(yt,{windowSize:r,responsiveWidth:Fe[0].width,style:Fe[0].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.date.format(pi.visual.MMMDCommaYYYYformat)})}),Fe[1].customStyle.display!=="none"?t.jsx(yt,{windowSize:r,responsiveWidth:Fe[1].width,style:Fe[1].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.clearedDate!=null?n.clearedDate.format(pi.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Xn})})}):null,t.jsx(yt,{windowSize:r,style:Fe[2].customStyle,responsiveWidth:Fe[2].width,children:t.jsx(sd,{isSelected:l,children:t.jsx(od,{isSelected:l,children:jr(n.type)})})}),t.jsx(yt,{windowSize:r,style:Fe[3].customStyle,responsiveWidth:Fe[3].width,children:n.merchantName!=null&&n.merchantName.length>0?t.jsx(it,{text:n.merchantName,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}}):t.jsx(Nt,{isSelected:l,children:t.jsx("span",{children:Xn})})}),t.jsx(yt,{windowSize:r,style:Fe[4].customStyle,responsiveWidth:Fe[4].width,children:n.accountName!=null&&n.accountName.length>0?t.jsx(it,{text:n.accountName,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}}):t.jsx(Nt,{isSelected:l,children:t.jsx("span",{children:Xn})})}),t.jsx(yt,{windowSize:r,style:Fe[5].customStyle,responsiveWidth:Fe[5].width,children:t.jsx(Nt,{isSelected:l,style:{textTransform:"capitalize"},children:n.transactionDirection})}),t.jsx(yt,{windowSize:r,style:Fe[6].customStyle,responsiveWidth:Fe[6].width,children:t.jsx(it,{text:n.memo,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}})}),t.jsx(yt,{windowSize:r,style:Fe[7].customStyle,responsiveWidth:Fe[7].width,children:t.jsx(Nt,{isSelected:l,children:Je("0,0.[00]",n.amount)})}),t.jsx(yt,{windowSize:r,responsiveWidth:Fe[8].width,style:Fe[8].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.isZeniRecommended?t.jsx(id,{}):null})})]})})}const td=a.div`
323
+ `,Xc=54,Qc=72,{common:{strings:{hyphen:Yn}}}=Ie.getLocalizedStrings(),{dateFormat:hi}=Ie.getLocalizedStrings();function ed({selectedTransactionIds:e,transaction:n,transactionId:c}){const r=ke(),p=kt(),[h,i]=s.useState(!1),d=e.includes(c),l=h||d;return t.jsx(td,{id:c,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:t.jsxs(nd,{isSelected:l,totalHeight:Xc,children:[t.jsx(yt,{windowSize:r,responsiveWidth:Fe[0].width,style:Fe[0].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.date.format(hi.visual.MMMDCommaYYYYformat)})}),Fe[1].customStyle.display!=="none"?t.jsx(yt,{windowSize:r,responsiveWidth:Fe[1].width,style:Fe[1].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.clearedDate!=null?n.clearedDate.format(hi.visual.MMMDCommaYYYYformat):t.jsx("span",{children:Yn})})}):null,t.jsx(yt,{windowSize:r,style:Fe[2].customStyle,responsiveWidth:Fe[2].width,children:t.jsx(sd,{isSelected:l,children:t.jsx(od,{isSelected:l,children:jr(n.type)})})}),t.jsx(yt,{windowSize:r,style:Fe[3].customStyle,responsiveWidth:Fe[3].width,children:n.merchantName!=null&&n.merchantName.length>0?t.jsx(it,{text:n.merchantName,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}}):t.jsx(Nt,{isSelected:l,children:t.jsx("span",{children:Yn})})}),t.jsx(yt,{windowSize:r,style:Fe[4].customStyle,responsiveWidth:Fe[4].width,children:n.accountName!=null&&n.accountName.length>0?t.jsx(it,{text:n.accountName,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}}):t.jsx(Nt,{isSelected:l,children:t.jsx("span",{children:Yn})})}),t.jsx(yt,{windowSize:r,style:Fe[5].customStyle,responsiveWidth:Fe[5].width,children:t.jsx(Nt,{isSelected:l,style:{textTransform:"capitalize"},children:n.transactionDirection})}),t.jsx(yt,{windowSize:r,style:Fe[6].customStyle,responsiveWidth:Fe[6].width,children:t.jsx(it,{text:n.memo,itemTextStyle:{color:l?p.colors.primary:p.colors.hero}})}),t.jsx(yt,{windowSize:r,style:Fe[7].customStyle,responsiveWidth:Fe[7].width,children:t.jsx(Nt,{isSelected:l,children:Je("0,0.[00]",n.amount)})}),t.jsx(yt,{windowSize:r,responsiveWidth:Fe[8].width,style:Fe[8].customStyle,children:t.jsx(Nt,{isSelected:l,children:n.isZeniRecommended?t.jsx(id,{}):null})})]})})}const td=a.div`
324
324
  box-sizing: border-box;
325
325
  width: 100%;
326
326
  display: flex;
@@ -347,7 +347,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
347
347
  height: 100%;
348
348
  z-index: auto;
349
349
  position: relative;
350
- `,Nt=a(Pe)`
350
+ `,Nt=a(Be)`
351
351
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
352
352
  span {
353
353
  padding-left: ${o.sp3};
@@ -355,7 +355,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
355
355
  `,od=a(gt)`
356
356
  text-transform: capitalize;
357
357
  color: ${e=>e.isSelected===!0?e.theme.colors.primary:e.theme.colors.hero};
358
- `,id=a(bn)`
358
+ `,id=a(wn)`
359
359
  width: ${o.sp3};
360
360
  height: ${o.sp3};
361
361
  margin-right: ${o.sp1};
@@ -366,14 +366,14 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
366
366
  padding: 1px 6px;
367
367
  border-radius: ${o.sp1};
368
368
  border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
369
- `,ad=Ie.getLocalizedStrings(),{common:{all:mi,strings:{empty:gi}}}=ad,xi="selectedTransactionIds",rd="expenseAutomationBankReconReconcilePage",ld=e=>`${e}_form`;function cd({currentFooterFormId:e,localData:n,matchedTransactions:c,sortConfig:r,onSaveReconciliation:p,selectedAccountId:h,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:l}){const m=Jt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(Wc,{onReconTabColumnSortConfigChanged:i,sortConfig:r}),value:mi.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=c.map(S=>({label:t.jsx(ed,{transaction:S,selectedTransactionIds:n.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),f=[u,...g],y=async S=>{const k=S[xi].filter(C=>C!=mi.toLocaleLowerCase());d(k)};s.useEffect(()=>{const S=m.watch(k=>{k!=null&&wn(()=>y(k))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&l("expenseAutomationBankReconReconcilePage"),()=>{l("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{p({reconcileAction:"reconcile"})},[p]);if(c.length===0){const S=He("reconciliation",void 0,h).tabs.find(k=>k.id==="reconcile")?.allDoneText;return t.jsx(pd,{children:t.jsx(St,{tab:"missing_receipts",title:S?.title??gi,subTitle:S?.subTitle??gi})})}return t.jsx(dd,{children:t.jsx(Gt,{...m,children:t.jsx(ud,{onSubmit:m.handleSubmit(b),id:ld(rd),children:t.jsx(hd,{children:t.jsx(Fl,{name:xi,checkBoxes:f,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Qc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const dd=a.div``,ud=a.form``,hd=a.div`
369
+ `,ad=Ie.getLocalizedStrings(),{common:{all:pi,strings:{empty:mi}}}=ad,gi="selectedTransactionIds",rd="expenseAutomationBankReconReconcilePage",ld=e=>`${e}_form`;function cd({currentFooterFormId:e,localData:n,matchedTransactions:c,sortConfig:r,onSaveReconciliation:p,selectedAccountId:h,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:l}){const m=Jt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(Wc,{onReconTabColumnSortConfigChanged:i,sortConfig:r}),value:pi.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=c.map(S=>({label:t.jsx(ed,{transaction:S,selectedTransactionIds:n.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),f=[u,...g],y=async S=>{const k=S[gi].filter(C=>C!=pi.toLocaleLowerCase());d(k)};s.useEffect(()=>{const S=m.watch(k=>{k!=null&&Cn(()=>y(k))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&l("expenseAutomationBankReconReconcilePage"),()=>{l("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{p({reconcileAction:"reconcile"})},[p]);if(c.length===0){const S=He("reconciliation",void 0,h).tabs.find(k=>k.id==="reconcile")?.allDoneText;return t.jsx(pd,{children:t.jsx(St,{tab:"missing_receipts",title:S?.title??mi,subTitle:S?.subTitle??mi})})}return t.jsx(dd,{children:t.jsx(Gt,{...m,children:t.jsx(ud,{onSubmit:m.handleSubmit(b),id:ld(rd),children:t.jsx(hd,{children:t.jsx(Fl,{name:gi,checkBoxes:f,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Qc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const dd=a.div``,ud=a.form``,hd=a.div`
370
370
  height: calc(100vh - 350px);
371
371
  `,pd=a.div`
372
372
  height: 100%;
373
373
  display: flex;
374
374
  justify-content: center;
375
375
  align-items: center;
376
- `,ko=69,fe={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},qs=a.div`
376
+ `,jo=69,fe={COLUMN_ONE:187,COLUMN_THREE:136,COLUMN_FOUR:240,COLUMN_FIVE:146},Us=a.div`
377
377
  display: flex;
378
378
  flex-direction: column;
379
379
  background-color: ${e=>e.theme.colors.grey4};
@@ -382,25 +382,25 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
382
382
  height: calc(100vh - 500px);
383
383
  overflow-x: scroll;
384
384
  align-items: center;
385
- `,Ks=a.div`
385
+ `,qs=a.div`
386
386
  display: flex;
387
387
  flex-direction: column;
388
388
  gap: ${o.sp5};
389
389
  align-items: flex-start;
390
390
  padding-bottom: ${o.sp9};
391
391
  width: 100%;
392
- `,Js=a.div`
392
+ `,Ks=a.div`
393
393
  width: 100%;
394
- `,Gs=a.div`
394
+ `,Js=a.div`
395
395
  width: 100%;
396
- `,No=a.div`
396
+ `,Po=a.div`
397
397
  display: flex;
398
398
  flex-direction: row;
399
399
  padding: ${o.sp2};
400
400
  padding-right: ${o.sp3};
401
401
  justify-content: space-between;
402
402
  border-bottom: ${e=>`1px solid ${e.theme.colors.grey3}`};
403
- `,Vo=a.div`
403
+ `,No=a.div`
404
404
  display: flex;
405
405
  flex-direction: row;
406
406
  justify-content: space-between;
@@ -415,7 +415,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
415
415
  padding-right: ${o.sp3};
416
416
  `,gd=a.div`
417
417
  padding: ${o.sp2} ${o.sp3};
418
- `,Wo=a.div`
418
+ `,Vo=a.div`
419
419
  display: flex;
420
420
  `,xd=a.div`
421
421
  display: flex;
@@ -426,7 +426,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
426
426
  background-color: ${e=>e.theme.colors.grey3};
427
427
  border-bottom-left-radius: ${o.sp2};
428
428
  border-bottom-right-radius: ${o.sp2};
429
- `,Ho=a.div`
429
+ `,Wo=a.div`
430
430
  display: flex;
431
431
  flex-direction: column;
432
432
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
@@ -477,7 +477,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
477
477
  padding: ${o.sp2} ${o.sp3};
478
478
  `,ae=a(gt)`
479
479
  color: ${e=>e.theme.colors.hero};
480
- `,me=a(Pe)`
480
+ `,me=a(Be)`
481
481
  width: 100%;
482
482
  color: ${e=>e.theme.colors.hero};
483
483
  white-space: nowrap;
@@ -499,7 +499,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
499
499
  }
500
500
  }
501
501
  }
502
- `,Uo=a.div`
502
+ `,Ho=a.div`
503
503
  border-left: ${e=>`1px solid ${e.theme.colors.grey3}`};
504
504
  display: flex;
505
505
  flex-direction: column;
@@ -507,22 +507,22 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
507
507
  align-items: center;
508
508
  justify-content: center;
509
509
  padding: ${o.sp0} 42px;
510
- `,qo=a.div`
510
+ `,Uo=a.div`
511
511
  flex: 1;
512
- `,Zs=a(gt)`
512
+ `,Gs=a(gt)`
513
513
  padding: ${o.sp0} 6px;
514
514
  color: ${Qe.info};
515
515
  border: 1px solid ${Qe.info};
516
516
  border-radius: ${o.sp1};
517
517
  margin-top: ${o.sp1};
518
- `,zn=a(It)`
518
+ `,Fn=a(It)`
519
519
  padding: ${o.sp2};
520
520
  color: ${e=>e.theme.colors.hero};
521
521
  background: ${e=>e.theme.colors.overlayColor};
522
522
  border-radius: ${o.sp1};
523
- `,Ke=a(zn)`
523
+ `,Ke=a(Fn)`
524
524
  padding: 2px ${o.sp2};
525
- `,Rt=Ie.getLocalizedStrings().expenseAutomation.accountRecon.review.header,vt=[{key:"date",value:Rt.date,sortOrder:"ascending",width:new Z(20,20),loaderWidth:120},{key:"payee",value:Rt.payee,sortOrder:"ascending",width:new Z(20,20),loaderWidth:212},{key:"memo",value:Rt.memo,sortOrder:"ascending",width:new Z(20,20),loaderWidth:192},{key:"direction",value:Rt.direction,sortOrder:"ascending",width:new Z(15,15),loaderWidth:84},{key:"match",value:Rt.match,sortOrder:"ascending",width:new Z(15,15),loaderWidth:152},{key:"amount",value:Rt.amount,sortOrder:"ascending",width:new Z(10,10),loaderWidth:64}],Io=[{key:"payee",value:Rt.payee,sortOrder:"ascending",width:new Z(65,65),loaderWidth:212},{key:"amount",value:Rt.amount,sortOrder:"ascending",width:new Z(30,30),loaderWidth:64}],fd=e=>{const{sortConfig:n,onColumnSortConfigChanged:c}=e,r=ke(),p=Ft()?Io:vt,[h,i]=s.useState(()=>p.map(l=>({...l,sortOrder:l.key===n.sortKey?n.sortOrder:"ascending"})));s.useEffect(()=>{i(p.map(l=>({...l,sortOrder:l.key===n.sortKey?n.sortOrder:"ascending"})))},[n.sortKey,n.sortOrder,p]);const d=(l,m)=>{let u=m;n.sortKey===l&&(u=m==="ascending"?"descending":"ascending"),c(l,u)};return t.jsx(Cd,{children:h.map(l=>t.jsxs(wd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:r,isLastColumn:l.key==="amount",children:[t.jsxs(bd,{"data-testid":z("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>d(l.key,l.sortOrder),children:[t.jsx(gt,{children:l.value}),t.jsx(vd,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(Sd,{})})]}),t.jsx(jd,{sortDataValue:n.sortKey,windowSize:r,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(kd,{"data-testid":z("account-reconciliation-review-sort-by-date"),onClick:()=>d("date","ascending")})})]},l.key))})},yd=s.memo(fd),Cd=a(It)`
525
+ `,Rt=Ie.getLocalizedStrings().expenseAutomation.accountRecon.review.header,vt=[{key:"date",value:Rt.date,sortOrder:"ascending",width:new Z(20,20),loaderWidth:120},{key:"payee",value:Rt.payee,sortOrder:"ascending",width:new Z(20,20),loaderWidth:212},{key:"memo",value:Rt.memo,sortOrder:"ascending",width:new Z(20,20),loaderWidth:192},{key:"direction",value:Rt.direction,sortOrder:"ascending",width:new Z(15,15),loaderWidth:84},{key:"match",value:Rt.match,sortOrder:"ascending",width:new Z(15,15),loaderWidth:152},{key:"amount",value:Rt.amount,sortOrder:"ascending",width:new Z(10,10),loaderWidth:64}],ko=[{key:"payee",value:Rt.payee,sortOrder:"ascending",width:new Z(65,65),loaderWidth:212},{key:"amount",value:Rt.amount,sortOrder:"ascending",width:new Z(30,30),loaderWidth:64}],fd=e=>{const{sortConfig:n,onColumnSortConfigChanged:c}=e,r=ke(),p=Ft()?ko:vt,[h,i]=s.useState(()=>p.map(l=>({...l,sortOrder:l.key===n.sortKey?n.sortOrder:"ascending"})));s.useEffect(()=>{i(p.map(l=>({...l,sortOrder:l.key===n.sortKey?n.sortOrder:"ascending"})))},[n.sortKey,n.sortOrder,p]);const d=(l,m)=>{let u=m;n.sortKey===l&&(u=m==="ascending"?"descending":"ascending"),c(l,u)};return t.jsx(Cd,{children:h.map(l=>t.jsxs(wd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:r,isLastColumn:l.key==="amount",children:[t.jsxs(bd,{"data-testid":z("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>d(l.key,l.sortOrder),children:[t.jsx(gt,{children:l.value}),t.jsx(vd,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(Sd,{})})]}),t.jsx(jd,{sortDataValue:n.sortKey,windowSize:r,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(kd,{"data-testid":z("account-reconciliation-review-sort-by-date"),onClick:()=>d("date","ascending")})})]},l.key))})},yd=s.memo(fd),Cd=a(It)`
526
526
  top: 0;
527
527
  left: 0;
528
528
  width: fit-content;
@@ -561,7 +561,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
561
561
  `:De`
562
562
  padding-bottom: 2px;
563
563
  `}
564
- `,Sd=a(Wn)`
564
+ `,Sd=a(Vn)`
565
565
  width: ${o.sp2};
566
566
  height: ${o.sp2};
567
567
  cursor: pointer;
@@ -570,12 +570,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
570
570
  display: ${e=>e.isVisible?"flex":"none"};
571
571
  align-items: center;
572
572
  padding-top: 2px;
573
- `,kd=a(Hn)`
573
+ `,kd=a(Wn)`
574
574
  width: 12px;
575
575
  height: 12px;
576
576
  cursor: pointer;
577
577
  color: ${e=>e.theme.colors.hero};
578
- `,at="accountReconReviewTableSection",{dateFormat:Id,expenseAutomation:$d,common:pt}=Ie.getLocalizedStrings(),{visual:Ys}=Id,{accountRecon:Ce}=$d,Xs=e=>[{label:Ce.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Qs=e=>[{label:Ce.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],fi=e=>`${at}_${e}_form`,Ee=(e,n)=>`${at}.${e}.${n}`,Td=e=>{const{sortKey:n,sortOrder:c,accountReconEntity:r,entitySearchAutoCompleteActions:p,allAccountList:h,classList:i,localData:d,accountListNestedAccountHierarchy:l,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:g,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,refreshStatus:S,updateLocalData:k,onColumnSortConfigChanged:C,onSaveReconciliation:L,onSaveReconciliationReview:j,onReconMatchedTransactionClick:v,bankAccounts:A,creditCards:T}=e,{transactionsToReview:I,account:{accountType:R}}=r,w=s.useRef(null),[D,V]=s.useState(null),q=N=>{const P=I[N],ie=_s(P),U=Ps(P),re=Bs(P,R??"bank"),oe=Ns(P,R??"bank"),X=Vs(P),se=_o(P),ge=P.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return P.transactionId===D?U||re||oe||X||se?275+(ge?25:0):ie?185+P.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},B=s.useMemo(()=>({onColumnSortConfigChanged:C,sortConfig:{sortKey:n,sortOrder:c}}),[C,n,c]);if(s.useEffect(()=>{V(I[0]?.transactionId??null),w.current?.resetAfterIndex(0)},[n,c]),s.useEffect(()=>{w.current?.resetAfterIndex(0)},[D]),s.useEffect(()=>{w.current?.resetAfterIndex(0)},[I.length]),s.useEffect(()=>{S.fetchState==="Completed"&&w.current?.resetAfterIndex(0)},[S]),I.length===0){const N=He("reconciliation",void 0,u).tabs.find(P=>P.id==="review")?.allDoneText;return t.jsx(Zd,{children:t.jsx(St,{tab:"reconciliation",title:N?.title??pt.strings.empty,subTitle:N?.subTitle??pt.strings.empty})})}return t.jsx(Fd,{children:t.jsx(ea.Provider,{value:B,children:t.jsx(Nn,{children:({height:N,width:P})=>t.jsx(Vn,{width:P,height:N,innerElementType:ta,ref:w,itemCount:I.length,itemSize:q,itemKey:ie=>I[ie].transactionId,overscanCount:wr,itemData:{transactionsList:I,expandedRowId:D,allAccountList:h,classList:i,accountListNestedAccountHierarchy:l,classListNestedAccountHierarchy:m,localData:d,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:p,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,bankAccounts:A,creditCards:T,accountType:R,updateLocalData:k,setExpandedRowId:V,onSaveReconciliation:L,onSaveReconciliationReview:j,onReconMatchedTransactionClick:v},initialScrollOffset:0,children:Ld})})})})},ea=s.createContext(void 0),ta=s.forwardRef((e,n)=>{const{children:c,style:r,...p}=e,h=s.useContext(ea);return t.jsxs(zd,{ref:n,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${o.sp0} ${o.sp8}`},...p,children:[h!=null&&t.jsx(yd,{onColumnSortConfigChanged:h.onColumnSortConfigChanged,sortConfig:h.sortConfig}),t.jsx(_d,{children:c})]})});ta.displayName="Account recon review table inner element type";const Ld=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Oo(),{transactionsList:p,expandedRowId:h,setExpandedRowId:i,entitySearchAutoCompleteActions:d,allAccountList:l,classList:m,localData:u,updateLocalData:g,accountListNestedAccountHierarchy:f,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:b,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:L,saveFetchById:j,reviewTabSelectedVendorByTransactionId:v,bankAccounts:A,creditCards:T,accountType:I}=c,R=p[e],w=r!=null&&r===R.transactionId;return t.jsx(Md,{isPanelSelected:w,style:{...n,width:"100%"},children:t.jsx(Ad,{transaction:R,expandedRowId:h,setExpandedRowId:i,entitySearchAutoCompleteActions:d,accountListNestedAccountHierarchy:f,allAccountList:l,classList:m,localData:u,updateLocalData:g,entitySearchAutoCompleteData:b,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:L,saveFetchById:j,selectedVendor:v[R.transactionId],bankAccounts:A,creditCards:T,accountType:I})})},Ad=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:c,entitySearchAutoCompleteActions:r,allAccountList:p,classList:h,classListNestedAccountHierarchy:i,localData:d,entitySearchAutoCompleteData:l,excludeFetchById:m,saveFetchById:u,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:b,setExpandedRowId:S,updateLocalData:k,onSaveReconciliation:C,onSaveReconciliationReview:L,onReconMatchedTransactionClick:j})=>{const v=n===e.transactionId,A=ke(),T=Ft(),I=d[e.transactionId],R=e.recommendedAction.action==="record_bill_payment",w=e.recommendedAction.action==="record_expense",D=_o(e),V=p.find(N=>N.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),q=N=>N.recommendedAction.recommendedTransactions.length>0&&N.recommendedAction.recommendedTransactions[0].merchantName!=null?N.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,B=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(Rd,{className:"recon-row-card",isCompressedMode:T,isExpanded:v,children:[t.jsxs(Dd,{isExpanded:v,onClick:()=>S(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[T?null:t.jsx(Qt,{windowSize:A,responsiveWidth:vt[0].width,children:t.jsx(Xt,{children:e.transactionDate.format(Ys.MMMDCommaYYYYformat)})}),t.jsx(Qt,{windowSize:A,responsiveWidth:T?Io[0].width:vt[1].width,children:t.jsx(Xt,{children:t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:q(e)})})}),T?null:t.jsxs(t.Fragment,{children:[t.jsx(Qt,{windowSize:A,responsiveWidth:vt[2].width,children:t.jsx(Xt,{children:t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Qt,{windowSize:A,responsiveWidth:vt[3].width,children:t.jsx(Xt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Qt,{windowSize:A,responsiveWidth:vt[4].width,children:[t.jsx(We,{controller:R,children:t.jsx(Yd,{children:t.jsx(Xd,{children:Ce.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(We,{controller:!R,children:t.jsx(Xt,{children:V!=null?t.jsxs(t.Fragment,{children:[t.jsx(na,{}),t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:V.accountName})]}):pt.strings.hyphen})})]})]}),t.jsx(Qt,{windowSize:A,isLastColumn:!0,responsiveWidth:T?Io[1].width:vt[5].width,children:t.jsx(Xt,{children:Fs("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(We,{controller:v&&I!=null,children:[t.jsx(Ed,{onSaveReconciliation:C,onSaveReconciliationReview:L,updateLocalData:k,saveFetchById:u,excludeFetchById:m,localData:I,classListNestedAccountHierarchy:i,allAccountList:p,classList:h,transaction:e,accountListNestedAccountHierarchy:c,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:l,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:b,onReconMatchedTransactionClick:j}),t.jsx(We,{controller:(R||w||D)&&B!=null,children:t.jsx(eu,{children:t.jsxs(tu,{children:[b==="credit_card"?Ce.review.creditCardDetail:Ce.review.bankDetail,pt.strings.colon," ",B]})})})]})]})},Ed=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:c,allAccountList:r,classList:p,classListNestedAccountHierarchy:h,localData:i,entitySearchAutoCompleteData:d,excludeFetchById:l,saveFetchById:m,selectedVendor:u,bankAccounts:g,creditCards:f,accountType:y,updateLocalData:b,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C})=>{const L=kt(),j=Ft(),[v,A]=s.useState(!i.vendor?.id),[T,I]=s.useState(!i.customer?.id),[R,w]=s.useState(i.categoryId==null),[D,V]=s.useState(i.classId==null),[q,B]=s.useState(i.bankAccountId==null),[N,P]=s.useState(i.creditCardId==null),[ie,U]=s.useState(!i.memo),re=_s(e),oe=Ps(e),X=Ns(e,y??"bank"),se=Bs(e,y??"bank"),ge=Vs(e),Y=_o(e),le=s.useMemo(()=>{if(!oe&&!Y)return Ot(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Ot(n,u?.recommendations);const $=r.find(be=>be.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ne=$!=null?{...$,reason:Ce.review.zeniGptRecommendation,min:0,max:0}:void 0;return Ot(n,[{account:ne}])},[oe,Y,u,e.recommendedAction.recommendedTransactions,r,n]),K=s.useMemo(()=>{if(!oe&&!Y)return Fn(h);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Fn(h,u?.recommendations);const $=p.find(be=>be.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ne=$!=null?{...$,reason:Ce.review.zeniGptRecommendation,min:0,max:0}:void 0;return Fn(h,[{class:ne}])},[oe,Y,u,e.recommendedAction.recommendedTransactions,p,h]),M=Jt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>yi(e,i,le,r,K,g,f,d),[e,i,K,r,le,g,f,d]),values:s.useMemo(()=>yi(e,i,le,r,K,g,f,d),[e,i,K,r,le,g,f,d])}),O=async($,ne)=>{$.includes("memo")||b(Ci(ne,e,d,r),e.transactionId,$.includes("vendor"))};s.useEffect(()=>{const $=M.watch((ne,{name:be})=>{be!=null&&ne!=null&&wn(()=>O(be,ne))});return()=>{$.unsubscribe()}});const J=s.useCallback($=>{if(!j){if(oe||ge||Y){if((oe||Y)&&i.vendor==null){A(!1),M.setError(Ee(e.transactionId,"vendor"),{type:"required"});return}if(ge&&i.customer==null){I(!1),M.setError(Ee(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){w(!1),M.setError(Ee(e.transactionId,"category"),{type:"required"});return}}b(Ci($,e,d,r),e.transactionId,!1),k(e.transactionId)}},[j,oe,Y,ge,b,e,d,r,k,i.categoryId,i.vendor,i.customer]),G=M.watch(Ee(e.transactionId,"vendor")),W=M.watch(Ee(e.transactionId,"customer")),E=s.useRef(),_=s.useMemo(()=>oe||Y?"vendor":ge?"customer":null,[oe,Y,ge]),H=($,ne)=>{_!=null&&c.onAutoCompleteInputChange?.($,_),E.current=ne};s.useEffect(()=>{d.entityAutoCompleteView.fetchState==="Completed"&&((oe||Y)&&E.current?.(Ls(d.entityAutoCompleteView)),ge&&E.current?.(Ar(d.entityAutoCompleteView)))},[d.entityAutoCompleteView,ge,oe,Y]);const F=$=>p.filter(ne=>ne.classId===$)[0]?.accountingClassNumber??void 0,he=$=>r.filter(ne=>ne.qboId===$)[0]?.qboId,te=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]),ee=()=>{j||w(!1)},xe=()=>{j||B(!1)},$e=()=>{j||P(!1)};return s.useEffect(()=>{R===!1&&i.categoryId==null&&M.setFocus(Ee(e.transactionId,"category"))},[R]),s.useEffect(()=>{D===!1&&i.classId==null&&M.setFocus(Ee(e.transactionId,"class"))},[D]),s.useEffect(()=>{v===!1&&i.vendor==null&&M.setFocus(Ee(e.transactionId,"vendor"))},[v]),s.useEffect(()=>{T===!1&&i.customer==null&&M.setFocus(Ee(e.transactionId,"customer"))},[T]),s.useEffect(()=>{q===!1&&i.bankAccountId==null&&M.setFocus(Ee(e.transactionId,"bankAccount"))},[q]),s.useEffect(()=>{N===!1&&i.creditCardId==null&&M.setFocus(Ee(e.transactionId,"creditCard"))},[N]),t.jsx(Gt,{...M,children:t.jsx("form",{onSubmit:M.handleSubmit(J),id:fi(e.transactionId),children:t.jsxs(Od,{children:[t.jsxs(Pd,{children:[t.jsxs(Vd,{children:[t.jsxs(Wd,{children:[t.jsx(na,{}),t.jsx(Gn,{label:{label:re?Ce.review.formLabels.match:Ce.review.formLabels.categorize},radioField:{name:Ee(e.transactionId,"match_radio"),id:re?"match":"categorize",value:re?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(We,{controller:!re,children:t.jsxs(t.Fragment,{children:[t.jsx(wi,{}),te.map($=>t.jsx(Gn,{label:{label:Ce.review.formLabels[$]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"recommendedActionType"),id:$,value:$,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},$))]})})]}),t.jsxs(Nd,{children:[t.jsx(fn,{variant:"secondary",size:"small",label:Ce.review.formLabels.exclude,loading:l[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{j||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(fn,{form:fi(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(We,{controller:oe||ge||Y,children:t.jsxs(Qn,{children:[t.jsx(We,{controller:oe||Y,children:t.jsx(bt,{onClickAway:()=>{i.vendor==null&&v===!1&&A(!0)},children:t.jsx(Q,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.vendor}),t.jsx(ce,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:v===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&A(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addVendor]}):t.jsx(vo,{name:Ee(e.transactionId,"vendor"),allowEmpty:!1,placeholder:Ce.review.formLabels.addVendor,valueToId:$=>$,defaultValue:{selectedOption:G?.selectedOption,defaultOptions:G?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:$=>!!$.selectedOption},loadOptions:H})})})]})})})}),t.jsx(We,{controller:ge,children:t.jsx(bt,{onClickAway:()=>{i.customer==null&&T===!1&&I(!0)},children:t.jsx(Q,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.customer}),t.jsx(ce,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:T===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&I(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addCustomer]}):t.jsx(vo,{name:Ee(e.transactionId,"customer"),allowEmpty:!1,placeholder:Ce.review.formLabels.addCustomer,valueToId:$=>$,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:$=>!!$.selectedOption},loadOptions:H})})})]})})})}),t.jsx(bt,{onClickAway:()=>{i.categoryId==null&&R===!1&&w(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.category}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&ee()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"category"),placeholder:Ce.review.formLabels.addCategory,valueToId:$=>he($),defaultValue:{allOptions:le,selectedOption:r.find($=>$.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:An})})})]})})}),t.jsx(bt,{onClickAway:()=>{i.classId==null&&D===!1&&V(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.class}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&V(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addClass]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"class"),placeholder:Ce.review.formLabels.addClass,valueToId:$=>F($),defaultValue:{allOptions:K,selectedOption:i.classId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:An})})})]})})})]})}),t.jsx(We,{controller:re,children:t.jsxs(Hd,{children:[t.jsxs(Ud,{children:[t.jsx("span",{className:"matched-text",children:`${Ce.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),Ce.review.matchesFoundFullInfo]}),t.jsx(Kd,{children:e.recommendedAction.recommendedTransactions.map($=>$.bookTransactionId!=null?t.jsxs(Jd,{children:[t.jsx(Gn,{label:{label:t.jsxs(qd,{children:[t.jsx(Pe,{children:$.date.format(Ys.MMMDCommaYYYYformat)}),t.jsx(Pe,{children:$.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:$.bookTransactionId,value:$.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Qd,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",$.bookTransactionId),onClick:()=>{$.bookTransactionId!=null&&C($.bookTransactionId)},children:[t.jsx(Gd,{children:Fs("0,0.00",$.amount.amount,$.amount.currencySymbol)}),t.jsx(wi,{})]})]},$.bookTransactionId):null)})]})}),t.jsx(We,{controller:X,children:t.jsx(Qn,{children:t.jsx(bt,{onClickAway:()=>{i.bankAccountId==null&&q===!1&&B(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:y==="credit_card"?Ce.review.formLabels.selectAccount:Ce.review.formLabels.transferTo}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:q===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&xe()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.selectAccount]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"bankAccount"),placeholder:Ce.review.formLabels.selectAccount,defaultValue:{allOptions:Xs(g),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:An})})})]})})})})}),t.jsx(We,{controller:se,children:t.jsx(Qn,{children:t.jsx(bt,{onClickAway:()=>{i.creditCardId==null&&N===!1&&P(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ce.review.formLabels.creditCard}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&$e()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.selectCard]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"creditCard"),placeholder:Ce.review.formLabels.selectCard,defaultValue:{allOptions:Qs(f),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:An})})})]})})})})}),t.jsx(We,{controller:!re,children:t.jsx(Bd,{children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ce.review.header.memo}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ie===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&U(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addMemo]}):t.jsx(Er,{name:Ee(e.transactionId,"memo"),placeholder:Ce.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},An={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},yi=(e,n,c,r,p,h,i,d)=>{const l=r.find(m=>m.accountId===n.categoryId);return{[at]:{[e.transactionId]:{category:{selectedOption:l?.qboId,allOptions:c},class:{selectedOption:n?.classId,allOptions:p},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Xs(h)},creditCard:{selectedOption:n?.creditCardId,allOptions:Qs(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:Os(d.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:zr(n?.customer,d.entityAutoCompleteView)}}}}},Ci=(e,n,c,r)=>{const{vendor:p,customer:h}=e[at][n.transactionId];let i;if(p.selectedOption!=null){const l=p.defaultOptions.find(m=>m.value===p.selectedOption);if(l!=null)i={id:p.selectedOption,name:l.label};else{const m=c.entityAutoCompleteView.vendor.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let d;if(h.selectedOption!=null){const l=h.defaultOptions.find(m=>m.value===h.selectedOption);if(l!=null)d={id:h.selectedOption,name:l.label};else{const m=c.entityAutoCompleteView.customer.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(d={id:m.zeniId,name:m.name})}}return{categoryId:r.find(l=>l.qboId===e[at][n.transactionId].category.selectedOption)?.accountId??e[at][n.transactionId].category.selectedOption,classId:e[at][n.transactionId].class.selectedOption,memo:e[at][n.transactionId].memo,matchedTransactionId:e[at][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[at][n.transactionId].bankAccount.selectedOption,creditCardId:e[at][n.transactionId].creditCard.selectedOption,customer:d}},Xt=a(Pe)`
578
+ `,at="accountReconReviewTableSection",{dateFormat:Id,expenseAutomation:$d,common:pt}=Ie.getLocalizedStrings(),{visual:Zs}=Id,{accountRecon:Ce}=$d,Ys=e=>[{label:Ce.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],Xs=e=>[{label:Ce.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],xi=e=>`${at}_${e}_form`,Ee=(e,n)=>`${at}.${e}.${n}`,Td=e=>{const{sortKey:n,sortOrder:c,accountReconEntity:r,entitySearchAutoCompleteActions:p,allAccountList:h,classList:i,localData:d,accountListNestedAccountHierarchy:l,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:g,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,refreshStatus:S,updateLocalData:k,onColumnSortConfigChanged:C,onSaveReconciliation:L,onSaveReconciliationReview:j,onReconMatchedTransactionClick:v,bankAccounts:A,creditCards:T}=e,{transactionsToReview:I,account:{accountType:R}}=r,w=s.useRef(null),[D,V]=s.useState(null),q=N=>{const B=I[N],ie=zs(B),U=_s(B),re=Bs(B,R??"bank"),oe=Ps(B,R??"bank"),X=Ns(B),se=zo(B),ge=B.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return B.transactionId===D?U||re||oe||X||se?275+(ge?25:0):ie?185+B.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},P=s.useMemo(()=>({onColumnSortConfigChanged:C,sortConfig:{sortKey:n,sortOrder:c}}),[C,n,c]);if(s.useEffect(()=>{V(I[0]?.transactionId??null),w.current?.resetAfterIndex(0)},[n,c]),s.useEffect(()=>{w.current?.resetAfterIndex(0)},[D]),s.useEffect(()=>{w.current?.resetAfterIndex(0)},[I.length]),s.useEffect(()=>{S.fetchState==="Completed"&&w.current?.resetAfterIndex(0)},[S]),I.length===0){const N=He("reconciliation",void 0,u).tabs.find(B=>B.id==="review")?.allDoneText;return t.jsx(Zd,{children:t.jsx(St,{tab:"reconciliation",title:N?.title??pt.strings.empty,subTitle:N?.subTitle??pt.strings.empty})})}return t.jsx(Fd,{children:t.jsx(Qs.Provider,{value:P,children:t.jsx(Pn,{children:({height:N,width:B})=>t.jsx(Nn,{width:B,height:N,innerElementType:ea,ref:w,itemCount:I.length,itemSize:q,itemKey:ie=>I[ie].transactionId,overscanCount:wr,itemData:{transactionsList:I,expandedRowId:D,allAccountList:h,classList:i,accountListNestedAccountHierarchy:l,classListNestedAccountHierarchy:m,localData:d,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:p,excludeFetchById:f,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,bankAccounts:A,creditCards:T,accountType:R,updateLocalData:k,setExpandedRowId:V,onSaveReconciliation:L,onSaveReconciliationReview:j,onReconMatchedTransactionClick:v},initialScrollOffset:0,children:Ld})})})})},Qs=s.createContext(void 0),ea=s.forwardRef((e,n)=>{const{children:c,style:r,...p}=e,h=s.useContext(Qs);return t.jsxs(zd,{ref:n,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${o.sp0} ${o.sp8}`},...p,children:[h!=null&&t.jsx(yd,{onColumnSortConfigChanged:h.onColumnSortConfigChanged,sortConfig:h.sortConfig}),t.jsx(_d,{children:c})]})});ea.displayName="Account recon review table inner element type";const Ld=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Do(),{transactionsList:p,expandedRowId:h,setExpandedRowId:i,entitySearchAutoCompleteActions:d,allAccountList:l,classList:m,localData:u,updateLocalData:g,accountListNestedAccountHierarchy:f,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:b,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:L,saveFetchById:j,reviewTabSelectedVendorByTransactionId:v,bankAccounts:A,creditCards:T,accountType:I}=c,R=p[e],w=r!=null&&r===R.transactionId;return t.jsx(Md,{isPanelSelected:w,style:{...n,width:"100%"},children:t.jsx(Ad,{transaction:R,expandedRowId:h,setExpandedRowId:i,entitySearchAutoCompleteActions:d,accountListNestedAccountHierarchy:f,allAccountList:l,classList:m,localData:u,updateLocalData:g,entitySearchAutoCompleteData:b,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C,excludeFetchById:L,saveFetchById:j,selectedVendor:v[R.transactionId],bankAccounts:A,creditCards:T,accountType:I})})},Ad=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:c,entitySearchAutoCompleteActions:r,allAccountList:p,classList:h,classListNestedAccountHierarchy:i,localData:d,entitySearchAutoCompleteData:l,excludeFetchById:m,saveFetchById:u,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:b,setExpandedRowId:S,updateLocalData:k,onSaveReconciliation:C,onSaveReconciliationReview:L,onReconMatchedTransactionClick:j})=>{const v=n===e.transactionId,A=ke(),T=Ft(),I=d[e.transactionId],R=e.recommendedAction.action==="record_bill_payment",w=e.recommendedAction.action==="record_expense",D=zo(e),V=p.find(N=>N.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),q=N=>N.recommendedAction.recommendedTransactions.length>0&&N.recommendedAction.recommendedTransactions[0].merchantName!=null?N.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,P=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(Rd,{className:"recon-row-card",isCompressedMode:T,isExpanded:v,children:[t.jsxs(Dd,{isExpanded:v,onClick:()=>S(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[T?null:t.jsx(Qt,{windowSize:A,responsiveWidth:vt[0].width,children:t.jsx(Xt,{children:e.transactionDate.format(Zs.MMMDCommaYYYYformat)})}),t.jsx(Qt,{windowSize:A,responsiveWidth:T?ko[0].width:vt[1].width,children:t.jsx(Xt,{children:t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:q(e)})})}),T?null:t.jsxs(t.Fragment,{children:[t.jsx(Qt,{windowSize:A,responsiveWidth:vt[2].width,children:t.jsx(Xt,{children:t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Qt,{windowSize:A,responsiveWidth:vt[3].width,children:t.jsx(Xt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Qt,{windowSize:A,responsiveWidth:vt[4].width,children:[t.jsx(We,{controller:R,children:t.jsx(Yd,{children:t.jsx(Xd,{children:Ce.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(We,{controller:!R,children:t.jsx(Xt,{children:V!=null?t.jsxs(t.Fragment,{children:[t.jsx(ta,{}),t.jsx(it,{itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"},text:V.accountName})]}):pt.strings.hyphen})})]})]}),t.jsx(Qt,{windowSize:A,isLastColumn:!0,responsiveWidth:T?ko[1].width:vt[5].width,children:t.jsx(Xt,{children:Ms("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(We,{controller:v&&I!=null,children:[t.jsx(Ed,{onSaveReconciliation:C,onSaveReconciliationReview:L,updateLocalData:k,saveFetchById:u,excludeFetchById:m,localData:I,classListNestedAccountHierarchy:i,allAccountList:p,classList:h,transaction:e,accountListNestedAccountHierarchy:c,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:l,selectedVendor:g,bankAccounts:f,creditCards:y,accountType:b,onReconMatchedTransactionClick:j}),t.jsx(We,{controller:(R||w||D)&&P!=null,children:t.jsx(eu,{children:t.jsxs(tu,{children:[b==="credit_card"?Ce.review.creditCardDetail:Ce.review.bankDetail,pt.strings.colon," ",P]})})})]})]})},Ed=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:c,allAccountList:r,classList:p,classListNestedAccountHierarchy:h,localData:i,entitySearchAutoCompleteData:d,excludeFetchById:l,saveFetchById:m,selectedVendor:u,bankAccounts:g,creditCards:f,accountType:y,updateLocalData:b,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:C})=>{const L=kt(),j=Ft(),[v,A]=s.useState(!i.vendor?.id),[T,I]=s.useState(!i.customer?.id),[R,w]=s.useState(i.categoryId==null),[D,V]=s.useState(i.classId==null),[q,P]=s.useState(i.bankAccountId==null),[N,B]=s.useState(i.creditCardId==null),[ie,U]=s.useState(!i.memo),re=zs(e),oe=_s(e),X=Ps(e,y??"bank"),se=Bs(e,y??"bank"),ge=Ns(e),Y=zo(e),le=s.useMemo(()=>{if(!oe&&!Y)return Ot(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Ot(n,u?.recommendations);const $=r.find(be=>be.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ne=$!=null?{...$,reason:Ce.review.zeniGptRecommendation,min:0,max:0}:void 0;return Ot(n,[{account:ne}])},[oe,Y,u,e.recommendedAction.recommendedTransactions,r,n]),K=s.useMemo(()=>{if(!oe&&!Y)return Mn(h);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Mn(h,u?.recommendations);const $=p.find(be=>be.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ne=$!=null?{...$,reason:Ce.review.zeniGptRecommendation,min:0,max:0}:void 0;return Mn(h,[{class:ne}])},[oe,Y,u,e.recommendedAction.recommendedTransactions,p,h]),M=Jt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>fi(e,i,le,r,K,g,f,d),[e,i,K,r,le,g,f,d]),values:s.useMemo(()=>fi(e,i,le,r,K,g,f,d),[e,i,K,r,le,g,f,d])}),O=async($,ne)=>{$.includes("memo")||b(yi(ne,e,d,r),e.transactionId,$.includes("vendor"))};s.useEffect(()=>{const $=M.watch((ne,{name:be})=>{be!=null&&ne!=null&&Cn(()=>O(be,ne))});return()=>{$.unsubscribe()}});const J=s.useCallback($=>{if(!j){if(oe||ge||Y){if((oe||Y)&&i.vendor==null){A(!1),M.setError(Ee(e.transactionId,"vendor"),{type:"required"});return}if(ge&&i.customer==null){I(!1),M.setError(Ee(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){w(!1),M.setError(Ee(e.transactionId,"category"),{type:"required"});return}}b(yi($,e,d,r),e.transactionId,!1),k(e.transactionId)}},[j,oe,Y,ge,b,e,d,r,k,i.categoryId,i.vendor,i.customer]),G=M.watch(Ee(e.transactionId,"vendor")),W=M.watch(Ee(e.transactionId,"customer")),E=s.useRef(),_=s.useMemo(()=>oe||Y?"vendor":ge?"customer":null,[oe,Y,ge]),H=($,ne)=>{_!=null&&c.onAutoCompleteInputChange?.($,_),E.current=ne};s.useEffect(()=>{d.entityAutoCompleteView.fetchState==="Completed"&&((oe||Y)&&E.current?.(Ts(d.entityAutoCompleteView)),ge&&E.current?.(Ar(d.entityAutoCompleteView)))},[d.entityAutoCompleteView,ge,oe,Y]);const F=$=>p.filter(ne=>ne.classId===$)[0]?.accountingClassNumber??void 0,he=$=>r.filter(ne=>ne.qboId===$)[0]?.qboId,te=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]),ee=()=>{j||w(!1)},xe=()=>{j||P(!1)},$e=()=>{j||B(!1)};return s.useEffect(()=>{R===!1&&i.categoryId==null&&M.setFocus(Ee(e.transactionId,"category"))},[R]),s.useEffect(()=>{D===!1&&i.classId==null&&M.setFocus(Ee(e.transactionId,"class"))},[D]),s.useEffect(()=>{v===!1&&i.vendor==null&&M.setFocus(Ee(e.transactionId,"vendor"))},[v]),s.useEffect(()=>{T===!1&&i.customer==null&&M.setFocus(Ee(e.transactionId,"customer"))},[T]),s.useEffect(()=>{q===!1&&i.bankAccountId==null&&M.setFocus(Ee(e.transactionId,"bankAccount"))},[q]),s.useEffect(()=>{N===!1&&i.creditCardId==null&&M.setFocus(Ee(e.transactionId,"creditCard"))},[N]),t.jsx(Gt,{...M,children:t.jsx("form",{onSubmit:M.handleSubmit(J),id:xi(e.transactionId),children:t.jsxs(Od,{children:[t.jsxs(Bd,{children:[t.jsxs(Vd,{children:[t.jsxs(Wd,{children:[t.jsx(ta,{}),t.jsx(Jn,{label:{label:re?Ce.review.formLabels.match:Ce.review.formLabels.categorize},radioField:{name:Ee(e.transactionId,"match_radio"),id:re?"match":"categorize",value:re?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(We,{controller:!re,children:t.jsxs(t.Fragment,{children:[t.jsx(Ci,{}),te.map($=>t.jsx(Jn,{label:{label:Ce.review.formLabels[$]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"recommendedActionType"),id:$,value:$,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},$))]})})]}),t.jsxs(Nd,{children:[t.jsx(fn,{variant:"secondary",size:"small",label:Ce.review.formLabels.exclude,loading:l[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{j||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(fn,{form:xi(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(We,{controller:oe||ge||Y,children:t.jsxs(Xn,{children:[t.jsx(We,{controller:oe||Y,children:t.jsx(bt,{onClickAway:()=>{i.vendor==null&&v===!1&&A(!0)},children:t.jsx(Q,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.vendor}),t.jsx(ce,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:v===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&A(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addVendor]}):t.jsx(bo,{name:Ee(e.transactionId,"vendor"),allowEmpty:!1,placeholder:Ce.review.formLabels.addVendor,valueToId:$=>$,defaultValue:{selectedOption:G?.selectedOption,defaultOptions:G?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:$=>!!$.selectedOption},loadOptions:H})})})]})})})}),t.jsx(We,{controller:ge,children:t.jsx(bt,{onClickAway:()=>{i.customer==null&&T===!1&&I(!0)},children:t.jsx(Q,{style:{flex:1,padding:x[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.customer}),t.jsx(ce,{style:{gap:x[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:T===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&I(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addCustomer]}):t.jsx(bo,{name:Ee(e.transactionId,"customer"),allowEmpty:!1,placeholder:Ce.review.formLabels.addCustomer,valueToId:$=>$,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:$=>!!$.selectedOption},loadOptions:H})})})]})})})}),t.jsx(bt,{onClickAway:()=>{i.categoryId==null&&R===!1&&w(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.category}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&ee()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"category"),placeholder:Ce.review.formLabels.addCategory,valueToId:$=>he($),defaultValue:{allOptions:le,selectedOption:r.find($=>$.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:Ln})})})]})})}),t.jsx(bt,{onClickAway:()=>{i.classId==null&&D===!1&&V(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:pt.texts.class}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&V(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addClass]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"class"),placeholder:Ce.review.formLabels.addClass,valueToId:$=>F($),defaultValue:{allOptions:K,selectedOption:i.classId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:Ln})})})]})})})]})}),t.jsx(We,{controller:re,children:t.jsxs(Hd,{children:[t.jsxs(Ud,{children:[t.jsx("span",{className:"matched-text",children:`${Ce.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),Ce.review.matchesFoundFullInfo]}),t.jsx(Kd,{children:e.recommendedAction.recommendedTransactions.map($=>$.bookTransactionId!=null?t.jsxs(Jd,{children:[t.jsx(Jn,{label:{label:t.jsxs(qd,{children:[t.jsx(Be,{children:$.date.format(Zs.MMMDCommaYYYYformat)}),t.jsx(Be,{children:$.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Ee(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:$.bookTransactionId,value:$.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Qd,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",$.bookTransactionId),onClick:()=>{$.bookTransactionId!=null&&C($.bookTransactionId)},children:[t.jsx(Gd,{children:Ms("0,0.00",$.amount.amount,$.amount.currencySymbol)}),t.jsx(Ci,{})]})]},$.bookTransactionId):null)})]})}),t.jsx(We,{controller:X,children:t.jsx(Xn,{children:t.jsx(bt,{onClickAway:()=>{i.bankAccountId==null&&q===!1&&P(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:y==="credit_card"?Ce.review.formLabels.selectAccount:Ce.review.formLabels.transferTo}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:q===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&xe()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.selectAccount]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"bankAccount"),placeholder:Ce.review.formLabels.selectAccount,defaultValue:{allOptions:Ys(g),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:Ln})})})]})})})})}),t.jsx(We,{controller:se,children:t.jsx(Xn,{children:t.jsx(bt,{onClickAway:()=>{i.creditCardId==null&&N===!1&&B(!0)},children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ce.review.formLabels.creditCard}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:N===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&$e()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.selectCard]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Ee(e.transactionId,"creditCard"),placeholder:Ce.review.formLabels.selectCard,defaultValue:{allOptions:Xs(f),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:$=>!!$.selectedOption},customStyleConfig:Ln})})})]})})})})}),t.jsx(We,{controller:!re,children:t.jsx(Pd,{children:t.jsx(Q,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ht,{className:"hover-background",children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ce.review.header.memo}),t.jsx(ce,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ie===!0?t.jsxs(me,{onClick:$=>{$.stopPropagation(),!j&&U(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:x[1],color:L.colors.champion,cursor:"pointer"},children:[t.jsx(Vt,{}),Ce.review.formLabels.addMemo]}):t.jsx(Er,{name:Ee(e.transactionId,"memo"),placeholder:Ce.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},Ln={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},fi=(e,n,c,r,p,h,i,d)=>{const l=r.find(m=>m.accountId===n.categoryId);return{[at]:{[e.transactionId]:{category:{selectedOption:l?.qboId,allOptions:c},class:{selectedOption:n?.classId,allOptions:p},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Ys(h)},creditCard:{selectedOption:n?.creditCardId,allOptions:Xs(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:Ds(d.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:zr(n?.customer,d.entityAutoCompleteView)}}}}},yi=(e,n,c,r)=>{const{vendor:p,customer:h}=e[at][n.transactionId];let i;if(p.selectedOption!=null){const l=p.defaultOptions.find(m=>m.value===p.selectedOption);if(l!=null)i={id:p.selectedOption,name:l.label};else{const m=c.entityAutoCompleteView.vendor.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let d;if(h.selectedOption!=null){const l=h.defaultOptions.find(m=>m.value===h.selectedOption);if(l!=null)d={id:h.selectedOption,name:l.label};else{const m=c.entityAutoCompleteView.customer.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(d={id:m.zeniId,name:m.name})}}return{categoryId:r.find(l=>l.qboId===e[at][n.transactionId].category.selectedOption)?.accountId??e[at][n.transactionId].category.selectedOption,classId:e[at][n.transactionId].class.selectedOption,memo:e[at][n.transactionId].memo,matchedTransactionId:e[at][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[at][n.transactionId].bankAccount.selectedOption,creditCardId:e[at][n.transactionId].creditCard.selectedOption,customer:d}},Xt=a(Be)`
579
579
  display: flex;
580
580
  align-items: center;
581
581
  column-gap: ${o.sp1};
@@ -621,7 +621,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
621
621
  box-sizing: border-box;
622
622
  ${e=>e.isPanelSelected===!0&&De`
623
623
  .recon-row-card {
624
- ${Po(e.theme)}
624
+ ${_o(e.theme)}
625
625
  }
626
626
  `}
627
627
  `,Fd=a.div`
@@ -635,7 +635,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
635
635
  display: flex;
636
636
  flex-direction: column;
637
637
  row-gap: ${o.sp3};
638
- `,Pd=a.div`
638
+ `,Bd=a.div`
639
639
  display: flex;
640
640
  flex-direction: row;
641
641
  align-items: center;
@@ -643,12 +643,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
643
643
  padding: 12px ${o.sp3};
644
644
  background-color: ${e=>e.theme.colors.background};
645
645
  border-radius: ${o.sp2};
646
- `,Qn=a.div`
646
+ `,Xn=a.div`
647
647
  display: flex;
648
648
  flex-direction: row;
649
649
  align-items: center;
650
650
  column-gap: ${o.sp3};
651
- `,Bd=a.div`
651
+ `,Pd=a.div`
652
652
  width: 100%;
653
653
  `,Nd=a.div`
654
654
  display: flex;
@@ -665,10 +665,10 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
665
665
  flex-direction: row;
666
666
  align-items: center;
667
667
  column-gap: ${o.sp1};
668
- `,Vt=a(Un)`
668
+ `,Vt=a(Hn)`
669
669
  width: ${o.sp3};
670
670
  height: ${o.sp3};
671
- `,wi=a(_r)`
671
+ `,Ci=a(_r)`
672
672
  width: ${o.sp3};
673
673
  height: ${o.sp3};
674
674
  color: ${e=>e.theme.colors.hero};
@@ -677,11 +677,11 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
677
677
  flex-direction: column;
678
678
  row-gap: ${o.sp3};
679
679
  padding: ${o.sp0} 12px;
680
- `,Ud=a(Pe)`
680
+ `,Ud=a(Be)`
681
681
  color: ${e=>e.theme.colors.primary};
682
682
 
683
683
  .matched-text {
684
- font-weight: ${Ro.bold};
684
+ font-weight: ${Eo.bold};
685
685
  }
686
686
  `,qd=a.div`
687
687
  display: flex;
@@ -698,7 +698,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
698
698
  justify-content: space-between;
699
699
  padding-bottom: ${o.sp2};
700
700
  border-bottom: 1px solid ${e=>e.theme.colors.grey3};
701
- `,Gd=a(Pe)`
701
+ `,Gd=a(Be)`
702
702
  color: ${e=>e.theme.colors.hero};
703
703
  `,Zd=a.div`
704
704
  height: 100%;
@@ -722,14 +722,14 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
722
722
  border-top: 1px solid ${e=>e.theme.colors.grey3};
723
723
  `,tu=a(gt)`
724
724
  color: ${e=>e.theme.colors.hero};
725
- `,na=a(bn)`
725
+ `,ta=a(wn)`
726
726
  width: ${o.sp3};
727
727
  height: ${o.sp3};
728
728
  margin-right: ${o.sp1};
729
729
  path {
730
730
  stroke-width: 2;
731
731
  }
732
- `,nu=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:c,currentFooterFormId:r,entitySearchAutoCompleteActions:p,onUpdateReconcileTabLocalData:h,setCurrentFooterFormId:i,onReconTabColumnSortConfigChanged:d,updateReviewTabLocalData:l,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:b,sortOrder:S}}},selectedReconAccount:k}=e,C=y[c],{transactionFetchState:L}=k??{};return L?.fetchState==="In-Progress"||L?.fetchState==="Not-Started"?t.jsxs(bi,{style:{paddingLeft:x[8],paddingRight:x[8]},children:[t.jsx(ou,{children:vt.map(j=>t.jsx(Mt,{width:j.loaderWidth,height:18},j.key))}),t.jsxs(su,{children:[...Array(3).fill(0).map((j,v)=>t.jsx(iu,{children:vt.map(A=>t.jsx(Mt,{width:A.loaderWidth,height:x[4]},A.key))},`${v}_${j}`))]})]}):t.jsx(bi,{children:e.selectedTab==="reconcile"?t.jsx(cd,{selectedAccountId:c,currentFooterFormId:r,setCurrentFooterFormId:i,onUpdateReconcileTabLocalData:h,onReconTabColumnSortConfigChanged:d,onSaveReconciliation:u,sortConfig:{sortKey:b,sortOrder:S},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:C?.accountReconEntity.transactionsToReconcile}):t.jsx(Td,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[c]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[c].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:l,entitySearchAutoCompleteActions:p,onColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:c,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},bi=a.div`
732
+ `,nu=({reconciliation:e,entitySearchAutoCompleteData:n,selectedAccountId:c,currentFooterFormId:r,entitySearchAutoCompleteActions:p,onUpdateReconcileTabLocalData:h,setCurrentFooterFormId:i,onReconTabColumnSortConfigChanged:d,updateReviewTabLocalData:l,onReconReviewTabColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f})=>{const{accountReconciliationsByAccountID:y,reconciliationTabsState:{reconcile:{uiState:{sortKey:b,sortOrder:S}}},selectedReconAccount:k}=e,C=y[c],{transactionFetchState:L}=k??{};return L?.fetchState==="In-Progress"||L?.fetchState==="Not-Started"?t.jsxs(wi,{style:{paddingLeft:x[8],paddingRight:x[8]},children:[t.jsx(ou,{children:vt.map(j=>t.jsx(Mt,{width:j.loaderWidth,height:18},j.key))}),t.jsxs(su,{children:[...Array(3).fill(0).map((j,v)=>t.jsx(iu,{children:vt.map(A=>t.jsx(Mt,{width:A.loaderWidth,height:x[4]},A.key))},`${v}_${j}`))]})]}):t.jsx(wi,{children:e.selectedTab==="reconcile"?t.jsx(cd,{selectedAccountId:c,currentFooterFormId:r,setCurrentFooterFormId:i,onUpdateReconcileTabLocalData:h,onReconTabColumnSortConfigChanged:d,onSaveReconciliation:u,sortConfig:{sortKey:b,sortOrder:S},localData:e.reconciliationTabsState.reconcile.localData,matchedTransactions:C?.accountReconEntity.transactionsToReconcile}):t.jsx(Td,{localData:e.reconciliationTabsState.review.localData,reviewTabSelectedVendorByTransactionId:e.reviewTabSelectedVendorByTransactionId,refreshStatus:e.accountReconciliationsByAccountID[c]?.refreshStatus??{fetchState:"Not-Started",error:null},accountReconEntity:e.accountReconciliationsByAccountID[c].accountReconEntity,accountListNestedAccountHierarchy:e.accountListNestedAccountHierarchy,classListNestedAccountHierarchy:e.classListNestedAccountHierarchy,allAccountList:e.allAccountList,classList:e.allClassList,bankAccounts:e.bankAccounts,creditCards:e.creditCards,entitySearchAutoCompleteData:n,updateLocalData:l,entitySearchAutoCompleteActions:p,onColumnSortConfigChanged:m,onSaveReconciliation:u,onSaveReconciliationReview:g,onReconMatchedTransactionClick:f,excludeFetchById:e.actionFetchStates.excludeFetchById,saveFetchById:e.actionFetchStates.saveReconciliationReviewFetch,selectedAccountId:c,sortKey:e.reconciliationTabsState.review.uiState.sortKey,sortOrder:e.reconciliationTabsState.review.uiState.sortOrder})})},wi=a.div`
733
733
  width: 100%;
734
734
  height: 100%;
735
735
  `,ou=a.div`
@@ -750,7 +750,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
750
750
  display: flex;
751
751
  gap: ${o.sp3};
752
752
  flex-direction: column;
753
- `;function au({title:e,config:n,nodeId:c}){return{children:[],id:c??mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function ru({account:e,numOfBalances:n,title:c,isLastNode:r,config:p}){const h=mt("ac_group_report",[],c);return{children:[],id:h,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:c,data:e,numOfBalances:n},config:p}}}function lu({title:e,section:n,config:c,numOfBalances:r,nodeId:p}){return{children:[],id:p??mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:r},config:c}}}function vi({section:e,allAccountReconciliations:n,title:c,subTitle:r,isLastNode:p,isTitleRowRequired:h,config:i}){const d=mt("section",[],c),l={children:[],id:d,isLastNode:p,reportElementData:{element:{kind:"section",title:c,data:e,numOfBalances:0},config:i}};if(h){const u=mt("title_string_only",[],c),g={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:c,data:e,numOfBalances:0},config:i}};l.children.push(g)}const m=lu({title:r,section:e,config:i,numOfBalances:0});return l.children.push(m),e.accountIDs.forEach((u,g)=>{const f=n[u],y=ru({account:f,numOfBalances:0,title:f.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:i});l.children.push(y)}),l}function oa({config:e,accountReconForSection:n,nodeId:c}){return{children:[],id:c??mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function cu(e,n){return n?Yn("section")+Yn("total")+e*Yn("ac_group_report"):1/0}const du=(e,n,c,r,p=!0,h="assets")=>{const i=h==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,d=oa({config:n,accountReconForSection:i}),l=[];l.push(d);const m=Array.isArray(c[r])?c[r]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:g}}=Ie.getLocalizedStrings(),f=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=b=>b.filter(S=>!m.includes(S));if(f)[...Array(3)].forEach((b,S)=>{l.push(au({title:`${S}+${g}`,config:n}))});else{const b=y(e.accountReconciliationBySectionID.assets.accountIDs),S=vi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:b},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(l.push(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const k=y(e.accountReconciliationBySectionID.liabilities.accountIDs),C=vi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:k},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});l.push(C)}}return{config:n,headerNodes:p?[d]:[],contentNodes:l}};function uu(e,n,c,r=!1,p="assets"){Object.assign(e.config,c);const h=p==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=oa({config:c,accountReconForSection:h});return{config:c,headerNodes:r?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const $o={wrapperPadding:new Z(x[2],x[2],x[2],x[8]),contentPaddingLeft:new Z(x[2],x[2],x[2],x[2]),contentPaddingRight:new Z(x[2],x[2],x[2],x[2])},hu=a.div`
753
+ `;function au({title:e,config:n,nodeId:c}){return{children:[],id:c??mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function ru({account:e,numOfBalances:n,title:c,isLastNode:r,config:p}){const h=mt("ac_group_report",[],c);return{children:[],id:h,isLastNode:r,reportElementData:{element:{kind:"ac_group_report",title:c,data:e,numOfBalances:n},config:p}}}function lu({title:e,section:n,config:c,numOfBalances:r,nodeId:p}){return{children:[],id:p??mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:r},config:c}}}function bi({section:e,allAccountReconciliations:n,title:c,subTitle:r,isLastNode:p,isTitleRowRequired:h,config:i}){const d=mt("section",[],c),l={children:[],id:d,isLastNode:p,reportElementData:{element:{kind:"section",title:c,data:e,numOfBalances:0},config:i}};if(h){const u=mt("title_string_only",[],c),g={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:c,data:e,numOfBalances:0},config:i}};l.children.push(g)}const m=lu({title:r,section:e,config:i,numOfBalances:0});return l.children.push(m),e.accountIDs.forEach((u,g)=>{const f=n[u],y=ru({account:f,numOfBalances:0,title:f.accountReconEntity.account.accountName,isLastNode:g===e.accountIDs.length-1,config:i});l.children.push(y)}),l}function na({config:e,accountReconForSection:n,nodeId:c}){return{children:[],id:c??mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function cu(e,n){return n?Zn("section")+Zn("total")+e*Zn("ac_group_report"):1/0}const du=(e,n,c,r,p=!0,h="assets")=>{const i=h==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,d=na({config:n,accountReconForSection:i}),l=[];l.push(d);const m=Array.isArray(c[r])?c[r]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:g}}=Ie.getLocalizedStrings(),f=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",y=b=>b.filter(S=>!m.includes(S));if(f)[...Array(3)].forEach((b,S)=>{l.push(au({title:`${S}+${g}`,config:n}))});else{const b=y(e.accountReconciliationBySectionID.assets.accountIDs),S=bi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:b},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(l.push(S),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const k=y(e.accountReconciliationBySectionID.liabilities.accountIDs),C=bi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:k},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});l.push(C)}}return{config:n,headerNodes:p?[d]:[],contentNodes:l}};function uu(e,n,c,r=!1,p="assets"){Object.assign(e.config,c);const h=p==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=na({config:c,accountReconForSection:h});return{config:c,headerNodes:r?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const Io={wrapperPadding:new Z(x[2],x[2],x[2],x[8]),contentPaddingLeft:new Z(x[2],x[2],x[2],x[2]),contentPaddingRight:new Z(x[2],x[2],x[2],x[2])},hu=a.div`
754
754
  display: flex;
755
755
  height: 100%;
756
756
  width: 100%;
@@ -763,23 +763,23 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
763
763
  flex: 1 1 auto;
764
764
  width: 100%;
765
765
  justify-content: center;
766
- padding-left: ${e=>$o.wrapperPadding.valuePx(e.windowSize)};
766
+ padding-left: ${e=>Io.wrapperPadding.valuePx(e.windowSize)};
767
767
  background-color: ${e=>e.theme.colors.grey4};
768
768
  `,mu=a.div`
769
769
  width: 100%;
770
770
  height: 100%;
771
- `,{common:gu}=Ie.getLocalizedStrings();function xu({reconciliation:e,companyId:n,onReload:c,onReviewClicked:r,setOpenDrawerClicked:p,onFetchLinkTokenClick:h,onEstablishConnectionClick:i,onAddStatementClick:d}){const[l,m]=s.useState(void 0),[u,g]=s.useState(void 0),f=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,b=u==="update_account"?y:f,[S,k]=s.useState(b.linkToken??null),[C,L]=s.useState(!1),{useDynamicConfig:j}=bs(),{configValue:v}=j(vs.accountReconGLAccountsConfig),A=s.useCallback(_=>{m(_),g("link_account_no_microdeposit")},[]),T=s.useCallback(_=>{const H=D.current.accountReconciliationsByAccountID[_]?.paymentAccountId;m(_),g("update_account"),h("update_account",H)},[]),I=s.useCallback(_=>{p(_)},[]),R=s.useRef(l),w=s.useRef(u),D=s.useRef(e);s.useEffect(()=>{R.current=l},[l]),s.useEffect(()=>{w.current=u},[u]),s.useEffect(()=>{D.current=e},[e]);const V=s.useCallback(_=>{i(_,R.current??"",w.current),m(void 0),g(void 0),L(!1)},[i]),q=s.useCallback((_,H)=>{_!=null&&console.log("Plaid Connection Error",_,H),m(void 0),g(void 0),L(!1)},[]),{open:B,ready:N}=cr({token:S,onSuccess:V,onExit:q});s.useEffect(()=>{(jo(new Date().toISOString()).isAfter(b.expiration)||b.linkToken==null)&&b.fetchStatus.fetchState==="Not-Started"&&h("link_account_no_microdeposit")},[b.fetchStatus.fetchState]),s.useEffect(()=>{!C&&u!=null&&b.linkToken===S&&b.fetchStatus.fetchState==="Completed"&&N&&L(!0)},[N,S,b.fetchStatus.fetchState,b.linkToken,u,C]),s.useEffect(()=>{b.fetchStatus.fetchState==="Completed"&&b.linkToken!=null&&b.linkToken!==S&&k(b.linkToken)},[b.fetchStatus.fetchState,b.linkToken,S]),s.useEffect(()=>{C&&B()},[C,B]);const[P,ie]=s.useState(void 0),[U,re]=s.useState(void 0),[oe,X]=s.useState("assets"),se=jo("2025-03-31"),ge=1,Y="account_reconciliation",le=ke(),K=kt();Cn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const M=!0,O=Array.isArray(v?.[n])?v[n]:[],J=e.accountReconciliationBySectionID.assets.accountIDs.filter(_=>!O.includes(_)).length,G=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,W=cu(J,G),E=s.useCallback(_=>{const H=_.scrollTop>=W?"liabilities":"assets";H!==oe&&X(H)},[W,oe]);return s.useEffect(()=>{const _={reportId:Y,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:se,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:A,onReconnectClicked:T,onOpenDrawerClicked:I,onStatementAddClicked:d}};if(P==null||!Ss(U,e)){const H=du(e,_,v,n,M,oe);re(e),ie(H)}else{const H=uu(P,e,_,M,oe);ie(H)}},[e,oe]),e.fetchStatus.fetchState==="Error"?t.jsx(hu,{children:t.jsx(dr,{onReload:c,message:gu.errorMessage.somethingWentWrong})}):t.jsx(pu,{windowSize:le,children:P!=null?t.jsx(mu,{windowSize:le,children:t.jsx(Hs,{backgroundColor:new Do(K.colors.grey4),rootNodes:P,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:M,isStickyName:M},treeNodePadding:{left:$o.contentPaddingLeft.value(le),right:$o.contentPaddingRight.value(le)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:E})}):null})}function fu({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:c,reconciliation:r,companyId:p,onReconTabColumnSortConfigChanged:h,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:l,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:S,onSaveReconciliationReview:k,setOpenDrawerClicked:C,onReconMatchedTransactionClick:L}){return r.selectedAccountId==null?t.jsx(xu,{companyId:p,reconciliation:r,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,setOpenDrawerClicked:C,onAddStatementClick:y}):t.jsx(nu,{currentFooterFormId:e,setCurrentFooterFormId:l,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:h,reconciliation:r,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:c,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:n,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:L})}function yu({accountAndClassReport:e,numOfBalances:n,title:c,isLastNode:r,isFirstNode:p,config:h,parentNodeIDs:i,ancestorMetadata:d}){let l="";return e.accountBase&&e.classBase?l=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?l=e.accountBase.accountId:e.classBase&&(l=e.classBase.classId),{children:[],id:mt("flux_vendor_account_class_row",i,l),isLastNode:r,isFirstNode:p,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:c,data:e,metadata:d,numOfBalances:n},config:h}}}function Cu({vendorView:e,numOfBalances:n,title:c,isLastNode:r,config:p,parentNodeIDs:h}){const i=mt("flux_vendor_row",h,e.vendor.id),d={children:[],id:i,isLastNode:r,reportElementData:{element:{kind:"flux_vendor_row",title:c,data:e,numOfBalances:n},config:p}},l=e.vendorAccountsAndClasses;return d.children=l.map((m,u)=>yu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:p,isLastNode:u===l.length-1,isFirstNode:u===0,parentNodeIDs:[...h,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:l.length>1,hasChildren:!1,isLastNode:u===l.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:r,vendorId:e.vendor.id}})),d}function wu({section:e,numOfBalances:n,title:c,isLastNode:r,config:p}){const h=e.sectionId,i={children:[],id:h,isLastNode:r,reportElementData:{element:{kind:"section",title:c,data:e,numOfBalances:n,sectionType:e.sectionId},config:p}},d=(e.vendors??[]).map((l,m)=>Cu({vendorView:l,numOfBalances:n,title:l.vendor.name,isLastNode:m===e.vendors.length-1,config:p,parentNodeIDs:[h]}));return i.children.push(...d),i}function bu({title:e,balances:n,config:c,nodeId:r}){return{children:[],id:r??mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:c}}}function vu({title:e,data:n,isLastNode:c,config:r,numOfBalances:p}){const h=mt("total",[],e);return{children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:p},config:r}}}const{common:En,expenseAutomation:{fluxAnalysis:Su}}=Ie.getLocalizedStrings(),ju=(e,n,c=!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,p=e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],h=Us({balances:p,config:n}),i=[],d=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(d===!0)i.push(bu({title:`${En.loading}`,balances:p,config:n})),[...Array(10)].forEach((m,u)=>{i.push(oi({title:`${u}+${En.loading}`,balances:p,config:n}))});else{if(i.push(h),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const g=sn(u.balancesByMonth);i.push(wu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:g,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:r,title:ku(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?sn(e.totalBalancesAndVariance.balancesByMonth):[],u=vu({title:En.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:r});i.push(u)}l===!0&&[...Array(1)].forEach((m,u)=>{i.push(oi({title:`${u}+${En.loading}`,balances:p,config:n}))})}return{config:n,headerNodes:c&&!d?[h]:[],contentNodes:i}},ku=e=>Su.sectionTitle[e];function Iu(e,n,c,r=!0){Object.assign(e.config,n);const p=$u(c),h=Us({balances:p,config:n});return{config:n,headerNodes:r?[h]:[],contentNodes:[h,...e.contentNodes.slice(1)]}}const $u=e=>e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],To={contentPaddingLeft:new Z(x[0],x[0],x[0]),contentPaddingRight:new Z(x[3],x[3],x[8]),wrapperPadding:new Z(x[3],x[3],x[8])},Tu=a.div`
771
+ `,{common:gu}=Ie.getLocalizedStrings();function xu({reconciliation:e,companyId:n,onReload:c,onReviewClicked:r,setOpenDrawerClicked:p,onFetchLinkTokenClick:h,onEstablishConnectionClick:i,onAddStatementClick:d}){const[l,m]=s.useState(void 0),[u,g]=s.useState(void 0),f=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,b=u==="update_account"?y:f,[S,k]=s.useState(b.linkToken??null),[C,L]=s.useState(!1),{useDynamicConfig:j}=ws(),{configValue:v}=j(bs.accountReconGLAccountsConfig),A=s.useCallback(_=>{m(_),g("link_account_no_microdeposit")},[]),T=s.useCallback(_=>{const H=D.current.accountReconciliationsByAccountID[_]?.paymentAccountId;m(_),g("update_account"),h("update_account",H)},[]),I=s.useCallback(_=>{p(_)},[]),R=s.useRef(l),w=s.useRef(u),D=s.useRef(e);s.useEffect(()=>{R.current=l},[l]),s.useEffect(()=>{w.current=u},[u]),s.useEffect(()=>{D.current=e},[e]);const V=s.useCallback(_=>{i(_,R.current??"",w.current),m(void 0),g(void 0),L(!1)},[i]),q=s.useCallback((_,H)=>{_!=null&&console.log("Plaid Connection Error",_,H),m(void 0),g(void 0),L(!1)},[]),{open:P,ready:N}=lr({token:S,onSuccess:V,onExit:q});s.useEffect(()=>{(So(new Date().toISOString()).isAfter(b.expiration)||b.linkToken==null)&&b.fetchStatus.fetchState==="Not-Started"&&h("link_account_no_microdeposit")},[b.fetchStatus.fetchState]),s.useEffect(()=>{!C&&u!=null&&b.linkToken===S&&b.fetchStatus.fetchState==="Completed"&&N&&L(!0)},[N,S,b.fetchStatus.fetchState,b.linkToken,u,C]),s.useEffect(()=>{b.fetchStatus.fetchState==="Completed"&&b.linkToken!=null&&b.linkToken!==S&&k(b.linkToken)},[b.fetchStatus.fetchState,b.linkToken,S]),s.useEffect(()=>{C&&P()},[C,P]);const[B,ie]=s.useState(void 0),[U,re]=s.useState(void 0),[oe,X]=s.useState("assets"),se=So("2025-03-31"),ge=1,Y="account_reconciliation",le=ke(),K=kt();cr({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const M=!0,O=Array.isArray(v?.[n])?v[n]:[],J=e.accountReconciliationBySectionID.assets.accountIDs.filter(_=>!O.includes(_)).length,G=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,W=cu(J,G),E=s.useCallback(_=>{const H=_.scrollTop>=W?"liabilities":"assets";H!==oe&&X(H)},[W,oe]);return s.useEffect(()=>{const _={reportId:Y,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:se,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:A,onReconnectClicked:T,onOpenDrawerClicked:I,onStatementAddClicked:d}};if(B==null||!vs(U,e)){const H=du(e,_,v,n,M,oe);re(e),ie(H)}else{const H=uu(B,e,_,M,oe);ie(H)}},[e,oe]),e.fetchStatus.fetchState==="Error"?t.jsx(hu,{children:t.jsx(dr,{onReload:c,message:gu.errorMessage.somethingWentWrong})}):t.jsx(pu,{windowSize:le,children:B!=null?t.jsx(mu,{windowSize:le,children:t.jsx(Ws,{backgroundColor:new Ro(K.colors.grey4),rootNodes:B,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:M,isStickyName:M},treeNodePadding:{left:Io.contentPaddingLeft.value(le),right:Io.contentPaddingRight.value(le)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:E})}):null})}function fu({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:c,reconciliation:r,companyId:p,onReconTabColumnSortConfigChanged:h,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:d,setCurrentFooterFormId:l,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:S,onSaveReconciliationReview:k,setOpenDrawerClicked:C,onReconMatchedTransactionClick:L}){return r.selectedAccountId==null?t.jsx(xu,{companyId:p,reconciliation:r,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:g,onEstablishConnectionClick:f,setOpenDrawerClicked:C,onAddStatementClick:y}):t.jsx(nu,{currentFooterFormId:e,setCurrentFooterFormId:l,onUpdateReconcileTabLocalData:d,onReconTabColumnSortConfigChanged:h,reconciliation:r,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:c,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:n,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:k,onReconMatchedTransactionClick:L})}function yu({accountAndClassReport:e,numOfBalances:n,title:c,isLastNode:r,isFirstNode:p,config:h,parentNodeIDs:i,ancestorMetadata:d}){let l="";return e.accountBase&&e.classBase?l=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?l=e.accountBase.accountId:e.classBase&&(l=e.classBase.classId),{children:[],id:mt("flux_vendor_account_class_row",i,l),isLastNode:r,isFirstNode:p,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:c,data:e,metadata:d,numOfBalances:n},config:h}}}function Cu({vendorView:e,numOfBalances:n,title:c,isLastNode:r,config:p,parentNodeIDs:h}){const i=mt("flux_vendor_row",h,e.vendor.id),d={children:[],id:i,isLastNode:r,reportElementData:{element:{kind:"flux_vendor_row",title:c,data:e,numOfBalances:n},config:p}},l=e.vendorAccountsAndClasses;return d.children=l.map((m,u)=>yu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:p,isLastNode:u===l.length-1,isFirstNode:u===0,parentNodeIDs:[...h,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:l.length>1,hasChildren:!1,isLastNode:u===l.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:r,vendorId:e.vendor.id}})),d}function wu({section:e,numOfBalances:n,title:c,isLastNode:r,config:p}){const h=e.sectionId,i={children:[],id:h,isLastNode:r,reportElementData:{element:{kind:"section",title:c,data:e,numOfBalances:n,sectionType:e.sectionId},config:p}},d=(e.vendors??[]).map((l,m)=>Cu({vendorView:l,numOfBalances:n,title:l.vendor.name,isLastNode:m===e.vendors.length-1,config:p,parentNodeIDs:[h]}));return i.children.push(...d),i}function bu({title:e,balances:n,config:c,nodeId:r}){return{children:[],id:r??mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:c}}}function vu({title:e,data:n,isLastNode:c,config:r,numOfBalances:p}){const h=mt("total",[],e);return{children:[],id:h,isLastNode:c,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:p},config:r}}}const{common:An,expenseAutomation:{fluxAnalysis:Su}}=Ie.getLocalizedStrings(),ju=(e,n,c=!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,p=e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],h=Hs({balances:p,config:n}),i=[],d=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(d===!0)i.push(bu({title:`${An.loading}`,balances:p,config:n})),[...Array(10)].forEach((m,u)=>{i.push(ni({title:`${u}+${An.loading}`,balances:p,config:n}))});else{if(i.push(h),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const g=sn(u.balancesByMonth);i.push(wu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:g,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:r,title:ku(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?sn(e.totalBalancesAndVariance.balancesByMonth):[],u=vu({title:An.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:r});i.push(u)}l===!0&&[...Array(1)].forEach((m,u)=>{i.push(ni({title:`${u}+${An.loading}`,balances:p,config:n}))})}return{config:n,headerNodes:c&&!d?[h]:[],contentNodes:i}},ku=e=>Su.sectionTitle[e];function Iu(e,n,c,r=!0){Object.assign(e.config,n);const p=$u(c),h=Hs({balances:p,config:n});return{config:n,headerNodes:r?[h]:[],contentNodes:[h,...e.contentNodes.slice(1)]}}const $u=e=>e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],$o={contentPaddingLeft:new Z(x[0],x[0],x[0]),contentPaddingRight:new Z(x[3],x[3],x[8]),wrapperPadding:new Z(x[3],x[3],x[8])},Tu=a.div`
772
772
  display: flex;
773
773
  position: sticky;
774
774
  width: 100%;
775
775
  justify-content: center;
776
- padding-top: ${e=>To.wrapperPadding.valuePx(e.windowSize)};
776
+ padding-top: ${e=>$o.wrapperPadding.valuePx(e.windowSize)};
777
777
  padding-left: 20px;
778
778
  background-color: ${e=>e.theme.colors.grey4};
779
779
  `,Lu=a.div`
780
780
  width: 100%;
781
781
  height: calc(100vh - ${o.sp11});
782
- `,Au=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:c,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:p,onSortOrderChanged:h,updateNodeCollapsableStatus:i,fetchReimbursementView:d,fetchGeneralExpenseView:l}=e,m=ke(),u=kt(),[g,f]=s.useState(null),[y,b]=s.useState(null),[S,k]=s.useState(null),C=ti([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[L,j]=s.useState(!1),v=Zo(C),A=Zo(n.refreshStatus.fetchState),T=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?l(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},I=()=>Object.keys(n.uiState.collapsableStatus).reduce((B,N)=>(B[N]=n.uiState.collapsableStatus[N],B),{}),R=s.useCallback(B=>{const N=!(n.uiState.collapsableStatus[B]??!0);i({...n.uiState.collapsableStatus,[B]:N})},[n.uiState.collapsableStatus,i]),w=s.useCallback((B,N)=>{let P=n.reviewOperatingExpensesIds;const ie=[];let U=n.selectedSectionIds;const re=n.sections[B].vendors;ie.push(...re.map(X=>X.fluxAnalysisEntityId));let oe=Ws-P.length;N?(ie.forEach(X=>{!P.includes(X)&&oe>0&&(P=[...P,X],oe--)}),U=[...U,B]):(P=P.filter(X=>!ie.includes(X)),U=U.filter(X=>X!==B)),r(P),p(U)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,r,p]),D=s.useCallback(B=>{const N=n.uiState.collapsableStatus[B]===!1;B==="generalExpense"&&!N&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken),R(B)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,d,R]),V=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,q=B=>B<V;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:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:j,onSectionRowClick:D,updateNodeCollapsableStatus:R,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:c,onSectionCheckboxClick:w,onSortOrderChanged:h}};if(g==null||!Ss(y,n)){const N=ju(n,B,!0);b(n),f(N)}else{const N=Iu(g,B,n,!0);f(N)}},[n,y,c,w,D,h,R,r]),t.jsx(Tu,{windowSize:m,children:t.jsx(Lu,{children:g?t.jsx(Hs,{backgroundColor:new Do(u.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:To.contentPaddingLeft.value(m),right:To.contentPaddingRight.value(m)},nodeOpenStatus:I(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:q,itemCount:V,loadMoreItems:T},variableNodeHeightTree:{prevFetchState:v??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:L,setIsSortApplied:j,reducedFetchState:ti([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:A??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:S,setHoveredParentId:k}}):null})})},Eu="expenseAutomationFluxPage",{reports:{common:Ru}}=Ie.getLocalizedStrings(),Du=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:c,markAsReview:r,onReloadPage:p,setCurrentFooterFormId:h,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:d,onUpdateFluxAnalysisUIState:l,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:g})=>{const{fetchStatus:f,reviewOperatingExpensesIds:y,uiState:b}=n;Cn({componentName:"expense_automation.flux_analysis",enabled:f.fetchState==="Completed"});const S=s.useRef(null),k=s.useRef(!1),C=Jt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:Ou(y)}),L=ke();s.useEffect(()=>()=>{h("expenseAutomationPage")},[h]),s.useEffect(()=>{k.current&&S?.current?.scrollLeft!=null&&b.scrollPosition?.scrollLeft!==S.current.scrollLeft&&b.scrollPosition!=null&&l({scrollPosition:{scrollTop:b.scrollPosition?.scrollTop,scrollLeft:S.current.scrollLeft}})},[b.scrollPosition?.scrollLeft,S.current?.scrollLeft,b.scrollPosition,l]),s.useEffect(()=>{h(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,h]);const j=I=>{m(I)},v=I=>{u(e,I)},A=(I,R)=>{l({sortOrder:I,sortKey:R}),c(),g(e,null,!1)},T=()=>{const I=ia(n.sections,y);r(y,I===!0?"review":"unreview",e,!0)};if(f.fetchState==="Error")return t.jsxs(Fu,{children:[t.jsx(zu,{onClick:p,children:t.jsx(Ao,{})}),t.jsx(_u,{children:Ru.failed})]});{const I=w=>{l({collapsableStatus:w})},R=w=>{g(e,w,!0)};return t.jsx(Gt,{...C,children:t.jsx("form",{id:za(Eu),onSubmit:C.handleSubmit(T),style:{height:"100%",width:"100%"},children:t.jsx(Mu,{windowSize:L,children:t.jsx(Au,{fluxView:n,handleRedirectToVendorDetailPage:j,onSortOrderChanged:A,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:I,fetchReimbursementView:R,updateSectionIdsForReview:d,fetchGeneralExpenseView:v,reportId:"flux_analysis_operating_expense"})})})})}},ia=(e,n)=>{const c=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(p=>p.status==="Pending Review");let r;return c.forEach(p=>{n.includes(p.fluxAnalysisEntityId)&&(r=!0)}),r},Ou=e=>({fluxAnalysisRowIds:e}),Mu=a.div`
782
+ `,Au=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:c,updateOperatingExpensesIdsForReview:r,updateSectionIdsForReview:p,onSortOrderChanged:h,updateNodeCollapsableStatus:i,fetchReimbursementView:d,fetchGeneralExpenseView:l}=e,m=ke(),u=kt(),[g,f]=s.useState(null),[y,b]=s.useState(null),[S,k]=s.useState(null),C=ei([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[L,j]=s.useState(!1),v=Go(C),A=Go(n.refreshStatus.fetchState),T=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?l(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},I=()=>Object.keys(n.uiState.collapsableStatus).reduce((P,N)=>(P[N]=n.uiState.collapsableStatus[N],P),{}),R=s.useCallback(P=>{const N=!(n.uiState.collapsableStatus[P]??!0);i({...n.uiState.collapsableStatus,[P]:N})},[n.uiState.collapsableStatus,i]),w=s.useCallback((P,N)=>{let B=n.reviewOperatingExpensesIds;const ie=[];let U=n.selectedSectionIds;const re=n.sections[P].vendors;ie.push(...re.map(X=>X.fluxAnalysisEntityId));let oe=Vs-B.length;N?(ie.forEach(X=>{!B.includes(X)&&oe>0&&(B=[...B,X],oe--)}),U=[...U,P]):(B=B.filter(X=>!ie.includes(X)),U=U.filter(X=>X!==P)),r(B),p(U)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,r,p]),D=s.useCallback(P=>{const N=n.uiState.collapsableStatus[P]===!1;P==="generalExpense"&&!N&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&d(n.uiState.paginationInfoByGroup.reimbursement.pageToken),R(P)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,d,R]),V=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,q=P=>P<V;return s.useEffect(()=>{const P={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:j,onSectionRowClick:D,updateNodeCollapsableStatus:R,updateOperatingExpensesIdsForReview:r,handleRedirectToVendorDetailPage:c,onSectionCheckboxClick:w,onSortOrderChanged:h}};if(g==null||!vs(y,n)){const N=ju(n,P,!0);b(n),f(N)}else{const N=Iu(g,P,n,!0);f(N)}},[n,y,c,w,D,h,R,r]),t.jsx(Tu,{windowSize:m,children:t.jsx(Lu,{children:g?t.jsx(Ws,{backgroundColor:new Ro(u.colors.grey4),rootNodes:g,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:$o.contentPaddingLeft.value(m),right:$o.contentPaddingRight.value(m)},nodeOpenStatus:I(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:q,itemCount:V,loadMoreItems:T},variableNodeHeightTree:{prevFetchState:v??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:L,setIsSortApplied:j,reducedFetchState:ei([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:A??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:S,setHoveredParentId:k}}):null})})},Eu="expenseAutomationFluxPage",{reports:{common:Ru}}=Ie.getLocalizedStrings(),Du=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:c,markAsReview:r,onReloadPage:p,setCurrentFooterFormId:h,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:d,onUpdateFluxAnalysisUIState:l,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:g})=>{const{fetchStatus:f,reviewOperatingExpensesIds:y,uiState:b}=n,S=s.useRef(null),k=s.useRef(!1),C=Jt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:Ou(y)}),L=ke();s.useEffect(()=>()=>{h("expenseAutomationPage")},[h]),s.useEffect(()=>{k.current&&S?.current?.scrollLeft!=null&&b.scrollPosition?.scrollLeft!==S.current.scrollLeft&&b.scrollPosition!=null&&l({scrollPosition:{scrollTop:b.scrollPosition?.scrollTop,scrollLeft:S.current.scrollLeft}})},[b.scrollPosition?.scrollLeft,S.current?.scrollLeft,b.scrollPosition,l]),s.useEffect(()=>{h(y.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[y,h]);const j=I=>{m(I)},v=I=>{u(e,I)},A=(I,R)=>{l({sortOrder:I,sortKey:R}),c(),g(e,null,!1)},T=()=>{const I=oa(n.sections,y);r(y,I===!0?"review":"unreview",e,!0)};if(f.fetchState==="Error")return t.jsxs(Fu,{children:[t.jsx(zu,{onClick:p,children:t.jsx(Lo,{})}),t.jsx(_u,{children:Ru.failed})]});{const I=w=>{l({collapsableStatus:w})},R=w=>{g(e,w,!0)};return t.jsx(Gt,{...C,children:t.jsx("form",{id:Fa(Eu),onSubmit:C.handleSubmit(T),style:{height:"100%",width:"100%"},children:t.jsx(Mu,{windowSize:L,children:t.jsx(Au,{fluxView:n,handleRedirectToVendorDetailPage:j,onSortOrderChanged:A,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:I,fetchReimbursementView:R,updateSectionIdsForReview:d,fetchGeneralExpenseView:v,reportId:"flux_analysis_operating_expense"})})})})}},oa=(e,n)=>{const c=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(p=>p.status==="Pending Review");let r;return c.forEach(p=>{n.includes(p.fluxAnalysisEntityId)&&(r=!0)}),r},Ou=e=>({fluxAnalysisRowIds:e}),Mu=a.div`
783
783
  display: flex;
784
784
  flex: 1 1 auto;
785
785
  min-height: 100%;
@@ -831,7 +831,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
831
831
  `,_u=a(It)`
832
832
  margin-top: ${o.sp3};
833
833
  color: ${e=>e.theme.colors.hero};
834
- `,Pu="expenseAutomationJEAccountSettingsPage",sa="vendorsAccountSection",Bu=e=>`${e}_form`;function Nu({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:c,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:p,setResetJeAccountSettingsForm:h,setCurrentFooterFormId:i}){const d=e.prepaidExpensesRecommendations,l=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Ot(e.prepaidExpensesAccountHierarchy,d,"Accounts"),[e.prepaidExpensesAccountHierarchy,d]),g=s.useMemo(()=>Ot(e.fixedAssetsAccountHierarchy,l,"Accounts"),[e.fixedAssetsAccountHierarchy,l]),f=s.useMemo(()=>Ot(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>Wu(e,u,g,f),[e,u,g,f]),b=Jt({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=b.handleSubmit(C=>{c(C)}),k=async C=>{p(C)};return s.useEffect(()=>{const C=b.watch(L=>{L!=null&&wn(()=>k(L))});return()=>{C.unsubscribe()}}),s.useEffect(()=>(h(()=>b.reset),r(!0),()=>{i("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:C,previousPrepaidExpensesAccount:L,selectedFixedAssetsAccountIds:j,previousFixedAssetsAccount:v,selectedAccruedExpensesAccountIds:A,previousAccruedExpensesAccount:T}=e.accountSettingsLocalData,I=qn(C,L)||qn(j,v)||qn(A,T);I===!0&&n!="expenseAutomationJEAccountSettingsPage"?i("expenseAutomationJEAccountSettingsPage"):I===!1&&n!=="expenseAutomationPage"&&i("expenseAutomationPage")},[e,n,i]),t.jsx(Vu,{children:t.jsx(Gt,{...b,children:t.jsx("form",{id:Bu(Pu),onSubmit:S,children:t.jsx(Qr,{showTitle:!1,sectionId:sa,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 Vu=a.div`
834
+ `,Bu="expenseAutomationJEAccountSettingsPage",ia="vendorsAccountSection",Pu=e=>`${e}_form`;function Nu({accountSettings:e,currentFooterFormId:n,onSaveJeAccountSettingsClick:c,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:p,setResetJeAccountSettingsForm:h,setCurrentFooterFormId:i}){const d=e.prepaidExpensesRecommendations,l=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,u=s.useMemo(()=>Ot(e.prepaidExpensesAccountHierarchy,d,"Accounts"),[e.prepaidExpensesAccountHierarchy,d]),g=s.useMemo(()=>Ot(e.fixedAssetsAccountHierarchy,l,"Accounts"),[e.fixedAssetsAccountHierarchy,l]),f=s.useMemo(()=>Ot(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>Wu(e,u,g,f),[e,u,g,f]),b=Jt({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=b.handleSubmit(C=>{c(C)}),k=async C=>{p(C)};return s.useEffect(()=>{const C=b.watch(L=>{L!=null&&Cn(()=>k(L))});return()=>{C.unsubscribe()}}),s.useEffect(()=>(h(()=>b.reset),r(!0),()=>{i("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:C,previousPrepaidExpensesAccount:L,selectedFixedAssetsAccountIds:j,previousFixedAssetsAccount:v,selectedAccruedExpensesAccountIds:A,previousAccruedExpensesAccount:T}=e.accountSettingsLocalData,I=Un(C,L)||Un(j,v)||Un(A,T);I===!0&&n!="expenseAutomationJEAccountSettingsPage"?i("expenseAutomationJEAccountSettingsPage"):I===!1&&n!=="expenseAutomationPage"&&i("expenseAutomationPage")},[e,n,i]),t.jsx(Vu,{children:t.jsx(Gt,{...b,children:t.jsx("form",{id:Pu(Bu),onSubmit:S,children:t.jsx(Qr,{showTitle:!1,sectionId:ia,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 Vu=a.div`
835
835
  padding-top: ${o.sp3};
836
836
  display: flex;
837
837
  align-items: center;
@@ -839,38 +839,38 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
839
839
  flex-direction: column;
840
840
  width: 100%;
841
841
  background-color: ${e=>e.theme.colors.grey4};
842
- `,Wu=(e,n,c,r)=>{const p=e.prepaidExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(u.accountId)),h=e.fixedAssetsAccountList.filter(u=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(u.accountId)),i=e.accruedExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(u.accountId)),d=p.map(u=>u.qboId).filter(u=>u!=null),l=h.map(u=>u.qboId).filter(u=>u!=null),m=i.map(u=>u.qboId).filter(u=>u!=null);return{[sa]:{prepaidExpensesAccount:{selectedOptions:d,allOptions:n},fixedAssetsAccount:{selectedOptions:l,allOptions:c},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:At},common:{currency:Rn,review:Hu,ignore:Uu,strings:{hyphen:Ct},texts:Dn},dateFormat:qu,timeframe:{month:Si}}=Ie.getLocalizedStrings(),Ku=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:c,jeScheduleClickHandler:r,onReviewClickHandler:p})=>t.jsxs(Ho,{onClick:h=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(h,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(Wo,{children:[t.jsxs(qo,{children:[t.jsxs(No,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:Dn.vendor}),t.jsxs(ce,{style:{gap:x[2]},children:[e.vendor.logo!=null?t.jsx(Ts,{photoUrl:e.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(xn,{name:e.vendor.name}),t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(Ke,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.vendor.name??Ct})})]})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:At.scheduleHeaders.scheduleCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(Ke,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.baseTransaction.account.accountName??Ct})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:At.scheduleHeaders.startMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:e.startDate?.format(qu.visual.MMMCommaYYYYFormat)??Ct})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:At.scheduleHeaders.period}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Si.slice(0,-1):Si}`:Ct})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:Dn.totalAmount}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(e.baseTransaction.amount.amount,Rn.currencyCode,Rn.currencySymbol))??Ct}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(e.baseTransaction.amount.amount,Rn.currencyCode,Rn.currencySymbol))??Ct})})})]})]}),t.jsxs(Vo,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:Dn.category}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeDebit.account?.accountName??Ct})})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:Dn.classText}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(Ke,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeDebit.accountingClass?.className??Ct})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:At.scheduleHeaders.type}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",style:{width:"unset"},children:t.jsx(Zs,{children:At.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:At.scheduleHeaders.accumulatedCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeCredit.account?.accountName??Ct})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]})]}),t.jsxs(Uo,{children:[t.jsx(fn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&p(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component-review-button",e.jeScheduleId),label:Hu,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:ko}}),t.jsx(fn,{"data-testid":z("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:Uu,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&c(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:ko}})]})]}),t.jsxs(xd,{children:[t.jsx(Ju,{}),t.jsx(Gu,{children:At.aiAccountant}),t.jsx(Zu,{children:At.zeniGPTText})]})]}),Ju=a(bn)`
842
+ `,Wu=(e,n,c,r)=>{const p=e.prepaidExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(u.accountId)),h=e.fixedAssetsAccountList.filter(u=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(u.accountId)),i=e.accruedExpensesAccountList.filter(u=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(u.accountId)),d=p.map(u=>u.qboId).filter(u=>u!=null),l=h.map(u=>u.qboId).filter(u=>u!=null),m=i.map(u=>u.qboId).filter(u=>u!=null);return{[ia]:{prepaidExpensesAccount:{selectedOptions:d,allOptions:n},fixedAssetsAccount:{selectedOptions:l,allOptions:c},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:At},common:{currency:En,review:Hu,ignore:Uu,strings:{hyphen:Ct},texts:Rn},dateFormat:qu,timeframe:{month:vi}}=Ie.getLocalizedStrings(),Ku=({draft:e,ignoreStatus:n,ignoreRecommendedJeSchedule:c,jeScheduleClickHandler:r,onReviewClickHandler:p})=>t.jsxs(Wo,{onClick:h=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(h,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(Vo,{children:[t.jsxs(Uo,{children:[t.jsxs(Po,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:Rn.vendor}),t.jsxs(ce,{style:{gap:x[2]},children:[e.vendor.logo!=null?t.jsx($s,{photoUrl:e.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(xn,{name:e.vendor.name}),t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(Ke,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.vendor.name??Ct})})]})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:At.scheduleHeaders.scheduleCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(Ke,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.baseTransaction.account.accountName??Ct})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:At.scheduleHeaders.startMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:e.startDate?.format(qu.visual.MMMCommaYYYYFormat)??Ct})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:At.scheduleHeaders.period}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?vi.slice(0,-1):vi}`:Ct})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:Rn.totalAmount}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(e.baseTransaction.amount.amount,En.currencyCode,En.currencySymbol))??Ct}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(e.baseTransaction.amount.amount,En.currencyCode,En.currencySymbol))??Ct})})})]})]}),t.jsxs(No,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:Rn.category}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeDebit.account?.accountName??Ct})})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:Rn.classText}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(Ke,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeDebit.accountingClass?.className??Ct})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:At.scheduleHeaders.type}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",style:{width:"unset"},children:t.jsx(Gs,{children:At.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:At.scheduleHeaders.accumulatedCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:e.jeCredit.account?.accountName??Ct})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]})]}),t.jsxs(Ho,{children:[t.jsx(fn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&p(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":z("je-schedule-draft-component-review-button",e.jeScheduleId),label:Hu,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:jo}}),t.jsx(fn,{"data-testid":z("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:Uu,size:"small",reverseSpinnerColor:!1,loading:n?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&c(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:jo}})]})]}),t.jsxs(xd,{children:[t.jsx(Ju,{}),t.jsx(Gu,{children:At.aiAccountant}),t.jsx(Zu,{children:At.zeniGPTText})]})]}),Ju=a(wn)`
843
843
  height: ${o.sp3};
844
844
  width: ${o.sp3};
845
845
  margin-right: ${o.sp1};
846
846
  path {
847
847
  stroke-width: 2;
848
848
  }
849
- `,Gu=a(js)`
849
+ `,Gu=a(Ss)`
850
850
  color: ${e=>e.theme.colors.brandColorSapphire};
851
- `,Zu=a(Pe)`
851
+ `,Zu=a(Be)`
852
852
  color: ${e=>e.theme.colors.primary};
853
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:ji}}},expenseAutomation:{jeSchedules:Ve},common:{currency:ut,retry:Yu,strings:{hyphen:qe,empty:ki},texts:en},dateFormat:Ii}=Ie.getLocalizedStrings(),{common:Xu,timeframe:{month:$i}}=Ie.getLocalizedStrings(),ot="jeSchedulePage",Ti=e=>`${e}_form`,Ko=(e,n)=>`${e}.${n}`,Li=Ko(ot,"vendor"),Ai=Ko(ot,"scheduleExpenseCategory"),Ei=Ko(ot,"accumulatedDepreciationCategory"),Qu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:c,allClassList:r,allDepAccountGroupedOptions:p,allDepAccountList:h,draft:i,localData:d,postStatus:l,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:f,onFormDataChange:y,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:k,updatedVendor:C}=d,L={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},j=s.useRef(),v=Jt({mode:"all",reValidateMode:"onChange",defaultValues:Ri(d,e,c,p,n,r,h,g.entityAutoCompleteView),values:Ri(d,e,c,p,n,r,h,g.entityAutoCompleteView)}),A={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},T={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},I=(i?.scheduledJournalEntry.error??[]).every(O=>{const J=L[O];return!(d!=null&&J&&(J==="updatedAccumulatedDepreciationCategoryID"&&d.updatedAccumulatedDepreciationCategoryID==null||J==="updatedCategoryId"&&d.updatedCategoryId==null||J==="updatedVendor"&&(d.updatedVendor?.id==null||d.updatedVendor?.id===""||d.updatedVendor?.name==null||d.updatedVendor?.name==="")))}),R=async(O,J)=>{if(O!=null){const G=J[ot],{scheduledJournalEntryID:W,vendor:E}=G;if(O.includes("vendor")){const _=E?.defaultOptions.map(H=>H.value);if(E?.selectedOption!=null&&_?.includes(E.selectedOption)!==!0){const H=g.entityAutoCompleteView.vendor.find(F=>F.id===E.selectedOption);H!=null&&v.setValue(`${ot}.vendor.defaultOptions`,[{label:H.name??Xu.strings.empty,value:H.id}])}else E?.selectedOption==null&&E?.defaultOptions.length!==0&&v.setValue(`${ot}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(W,{...G,vendor:E})}};s.useEffect(()=>{const O=v.watch((J,{name:G})=>{G!=null&&J!=null&&wn(()=>R(G,J))});return()=>{O.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&j.current?.(Ls(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const w=v.handleSubmit(()=>{b(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),D=O=>n.filter(J=>J.qboId===O)[0]?.qboId,V=O=>h.filter(J=>J.qboId===O)[0]?.qboId,q=O=>[m.expense?.qboId,m.income?.qboId].includes(O),B=v.watch("jeSchedulePage.vendor"),N=(O,J)=>{u.onAutoCompleteInputChange?.(O,"vendor"),j.current=J},P=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ie=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,U=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,re=i.vendor.name.split("(deleted)")[0]?.toString(),oe=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??ki,X=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??ki,[se,ge]=s.useState(ie===!0&&k==null),[Y,le]=s.useState(U===!0&&S==null),[K,M]=s.useState(P&&(C?.id==null||C?.id==""));return s.useEffect(()=>{se===!1&&d.updatedCategoryId==null&&v.setFocus(Ai),Y===!1&&d.updatedAccumulatedDepreciationCategoryID==null&&v.setFocus(Ei),K===!1&&d.updatedVendor?.id==null&&v.setFocus(Li)},[se,Y,K,d,v]),t.jsx(Gt,{...v,children:t.jsx("form",{style:{width:"100%"},id:Ti(`${ot}_${i.jeScheduleId}`),onSubmit:w,children:t.jsx(Ho,{showBorder:I,onClick:O=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&f(O,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${ot}_${i.jeScheduleId}`),children:t.jsxs(Wo,{children:[t.jsxs(qo,{children:[t.jsxs(No,{children:[P===!0?t.jsx(Q,{style:{width:fe.COLUMN_ONE,padding:x[0],justifyContent:"center"},showHoverEffect:P,forceHoverEffect:K===!1&&(d?.updatedVendor?.id==null||d?.updatedVendor?.id==""),children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[en.vendor,t.jsx(we,{display:"flex",placement:"top-start",title:t.jsx(zn,{children:Ve.tooltipText.missingVendor.replace("_deleted_vendor_",re)}),children:t.jsx(to,{})})]}),t.jsx(ce,{style:{gap:x[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),M(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${ot}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:x[2],color:Qe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(eo,{}),ji]}):t.jsx(vo,{name:Li,placeholder:ji,valueToId:O=>O,defaultValue:{selectedOption:B?.selectedOption,defaultOptions:B?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:O=>!!O.selectedOption},loadOptions:N})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:en.vendor}),t.jsx(ce,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(Ts,{photoUrl:i.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(xn,{name:i.vendor.name}),t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(Ke,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.vendor.name??qe})})]})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.scheduleCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(Ke,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.baseTransaction.account.accountName??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.startMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.startDate?.format(Ii.visual.MMMCommaYYYYFormat)??qe})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:Ve.scheduleHeaders.period}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?$i.slice(0,-1):$i}`:qe})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:en.totalAmount}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(i.baseTransaction.amount.amount,ut.currencyCode,ut.currencySymbol))??qe}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i.baseTransaction.amount.amount,ut.currencyCode,ut.currencySymbol))??qe})})})]})]}),t.jsxs(Vo,{children:[ie===!0?t.jsx(Q,{showHoverEffect:ie===!0,forceHoverEffect:d?.updatedCategoryId==null&&se===!1,style:{padding:"unset",justifyContent:"center",width:fe.COLUMN_ONE},children:t.jsxs(ht,{className:"hover-background",children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[en.category,ie===!0?t.jsx(we,{display:"flex",placement:"top-start",title:t.jsx(zn,{children:Ve.tooltipText.missingCategory.replace("_deleted_category_",oe)}),children:t.jsx(to,{})}):null]}),t.jsx(ce,{className:"item-value-container",style:{marginLeft:ie===!0?-2:0},children:ie===!0?t.jsx(t.Fragment,{children:se===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:Qe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${ot}_${i.jeScheduleId}`),children:[t.jsx(eo,{}),Ve.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,name:Ai,placeholder:Ve.addCategory,valueToId:O=>D(O),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:O=>!!O.selectedOption},disableCurrentOption:q,customStyleConfig:A})}):t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.account?.accountName??qe})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:en.category}),t.jsx(ce,{className:"item-value-container",children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.account?.accountName??qe})})})]}),t.jsxs(Q,{children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:en.classText}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(Ke,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.accountingClass?.className??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.type}),t.jsx(ce,{className:"test",children:t.jsx(me,{className:"highlight",style:{width:"unset"},children:t.jsx(Zs,{children:Ve.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:U===!0?t.jsx(Q,{style:{width:fe.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:U,forceHoverEffect:d.updatedAccumulatedDepreciationCategoryID==null&&Y===!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:x[2],paddingLeft:x[3]},children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[Ve.scheduleHeaders.accumulatedCategory,U===!0?t.jsx(we,{display:"flex",placement:"top-end",title:t.jsx(zn,{children:Ve.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(to,{})}):null]}),t.jsx(ce,{className:"item-value-container",style:{marginLeft:U===!0?-2:0},children:U===!0?t.jsx(t.Fragment,{children:Y===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),le(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:Qe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${ot}_${i.jeScheduleId}`),children:[t.jsx(eo,{}),Ve.addDepCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ei,placeholder:Ve.addDepCategory,valueToId:O=>V(O),defaultValue:{allOptions:p},registerOptions:{required:!0,validate:O=>!!O.selectedOption},customStyleConfig:T,disableCurrentOption:q})}):t.jsx(we,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeCredit.account?.accountName??qe})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ve.scheduleHeaders.accumulatedCategory}),t.jsx(we,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeCredit.account?.accountName??qe})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]}),t.jsxs(md,{children:[t.jsx(Q,{style:{padding:"unset",width:fe.COLUMN_ONE},children:t.jsxs(gd,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.jePostingDate}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(Ii.visual.MMMDCommaYYFormat)??qe})})]})}),t.jsxs(Q,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.balance}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,ut.currencyCode,ut.currencySymbol))??qe}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,ut.currencyCode,ut.currencySymbol))??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.months}),t.jsx(ce,{children:t.jsxs(me,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.amountForMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i.scheduledJournalEntry.amount?.amount??0,ut.currencyCode,ut.currencySymbol))??qe})})]})]})]}),t.jsx(Uo,{children:t.jsx(fn,{form:Ti(`${ot}_${i.jeScheduleId}`),label:Yu,variant:"primary",className:"item-value-container",type:"submit",loading:l?.fetchState==="In-Progress",size:"small",disabled:!I,style:{minWidth:ko}})})]})})})})},Ri=(e,n,c,r,p,h,i,d)=>{const l=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?d.vendor.find(k=>k.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,f=e.updatedClassId,y=l!=null?p.find(k=>k.accountId===l):void 0,b=g!=null?i.find(k=>k.accountId===g):void 0,S=f!=null?h.find(k=>k.classId===f):void 0;return{[ot]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:r},vendor:{selectedOption:u?.id??m?.id,defaultOptions:Os(d,u??m)},scheduleClass:{selectedOption:S?.classId,allOptions:c}}}},eo=a(Un)`
853
+ `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Si}}},expenseAutomation:{jeSchedules:Ve},common:{currency:ut,retry:Yu,strings:{hyphen:qe,empty:ji},texts:en},dateFormat:ki}=Ie.getLocalizedStrings(),{common:Xu,timeframe:{month:Ii}}=Ie.getLocalizedStrings(),ot="jeSchedulePage",$i=e=>`${e}_form`,qo=(e,n)=>`${e}.${n}`,Ti=qo(ot,"vendor"),Li=qo(ot,"scheduleExpenseCategory"),Ai=qo(ot,"accumulatedDepreciationCategory"),Qu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:c,allClassList:r,allDepAccountGroupedOptions:p,allDepAccountList:h,draft:i,localData:d,postStatus:l,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:f,onFormDataChange:y,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:k,updatedVendor:C}=d,L={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},j=s.useRef(),v=Jt({mode:"all",reValidateMode:"onChange",defaultValues:Ei(d,e,c,p,n,r,h,g.entityAutoCompleteView),values:Ei(d,e,c,p,n,r,h,g.entityAutoCompleteView)}),A={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},T={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},I=(i?.scheduledJournalEntry.error??[]).every(O=>{const J=L[O];return!(d!=null&&J&&(J==="updatedAccumulatedDepreciationCategoryID"&&d.updatedAccumulatedDepreciationCategoryID==null||J==="updatedCategoryId"&&d.updatedCategoryId==null||J==="updatedVendor"&&(d.updatedVendor?.id==null||d.updatedVendor?.id===""||d.updatedVendor?.name==null||d.updatedVendor?.name==="")))}),R=async(O,J)=>{if(O!=null){const G=J[ot],{scheduledJournalEntryID:W,vendor:E}=G;if(O.includes("vendor")){const _=E?.defaultOptions.map(H=>H.value);if(E?.selectedOption!=null&&_?.includes(E.selectedOption)!==!0){const H=g.entityAutoCompleteView.vendor.find(F=>F.id===E.selectedOption);H!=null&&v.setValue(`${ot}.vendor.defaultOptions`,[{label:H.name??Xu.strings.empty,value:H.id}])}else E?.selectedOption==null&&E?.defaultOptions.length!==0&&v.setValue(`${ot}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(W,{...G,vendor:E})}};s.useEffect(()=>{const O=v.watch((J,{name:G})=>{G!=null&&J!=null&&Cn(()=>R(G,J))});return()=>{O.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&j.current?.(Ts(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const w=v.handleSubmit(()=>{b(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),D=O=>n.filter(J=>J.qboId===O)[0]?.qboId,V=O=>h.filter(J=>J.qboId===O)[0]?.qboId,q=O=>[m.expense?.qboId,m.income?.qboId].includes(O),P=v.watch("jeSchedulePage.vendor"),N=(O,J)=>{u.onAutoCompleteInputChange?.(O,"vendor"),j.current=J},B=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ie=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,U=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,re=i.vendor.name.split("(deleted)")[0]?.toString(),oe=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??ji,X=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??ji,[se,ge]=s.useState(ie===!0&&k==null),[Y,le]=s.useState(U===!0&&S==null),[K,M]=s.useState(B&&(C?.id==null||C?.id==""));return s.useEffect(()=>{se===!1&&d.updatedCategoryId==null&&v.setFocus(Li),Y===!1&&d.updatedAccumulatedDepreciationCategoryID==null&&v.setFocus(Ai),K===!1&&d.updatedVendor?.id==null&&v.setFocus(Ti)},[se,Y,K,d,v]),t.jsx(Gt,{...v,children:t.jsx("form",{style:{width:"100%"},id:$i(`${ot}_${i.jeScheduleId}`),onSubmit:w,children:t.jsx(Wo,{showBorder:I,onClick:O=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&f(O,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${ot}_${i.jeScheduleId}`),children:t.jsxs(Vo,{children:[t.jsxs(Uo,{children:[t.jsxs(Po,{children:[B===!0?t.jsx(Q,{style:{width:fe.COLUMN_ONE,padding:x[0],justifyContent:"center"},showHoverEffect:B,forceHoverEffect:K===!1&&(d?.updatedVendor?.id==null||d?.updatedVendor?.id==""),children:t.jsxs(ht,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[en.vendor,t.jsx(we,{display:"flex",placement:"top-start",title:t.jsx(Fn,{children:Ve.tooltipText.missingVendor.replace("_deleted_vendor_",re)}),children:t.jsx(eo,{})})]}),t.jsx(ce,{style:{gap:x[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),M(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${ot}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:x[2],color:Qe.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Qn,{}),Si]}):t.jsx(bo,{name:Ti,placeholder:Si,valueToId:O=>O,defaultValue:{selectedOption:P?.selectedOption,defaultOptions:P?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:O=>!!O.selectedOption},loadOptions:N})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:en.vendor}),t.jsx(ce,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx($s,{photoUrl:i.vendor.logo.href,styles:{width:x[4],height:x[4]}}):t.jsx(xn,{name:i.vendor.name}),t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(Ke,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.vendor.name??qe})})]})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.scheduleCategory}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(Ke,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.baseTransaction.account.accountName??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.startMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.startDate?.format(ki.visual.MMMCommaYYYYFormat)??qe})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:Ve.scheduleHeaders.period}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?Ii.slice(0,-1):Ii}`:qe})})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:en.totalAmount}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(i.baseTransaction.amount.amount,ut.currencyCode,ut.currencySymbol))??qe}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i.baseTransaction.amount.amount,ut.currencyCode,ut.currencySymbol))??qe})})})]})]}),t.jsxs(No,{children:[ie===!0?t.jsx(Q,{showHoverEffect:ie===!0,forceHoverEffect:d?.updatedCategoryId==null&&se===!1,style:{padding:"unset",justifyContent:"center",width:fe.COLUMN_ONE},children:t.jsxs(ht,{className:"hover-background",children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[en.category,ie===!0?t.jsx(we,{display:"flex",placement:"top-start",title:t.jsx(Fn,{children:Ve.tooltipText.missingCategory.replace("_deleted_category_",oe)}),children:t.jsx(eo,{})}):null]}),t.jsx(ce,{className:"item-value-container",style:{marginLeft:ie===!0?-2:0},children:ie===!0?t.jsx(t.Fragment,{children:se===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:Qe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${ot}_${i.jeScheduleId}`),children:[t.jsx(Qn,{}),Ve.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,name:Li,placeholder:Ve.addCategory,valueToId:O=>D(O),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:O=>!!O.selectedOption},disableCurrentOption:q,customStyleConfig:A})}):t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.account?.accountName??qe})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:en.category}),t.jsx(ce,{className:"item-value-container",children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(Ke,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.account?.accountName??qe})})})]}),t.jsxs(Q,{children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:en.classText}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(Ke,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeDebit.accountingClass?.className??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.type}),t.jsx(ce,{className:"test",children:t.jsx(me,{className:"highlight",style:{width:"unset"},children:t.jsx(Gs,{children:Ve.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:U===!0?t.jsx(Q,{style:{width:fe.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:U,forceHoverEffect:d.updatedAccumulatedDepreciationCategoryID==null&&Y===!1,children:t.jsxs(ht,{className:"hover-background",style:{padding:x[2],paddingLeft:x[3]},children:[t.jsxs(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:[Ve.scheduleHeaders.accumulatedCategory,U===!0?t.jsx(we,{display:"flex",placement:"top-end",title:t.jsx(Fn,{children:Ve.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(eo,{})}):null]}),t.jsx(ce,{className:"item-value-container",style:{marginLeft:U===!0?-2:0},children:U===!0?t.jsx(t.Fragment,{children:Y===!0?t.jsxs(me,{onClick:O=>{O.stopPropagation(),le(!1)},style:{display:"inline-flex",alignItems:"center",gap:x[1],color:Qe.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${ot}_${i.jeScheduleId}`),children:[t.jsx(Qn,{}),Ve.addDepCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ai,placeholder:Ve.addDepCategory,valueToId:O=>V(O),defaultValue:{allOptions:p},registerOptions:{required:!0,validate:O=>!!O.selectedOption},customStyleConfig:T,disableCurrentOption:q})}):t.jsx(we,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeCredit.account?.accountName??qe})})})]})}):t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(ae,{style:{display:"flex",alignItems:"center",gap:x[1]},children:Ve.scheduleHeaders.accumulatedCategory}),t.jsx(we,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(Ke,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(me,{className:"highlight",children:i.jeCredit.account?.accountName??qe})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}):null,t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]}),t.jsxs(md,{children:[t.jsx(Q,{style:{padding:"unset",width:fe.COLUMN_ONE},children:t.jsxs(gd,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.jePostingDate}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(ki.visual.MMMDCommaYYFormat)??qe})})]})}),t.jsxs(Q,{children:[t.jsx(ae,{children:Ve.scheduleHeaders.balance}),t.jsx(ce,{children:t.jsx(we,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(Ke,{children:Je("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,ut.currencyCode,ut.currencySymbol))??qe}),children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,ut.currencyCode,ut.currencySymbol))??qe})})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.months}),t.jsx(ce,{children:t.jsxs(me,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(Q,{style:{width:fe.COLUMN_FOUR}}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:Ve.scheduleHeaders.amountForMonth}),t.jsx(ce,{children:t.jsx(me,{className:"highlight",children:Je("0,0.[00]",Ht(i.scheduledJournalEntry.amount?.amount??0,ut.currencyCode,ut.currencySymbol))??qe})})]})]})]}),t.jsx(Ho,{children:t.jsx(fn,{form:$i(`${ot}_${i.jeScheduleId}`),label:Yu,variant:"primary",className:"item-value-container",type:"submit",loading:l?.fetchState==="In-Progress",size:"small",disabled:!I,style:{minWidth:jo}})})]})})})})},Ei=(e,n,c,r,p,h,i,d)=>{const l=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?d.vendor.find(k=>k.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,f=e.updatedClassId,y=l!=null?p.find(k=>k.accountId===l):void 0,b=g!=null?i.find(k=>k.accountId===g):void 0,S=f!=null?h.find(k=>k.classId===f):void 0;return{[ot]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:r},vendor:{selectedOption:u?.id??m?.id,defaultOptions:Ds(d,u??m)},scheduleClass:{selectedOption:S?.classId,allOptions:c}}}},Qn=a(Hn)`
854
854
  width: ${o.sp3};
855
855
  height: ${o.sp3};
856
- `,to=a(Ms)`
856
+ `,eo=a(Os)`
857
857
  width: 12px;
858
858
  height: 12px;
859
859
  color: ${Qe.important};
860
- `;function aa(){return t.jsx(qs,{children:t.jsxs(Ks,{children:[t.jsxs(Js,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(Di,{})]}),t.jsxs(Gs,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(Di,{})]})]})})}const Di=()=>t.jsx(Ho,{style:{minWidth:1088},children:t.jsxs(Wo,{children:[t.jsxs(qo,{children:[t.jsxs(No,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:t.jsx(ze,{width:x[10],height:14})}),t.jsxs(ce,{style:{gap:x[2]},children:[t.jsx(Fo,{height:x[4],width:x[4]}),t.jsx(ze,{height:x[4],width:x[10]})]})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:t.jsx(ze,{width:101,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:203})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:t.jsx(ze,{width:x[9],height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:71})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:t.jsx(ze,{width:107,height:14})}),t.jsx(ze,{height:x[4],width:68})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:t.jsx(ze,{width:73,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:49})})]})]}),t.jsxs(Vo,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:t.jsx(ze,{width:49,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:158})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:88})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:100})})]}),t.jsx(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]}}),t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]})]}),t.jsxs(Uo,{children:[t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),ze=a(Mt)`
860
+ `;function sa(){return t.jsx(Us,{children:t.jsxs(qs,{children:[t.jsxs(Ks,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(Ri,{})]}),t.jsxs(Js,{children:[t.jsx(ze,{width:x[9],height:27,style:{marginBottom:x[2]}}),t.jsx(Ri,{})]})]})})}const Ri=()=>t.jsx(Wo,{style:{minWidth:1088},children:t.jsxs(Vo,{children:[t.jsxs(Uo,{children:[t.jsxs(Po,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:t.jsx(ze,{width:x[10],height:14})}),t.jsxs(ce,{style:{gap:x[2]},children:[t.jsx(Mo,{height:x[4],width:x[4]}),t.jsx(ze,{height:x[4],width:x[10]})]})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:t.jsx(ze,{width:101,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:203})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:t.jsx(ze,{width:x[9],height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:71})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]},children:[t.jsx(ae,{children:t.jsx(ze,{width:107,height:14})}),t.jsx(ze,{height:x[4],width:68})]}),t.jsxs(Q,{style:{alignItems:"flex-end",width:fe.COLUMN_FIVE},children:[t.jsx(ae,{children:t.jsx(ze,{width:73,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:49})})]})]}),t.jsxs(No,{children:[t.jsxs(Q,{style:{width:fe.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(ae,{children:t.jsx(ze,{width:49,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:158})})]}),t.jsxs(Q,{children:[t.jsx(ae,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:88})})]}),t.jsxs(Q,{style:{width:fe.COLUMN_THREE},children:[t.jsx(ae,{children:t.jsx(ze,{width:36,height:14})}),t.jsx(ce,{children:t.jsx(ze,{height:x[4],width:100})})]}),t.jsx(Q,{style:{width:fe.COLUMN_FOUR,paddingLeft:x[3]}}),t.jsx(Q,{style:{width:fe.COLUMN_FIVE}})]})]}),t.jsxs(Ho,{children:[t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(ze,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),ze=a(Mt)`
861
861
  border-radius: ${o.sp1};
862
- `,{common:{create:eh,resolve:th}}=Ie.getLocalizedStrings();function nh({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:c,onJESchedulesFormDataChange:r,onPostJESchedule:p,ignoreRecommendedJeSchedule:h,vendorSearchAutoCompleteActions:i,setCurrentFooterFormId:d}){const l=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,g=e.ignoreStatusById;Cn({componentName:"expense_automation.je_schedules",enabled:e.fetchState==="Completed"});const f=e.resolveSchedules,y=e.uncategorizedAccounts,{allAccountList:b,allClassList:S,allDepreciationAccountList:k}=e,C=Ot(e.accountListNestedAccountHierarchy),L=Ot(e.allDepreciationAccountListNestedAccountHierarchy),j=Fn(e.classListNestedAccountHierarchy),v=(T,I,R)=>{c(T,I,R)},A=(T,I,R,w)=>{let D=T.target;for(;D;){if(D.classList.contains("item-value-container")||D.classList.contains("hover-background")||D.classList.contains("auto-complete-single-select-field__input")||D.classList.contains("auto-complete-single-select-field__option")||D.classList.contains("grouped-single-select-field__input")||D.classList.contains("grouped-single-select-field__menu"))return;D=D.parentElement}c(I,R,w)};return s.useEffect(()=>{if(f.length!==0){for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const{updatedAccumulatedDepreciationCategoryID:I,updatedCategoryId:R,updatedVendor:w}=m[T];if(I!=null||R!=null||w!=null&&w?.id!==""){d("expenseAutomationJESchedulePage");break}else d("expenseAutomationPage")}}else f.length===0&&d("expenseAutomationPage")}),s.useEffect(()=>()=>{d("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(aa,{}):l.length!==0||f.length!==0?t.jsx(qs,{children:t.jsxs(Ks,{children:[l.length>0?t.jsxs(Js,{children:[t.jsxs(Mi,{children:[eh,t.jsx(Fi,{isCircular:l.length<10,children:t.jsx(zi,{children:l.length})})]}),t.jsx(Oi,{"data-testid":z("expense-automation","draft-je-schedules"),children:l.map((T,I)=>t.jsx(Ku,{ignoreStatus:g[T.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:h,onReviewClickHandler:v,jeScheduleClickHandler:A,draft:T},`${I}_${T.jeScheduleId}`))})]}):null,f.length>0?t.jsxs(Gs,{children:[t.jsxs(Mi,{children:[th,t.jsx(Fi,{isCircular:f.length<10,children:t.jsx(zi,{children:f.length})})]}),t.jsx(Oi,{"data-testid":z("expense-automation","resolve-je-schedules"),children:f.map((T,I)=>m[T.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(Qu,{vendorSearchAutoCompleteActions:i,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:A,onPostJESchedule:p,uncategorizedAccounts:y,allAccountList:b,allAccountGroupedOptions:C,allClassGroupedOptions:j,allClassList:S,allDepAccountGroupedOptions:L,allDepAccountList:k,draft:T,postStatus:u[T.scheduledJournalEntry.scheduledJournalEntryID],localData:m[T.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r},`${I}_${T.jeScheduleTransactionKey}`))})]}):null]})}):null}const Oi=a.div`
862
+ `,{common:{create:eh,resolve:th}}=Ie.getLocalizedStrings();function nh({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:c,onJESchedulesFormDataChange:r,onPostJESchedule:p,ignoreRecommendedJeSchedule:h,vendorSearchAutoCompleteActions:i,setCurrentFooterFormId:d}){const l=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,g=e.ignoreStatusById,f=e.resolveSchedules,y=e.uncategorizedAccounts,{allAccountList:b,allClassList:S,allDepreciationAccountList:k}=e,C=Ot(e.accountListNestedAccountHierarchy),L=Ot(e.allDepreciationAccountListNestedAccountHierarchy),j=Mn(e.classListNestedAccountHierarchy),v=(T,I,R)=>{c(T,I,R)},A=(T,I,R,w)=>{let D=T.target;for(;D;){if(D.classList.contains("item-value-container")||D.classList.contains("hover-background")||D.classList.contains("auto-complete-single-select-field__input")||D.classList.contains("auto-complete-single-select-field__option")||D.classList.contains("grouped-single-select-field__input")||D.classList.contains("grouped-single-select-field__menu"))return;D=D.parentElement}c(I,R,w)};return s.useEffect(()=>{if(f.length!==0){for(const T in m)if(Object.prototype.hasOwnProperty.call(m,T)){const{updatedAccumulatedDepreciationCategoryID:I,updatedCategoryId:R,updatedVendor:w}=m[T];if(I!=null||R!=null||w!=null&&w?.id!==""){d("expenseAutomationJESchedulePage");break}else d("expenseAutomationPage")}}else f.length===0&&d("expenseAutomationPage")}),s.useEffect(()=>()=>{d("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(sa,{}):l.length!==0||f.length!==0?t.jsx(Us,{children:t.jsxs(qs,{children:[l.length>0?t.jsxs(Ks,{children:[t.jsxs(Oi,{children:[eh,t.jsx(Mi,{isCircular:l.length<10,children:t.jsx(Fi,{children:l.length})})]}),t.jsx(Di,{"data-testid":z("expense-automation","draft-je-schedules"),children:l.map((T,I)=>t.jsx(Ku,{ignoreStatus:g[T.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:h,onReviewClickHandler:v,jeScheduleClickHandler:A,draft:T},`${I}_${T.jeScheduleId}`))})]}):null,f.length>0?t.jsxs(Js,{children:[t.jsxs(Oi,{children:[th,t.jsx(Mi,{isCircular:f.length<10,children:t.jsx(Fi,{children:f.length})})]}),t.jsx(Di,{"data-testid":z("expense-automation","resolve-je-schedules"),children:f.map((T,I)=>m[T.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(Qu,{vendorSearchAutoCompleteActions:i,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:A,onPostJESchedule:p,uncategorizedAccounts:y,allAccountList:b,allAccountGroupedOptions:C,allClassGroupedOptions:j,allClassList:S,allDepAccountGroupedOptions:L,allDepAccountList:k,draft:T,postStatus:u[T.scheduledJournalEntry.scheduledJournalEntryID],localData:m[T.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:r},`${I}_${T.jeScheduleTransactionKey}`))})]}):null]})}):null}const Di=a.div`
863
863
  display: flex;
864
864
  flex-direction: column;
865
865
  gap: ${o.sp4};
866
866
  min-width: 1088px;
867
- `,Mi=a(hs)`
867
+ `,Oi=a(us)`
868
868
  color: ${e=>e.theme.colors.primary};
869
869
  padding: ${o.sp2} ${o.sp0};
870
870
  display: flex;
871
871
  align-items: center;
872
872
  gap: ${o.sp1};
873
- `,Fi=a.div`
873
+ `,Mi=a.div`
874
874
  border-radius: ${o.sp12};
875
875
  display: flex;
876
876
  justify-content: center;
@@ -884,7 +884,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
884
884
  height: 18px;
885
885
  padding: ${vr.padding};
886
886
  `}
887
- `,zi=a(Sr)`
887
+ `,Fi=a(Sr)`
888
888
  color: ${e=>e.theme.colors.hero};
889
889
  height: 100%;
890
890
  width: 100%;
@@ -892,10 +892,10 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
892
892
  align-items: center;
893
893
  justify-content: center;
894
894
  color: inherit;
895
- `;function oh({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:c,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:p,onPostJESchedule:h,handleJeScheduleClick:i,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:l,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:f}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(aa,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Nu,{setIsJeAccountSettingsOpened:f,setResetJeAccountSettingsForm:c,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:l,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(St,{tab:e.currentSelectedView,title:He(e.currentSelectedView).allDoneText.title,subTitle:He(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(nh,{setCurrentFooterFormId:g,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:p,onPostJESchedule:h,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:r}):null}const ih=72,ra=50,sh=1,ah=["receipts"],_i=e=>zs(e,ah),{common:{texts:{vendor:rh,amount:lh,receipts:ch,category:dh,classText:uh,date:hh}}}=Ie.getLocalizedStrings(),la={key:"vendor",value:rh,sortOrder:"ascending",width:new Z(18,18)},ph={key:"category",value:dh,sortOrder:"ascending",width:new Z(18,18)},mh={key:"class",value:uh,sortOrder:"ascending",width:new Z(18,18)},gh={key:"date",value:hh,sortOrder:"descending",width:new Z(11,11)},xh={key:"receipts",value:ch,sortOrder:"descending",width:new Z(6,6)},ca={key:"amount",value:lh,sortOrder:"ascending",width:new Z(10,10)},pn=[la,ph,mh,gh,xh,ca],da=[{...la,width:new Z(65,65)},{...ca,width:new Z(30,30)}],no={sortKey:"date",sortOrder:"descending"},Pi={containerPaddingLeftRight:new Z(x[3],x[4])},ua=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:c})=>{const r=ke(),p=Ft(),h=p?da:pn,[i,d]=s.useState(h);s.useEffect(()=>{const u=[...h];for(const g of u)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";d(u)},[e.sortKey,e.sortOrder,p]);const l=(u,g)=>{let f=g;e.sortKey===u&&(f=g==="ascending"?"descending":"ascending"),c(u,f)},m=u=>{_i(u.key)==null&&l(Gr(u.key),u.sortOrder)};return t.jsx(fh,{windowSize:r,children:i.map((u,g)=>{const f=n!=null||_i(u.key)!=null;return t.jsxs(yh,{sortDataValue:e.sortKey,actualDataValue:u.key,wrapperWidth:u.width,isSortDisabled:f,windowSize:r,isLastItem:g===i.length-1,style:u.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Sh,{onClick:()=>f?null:m(u),isSortDisabled:f,children:[t.jsx(jh,{children:u.value}),f?null:t.jsx(wh,{sortConfig:e,headerData:u,children:t.jsx(vh,{})})]}),f?null:t.jsx(bh,{isSortDisabled:f,sortDataValue:e.sortKey,isVisible:e.sortKey===u.key&&e.sortKey!==no.sortKey,children:t.jsx(Ch,{onClick:()=>{f||l(no.sortKey,no.sortOrder)},"data-testid":z("missing-receipts-header-close-icon",u.key)})})]},u.key)})})},fh=a.div`
895
+ `;function oh({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:c,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:p,onPostJESchedule:h,handleJeScheduleClick:i,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:l,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:f}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(sa,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Nu,{setIsJeAccountSettingsOpened:f,setResetJeAccountSettingsForm:c,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:l,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(St,{tab:e.currentSelectedView,title:He(e.currentSelectedView).allDoneText.title,subTitle:He(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(nh,{setCurrentFooterFormId:g,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:p,onPostJESchedule:h,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:r}):null}const ih=72,aa=50,sh=1,ah=["receipts"],zi=e=>Fs(e,ah),{common:{texts:{vendor:rh,amount:lh,receipts:ch,category:dh,classText:uh,date:hh}}}=Ie.getLocalizedStrings(),ra={key:"vendor",value:rh,sortOrder:"ascending",width:new Z(18,18)},ph={key:"category",value:dh,sortOrder:"ascending",width:new Z(18,18)},mh={key:"class",value:uh,sortOrder:"ascending",width:new Z(18,18)},gh={key:"date",value:hh,sortOrder:"descending",width:new Z(11,11)},xh={key:"receipts",value:ch,sortOrder:"descending",width:new Z(6,6)},la={key:"amount",value:lh,sortOrder:"ascending",width:new Z(10,10)},pn=[ra,ph,mh,gh,xh,la],ca=[{...ra,width:new Z(65,65)},{...la,width:new Z(30,30)}],to={sortKey:"date",sortOrder:"descending"},_i={containerPaddingLeftRight:new Z(x[3],x[4])},da=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:c})=>{const r=ke(),p=Ft(),h=p?ca:pn,[i,d]=s.useState(h);s.useEffect(()=>{const u=[...h];for(const g of u)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";d(u)},[e.sortKey,e.sortOrder,p]);const l=(u,g)=>{let f=g;e.sortKey===u&&(f=g==="ascending"?"descending":"ascending"),c(u,f)},m=u=>{zi(u.key)==null&&l(Gr(u.key),u.sortOrder)};return t.jsx(fh,{windowSize:r,children:i.map((u,g)=>{const f=n!=null||zi(u.key)!=null;return t.jsxs(yh,{sortDataValue:e.sortKey,actualDataValue:u.key,wrapperWidth:u.width,isSortDisabled:f,windowSize:r,isLastItem:g===i.length-1,style:u.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Sh,{onClick:()=>f?null:m(u),isSortDisabled:f,children:[t.jsx(jh,{children:u.value}),f?null:t.jsx(wh,{sortConfig:e,headerData:u,children:t.jsx(vh,{})})]}),f?null:t.jsx(bh,{isSortDisabled:f,sortDataValue:e.sortKey,isVisible:e.sortKey===u.key&&e.sortKey!==to.sortKey,children:t.jsx(Ch,{onClick:()=>{f||l(to.sortKey,to.sortOrder)},"data-testid":z("missing-receipts-header-close-icon",u.key)})})]},u.key)})})},fh=a.div`
896
896
  top: ${o.sp0};
897
897
  left: ${o.sp0};
898
- height: ${ra}px;
898
+ height: ${aa}px;
899
899
  z-index: 2;
900
900
  display: flex;
901
901
  align-items: center;
@@ -903,8 +903,8 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
903
903
  box-sizing: border-box;
904
904
  background-color: ${e=>e.theme.colors.grey4};
905
905
  position: sticky;
906
- padding-left: ${e=>Pi.containerPaddingLeftRight.valuePx(e.windowSize)};
907
- padding-right: ${e=>Pi.containerPaddingLeftRight.valuePx(e.windowSize)};
906
+ padding-left: ${e=>_i.containerPaddingLeftRight.valuePx(e.windowSize)};
907
+ padding-right: ${e=>_i.containerPaddingLeftRight.valuePx(e.windowSize)};
908
908
  `,yh=a.div`
909
909
  color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
910
910
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -918,7 +918,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
918
918
  position: static;
919
919
  z-index: 0;
920
920
  box-sizing: border-box;
921
- `,Ch=a(Hn)`
921
+ `,Ch=a(Wn)`
922
922
  width: ${o.sp2};
923
923
  height: ${o.sp2};
924
924
  cursor: pointer;
@@ -933,7 +933,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
933
933
  &:hover {
934
934
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
935
935
  }
936
- `,vh=a(Wn)`
936
+ `,vh=a(Vn)`
937
937
  width: ${o.sp2};
938
938
  height: ${o.sp2};
939
939
  `,Sh=a.div`
@@ -945,13 +945,13 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
945
945
  }
946
946
  `,jh=a(gt)`
947
947
  display: flex;
948
- `,{common:{strings:{underscore:ha,hyphen:oo,empty:Bi},documents:{singleFileUploadSizeErrorMessage:kh,multipleFileUploadSizeErrorMessage:Ih},snackBar:{missing_receipts_attachment:{failed:$h}},tooltips:{addMissingReceipt:Th}},dateFormat:Lh}=Ie.getLocalizedStrings(),On={containerPaddingLeftRight:new Z(x[3],x[4]),containerPaddingTopBottom:new Z(x[2],x[3])},Ah=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:c,authParams:r,selectedPeriod:p,onUploadReceiptComplete:h,onMissingReceiptsRowClick:i,onUploadReceiptFetchStatus:d,onUploadReceiptAttachment:l})=>{const m=ke(),u=Ft(),g=s.useRef(null),f=s.useCallback(async(k,C,L,j,v)=>{d(e.id,"In-Progress"),await el(k,C,L,j,v).then(({uploadResponse:A,errorMessage:T})=>{A!=null?A.transaction.attachments!=null&&(l(A.transaction),setTimeout(()=>h(A.transaction,p),2e3)):d(e.id,"Error",{code:500,message:$h},T)}).catch(A=>{d(e.id,"Error",A)})},[e.id,p,l,h,d]),y=s.useCallback(k=>{if(k.target.files!=null){const C=k.target.files,L=[],j=[];for(let v=0;v<C.length;v++)L.push(C[v].name),j.push(C[v]);f(c,r,C[0],C[0].name,{id:e.id,type:e.type})}},[r,f,c,e.id,e.type]),b=s.useCallback(()=>{u||g.current?.click()},[g,u]),S=u?da:pn;return t.jsx(pa,{className:"missing-receipts-row-card",windowSize:m,isCompressedMode:u,onClick:()=>i(e.id,e.type),"data-testid":z("missing-receipts-list-row",e.id),children:S.map((k,C)=>{const L=`${e.id}${ha}${k.key}`;switch(k.key){case"vendor":default:return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsxs(_n,{children:[t.jsx($s,{photoUrl:e.vendorId!=null?e.logo?.toString()??Bi:Bi,styles:{width:o.sp4,height:o.sp4,borderRadius:o.sp0},placeholder:{width:x[4],height:x[4]},fallbackAvatar:t.jsx(zh,{children:t.jsx(xn,{name:e.vendorName??e.description,size:o.sp4})})}),t.jsx(it,{text:e.vendorName??e.description,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})]})})},L);case"category":case"class":{const j=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:oo,v=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:oo,A=k.key==="category"?j:v;return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(_n,{children:A!==oo?t.jsx(it,{text:A,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}}):t.jsx(Fh,{children:A})})})},L)}case"date":return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(_n,{children:t.jsx(it,{text:e.date.format(Lh.visual.MMMDCommaYYYYformat),itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})})})},L);case"receipts":return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(ws,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(br,{shouldDisplay:!0,width:x[4],height:x[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(Mh,{onClick:j=>{j.stopPropagation()},children:t.jsx(Cs,{"data-testid":z("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:Kn,multiple:!1,acceptableTypes:[...Zr],onFileChange:y,onFileSizeError:(j,v)=>{j&&d(e.id,"Error",{code:500,message:v===!0?kh.replace("__maxFileSize__",Yo(Kn,0)):Ih.replace("__maxFileSize__",Yo(Kn,0))})}})}),t.jsx(we,{display:"flex",placement:"bottom",title:Th,enterDelay:600,children:t.jsx(Oh,{onClick:j=>{j.stopPropagation(),b()}})})]})})},L);case"amount":{const j=Je("0,0.[00]",e.amount);return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(it,{text:e.amount.amount<0?`-${j}`:j,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})})},L)}}})})},Eh=()=>{const e=ke(),n=s.useRef(null),[c,r]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&r(n.current.offsetWidth)},[e]),t.jsx(pa,{windowSize:e,isCompressedMode:!1,ref:n,children:pn.map((p,h)=>{const i=`${h}${ha}${p.key}`;switch(p.key){case"vendor":return t.jsx(Ut,{windowSize:e,wrapperWidth:p.width,children:t.jsx(qt,{windowSize:e,isLastItem:h===pn.length-1,children:t.jsxs(_n,{children:[t.jsx(Fo,{width:x[4],height:x[4]}),t.jsx(Mt,{width:c*p.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(Ut,{windowSize:e,wrapperWidth:p.width,children:t.jsx(qt,{windowSize:e,isLastItem:h===pn.length-1,children:t.jsx(Mt,{width:c*p.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},pa=a.div`
948
+ `,{common:{strings:{underscore:ua,hyphen:no,empty:Bi},documents:{singleFileUploadSizeErrorMessage:kh,multipleFileUploadSizeErrorMessage:Ih},snackBar:{missing_receipts_attachment:{failed:$h}},tooltips:{addMissingReceipt:Th}},dateFormat:Lh}=Ie.getLocalizedStrings(),Dn={containerPaddingLeftRight:new Z(x[3],x[4]),containerPaddingTopBottom:new Z(x[2],x[3])},Ah=({transaction:e,uploadReceiptsFetchState:n,receiptUploadEndpoint:c,authParams:r,selectedPeriod:p,onUploadReceiptComplete:h,onMissingReceiptsRowClick:i,onUploadReceiptFetchStatus:d,onUploadReceiptAttachment:l})=>{const m=ke(),u=Ft(),g=s.useRef(null),f=s.useCallback(async(k,C,L,j,v)=>{d(e.id,"In-Progress"),await el(k,C,L,j,v).then(({uploadResponse:A,errorMessage:T})=>{A!=null?A.transaction.attachments!=null&&(l(A.transaction),setTimeout(()=>h(A.transaction,p),2e3)):d(e.id,"Error",{code:500,message:$h},T)}).catch(A=>{d(e.id,"Error",A)})},[e.id,p,l,h,d]),y=s.useCallback(k=>{if(k.target.files!=null){const C=k.target.files,L=[],j=[];for(let v=0;v<C.length;v++)L.push(C[v].name),j.push(C[v]);f(c,r,C[0],C[0].name,{id:e.id,type:e.type})}},[r,f,c,e.id,e.type]),b=s.useCallback(()=>{u||g.current?.click()},[g,u]),S=u?ca:pn;return t.jsx(ha,{className:"missing-receipts-row-card",windowSize:m,isCompressedMode:u,onClick:()=>i(e.id,e.type),"data-testid":z("missing-receipts-list-row",e.id),children:S.map((k,C)=>{const L=`${e.id}${ua}${k.key}`;switch(k.key){case"vendor":default:return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsxs(zn,{children:[t.jsx(Is,{photoUrl:e.vendorId!=null?e.logo?.toString()??Bi:Bi,styles:{width:o.sp4,height:o.sp4,borderRadius:o.sp0},placeholder:{width:x[4],height:x[4]},fallbackAvatar:t.jsx(zh,{children:t.jsx(xn,{name:e.vendorName??e.description,size:o.sp4})})}),t.jsx(it,{text:e.vendorName??e.description,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})]})})},L);case"category":case"class":{const j=e.lines!=null&&e.lines.length>0&&e.lines[0]?.account!=null&&e.lines[0].account.accountName?e.lines[0].account.accountName:no,v=e.lines!=null&&e.lines.length>0&&e.lines[0]?.class!=null&&e.lines[0].class.className?e.lines[0].class.className:no,A=k.key==="category"?j:v;return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(zn,{children:A!==no?t.jsx(it,{text:A,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}}):t.jsx(Fh,{children:A})})})},L)}case"date":return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(zn,{children:t.jsx(it,{text:e.date.format(Lh.visual.MMMDCommaYYYYformat),itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})})})},L);case"receipts":return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,style:{justifyContent:"center"},children:n.fetchState==="In-Progress"?t.jsx(Cs,{size:"Small",style:{display:"flex"},start:!0}):n.fetchState==="Completed"||e.attachments!=null&&e.attachments.length>0?t.jsx(br,{shouldDisplay:!0,width:x[4],height:x[4],animationInLoop:!1,shouldFade:!1,onAnimationComplete:()=>null}):t.jsxs(t.Fragment,{children:[t.jsx(Mh,{onClick:j=>{j.stopPropagation()},children:t.jsx(ys,{"data-testid":z("missing-receipts-file-input",e.id),name:`missing-receipts-${e.id}`,fileRef:g,sizeLimit:qn,multiple:!1,acceptableTypes:[...Zr],onFileChange:y,onFileSizeError:(j,v)=>{j&&d(e.id,"Error",{code:500,message:v===!0?kh.replace("__maxFileSize__",Zo(qn,0)):Ih.replace("__maxFileSize__",Zo(qn,0))})}})}),t.jsx(we,{display:"flex",placement:"bottom",title:Th,enterDelay:600,children:t.jsx(Oh,{onClick:j=>{j.stopPropagation(),b()}})})]})})},L);case"amount":{const j=Je("0,0.[00]",e.amount);return t.jsx(Ut,{windowSize:m,wrapperWidth:k.width,children:t.jsx(qt,{windowSize:m,isLastItem:C===S.length-1,children:t.jsx(it,{text:e.amount.amount<0?`-${j}`:j,itemTextStyle:{...Dt.standardRegular.cssObject,color:"inherit"}})})},L)}}})})},Eh=()=>{const e=ke(),n=s.useRef(null),[c,r]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&r(n.current.offsetWidth)},[e]),t.jsx(ha,{windowSize:e,isCompressedMode:!1,ref:n,children:pn.map((p,h)=>{const i=`${h}${ua}${p.key}`;switch(p.key){case"vendor":return t.jsx(Ut,{windowSize:e,wrapperWidth:p.width,children:t.jsx(qt,{windowSize:e,isLastItem:h===pn.length-1,children:t.jsxs(zn,{children:[t.jsx(Mo,{width:x[4],height:x[4]}),t.jsx(Mt,{width:c*p.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(Ut,{windowSize:e,wrapperWidth:p.width,children:t.jsx(qt,{windowSize:e,isLastItem:h===pn.length-1,children:t.jsx(Mt,{width:c*p.width.value(e)/100,height:x[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},ha=a.div`
949
949
  display: flex;
950
950
  background-color: ${e=>e.theme.colors.grey5};
951
- padding-left: ${e=>On.containerPaddingLeftRight.valuePx(e.windowSize)};
952
- padding-right: ${e=>On.containerPaddingLeftRight.valuePx(e.windowSize)};
953
- padding-top: ${e=>On.containerPaddingTopBottom.valuePx(e.windowSize)};
954
- padding-bottom: ${e=>On.containerPaddingTopBottom.valuePx(e.windowSize)};
951
+ padding-left: ${e=>Dn.containerPaddingLeftRight.valuePx(e.windowSize)};
952
+ padding-right: ${e=>Dn.containerPaddingLeftRight.valuePx(e.windowSize)};
953
+ padding-top: ${e=>Dn.containerPaddingTopBottom.valuePx(e.windowSize)};
954
+ padding-bottom: ${e=>Dn.containerPaddingTopBottom.valuePx(e.windowSize)};
955
955
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
956
956
  box-shadow: ${e=>`${o.sp0} 2px ${o.sp1} ${e.theme.colors.dropShadowNormal}`};
957
957
  border-radius: ${o.sp2};
@@ -988,39 +988,39 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
988
988
  height: ${o.sp3};
989
989
  width: ${o.sp3};
990
990
  cursor: pointer;
991
- `,Oh=a(Un)`
991
+ `,Oh=a(Hn)`
992
992
  ${Dh};
993
993
  color: ${e=>e.theme.colors.brandColorGoldDark};
994
994
  &:hover {
995
995
  color: ${e=>e.theme.colors.primary};
996
996
  }
997
- `,qt=a(Pe)`
997
+ `,qt=a(Be)`
998
998
  overflow: hidden;
999
999
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1000
1000
  display: flex;
1001
1001
  width: 100%;
1002
1002
  align-items: center;
1003
- `,Mh=a.div``,_n=a.div`
1003
+ `,Mh=a.div``,zn=a.div`
1004
1004
  display: flex;
1005
1005
  flex-direction: row;
1006
1006
  column-gap: ${o.sp2};
1007
1007
  align-items: center;
1008
- `,Fh=a(Pe)`
1008
+ `,Fh=a(Be)`
1009
1009
  ${Rh};
1010
1010
  color: inherit;
1011
1011
  `,zh=a.div`
1012
1012
  display: flex;
1013
- `,_h=({sortConfig:e,fetchState:n,isDisabled:c,onColumnSortConfigChanged:r})=>{const p=ke();return t.jsxs(Ph,{windowSize:p,children:[t.jsx(ua,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":c,onColumnSortConfigChanged:r}),t.jsx(Bh,{windowSize:p,children:[...Array(3)].map((h,i)=>t.jsx(Eh,{},i))})]})},Ph=a.div`
1013
+ `,_h=({sortConfig:e,fetchState:n,isDisabled:c,onColumnSortConfigChanged:r})=>{const p=ke();return t.jsxs(Bh,{windowSize:p,children:[t.jsx(da,{sortConfig:e,isDisabled:n==="In-Progress"?"readonly":c,onColumnSortConfigChanged:r}),t.jsx(Ph,{windowSize:p,children:[...Array(3)].map((h,i)=>t.jsx(Eh,{},i))})]})},Bh=a.div`
1014
1014
  display: block;
1015
1015
  min-height: 100%;
1016
1016
  flex-direction: column;
1017
1017
  width: 100%;
1018
- `,Bh=a.div`
1018
+ `,Ph=a.div`
1019
1019
  display: flex;
1020
1020
  min-height: 100%;
1021
1021
  flex-direction: column;
1022
1022
  row-gap: ${o.sp3};
1023
- `,{common:Nh}=Ie.getLocalizedStrings(),Vh=({missingReceipts:e,receiptUploadEndpoint:n,authParams:c,selectedPeriod:r,isDisabled:p,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:l,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const g=ke(),{fetchState:f,uiState:y,transactions:b}=e;Cn({componentName:"expense_automation.missing_receipts",enabled:f==="Completed"});const S=s.useRef(null),[k,C]=s.useState(!1);s.useEffect(()=>{S.current?.resetAfterIndex(0)},[g,S]),s.useEffect(()=>{f==="Completed"&&C(!1)},[f]);const L=v=>ih,j=(v,A)=>{m({sortOrder:A,sortKey:v})};return t.jsxs(Uh,{children:[t.jsx(qh,{windowSize:g,children:f==="Error"?t.jsxs(Jh,{windowSize:g,children:[t.jsx(Gh,{onClick:()=>u(),"data-testid":z("missing-receipts-list-table-reload-button"),children:t.jsx(Ao,{})}),t.jsx(Zh,{children:Nh.reloadPage.label})]}):f==="Completed"&&b.length===0?t.jsx(St,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):f==="Not-Started"||f==="In-Progress"&&b.length===0?t.jsx(_h,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},fetchState:f,onColumnSortConfigChanged:j}):t.jsx(Kh,{windowSize:g,children:t.jsx(Nn,{children:({height:v,width:A})=>t.jsxs(Xh,{style:{height:v,width:A},children:[t.jsx(Hh,{children:t.jsx(ua,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},isDisabled:f==="In-Progress"?"readonly":p,onColumnSortConfigChanged:j})}),t.jsx(Vn,{ref:S,height:v-ra,innerElementType:ma,itemCount:b.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:c,isDisabled:p,selectedPeriod:r,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:l},itemSize:L,width:A,style:{willChange:"auto"},overscanCount:sh,onScroll:({scrollOffset:T})=>{m({scrollPosition:{scrollTop:T}})},initialScrollOffset:y.scrollPosition?.scrollTop,children:Wh})]})})})}),t.jsx(We,{controller:k===!0,children:t.jsx(Qh,{children:t.jsx(ws,{size:"Small",start:!0})})})]})},Wh=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Oo(),{missingReceipts:p,receiptUploadEndpoint:h,authParams:i,onMissingReceiptsRowClick:d,onUploadReceiptComplete:l,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,selectedPeriod:g}=c,f=p.transactions[e],y=r!=null&&r===f.id;return t.jsx(Yh,{isPanelSelected:y,style:{...n,width:"100%"},children:t.jsx(Ah,{transaction:f,receiptUploadEndpoint:h,authParams:i,selectedPeriod:g,onMissingReceiptsRowClick:d,onUploadReceiptComplete:l,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,uploadReceiptsFetchState:p.uploadReceiptStatusById[f.id]??{fetchState:"Not-Started",error:void 0}},f.id)})},Hh=a.div`
1023
+ `,{common:Nh}=Ie.getLocalizedStrings(),Vh=({missingReceipts:e,receiptUploadEndpoint:n,authParams:c,selectedPeriod:r,isDisabled:p,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:l,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:u})=>{const g=ke(),{fetchState:f,uiState:y,transactions:b}=e,S=s.useRef(null),[k,C]=s.useState(!1);s.useEffect(()=>{S.current?.resetAfterIndex(0)},[g,S]),s.useEffect(()=>{f==="Completed"&&C(!1)},[f]);const L=v=>ih,j=(v,A)=>{m({sortOrder:A,sortKey:v})};return t.jsxs(Uh,{children:[t.jsx(qh,{windowSize:g,children:f==="Error"?t.jsxs(Jh,{windowSize:g,children:[t.jsx(Gh,{onClick:()=>u(),"data-testid":z("missing-receipts-list-table-reload-button"),children:t.jsx(Lo,{})}),t.jsx(Zh,{children:Nh.reloadPage.label})]}):f==="Completed"&&b.length===0?t.jsx(St,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):f==="Not-Started"||f==="In-Progress"&&b.length===0?t.jsx(_h,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},fetchState:f,onColumnSortConfigChanged:j}):t.jsx(Kh,{windowSize:g,children:t.jsx(Pn,{children:({height:v,width:A})=>t.jsxs(Xh,{style:{height:v,width:A},children:[t.jsx(Hh,{children:t.jsx(da,{sortConfig:{sortKey:y.sortKey,sortOrder:y.sortOrder},isDisabled:f==="In-Progress"?"readonly":p,onColumnSortConfigChanged:j})}),t.jsx(Nn,{ref:S,height:v-aa,innerElementType:pa,itemCount:b.length,itemData:{missingReceipts:e,receiptUploadEndpoint:n,authParams:c,isDisabled:p,selectedPeriod:r,onMissingReceiptsRowClick:h,onUploadReceiptComplete:i,onUploadReceiptAttachment:d,onUploadReceiptFetchStatus:l},itemSize:L,width:A,style:{willChange:"auto"},overscanCount:sh,onScroll:({scrollOffset:T})=>{m({scrollPosition:{scrollTop:T}})},initialScrollOffset:y.scrollPosition?.scrollTop,children:Wh})]})})})}),t.jsx(We,{controller:k===!0,children:t.jsx(Qh,{children:t.jsx(Cs,{size:"Small",start:!0})})})]})},Wh=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Do(),{missingReceipts:p,receiptUploadEndpoint:h,authParams:i,onMissingReceiptsRowClick:d,onUploadReceiptComplete:l,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,selectedPeriod:g}=c,f=p.transactions[e],y=r!=null&&r===f.id;return t.jsx(Yh,{isPanelSelected:y,style:{...n,width:"100%"},children:t.jsx(Ah,{transaction:f,receiptUploadEndpoint:h,authParams:i,selectedPeriod:g,onMissingReceiptsRowClick:d,onUploadReceiptComplete:l,onUploadReceiptAttachment:m,onUploadReceiptFetchStatus:u,uploadReceiptsFetchState:p.uploadReceiptStatusById[f.id]??{fetchState:"Not-Started",error:void 0}},f.id)})},Hh=a.div`
1024
1024
  width: auto;
1025
1025
  max-width: var(--side-panel-list-width, 100%);
1026
1026
  padding-right: var(--side-panel-list-item-pr, 0px);
@@ -1038,7 +1038,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1038
1038
  `,Jh=a.div`
1039
1039
  display: flex;
1040
1040
  width: 100%;
1041
- height: ${e=>`calc(100% - ${ks.valuePx(e.windowSize)})`};
1041
+ height: ${e=>`calc(100% - ${js.valuePx(e.windowSize)})`};
1042
1042
  flex-direction: column;
1043
1043
  justify-content: center;
1044
1044
  align-items: center;
@@ -1068,12 +1068,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1068
1068
  box-sizing: border-box;
1069
1069
  ${e=>e.isPanelSelected===!0&&De`
1070
1070
  .missing-receipts-row-card {
1071
- ${Po(e.theme)}
1071
+ ${_o(e.theme)}
1072
1072
  }
1073
1073
  `}
1074
1074
  `,Xh=a.div`
1075
1075
  position: relative;
1076
- `,ma=s.forwardRef((e,n)=>{const{style:c,...r}=e;return t.jsx("div",{ref:n,style:{...c,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});ma.displayName="Missing receipts inner element type";const Qh=a.div`
1076
+ `,pa=s.forwardRef((e,n)=>{const{style:c,...r}=e;return t.jsx("div",{ref:n,style:{...c,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",position:"relative"},...r})});pa.displayName="Missing receipts inner element type";const Qh=a.div`
1077
1077
  display: flex;
1078
1078
  width: 100%;
1079
1079
  height: ${o.sp3};
@@ -1084,7 +1084,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1084
1084
  margin-bottom: ${o.sp3};
1085
1085
  `,ep=[...qr],tp=7*1024*100,np=a.div`
1086
1086
  width: ${un}px;
1087
- `,io=a.div`
1087
+ `,oo=a.div`
1088
1088
  width: ${e=>`${e.availableWidth}px`};
1089
1089
  min-width: auto;
1090
1090
  position: relative;
@@ -1104,7 +1104,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1104
1104
  margin-bottom: ${o.sp2};
1105
1105
 
1106
1106
  // Disable select for Zeni Logo and File Separator
1107
- #${ys} img[alt*="company logo"],
1107
+ #${fs} img[alt*="company logo"],
1108
1108
  .attachFileSeparator {
1109
1109
  user-select: none;
1110
1110
  }
@@ -1116,7 +1116,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1116
1116
  margin-bottom: ${o.sp3};
1117
1117
  `,sp=a.div`
1118
1118
  position: relative;
1119
- `,Ni=a(Pe)`
1119
+ `,Pi=a(Be)`
1120
1120
  position: relative;
1121
1121
  `,ap=a.div`
1122
1122
  background-color: ${e=>e.theme.colors.grey5};
@@ -1155,20 +1155,20 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1155
1155
  `,dp=a(It)`
1156
1156
  color: ${e=>e.theme.colors.grey1};
1157
1157
  user-select: none;
1158
- `,up=a(js)`
1158
+ `,up=a(Ss)`
1159
1159
  color: ${e=>e.theme.colors.primary};
1160
1160
  `,hp=a.div`
1161
1161
  flex-direction: column;
1162
1162
  row-gap: ${o.sp3};
1163
1163
  display: flex;
1164
- `,pp=zo`
1164
+ `,pp=Fo`
1165
1165
  0% {
1166
1166
  transform: translateX(100%);
1167
1167
  }
1168
1168
  100% {
1169
1169
  transform: translateX(0)
1170
1170
  }
1171
- `,mp=zo`
1171
+ `,mp=Fo`
1172
1172
  0% {
1173
1173
  transform: translateX(0)
1174
1174
  }
@@ -1183,9 +1183,9 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1183
1183
  right: ${o.sp0};
1184
1184
  top: ${o.sp0};
1185
1185
  z-index: ${x[2]};
1186
- min-width: ${gs}px;
1187
- max-width: ${ms}px;
1188
- `,Pn="monthEndReportFormSection",Vi="monthEndReportPage",Ye=Ie.getLocalizedStrings();function xp({companyId:e,enableZeniGPTFeature:n,monthEndReportView:c,previewMode:r,customerRequestData:p,allThreadsSectionOpen:h,filterMetaData:i,newThreadMetadata:d,isZeniUser:l,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:g,onUpdateFileAttachment:f,onCloseAllThreadsSection:y,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:k,onOpenFileAttachmentSnackBar:C,onClickCustomerRequest:L,sendMonthEndReport:j}){const v=kt(),[A,T]=s.useState(),[I,R]=s.useState(0),[w,D]=s.useState(0),V=s.useRef(),q=s.useRef(null),B=s.useRef(null),{html:N,subject:P,improveUsingZeniGPTStatus:ie}=c,[U,re]=s.useState(),[oe,X]=s.useState(!1),[se,ge]=s.useState(!1),Y=s.useRef(null),le=s.useRef(null),K=_a(h,250),M=c.fetchState==="Not-Started"||c.fetchState==="In-Progress"||c.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||c.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:O,sortedThreads:J,threadsPositions:G,observer:W,unresolvedThreadsMap:E,handleRemoveFloatingThread:_}=Pa(i,Y,!r,M,l),H=s.useCallback(()=>{h?le.current!=null&&D(Math.min((le.current.offsetWidth-un-x[4])/2,le.current.offsetWidth-un-ms-x[4])):le.current!=null&&R(Math.min((le.current.offsetWidth-un-x[4])/2,le.current.offsetWidth-un-gs-x[4]))},[h]);s.useEffect(()=>{H()},[h,H]),s.useEffect(()=>(window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}),[H]);const F=l?ls:cs,{openThread:he,addThread:te,setOpenThread:ee}=s.useContext(F),xe=Ba(Go,!1,!r),$e=Y.current?.getBoundingClientRect(),$=xe!=null&&xe.coords&&$e?{left:xe.coords.left-$e.left,top:xe.coords.top-$e.top}:void 0,ne=s.useCallback(()=>{const Oe=window.getSelection()?.getRangeAt(0),ue=Na();if(!Oe||ue==null)return;const Se={...d,...ue,startPath:ue.startPath.join(),endPath:ue.endPath.join()},pe=`${fs()}${xs}`,st=`cockpit_${e}`;te(pe,{type:"thread",id:pe,roomId:st,createdAt:new Date,comments:[],metadata:Se,updatedAt:new Date,resolved:!1}),ee(pe)},[te,e,d,ee]);s.useEffect(()=>{he!=null&&h&&y()},[h,he,y]);const be=ie.fetchState==="In-Progress",Le=Jt({mode:"all",defaultValues:Wi(c),values:Wi(c)}),Be=Le.handleSubmit(Oe=>{const{recipientEmailList:ue,subject:Se}=Oe[Pn];if(r===!0)j?.(U?.id);else{const pe=A?.replace(Va,Ye.common.strings.empty);ue!=null&&Se!=null&&b(ue,Se,U?.id,pe!=null&&pe.length>0?A:void 0)}}),Ne=()=>{q.current!=null&&q.current.click()},ye=()=>{U!==void 0&&U!=null&&(g([U.id]),re(void 0),X(!1))},et=Oe=>{const ue=Oe.target.files?Oe.target.files[0]:null;if(ue)if(!Kr(ue.type)||se)console.warn("Please select a valid file.");else{const Se=new FileReader;Se.onload=function(pe){const st=pe.target?.result;if(typeof st=="string"){const lt={data:st.split(",")[1],name:ue.name,id:Jr(e,ue.name)};re(lt),X(!0),f([lt])}},Se.readAsDataURL(ue)}},Ge=()=>{B.current&&B.current.scrollIntoView({behavior:"smooth"})},Ze=()=>{const Oe=Le.getValues(),{recipientEmailList:ue,subject:Se}=Oe[Pn];ue!=null&&Se!=null&&S(ue,Se,U?.id,A)};s.useEffect(()=>{T(c.zeniRequestsHtml)},[c.zeniRequestsHtml]),s.useEffect(()=>{V.current=U},[U]),s.useEffect(()=>{re(Ur(c.attachmentFile)),X(!1)},[c.attachmentFile]),s.useEffect(()=>{se&&C()},[se,C]);const de=jo(`${m.year}-${m.month}-01`).format(Ye.dateFormat.visual.MMMMFormat),_e=N!=null?N.split(Wa):[],xt=c.concatenatedHtml,$t=()=>c.lastDraftSavedDate!=null&&r===!1?t.jsx(pr,{time:c.lastDraftSavedDate,user:c.reportLastSavedByUser,timeStampLabel:Ye.cockpit.monthEndReport.timeStampLabel}):null,Tt=()=>l===!0?K?t.jsxs(t.Fragment,{children:[t.jsx(gp,{allThreadsSectionOpen:h,children:t.jsx(ur,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${v.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Qe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:v.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Ye.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Oe,ue)=>{ee(ue);const Se=J.findIndex(pe=>pe[0]===ue);y(),O.current?.[Se]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(io,{availableWidth:I})]}):t.jsx(hr,{observer:W,canvasContainerRef:Y,sortedThreads:J,threadsPositions:G,threadsRefs:O,unresolvedThreadsMap:E,editorMode:!r,style:{minWidth:`${I}px`,position:"relative",height:"fit-content",top:`${Y.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:_}):t.jsx(io,{availableWidth:I}),ft=(c.zeniRequestsData??[]).length+Ha(c.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(op,{ref:le,children:[t.jsx(io,{availableWidth:h?w:I}),t.jsxs(np,{children:[t.jsx(Gt,{...Le,children:t.jsx("form",{id:Hi(Vi),onSubmit:Be,children:t.jsxs(hp,{children:[t.jsx(Ua,{sectionId:Pn,previewMode:r,subject:P}),!r&&ft>0?t.jsx(qa,{totalItems:ft,onClickCustomerRequest:L}):null,t.jsxs(ap,{id:Go,ref:Y,children:[t.jsxs(rp,{className:"monthEndReportCanvasWrapper",children:[U!=null||se?t.jsx(lp,{"data-testid":z("email-attachment-container"),onClick:Ge,children:t.jsx(Ka,{fileSizeError:se,setFileSizeError:ge,loading:!1,showAnimation:!r&&oe})}):null,r?t.jsx(Ni,{dangerouslySetInnerHTML:{__html:Ja(xt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(sp,{id:Ga,children:[t.jsx(Pe,{dangerouslySetInnerHTML:{__html:_e[0]!=null?_e[0]+"</body></html>":Ye.common.strings.empty}}),t.jsxs(ip,{children:[t.jsx(up,{children:Ye.cockpit.monthEndReport.editorTitle}),t.jsx(dp,{children:Ye.cockpit.monthEndReport.editorNote})]})]}),t.jsx(cp,{id:Za,children:t.jsx(Ya,{handleFileInputClick:Ne,fileAttached:U!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:be,initialHtmlString:c.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:T,customerRequestData:p})}),t.jsx(Ni,{id:ys,dangerouslySetInnerHTML:{__html:_e[1]!=null?"<html><body>"+_e[1]:Ye.common.strings.empty}})]}),U!=null?t.jsx(Xa,{ref:B,fileName:U.name,fileSize:Qa(U.data),onRemove:ye,isRemovable:!r}):null]}),$?t.jsx(er,{style:{zIndex:15},coords:$,alignment:xe.alignment,onClick:ne}):null,t.jsx(tr,{canvasContainerRef:Y,sortedThreads:J,editorMode:!r,isZeniUser:l})]})]})})}),t.jsx(Cs,{name:U?.name??Ye.common.strings.empty,fileRef:q,sizeLimit:tp,acceptableTypes:ep,onFileChange:async Oe=>{et(Oe)},onFileSizeError:Oe=>ge(Oe),multiple:!1})]}),Tt()]}),t.jsx(ds,{style:{zIndex:10},leftSideComponent:$t(),formId:Hi(Vi),cancelBtn:{isDisabled:be,label:r===!0?Ye.cockpit.monthEndReport.editButtonLabel:Ye.cockpit.monthEndReport.saveChanges,onClick:r===!0?k:Ze,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:c.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:be,isLoading:r===!0?c.sendMonthEndReportStatus.fetchState==="In-Progress":c.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?Ye.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",de):Ye.cockpit.monthEndReport.preview,size:"medium"}})]})}const Wi=e=>({[Pn]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Ye.common.strings.empty}}),Hi=e=>`${e}_form`;Dt.smallBold.lineHeightValue;const fp=1,yp=50,Ui=56,Cp=["memo","activity"],qi=e=>zs(e,Cp),{common:{strings:{empty:ga}},expenseAutomation:{transactions:{header:{vendors:wp,category:bp,classText:vp,date:Sp,type:jp,amount:kp}}}}=Ie.getLocalizedStrings(),xa={key:"vendor",value:wp,sortOrder:"ascending",width:new Z(18,18),customStyle:{common:{paddingLeft:x[7]}}},Ip={key:"category",value:bp,sortOrder:"ascending",width:new Z(20,20),customStyle:{common:{paddingLeft:x[7]}}},$p={key:"class",value:vp,sortOrder:"ascending",width:new Z(18,18),customStyle:{common:{paddingLeft:x[7]}}},Tp={key:"date",value:Sp,sortOrder:"descending",width:new Z(11,11),customStyle:{common:{paddingLeft:12}}},Lp={key:"transaction_type",value:jp,sortOrder:"descending",width:new Z(13,13),customStyle:{common:{paddingLeft:x[3]}}},Ap={key:"memo",value:ga,sortOrder:"ascending",width:new Z(6,6),customStyle:{common:{}}},fa={key:"amount",value:kp,sortOrder:"ascending",width:new Z(10,10),customStyle:{common:{paddingRight:x[4]}}},Ep={key:"activity",value:ga,sortOrder:"ascending",width:new Z(4,4),customStyle:{common:{}}},Jo=e=>{const n=[xa,Ip,$p,Tp,Lp,Ap,fa];return e===!0&&n.push(Ep),n},ya=[{...xa,width:new Z(65,65)},{...fa,width:new Z(30,30)}],so={sortKey:"date",sortOrder:"descending"},Ca=({sortConfig:e,isDisabled:n,isTransactionActivityEnabled:c,onColumnSortConfigChanged:r})=>{const p=ke(),h=Ft(),i=h?ya:Jo(c),[d,l]=s.useState(So(i));s.useEffect(()=>{const g=So(i);for(const f of g)f.key===e.sortKey?f.sortOrder=e.sortOrder:f.sortOrder="ascending";l(g)},[e.sortKey,e.sortOrder,h]);const m=(g,f)=>{let y=f;e.sortKey===g&&(y=f==="ascending"?"descending":"ascending"),r(g,y)},u=g=>{qi(g.key)==null&&m(Xr(g.key),g.sortOrder)};return t.jsx(Rp,{windowSize:p,"data-testid":z("transaction-categorization-header-container"),children:d.map((g,f)=>{const y=n!=null||qi(g.key)!=null;return t.jsxs(Dp,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,windowSize:p,isLastItem:f===d.length-1,"data-testid":z("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(_p,{"data-testid":z("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>u(g),isSortDisabled:y,children:[t.jsx(Pp,{children:g.value}),y?null:t.jsx(Mp,{sortConfig:e,headerData:g,"data-testid":z("transaction-categorization-sort-icon",g.key),children:t.jsx(zp,{})})]}),y?null:t.jsx(Fp,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==so.sortKey,"data-testid":z("transaction-categorization-close-icon",g.key),children:t.jsx(Op,{onClick:()=>{m(so.sortKey,so.sortOrder)},"data-testid":z("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},Rp=a.div`
1186
+ min-width: ${ms}px;
1187
+ max-width: ${ps}px;
1188
+ `,_n="monthEndReportFormSection",Ni="monthEndReportPage",Ye=Ie.getLocalizedStrings();function xp({companyId:e,enableZeniGPTFeature:n,monthEndReportView:c,previewMode:r,customerRequestData:p,allThreadsSectionOpen:h,filterMetaData:i,newThreadMetadata:d,isZeniUser:l,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:g,onUpdateFileAttachment:f,onCloseAllThreadsSection:y,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:k,onOpenFileAttachmentSnackBar:C,onClickCustomerRequest:L,sendMonthEndReport:j}){const v=kt(),[A,T]=s.useState(),[I,R]=s.useState(0),[w,D]=s.useState(0),V=s.useRef(),q=s.useRef(null),P=s.useRef(null),{html:N,subject:B,improveUsingZeniGPTStatus:ie}=c,[U,re]=s.useState(),[oe,X]=s.useState(!1),[se,ge]=s.useState(!1),Y=s.useRef(null),le=s.useRef(null),K=za(h,250),M=c.fetchState==="Not-Started"||c.fetchState==="In-Progress"||c.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||c.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:O,sortedThreads:J,threadsPositions:G,observer:W,unresolvedThreadsMap:E,handleRemoveFloatingThread:_}=_a(i,Y,!r,M,l),H=s.useCallback(()=>{h?le.current!=null&&D(Math.min((le.current.offsetWidth-un-x[4])/2,le.current.offsetWidth-un-ps-x[4])):le.current!=null&&R(Math.min((le.current.offsetWidth-un-x[4])/2,le.current.offsetWidth-un-ms-x[4]))},[h]);s.useEffect(()=>{H()},[h,H]),s.useEffect(()=>(window.addEventListener("resize",H),()=>{window.removeEventListener("resize",H)}),[H]);const F=l?rs:ls,{openThread:he,addThread:te,setOpenThread:ee}=s.useContext(F),xe=Ba(Jo,!1,!r),$e=Y.current?.getBoundingClientRect(),$=xe!=null&&xe.coords&&$e?{left:xe.coords.left-$e.left,top:xe.coords.top-$e.top}:void 0,ne=s.useCallback(()=>{const Oe=window.getSelection()?.getRangeAt(0),ue=Pa();if(!Oe||ue==null)return;const Se={...d,...ue,startPath:ue.startPath.join(),endPath:ue.endPath.join()},pe=`${xs()}${gs}`,st=`cockpit_${e}`;te(pe,{type:"thread",id:pe,roomId:st,createdAt:new Date,comments:[],metadata:Se,updatedAt:new Date,resolved:!1}),ee(pe)},[te,e,d,ee]);s.useEffect(()=>{he!=null&&h&&y()},[h,he,y]);const be=ie.fetchState==="In-Progress",Le=Jt({mode:"all",defaultValues:Vi(c),values:Vi(c)}),Pe=Le.handleSubmit(Oe=>{const{recipientEmailList:ue,subject:Se}=Oe[_n];if(r===!0)j?.(U?.id);else{const pe=A?.replace(Na,Ye.common.strings.empty);ue!=null&&Se!=null&&b(ue,Se,U?.id,pe!=null&&pe.length>0?A:void 0)}}),Ne=()=>{q.current!=null&&q.current.click()},ye=()=>{U!==void 0&&U!=null&&(g([U.id]),re(void 0),X(!1))},et=Oe=>{const ue=Oe.target.files?Oe.target.files[0]:null;if(ue)if(!Kr(ue.type)||se)console.warn("Please select a valid file.");else{const Se=new FileReader;Se.onload=function(pe){const st=pe.target?.result;if(typeof st=="string"){const lt={data:st.split(",")[1],name:ue.name,id:Jr(e,ue.name)};re(lt),X(!0),f([lt])}},Se.readAsDataURL(ue)}},Ge=()=>{P.current&&P.current.scrollIntoView({behavior:"smooth"})},Ze=()=>{const Oe=Le.getValues(),{recipientEmailList:ue,subject:Se}=Oe[_n];ue!=null&&Se!=null&&S(ue,Se,U?.id,A)};s.useEffect(()=>{T(c.zeniRequestsHtml)},[c.zeniRequestsHtml]),s.useEffect(()=>{V.current=U},[U]),s.useEffect(()=>{re(Ur(c.attachmentFile)),X(!1)},[c.attachmentFile]),s.useEffect(()=>{se&&C()},[se,C]);const de=So(`${m.year}-${m.month}-01`).format(Ye.dateFormat.visual.MMMMFormat),_e=N!=null?N.split(Va):[],xt=c.concatenatedHtml,$t=()=>c.lastDraftSavedDate!=null&&r===!1?t.jsx(pr,{time:c.lastDraftSavedDate,user:c.reportLastSavedByUser,timeStampLabel:Ye.cockpit.monthEndReport.timeStampLabel}):null,Tt=()=>l===!0?K?t.jsxs(t.Fragment,{children:[t.jsx(gp,{allThreadsSectionOpen:h,children:t.jsx(ur,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${v.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Qe.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:v.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Ye.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Oe,ue)=>{ee(ue);const Se=J.findIndex(pe=>pe[0]===ue);y(),O.current?.[Se]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(oo,{availableWidth:I})]}):t.jsx(hr,{observer:W,canvasContainerRef:Y,sortedThreads:J,threadsPositions:G,threadsRefs:O,unresolvedThreadsMap:E,editorMode:!r,style:{minWidth:`${I}px`,position:"relative",height:"fit-content",top:`${Y.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:_}):t.jsx(oo,{availableWidth:I}),ft=(c.zeniRequestsData??[]).length+Wa(c.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(op,{ref:le,children:[t.jsx(oo,{availableWidth:h?w:I}),t.jsxs(np,{children:[t.jsx(Gt,{...Le,children:t.jsx("form",{id:Wi(Ni),onSubmit:Pe,children:t.jsxs(hp,{children:[t.jsx(Ha,{sectionId:_n,previewMode:r,subject:B}),!r&&ft>0?t.jsx(Ua,{totalItems:ft,onClickCustomerRequest:L}):null,t.jsxs(ap,{id:Jo,ref:Y,children:[t.jsxs(rp,{className:"monthEndReportCanvasWrapper",children:[U!=null||se?t.jsx(lp,{"data-testid":z("email-attachment-container"),onClick:Ge,children:t.jsx(qa,{fileSizeError:se,setFileSizeError:ge,loading:!1,showAnimation:!r&&oe})}):null,r?t.jsx(Pi,{dangerouslySetInnerHTML:{__html:Ka(xt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(sp,{id:Ja,children:[t.jsx(Be,{dangerouslySetInnerHTML:{__html:_e[0]!=null?_e[0]+"</body></html>":Ye.common.strings.empty}}),t.jsxs(ip,{children:[t.jsx(up,{children:Ye.cockpit.monthEndReport.editorTitle}),t.jsx(dp,{children:Ye.cockpit.monthEndReport.editorNote})]})]}),t.jsx(cp,{id:Ga,children:t.jsx(Za,{handleFileInputClick:Ne,fileAttached:U!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:be,initialHtmlString:c.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:T,customerRequestData:p})}),t.jsx(Pi,{id:fs,dangerouslySetInnerHTML:{__html:_e[1]!=null?"<html><body>"+_e[1]:Ye.common.strings.empty}})]}),U!=null?t.jsx(Ya,{ref:P,fileName:U.name,fileSize:Xa(U.data),onRemove:ye,isRemovable:!r}):null]}),$?t.jsx(Qa,{style:{zIndex:15},coords:$,alignment:xe.alignment,onClick:ne}):null,t.jsx(er,{canvasContainerRef:Y,sortedThreads:J,editorMode:!r,isZeniUser:l})]})]})})}),t.jsx(ys,{name:U?.name??Ye.common.strings.empty,fileRef:q,sizeLimit:tp,acceptableTypes:ep,onFileChange:async Oe=>{et(Oe)},onFileSizeError:Oe=>ge(Oe),multiple:!1})]}),Tt()]}),t.jsx(cs,{style:{zIndex:10},leftSideComponent:$t(),formId:Wi(Ni),cancelBtn:{isDisabled:be,label:r===!0?Ye.cockpit.monthEndReport.editButtonLabel:Ye.cockpit.monthEndReport.saveChanges,onClick:r===!0?k:Ze,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:c.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:be,isLoading:r===!0?c.sendMonthEndReportStatus.fetchState==="In-Progress":c.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?Ye.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",de):Ye.cockpit.monthEndReport.preview,size:"medium"}})]})}const Vi=e=>({[_n]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Ye.common.strings.empty}}),Wi=e=>`${e}_form`;Dt.smallBold.lineHeightValue;const fp=1,yp=50,Hi=56,Cp=["memo","activity"],Ui=e=>Fs(e,Cp),{common:{strings:{empty:ma}},expenseAutomation:{transactions:{header:{vendors:wp,category:bp,classText:vp,date:Sp,type:jp,amount:kp}}}}=Ie.getLocalizedStrings(),ga={key:"vendor",value:wp,sortOrder:"ascending",width:new Z(18,18),customStyle:{common:{paddingLeft:x[7]}}},Ip={key:"category",value:bp,sortOrder:"ascending",width:new Z(20,20),customStyle:{common:{paddingLeft:x[7]}}},$p={key:"class",value:vp,sortOrder:"ascending",width:new Z(18,18),customStyle:{common:{paddingLeft:x[7]}}},Tp={key:"date",value:Sp,sortOrder:"descending",width:new Z(11,11),customStyle:{common:{paddingLeft:12}}},Lp={key:"transaction_type",value:jp,sortOrder:"descending",width:new Z(13,13),customStyle:{common:{paddingLeft:x[3]}}},Ap={key:"memo",value:ma,sortOrder:"ascending",width:new Z(6,6),customStyle:{common:{}}},xa={key:"amount",value:kp,sortOrder:"ascending",width:new Z(10,10),customStyle:{common:{paddingRight:x[4]}}},Ep={key:"activity",value:ma,sortOrder:"ascending",width:new Z(4,4),customStyle:{common:{}}},Ko=e=>{const n=[ga,Ip,$p,Tp,Lp,Ap,xa];return e===!0&&n.push(Ep),n},fa=[{...ga,width:new Z(65,65)},{...xa,width:new Z(30,30)}],io={sortKey:"date",sortOrder:"descending"},ya=({sortConfig:e,isDisabled:n,isTransactionActivityEnabled:c,onColumnSortConfigChanged:r})=>{const p=ke(),h=Ft(),i=h?fa:Ko(c),[d,l]=s.useState(vo(i));s.useEffect(()=>{const g=vo(i);for(const f of g)f.key===e.sortKey?f.sortOrder=e.sortOrder:f.sortOrder="ascending";l(g)},[e.sortKey,e.sortOrder,h]);const m=(g,f)=>{let y=f;e.sortKey===g&&(y=f==="ascending"?"descending":"ascending"),r(g,y)},u=g=>{Ui(g.key)==null&&m(Xr(g.key),g.sortOrder)};return t.jsx(Rp,{windowSize:p,"data-testid":z("transaction-categorization-header-container"),children:d.map((g,f)=>{const y=n!=null||Ui(g.key)!=null;return t.jsxs(Dp,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,windowSize:p,isLastItem:f===d.length-1,"data-testid":z("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(_p,{"data-testid":z("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>u(g),isSortDisabled:y,children:[t.jsx(Bp,{children:g.value}),y?null:t.jsx(Mp,{sortConfig:e,headerData:g,"data-testid":z("transaction-categorization-sort-icon",g.key),children:t.jsx(zp,{})})]}),y?null:t.jsx(Fp,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==io.sortKey,"data-testid":z("transaction-categorization-close-icon",g.key),children:t.jsx(Op,{onClick:()=>{m(io.sortKey,io.sortOrder)},"data-testid":z("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},Rp=a.div`
1189
1189
  top: ${o.sp0};
1190
1190
  left: ${o.sp0};
1191
1191
  height: ${yp}px;
@@ -1209,7 +1209,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1209
1209
  position: static;
1210
1210
  z-index: 0;
1211
1211
  box-sizing: border-box;
1212
- `,Op=a(Hn)`
1212
+ `,Op=a(Wn)`
1213
1213
  width: 12px;
1214
1214
  height: 12px;
1215
1215
  `,Mp=a.div`
@@ -1225,7 +1225,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1225
1225
  &:hover {
1226
1226
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1227
1227
  }
1228
- `,zp=a(Wn)`
1228
+ `,zp=a(Vn)`
1229
1229
  width: ${o.sp2};
1230
1230
  height: ${o.sp2};
1231
1231
  `,_p=a.div`
@@ -1235,9 +1235,9 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1235
1235
  &:hover {
1236
1236
  color: ${e=>e.isSortDisabled?e.theme.colors.grey1:e.theme.colors.primary};
1237
1237
  }
1238
- `,Pp=a(gt)`
1238
+ `,Bp=a(gt)`
1239
1239
  display: flex;
1240
- `,ao="expenseAutomationTransactionsPage",Kt="transactionCategorizationListTable",Re="account",Xe="class",rt="lineEntitySelection",Bp="lineEntity",Np="recommendations",wa="lineInfo",Vp="vendorDetails",Wp="customerDetails",Bn="selectedTransactionIds",Et=(e,n,c)=>`${e}.${c}.${n}`,Hp=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"})),Up=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:qp,hyphen:Mn,empty:tn}},expenseAutomation:{transactions:wt},dateFormat:Kp}=Ie.getLocalizedStrings(),jt={containerPaddingLeftRight:new Z(x[3],x[4]),containerPaddingTopBottom:new Z(x[1],x[2]),containerPaddingTopBottomEmpty:new Z(x[2],x[3]),nameLogoWidth:new Z(x[2],x[4]),nameLogoHeight:new Z(x[2],x[4])},Jp=({transactionView:e,transaction:n,sectionId:c,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:p,selectedTab:h,containerRef:i,listContainerRef:d,isCOTEnabled:l,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:g,vendorLoadOptions:f,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:k,isTransactionActivityEnabled:C})=>{const L=ke(),j=Ft(),[v,A]=s.useState(!1),[T,I]=s.useState(!1),{lineItemById:R,sortedLineItems:w}=n.transactionReviewLocalData,D=n.transactionReviewLocalData.tabSpecificLineItems?.[h]||[],V=w.filter(E=>D.indexOf(E)!==-1),q=[];V.forEach(E=>{q.push(R[E])});const{accountList:B,accountsHierarchyList:N,classHierarchyList:P,classList:ie,uncategorizedAccounts:U,transactions:re,selectedCheckBoxTransactionIds:oe}=e,X=oe.includes(n.transactionId),se=kt(),ge={control:()=>({marginLeft:-2,backgroundColor:v?se.colors.background:se.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:x[0]}),menu:()=>({width:"150%",background:se.colors.grey5}),singleValue:()=>({color:v||X?se.colors.primary:se.colors.hero,paddingLeft:x[2]}),input:E=>({...E,color:v||X?se.colors.primary:se.colors.hero,textAlign:"left",paddingLeft:x[2]}),menuPortal:E=>({...E,zIndex:10})},Y={...ge,singleValue:E=>({...E,color:v||X?se.colors.primary:se.colors.hero}),menu:()=>({marginTop:x[1],marginLeft:-8}),input:E=>({...E,color:v||X?se.colors.primary:se.colors.hero,textAlign:"left"})},le=re.find(E=>E.id===n.transactionId),K=(E,_)=>{const{transactionType:H}=_.transactionReviewLocalData;let F=E.target;for(;F;){if(F.classList.contains("select-value-container")||F.classList.contains("item-value-container")||F.classList.contains("grouped-single-select-field__value-container")||F.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||F.classList.contains("grouped-single-select-field__input")||F.classList.contains("grouped-single-select-field__menu"))return;F=F.parentElement}H!=null&&u(_.transactionId,H)},M=s.useRef(null),[O,J]=s.useState(void 0),[G,W]=s.useState("bottom");return s.useEffect(()=>{if(O===void 0)return;const E=d?.current?._outerRef??null,_=()=>{const H=M.current;if(H==null||E==null)return;const F=H.getBoundingClientRect(),he=E.getBoundingClientRect(),te=E.scrollTop+(F.bottom-he.top),ee=E.scrollHeight-te;W(ee>=288?"bottom":"top")};return _(),window.addEventListener("resize",_),E?.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),E?.removeEventListener("scroll",_)}},[d,O]),t.jsxs(Zp,{onMouseEnter:j?void 0:()=>A(!0),onMouseLeave:j?void 0:()=>A(!1),children:[t.jsx(Xp,{className:"categorization-row-card",windowSize:L,isSelected:X,isCompressedMode:j,isHovered:v,children:t.jsx(Qp,{children:q.map((E,_)=>t.jsx(em,{ref:O===_?M:void 0,"data-testid":z("transaction-categorization-list-row",E.lineId),windowSize:L,onClick:H=>K(H,n),children:t.jsx(Gp,{isTransactionActivityEnabled:C,line:E,isHovered:v||X,isSelected:X,isCompressedMode:j,lineIndex:_,sectionId:c,transaction:n,currentTransaction:le,windowSize:L,accountsHierarchyList:N,classHierarchyList:P,allAccountList:B,allClassList:ie,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:p,setCurrentTransactionInAction:g,vendorLoadOptions:f,customStyle:ge,customStyleAutoComplete:Y,recommendations:E.recommendationsWithCOT,selectedTab:h,isCOTEnabled:l,menuPlacement:G,cotTracking:m,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,onDropdownClose:()=>J(void 0),onDropdownOpen:()=>J(_)})},`${n.transactionId}.${E.lineId}`))},n.transactionId)},n.transactionId),C===!0&&t.jsx(xm,{className:"activity-log-icon",onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),onClick:E=>{E.stopPropagation(),k(n.transactionId)},children:t.jsx(we,{title:wt.header.activity,placement:"bottom",children:t.jsx(fm,{style:{color:T?se.colors.primary:se.colors.hero}})})})]})},Gp=({accountsHierarchyList:e,allAccountList:n,allClassList:c,classHierarchyList:r,customStyle:p,customStyleAutoComplete:h,line:i,lineIndex:d,transaction:l,currentTransaction:m,windowSize:u,uncategorizedAccounts:g,isHovered:f=!1,isSelected:y=!1,isCompressedMode:b=!1,sectionId:S,recommendations:k,vendorSearchAutoCompleteData:C,selectedTab:L,isCOTEnabled:j,menuPlacement:v,cotTracking:A,openTooltipId:T,setCurrentTransactionInAction:I,vendorLoadOptions:R,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:D,isTransactionActivityEnabled:V,onDropdownClose:q,onDropdownOpen:B})=>{const{transactionDate:N,transactionType:P,transactionTypeName:ie,memo:U}=l.transactionReviewLocalData,{setValue:re}=Mo(),oe=s.useCallback((Ae,ve)=>{A?.onCOTView!=null&&A.onCOTView(i.lineId,l.transactionId,Ae,ve)},[A,i.lineId,l.transactionId]),X=i.lineDescription,se=s.useMemo(()=>{if(X||U)return[{title:wt.description,description:X||Mn},{title:wt.header.memo,description:U||Mn}]},[U,X]),ge=Et(S,rt,d.toString()),Y=Et(S,Re,d.toString()),le=Et(S,Xe,d.toString()),K=(Ae,ve)=>{if(b)return;let Te;switch(ve){case"vendor":Te=ge;break;case"category":Te=Y;break;case"class":Te=le;break;default:return}re(`${Te}.selectedOption`,Ae,{shouldValidate:!0,shouldDirty:!0})},M=kt(),O=s.useMemo(()=>m!=null&&Wt(m)===!0?{id:l.transactionReviewLocalData.customer?.id??"",logo:l.transactionReviewLocalData.customer?.logo,name:l.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,l.transactionReviewLocalData.customer?.id,l.transactionReviewLocalData.customer?.logo,l.transactionReviewLocalData.customer?.name]),J=s.useMemo(()=>m!=null&&Wt(m)===!0?{id:l.transactionReviewLocalData.vendor?.id??"",logo:l.transactionReviewLocalData.vendor?.logo,name:l.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,l.transactionReviewLocalData.vendor?.id,l.transactionReviewLocalData.vendor?.logo,l.transactionReviewLocalData.vendor?.name]),G=i[Xe]?.classId,W=i[Re]?.qboId??i[Re]?.accountId,E=O?.id,_=J?.id,H=J?.name,[F,he]=s.useState(!G),[te,ee]=s.useState(!W||i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!0),[xe,$e]=s.useState(!_||!E),$=Ae=>k?.find(ve=>ve.vendor?.qboId===Ae||ve.vendor?.id===Ae||ve.vendor?.name===Ae)?.vendor?.reason??"",ne=l.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],be=Es(e,ne),Le=As(r,ne),Be=Ae=>n.filter(ve=>ve.qboId===Ae)[0]?.qboId,Ne=Ae=>c.filter(ve=>ve.classId===Ae)[0]?.accountingClassNumber??void 0,ye=s.useCallback(Ae=>hn(g,Ae,D===!0?["income"]:void 0),[g,D]),[et,Ge]=s.useState(!1),[Ze,de]=s.useState(!1),[_e,xt]=s.useState(!1),$t=(Ae,ve)=>{I({transactionId:l.transactionId,lineItemId:i.lineId}),R(Ae,ve)},Tt=()=>{$e(!(_||E)),Ge(!1),q?.()},ft=()=>{W&&i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!1?ee(!1):ee(!0),xt(!1),q?.()},Oe=()=>{he(!G),de(!1),q?.()},ue=()=>{b||(_||E)&&(Ge(!0),B?.())},Se=()=>{b||(de(!0),B?.())},pe=()=>{b||(xt(!0),B?.())};s.useEffect(()=>{W&&i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!1?ee(!1):ee(!0)},[W]),s.useEffect(()=>{he(!G)},[G]),s.useEffect(()=>{$e(!(_||E))},[_,E]);const st=l.transactionReviewLocalData.selectedEntity,lt=l.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,je=m!=null&&Wt(m)===!0?st:lt,Ue=s.useMemo(()=>{const Ae=l.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],ve=C.entityAutoCompleteView;return{selectedOption:je?.qboId??je?.id,defaultOptions:Eo(ve,je,Ae??[])}},[je,l.transactionReviewLocalData.lineItemById,i.lineId,C.entityAutoCompleteView]),ln=()=>je!=null&&je.logo!=null?t.jsx($s,{photoUrl:je.logo.toString(),styles:{width:jt.nameLogoWidth.valuePx(u),height:jt.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Gi,{children:t.jsx(xn,{name:je.name,size:o.sp4})})}):je!=null&&je.name!=null?t.jsx(Gi,{children:t.jsx(xn,{name:je.name,size:o.sp4})}):null,Zt=(Ae,ve)=>{if(ve==null||!ve)return;let Te=[];return Ae.forEach(Lt=>{Te=Te.concat(Lt.options)}),Te.find(Lt=>Lt.value===ve)?.label??ve},_t=Zt(Le,G),cn=Zt(be,W),tt=L==="review",Yt=Jn("vendor",Ue.defaultOptions,Ue.selectedOption),vn=Jn("category",be,W),Sn=Jn("class",Le,G),ja=Ae=>{const ve=b?ya:Jo(Ae);return ve.map((Te,Lt)=>{const ct=`${l.transactionId}_${Te.key}_${i.lineId}`;if(d>0&&m!=null&&Wt(m)===!0&&Te.key==="vendor")return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);if(d>0&&Te.key==="transaction_type")return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);switch(Te.key){case"activity":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);case"vendor":default:return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[!b&&t.jsx(ro,{isCOTEnabled:j,recommendations:ne,type:"vendor",isFirstColumn:!0,isEnabled:!!je?.isPreFilled,isMisCategorized:Yt,onRecommendationClick:K,selectedValue:_,selectedValueLabel:H,isReviewTab:tt,isAccountOptionDisabled:ye,existingOption:{label:m!=null&&Wt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Wt(m)===!0?m?.vendor?.id:void 0},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(po,{children:xe===!0?t.jsx(uo,{isHovered:f,isCompressedMode:b,children:t.jsxs(lo,{onClick:dt=>{dt.stopPropagation(),!b&&(B?.(),$e(!1),Ge(!0))},"data-testid":z("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(co,{}),wt.addPayee]})}):et===!0?t.jsx(bt,{onClickAway:Tt,children:t.jsx(pm,{"data-testid":z("vendor-selection-dropdown-container",Et(S,rt,d.toString())),children:t.jsx(Lr,{name:ge,placeholder:wt.addPayee,valueToInfo:$,defaultValue:{selectedOption:Ue.selectedOption,defaultOptions:Ue.defaultOptions},type:"vendor",autoFocus:!xe,style:{width:"100%"},pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:h,menuIsOpen:et,onMenuClose:Tt,registerOptions:{required:!1},loadOptions:$t,showCOT:j,onCOTView:oe,menuPlacement:v})})}):t.jsx(gm,{children:t.jsxs(ho,{isHovered:f,isCompressedMode:b,showOutline:!b&&Yt&&je?.isPreFilled!==!0&&!y&&tt,children:[ln(),t.jsx(hm,{onClick:ue,"data-testid":z("vendor-name-text",S),children:je!=null&&je.name?t.jsx(it,{text:je.name,itemTextStyle:{color:f?M.colors.primary:M.colors.hero}}):t.jsx(mm,{children:Mn})})]})})})]},ct);case"category":{const dt=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[t.jsx(ro,{isCOTEnabled:j,recommendations:ne,type:"category",isFirstColumn:!1,isReviewTab:tt,isEnabled:!!i[Re]?.isPreFilled,isAccountOptionDisabled:ye,isMisCategorized:vn,onRecommendationClick:K,selectedValue:W,selectedValueLabel:cn,existingOption:{label:dt?.account?.accountName,value:dt?.account?.qboId??dt?.account?.accountId},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(po,{children:te===!0?t.jsx(uo,{isHovered:f,children:t.jsxs(lo,{onClick:Pt=>{Pt.stopPropagation(),!b&&(B?.(),ee(!1),xt(!0))},"data-testid":z("category-selection-field",Y),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(co,{}),wt.addCategory]})}):_e===!0?t.jsx(bt,{onClickAway:ft,children:t.jsx(Zi,{isHovered:f,"data-testid":z("category-selection-dropdown-container",Y),children:t.jsx(ii,{name:Y,placeholder:wt.addCategory,valueToId:Pt=>Be(Pt),type:"category",pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",showCOT:j,defaultValue:{selectedOption:W,allOptions:be},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:_e,autoFocus:!te&&(!W||i[Re]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(i[Re].qboId)),onMenuClose:ft,customStyleConfig:p,disableCurrentOption:ye,menuPlacement:v,onCOTView:oe})})}):t.jsx(ho,{isHovered:f,showOutline:vn&&i[Re]?.isPreFilled!==!0&&!y&&tt,children:t.jsx(Yi,{onClick:pe,"data-testid":z("category-label-text",Y),children:t.jsx(it,{text:cn??"",itemTextStyle:{color:f?M.colors.primary:M.colors.hero}})})})})]},ct)}case"class":{const dt=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[t.jsx(ro,{isCOTEnabled:j,recommendations:ne,type:"class",isFirstColumn:!1,isReviewTab:tt,isEnabled:!!i[Xe]?.isPreFilled,isAccountOptionDisabled:ye,isMisCategorized:Sn,onRecommendationClick:K,selectedValue:G,selectedValueLabel:_t,existingOption:{label:dt?.class?.className,value:dt?.class?.classId},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(po,{children:F===!0?t.jsx(uo,{isHovered:f,children:t.jsxs(lo,{onClick:Pt=>{Pt.stopPropagation(),!b&&(B?.(),he(!1),de(!0))},"data-testid":z("class-selection-field",le),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(co,{}),wt.addClass]})}):Ze===!0?t.jsx(bt,{onClickAway:Oe,children:t.jsx(Zi,{isHovered:f,"data-testid":z("class-selection-dropdown-container",le),children:t.jsx(ii,{name:le,placeholder:wt.addClass,valueToId:Pt=>Ne(Pt),type:"class",showCOT:j,defaultValue:{selectedOption:G,allOptions:Le},pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",menuIsOpen:Ze,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!F&&!G,customStyleConfig:p,onMenuClose:Oe,menuPlacement:v,onCOTView:oe})})}):t.jsx(ho,{isHovered:f,showOutline:Sn&&i[Xe]?.isPreFilled!==!0&&!y&&tt,children:t.jsx(Yi,{"data-testid":z("class-selection-field",le),onClick:Se,children:t.jsx(it,{text:_t??"",itemTextStyle:{color:f?M.colors.primary:M.colors.hero}})})})})]},ct)}case"date":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,isLastItem:Lt===ve.length-1,children:t.jsx(Lo,{"data-testid":z("date-field",Et(S,Xe,d.toString())),children:t.jsx(nm,{style:{color:f?M.colors.primary:M.colors.hero},children:N!=null?N.format(Kp.visual.MMMDCommaYYYYformat):null})})})},ct);case"transaction_type":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,"data-testid":z("transaction-type-field",Et(S,Xe,d.toString())),isLastItem:Lt===ve.length-1,children:ie!=null?t.jsx($r,{textColor:f?new Do(M.colors.primary):Tr(void 0,M),text:ie??P}):null})},ct);case"memo":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:Lt===ve.length-1,"data-testid":z("memo-field",Et(S,Xe,d.toString())),children:se!=null?t.jsx(we,{placement:"bottom",data:se,variant:"multi-information-points",children:t.jsx(im,{style:{color:f?M.colors.primary:M.colors.hero}})}):t.jsx(om,{children:Mn})})},ct);case"amount":{const dt=Je("0,0.[00]",i.amount,!0);return t.jsx(nt,{windowSize:u,style:{paddingRight:x[4]},wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,isLastItem:Lt===ve.length-1,children:t.jsx(Lo,{"data-testid":z("transaction-amount-field",Et(S,Xe,d.toString())),style:{color:f?M.colors.primary:M.colors.hero},children:dt})})},ct)}}})};return t.jsx(t.Fragment,{children:ja(V)})},Ki=({isEnabled:e,isReviewTab:n,isMisCategorized:c,hasRecommendations:r,isTooltipVisible:p=!1})=>e?n?p?t.jsx(rm,{}):t.jsx(sm,{}):p?t.jsx(am,{}):t.jsx(lm,{className:"ai-icon-selected-plain"}):!e&&c||r?p?t.jsx(dm,{}):t.jsx(cm,{}):null,Ji=({isFirstColumn:e,children:n})=>t.jsx(va,{isFirstColumn:e,children:n}),ro=({recommendations:e,isCOTEnabled:n,type:c,isReviewTab:r,selectedValueLabel:p,isFirstColumn:h,isEnabled:i=!1,isMisCategorized:d=!1,selectedValue:l,existingOption:m,cotTracking:u,lineId:g,openTooltipId:f,transactionId:y,isAccountOptionDisabled:b,onRecommendationClick:S,setOpenTooltipId:k})=>{const C=s.useMemo(()=>`${y}:${g}:${c}`,[y,g,c]),L=f===C,j=Rr().analytics,{createAlternateRecommendationCallback:v}=Dr(),A=s.useCallback(q=>{const B=e[1],N=e[0];v(c,{currentValue:p??tn,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:y,lineId:g,onCOTView:(P,ie,U,re)=>{u.onCOTView?.(P,ie,U,re)}}:void 0},B,N)(q)},[v,e,p,r,c,u,g,y]),T=Or(e,c,n,m,"list_page",r?"pending_review":"auto_categorized",S,A,l,b),I=Mr(e,c),R=s.useCallback(()=>{k(C);const q=T?.recommendations[0]?.cot??[],B=T?.recommendations[1]?.cot??[],N=B.length>0;if(j.trackTransactionCotView({recommendationFor:c,currentValue:p??tn,recommendation:T?.recommendations[0]?.name??tn,recommendationCot:q,isRecommendationCotAvailable:q.length>0,recommendationReason:T?.recommendations[0]?.reason??tn,recommendationConfidencePercentage:T?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Xo(Qo(T?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:T?.recommendations[1]?.name??tn,alternativeRecommendationCot:B,isAlternativeRecommendationCotAvailable:N,alternativeRecommendationReason:T?.recommendations[1]?.reason??tn,alternativeRecommendationConfidencePercentage:T?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:N?Xo(Qo(T?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const P=Fr(T);P!=null&&u.onCOTView(g,y,c,P)}},[j,T,r,p,c,g,y,C,k]),w=s.useCallback(()=>{f===C&&k(void 0)},[f,C,k]),D=s.useMemo(()=>!l||!I?!1:e.some(q=>c==="vendor"&&q.vendor!=null?q.vendor.id===l||q.vendor.qboId===l:c==="category"&&q.account!=null?q.account.qboId===l||q.account.accountId===l:c==="class"&&q.class!=null?q.class.classId===l:!1),[l,I,e,c]);if(!I)return t.jsx(va,{isFirstColumn:h});const V=i||D;return T?t.jsx(Ji,{isFirstColumn:h,children:t.jsx(we,{variant:"chain-of-thought",data:T,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:L,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:R,onClose:w,children:t.jsx(um,{children:t.jsx(Ki,{isEnabled:V,isReviewTab:r,isMisCategorized:d,hasRecommendations:I,isTooltipVisible:L})})})}):t.jsx(Ji,{isFirstColumn:h,children:t.jsx(Ki,{isEnabled:V,isReviewTab:r,isMisCategorized:d,hasRecommendations:I,isTooltipVisible:L})})},ba=({isTransactionActivityEnabled:e})=>{const n=ke(),c=s.useRef(null),[r,p]=s.useState(0);s.useLayoutEffect(()=>{c.current&&p(c.current.offsetWidth)},[n]);const h=Jo(e);return t.jsx(Yp,{windowSize:n,ref:c,children:h.map((i,d)=>{const l=`${d}${qp}${i.key}`;switch(i.key){case"activity":return t.jsx(nt,{windowSize:n,wrapperWidth:i.width},l);case"vendor":return t.jsx(nt,{windowSize:n,wrapperWidth:i.width,children:t.jsx(an,{windowSize:n,isLastItem:d===h.length-1,children:t.jsxs(Lo,{children:[t.jsx(Fo,{width:x[4],height:x[4]}),t.jsx(Mt,{width:r*i.width.value(n)/100,height:x[4],style:{display:"flex",alignItems:"center"}})]})})},l);default:return t.jsx(nt,{windowSize:n,wrapperWidth:i.width,children:t.jsx(an,{windowSize:n,isLastItem:d===h.length-1,children:t.jsx(Mt,{width:r*i.width.value(n)/100,height:x[4],style:{display:"flex",alignItems:"center"}})})},l)}})})},Zp=a.div`
1240
+ `,so="expenseAutomationTransactionsPage",Kt="transactionCategorizationListTable",Re="account",Xe="class",rt="lineEntitySelection",Pp="lineEntity",Np="recommendations",Ca="lineInfo",Vp="vendorDetails",Wp="customerDetails",Bn="selectedTransactionIds",Et=(e,n,c)=>`${e}.${c}.${n}`,Hp=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"})),Up=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:qp,hyphen:On,empty:tn}},expenseAutomation:{transactions:wt},dateFormat:Kp}=Ie.getLocalizedStrings(),jt={containerPaddingLeftRight:new Z(x[3],x[4]),containerPaddingTopBottom:new Z(x[1],x[2]),containerPaddingTopBottomEmpty:new Z(x[2],x[3]),nameLogoWidth:new Z(x[2],x[4]),nameLogoHeight:new Z(x[2],x[4])},Jp=({transactionView:e,transaction:n,sectionId:c,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:p,selectedTab:h,containerRef:i,listContainerRef:d,isCOTEnabled:l,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:g,vendorLoadOptions:f,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:k,isTransactionActivityEnabled:C})=>{const L=ke(),j=Ft(),[v,A]=s.useState(!1),[T,I]=s.useState(!1),{lineItemById:R,sortedLineItems:w}=n.transactionReviewLocalData,D=n.transactionReviewLocalData.tabSpecificLineItems?.[h]||[],V=w.filter(E=>D.indexOf(E)!==-1),q=[];V.forEach(E=>{q.push(R[E])});const{accountList:P,accountsHierarchyList:N,classHierarchyList:B,classList:ie,uncategorizedAccounts:U,transactions:re,selectedCheckBoxTransactionIds:oe}=e,X=oe.includes(n.transactionId),se=kt(),ge={control:()=>({marginLeft:-2,backgroundColor:v?se.colors.background:se.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:x[0]}),menu:()=>({width:"150%",background:se.colors.grey5}),singleValue:()=>({color:v||X?se.colors.primary:se.colors.hero,paddingLeft:x[2]}),input:E=>({...E,color:v||X?se.colors.primary:se.colors.hero,textAlign:"left",paddingLeft:x[2]}),menuPortal:E=>({...E,zIndex:10})},Y={...ge,singleValue:E=>({...E,color:v||X?se.colors.primary:se.colors.hero}),menu:()=>({marginTop:x[1],marginLeft:-8}),input:E=>({...E,color:v||X?se.colors.primary:se.colors.hero,textAlign:"left"})},le=re.find(E=>E.id===n.transactionId),K=(E,_)=>{const{transactionType:H}=_.transactionReviewLocalData;let F=E.target;for(;F;){if(F.classList.contains("select-value-container")||F.classList.contains("item-value-container")||F.classList.contains("grouped-single-select-field__value-container")||F.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||F.classList.contains("grouped-single-select-field__input")||F.classList.contains("grouped-single-select-field__menu"))return;F=F.parentElement}H!=null&&u(_.transactionId,H)},M=s.useRef(null),[O,J]=s.useState(void 0),[G,W]=s.useState("bottom");return s.useEffect(()=>{if(O===void 0)return;const E=d?.current?._outerRef??null,_=()=>{const H=M.current;if(H==null||E==null)return;const F=H.getBoundingClientRect(),he=E.getBoundingClientRect(),te=E.scrollTop+(F.bottom-he.top),ee=E.scrollHeight-te;W(ee>=288?"bottom":"top")};return _(),window.addEventListener("resize",_),E?.addEventListener("scroll",_),()=>{window.removeEventListener("resize",_),E?.removeEventListener("scroll",_)}},[d,O]),t.jsxs(Zp,{onMouseEnter:j?void 0:()=>A(!0),onMouseLeave:j?void 0:()=>A(!1),children:[t.jsx(Xp,{className:"categorization-row-card",windowSize:L,isSelected:X,isCompressedMode:j,isHovered:v,children:t.jsx(Qp,{children:q.map((E,_)=>t.jsx(em,{ref:O===_?M:void 0,"data-testid":z("transaction-categorization-list-row",E.lineId),windowSize:L,onClick:H=>K(H,n),children:t.jsx(Gp,{isTransactionActivityEnabled:C,line:E,isHovered:v||X,isSelected:X,isCompressedMode:j,lineIndex:_,sectionId:c,transaction:n,currentTransaction:le,windowSize:L,accountsHierarchyList:N,classHierarchyList:B,allAccountList:P,allClassList:ie,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:p,setCurrentTransactionInAction:g,vendorLoadOptions:f,customStyle:ge,customStyleAutoComplete:Y,recommendations:E.recommendationsWithCOT,selectedTab:h,isCOTEnabled:l,menuPlacement:G,cotTracking:m,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,onDropdownClose:()=>J(void 0),onDropdownOpen:()=>J(_)})},`${n.transactionId}.${E.lineId}`))},n.transactionId)},n.transactionId),C===!0&&t.jsx(xm,{className:"activity-log-icon",onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),onClick:E=>{E.stopPropagation(),k(n.transactionId)},children:t.jsx(we,{title:wt.header.activity,placement:"bottom",children:t.jsx(fm,{style:{color:T?se.colors.primary:se.colors.hero}})})})]})},Gp=({accountsHierarchyList:e,allAccountList:n,allClassList:c,classHierarchyList:r,customStyle:p,customStyleAutoComplete:h,line:i,lineIndex:d,transaction:l,currentTransaction:m,windowSize:u,uncategorizedAccounts:g,isHovered:f=!1,isSelected:y=!1,isCompressedMode:b=!1,sectionId:S,recommendations:k,vendorSearchAutoCompleteData:C,selectedTab:L,isCOTEnabled:j,menuPlacement:v,cotTracking:A,openTooltipId:T,setCurrentTransactionInAction:I,vendorLoadOptions:R,setOpenTooltipId:w,isUncategorizedExpenseCategoryEnabled:D,isTransactionActivityEnabled:V,onDropdownClose:q,onDropdownOpen:P})=>{const{transactionDate:N,transactionType:B,transactionTypeName:ie,memo:U}=l.transactionReviewLocalData,{setValue:re}=Oo(),oe=s.useCallback((Ae,ve)=>{A?.onCOTView!=null&&A.onCOTView(i.lineId,l.transactionId,Ae,ve)},[A,i.lineId,l.transactionId]),X=i.lineDescription,se=s.useMemo(()=>{if(X||U)return[{title:wt.description,description:X||On},{title:wt.header.memo,description:U||On}]},[U,X]),ge=Et(S,rt,d.toString()),Y=Et(S,Re,d.toString()),le=Et(S,Xe,d.toString()),K=(Ae,ve)=>{if(b)return;let Te;switch(ve){case"vendor":Te=ge;break;case"category":Te=Y;break;case"class":Te=le;break;default:return}re(`${Te}.selectedOption`,Ae,{shouldValidate:!0,shouldDirty:!0})},M=kt(),O=s.useMemo(()=>m!=null&&Wt(m)===!0?{id:l.transactionReviewLocalData.customer?.id??"",logo:l.transactionReviewLocalData.customer?.logo,name:l.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,l.transactionReviewLocalData.customer?.id,l.transactionReviewLocalData.customer?.logo,l.transactionReviewLocalData.customer?.name]),J=s.useMemo(()=>m!=null&&Wt(m)===!0?{id:l.transactionReviewLocalData.vendor?.id??"",logo:l.transactionReviewLocalData.vendor?.logo,name:l.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,l.transactionReviewLocalData.vendor?.id,l.transactionReviewLocalData.vendor?.logo,l.transactionReviewLocalData.vendor?.name]),G=i[Xe]?.classId,W=i[Re]?.qboId??i[Re]?.accountId,E=O?.id,_=J?.id,H=J?.name,[F,he]=s.useState(!G),[te,ee]=s.useState(!W||i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!0),[xe,$e]=s.useState(!_||!E),$=Ae=>k?.find(ve=>ve.vendor?.qboId===Ae||ve.vendor?.id===Ae||ve.vendor?.name===Ae)?.vendor?.reason??"",ne=l.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],be=As(e,ne),Le=Ls(r,ne),Pe=Ae=>n.filter(ve=>ve.qboId===Ae)[0]?.qboId,Ne=Ae=>c.filter(ve=>ve.classId===Ae)[0]?.accountingClassNumber??void 0,ye=s.useCallback(Ae=>hn(g,Ae,D===!0?["income"]:void 0),[g,D]),[et,Ge]=s.useState(!1),[Ze,de]=s.useState(!1),[_e,xt]=s.useState(!1),$t=(Ae,ve)=>{I({transactionId:l.transactionId,lineItemId:i.lineId}),R(Ae,ve)},Tt=()=>{$e(!(_||E)),Ge(!1),q?.()},ft=()=>{W&&i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!1?ee(!1):ee(!0),xt(!1),q?.()},Oe=()=>{he(!G),de(!1),q?.()},ue=()=>{b||(_||E)&&(Ge(!0),P?.())},Se=()=>{b||(de(!0),P?.())},pe=()=>{b||(xt(!0),P?.())};s.useEffect(()=>{W&&i[Re]?.qboId!=null&&hn(g,i[Re].qboId,D===!0?["income"]:void 0)===!1?ee(!1):ee(!0)},[W]),s.useEffect(()=>{he(!G)},[G]),s.useEffect(()=>{$e(!(_||E))},[_,E]);const st=l.transactionReviewLocalData.selectedEntity,lt=l.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,je=m!=null&&Wt(m)===!0?st:lt,Ue=s.useMemo(()=>{const Ae=l.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],ve=C.entityAutoCompleteView;return{selectedOption:je?.qboId??je?.id,defaultOptions:Ao(ve,je,Ae??[])}},[je,l.transactionReviewLocalData.lineItemById,i.lineId,C.entityAutoCompleteView]),ln=()=>je!=null&&je.logo!=null?t.jsx(Is,{photoUrl:je.logo.toString(),styles:{width:jt.nameLogoWidth.valuePx(u),height:jt.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Ji,{children:t.jsx(xn,{name:je.name,size:o.sp4})})}):je!=null&&je.name!=null?t.jsx(Ji,{children:t.jsx(xn,{name:je.name,size:o.sp4})}):null,Zt=(Ae,ve)=>{if(ve==null||!ve)return;let Te=[];return Ae.forEach(Lt=>{Te=Te.concat(Lt.options)}),Te.find(Lt=>Lt.value===ve)?.label??ve},_t=Zt(Le,G),cn=Zt(be,W),tt=L==="review",Yt=Kn("vendor",Ue.defaultOptions,Ue.selectedOption),bn=Kn("category",be,W),vn=Kn("class",Le,G),Sa=Ae=>{const ve=b?fa:Ko(Ae);return ve.map((Te,Lt)=>{const ct=`${l.transactionId}_${Te.key}_${i.lineId}`;if(d>0&&m!=null&&Wt(m)===!0&&Te.key==="vendor")return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);if(d>0&&Te.key==="transaction_type")return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);switch(Te.key){case"activity":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width},ct);case"vendor":default:return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[!b&&t.jsx(ao,{isCOTEnabled:j,recommendations:ne,type:"vendor",isFirstColumn:!0,isEnabled:!!je?.isPreFilled,isMisCategorized:Yt,onRecommendationClick:K,selectedValue:_,selectedValueLabel:H,isReviewTab:tt,isAccountOptionDisabled:ye,existingOption:{label:m!=null&&Wt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Wt(m)===!0?m?.vendor?.id:void 0},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(ho,{children:xe===!0?t.jsx(co,{isHovered:f,isCompressedMode:b,children:t.jsxs(ro,{onClick:dt=>{dt.stopPropagation(),!b&&(P?.(),$e(!1),Ge(!0))},"data-testid":z("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(lo,{}),wt.addPayee]})}):et===!0?t.jsx(bt,{onClickAway:Tt,children:t.jsx(pm,{"data-testid":z("vendor-selection-dropdown-container",Et(S,rt,d.toString())),children:t.jsx(Lr,{name:ge,placeholder:wt.addPayee,valueToInfo:$,defaultValue:{selectedOption:Ue.selectedOption,defaultOptions:Ue.defaultOptions},type:"vendor",autoFocus:!xe,style:{width:"100%"},pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:h,menuIsOpen:et,onMenuClose:Tt,registerOptions:{required:!1},loadOptions:$t,showCOT:j,onCOTView:oe,menuPlacement:v})})}):t.jsx(gm,{children:t.jsxs(uo,{isHovered:f,isCompressedMode:b,showOutline:!b&&Yt&&je?.isPreFilled!==!0&&!y&&tt,children:[ln(),t.jsx(hm,{onClick:ue,"data-testid":z("vendor-name-text",S),children:je!=null&&je.name?t.jsx(it,{text:je.name,itemTextStyle:{color:f?M.colors.primary:M.colors.hero}}):t.jsx(mm,{children:On})})]})})})]},ct);case"category":{const dt=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:j,recommendations:ne,type:"category",isFirstColumn:!1,isReviewTab:tt,isEnabled:!!i[Re]?.isPreFilled,isAccountOptionDisabled:ye,isMisCategorized:bn,onRecommendationClick:K,selectedValue:W,selectedValueLabel:cn,existingOption:{label:dt?.account?.accountName,value:dt?.account?.qboId??dt?.account?.accountId},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(ho,{children:te===!0?t.jsx(co,{isHovered:f,children:t.jsxs(ro,{onClick:Bt=>{Bt.stopPropagation(),!b&&(P?.(),ee(!1),xt(!0))},"data-testid":z("category-selection-field",Y),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(lo,{}),wt.addCategory]})}):_e===!0?t.jsx(bt,{onClickAway:ft,children:t.jsx(Gi,{isHovered:f,"data-testid":z("category-selection-dropdown-container",Y),children:t.jsx(oi,{name:Y,placeholder:wt.addCategory,valueToId:Bt=>Pe(Bt),type:"category",pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",showCOT:j,defaultValue:{selectedOption:W,allOptions:be},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:_e,autoFocus:!te&&(!W||i[Re]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(i[Re].qboId)),onMenuClose:ft,customStyleConfig:p,disableCurrentOption:ye,menuPlacement:v,onCOTView:oe})})}):t.jsx(uo,{isHovered:f,showOutline:bn&&i[Re]?.isPreFilled!==!0&&!y&&tt,children:t.jsx(Zi,{onClick:pe,"data-testid":z("category-label-text",Y),children:t.jsx(it,{text:cn??"",itemTextStyle:{color:f?M.colors.primary:M.colors.hero}})})})})]},ct)}case"class":{const dt=m?.lines!=null?m?.lines[d]:void 0;return t.jsxs(nt,{windowSize:u,wrapperWidth:Te.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:j,recommendations:ne,type:"class",isFirstColumn:!1,isReviewTab:tt,isEnabled:!!i[Xe]?.isPreFilled,isAccountOptionDisabled:ye,isMisCategorized:vn,onRecommendationClick:K,selectedValue:G,selectedValueLabel:_t,existingOption:{label:dt?.class?.className,value:dt?.class?.classId},cotTracking:A,lineId:i.lineId,transactionId:l.transactionId,openTooltipId:T,setOpenTooltipId:w}),t.jsx(ho,{children:F===!0?t.jsx(co,{isHovered:f,children:t.jsxs(ro,{onClick:Bt=>{Bt.stopPropagation(),!b&&(P?.(),he(!1),de(!0))},"data-testid":z("class-selection-field",le),style:{display:"inline-flex",alignItems:"center",color:Qe.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(lo,{}),wt.addClass]})}):Ze===!0?t.jsx(bt,{onClickAway:Oe,children:t.jsx(Gi,{isHovered:f,"data-testid":z("class-selection-dropdown-container",le),children:t.jsx(oi,{name:le,placeholder:wt.addClass,valueToId:Bt=>Ne(Bt),type:"class",showCOT:j,defaultValue:{selectedOption:G,allOptions:Le},pageSource:"list_page",transactionStatus:tt?"pending_review":"auto_categorized",menuIsOpen:Ze,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!F&&!G,customStyleConfig:p,onMenuClose:Oe,menuPlacement:v,onCOTView:oe})})}):t.jsx(uo,{isHovered:f,showOutline:vn&&i[Xe]?.isPreFilled!==!0&&!y&&tt,children:t.jsx(Zi,{"data-testid":z("class-selection-field",le),onClick:Se,children:t.jsx(it,{text:_t??"",itemTextStyle:{color:f?M.colors.primary:M.colors.hero}})})})})]},ct)}case"date":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,isLastItem:Lt===ve.length-1,children:t.jsx(To,{"data-testid":z("date-field",Et(S,Xe,d.toString())),children:t.jsx(nm,{style:{color:f?M.colors.primary:M.colors.hero},children:N!=null?N.format(Kp.visual.MMMDCommaYYYYformat):null})})})},ct);case"transaction_type":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,"data-testid":z("transaction-type-field",Et(S,Xe,d.toString())),isLastItem:Lt===ve.length-1,children:ie!=null?t.jsx($r,{textColor:f?new Ro(M.colors.primary):Tr(void 0,M),text:ie??B}):null})},ct);case"memo":return t.jsx(nt,{windowSize:u,wrapperWidth:Te.width,children:t.jsx(an,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:Lt===ve.length-1,"data-testid":z("memo-field",Et(S,Xe,d.toString())),children:se!=null?t.jsx(we,{placement:"bottom",data:se,variant:"multi-information-points",children:t.jsx(im,{style:{color:f?M.colors.primary:M.colors.hero}})}):t.jsx(om,{children:On})})},ct);case"amount":{const dt=Je("0,0.[00]",i.amount,!0);return t.jsx(nt,{windowSize:u,style:{paddingRight:x[4]},wrapperWidth:Te.width,children:t.jsx(an,{windowSize:u,isLastItem:Lt===ve.length-1,children:t.jsx(To,{"data-testid":z("transaction-amount-field",Et(S,Xe,d.toString())),style:{color:f?M.colors.primary:M.colors.hero},children:dt})})},ct)}}})};return t.jsx(t.Fragment,{children:Sa(V)})},qi=({isEnabled:e,isReviewTab:n,isMisCategorized:c,hasRecommendations:r,isTooltipVisible:p=!1})=>e?n?p?t.jsx(rm,{}):t.jsx(sm,{}):p?t.jsx(am,{}):t.jsx(lm,{className:"ai-icon-selected-plain"}):!e&&c||r?p?t.jsx(dm,{}):t.jsx(cm,{}):null,Ki=({isFirstColumn:e,children:n})=>t.jsx(ba,{isFirstColumn:e,children:n}),ao=({recommendations:e,isCOTEnabled:n,type:c,isReviewTab:r,selectedValueLabel:p,isFirstColumn:h,isEnabled:i=!1,isMisCategorized:d=!1,selectedValue:l,existingOption:m,cotTracking:u,lineId:g,openTooltipId:f,transactionId:y,isAccountOptionDisabled:b,onRecommendationClick:S,setOpenTooltipId:k})=>{const C=s.useMemo(()=>`${y}:${g}:${c}`,[y,g,c]),L=f===C,j=Rr().analytics,{createAlternateRecommendationCallback:v}=Dr(),A=s.useCallback(q=>{const P=e[1],N=e[0];v(c,{currentValue:p??tn,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:y,lineId:g,onCOTView:(B,ie,U,re)=>{u.onCOTView?.(B,ie,U,re)}}:void 0},P,N)(q)},[v,e,p,r,c,u,g,y]),T=Or(e,c,n,m,"list_page",r?"pending_review":"auto_categorized",S,A,l,b),I=Mr(e,c),R=s.useCallback(()=>{k(C);const q=T?.recommendations[0]?.cot??[],P=T?.recommendations[1]?.cot??[],N=P.length>0;if(j.trackTransactionCotView({recommendationFor:c,currentValue:p??tn,recommendation:T?.recommendations[0]?.name??tn,recommendationCot:q,isRecommendationCotAvailable:q.length>0,recommendationReason:T?.recommendations[0]?.reason??tn,recommendationConfidencePercentage:T?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Yo(Xo(T?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:T?.recommendations[1]?.name??tn,alternativeRecommendationCot:P,isAlternativeRecommendationCotAvailable:N,alternativeRecommendationReason:T?.recommendations[1]?.reason??tn,alternativeRecommendationConfidencePercentage:T?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:N?Yo(Xo(T?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const B=Fr(T);B!=null&&u.onCOTView(g,y,c,B)}},[j,T,r,p,c,g,y,C,k]),w=s.useCallback(()=>{f===C&&k(void 0)},[f,C,k]),D=s.useMemo(()=>!l||!I?!1:e.some(q=>c==="vendor"&&q.vendor!=null?q.vendor.id===l||q.vendor.qboId===l:c==="category"&&q.account!=null?q.account.qboId===l||q.account.accountId===l:c==="class"&&q.class!=null?q.class.classId===l:!1),[l,I,e,c]);if(!I)return t.jsx(ba,{isFirstColumn:h});const V=i||D;return T?t.jsx(Ki,{isFirstColumn:h,children:t.jsx(we,{variant:"chain-of-thought",data:T,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:L,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:R,onClose:w,children:t.jsx(um,{children:t.jsx(qi,{isEnabled:V,isReviewTab:r,isMisCategorized:d,hasRecommendations:I,isTooltipVisible:L})})})}):t.jsx(Ki,{isFirstColumn:h,children:t.jsx(qi,{isEnabled:V,isReviewTab:r,isMisCategorized:d,hasRecommendations:I,isTooltipVisible:L})})},wa=({isTransactionActivityEnabled:e})=>{const n=ke(),c=s.useRef(null),[r,p]=s.useState(0);s.useLayoutEffect(()=>{c.current&&p(c.current.offsetWidth)},[n]);const h=Ko(e);return t.jsx(Yp,{windowSize:n,ref:c,children:h.map((i,d)=>{const l=`${d}${qp}${i.key}`;switch(i.key){case"activity":return t.jsx(nt,{windowSize:n,wrapperWidth:i.width},l);case"vendor":return t.jsx(nt,{windowSize:n,wrapperWidth:i.width,children:t.jsx(an,{windowSize:n,isLastItem:d===h.length-1,children:t.jsxs(To,{children:[t.jsx(Mo,{width:x[4],height:x[4]}),t.jsx(Mt,{width:r*i.width.value(n)/100,height:x[4],style:{display:"flex",alignItems:"center"}})]})})},l);default:return t.jsx(nt,{windowSize:n,wrapperWidth:i.width,children:t.jsx(an,{windowSize:n,isLastItem:d===h.length-1,children:t.jsx(Mt,{width:r*i.width.value(n)/100,height:x[4],style:{display:"flex",alignItems:"center"}})})},l)}})})},Zp=a.div`
1241
1241
  display: flex;
1242
1242
  height: 100%;
1243
1243
  flex: 1;
@@ -1334,23 +1334,23 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1334
1334
  overflow: hidden;
1335
1335
  text-overflow: ellipsis;
1336
1336
  display: -webkit-box;
1337
- `,an=a(Pe)`
1337
+ `,an=a(Be)`
1338
1338
  overflow: hidden;
1339
1339
  justify-content: ${e=>e.isLastItem?"flex-end":"flex-start"};
1340
1340
  display: flex;
1341
1341
  width: 100%;
1342
1342
  align-items: center;
1343
- `,Lo=a.div`
1343
+ `,To=a.div`
1344
1344
  display: flex;
1345
1345
  flex-direction: row;
1346
1346
  column-gap: ${o.sp2};
1347
1347
  align-items: center;
1348
- `,nm=a(Pe)`
1348
+ `,nm=a(Be)`
1349
1349
  ${tm};
1350
1350
  color: ${e=>e.theme.colors.hero};
1351
- `,lo=a(Pe)`
1351
+ `,ro=a(Be)`
1352
1352
  color: ${e=>e.theme.colors.hero};
1353
- `,co=a(Un)`
1353
+ `,lo=a(Hn)`
1354
1354
  width: ${o.sp3};
1355
1355
  height: ${o.sp3};
1356
1356
  margin: ${o.sp1};
@@ -1360,19 +1360,19 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1360
1360
  width: ${o.sp3};
1361
1361
  height: ${o.sp3};
1362
1362
  margin-left: 10px;
1363
- `,sm=a(Br)`
1363
+ `,sm=a(Pr)`
1364
1364
  width: ${o.sp5};
1365
1365
  height: ${o.sp5};
1366
1366
  `,am=a(tl)`
1367
1367
  width: ${o.sp5};
1368
1368
  height: ${o.sp5};
1369
- `,rm=a(Pr)`
1369
+ `,rm=a(Br)`
1370
1370
  width: ${o.sp5};
1371
1371
  height: ${o.sp5};
1372
1372
  `,lm=a(nl)`
1373
1373
  width: ${o.sp5};
1374
1374
  height: ${o.sp5};
1375
- `,cm=a(bn)`
1375
+ `,cm=a(wn)`
1376
1376
  width: ${o.sp3};
1377
1377
  height: ${o.sp3};
1378
1378
  path {
@@ -1381,7 +1381,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1381
1381
  `,dm=a(Nr)`
1382
1382
  width: ${o.sp3};
1383
1383
  height: ${o.sp3};
1384
- `,va=a.div`
1384
+ `,ba=a.div`
1385
1385
  display: flex;
1386
1386
  align-items: center;
1387
1387
  justify-content: center;
@@ -1394,7 +1394,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1394
1394
  justify-content: center;
1395
1395
  width: auto;
1396
1396
  cursor: pointer;
1397
- `,hm=a(Pe)`
1397
+ `,hm=a(Be)`
1398
1398
  display: flex;
1399
1399
  max-width: calc(100% - ${o.sp6});
1400
1400
  flex: 1 1 auto;
@@ -1403,7 +1403,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1403
1403
  align-items: center;
1404
1404
  overflow: hidden;
1405
1405
  display: flex;
1406
- `,Gi=a.div`
1406
+ `,Ji=a.div`
1407
1407
  display: flex;
1408
1408
  `,pm=a.div`
1409
1409
  width: 100%;
@@ -1414,13 +1414,13 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1414
1414
  display: flex;
1415
1415
  align-items: center;
1416
1416
  flex-direction: row;
1417
- `,uo=a.div`
1417
+ `,co=a.div`
1418
1418
  padding: ${o.sp0} ${o.sp2};
1419
1419
  border-radius: ${o.sp1};
1420
1420
  margin-left: ${o.sp0};
1421
1421
  width: 100%;
1422
1422
  background-color: ${e=>e.isCompressedMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1423
- `,Zi=a.div`
1423
+ `,Gi=a.div`
1424
1424
  width: 100%;
1425
1425
  border-radius: ${o.sp1};
1426
1426
  padding-left: 2px;
@@ -1429,11 +1429,11 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1429
1429
  display: flex;
1430
1430
  align-items: center;
1431
1431
  flex-direction: row;
1432
- `,mm=a(Pe)``,gm=a.div`
1432
+ `,mm=a(Be)``,gm=a.div`
1433
1433
  width: 100%;
1434
1434
  display: flex;
1435
1435
  padding-left: ${o.sp0};
1436
- `,ho=a.div`
1436
+ `,uo=a.div`
1437
1437
  width: 100%;
1438
1438
  display: flex;
1439
1439
  flex-direction: row;
@@ -1445,7 +1445,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1445
1445
  background-color: ${e=>e.isCompressedMode===!0?"transparent":e.isHovered?e.theme.colors.background:e.theme.colors.grey5};
1446
1446
  outline: ${e=>e.showOutline?`1px dashed ${e.theme.colors.grey1}`:"none"};
1447
1447
  outline-color: ${e=>e.isHovered&&e.theme.colors.primary};
1448
- `,Yi=a.div``,po=a.div`
1448
+ `,Zi=a.div``,ho=a.div`
1449
1449
  display: flex;
1450
1450
  align-items: center;
1451
1451
  width: calc(100% - ${o.sp5});
@@ -1460,7 +1460,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1460
1460
  `,fm=a(Hp)`
1461
1461
  width: ${o.sp3};
1462
1462
  height: ${o.sp3};
1463
- `,ym=({sortConfig:e,fetchState:n,isDisabled:c,isTransactionActivityEnabled:r,onColumnSortConfigChanged:p})=>{const h=ke();return t.jsxs(Cm,{windowSize:h,children:[t.jsx(Ca,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:n==="In-Progress"?"readonly":c,onColumnSortConfigChanged:p,"data-testid":z("transaction-categorization-list-empty-table-header")}),t.jsx(wm,{windowSize:h,"data-testid":z("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((i,d)=>t.jsx(ba,{isTransactionActivityEnabled:r,"data-testid":z("transaction-categorization-list-empty-row",d.toString())},d))})]})},Cm=a.div`
1463
+ `,ym=({sortConfig:e,fetchState:n,isDisabled:c,isTransactionActivityEnabled:r,onColumnSortConfigChanged:p})=>{const h=ke();return t.jsxs(Cm,{windowSize:h,children:[t.jsx(ya,{isTransactionActivityEnabled:r,sortConfig:e,isDisabled:n==="In-Progress"?"readonly":c,onColumnSortConfigChanged:p,"data-testid":z("transaction-categorization-list-empty-table-header")}),t.jsx(wm,{windowSize:h,"data-testid":z("transaction-categorization-list-empty-rows-container"),children:[...Array(3)].map((i,d)=>t.jsx(wa,{isTransactionActivityEnabled:r,"data-testid":z("transaction-categorization-list-empty-row",d.toString())},d))})]})},Cm=a.div`
1464
1464
  display: block;
1465
1465
  min-height: 100%;
1466
1466
  flex-direction: column;
@@ -1473,7 +1473,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1473
1473
  min-height: 100%;
1474
1474
  flex-direction: column;
1475
1475
  row-gap: ${o.sp3};
1476
- `,{common:bm,transactionDetail:{notCategorizedTooltipText:vm}}=Ie.getLocalizedStrings(),mo={rowGap:new Z(x[0],x[2],x[3])},Sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:c,authParams:r,sectionId:p,isCOTEnabled:h,isDisabled:i,vendorSearchAutoCompleteActions:d,isTransactionActivityEnabled:l,vendorSearchAutoCompleteData:m,setCurrentTransactionInAction:u,vendorLoadOptions:g,onTransactionCategorizationRowClick:f,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:b,onFetchTransactionCategorizationList:S,containerRef:k,cotTracking:C,isUncategorizedExpenseCategoryEnabled:L,setActivityLogTransactionId:j})=>{const v=ke(),A=Ft(),[T,I]=s.useState(void 0),{fetchState:R,uiState:w,transactionLocalData:D,selectedCheckBoxTransactionIds:V,transactionIdsWithUnsavedData:q,transactions:B,uncategorizedAccounts:N}=n;Cn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:R==="Completed"});const P=s.useRef(null),ie=s.useRef({}),{control:U}=Mo();s.useEffect(()=>{P.current?.resetAfterIndex(0,!0)},[v,P,D]),s.useEffect(()=>{P.current?.scrollTo(w.scrollPosition?.scrollTop??0)},[e]);const re=s.useCallback(F=>{if(ie.current?.[F]!=null){const ee=v==="small"&&w.pageToken==null&&F===D.length-1?mo.rowGap.value("medium-regular"):mo.rowGap.value(v);return ie.current[F]+ee}if(D[F]==null)return 0;const he=D[F].transactionReviewLocalData,te=Object.keys(he.lineItemById).length;return te!=null&&!isNaN(te)&&te>1?Ui*te+mo.rowGap.value(v)*(te-1):Ui},[D,v,w.pageToken,w.sortKey,w.sortOrder]),oe=s.useCallback((F,he)=>{ie.current={...ie.current,[F]:he},P.current?.resetAfterIndex(0,!0)},[v,P,D,w.sortKey,w.sortOrder]),X=s.useCallback(()=>{(w.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&S(e,w.searchString,!0,w.pageToken,!0,!1)},[n.refreshStatus.fetchState,S,e,w.pageToken,w.searchString,w.sortKey,w.sortOrder]),se=s.useCallback(()=>{w.pageToken!=null&&X()},[X,w.pageToken,w.sortKey,w.sortOrder]),ge=gr(F=>b(e,{scrollPosition:{scrollTop:F}}),1e3,{trailing:!0}),Y=F=>F<n.transactionLocalData.length,le=(F,he)=>{y(e,{sortOrder:he,sortKey:F}),S(e,w.searchString,!1,null,!1,!0)},K=F=>{if(e==="autoCategorized")return!V.includes(F);const he=D.find(ee=>ee.transactionId===F)?.transactionReviewLocalData,te=B.find(ee=>ee.id===F);return te!=null&&he!=null?Yr(te,he,N,L)?L===!0&&ni(N,he.lineItemById,["expense"])?q.includes(F)===!1:!1:!0:V.length===0?!0:!V.includes(F)};let M=[],O=[];(R==="Completed"||n.transactionLocalData.length>0)&&(O=n.transactionLocalData.map((F,he)=>{const te=K(F.transactionId);let ee=!1;L===!0&&te===!0&&e==="review"&&ni(N,F.transactionReviewLocalData.lineItemById,["expense"])&&(ee=!q.includes(F.transactionId));const xe=F.transactionReviewLocalData;return{label:t.jsx(Jp,{isTransactionActivityEnabled:l,transactionView:n,sectionId:`${p}.${he}.${wa}`,transaction:F,receiptUploadEndpoint:c,authParams:r,onTransactionCategorizationRowClick:f,vendorLoadOptions:g,setCurrentTransactionInAction:u,vendorSearchAutoCompleteActions:d,vendorSearchAutoCompleteData:m,selectedTab:e,containerRef:k,listContainerRef:P,isCOTEnabled:h,cotTracking:C,openTooltipId:T,setOpenTooltipId:I,isUncategorizedExpenseCategoryEnabled:L,setActivityLogTransactionId:j},`${F.transactionId}.${xe.transactionType}`),value:F.transactionId,defaultChecked:!1,groupLabel:!1,isException:ee,exceptionMode:ee===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:te===!0?"readonly":void 0,exceptionType:ee===!0?"alert":void 0,exceptionInfo:ee===!0?vm:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),M=O.map(F=>F.value));const J={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:G,subTitle:W}=He("transaction_categorization").allDoneText,E=D.map(F=>F.transactionId),_=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),H=s.useMemo(()=>D.reduce((F,he)=>{const te=Object.keys(he.transactionReviewLocalData.lineItemById).length;return F+(te>0?te:1)},0)<n.totalCountByTab[e]?D.length+1:D.length,[D,n.totalCountByTab,e]);return t.jsx(Tm,{windowSize:v,"data-testid":z("transaction-categorization-list-wrapper"),children:t.jsx(Lm,{windowSize:v,"data-testid":z("transaction-categorization-list-container"),children:R==="Error"?t.jsxs(Em,{windowSize:v,"data-testid":z("transaction-categorization-reload-page"),children:[t.jsx(Rm,{onClick:()=>S(e,void 0,!0,null,!1,!0),"data-testid":z("transaction-categorization-reload-icon"),children:t.jsx(Ao,{})}),t.jsx(Dm,{"data-testid":z("transaction-categorization-reload-label"),children:bm.reloadPage.label})]}):R==="Completed"&&D.length===0?t.jsx(St,{tab:"transaction_categorization",title:G,subTitle:W,"data-testid":z("transaction-categorization-empty-table-section")}):R==="Not-Started"||R==="In-Progress"&&D.length===0?t.jsx(ym,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},fetchState:R,onColumnSortConfigChanged:le,"data-testid":z("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:l}):t.jsx(Am,{windowSize:v,"data-testid":z("transaction-categorization-list-view"),children:t.jsx(Is,{control:U,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:F,ref:he,onChange:te}})=>t.jsx(Sa.Provider,{value:{value:F,mode:"off",allCheckBoxValues:M,index:0,isCompressedMode:A,sortKey:w.sortKey,sortOrder:w.sortOrder,fetchState:R,isDisabled:i,groupLabelCheckBox:J,isTransactionActivityEnabled:l,onColumnSortConfigChanged:le,ref:he,onChange:te,selectedTab:e},children:t.jsx(Nn,{children:({height:ee,width:xe})=>t.jsx(xr,{isItemLoaded:Y,itemCount:_,loadMoreItems:se,children:({onItemsRendered:$e,ref:$})=>t.jsx(Vn,{ref:ne=>{$(ne),P.current=ne},height:ee,itemCount:H,itemKey:ne=>`${D[ne]?.transactionId??""}-row-${ne}`,innerElementType:jm,onItemsRendered:$e,width:xe,style:{willChange:"auto"},overscanCount:fp,itemSize:re,itemData:{checkboxes:O,value:F,allCheckBoxValues:M,groupLabelCheckBox:J,categorizationGroupValue:E,transactionLocalData:D,isCompressedMode:A,mode:"always_on",setRowHeight:oe,isItemLoaded:Y,ref:$,onChange:te,selectedCheckBoxTransactionIds:V,isTransactionActivityEnabled:l},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:ne})=>{ge(ne)},children:Im})})})})})})})})},jm=e=>{const{isCompressedMode:n,value:c,allCheckBoxValues:r,groupLabelCheckBox:p,index:h,isDisabled:i,fetchState:d,sortKey:l,sortOrder:m,mode:u,isTransactionActivityEnabled:g,ref:f,onChange:y,onColumnSortConfigChanged:b}=km(),{children:S,style:k,...C}=e;return d==="Completed"?t.jsxs(Om,{ref:f,style:{...k,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...C,children:[t.jsx(Mm,{children:t.jsx(Rs,{selectionLimit:yn,value:c,checkBox:{label:t.jsx($m,{isCompressedMode:n,children:t.jsx(Ca,{isTransactionActivityEnabled:g,sortConfig:{sortKey:l,sortOrder:m},isDisabled:i,onColumnSortConfigChanged:b})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:p,allCheckBoxValues:r,mode:n?"off":u,draggable:!1,checkBoxStyle:n?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:h,onChangeHandler:L=>Ds({event:L,value:c,allCheckBoxValues:r,groupLabelCheckBox:p,onChange:y}),ref:f})}),t.jsx(Fm,{children:S})]},`${r[h]}-${h}`):null},Sa=s.createContext(void 0),km=()=>{const e=s.useContext(Sa);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},Im=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Oo(),{checkboxes:p,value:h,groupLabelCheckBox:i,categorizationGroupValue:d,allCheckBoxValues:l,transactionLocalData:m,isCompressedMode:u,isItemLoaded:g,setRowHeight:f,ref:y,onChange:b,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:k}=c,C=s.useRef(null),L=ke();if(s.useEffect(()=>{C.current?.firstElementChild!=null&&f(e,C.current.firstElementChild.clientHeight)},[e,C,L,m[e]?.transactionReviewLocalData]),g(e)===!0){const j=p[e],v=r!=null&&r===d[e];return t.jsx(Xi,{isPanelSelected:v,isCompressedMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(Rs,{selectionLimit:yn,checkBox:u===!0?{...j,isException:!1}:j,value:h,groupLabelCheckBox:i,allCheckBoxValues:l,mode:u===!0||j.isDisabled==="readonly"||S.includes(j.value)===!1&&S.length>=yn?"off":"always_on",draggable:!1,isDisabled:j.isDisabled,checkBoxStyle:u===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:u===!0?{display:"none"}:{padding:20},name:`${Kt}.${h}`,ref:y,index:e,onChangeHandler:A=>Ds({event:A,value:h,allCheckBoxValues:l,groupLabelCheckBox:i,onChange:b})})},d[e])}else return t.jsx(Xi,{isCompressedMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(zm,{children:t.jsx(ba,{isTransactionActivityEnabled:k})})},fs())},$m=a.div`
1476
+ `,{common:bm,transactionDetail:{notCategorizedTooltipText:vm}}=Ie.getLocalizedStrings(),po={rowGap:new Z(x[0],x[2],x[3])},Sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:c,authParams:r,sectionId:p,isCOTEnabled:h,isDisabled:i,vendorSearchAutoCompleteActions:d,isTransactionActivityEnabled:l,vendorSearchAutoCompleteData:m,setCurrentTransactionInAction:u,vendorLoadOptions:g,onTransactionCategorizationRowClick:f,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:b,onFetchTransactionCategorizationList:S,containerRef:k,cotTracking:C,isUncategorizedExpenseCategoryEnabled:L,setActivityLogTransactionId:j})=>{const v=ke(),A=Ft(),[T,I]=s.useState(void 0),{fetchState:R,uiState:w,transactionLocalData:D,selectedCheckBoxTransactionIds:V,transactionIdsWithUnsavedData:q,transactions:P,uncategorizedAccounts:N}=n,B=s.useRef(null),ie=s.useRef({}),{control:U}=Oo();s.useEffect(()=>{B.current?.resetAfterIndex(0,!0)},[v,B,D]),s.useEffect(()=>{B.current?.scrollTo(w.scrollPosition?.scrollTop??0)},[e]);const re=s.useCallback(F=>{if(ie.current?.[F]!=null){const ee=v==="small"&&w.pageToken==null&&F===D.length-1?po.rowGap.value("medium-regular"):po.rowGap.value(v);return ie.current[F]+ee}if(D[F]==null)return 0;const he=D[F].transactionReviewLocalData,te=Object.keys(he.lineItemById).length;return te!=null&&!isNaN(te)&&te>1?Hi*te+po.rowGap.value(v)*(te-1):Hi},[D,v,w.pageToken,w.sortKey,w.sortOrder]),oe=s.useCallback((F,he)=>{ie.current={...ie.current,[F]:he},B.current?.resetAfterIndex(0,!0)},[v,B,D,w.sortKey,w.sortOrder]),X=s.useCallback(()=>{(w.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&S(e,w.searchString,!0,w.pageToken,!0,!1)},[n.refreshStatus.fetchState,S,e,w.pageToken,w.searchString,w.sortKey,w.sortOrder]),se=s.useCallback(()=>{w.pageToken!=null&&X()},[X,w.pageToken,w.sortKey,w.sortOrder]),ge=gr(F=>b(e,{scrollPosition:{scrollTop:F}}),1e3,{trailing:!0}),Y=F=>F<n.transactionLocalData.length,le=(F,he)=>{y(e,{sortOrder:he,sortKey:F}),S(e,w.searchString,!1,null,!1,!0)},K=F=>{if(e==="autoCategorized")return!V.includes(F);const he=D.find(ee=>ee.transactionId===F)?.transactionReviewLocalData,te=P.find(ee=>ee.id===F);return te!=null&&he!=null?Yr(te,he,N,L)?L===!0&&ti(N,he.lineItemById,["expense"])?q.includes(F)===!1:!1:!0:V.length===0?!0:!V.includes(F)};let M=[],O=[];(R==="Completed"||n.transactionLocalData.length>0)&&(O=n.transactionLocalData.map((F,he)=>{const te=K(F.transactionId);let ee=!1;L===!0&&te===!0&&e==="review"&&ti(N,F.transactionReviewLocalData.lineItemById,["expense"])&&(ee=!q.includes(F.transactionId));const xe=F.transactionReviewLocalData;return{label:t.jsx(Jp,{isTransactionActivityEnabled:l,transactionView:n,sectionId:`${p}.${he}.${Ca}`,transaction:F,receiptUploadEndpoint:c,authParams:r,onTransactionCategorizationRowClick:f,vendorLoadOptions:g,setCurrentTransactionInAction:u,vendorSearchAutoCompleteActions:d,vendorSearchAutoCompleteData:m,selectedTab:e,containerRef:k,listContainerRef:B,isCOTEnabled:h,cotTracking:C,openTooltipId:T,setOpenTooltipId:I,isUncategorizedExpenseCategoryEnabled:L,setActivityLogTransactionId:j},`${F.transactionId}.${xe.transactionType}`),value:F.transactionId,defaultChecked:!1,groupLabel:!1,isException:ee,exceptionMode:ee===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:te===!0?"readonly":void 0,exceptionType:ee===!0?"alert":void 0,exceptionInfo:ee===!0?vm:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),M=O.map(F=>F.value));const J={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:G,subTitle:W}=He("transaction_categorization").allDoneText,E=D.map(F=>F.transactionId),_=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),H=s.useMemo(()=>D.reduce((F,he)=>{const te=Object.keys(he.transactionReviewLocalData.lineItemById).length;return F+(te>0?te:1)},0)<n.totalCountByTab[e]?D.length+1:D.length,[D,n.totalCountByTab,e]);return t.jsx(Tm,{windowSize:v,"data-testid":z("transaction-categorization-list-wrapper"),children:t.jsx(Lm,{windowSize:v,"data-testid":z("transaction-categorization-list-container"),children:R==="Error"?t.jsxs(Em,{windowSize:v,"data-testid":z("transaction-categorization-reload-page"),children:[t.jsx(Rm,{onClick:()=>S(e,void 0,!0,null,!1,!0),"data-testid":z("transaction-categorization-reload-icon"),children:t.jsx(Lo,{})}),t.jsx(Dm,{"data-testid":z("transaction-categorization-reload-label"),children:bm.reloadPage.label})]}):R==="Completed"&&D.length===0?t.jsx(St,{tab:"transaction_categorization",title:G,subTitle:W,"data-testid":z("transaction-categorization-empty-table-section")}):R==="Not-Started"||R==="In-Progress"&&D.length===0?t.jsx(ym,{sortConfig:{sortKey:w.sortKey,sortOrder:w.sortOrder},fetchState:R,onColumnSortConfigChanged:le,"data-testid":z("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:l}):t.jsx(Am,{windowSize:v,"data-testid":z("transaction-categorization-list-view"),children:t.jsx(ks,{control:U,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:F,ref:he,onChange:te}})=>t.jsx(va.Provider,{value:{value:F,mode:"off",allCheckBoxValues:M,index:0,isCompressedMode:A,sortKey:w.sortKey,sortOrder:w.sortOrder,fetchState:R,isDisabled:i,groupLabelCheckBox:J,isTransactionActivityEnabled:l,onColumnSortConfigChanged:le,ref:he,onChange:te,selectedTab:e},children:t.jsx(Pn,{children:({height:ee,width:xe})=>t.jsx(xr,{isItemLoaded:Y,itemCount:_,loadMoreItems:se,children:({onItemsRendered:$e,ref:$})=>t.jsx(Nn,{ref:ne=>{$(ne),B.current=ne},height:ee,itemCount:H,itemKey:ne=>`${D[ne]?.transactionId??""}-row-${ne}`,innerElementType:jm,onItemsRendered:$e,width:xe,style:{willChange:"auto"},overscanCount:fp,itemSize:re,itemData:{checkboxes:O,value:F,allCheckBoxValues:M,groupLabelCheckBox:J,categorizationGroupValue:E,transactionLocalData:D,isCompressedMode:A,mode:"always_on",setRowHeight:oe,isItemLoaded:Y,ref:$,onChange:te,selectedCheckBoxTransactionIds:V,isTransactionActivityEnabled:l},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:ne})=>{ge(ne)},children:Im})})})})})})})})},jm=e=>{const{isCompressedMode:n,value:c,allCheckBoxValues:r,groupLabelCheckBox:p,index:h,isDisabled:i,fetchState:d,sortKey:l,sortOrder:m,mode:u,isTransactionActivityEnabled:g,ref:f,onChange:y,onColumnSortConfigChanged:b}=km(),{children:S,style:k,...C}=e;return d==="Completed"?t.jsxs(Om,{ref:f,style:{...k,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...C,children:[t.jsx(Mm,{children:t.jsx(Es,{selectionLimit:yn,value:c,checkBox:{label:t.jsx($m,{isCompressedMode:n,children:t.jsx(ya,{isTransactionActivityEnabled:g,sortConfig:{sortKey:l,sortOrder:m},isDisabled:i,onColumnSortConfigChanged:b})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:p,allCheckBoxValues:r,mode:n?"off":u,draggable:!1,checkBoxStyle:n?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:h,onChangeHandler:L=>Rs({event:L,value:c,allCheckBoxValues:r,groupLabelCheckBox:p,onChange:y}),ref:f})}),t.jsx(Fm,{children:S})]},`${r[h]}-${h}`):null},va=s.createContext(void 0),km=()=>{const e=s.useContext(va);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},Im=({index:e,style:n,data:c})=>{const{selectedTransactionId:r}=Do(),{checkboxes:p,value:h,groupLabelCheckBox:i,categorizationGroupValue:d,allCheckBoxValues:l,transactionLocalData:m,isCompressedMode:u,isItemLoaded:g,setRowHeight:f,ref:y,onChange:b,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:k}=c,C=s.useRef(null),L=ke();if(s.useEffect(()=>{C.current?.firstElementChild!=null&&f(e,C.current.firstElementChild.clientHeight)},[e,C,L,m[e]?.transactionReviewLocalData]),g(e)===!0){const j=p[e],v=r!=null&&r===d[e];return t.jsx(Yi,{isPanelSelected:v,isCompressedMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(Es,{selectionLimit:yn,checkBox:u===!0?{...j,isException:!1}:j,value:h,groupLabelCheckBox:i,allCheckBoxValues:l,mode:u===!0||j.isDisabled==="readonly"||S.includes(j.value)===!1&&S.length>=yn?"off":"always_on",draggable:!1,isDisabled:j.isDisabled,checkBoxStyle:u===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:u===!0?{display:"none"}:{padding:20},name:`${Kt}.${h}`,ref:y,index:e,onChangeHandler:A=>Rs({event:A,value:h,allCheckBoxValues:l,groupLabelCheckBox:i,onChange:b})})},d[e])}else return t.jsx(Yi,{isCompressedMode:u,style:{...n,paddingBottom:o.sp0,width:"100%",flex:"1"},ref:C,children:t.jsx(zm,{children:t.jsx(wa,{isTransactionActivityEnabled:k})})},xs())},$m=a.div`
1477
1477
  flex: 1;
1478
1478
  width: auto;
1479
1479
  padding-left: ${({isCompressedMode:e})=>e===!0?o.sp8:o.sp0};
@@ -1492,7 +1492,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1492
1492
  `,Em=a.div`
1493
1493
  display: flex;
1494
1494
  width: 100%;
1495
- height: ${e=>`calc(100% - ${ks.valuePx(e.windowSize)})`};
1495
+ height: ${e=>`calc(100% - ${js.valuePx(e.windowSize)})`};
1496
1496
  flex-direction: column;
1497
1497
  justify-content: center;
1498
1498
  align-items: center;
@@ -1514,7 +1514,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1514
1514
  `,Dm=a(It)`
1515
1515
  margin-top: ${o.sp3};
1516
1516
  color: ${e=>e.theme.colors.hero};
1517
- `,Xi=a.div`
1517
+ `,Yi=a.div`
1518
1518
  top: ${o.sp0};
1519
1519
  left: ${o.sp0};
1520
1520
  padding-bottom: ${o.sp3};
@@ -1523,7 +1523,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1523
1523
  box-sizing: border-box;
1524
1524
  ${e=>e.isPanelSelected===!0&&De`
1525
1525
  .categorization-row-card {
1526
- ${Po(e.theme)}
1526
+ ${_o(e.theme)}
1527
1527
  }
1528
1528
  `}
1529
1529
  `,Om=a.div`
@@ -1544,7 +1544,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1544
1544
  height: 100%;
1545
1545
  `,zm=a.div`
1546
1546
  padding-left: ${o.sp8};
1547
- `,_m=({selectedTab:e,transactionView:n,receiptUploadEndpoint:c,authParams:r,sectionId:p,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,isCOTEnabled:d,isTransactionActivityEnabled:l,setCurrentFooterFormId:m,setLocalDataForCategoryAndClass:u,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,onSaveUpdateTransactionCategorization:S,onUpdateSelectedCheckboxTransactionIds:k,onFetchRecommendationsForEntityCategorization:C,onFetchRecommendationsForEntityCategorizationWithCustomer:L,setActivityLogTransactionId:j})=>{const[v,A]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),I=s.useRef({}),{useDynamicConfig:R}=bs(),{configValue:w}=R(vs.enableUncategorizedExpenseCategory),D=w?.uncategorized_expense_category_enabled===!0,V=(K,M,O,J)=>{const G={...I.current};G[M]==null&&(G[M]=[]);let W=G[M].findIndex(E=>E.lineId===K);if(W===-1){const E={lineId:K,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};G[M].push(E),W=G[M].length-1}else{const E=G[M][W];G[M][W]={...E,category:{...E.category,recommendationTypesViewed:[...E.category.recommendationTypesViewed]},class:{...E.class,recommendationTypesViewed:[...E.class.recommendationTypesViewed]},vendor:{...E.vendor,recommendationTypesViewed:[...E.vendor.recommendationTypesViewed]}}}J!=null&&J!==""&&!G[M][W][O].recommendationTypesViewed.includes(J)&&G[M][W][O].recommendationTypesViewed.push(J),I.current=G},{transactions:q,transactionLocalData:B,accountsHierarchyList:N,classHierarchyList:P,accountList:ie,classList:U,selectedCheckBoxTransactionIds:re,uncategorizedAccounts:oe}=n,X=Jt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>es(re,B,N,P,h.entityAutoCompleteView),[N,P,re,B,h.entityAutoCompleteView]),values:s.useMemo(()=>es(re,B,N,P,h.entityAutoCompleteView),[N,P,re,B,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{m("expenseAutomationPage")},[]),s.useEffect(()=>{re.length>0?m(ao):m("expenseAutomationPage")},[re,m]);const se=X.handleSubmit(K=>{const M=K[Bn],O=I.current;S(e,M,O),M.forEach(J=>{delete I.current[J]})}),ge=async(K,M)=>{if(K!=null){if(K===Bn){const O=X.getValues(Bn);if(O.length<re.length){k(e,O);return}if(O.length===yn){k(e,O);return}const J=O[O.length-1],G=M[Kt].findIndex(E=>E.transactionId===J),W=X.getValues(`${Kt}.${G}.lineInfo`);if(W!=null){let E=!1;if(W.every(_=>(E=hn(oe,_[Re].selectedOption,D?["income"]:void 0),!!_[Re].selectedOption&&_[Re].selectedOption!=null&&!E&&!!_[Xe].selectedOption&&!!_[rt].selectedOption))===!0){k(e,O);return}else{const _=O.filter(H=>H!==J);k(e,_);return}}return}if(K.includes(Re)===!0||K.includes(Xe)===!0){const O=parseInt(K.split(".")[1]),J=parseInt(K.split(".")[3]),G=X.getValues(`${Kt}.${O}.lineInfo`),W=G[J];if(K.includes(Re)||K.includes(Xe)){const{transactionId:E,lineId:_,recommendations:H}=W;if(G!=null){const F=W[Re].selectedOption,he=W[Xe].selectedOption,te=W[rt].selectedOption,ee=W[rt].selectedOption,xe=W[rt].defaultOptions,$e=xe?.find(de=>de.options?.find(_e=>_e.value===te))?.options?.find(de=>de.value===te)?.label,$=xe?.find(de=>de.options?.find(_e=>_e.value===ee))?.options?.find(de=>de.value===ee)?.label,ne=h.entityAutoCompleteView.vendor.find(de=>de.qboId===te),be=h.entityAutoCompleteView.customer.find(de=>de.qboId===ee),Le=H.find(de=>de.vendor?.qboId===te)?.vendor,Be=te||ne?.qboId||Le?.qboId?{id:te??ne?.qboId??Le?.qboId??"",name:$e??ne?.name??Le?.name??"",logo:ne?.logo??Le?.logo}:void 0,Ne=ee||be?.qboId?{id:ee??be?.qboId??"",name:$??be?.name??"",logo:be?.logo}:void 0,ye=ie.find(de=>de.qboId===F),et=U.find(de=>de.classId===he),Ge=n.transactionLocalData.find(de=>de.transactionId===E)?.transactionReviewLocalData.lineItemById[_].account,Ze=n.transactionLocalData.find(de=>de.transactionId===E)?.transactionReviewLocalData.lineItemById[_].class;u(e,E,_,q,Be?.id,Ne?.id,K.includes(Re)&&ye!=null?{...ye,isPreFilled:!1}:Ge,K.includes(Xe)&&et!=null?{...et,isPreFilled:!1}:Ze,void 0,H,D)}return}}if(K.includes(rt)){const O=parseInt(K.split(".")[1]),J=parseInt(K.split(".")[3]),G=X.getValues(`${Kt}.${O}.lineInfo`);if(G!=null){const W=G[J],{transactionId:E,recommendations:_}=W,H=W[rt].selectedOption,F=W[rt].selectedOption,he=W[rt].defaultOptions,te=he?.flatMap(ye=>ye.options)?.find(ye=>ye.value===H)?.label,ee=he?.flatMap(ye=>ye.options)?.find(ye=>ye.value===F)?.label,xe=h.entityAutoCompleteView.vendor.find(ye=>ye.qboId===H),$e=h.entityAutoCompleteView.customer.find(ye=>ye.qboId===F),$=_.find(ye=>ye.vendor?.qboId===H)?.vendor,ne=H!==""&&H!=null?H:te!==""&&te!=null?te:"",be=(xe?.qboId!=null&&xe.qboId!==""?xe.qboId:null)??($?.qboId!=null&&$.qboId!==""?$.qboId:null)??(H!=null&&H!==""?H:null),Le={id:be??te??"",name:te??xe?.name??$?.name??"",logo:xe?.logo??$?.logo},Be=$e?.qboId!=null&&$e.qboId!==""?{id:$e.qboId??F??"",name:ee??$e.name??"",logo:$e.logo}:void 0,Ne=q.find(ye=>ye.id===E);if(Ne!=null){const ye=n.transactionLocalData.find(_e=>_e.transactionId===Ne.id)?.transactionReviewLocalData,et=ye?.lineItemById[W.lineId],Ge=Wt(Ne)===!0?ye?.selectedEntity:et?.selectedEntityLine,Ze=Be?.id!=null&&Be.id!==""?{id:Be.id,name:Be.name,type:"customer",qboId:Be.id,zeniId:Be.id,logo:Be.logo}:Le.id!==""&&Le.id!=null?{id:ne,name:te??ne,type:"vendor",qboId:ne,zeniId:ne,logo:Le.logo,isPreFilled:Ge?.id===be&&Ge?.isPreFilled}:void 0,de={transactionId:{id:Ne.id,type:Ne.type},transaction:Ne,lineIds:Ne.type!=="journal_entry"?Ne.lines?.map(_e=>_e.id)??[]:[W.lineId]};Ze?.type==="customer"?L(W.amount.amount,de,!1,e,Ze,Be,D):C(W.amount.amount,de,!1,e,Ze,Le,D)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const K=X.watch((M,{name:O})=>{O!=null&&M!=null&&wn(()=>ge(O,M))});return()=>{K.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const K=n.transactionLocalData.find(M=>M.transactionId===v.transactionId);if(K){const{transactionReviewLocalData:M}=K,{selectedEntity:O}=M,J=v?.lineItemId??M.sortedLineItems[0],G=M.lineItemById[J],W=G.selectedEntityLine;T.current?.(Eo(h.entityAutoCompleteView,O??W,G?.recommendationsWithCOT??[]))}A({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const Y=(K,M)=>{i.onAutoCompleteInputChange?.(K),T.current=M},le=s.useRef(null);return t.jsx(Bm,{ref:le,"data-testid":z("transaction-categorization-list-page"),children:t.jsx(Gt,{...X,children:t.jsx("form",{id:Qi(ao),onSubmit:se,style:{height:"100%",width:"100%"},"data-testid":z(Qi(ao)),children:t.jsx(Sm,{isTransactionActivityEnabled:l,selectedTab:e,sectionId:p,transactionView:n,receiptUploadEndpoint:c,authParams:r,setCurrentTransactionInAction:A,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,onTransactionCategorizationRowClick:g,vendorLoadOptions:Y,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,containerRef:le,isCOTEnabled:d,cotTracking:{onCOTView:V},isUncategorizedExpenseCategoryEnabled:D,setActivityLogTransactionId:j})})})})},Qi=e=>`${e}_form`,es=(e,n,c,r,p)=>({[Kt]:n.map(h=>Pm(h.transactionId,h.transactionReviewLocalData,c,r,p)),[Bn]:e}),Pm=(e,n,c,r,p)=>{const{lineItemById:h,sortedLineItems:i,selectedEntity:d}=n,l=Object.values(h).sort((u,g)=>i.indexOf(u.lineId)-i.indexOf(g.lineId)),m=l[0]?.lineId;return{[wa]:l.map(u=>{const g=u.account?.qboId??u.account?.accountId,f=u.class?.classId,y=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Re]:{selectedOption:g,allOptions:Es(c,u.recommendationsWithCOT)},[Xe]:{selectedOption:f,allOptions:As(r,u.recommendationsWithCOT)},[rt]:{selectedOption:d?.id??y?.id??d?.name??y?.name,defaultOptions:Eo(p,d??y,n.lineItemById[m]?.recommendationsWithCOT??[])},[Bp]:u.lineEntity,[Np]:u.recommendationsWithCOT??[]}}),transactionId:e,[Vp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Wp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},Bm=a.div`
1547
+ `,_m=({selectedTab:e,transactionView:n,receiptUploadEndpoint:c,authParams:r,sectionId:p,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,isCOTEnabled:d,isTransactionActivityEnabled:l,setCurrentFooterFormId:m,setLocalDataForCategoryAndClass:u,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,onSaveUpdateTransactionCategorization:S,onUpdateSelectedCheckboxTransactionIds:k,onFetchRecommendationsForEntityCategorization:C,onFetchRecommendationsForEntityCategorizationWithCustomer:L,setActivityLogTransactionId:j})=>{const[v,A]=s.useState({transactionId:void 0,lineItemId:void 0}),T=s.useRef(),I=s.useRef({}),{useDynamicConfig:R}=ws(),{configValue:w}=R(bs.enableUncategorizedExpenseCategory),D=w?.uncategorized_expense_category_enabled===!0,V=(K,M,O,J)=>{const G={...I.current};G[M]==null&&(G[M]=[]);let W=G[M].findIndex(E=>E.lineId===K);if(W===-1){const E={lineId:K,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};G[M].push(E),W=G[M].length-1}else{const E=G[M][W];G[M][W]={...E,category:{...E.category,recommendationTypesViewed:[...E.category.recommendationTypesViewed]},class:{...E.class,recommendationTypesViewed:[...E.class.recommendationTypesViewed]},vendor:{...E.vendor,recommendationTypesViewed:[...E.vendor.recommendationTypesViewed]}}}J!=null&&J!==""&&!G[M][W][O].recommendationTypesViewed.includes(J)&&G[M][W][O].recommendationTypesViewed.push(J),I.current=G},{transactions:q,transactionLocalData:P,accountsHierarchyList:N,classHierarchyList:B,accountList:ie,classList:U,selectedCheckBoxTransactionIds:re,uncategorizedAccounts:oe}=n,X=Jt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>Qi(re,P,N,B,h.entityAutoCompleteView),[N,B,re,P,h.entityAutoCompleteView]),values:s.useMemo(()=>Qi(re,P,N,B,h.entityAutoCompleteView),[N,B,re,P,h.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{m("expenseAutomationPage")},[]),s.useEffect(()=>{re.length>0?m(so):m("expenseAutomationPage")},[re,m]);const se=X.handleSubmit(K=>{const M=K[Bn],O=I.current;S(e,M,O),M.forEach(J=>{delete I.current[J]})}),ge=async(K,M)=>{if(K!=null){if(K===Bn){const O=X.getValues(Bn);if(O.length<re.length){k(e,O);return}if(O.length===yn){k(e,O);return}const J=O[O.length-1],G=M[Kt].findIndex(E=>E.transactionId===J),W=X.getValues(`${Kt}.${G}.lineInfo`);if(W!=null){let E=!1;if(W.every(_=>(E=hn(oe,_[Re].selectedOption,D?["income"]:void 0),!!_[Re].selectedOption&&_[Re].selectedOption!=null&&!E&&!!_[Xe].selectedOption&&!!_[rt].selectedOption))===!0){k(e,O);return}else{const _=O.filter(H=>H!==J);k(e,_);return}}return}if(K.includes(Re)===!0||K.includes(Xe)===!0){const O=parseInt(K.split(".")[1]),J=parseInt(K.split(".")[3]),G=X.getValues(`${Kt}.${O}.lineInfo`),W=G[J];if(K.includes(Re)||K.includes(Xe)){const{transactionId:E,lineId:_,recommendations:H}=W;if(G!=null){const F=W[Re].selectedOption,he=W[Xe].selectedOption,te=W[rt].selectedOption,ee=W[rt].selectedOption,xe=W[rt].defaultOptions,$e=xe?.find(de=>de.options?.find(_e=>_e.value===te))?.options?.find(de=>de.value===te)?.label,$=xe?.find(de=>de.options?.find(_e=>_e.value===ee))?.options?.find(de=>de.value===ee)?.label,ne=h.entityAutoCompleteView.vendor.find(de=>de.qboId===te),be=h.entityAutoCompleteView.customer.find(de=>de.qboId===ee),Le=H.find(de=>de.vendor?.qboId===te)?.vendor,Pe=te||ne?.qboId||Le?.qboId?{id:te??ne?.qboId??Le?.qboId??"",name:$e??ne?.name??Le?.name??"",logo:ne?.logo??Le?.logo}:void 0,Ne=ee||be?.qboId?{id:ee??be?.qboId??"",name:$??be?.name??"",logo:be?.logo}:void 0,ye=ie.find(de=>de.qboId===F),et=U.find(de=>de.classId===he),Ge=n.transactionLocalData.find(de=>de.transactionId===E)?.transactionReviewLocalData.lineItemById[_].account,Ze=n.transactionLocalData.find(de=>de.transactionId===E)?.transactionReviewLocalData.lineItemById[_].class;u(e,E,_,q,Pe?.id,Ne?.id,K.includes(Re)&&ye!=null?{...ye,isPreFilled:!1}:Ge,K.includes(Xe)&&et!=null?{...et,isPreFilled:!1}:Ze,void 0,H,D)}return}}if(K.includes(rt)){const O=parseInt(K.split(".")[1]),J=parseInt(K.split(".")[3]),G=X.getValues(`${Kt}.${O}.lineInfo`);if(G!=null){const W=G[J],{transactionId:E,recommendations:_}=W,H=W[rt].selectedOption,F=W[rt].selectedOption,he=W[rt].defaultOptions,te=he?.flatMap(ye=>ye.options)?.find(ye=>ye.value===H)?.label,ee=he?.flatMap(ye=>ye.options)?.find(ye=>ye.value===F)?.label,xe=h.entityAutoCompleteView.vendor.find(ye=>ye.qboId===H),$e=h.entityAutoCompleteView.customer.find(ye=>ye.qboId===F),$=_.find(ye=>ye.vendor?.qboId===H)?.vendor,ne=H!==""&&H!=null?H:te!==""&&te!=null?te:"",be=(xe?.qboId!=null&&xe.qboId!==""?xe.qboId:null)??($?.qboId!=null&&$.qboId!==""?$.qboId:null)??(H!=null&&H!==""?H:null),Le={id:be??te??"",name:te??xe?.name??$?.name??"",logo:xe?.logo??$?.logo},Pe=$e?.qboId!=null&&$e.qboId!==""?{id:$e.qboId??F??"",name:ee??$e.name??"",logo:$e.logo}:void 0,Ne=q.find(ye=>ye.id===E);if(Ne!=null){const ye=n.transactionLocalData.find(_e=>_e.transactionId===Ne.id)?.transactionReviewLocalData,et=ye?.lineItemById[W.lineId],Ge=Wt(Ne)===!0?ye?.selectedEntity:et?.selectedEntityLine,Ze=Pe?.id!=null&&Pe.id!==""?{id:Pe.id,name:Pe.name,type:"customer",qboId:Pe.id,zeniId:Pe.id,logo:Pe.logo}:Le.id!==""&&Le.id!=null?{id:ne,name:te??ne,type:"vendor",qboId:ne,zeniId:ne,logo:Le.logo,isPreFilled:Ge?.id===be&&Ge?.isPreFilled}:void 0,de={transactionId:{id:Ne.id,type:Ne.type},transaction:Ne,lineIds:Ne.type!=="journal_entry"?Ne.lines?.map(_e=>_e.id)??[]:[W.lineId]};Ze?.type==="customer"?L(W.amount.amount,de,!1,e,Ze,Pe,D):C(W.amount.amount,de,!1,e,Ze,Le,D)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const K=X.watch((M,{name:O})=>{O!=null&&M!=null&&Cn(()=>ge(O,M))});return()=>{K.unsubscribe()}}),s.useEffect(()=>{if(h.entityAutoCompleteView.fetchState==="Completed"){const K=n.transactionLocalData.find(M=>M.transactionId===v.transactionId);if(K){const{transactionReviewLocalData:M}=K,{selectedEntity:O}=M,J=v?.lineItemId??M.sortedLineItems[0],G=M.lineItemById[J],W=G.selectedEntityLine;T.current?.(Ao(h.entityAutoCompleteView,O??W,G?.recommendationsWithCOT??[]))}A({transactionId:void 0,lineItemId:void 0})}},[h.entityAutoCompleteView.fetchState]);const Y=(K,M)=>{i.onAutoCompleteInputChange?.(K),T.current=M},le=s.useRef(null);return t.jsx(Pm,{ref:le,"data-testid":z("transaction-categorization-list-page"),children:t.jsx(Gt,{...X,children:t.jsx("form",{id:Xi(so),onSubmit:se,style:{height:"100%",width:"100%"},"data-testid":z(Xi(so)),children:t.jsx(Sm,{isTransactionActivityEnabled:l,selectedTab:e,sectionId:p,transactionView:n,receiptUploadEndpoint:c,authParams:r,setCurrentTransactionInAction:A,onUpdateTransactionCategorizationUIState:f,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,onTransactionCategorizationRowClick:g,vendorLoadOptions:Y,vendorSearchAutoCompleteData:h,vendorSearchAutoCompleteActions:i,containerRef:le,isCOTEnabled:d,cotTracking:{onCOTView:V},isUncategorizedExpenseCategoryEnabled:D,setActivityLogTransactionId:j})})})})},Xi=e=>`${e}_form`,Qi=(e,n,c,r,p)=>({[Kt]:n.map(h=>Bm(h.transactionId,h.transactionReviewLocalData,c,r,p)),[Bn]:e}),Bm=(e,n,c,r,p)=>{const{lineItemById:h,sortedLineItems:i,selectedEntity:d}=n,l=Object.values(h).sort((u,g)=>i.indexOf(u.lineId)-i.indexOf(g.lineId)),m=l[0]?.lineId;return{[Ca]:l.map(u=>{const g=u.account?.qboId??u.account?.accountId,f=u.class?.classId,y=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Re]:{selectedOption:g,allOptions:As(c,u.recommendationsWithCOT)},[Xe]:{selectedOption:f,allOptions:Ls(r,u.recommendationsWithCOT)},[rt]:{selectedOption:d?.id??y?.id??d?.name??y?.name,defaultOptions:Ao(p,d??y,n.lineItemById[m]?.recommendationsWithCOT??[])},[Pp]:u.lineEntity,[Np]:u.recommendationsWithCOT??[]}}),transactionId:e,[Vp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Wp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},Pm=a.div`
1548
1548
  display: flex;
1549
1549
  min-height: 100%;
1550
1550
  width: 100%;
@@ -1552,7 +1552,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1552
1552
  flex-direction: column;
1553
1553
  background-color: ${e=>e.theme.colors.grey4};
1554
1554
  z-index: 2;
1555
- `,ts={subSectionContainerLeftRightPadding:new Z(x[3],x[6],x[8])},Nm=a.div`
1555
+ `,es={subSectionContainerLeftRightPadding:new Z(x[3],x[6],x[8])},Nm=a.div`
1556
1556
  width: 100%;
1557
1557
  display: flex;
1558
1558
  justify-content: center;
@@ -1564,7 +1564,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1564
1564
  display: flex;
1565
1565
  flex-direction: column;
1566
1566
  width: 100%;
1567
- `,Wm=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:p,expenseAutomationViewSelector:h,isTransactionActivityEnabled:i,authParams:d,receiptUploadEndpoint:l,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:f,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:b,allThreadsSectionOpen:S,loggedInUser:k,isCOTEnabled:C,setCurrentFooterFormId:L,onFetchRecommendationsForEntityCategorization:j,onFetchRecommendationsForEntityCategorizationWithCustomer:v,onTransactionCategorizationRowClick:A,onFetchMissingReceiptsList:T,onMissingReceiptsRowClick:I,onUploadReceiptAttachment:R,onUploadReceiptComplete:w,onUploadReceiptFetchStatus:D,onReconTabColumnSortConfigChanged:V,onReloadReconciliationListPage:q,onUpdateReconcileTabLocalData:B,onUpdateMissingReceiptsUIState:N,onFetchTransactionCategorizationList:P,onUpdateTransactionCategorizationUIState:ie,onUpdateScrollYOffSetTransactionCategorizationUIState:U,handleJeScheduleClick:re,ignoreRecommendedJeSchedule:oe,onJESchedulesFormDataChange:X,onPostJESchedule:se,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:Y,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:K,onUpdateSelectedCheckboxTransactionIds:M,improveMonthEndInsightsUsingZeniGPTClick:O,onRemoveFileAttachment:J,onUpdateFileAttachment:G,onCloseAllThreadsSection:W,onEditMonthEndInsightsClick:E,previewMonthEndReport:_,saveMonthEndReport:H,onOpenFileAttachmentSnackBar:F,onCloseFileAttachmentSnackBar:he,onClickCustomerRequest:te,sendMonthEndReport:ee,markAsReview:xe,onReloadPage:$e,updateOperatingExpensesIdsForReview:$,onFetchReimbursementView:ne,updateSectionIdsForReview:be,onUpdateFluxAnalysisUIState:Le,fetchFluxViewOnScroll:Be,onFetchFluxViewList:Ne,setIsJeAccountSettingsOpened:ye,onReviewClicked:et,setOpenDrawerClicked:Ge,onEstablishConnectionClick:Ze,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:xt,onSaveReconciliation:$t,onSaveReconciliationReview:Tt,onReconMatchedTransactionClick:ft,onAddStatementClick:Oe,redirectToVendorDetailPage:ue,setActivityLogTransactionId:Se}=e,{currentSelectedView:pe,missingReceipts:st,transactionView:lt,selectedPeriod:je,monthEndInsights:Ue,selectedTransactionCategorizationTab:ln,reconciliation:Zt}=h;switch(pe){case"transaction_categorization":return lt.fetchState==="Completed"&&lt.transactionLocalData.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(_m,{setCurrentFooterFormId:L,selectedPeriod:je,selectedTab:ln,sectionId:Kt,transactionView:lt,receiptUploadEndpoint:l,authParams:d,isTransactionActivityEnabled:i,onUpdateTransactionCategorizationUIState:ie,onUpdateScrollYOffSetTransactionCategorizationUIState:U,onFetchTransactionCategorizationList:P,onTransactionCategorizationRowClick:A,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:Y,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:K,onUpdateSelectedCheckboxTransactionIds:M,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:j,onFetchRecommendationsForEntityCategorizationWithCustomer:v,isCOTEnabled:C,setActivityLogTransactionId:Se});case"je_schedules":return t.jsx(oh,{setIsJeAccountSettingsOpened:ye,expenseAutomationViewSelector:h,setResetJeAccountSettingsForm:p,currentFooterFormId:n,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:L,handleJeScheduleClick:re,ignoreRecommendedJeSchedule:oe,onJESchedulesFormDataChange:X,onPostJESchedule:se,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g});case"missing_receipts":return st.fetchState==="Completed"&&st.transactions.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(Vh,{onUpdateMissingReceiptsUIState:N,onFetchMissingReceiptsList:T,missingReceipts:st,receiptUploadEndpoint:l,authParams:d,selectedPeriod:je,onMissingReceiptsRowClick:I,onUploadReceiptComplete:w,onUploadReceiptFetchStatus:D,onUploadReceiptAttachment:R});case"month_end_insights":if(Ue!=null&&h.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Ue.fetchState==="Not-Started"||Ue.fetchState==="In-Progress"||Ue.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Ue.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ra,{fetchState:"In-Progress"});{const _t={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Ue.companyName,url:window.location.href},{url:cn,...tt}=_t,Yt={...tt};return t.jsx(Vm,{children:t.jsx(xp,{allThreadsSectionOpen:S,customerRequestData:b,companyId:m,enableZeniGPTFeature:f,filterMetaData:Yt,selectedPeriod:h.selectedPeriod,improveUsingZeniGPTClick:O,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Ue,newThreadMetadata:_t,onClickCustomerRequest:te,onCloseAllThreadsSection:W,onCloseFileAttachmentSnackBar:he,onOpenFileAttachmentSnackBar:F,onRemoveFileAttachment:J,onUpdateFileAttachment:G,previewMode:y,previewMonthEndReport:_,saveMonthEndReport:H,onEditClick:E,sendMonthEndReport:ee})})}}else return null;case"flux_analysis":return h.fluxAnalysis.fetchStatus.fetchState==="Completed"&&h.fluxAnalysis.sections.generalExpense.vendors.length===0&&h.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(Du,{fluxAnalysis:h.fluxAnalysis,selectedPeriod:h.selectedPeriod,markAsReview:xe,onReloadPage:$e,updateOperatingExpensesIdsForReview:$,updateSectionIdsForReview:be,onUpdateFluxAnalysisUIState:Le,setCurrentFooterFormId:L,fetchFluxViewOnScroll:Be,onFetchFluxViewList:Ne,onFetchReimbursementView:ne,redirectToVendorDetailPage:ue});case"reconciliation":return t.jsx(fu,{onReloadReconciliationListPage:q,currentFooterFormId:n,reconciliation:Zt,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onReviewClicked:et,setOpenDrawerClicked:Ge,setCurrentFooterFormId:L,onReconTabColumnSortConfigChanged:V,onUpdateReconcileTabLocalData:B,onEstablishConnectionClick:Ze,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:xt,onSaveReconciliation:$t,onSaveReconciliationReview:Tt,onReconMatchedTransactionClick:ft,onAddStatementClick:Oe});default:return t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle})}};function Hm(e){const n=ke(),{currentSelectedView:c}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",p=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Nm,{windowSize:n,style:{...p===!0?{paddingLeft:ts.subSectionContainerLeftRightPadding.value(n),paddingRight:ts.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:x[0],paddingRight:x[0]},...r===!0||c==="reconciliation"?{paddingLeft:x[0],paddingRight:x[0]}:{}},children:t.jsx(Wm,{...e})})}const Um=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"})),qm=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"})),Km=a.div`
1567
+ `,Wm=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:p,expenseAutomationViewSelector:h,isTransactionActivityEnabled:i,authParams:d,receiptUploadEndpoint:l,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:f,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:b,allThreadsSectionOpen:S,loggedInUser:k,isCOTEnabled:C,setCurrentFooterFormId:L,onFetchRecommendationsForEntityCategorization:j,onFetchRecommendationsForEntityCategorizationWithCustomer:v,onTransactionCategorizationRowClick:A,onFetchMissingReceiptsList:T,onMissingReceiptsRowClick:I,onUploadReceiptAttachment:R,onUploadReceiptComplete:w,onUploadReceiptFetchStatus:D,onReconTabColumnSortConfigChanged:V,onReloadReconciliationListPage:q,onUpdateReconcileTabLocalData:P,onUpdateMissingReceiptsUIState:N,onFetchTransactionCategorizationList:B,onUpdateTransactionCategorizationUIState:ie,onUpdateScrollYOffSetTransactionCategorizationUIState:U,handleJeScheduleClick:re,ignoreRecommendedJeSchedule:oe,onJESchedulesFormDataChange:X,onPostJESchedule:se,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:Y,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:K,onUpdateSelectedCheckboxTransactionIds:M,improveMonthEndInsightsUsingZeniGPTClick:O,onRemoveFileAttachment:J,onUpdateFileAttachment:G,onCloseAllThreadsSection:W,onEditMonthEndInsightsClick:E,previewMonthEndReport:_,saveMonthEndReport:H,onOpenFileAttachmentSnackBar:F,onCloseFileAttachmentSnackBar:he,onClickCustomerRequest:te,sendMonthEndReport:ee,markAsReview:xe,onReloadPage:$e,updateOperatingExpensesIdsForReview:$,onFetchReimbursementView:ne,updateSectionIdsForReview:be,onUpdateFluxAnalysisUIState:Le,fetchFluxViewOnScroll:Pe,onFetchFluxViewList:Ne,setIsJeAccountSettingsOpened:ye,onReviewClicked:et,setOpenDrawerClicked:Ge,onEstablishConnectionClick:Ze,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:xt,onSaveReconciliation:$t,onSaveReconciliationReview:Tt,onReconMatchedTransactionClick:ft,onAddStatementClick:Oe,redirectToVendorDetailPage:ue,setActivityLogTransactionId:Se}=e,{currentSelectedView:pe,missingReceipts:st,transactionView:lt,selectedPeriod:je,monthEndInsights:Ue,selectedTransactionCategorizationTab:ln,reconciliation:Zt}=h;switch(pe){case"transaction_categorization":return lt.fetchState==="Completed"&&lt.transactionLocalData.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(_m,{setCurrentFooterFormId:L,selectedPeriod:je,selectedTab:ln,sectionId:Kt,transactionView:lt,receiptUploadEndpoint:l,authParams:d,isTransactionActivityEnabled:i,onUpdateTransactionCategorizationUIState:ie,onUpdateScrollYOffSetTransactionCategorizationUIState:U,onFetchTransactionCategorizationList:B,onTransactionCategorizationRowClick:A,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:Y,updateSelectedVendorForTransaction:le,onSaveUpdateTransactionCategorization:K,onUpdateSelectedCheckboxTransactionIds:M,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:j,onFetchRecommendationsForEntityCategorizationWithCustomer:v,isCOTEnabled:C,setActivityLogTransactionId:Se});case"je_schedules":return t.jsx(oh,{setIsJeAccountSettingsOpened:ye,expenseAutomationViewSelector:h,setResetJeAccountSettingsForm:p,currentFooterFormId:n,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:L,handleJeScheduleClick:re,ignoreRecommendedJeSchedule:oe,onJESchedulesFormDataChange:X,onPostJESchedule:se,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g});case"missing_receipts":return st.fetchState==="Completed"&&st.transactions.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(Vh,{onUpdateMissingReceiptsUIState:N,onFetchMissingReceiptsList:T,missingReceipts:st,receiptUploadEndpoint:l,authParams:d,selectedPeriod:je,onMissingReceiptsRowClick:I,onUploadReceiptComplete:w,onUploadReceiptFetchStatus:D,onUploadReceiptAttachment:R});case"month_end_insights":if(Ue!=null&&h.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Ue.fetchState==="Not-Started"||Ue.fetchState==="In-Progress"||Ue.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Ue.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ea,{fetchState:"In-Progress"});{const _t={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Ue.companyName,url:window.location.href},{url:cn,...tt}=_t,Yt={...tt};return t.jsx(Vm,{children:t.jsx(xp,{allThreadsSectionOpen:S,customerRequestData:b,companyId:m,enableZeniGPTFeature:f,filterMetaData:Yt,selectedPeriod:h.selectedPeriod,improveUsingZeniGPTClick:O,isZeniUser:k?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Ue,newThreadMetadata:_t,onClickCustomerRequest:te,onCloseAllThreadsSection:W,onCloseFileAttachmentSnackBar:he,onOpenFileAttachmentSnackBar:F,onRemoveFileAttachment:J,onUpdateFileAttachment:G,previewMode:y,previewMonthEndReport:_,saveMonthEndReport:H,onEditClick:E,sendMonthEndReport:ee})})}}else return null;case"flux_analysis":return h.fluxAnalysis.fetchStatus.fetchState==="Completed"&&h.fluxAnalysis.sections.generalExpense.vendors.length===0&&h.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle}):t.jsx(Du,{fluxAnalysis:h.fluxAnalysis,selectedPeriod:h.selectedPeriod,markAsReview:xe,onReloadPage:$e,updateOperatingExpensesIdsForReview:$,updateSectionIdsForReview:be,onUpdateFluxAnalysisUIState:Le,setCurrentFooterFormId:L,fetchFluxViewOnScroll:Pe,onFetchFluxViewList:Ne,onFetchReimbursementView:ne,redirectToVendorDetailPage:ue});case"reconciliation":return t.jsx(fu,{onReloadReconciliationListPage:q,currentFooterFormId:n,reconciliation:Zt,companyId:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:g,onReviewClicked:et,setOpenDrawerClicked:Ge,setCurrentFooterFormId:L,onReconTabColumnSortConfigChanged:V,onUpdateReconcileTabLocalData:P,onEstablishConnectionClick:Ze,onFetchLinkTokenClick:de,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:xt,onSaveReconciliation:$t,onSaveReconciliationReview:Tt,onReconMatchedTransactionClick:ft,onAddStatementClick:Oe});default:return t.jsx(St,{tab:pe,title:He(pe).allDoneText.title,subTitle:He(pe).allDoneText.subTitle})}};function Hm(e){const n=ke(),{currentSelectedView:c}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",p=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Nm,{windowSize:n,style:{...p===!0?{paddingLeft:es.subSectionContainerLeftRightPadding.value(n),paddingRight:es.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:x[0],paddingRight:x[0]},...r===!0||c==="reconciliation"?{paddingLeft:x[0],paddingRight:x[0]}:{}},children:t.jsx(Wm,{...e})})}const Um=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"})),qm=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"})),Km=a.div`
1568
1568
  width: 100%;
1569
1569
  height: 100vh;
1570
1570
  display: flex;
@@ -1583,17 +1583,17 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1583
1583
  width: 100%;
1584
1584
  padding-left: ${o.sp0};
1585
1585
  }
1586
- `,ns=a(Ea)`
1586
+ `,ts=a(Aa)`
1587
1587
  height: ${o.sp3};
1588
1588
  width: ${o.sp3};
1589
1589
  cursor: pointer;
1590
1590
  color: inherit;
1591
- `,os=a(Um)`
1591
+ `,ns=a(Um)`
1592
1592
  height: ${o.sp3};
1593
1593
  width: ${o.sp3};
1594
1594
  cursor: pointer;
1595
1595
  color: inherit;
1596
- `,{common:{footer:Me,texts:{maxLimitReached:Gm,confirmAction:Zm},headers:Ym,create:Xm,strings:mn,texts:rn,cancel:Qm,confirm:e1,monthsByIndex:t1},dateFormat:{visual:{MMMDCommaYYYYformat:is}},expenseAutomation:gn}=Ie.getLocalizedStrings(),_1=e=>{const{expenseAutomationViewSelector:n,isDisabled:c,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:p,isCOTEnabled:h,onUpdateTab:i,onReconTabUpdate:d,onUpdateStep:l,onSearchTextChanged:m,onRefresh:u,onClose:g,onBack:f,resetTransactionCategorizationLocalData:y,updateOperatingExpensesIdsForReview:b,clearJeScheduleLocalData:S,onSaveReconciliation:k}=e,{currentSelectedView:C,allSteps:L,missingReceipts:j,jeSchedules:v,fluxAnalysis:A,monthEndInsights:T,transactionView:I,selectedTransactionCategorizationTab:R,reconciliation:w,selectedPeriod:D}=n,[V,q]=s.useState("expenseAutomationPage"),[B,N]=s.useState(()=>{}),[P,ie]=s.useState(!1),U=ke(),re=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),oe=re?ls:cs,{openThread:X,setOpenThread:se}=s.useContext(oe),[ge,Y]=s.useState(!1),[le,K]=s.useState(!1),M=L.find(ue=>ue.step===C),{nextStep:O,previousStep:J}=i1(L,C),{uiState:{searchString:G,pageToken:W},totalCountByTab:E,transactions:_,fetchStateByTransactionTabs:H,transactionLocalData:F}=I,{selectedReconAccount:he,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:te}}}}=w;let ee="Not-Started",xe="complete";switch(C){case"missing_receipts":ee=j.refreshStatus.fetchState,xe=j.completionStatus;break;case"je_schedules":ee=v.refreshStatus.fetchState,xe=v.completionStatus;break;case"month_end_insights":T!=null&&(ee=T?.fetchState);break;case"flux_analysis":ee=A.refreshStatus.fetchState,xe=A.completionStatus;break;case"transaction_categorization":ee=I.refreshStatus.fetchState,xe=I.completionStatus;break;case"reconciliation":he==null?(ee=w.refreshStatus.fetchState,xe=w.completionStatus):(ee=w.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",xe=w.completionStatus)}const $e=()=>{B()},{saveStatus:$,selectedCheckBoxTransactionIds:ne}=I,be=()=>{const ue=ia(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),Se=Zn(),{month:pe,year:st}=D,lt=Zn().set("month",pe-1).set("year",st).endOf("month");switch(V){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ue===!0?Me.markAsReviewed:rn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:go(n.fluxAnalysis.reviewOperatingExpensesIds.length,Ws,U,rn.vendor,C),cancelBtn:{label:Me.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{b([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:$.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:go(ne.length,yn,U,rn.transaction,C),cancelBtn:{label:Me.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{y(R,_.map(je=>je.id),D,!1,E[R],ei(F,R),p,W)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Me.next,backBtnLabel:Me.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.next,style:{justifyContent:"space-evenly"},isDisabled:c||M?.isNextDisabled,suffixIcon:t.jsx(ns,{}),onClick:()=>{l(O.step)}},cancelBtn:{label:Me.back,isDisabled:c||M?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(os,{}),onClick:()=>{l(J.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Me.reconcile,backBtnLabel:Me.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.reconcile,onClick:()=>{k({reconcileAction:"reconcile"})},isDisabled:!(w.reconciliationTabsState.balances.variance.amount===0&&Se.isAfter(lt)),isLoading:w.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:go(te.length,1/0,U,rn.transaction,C),cancelBtn:{onClick:()=>{k({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:w.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Me.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Me.save,backBtnLabel:Me.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.save,isLoading:v.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>$e(),label:Me.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const je=C==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Ue=C==="reconciliation"&&n.reconciliation.selectedAccountId==null,ln=C==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Zt=O.step==="month_end_insights"&&(C==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Ue),_t=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",cn=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",tt=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(Sn=>Sn.id==="month_end_insights"),Yt=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&tt?.isDisabled===!1&&(r||M?.isNextDisabled===!1),vn=O.step==="month_end_insights"&&(Ue||C==="flux_analysis")?!Yt:M?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Me.next,backBtnLabel:Me.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Zt===!0?o1(n.selectedPeriod.month):Me.next,style:{justifyContent:"space-evenly"},isDisabled:vn,suffixIcon:t.jsx(ns,{}),onClick:()=>{_t?i("autoCategorized"):je?d("reconcile"):l(O.step)}},cancelBtn:{label:Me.back,isDisabled:c||M?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(os,{}),onClick:()=>{cn?i("review"):ln?d("review"):je?f():l(J.step)}}}}}},Le=()=>{switch(V){case"expenseAutomationFluxPage":return{confirmAction:()=>{Y(!1),b([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Y(!1),y(R,_.map(ue=>ue.id),D,!1,E[R],ei(F,R),p,W),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Y(!1),S(),g()}};default:return{confirmAction:()=>{Y(!1)},confirmationDescription:mn.empty}}},Be=()=>{V==="expenseAutomationFluxPage"||V==="expenseAutomationJESchedulePage"||V==="expenseAutomationTransactionsPage"?Y(!0):g()},{primaryBtn:Ne,cancelBtn:ye,leftSideComponent:et}=be(),{confirmAction:Ge}=Le(),Ze=ue=>{if(C==="transaction_categorization"&&(ue==="autoCategorized"||ue==="review"))return{hideCountInTab:E[ue]>gn.common.numbers.maximumCount,count:E[ue],isFetching:H[ue].fetchState==="In-Progress"};if(C==="reconciliation"){const{reconciliation:Se}=n,{selectedAccountId:pe}=Se;return pe==null?{count:0,isFetching:!1}:ue==="review"?{count:Se.accountReconciliationsByAccountID[pe]?.accountReconEntity?.transactionsToReview.length,isFetching:Se.accountReconciliationsByAccountID[pe]?.transactionFetchState.fetchState==="In-Progress"}:{count:Se.accountReconciliationsByAccountID[pe]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Se.accountReconciliationsByAccountID[pe]?.transactionFetchState.fetchState==="In-Progress"}}},de=C==="reconciliation"&&w.selectedAccountId!=null&&w.selectedReconAccount!=null,{month:_e,year:xt}=D,$t=Zn().set("month",_e-1).set("year",xt),Tt=$t.startOf("month").format(is),ft=$t.endOf("month").format(is),Oe=`${Tt} ${mn.hyphen} ${ft}`;return t.jsxs(Km,{children:[ge?t.jsx(Ia,{containerStyle:{width:356},titleComponent:t.jsx(d1,{children:Zm}),primaryButtonText:e1,secondaryButtonText:Qm,proceedButtonVariant:"danger",action:{onOkClick:()=>{Ge()},onCancelClick:()=>Y(!1)},descriptionComponent:t.jsx(u1,{children:gn.confirmationDescription})}):null,t.jsx($a,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,headerContent:t.jsx(Ol,{onBack:f,navBarCustomElement:C==="reconciliation"&&w.selectedAccountId!=null?t.jsx(n1,{reconciliation:w}):void 0,onReconTabUpdate:d,currentRecontab:w.selectedTab,reconcileDetailPageFetchState:w.selectedAccountId!=null?w.accountReconciliationsByAccountID[w.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:de?w.selectedAccountId:void 0,currentSelectedView:C,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:He(C,E.autoCategorized,de?w.selectedAccountId:void 0,de?w.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,de?Oe:void 0),searchText:G,currentTab:R,getTabCountAndFetchState:Ze,completionStatus:xe,forceShowSubtitle:P===!0||C==="je_schedules"&&(v.fetchState==="In-Progress"||v.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ee,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??mn.empty,isZeniUser:re,onAllThreadsClick:()=>{X!=null&&se(null),K(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:Be}),listContent:t.jsxs(Jm,{children:[t.jsx(Hm,{...e,isCOTEnabled:h,setIsJeAccountSettingsOpened:ie,setResetJeAccountSettingsForm:N,allThreadsSectionOpen:le,setCurrentFooterFormId:q,currentFooterFormId:V,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(We,{controller:C!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(ds,{style:{width:"-webkit-fill-available",maxHeight:x[8]},formId:s1(V),primaryBtn:Ne,leftSideComponent:et,cancelBtn:ye,separatorStyle:{marginRight:o.sp4}})})]})})]})},n1=({reconciliation:e})=>{const n=kt(),{clearedBalance:c,variance:r,variancePercentage:p,deposits:h,payments:i}=e.reconciliationTabsState.balances,{balance:d}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:l}=e,{transactionFetchState:m}=l??{};return t.jsx(h1,{children:t.jsxs(p1,{children:[t.jsxs(xo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(fo,{children:t.jsx(m1,{})}),t.jsx(yo,{children:m?.fetchState==="In-Progress"?t.jsxs(bo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(wo,{children:Je("0,0.00",d)}),t.jsx(Co,{children:gn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(xo,{children:[t.jsx(fo,{children:t.jsx(x1,{})}),t.jsx(yo,{children:m?.fetchState==="In-Progress"?t.jsxs(bo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(wo,{children:Je("0,0.00",c)}),t.jsxs(y1,{children:[t.jsx(Co,{children:gn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(we,{placement:"bottom",title:t.jsxs(C1,{children:[t.jsxs(ss,{children:[t.jsxs(as,{children:[i.count," ",rn.payments]}),t.jsx(rs,{children:Je("0,0.[00]",i.totalAmount)})]}),t.jsxs(ss,{children:[t.jsxs(as,{children:[h.count," ",rn.deposits]}),t.jsx(rs,{children:Je("0,0.[00]",h.totalAmount)})]})]}),display:"flex",children:t.jsx(f1,{})})]})]})})]}),t.jsxs(xo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(fo,{children:t.jsx(g1,{})}),t.jsx(yo,{children:m?.fetchState==="In-Progress"?t.jsxs(bo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(wo,{children:[t.jsx("span",{style:{color:r.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Je("0,0.00",r)}),p!=null&&r.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${p.toFixed(2)}%)`}):null]}),t.jsx(Co,{children:gn.accountRecon.reconciliation.headers.variance})]})})]})]})})},go=(e,n,c,r,p)=>{const h=r,i=(e>1?h+"s":h)+" selected";return e>0?t.jsxs(a1,{currentView:p,style:c==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(r1,{multiDigit:e>=5,children:e}),t.jsx(l1,{children:i}),e===n?t.jsx(c1,{children:`(${Gm})`}):null]}):null},o1=e=>{const n=t1[e];return`${Xm}${mn.space}${n}${mn.space}${Ym.insights}`};function i1(e,n){const c=e.findIndex(d=>d.step===n);if(c===-1)throw new Error("currentStep not found in allSteps array");const r=(c+1)%e.length,p=(c-1+e.length)%e.length,h=e[r],i=e[p];return{nextStep:h,previousStep:i}}const s1=e=>`${e}_form`,a1=a.div`
1596
+ `,{common:{footer:Me,texts:{maxLimitReached:Gm,confirmAction:Zm},headers:Ym,create:Xm,strings:mn,texts:rn,cancel:Qm,confirm:e1,monthsByIndex:t1},dateFormat:{visual:{MMMDCommaYYYYformat:os}},expenseAutomation:gn}=Ie.getLocalizedStrings(),_1=e=>{const{expenseAutomationViewSelector:n,isDisabled:c,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:p,isCOTEnabled:h,onUpdateTab:i,onReconTabUpdate:d,onUpdateStep:l,onSearchTextChanged:m,onRefresh:u,onClose:g,onBack:f,resetTransactionCategorizationLocalData:y,updateOperatingExpensesIdsForReview:b,clearJeScheduleLocalData:S,onSaveReconciliation:k}=e,{currentSelectedView:C,allSteps:L,missingReceipts:j,jeSchedules:v,fluxAnalysis:A,monthEndInsights:T,transactionView:I,selectedTransactionCategorizationTab:R,reconciliation:w,selectedPeriod:D}=n,[V,q]=s.useState("expenseAutomationPage"),[P,N]=s.useState(()=>{}),[B,ie]=s.useState(!1),U=ke(),re=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),oe=re?rs:ls,{openThread:X,setOpenThread:se}=s.useContext(oe),[ge,Y]=s.useState(!1),[le,K]=s.useState(!1),M=L.find(ue=>ue.step===C),{nextStep:O,previousStep:J}=i1(L,C),{uiState:{searchString:G,pageToken:W},totalCountByTab:E,transactions:_,fetchStateByTransactionTabs:H,transactionLocalData:F}=I,{selectedReconAccount:he,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:te}}}}=w;let ee="Not-Started",xe="complete";switch(C){case"missing_receipts":ee=j.refreshStatus.fetchState,xe=j.completionStatus;break;case"je_schedules":ee=v.refreshStatus.fetchState,xe=v.completionStatus;break;case"month_end_insights":T!=null&&(ee=T?.fetchState);break;case"flux_analysis":ee=A.refreshStatus.fetchState,xe=A.completionStatus;break;case"transaction_categorization":ee=I.refreshStatus.fetchState,xe=I.completionStatus;break;case"reconciliation":he==null?(ee=w.refreshStatus.fetchState,xe=w.completionStatus):(ee=w.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",xe=w.completionStatus)}const $e=()=>{P()},{saveStatus:$,selectedCheckBoxTransactionIds:ne}=I,be=()=>{const ue=oa(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),Se=Gn(),{month:pe,year:st}=D,lt=Gn().set("month",pe-1).set("year",st).endOf("month");switch(V){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ue===!0?Me.markAsReviewed:rn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:mo(n.fluxAnalysis.reviewOperatingExpensesIds.length,Vs,U,rn.vendor,C),cancelBtn:{label:Me.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{b([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:$.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:mo(ne.length,yn,U,rn.transaction,C),cancelBtn:{label:Me.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{y(R,_.map(je=>je.id),D,!1,E[R],Qo(F,R),p,W)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Me.next,backBtnLabel:Me.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.next,style:{justifyContent:"space-evenly"},isDisabled:c||M?.isNextDisabled,suffixIcon:t.jsx(ts,{}),onClick:()=>{l(O.step)}},cancelBtn:{label:Me.back,isDisabled:c||M?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(ns,{}),onClick:()=>{l(J.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Me.reconcile,backBtnLabel:Me.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.reconcile,onClick:()=>{k({reconcileAction:"reconcile"})},isDisabled:!(w.reconciliationTabsState.balances.variance.amount===0&&Se.isAfter(lt)),isLoading:w.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:mo(te.length,1/0,U,rn.transaction,C),cancelBtn:{onClick:()=>{k({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:w.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Me.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Me.save,backBtnLabel:Me.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Me.save,isLoading:v.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>$e(),label:Me.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const je=C==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Ue=C==="reconciliation"&&n.reconciliation.selectedAccountId==null,ln=C==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Zt=O.step==="month_end_insights"&&(C==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Ue),_t=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",cn=C==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",tt=n.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(vn=>vn.id==="month_end_insights"),Yt=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&tt?.isDisabled===!1&&(r||M?.isNextDisabled===!1),bn=O.step==="month_end_insights"&&(Ue||C==="flux_analysis")?!Yt:M?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Me.next,backBtnLabel:Me.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Zt===!0?o1(n.selectedPeriod.month):Me.next,style:{justifyContent:"space-evenly"},isDisabled:bn,suffixIcon:t.jsx(ts,{}),onClick:()=>{_t?i("autoCategorized"):je?d("reconcile"):l(O.step)}},cancelBtn:{label:Me.back,isDisabled:c||M?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(ns,{}),onClick:()=>{cn?i("review"):ln?d("review"):je?f():l(J.step)}}}}}},Le=()=>{switch(V){case"expenseAutomationFluxPage":return{confirmAction:()=>{Y(!1),b([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Y(!1),y(R,_.map(ue=>ue.id),D,!1,E[R],Qo(F,R),p,W),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Y(!1),S(),g()}};default:return{confirmAction:()=>{Y(!1)},confirmationDescription:mn.empty}}},Pe=()=>{V==="expenseAutomationFluxPage"||V==="expenseAutomationJESchedulePage"||V==="expenseAutomationTransactionsPage"?Y(!0):g()},{primaryBtn:Ne,cancelBtn:ye,leftSideComponent:et}=be(),{confirmAction:Ge}=Le(),Ze=ue=>{if(C==="transaction_categorization"&&(ue==="autoCategorized"||ue==="review"))return{hideCountInTab:E[ue]>gn.common.numbers.maximumCount,count:E[ue],isFetching:H[ue].fetchState==="In-Progress"};if(C==="reconciliation"){const{reconciliation:Se}=n,{selectedAccountId:pe}=Se;return pe==null?{count:0,isFetching:!1}:ue==="review"?{count:Se.accountReconciliationsByAccountID[pe]?.accountReconEntity?.transactionsToReview.length,isFetching:Se.accountReconciliationsByAccountID[pe]?.transactionFetchState.fetchState==="In-Progress"}:{count:Se.accountReconciliationsByAccountID[pe]?.accountReconEntity?.transactionsToReconcile.length,isFetching:Se.accountReconciliationsByAccountID[pe]?.transactionFetchState.fetchState==="In-Progress"}}},de=C==="reconciliation"&&w.selectedAccountId!=null&&w.selectedReconAccount!=null,{month:_e,year:xt}=D,$t=Gn().set("month",_e-1).set("year",xt),Tt=$t.startOf("month").format(os),ft=$t.endOf("month").format(os),Oe=`${Tt} ${mn.hyphen} ${ft}`;return t.jsxs(Km,{children:[ge?t.jsx(ka,{containerStyle:{width:356},titleComponent:t.jsx(d1,{children:Zm}),primaryButtonText:e1,secondaryButtonText:Qm,proceedButtonVariant:"danger",action:{onOkClick:()=>{Ge()},onCancelClick:()=>Y(!1)},descriptionComponent:t.jsx(u1,{children:gn.confirmationDescription})}):null,t.jsx(Ia,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,headerContent:t.jsx(Ol,{onBack:f,navBarCustomElement:C==="reconciliation"&&w.selectedAccountId!=null?t.jsx(n1,{reconciliation:w}):void 0,onReconTabUpdate:d,currentRecontab:w.selectedTab,reconcileDetailPageFetchState:w.selectedAccountId!=null?w.accountReconciliationsByAccountID[w.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:de?w.selectedAccountId:void 0,currentSelectedView:C,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:He(C,E.autoCategorized,de?w.selectedAccountId:void 0,de?w.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,de?Oe:void 0),searchText:G,currentTab:R,getTabCountAndFetchState:Ze,completionStatus:xe,forceShowSubtitle:B===!0||C==="je_schedules"&&(v.fetchState==="In-Progress"||v.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ee,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??mn.empty,isZeniUser:re,onAllThreadsClick:()=>{X!=null&&se(null),K(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:Pe}),listContent:t.jsxs(Jm,{children:[t.jsx(Hm,{...e,isCOTEnabled:h,setIsJeAccountSettingsOpened:ie,setResetJeAccountSettingsForm:N,allThreadsSectionOpen:le,setCurrentFooterFormId:q,currentFooterFormId:V,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(We,{controller:C!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(cs,{style:{width:"-webkit-fill-available",maxHeight:x[8]},formId:s1(V),primaryBtn:Ne,leftSideComponent:et,cancelBtn:ye,separatorStyle:{marginRight:o.sp4}})})]})})]})},n1=({reconciliation:e})=>{const n=kt(),{clearedBalance:c,variance:r,variancePercentage:p,deposits:h,payments:i}=e.reconciliationTabsState.balances,{balance:d}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:l}=e,{transactionFetchState:m}=l??{};return t.jsx(h1,{children:t.jsxs(p1,{children:[t.jsxs(go,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(xo,{children:t.jsx(m1,{})}),t.jsx(fo,{children:m?.fetchState==="In-Progress"?t.jsxs(wo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Co,{children:Je("0,0.00",d)}),t.jsx(yo,{children:gn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(go,{children:[t.jsx(xo,{children:t.jsx(x1,{})}),t.jsx(fo,{children:m?.fetchState==="In-Progress"?t.jsxs(wo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Co,{children:Je("0,0.00",c)}),t.jsxs(y1,{children:[t.jsx(yo,{children:gn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(we,{placement:"bottom",title:t.jsxs(C1,{children:[t.jsxs(is,{children:[t.jsxs(ss,{children:[i.count," ",rn.payments]}),t.jsx(as,{children:Je("0,0.[00]",i.totalAmount)})]}),t.jsxs(is,{children:[t.jsxs(ss,{children:[h.count," ",rn.deposits]}),t.jsx(as,{children:Je("0,0.[00]",h.totalAmount)})]})]}),display:"flex",children:t.jsx(f1,{})})]})]})})]}),t.jsxs(go,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(xo,{children:t.jsx(g1,{})}),t.jsx(fo,{children:m?.fetchState==="In-Progress"?t.jsxs(wo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Co,{children:[t.jsx("span",{style:{color:r.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:Je("0,0.00",r)}),p!=null&&r.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${p.toFixed(2)}%)`}):null]}),t.jsx(yo,{children:gn.accountRecon.reconciliation.headers.variance})]})})]})]})})},mo=(e,n,c,r,p)=>{const h=r,i=(e>1?h+"s":h)+" selected";return e>0?t.jsxs(a1,{currentView:p,style:c==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(r1,{multiDigit:e>=5,children:e}),t.jsx(l1,{children:i}),e===n?t.jsx(c1,{children:`(${Gm})`}):null]}):null},o1=e=>{const n=t1[e];return`${Xm}${mn.space}${n}${mn.space}${Ym.insights}`};function i1(e,n){const c=e.findIndex(d=>d.step===n);if(c===-1)throw new Error("currentStep not found in allSteps array");const r=(c+1)%e.length,p=(c-1+e.length)%e.length,h=e[r],i=e[p];return{nextStep:h,previousStep:i}}const s1=e=>`${e}_form`,a1=a.div`
1597
1597
  display: flex;
1598
1598
  justify-content: flex-start;
1599
1599
  align-items: center;
@@ -1608,17 +1608,17 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1608
1608
  display: flex;
1609
1609
  justify-content: center;
1610
1610
  align-items: center;
1611
- `,l1=a(Pe)`
1611
+ `,l1=a(Be)`
1612
1612
  color: ${e=>e.theme.colors.primary};
1613
1613
  `,c1=a(It)`
1614
1614
  color: ${Qe.important};
1615
- `,d1=a(ka)`
1615
+ `,d1=a(ja)`
1616
1616
  margin-top: ${o.sp5};
1617
1617
  padding-left: ${o.sp8};
1618
1618
  padding-right: ${o.sp8};
1619
1619
  color: ${e=>e.theme.colors.primary};
1620
1620
  word-break: break-word;
1621
- `,u1=a(Ta)`
1621
+ `,u1=a($a)`
1622
1622
  color: ${e=>e.theme.colors.primary};
1623
1623
  margin-top: ${o.sp2};
1624
1624
  margin-bottom: ${o.sp2};
@@ -1633,12 +1633,12 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1633
1633
  justify-content: center;
1634
1634
  align-items: center;
1635
1635
  gap: ${o.sp1};
1636
- `,xo=a.div`
1636
+ `,go=a.div`
1637
1637
  display: flex;
1638
1638
  justify-content: center;
1639
1639
  align-items: center;
1640
1640
  gap: ${o.sp3};
1641
- `,fo=a.div`
1641
+ `,xo=a.div`
1642
1642
  width: ${o.sp7};
1643
1643
  height: ${o.sp7};
1644
1644
  border-radius: 50%;
@@ -1646,19 +1646,19 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1646
1646
  justify-content: center;
1647
1647
  align-items: center;
1648
1648
  background-color: ${e=>e.theme.mode==="dark"?e.theme.colors.brandColorJadeDark:e.theme.colors.brandColorJadeLight};
1649
- `,yo=a.div`
1649
+ `,fo=a.div`
1650
1650
  display: flex;
1651
1651
  flex-direction: column;
1652
- `,Co=a(It)`
1652
+ `,yo=a(It)`
1653
1653
  color: ${e=>e.theme.colors.hero};
1654
- `,wo=a(hs)`
1654
+ `,Co=a(us)`
1655
1655
  min-width: 180px;
1656
1656
  color: ${e=>e.theme.colors.primary};
1657
- `,m1=a(Ma)`
1657
+ `,m1=a(Oa)`
1658
1658
  color: ${e=>e.theme.colors.primary};
1659
1659
  width: ${o.sp4};
1660
1660
  height: ${o.sp4};
1661
- `,g1=a(Fa)`
1661
+ `,g1=a(Ma)`
1662
1662
  color: ${e=>e.theme.colors.primary};
1663
1663
  width: ${o.sp4};
1664
1664
  height: ${o.sp4};
@@ -1666,7 +1666,7 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1666
1666
  color: ${e=>e.theme.colors.primary};
1667
1667
  width: ${o.sp4};
1668
1668
  height: ${o.sp4};
1669
- `,f1=a(ps)`
1669
+ `,f1=a(hs)`
1670
1670
  width: ${o.sp3};
1671
1671
  height: ${o.sp3};
1672
1672
  color: ${e=>e.theme.colors.hero};
@@ -1681,18 +1681,18 @@ import{o,bV as ka,Q as ke,gh as ls,gi as cs,V as t,cp as Ia,bB as $a,aa as We,aR
1681
1681
  background-color: ${Qe.overlayDark};
1682
1682
  padding: 2px ${o.sp2};
1683
1683
  border-radius: ${o.sp1};
1684
- `,ss=a.div`
1684
+ `,is=a.div`
1685
1685
  display: flex;
1686
1686
  justify-content: space-between;
1687
1687
  gap: ${o.sp2};
1688
- `,as=a.div`
1688
+ `,ss=a.div`
1689
1689
  text-transform: capitalize;
1690
- `,rs=a(It)`
1690
+ `,as=a(It)`
1691
1691
  color: ${Qe.primaryDark};
1692
1692
  align-self: "flex-end";
1693
1693
  `,nn=a(Mt)`
1694
1694
  border-radius: ${o.sp2};
1695
- `,bo=a.div`
1695
+ `,wo=a.div`
1696
1696
  display: flex;
1697
1697
  flex-direction: column;
1698
1698
  min-width: 180px;