@zeniai/web-app-ui 5.3.71-qa → 5.3.72-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 (150) hide show
  1. package/dist/assets/{AccountMappingScreen-Da8kjow8.js → AccountMappingScreen-Dv_mcE-s.js} +2 -2
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-RoPWu4_o.js → ActualMatchingMatchDetailScreen-DQhBSzc_.js} +1 -1
  3. package/dist/assets/AddressRoutes-CY6bt6oR.js +1 -0
  4. package/dist/assets/{AddressScreen-CPpf4Cpj.js → AddressScreen-DAE2XqXc.js} +2 -2
  5. package/dist/assets/AiCfoScreen-BPlLSgy4.js +22 -0
  6. package/dist/assets/{AppDrawer-BxZ3HI7E.js → AppDrawer-B_kTdlDU.js} +2 -2
  7. package/dist/assets/{BillPayApprovalRoutes-c7b3I5yJ.js → BillPayApprovalRoutes-txmAkDB9.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-BDhRNd6v.js → BillPayRoutes-CWUxKmBT.js} +18 -18
  9. package/dist/assets/BusinessVerificationPageScreen-BvUcXpAj.js +9 -0
  10. package/dist/assets/CardsAiCfoScreen-nNC3ePcB.js +14 -0
  11. package/dist/assets/{ChargeCardRoutes-CWxqs0Z9.js → ChargeCardRoutes-Bbt0_9Bb.js} +6 -6
  12. package/dist/assets/{CompanyPassportScreen-CIym85mw.js → CompanyPassportScreen-rWKenTzd.js} +1 -1
  13. package/dist/assets/ConnectionAuthScreen-CztazncJ.js +11 -0
  14. package/dist/assets/CustomerOnboardingAuthScreen-yZ66vYtS.js +1 -0
  15. package/dist/assets/CustomerOnboardingRoutes-D8GPJqi3.js +30 -0
  16. package/dist/assets/{DashboardRoutes-Bq7IQcLO.js → DashboardRoutes-B_JSZLqZ.js} +3 -3
  17. package/dist/assets/{DefaultTenantHome-Bpge3yFF.js → DefaultTenantHome-IBmbS2vi.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-ZaeUg4I5.js → DomesticWireDetailScreen-DdWDhL04.js} +4 -4
  19. package/dist/assets/{DrawerScreen-bhsbfXgO.js → DrawerScreen-I1OXPpov.js} +1 -1
  20. package/dist/assets/EntityDetailRoutes-DxNEAh7j.js +1 -0
  21. package/dist/assets/{ExpenseAutomationRoutes-Dab9nQ3b.js → ExpenseAutomationRoutes-BJiDP5Wv.js} +6 -6
  22. package/dist/assets/FeaturePreviewScreen-BbHZWhrI.js +1 -0
  23. package/dist/assets/HubSpotOAuthCallbackScreen-CEvleGfK.js +1 -0
  24. package/dist/assets/{InboxNotificationsProvider-Vlyx5Pej.js → InboxNotificationsProvider-CH-l5W7V.js} +1 -1
  25. package/dist/assets/InvoicingRoutes-CaFgkG0d.js +2 -0
  26. package/dist/assets/{MagicLinkRoutes-DonztJNa.js → MagicLinkRoutes-DEWQ6tjb.js} +20 -20
  27. package/dist/assets/MagicLinkSignInScreen-D7kTTahR.js +12 -0
  28. package/dist/assets/MobileAppDrawer-8BZVS4o3.js +1 -0
  29. package/dist/assets/NotFoundScreen-DnqoRCYC.js +1 -0
  30. package/dist/assets/NotificationRoutes-B6eJv18K.js +1 -0
  31. package/dist/assets/OAuthConsentScreen-9x_SIQZM.js +1 -0
  32. package/dist/assets/PandLWithForecastRoutes-2XL-q-Jt.js +1 -0
  33. package/dist/assets/{PaymentLinkScreen-43J_ZGED.js → PaymentLinkScreen-C1S1ghTR.js} +5 -5
  34. package/dist/assets/PeopleRoutes-DVpXinz3.js +22 -0
  35. package/dist/assets/PerformanceRoutes-BRj-_-uP.js +1 -0
  36. package/dist/assets/{Preview-DqlOJJpJ.js → Preview-Ch5xsyMl.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-Czz6muQW.js → QBOConnectionScreen-Dnjt4r9I.js} +1 -1
  38. package/dist/assets/ReimbursementApprovalRoutes-CzHkAZyB.js +1 -0
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DN9la9Dm.js → ReimbursementApprovalRuleDetailScreen-DulfuoGj.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-BGNOeI_H.js → ReimbursementRoutes-BE0aOAON.js} +7 -7
  41. package/dist/assets/{ReportsRoutes-D-cpB-sX.js → ReportsRoutes-NzIYaPVq.js} +1 -1
  42. package/dist/assets/RewardsRoutes-CwZUzIe1.js +1 -0
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-CNF1ceQn.js → ScheduleDetailsPrepaidExpensesScreen-JrbhJns8.js} +5 -5
  44. package/dist/assets/ScreenRoutes-DwyFQCfk.js +2 -0
  45. package/dist/assets/{SettingsRoutes-D_LLhbJv.js → SettingsRoutes-C1rh1f5s.js} +6 -6
  46. package/dist/assets/SetupPagesScreen-Cl5BAT-o.js +29 -0
  47. package/dist/assets/SignInScreen-_U7Bj35k.js +1 -0
  48. package/dist/assets/SignOutScreen-BgEdGGQF.js +9 -0
  49. package/dist/assets/TaskListScreen-CvKGMIZk.js +9 -0
  50. package/dist/assets/TaskRoutes-CEJdgyOG.js +9 -0
  51. package/dist/assets/TransactionDetailRoutes-S-naEoj9.js +1 -0
  52. package/dist/assets/{TransactionDetailScreen-CWo5MdmD.js → TransactionDetailScreen-CNGUSd_b.js} +2 -2
  53. package/dist/assets/TransactionListRoutes-ChCViJl9.js +1 -0
  54. package/dist/assets/{TreasuryRoutes-B1C-ovJX.js → TreasuryRoutes-xGBsDsbG.js} +3 -3
  55. package/dist/assets/{VendorsRoutes-DoSPbM9C.js → VendorsRoutes-CxbN9ffS.js} +13 -13
  56. package/dist/assets/WiseConfirmationScreen--1X8GtN8.js +12 -0
  57. package/dist/assets/ZeniAccountRoutes-DKMn9Mvs.js +57 -0
  58. package/dist/assets/{ZeniAccountStatementScreen-kiOSzYpp.js → ZeniAccountStatementScreen-CY8Yij9t.js} +2 -2
  59. package/dist/assets/{accountMappingHelper-CeXF1Q4Q.js → accountMappingHelper-CnG-eRj3.js} +1 -1
  60. package/dist/assets/{analytics-DI5uqxwC.js → analytics-DlzSqyvZ.js} +1 -1
  61. package/dist/assets/{analyticsHelper-Df3DOmUB.js → analyticsHelper-Cq1viJip.js} +1 -1
  62. package/dist/assets/{core-_cqItzd_.js → core-D07hD3KT.js} +1 -1
  63. package/dist/assets/{decodeURIComponentSafe-CzbN3zRu.js → decodeURIComponentSafe-D3MFRtCF.js} +1 -1
  64. package/dist/assets/{dnd-BzHSvmGV.js → dnd-B-KpYfWT.js} +1 -1
  65. package/dist/assets/{empty-CTsBwHYQ.js → empty-DRbThjIF.js} +1 -1
  66. package/dist/assets/{empty-IeCSs-Vp.js → empty-aXh7noZx.js} +1 -1
  67. package/dist/assets/{emptyVideoElement-BDIFj1OP.js → emptyVideoElement-BZocj0UF.js} +1 -1
  68. package/dist/assets/epic-Du2AdUHP.js +2 -0
  69. package/dist/assets/expenseAutomationHelper-CL7YOVzM.js +1 -0
  70. package/dist/assets/{getLocaleForTenant-DNtLZSig.js → getLocaleForTenant-4ThGApJK.js} +1 -1
  71. package/dist/assets/{index-_QekaZI8.js → index-54OCX1PW.js} +1 -1
  72. package/dist/assets/{index-DVhAab8j.js → index-B1xlAtau.js} +16884 -16790
  73. package/dist/assets/{index-CFtxbACp.js → index-BIOOl02m.js} +1 -1
  74. package/dist/assets/{index-z7nFmc82.js → index-BVdX_ubi.js} +2 -2
  75. package/dist/assets/{index-LjABwt4q.js → index-BxmwktwS.js} +1 -1
  76. package/dist/assets/{index-B_Z1rAKT.js → index-D5s14gxd.js} +1 -1
  77. package/dist/assets/{index-CMOD4X8_.js → index-YyHAbx34.js} +1 -1
  78. package/dist/assets/{index-aNhAY0yh.js → index-z9Fh-4S1.js} +1 -1
  79. package/dist/assets/{lexical-CXRKir6z.js → lexical-NIxvAmS2.js} +1 -1
  80. package/dist/assets/{liveblocks-gNIoHksP.js → liveblocks-CQOAuUNI.js} +1 -1
  81. package/dist/assets/{lottie-CjJcvZ3r.js → lottie-BIKpYE12.js} +1 -1
  82. package/dist/assets/{mui-CDH3xRD_.js → mui-XiTT8YBC.js} +1 -1
  83. package/dist/assets/{pathToGoBack-DqZRBX-C.js → pathToGoBack-RICxbZCJ.js} +1 -1
  84. package/dist/assets/{pdf-BZVEJwNE.js → pdf-Dli3mGO_.js} +3 -3
  85. package/dist/assets/{pdf-lib-DnzapqoA.js → pdf-lib-D9XJLVoD.js} +1 -1
  86. package/dist/assets/{plaid-Dvn5Z296.js → plaid-BG3pJamN.js} +1 -1
  87. package/dist/assets/{pusher-CcIFKuUn.js → pusher-D9DkHuMx.js} +1 -1
  88. package/dist/assets/{react-CPb70X99.js → react-BLzCbojr.js} +1 -1
  89. package/dist/assets/{react-AHfmXvhq.js → react-C-5ZNsBH.js} +1 -1
  90. package/dist/assets/{react-DClAw2ak.js → react-C1d1ocIu.js} +1 -1
  91. package/dist/assets/{react-t3XyoKqw.js → react-CrrxpEIc.js} +1 -1
  92. package/dist/assets/{react-DAXlQZC6.js → react-D2I9LF0A.js} +1 -1
  93. package/dist/assets/{react-CuiiYztJ.js → react-DkT18Fv5.js} +1 -1
  94. package/dist/assets/{recharts-BgEcqT8y.js → recharts-CgYqsGTH.js} +1 -1
  95. package/dist/assets/{routePaths-DM8AEJT0.js → routePaths-Byv4I0Ax.js} +1 -1
  96. package/dist/assets/{sentry-BzzHvh63.js → sentry-pp_6zWNc.js} +1 -1
  97. package/dist/assets/{stripSplatSuffix-D8FyJbXM.js → stripSplatSuffix-DA-gXJ77.js} +1 -1
  98. package/dist/assets/{url-BuE-ZvDR.js → url-TK5h7pVR.js} +1 -1
  99. package/dist/assets/{url-0BMhJWUX.js → url-yI9BET_f.js} +1 -1
  100. package/dist/assets/useActualMatchingMatchDetail-DTg70T-B.js +1 -0
  101. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-C6pX9M29.js → useAiCfoDashboardSuggestedQuestionsChips-BtQMXCJn.js} +1 -1
  102. package/dist/assets/useAskAiCfoHostNavButtonProps-gzIjh_Rc.js +1 -0
  103. package/dist/assets/{useChargeCardPusherEvents-pc-PEvCr.js → useChargeCardPusherEvents-BYYn6vOu.js} +1 -1
  104. package/dist/assets/{useDeviceId-DYE-WS_B.js → useDeviceId-DCPRNX-s.js} +1 -1
  105. package/dist/assets/useEmailConnectResultRefresh-C_tEfW8U.js +1 -0
  106. package/dist/assets/{useInitialThreadRequest-CSR_bJDf.js → useInitialThreadRequest-Cuwjfmqu.js} +1 -1
  107. package/dist/assets/useTaskManagerAccess-Y5qsn5_D.js +1 -0
  108. package/dist/assets/{useTaskManagerPusherEvents-C0fOaGqk.js → useTaskManagerPusherEvents-CgwVJFYR.js} +1 -1
  109. package/dist/assets/{utils-DZX8_JTm.js → utils-CrOdvv6w.js} +1 -1
  110. package/dist/assets/{withTransactionSidePanel-BKXId2BT.js → withTransactionSidePanel-BqueNlFJ.js} +4 -4
  111. package/dist/assets/{zeni-epic-state-ClqSlu6d.js → zeni-epic-state-B3TABHgO.js} +6 -6
  112. package/dist/index.html +1 -1
  113. package/package.json +4 -4
  114. package/dist/assets/AddressRoutes-C13OMsQB.js +0 -1
  115. package/dist/assets/AiCfoScreen-C1Zi5BWJ.js +0 -22
  116. package/dist/assets/BusinessVerificationPageScreen-CaVy5wIy.js +0 -9
  117. package/dist/assets/CardsAiCfoScreen-BHtNOqz6.js +0 -14
  118. package/dist/assets/ConnectionAuthScreen-C6aejitU.js +0 -11
  119. package/dist/assets/CustomerOnboardingAuthScreen-abpr3s2K.js +0 -1
  120. package/dist/assets/CustomerOnboardingRoutes-DVMAQtsb.js +0 -30
  121. package/dist/assets/EntityDetailRoutes-bilW2_CZ.js +0 -1
  122. package/dist/assets/FeaturePreviewScreen-ADHB7kMI.js +0 -1
  123. package/dist/assets/HubSpotOAuthCallbackScreen-7DU1Mbfq.js +0 -1
  124. package/dist/assets/InvoicingRoutes-CiTJXDwp.js +0 -2
  125. package/dist/assets/MagicLinkSignInScreen-DdvxD6Sl.js +0 -12
  126. package/dist/assets/MobileAppDrawer-Boi7lIY0.js +0 -1
  127. package/dist/assets/NotFoundScreen-XQ69x1V9.js +0 -1
  128. package/dist/assets/NotificationRoutes-CjruMuyg.js +0 -1
  129. package/dist/assets/OAuthConsentScreen-fv9EuWPU.js +0 -1
  130. package/dist/assets/PandLWithForecastRoutes-CwPS1KT_.js +0 -1
  131. package/dist/assets/PeopleRoutes-B4wBQVwY.js +0 -22
  132. package/dist/assets/PerformanceRoutes-BaUrr9_i.js +0 -1
  133. package/dist/assets/ReimbursementApprovalRoutes-BoJxAtXM.js +0 -1
  134. package/dist/assets/RewardsRoutes-Cp5QwRpd.js +0 -1
  135. package/dist/assets/ScreenRoutes-DSM6zpE1.js +0 -2
  136. package/dist/assets/SetupPagesScreen-PMDfztMD.js +0 -29
  137. package/dist/assets/SignInScreen-DXEwLRRd.js +0 -1
  138. package/dist/assets/SignOutScreen-rRGrVkZi.js +0 -9
  139. package/dist/assets/TaskListScreen-C_FDDeaV.js +0 -9
  140. package/dist/assets/TaskRoutes-DIOgMKYK.js +0 -9
  141. package/dist/assets/TransactionDetailRoutes-C6i9gm0l.js +0 -1
  142. package/dist/assets/TransactionListRoutes-DMziXkI4.js +0 -1
  143. package/dist/assets/WiseConfirmationScreen-CYU0SXmY.js +0 -12
  144. package/dist/assets/ZeniAccountRoutes-4rPFLUgD.js +0 -57
  145. package/dist/assets/epic-BpPMSALI.js +0 -2
  146. package/dist/assets/expenseAutomationHelper-CTin--xN.js +0 -1
  147. package/dist/assets/useActualMatchingMatchDetail-CQqHF-gN.js +0 -1
  148. package/dist/assets/useAskAiCfoHostNavButtonProps-DQSYAHEz.js +0 -1
  149. package/dist/assets/useEmailConnectResultRefresh-XR0U1MaM.js +0 -1
  150. package/dist/assets/useTaskManagerAccess-CZYVdWyJ.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as a}from"./liveblocks-gNIoHksP.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as L,N as te,n as ne,o as p}from"./core-_cqItzd_.js";import{UA as k,UB as v,UC as T,JE as B,Jq as U,UD as D,UE as oe,UF as ie,Ju as se,gl as $,JB as le,Jy as de}from"./zeni-epic-state-ClqSlu6d.js";import{a1 as x,M as d,a2 as re,n as j,Y as G,a3 as ce,a4 as me,a5 as pe,p as J,_ as ue,f as he,a6 as ge,c as xe,E as fe,h as be,a7 as we,a8 as Se,$ as ye,a9 as ke,aa as ve,ab as je,ac as $e}from"./index-DVhAab8j.js";import{n as m}from"./mui-CDH3xRD_.js";import f from"./NotFoundScreen-XQ69x1V9.js";import{a as I}from"./sentry-BzzHvh63.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="62d06cd4-2587-4924-a520-5b4d389e5efb",e._sentryDebugIdIdentifier="sentry-dbid-62d06cd4-2587-4924-a520-5b4d389e5efb")}catch{}})();const Ie=m.div`
1
+ import{j as a}from"./liveblocks-CQOAuUNI.js";import{i as S,l as g,h as C,g as y,u as ee,t as ae,j as L,N as te,n as ne,o as p}from"./core-D07hD3KT.js";import{UE as k,UF as v,UG as T,JF as D,Jr as U,UH as B,UI as oe,UJ as ie,Jv as se,gl as $,JC as le,Jz as re}from"./zeni-epic-state-B3TABHgO.js";import{a1 as x,N as r,a2 as de,k as j,Z as G,a3 as ce,a4 as me,a5 as pe,p as J,H as ue,y as he,a6 as ge,D as xe,E as fe,f as we,a7 as be,a8 as Se,$ as ye,a9 as ke,aa as ve,ab as je,ac as $e}from"./index-B1xlAtau.js";import{n as m}from"./mui-XiTT8YBC.js";import f from"./NotFoundScreen-DnqoRCYC.js";import{a as I}from"./sentry-pp_6zWNc.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0826db30-9466-481f-965e-6e3697d90452",e._sentryDebugIdIdentifier="sentry-dbid-0826db30-9466-481f-965e-6e3697d90452")}catch{}})();const Ie=m.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -6,8 +6,8 @@ import{j as a}from"./liveblocks-gNIoHksP.js";import{i as S,l as g,h as C,g as y,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(U(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}}))(re);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
9
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=g((function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}}),(function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(U(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(D(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(T({data:l}))}}}))(de);function F(){const e=x(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const De=m.div`
11
11
  display: flex;
12
12
  height: 100vh;
13
13
  width: 100%;
@@ -15,8 +15,8 @@ import{j as a}from"./liveblocks-gNIoHksP.js";import{i as S,l as g,h as C,g as y,
15
15
  flex-direction: column;
16
16
  align-items: center;
17
17
  background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,De=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=Ee(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},Ee=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),ze=m.div`
18
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,Be=g((function(e,t){const{isSubPage:n}=t;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=x();return a.jsx(a.Fragment,{children:a.jsx(De,{windowSize:o,children:a.jsx(Be,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ee=m.div`
20
20
  display: flex;
21
21
  height: 100%;
22
22
  width: 100%;
@@ -24,8 +24,8 @@ import{j as a}from"./liveblocks-gNIoHksP.js";import{i as S,l as g,h as C,g as y,
24
24
  flex-direction: column;
25
25
  align-items: center;
26
26
  background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Ne=g((function(e){const t=k(e),n=v(e),o=D(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(U(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:r}=s;e(T({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),r=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(pe);function Le(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(ze,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
27
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Ne=g((function(e){const t=k(e),n=v(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(U(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(T({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Le(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ee,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
29
29
  display: flex;
30
30
  height: 100%;
31
31
  width: 100%;
@@ -33,40 +33,40 @@ import{j as a}from"./liveblocks-gNIoHksP.js";import{i as S,l as g,h as C,g as y,
33
33
  flex-direction: column;
34
34
  align-items: center;
35
35
  background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=g((function(e){const t=k(e),n=v(e),o=D(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:r}=s;e(ie({data:r}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),r=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:r}})}}}))(ge);function Ue(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},Je=m(ke)`
38
- width: ${d.sp4};
39
- height: ${d.sp4};
40
- margin-bottom: ${d.sp3};
41
- margin-top: ${d.sp3};
42
- margin-left: ${d.sp8};
36
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Te=g((function(e){const t=k(e),n=v(e),o=B(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}}),(function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(D(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=J(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(ge);function Ue(){const e=C(),t=y(),n=x(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Te,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},Je=m(ke)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
43
  cursor: pointer;
44
44
  position: absolute;
45
45
  color: ${e=>e.theme.colors.brandColorJade};
46
- `,Me=m.div`
46
+ `,He=m.div`
47
47
  display: flex;
48
48
  height: 100vh;
49
49
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
50
  width: 100vw;
51
51
  overflow-y: scroll;
52
52
  background-color: ${e=>e.theme.colors.grey4};
53
- `,He=m.div`
53
+ `,Me=m.div`
54
54
  display: flex;
55
55
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
56
  flex-direction: column;
57
57
  width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
58
  ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
59
+ box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
61
  `,Ve=m.div`
62
62
  display: flex;
63
63
  flex-direction: column;
64
64
  align-items: center;
65
65
  justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
67
  height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
68
  overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
69
  width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
70
  background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
71
  margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,_e=g((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),r=s.get("token"),M=n.pathname.includes("address"),b=x(),H=xe(),A=fe(),w=be(),V=()=>{H.toggle()},_=L((u=>k(u))),K=L((u=>v(u))),{authParams:W,fetchState:c,billAttachment:O,billFetchState:P,companyName:Y,currencySymbol:q,amount:Q}=_,{tenantId:E,userId:z,sessionId:N}=W,{fetchState:R,internationalBankAccountCreateStatus:X}=K;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&r!=null&&t(le(i,o,r))}),[w,c,i,o,r,t]),I.useEffect((()=>{w&&c==="Completed"&&($(z,N,E),l!=null&&t(de(l)))}),[c,w,z,N,E,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",Y,l??"",Ke(n.pathname),q,Q))(u)}),a.jsxs(Me,{windowSize:b,children:[b!=="small"?a.jsx(Je,{onClick:V}):null,a.jsx(Ve,{windowSize:b,isAddressPage:M,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:O,type:"bill"})}),a.jsx(He,{windowSize:b,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Le,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ue,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
72
+ `,_e=g((function(e,t){return{file:t.file,type:t.type}}))(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),H=n.pathname.includes("address"),w=x(),M=xe(),A=fe(),b=we(),V=()=>{M.toggle()},_=L((u=>k(u))),K=L((u=>v(u))),{authParams:W,fetchState:c,billAttachment:q,billFetchState:P,companyName:O,currencySymbol:Q,amount:Z}=_,{tenantId:z,userId:E,sessionId:N}=W,{fetchState:R,internationalBankAccountCreateStatus:X}=K;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))}),[b,c,i,o,d,t]),I.useEffect((()=>{b&&c==="Completed"&&($(E,N,z),l!=null&&t(re(l)))}),[c,b,E,N,z,l,t]),c==="Error"?a.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Y=>Y.trackBillPayMagicLinkPageLoad(o??"",i??"",O,l??"",Ke(n.pathname),Q,Z))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(Je,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:H,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(_e,{file:q,type:"bill"})}),a.jsx(Me,{windowSize:w,children:e})]})]})}const Ke=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function We(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(We,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Le,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Ue,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-CQOAuUNI.js";import{a as f}from"./sentry-pp_6zWNc.js";import{u as O,g as _,h as w,t as A,j as l,N as L}from"./core-D07hD3KT.js";import{z as r,E as M,G as P,T as V,k as N,U as X,_ as $,$ as B,X as G}from"./index-B1xlAtau.js";import{fI as R,U7 as W,UA as q,Ur as H,gl as J,gn as K,Uw as Q,gX as Y,dk as Z,UB as ee,UC as te}from"./zeni-epic-state-B3TABHgO.js";import{n as ne}from"./mui-XiTT8YBC.js";import{u as se}from"./useDeviceId-DCPRNX-s.js";import{f as ie}from"./analyticsHelper-Cq1viJip.js";import{t as ae}from"./getLocaleForTenant-4ThGApJK.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="384996f5-5624-4470-974d-63f32ceff989",t._sentryDebugIdIdentifier="sentry-dbid-384996f5-5624-4470-974d-63f32ceff989")}catch{}})();const T=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Te(){const t=O(),i=_(),m=w(),[y]=A(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=l((e=>e.tenantState.activeTenantFetchState.fetchState)),I=l((e=>e.tenantState.signInState)),h=l((e=>e.tenantState.magicLinkSignInFetchState.fetchState)),s=l((e=>e.tenantState.loggedInUser)),o=l((e=>R(e))),k=l((e=>W(e))),D=r.getSignedInUser(),v=M().mode;f.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&a!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(q(n,a,g)))}),[n,p,t,a,g,s?.zeniSessionId]),f.useEffect((()=>{I!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),J(s.userId,s.zeniSessionId,o.tenantId),t(K(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(Q("Completed")),P.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,k.tenantsInOrder),Y().then((()=>{const e=G();e!=null&&V(e)})),setTimeout((()=>{N.trackLogin(X.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[I,S,b,s,o,k,v,i.state,t]);const E=f.useCallback((()=>{m("/signin/auth")}),[m]),j=f.useCallback((()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))}),[a,d,t,c]),F=f.useCallback((e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))}),[a,n,t,c,d]);if(h==="Completed"&&d!=null)return u.jsx($,{phoneNumber:C,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:E});if(I==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||D!=null){const e=i.state?.origin??"/";return u.jsx(L,{to:e,state:{...i.state,origin:""}})}if(!T(n,p)||g==null||h==="Error"){const e=i.state?.origin??"/",U=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(L,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:U,magicLinkExpired:!U&&(r.isMagicLinkTriggered(n??"")||h==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(B,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{Te as default};
@@ -0,0 +1 @@
1
+ import{j as B}from"./liveblocks-CQOAuUNI.js";import{a as m}from"./sentry-pp_6zWNc.js";import{u as te,j as t,i as $e,g as Ge,h as Ue,q as F}from"./core-D07hD3KT.js";import{fI as ne,U8 as Me,U9 as se,gc as xe,fH as Ne,Ui as Pe,Ub as Re,Uc as Ve,q2 as Oe,gp as Le,Uf as h,Uk as je,Ul as Q,gq as qe,Um as He,Ei as Ze,h4 as ze,cW as We,Un as Ye,gb as Je,gr as Ke}from"./zeni-epic-state-B3TABHgO.js";import{w as Qe,i as Xe,D as ea,H as aa,c as ta,f as na,u as sa,y as c,g as oa,e as ia,z as ra,d as da,l as ca,n as la,v as ua,o as ma,q as X,L as fa,J as ba,K as ha,p as S,k as ee,B as pa,O as ae,F as ga,I as Sa}from"./index-B1xlAtau.js";import{D as ka}from"./mui-XiTT8YBC.js";import{u as Ea}from"./InboxNotificationsProvider-CH-l5W7V.js";import{u as Ca}from"./useTaskManagerAccess-Y5qsn5_D.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new l.Error().stack;i&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[i]="74704a24-b5b0-486b-8f93-79b14385b7ee",l._sentryDebugIdIdentifier="sentry-dbid-74704a24-b5b0-486b-8f93-79b14385b7ee")}catch{}})();const Ta=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Ue(),D=xe(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ca(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Ne(e))),{status:ie}=t(Pe),G=$.uiState.currentChatSessionId,C=na(),{setLoading:re}=sa(),[w,U]=m.useState(void 0),v=F("/:tenantEmailDomain/dashboard")!==null,M=F("/:tenantEmailDomain/reports")!==null,f=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,x),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),N=t((e=>Re(e))),{isFeatureEnabled:T}=d(c.isReferralFeatureEnabled),A=t((e=>Ve(e)));m.useEffect((()=>{C&&T&&!f&&A.fetchState==="Not-Started"&&r(Oe(!0))}),[C,T,A.fetchState,f]);const _=t((e=>e.tenantState)),me=t((e=>_.fetchState==="Completed"?Le(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:fe}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:be}=d(c.isArAgingFeatureEnabled),P=ia(),{isFeatureEnabled:he}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>h(e).totalUnreadCount)),Ce=t((e=>h(e).reducedFetchCountState)),R=t((e=>h(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>h(e).notificationDetailsByTab.comments.uiState.unreadCount)),O=t((e=>h(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>h(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:L,isLoading:j,isFetchingMore:q,hasFetchedAll:H,fetchMore:Te}=Ea();m.useEffect((()=>{const e=setTimeout((()=>Te?.()),0);return()=>clearTimeout(e)})),m.useEffect((()=>{if(j===!1&&q===!1&&H===!0)if(o?.companyId!=null&&L!=null){const e=`dashboard_${o.companyId}`;U(L.filter((u=>u.roomId===e&&u.readAt==null)).length)}else U(0)}),[j,q,H]),m.useEffect((()=>{C&&E&&!f&&O.fetchState==="Not-Started"&&D.tenantId!=null&&r(je("task_manager","dashboard"))}),[C,E,f,O.fetchState,D.tenantId,r]),m.useEffect((()=>{f||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[f,I.fetchState,r]),m.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(Q({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ce,count:Ee},Z=s!=null?ra.getSignedInUserTenant(s):null,z=t((e=>Z?.tenantId!=null?qe(e,Z.tenantId):void 0)),b=[];fe===!1&&b.push("accounts_payable_aging"),be===!1&&b.push("accounts_receivable_aging"),b.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&b.push("rewards_card"),P===!1&&b.push("expense_automation_card");const W=t((e=>He(e,b).fetchState)),Y=t((e=>Ze(e).fetchState)),ye=v&&(W==="Completed"||W==="Error")||M&&(Y==="Completed"||Y==="Error")||!v&&!M?void 0:"disabled",we=m.useMemo((()=>ze(o.userRole)),[o.userRole]),ve=We(we),Ae=o?.rewardsLastViewedTime==null,_e=p?.userEmail!=null&&N.fetchState==="Completed"&&Ye(N.notificationSettings,p.userEmail,x,o,E),J=da(),Fe=J&&ca(a);return B.jsx(ka,{container:window.document.body,variant:"temporary",open:l,onClose:()=>i(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(la,{signedInUser:p,currentTenantId:_.currentTenantId??"",tenants:_.fetchState==="Completed"?me:z!=null?[z]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:ma(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:ve,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:_e,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:P,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ae,rewardsPlan:A.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=R===0&&V>0?"notifications/comments":"notifications/tasks";X(a)&&(e=R===0&&V>0?"../../notifications/comments":"../../notifications/tasks");const u=S(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=S(a.state?.pathnameStackToGoBack,a.pathname);n("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(i(!1),s==null)return;if(e.type==="invoicing")return void n(`../${s}/invoicing/overview`,{state:{pathnameStackToGoBack:S(a.state?.pathnameStackToGoBack,a.pathname),referrer:"Sidebar"}});if(e.type==="ai_cfo"){if(ee.trackAICFOChatScreenStateChanged("viewed","left_menu",G??null,null),!oe)return void pa({location:a,navigate:n,mergeState:{referrer:"Sidebar"}});const y=S(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=S(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,Be=ae(K)&&K!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),Be&&g[o.tenantId]!=null){const y=g[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const De=ga(e.type);Sa(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${De}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{i(!1),n(`/${s}/settings/my_profile`)},handleReferralsClick:()=>{i(!1),n(`/${s}/rewards`)},handleBackClick:()=>{n(`/${s}/dashboard`)},handleTenantSelect:e=>{re(fa.TENANT_SWITCHING),i(!1),ba({dispatch:r,navigate:n,pathToNavigate:ha(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:v,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:he,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Da=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Xe(n)&&Me(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return B.jsx(Ta,{...l,...a})};export{Da as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-CQOAuUNI.js";import{h as r,l as i}from"./core-D07hD3KT.js";import{am as n}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import"./sentry-pp_6zWNc.js";import"./zeni-epic-state-B3TABHgO.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="f2f6ef04-8019-4dfe-8bec-98d5efe59039",o._sentryDebugIdIdentifier="sentry-dbid-f2f6ef04-8019-4dfe-8bec-98d5efe59039")}catch{}})();const f=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(f,{navigate:o})}export{_ as default};
@@ -0,0 +1 @@
1
+ import{n as mt,b as lt,o as ft,j as N}from"./liveblocks-CQOAuUNI.js";import ut from"./NotFoundScreen-DnqoRCYC.js";import{a as k}from"./sentry-pp_6zWNc.js";import{h as ht,g as pt,i as kt,u as gt,j as b,l as bt,n as St,o as O}from"./core-D07hD3KT.js";import{cB as It,Ub as Y,fI as J,h4 as Tt,Uf as S,a19 as Q,Ul as m,U9 as y,Ay as F,Gf as Ct,a1a as At,U8 as yt,Un as Et,AD as _t,a1b as $,br as j,gk as x,AH as X,a1c as Nt,cN as Bt,cG as wt}from"./zeni-epic-state-B3TABHgO.js";import{aq as xt,c as Ut,H as vt,y as Dt,as as Gt,dK as Rt,p as B,dL as Pt,w as Mt,dM as $t,i as jt,a4 as Ft}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-gzIjh_Rc.js";import{u as Lt}from"./useTaskManagerAccess-Y5qsn5_D.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="be88a2ac-7cda-471c-9fd4-0866ba054658",t._sentryDebugIdIdentifier="sentry-dbid-be88a2ac-7cda-471c-9fd4-0866ba054658")}catch{}})();const qt=(t,l)=>new Promise(((n,h)=>{const g=t.map((c=>new Promise((o=>{l(c),o()}))));Promise.all(g).then((()=>{setTimeout((()=>{n()}),2e3)})).catch((c=>{h(c)}))})),Ht=bt((function(t,l){const n=Y(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=S(t),f=J(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&Et(n.notificationSettings,h.userEmail,g,f,c),isDisabled:o.notificationDetailsByTab[I].fetchState==="In-Progress"?"disabled":void 0}}),(function(t,l){const{location:n,tenantEmailDomain:h,loggedInUserRoleMap:g,externalNotificationsUnreadCount:c,allUnreadCommentsNotificationIds:o,navigate:f,markInboxNotificationAsRead:I,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(e,s,d,r)=>{if(r==="task_deleted"){const i=`/${h}/tasks`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}else{const i=`/${h}/tasks/${s}`,T=B(n.state?.pathnameStackToGoBack,n.pathname);f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}d==="unread"&&t(X("task_manager","read",[e],!1))},onCommentNotificationClick:(e,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(e),t($([e],j())));let i=`/${h}/${r[1]}`;const T=B(n.state?.pathnameStackToGoBack,n.pathname);r[1].startsWith("reimbursement")&&!Bt(g)&&(i="not-found"),r[1].startsWith("bill")&&!wt(g)&&(i="not-found"),f(i,{state:{pathnameStackToGoBack:T,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(e,s)=>{t(y(e,s))},onUpdateNotificationTabState:(e,s)=>{t(m(e,s))},onUpdateNotificationViewCurrentTabAndSubTab:(e,s)=>{t(Q(e,s));const d=`../${e}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:e=>{t(Nt(e))},onFetchMoreNotifications:(e,s)=>{if(e==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(F("task_manager","dashboard",d))}else v?.()},onUpdateNotificationStatus:(e,s,d,r)=>{e==="tasks"?t(X("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t($([i],j())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:c-r.length>0?c-r.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((i=>{t(m({markAsReadState:{fetchState:"Error",error:i}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:e=>{e==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),qt(o,I).then((()=>{t($(o,j())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((s=>{t(m({markAsAllReadState:{fetchState:"Error",error:s}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const e=Ft(n.state?.pathnameStackToGoBack),s=e.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:e.newStack}})},onSettingsClick:()=>{const e=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:e}})}}}))(Mt($t)),Wt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=Ut(),[I,v]=k.useState(!1),e=b((a=>Y(a))),s=b((a=>J(a))),{useFeatureGate:d}=vt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const Z=Tt(s.userRole);if(s==null||n==null||s.companyId==null)throw Error("Can't access notifications page without current tenant...");if(f==null)throw Error("Can't access notifications page without signed in...");const V=b((a=>S(a).notificationDetailsByTab.tasks.fetchState)),L=b((a=>S(a).currentTab)),D=b((a=>S(a).currentSubTab)),tt=b((a=>S(a).notificationDetailsByTab.comments.fetchCountState)),G=b((a=>S(a).notificationDetailsByTab.comments.fetchState)),at=b((a=>S(a).notificationDetailsByTab.comments.uiState.unreadCount)),et=b((a=>S(a).allExternalNotifications)).filter((a=>a.inboxNotification.readAt==null)).map((a=>a.inboxNotification.id)),st=Rt().allUsers,{inboxNotifications:w,isLoading:E,hasFetchedAll:C,isFetchingMore:R,fetchMore:ot}=mt(),{threads:q,isLoading:H,fetchMore:W,isFetchingMore:z,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(L!==c&&c!=null&&o(Q(c)),c==null){const a=`../${L}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(a,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&C===!0&&s?.companyId!=null&&w!=null){const a=`dashboard_${s.companyId}`,p=w.filter((A=>A.roomId===a&&A.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(y({unreadCount:p},"comments"))}}),[E,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(F("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const a=setTimeout((()=>ot?.()),0);return()=>clearTimeout(a)}));const P=E||R===!0||C!==!0||E||R===!0||C!==!0;k.useEffect((()=>{P&&G!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):P||G!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[P,G]),k.useEffect((()=>{o(y({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{e.fetchState!=="In-Progress"&&e.fetchState!=="Completed"&&I===!1&&(v(!0),o(Ct()))}),[e.fetchState]),k.useEffect((()=>{if(E===!1&&H===!1&&w!=null&&q!=null){const a=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===a)).filter((u=>Pt(u.kind))),A=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const M=q.find((dt=>{return dt.id===((U=u).kind==="thread"?U.threadId:"subjectId"in U?U.subjectId:void 0);var U}));return M!=null?{inboxNotification:{...u,threadId:M.id},thread:M}:(z||K===!0||W==null||W(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(y({totalCount:_.length,unreadCount:A.length},"comments")),o(At(ct))}}),[E,R,z,C,K,H,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(a,p)=>{if(jt(p)){const A=yt(p.mode);if(A==="dashboard"&&o(y({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(F("task_manager",A,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=Lt(f);return N.jsx(Ht,{tenantEmailDomain:n,loggedInUserRoleMap:Z,signedInUser:f,externalNotificationsUnreadCount:at,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function ma(){return N.jsxs(St,{children:[N.jsx(O,{path:"/:selectedTab",element:N.jsx(Wt,{})}),N.jsx(O,{path:"*",element:N.jsx(ut,{})})]})}export{ma as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-CQOAuUNI.js";import{a as r}from"./sentry-pp_6zWNc.js";import{u as A,g as P,j as o,N as j}from"./core-D07hD3KT.js";import{UO as C,fI as R,gp as x,UP as z,UQ as D,UR as M,US as L,pV as k,Tt as N}from"./zeni-epic-state-B3TABHgO.js";import{z as h,ah as I}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="c7e15d0f-8386-4c7a-8877-066d040fdca4",n._sentryDebugIdIdentifier="sentry-dbid-c7e15d0f-8386-4c7a-8877-066d040fdca4")}catch{}})();function ee(){const n=A(),s=P(),{params:t,error:i}=r.useMemo((()=>C(s.search)),[s.search]),w=r.useMemo((()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application"),[s.search,t]),p=h.isSignedIn(),a=h.getSignedInUser(),f=o((e=>R(e))),l=o((e=>x(e))),d=o((e=>e.tenantState.fetchState)),y=o(z),S=o(D),c=o(M),[U,v]=r.useState(null),[E,b]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[n,s.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{p&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(k(a.userId,a.zeniSessionId??void 0))))}),[p,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const _=r.useMemo((()=>{if(f?.tenantId!=null)return f.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((T=>T.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[f?.tenantId,l]),u=U??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):p?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{b("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-CQOAuUNI.js";import{h as W,u as Y,g as H,i as z,j as d,l as J,n as K,o as S}from"./core-D07hD3KT.js";import{fI as v,Aj as R,vb as Q,VG as M,v6 as C,bq as X,c0 as Z,v7 as ee,VH as ae,Vo as y,ek as te,E7 as se,VI as oe,Ev as re,e0 as ne,d$ as ce}from"./zeni-epic-state-B3TABHgO.js";import{ai as ie,z as le,aq as de,as as me,W as fe,a8 as pe,k as w,aD as ue,p as he,H as Fe,y as ge}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import Ie from"./NotFoundScreen-DnqoRCYC.js";import{F as be}from"./FeaturePreviewScreen-BbHZWhrI.js";import{a as F}from"./sentry-pp_6zWNc.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-gzIjh_Rc.js";import{u as ye}from"./useInitialThreadRequest-Cuwjfmqu.js";import{t as Ce}from"./routePaths-Byv4I0Ax.js";import{M as Te}from"./MobileAppDrawer-8BZVS4o3.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";import"./InboxNotificationsProvider-CH-l5W7V.js";import"./useTaskManagerAccess-Y5qsn5_D.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="e4699ee8-5173-46b6-8190-eecc81f1e9e4",s._sentryDebugIdIdentifier="sentry-dbid-e4699ee8-5173-46b6-8190-eecc81f1e9e4")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},Ae=J((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(M(a,o)),e.isPandLReportFetched(a)||s(C(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Ce(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(y({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(y({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=W(),a=Y(),o=H(),{forecastId:r,tenantEmailDomain:c}=z(),[p,u]=F.useState(!1),[m,A]=F.useState(!1),g=le.getSignedInUser(),D=d((t=>v(t))),q=D.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),k=d((t=>t.profitAndLossState)),x=d((t=>t.reportUIOptionsState.selectedForecast)),j=t=>k.pandLByForecastID[t]!=null&&ee(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!m){A(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((b=>b.id===P)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,x?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=x?.index?(a(M(i.forecasts[t].id,t)),T(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&T(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!j(i.forecasts[t].id)&&I&&a(C(i.forecasts[t].id))}}),[p,u,a,l,i,m,A,R,C,I]);const E=fe(),_=E?.loggedInUserRole!=null&&X(E.loggedInUserRole),B=ye(D?.companyId,{clearParams:l&&m}),[N,G]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const L=t=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Te,{isAppContentDrawerOpen:N,handleDrawerToggle:L}),n.jsx(Ae,{firstMonthOfFY:q,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:j,meetingUrl:Z(h.toString()),hasTransactionAccess:_,isAiCfoAccessEnabled:V,onAskAiCfoClick:$,initialOpenThreadRequest:B,onClickMenuIcon:()=>{L(!0)}})]})}function ze(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{ze as default};
@@ -1,21 +1,21 @@
1
- import{j as r}from"./liveblocks-gNIoHksP.js";import{a as p}from"./sentry-BzzHvh63.js";import{K as d,M as a,a9 as m,ad as f,ae as h}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{i as y}from"./core-_cqItzd_.js";import"./zeni-epic-state-ClqSlu6d.js";import"./recharts-BgEcqT8y.js";import"./analytics-DI5uqxwC.js";import"./plaid-Dvn5Z296.js";import"./dnd-BzHSvmGV.js";import"./stripe-cKAAJElX.js";import"./lottie-CjJcvZ3r.js";import"./lexical-CXRKir6z.js";import"./pdf-BZVEJwNE.js";import"./utils-DZX8_JTm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="494643e4-d3d3-47b9-adb9-bda555527506",e._sentryDebugIdIdentifier="sentry-dbid-494643e4-d3d3-47b9-adb9-bda555527506")}catch{}})();const g=d("div")`
1
+ import{j as r}from"./liveblocks-CQOAuUNI.js";import{a as d}from"./sentry-pp_6zWNc.js";import{M as c,N as a,a9 as m,ad as f,ae as h}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import{i as y}from"./core-D07hD3KT.js";import"./zeni-epic-state-B3TABHgO.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="342721ba-9151-4823-a562-b43901ec5b0b",e._sentryDebugIdIdentifier="sentry-dbid-342721ba-9151-4823-a562-b43901ec5b0b")}catch{}})();const b=c("div")`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
5
5
  min-height: 100vh;
6
6
  background-color: ${e=>e.theme.colors.grey4};
7
- `,b=d("header")`
7
+ `,g=c("header")`
8
8
  flex-shrink: 0;
9
9
  padding: ${a.sp3} ${a.sp4};
10
- `,k=d(m)`
10
+ `,k=c(m)`
11
11
  width: ${a.sp4};
12
12
  height: ${a.sp4};
13
13
  color: ${e=>e.theme.colors.brandColorJade};
14
- `,x=d("main")`
14
+ `,x=c("main")`
15
15
  display: flex;
16
16
  flex: 1 1 auto;
17
17
  flex-direction: column;
18
18
  align-items: center;
19
19
  justify-content: center;
20
20
  padding: ${a.sp4};
21
- `;function j({children:e}){return r.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(b,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),c=await l.json();if(!l.ok)throw new w(c.status?.message??`Request failed (${l.status}).`,l.status);return c.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function B(){const{namespace:e="",token:t=""}=y();p.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=p.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{B as default};
21
+ `;function j({children:e}){return r.jsxs(b,{"data-testid":"invoicing-collect-payment-layout",children:[r.jsx(g,{children:r.jsx(k,{"aria-label":"Zeni",role:"img"})}),r.jsx(x,{children:e})]})}class w extends Error{statusCode;constructor(t,o){super(t),this.name="PortalRequestError",this.statusCode=o}}function $(e,t){const o=(function(){const n=h?.invoicingMicroServiceBaseUrl;return`${n!=null&&n.length>0?n:""}/1.0`})(),s={namespace:e,token:t};async function i(n,u){const l=await fetch(`${o}${n}`,{body:JSON.stringify(u),headers:{"Content-Type":"application/json"},method:"POST"}),p=await l.json();if(!l.ok)throw new w(p.status?.message??`Request failed (${l.status}).`,l.status);return p.data}return{checkoutSession:()=>i("/portal/payment-link/checkout-session",s),plaidLinkToken:()=>i("/portal/payment-link/plaid-link-token",s),requestAccess:()=>i("/portal/payment-link/request-access",s),savePaymentMethod:n=>i("/portal/payment-link/payment-methods",{...s,...n}),session:()=>i("/portal/payment-link/session",s),setupIntent:()=>i("/portal/payment-link/setup-intent",s)}}function A(){const{namespace:e="",token:t=""}=y();d.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]);const o=d.useMemo((()=>$(e,t)),[e,t]);return r.jsx(j,{children:r.jsx(f,{portal:o})})}export{A as default};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-CQOAuUNI.js";import{VC as re,fI as N,m2 as G,e0 as Y,d$ as le,St as X,U$ as ce,D2 as Pe,VD as Q,CT as je,Dc as Le,D6 as de,CX as pe,Da as Te,D7 as ve,VE as ue,sw as Ve,g9 as Ae,gG as Fe,VF as H,C$ as me,C_ as ge,Df as Re,c9 as Oe}from"./zeni-epic-state-B3TABHgO.js";import{a1 as fe,H as J,y as _,z as W,g as Ce,Q as he,af as ye,az as be,aA as Be,ab as Se,N as R,ag as De,G as K,aB as Ue,aq as Ze,as as $e,a8 as ze,k as we,U as He,p as _e,aC as Ge,W as We}from"./index-B1xlAtau.js";import{D as xe,n as M,S as Ie}from"./mui-XiTT8YBC.js";import ae from"./NotFoundScreen-DnqoRCYC.js";import{a as c}from"./sentry-pp_6zWNc.js";import{u as ee,i as Ke,j as g,h as Me,g as qe,l as Qe,n as se,o as z}from"./core-D07hD3KT.js";import{u as Ne}from"./useAskAiCfoHostNavButtonProps-gzIjh_Rc.js";import{M as Ye}from"./MobileAppDrawer-8BZVS4o3.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";import"./InboxNotificationsProvider-CH-l5W7V.js";import"./useTaskManagerAccess-Y5qsn5_D.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e7e6d3e6-4871-432c-9a68-5f9318acf712",e._sentryDebugIdIdentifier="sentry-dbid-e7e6d3e6-4871-432c-9a68-5f9318acf712")}catch{}})();const Xe={overlayWidth:new Se(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),{userId:D}=Ke(),r=g((l=>re(l))),p=g((l=>N(l))),E=g((l=>G(l))),{useFeatureGate:x}=J(),{isFeatureEnabled:I}=x(_.isDebitCardFeatureEnabled),P=Y(I,p),T=le(p),v=X(p),U=ce(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{m(Q()),b()},V=()=>{O===!0?S(!0):h()},$=d.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(_.isChargeCardFeatureEnabled),L=Ce(p,j,I),{isCardsHidden:A}=he(p?.tenantId),y=!L||A,F=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:h,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(de({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:V,isLoading:w||r.person==null},o={onOkClick:()=>{S(!1),h()},onCancelClick:()=>{S(!1)}};return c.useEffect((()=>{w===!1&&D!=null&&m(Pe(D))}),[w,D]),c.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&h()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:V,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,ke=M(De.H6Regular)`
6
+ margin-top: ${R.sp7};
7
+ padding-left: ${R.sp8};
8
+ padding-right: ${R.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ee=M(De.LargeRegularSp)`
12
+ color: ${e=>e.theme.colors.hero};
13
+ padding-left: ${R.sp8};
14
+ padding-right: ${R.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${R.sp4};
17
+ white-space: pre-line;
18
+ `,aa={overlayWidth:new Se(100,100,48)},oe=K.getLocalizedStrings().peoplePage.invitePage,ie=K.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const C=fe(),m=ee(),[O,B]=c.useState(!1),[k,S]=c.useState(!1),D=g((o=>re(o))),r=g((o=>N(o))),p=g((o=>G(o))),{useFeatureGate:E}=J(),{isFeatureEnabled:x}=E(_.isDebitCardFeatureEnabled),I=Y(x,r),P=le(r),T=X(r),v=ce(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{b(),m(Q())},h=()=>{O===!0?S(!0):w()},V={onOkClick:()=>{S(!1),w()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=Ce(r,j,x),{isCardsHidden:A}=he(r?.tenantId),y=!L||A,F=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(de({peopleLocalData:o})),B(!0)},onResetClick:w,onSaveClick:()=>{m(f==="zeni_only"?Te(e):ve())},onCloseClick:h,peopleDetails:D,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:F===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return c.useEffect((()=>{D.invitePersonState.fetchState==="Completed"&&(b(),m(Q()))}),[D.invitePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(C),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:h,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:oe.discardTitle}),descriptionComponent:a.jsx(Ee,{children:oe.discardDescription}),primaryButtonText:ie.yes,secondaryButtonText:ie.no,action:V}):null,a.jsx(Ue,{...s})]})})},ta=M(Ie)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,na=Qe((function(e,t){const d=ue(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:we}}),(function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Re(i))},onReloadPeople:()=>{e(me()),e(ge(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(Ge);function q({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=Me(),n=ee(),f=qe(),{areTenantIdsInSync:i}=Ze(),b=W.getSignedInUser(),C=g((s=>N(s))),{useFeatureGate:m}=J(),{isFeatureEnabled:O}=m(_.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!Y(O,C)&&B,S=X(C),D=C?.tenantId,{tenantEmailDomain:r}=C,[p,E]=c.useState(!1),[x,I]=c.useState(!1),[P,T]=c.useState(!1),[v,U]=c.useState("off"),[Z,w]=c.useState(!1),h=s=>{w(s)},{isAiCfoAccessEnabled:V,onAskAiCfoClick:$}=Ne({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ve(s.classState,s.classListState))),L=g((s=>Ae(s.userState,s.userRoleState,s.userListViewState,"manager"))),A=g((s=>Fe(s))),y=C?.companyId;c.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,D,n,u.uiState.mode,i]),c.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),c.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),c.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const F=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:we,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,x===!0?a.jsx(sa,{closeDrawerHandler:F,isInvitePeopleDrawerOpen:x,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Je,{closeDrawerHandler:F,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ye,{isAppContentDrawerOpen:Z,handleDrawerToggle:h}),a.jsx(na,{navigate:d,signedInUser:b,isZeni:C.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=_e(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:V,onAskAiCfoClick:$})]})}function ka(){const e=We();return Oe(e?.loggedInUserRole??[])?a.jsxs(se,{children:[a.jsx(z,{path:"/",element:a.jsx(q,{})}),a.jsx(z,{path:"new",element:a.jsx(q,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(q,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(ae,{})})]}):a.jsx(se,{children:a.jsx(z,{path:"*",element:a.jsx(ae,{})})})}export{ka as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-CQOAuUNI.js";import E from"./NotFoundScreen-DnqoRCYC.js";import{a as r}from"./sentry-pp_6zWNc.js";import{h as _,g as v,j as p,i as M,u as U,N as O,l as P,n as z,o as h}from"./core-D07hD3KT.js";import{fI as N,a1d as b,bo as B,bn as F,iO as V,gk as $}from"./zeni-epic-state-B3TABHgO.js";import{D as q,z as I,as as G,dN as H}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import{u as J}from"./useAskAiCfoHostNavButtonProps-gzIjh_Rc.js";import{M as K}from"./MobileAppDrawer-8BZVS4o3.js";import"./recharts-CgYqsGTH.js";import"./analytics-DlzSqyvZ.js";import"./plaid-BG3pJamN.js";import"./dnd-B-KpYfWT.js";import"./stripe-cKAAJElX.js";import"./lottie-BIKpYE12.js";import"./lexical-NIxvAmS2.js";import"./pdf-Dli3mGO_.js";import"./utils-CrOdvv6w.js";import"./InboxNotificationsProvider-CH-l5W7V.js";import"./useTaskManagerAccess-Y5qsn5_D.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6510d896-9dd2-406c-9019-77fb791a2424",e._sentryDebugIdIdentifier="sentry-dbid-6510d896-9dd2-406c-9019-77fb791a2424")}catch{}})();const L=P((function(e){const t=I.getSignedInUser(),d=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:d??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(H),Q=()=>{const e=_(),t=v(),d=q(),o=p((a=>N(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,S]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,D=F(l),x=C||k||D,c=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const y=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||c(a,i,!0),m.current=!0}),[n?.fetchState,c]),j=r.useCallback(((a,i)=>{c(a,i,!1)}),[c]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=J({mobileExploreReferrer:"Performance"});return G({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:d,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${f}/dashboard`,replace:!0})};function he(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{he as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-BzzHvh63.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
1
+ import{a as h,R as a}from"./sentry-pp_6zWNc.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as _l}from"./liveblocks-gNIoHksP.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-BzzHvh63.js";import{L as ge,c0 as xc,fI as kc,U3 as Tc,UV as jl,c9 as xl}from"./zeni-epic-state-ClqSlu6d.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-DZX8_JTm.js";import{r as cn}from"./empty-CTsBwHYQ.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-DnzapqoA.js";import{a as Ye,r as Fl}from"./index-B_Z1rAKT.js";import{r as Ul}from"./index-aNhAY0yh.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-_cqItzd_.js";import{u as Zl,z as Rc,L as Hl,ak as Vl,al as Yl,Y as Wl,I as Kl}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";import{d as It}from"./decodeURIComponentSafe-CzbN3zRu.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="69fca273-6099-4131-ae78-54b16d05e660",e._sentryDebugIdIdentifier="sentry-dbid-69fca273-6099-4131-ae78-54b16d05e660")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
1
+ import{j as _l}from"./liveblocks-CQOAuUNI.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-pp_6zWNc.js";import{L as ge,c0 as xc,fI as kc,U7 as Tc,UZ as jl,c9 as xl}from"./zeni-epic-state-B3TABHgO.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-CrOdvv6w.js";import{r as cn}from"./empty-DRbThjIF.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-D9XJLVoD.js";import{a as Ye,r as Fl}from"./index-D5s14gxd.js";import{r as Ul}from"./index-z9Fh-4S1.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-D07hD3KT.js";import{u as Zl,z as Rc,L as Hl,ak as Vl,al as Yl,Z as Wl,J as Kl}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import{d as It}from"./decodeURIComponentSafe-D3MFRtCF.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="5b1b66cf-4fbe-4557-8aba-2ce85403e509",e._sentryDebugIdIdentifier="sentry-dbid-5b1b66cf-4fbe-4557-8aba-2ce85403e509")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
2
2
  `),I=S(E).split(`
3
3
  `),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
4
4
 
@@ -0,0 +1 @@
1
+ import{j as r}from"./liveblocks-CQOAuUNI.js";import Z from"./NotFoundScreen-DnqoRCYC.js";import{a as p}from"./sentry-pp_6zWNc.js";import{h as C,g as N,u as D,j as u,N as V,l as k,n as q,o as g}from"./core-D07hD3KT.js";import{fI as E,Zj as h,ZB as w,NU as U,NQ as T,NT as f,NJ as B,Z_ as L,NN as z,NW as J}from"./zeni-epic-state-B3TABHgO.js";import{z as $,w as W,ca as K,q as _,bT as Q,cb as F}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";import{u as G,R as x}from"./ReimbursementApprovalRuleDetailScreen-DulfuoGj.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4a0cf869-db13-4059-8b4a-901f83f4ae69",e._sentryDebugIdIdentifier="sentry-dbid-4a0cf869-db13-4059-8b4a-901f83f4ae69")}catch{}})();const j="reimbursement-approval-rule-update",H=k((function(e){return{approvalView:h(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(W(K)),M=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>h(o))),b=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{b?.updateStatus.fetchState==="Completed"&&a(U())}),[b]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(T(!0,!1,!1,!1)))}),[t,S,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(R(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${j}`]:[],eventCallback:(o,y,I)=>{o.endsWith(j)&&I.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(H,{currentTenant:c,location:n,navigate:s,...m})},A="reimbursement-approval-rule-update",P=k((function(e){const s=h(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e(L(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(J(t,!0))}}}))(W(F)),X=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=Q(e?.tenantId);return s?r.jsx(Y,{isLoading:n}):r.jsx(M,{isLoading:n})},Y=({isLoading:e})=>{const s=C(),n=N(),a=D(),[t,l]=p.useState(!1),[v,R]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),b=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>h(i)));G();const y=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{y?.updateStatus.fetchState==="Completed"&&a(U())}),[y]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(T(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||b!=="Not-Started"||e||(R(!0),a(z(!1,!0)))}),[v,b,e,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const I={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${A}`]:[],eventCallback:(i,ee,O)=>{i.endsWith(A)&&O.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(V,{to:"../../promo"}):r.jsx(P,{currentTenant:m,location:n,navigate:s,isLoading:e,...I})};function le(){return r.jsxs(q,{children:[r.jsx(g,{path:"/",element:r.jsx(X,{})}),r.jsx(g,{path:"/new",element:r.jsx(x,{})}),r.jsx(g,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(g,{path:"*",element:r.jsx(Z,{})})]})}export{le as R};
@@ -1 +1 @@
1
- import{j as h}from"./liveblocks-gNIoHksP.js";import{a as f}from"./sentry-BzzHvh63.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-_cqItzd_.js";import{mu as Z,Zw as w,Zf as x,NI as k,NV as B,NQ as A,NR as E,Zx as j,fI as z,NP as K}from"./zeni-epic-state-ClqSlu6d.js";import{z as P,E as F,a7 as $,c1 as Q,v as q,bT as W,c2 as G}from"./index-DVhAab8j.js";import"./mui-CDH3xRD_.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="0d0114b9-b179-4dfa-95c2-55b61bd6df61",e._sentryDebugIdIdentifier="sentry-dbid-0d0114b9-b179-4dfa-95c2-55b61bd6df61")}catch{}})();function H(){const e=U(),s=f.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(Z({})))}),[p,t,e])}const J=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach((d=>{const I=d.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),R=d.actors.selectedNonUsers.map((m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=I.concat(R);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(Q);function M(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(f.useEffect((()=>{a||(u(!0),s(k(!0)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=q(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach((y=>{const b=y.actorKind?.selectedOption,L=y.selectedRole?.selectedNonUsers??[];let D=[];b==="role"?D=L.map((T=>({type:"attribute",subType:T.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((T=>({type:"user",subType:void 0,userId:T.userId,idType:"user",isImplicitActor:!1}))));const C=y.action??"require_approval";m.push({action:C,actors:D,operator:D.length>1?C==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const I=v?.selection.selectedOptions??[];I.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:I});const R=S?.selection.selectedOptions??[];if(R.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:R}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(M,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=P.getSignedInUser(),i=F(),r=g((n=>w(n))),l=g((n=>x(n))),[a,u]=f.useState(!1);if(H(),f.useEffect((()=>{a||(u(!0),s(k(!1)))})),f.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};
1
+ import{j as h}from"./liveblocks-CQOAuUNI.js";import{a as m}from"./sentry-pp_6zWNc.js";import{u as U,j as g,h as _,g as O,i as V,l as N}from"./core-D07hD3KT.js";import{mu as L,ZB as T,Zj as C,NM as k,NZ as B,NU as A,NV as E,ZC as j,fI as z,NT as K}from"./zeni-epic-state-B3TABHgO.js";import{z as F,E as P,a7 as q,c1 as M,q as Z,bT as W,c2 as G}from"./index-B1xlAtau.js";import"./mui-XiTT8YBC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="44e1078e-6bab-446c-93e4-a362a76a691d",e._sentryDebugIdIdentifier="sentry-dbid-44e1078e-6bab-446c-93e4-a362a76a691d")}catch{}})();function H(){const e=U(),s=m.useRef(!1),t=g((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=g((o=>o.vendorListState.allVendorIdsBillsTab.length>0));m.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const J=N((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return s.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:i,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=Z(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((f=>({type:"user",subType:void 0,userId:f.userId,idType:"user",isImplicitActor:!1}))),b=u.actors.selectedNonUsers.map((f=>{const y=(I=f.value,j(I)==null);var I;return{type:y?"attribute":"role",subType:f.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(b);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(M);function Q(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>T(n))),l=g((n=>C(n))),[a,d]=m.useState(!1);if(m.useEffect((()=>{a||(d(!0),s(k(!0)))})),m.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t})}function pe(e){return j(e)==null}const X=N((function(e,s){const t=T(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:i,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:i}=s,r=p.remiSetupApproverViewUpdateData?.type,l=Z(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const f=[];return c.forEach((y=>{const I=y.actorKind?.selectedOption,$=y.selectedRole?.selectedNonUsers??[];let D=[];I==="role"?D=$.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):I==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";f.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),f},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const b=S?.selection.selectedOptions??[];if(b.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:b}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(K(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(G);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(Q,{})}function Y(){const e=_(),s=U(),t=O(),{approvalRuleId:p}=V(),o=F.getSignedInUser(),i=P(),r=g((n=>T(n))),l=g((n=>C(n))),[a,d]=m.useState(!1);if(H(),m.useEffect((()=>{a||(d(!0),s(k(!1)))})),m.useEffect((()=>{l.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[l,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):h.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:l,location:t},p??"new")}export{ne as R,pe as i,H as u};