@zeniai/web-app-ui 5.3.29-dev → 5.3.29-prod

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 (144) hide show
  1. package/dist/assets/AccountMappingScreen-8uHE9vgM.js +9 -0
  2. package/dist/assets/AddressRoutes-TuNsiNPm.js +1 -0
  3. package/dist/assets/AddressScreen-CUBIcNzc.js +9 -0
  4. package/dist/assets/{AiCfoScreen-CL9wzpIP.js → AiCfoScreen-DK9VmcEp.js} +1 -1
  5. package/dist/assets/{AppDrawer-CBFgx_xO.js → AppDrawer-B_r_6KjC.js} +3 -3
  6. package/dist/assets/{BillPayApprovalRoutes-DmmLz8dY.js → BillPayApprovalRoutes-CYk-kqGi.js} +1 -1
  7. package/dist/assets/{BillPayRoutes-C_uGbX5e.js → BillPayRoutes-CnQr9BR-.js} +18 -18
  8. package/dist/assets/{BusinessVerificationPageScreen-CBOgxA4z.js → BusinessVerificationPageScreen-D_bLEotV.js} +2 -2
  9. package/dist/assets/{CardsAiCfoScreen-B8SHn0bs.js → CardsAiCfoScreen-C29qou5y.js} +2 -2
  10. package/dist/assets/{ChargeCardRoutes-Dkpm3e49.js → ChargeCardRoutes-ok5sHdrj.js} +7 -7
  11. package/dist/assets/CompanyPassportScreen-Bk8_2Lnc.js +1 -0
  12. package/dist/assets/ConnectionAuthScreen-CmU20CiY.js +11 -0
  13. package/dist/assets/CustomerOnboardingAuthScreen-BFlDEWAT.js +1 -0
  14. package/dist/assets/{CustomerOnboardingRoutes-BRdsXEtS.js → CustomerOnboardingRoutes-DBahdpKX.js} +3 -3
  15. package/dist/assets/{DashboardRoutes-CLhCpuhB.js → DashboardRoutes-L4NFplV4.js} +3 -3
  16. package/dist/assets/{DefaultTenantHome-Btkw8Ap3.js → DefaultTenantHome-BCSSNR6K.js} +1 -1
  17. package/dist/assets/DomesticWireDetailScreen-CGGNig4h.js +18 -0
  18. package/dist/assets/{DrawerScreen-Cq2VoXGn.js → DrawerScreen-7bf8svWB.js} +1 -1
  19. package/dist/assets/EntityDetailRoutes-CqjTUYuD.js +1 -0
  20. package/dist/assets/{ExpenseAutomationRoutes-Dsuu9sFZ.js → ExpenseAutomationRoutes-CUt8O2Xv.js} +4 -4
  21. package/dist/assets/FeaturePreviewScreen-DXqxJKH0.js +1 -0
  22. package/dist/assets/HubSpotOAuthCallbackScreen-e5a51hJg.js +1 -0
  23. package/dist/assets/{InboxNotificationsProvider-Y2y35nP6.js → InboxNotificationsProvider-C0-HlAfE.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-MDlqxyil.js → InvoicingRoutes-Ddxu1tyK.js} +2 -2
  25. package/dist/assets/{MagicLinkRoutes-CP3vqiHe.js → MagicLinkRoutes-RG09j8sH.js} +7 -7
  26. package/dist/assets/MagicLinkSignInScreen-BKYMqDu_.js +12 -0
  27. package/dist/assets/{MobileAppDrawer-DLiH8K3Y.js → MobileAppDrawer-w29pHTah.js} +1 -1
  28. package/dist/assets/NotFoundScreen-pEDgT9hU.js +1 -0
  29. package/dist/assets/NotificationRoutes-aYr6TISw.js +1 -0
  30. package/dist/assets/OAuthConsentScreen-BMQjS862.js +1 -0
  31. package/dist/assets/{PandLWithForecastRoutes-aW5WT5CH.js → PandLWithForecastRoutes-ClhQ16N1.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-C2OZJlFd.js → PaymentLinkScreen-oBYod-f7.js} +8 -8
  33. package/dist/assets/PeopleRoutes-C-IjW5cM.js +22 -0
  34. package/dist/assets/PerformanceRoutes-CwseEjMG.js +1 -0
  35. package/dist/assets/{Preview-BeiBQxK-.js → Preview-gph6IknK.js} +1 -1
  36. package/dist/assets/QBOConnectionScreen-Cj_c2iOn.js +100 -0
  37. package/dist/assets/ReimbursementApprovalRoutes-DSLF-iDB.js +1 -0
  38. package/dist/assets/ReimbursementApprovalRuleDetailScreen-Cfd2lTtw.js +1 -0
  39. package/dist/assets/{ReimbursementRoutes-DmbcBT5E.js → ReimbursementRoutes-DYKkFfkQ.js} +6 -6
  40. package/dist/assets/{ReportsRoutes-BQmYqXvS.js → ReportsRoutes-CcCu_4n6.js} +1 -1
  41. package/dist/assets/RewardsRoutes-BwHJJhvD.js +1 -0
  42. package/dist/assets/ScreenRoutes-BNtuqMhB.js +2 -0
  43. package/dist/assets/SettingsRoutes-y8-_YgiA.js +49 -0
  44. package/dist/assets/{SetupPagesScreen-28K-Ej_i.js → SetupPagesScreen-CojbFVZs.js} +5 -5
  45. package/dist/assets/SignInScreen-DdDBzWvV.js +1 -0
  46. package/dist/assets/SignOutScreen-B6wzFe2k.js +9 -0
  47. package/dist/assets/TaskListScreen-D-nkDvPK.js +9 -0
  48. package/dist/assets/TaskRoutes-CtVIeV_u.js +9 -0
  49. package/dist/assets/TransactionDetailRoutes-DNWXngJd.js +1 -0
  50. package/dist/assets/{TransactionDetailScreen-B1_fDc_7.js → TransactionDetailScreen-B-6ejh0p.js} +2 -2
  51. package/dist/assets/TransactionListRoutes-DxJXt4n_.js +1 -0
  52. package/dist/assets/{TreasuryRoutes-Dnwm_7bw.js → TreasuryRoutes-DFiUAXu1.js} +5 -5
  53. package/dist/assets/{VendorsRoutes-BCbNpFFW.js → VendorsRoutes-BAikIq6j.js} +20 -20
  54. package/dist/assets/WiseConfirmationScreen-D_wbdhkl.js +12 -0
  55. package/dist/assets/{ZeniAccountRoutes-CQnM-9GW.js → ZeniAccountRoutes-DKPjQE0W.js} +9 -9
  56. package/dist/assets/ZeniAccountStatementScreen-BGmcEQYd.js +9 -0
  57. package/dist/assets/{accountMappingHelper-CJgy_TdU.js → accountMappingHelper-CgadjOLa.js} +1 -1
  58. package/dist/assets/{analytics-drf9tsEq.js → analytics-RQNlJ1pt.js} +1 -1
  59. package/dist/assets/{analyticsHelper-CDqT9wg1.js → analyticsHelper-BiTuFeQ0.js} +1 -1
  60. package/dist/assets/{core-OUhaP0nM.js → core-DDzShd0J.js} +1 -1
  61. package/dist/assets/{decodeURIComponentSafe-CoJI0rbl.js → decodeURIComponentSafe-Bju02TzW.js} +1 -1
  62. package/dist/assets/{dnd-XtKnRPbJ.js → dnd-8v-oSlGw.js} +1 -1
  63. package/dist/assets/{empty-CJaMNnL0.js → empty-D_loyNse.js} +1 -1
  64. package/dist/assets/{empty-DC6SKf2K.js → empty-nGljGTrF.js} +1 -1
  65. package/dist/assets/{emptyVideoElement-b-LZRj6t.js → emptyVideoElement-Ck5okPXA.js} +1 -1
  66. package/dist/assets/epic-Hg2C4tuV.js +2 -0
  67. package/dist/assets/{expenseAutomationHelper-DlI9q6Vn.js → expenseAutomationHelper-Dxp0SBmJ.js} +1 -1
  68. package/dist/assets/{getLocaleForTenant-aTGgtilb.js → getLocaleForTenant-DO0tvA1L.js} +1 -1
  69. package/dist/assets/{index-BEdQXZ7l.js → index-95R81U1-.js} +1 -1
  70. package/dist/assets/{index-DmRkUvqd.js → index-BJ7yA4m0.js} +1 -1
  71. package/dist/assets/{index-9ur6Fy2d.js → index-BRrrD3Xz.js} +1 -1
  72. package/dist/assets/{index-Ic-s4E7h.js → index-C8dZFknU.js} +1 -1
  73. package/dist/assets/{index-DkPv0SRW.js → index-CNNAFWzH.js} +1 -1
  74. package/dist/assets/{index-DWbw7UWG.js → index-CTC2NBs0.js} +1 -1
  75. package/dist/assets/{index-BjnriIg-.js → index-Dbbb4cXf.js} +27688 -28602
  76. package/dist/assets/{index-B1OJLTM8.js → index-Qc8AqqjC.js} +2 -2
  77. package/dist/assets/{lexical-cGeYDtsl.js → lexical-DySIClNM.js} +1 -1
  78. package/dist/assets/{liveblocks-QA8yK6T_.js → liveblocks-BunSqsrT.js} +1 -1
  79. package/dist/assets/{lottie-DaBLQBPb.js → lottie-BQuZvDrr.js} +1 -1
  80. package/dist/assets/{mui-BtZD__8k.js → mui-CtTzfD4a.js} +1 -1
  81. package/dist/assets/{pathToGoBack-C7Q0VFSf.js → pathToGoBack-pcMOJiAl.js} +1 -1
  82. package/dist/assets/{pdf-BMGNA2GO.js → pdf-BxUaMSt_.js} +3 -3
  83. package/dist/assets/{pdf-lib-BukwiyrA.js → pdf-lib-DnOPqGEg.js} +1 -1
  84. package/dist/assets/{plaid-Bbika4Gn.js → plaid-DK2LE-P_.js} +1 -1
  85. package/dist/assets/{pusher-9ZM5Kdsl.js → pusher-CeA5HiR7.js} +1 -1
  86. package/dist/assets/{react-_5p9PyE0.js → react-B9JRNlhi.js} +1 -1
  87. package/dist/assets/{react-B7VQZShg.js → react-BWndB3j4.js} +1 -1
  88. package/dist/assets/{react-DyjJC6aa.js → react-Bl_y8bhG.js} +1 -1
  89. package/dist/assets/{react-BbnUu-8y.js → react-C1WMzD9s.js} +1 -1
  90. package/dist/assets/{react-Cvhq9zob.js → react-CFUnPSu_.js} +1 -1
  91. package/dist/assets/{react-SMF3sABx.js → react-DxNKG6uK.js} +1 -1
  92. package/dist/assets/{recharts-CnI5kYGO.js → recharts-OFxTnh_R.js} +1 -1
  93. package/dist/assets/{routePaths-Cz-sxWeK.js → routePaths-B6D81jZB.js} +1 -1
  94. package/dist/assets/{sentry-DX8X0N2R.js → sentry-DEmvp01d.js} +1 -1
  95. package/dist/assets/{url-DEE9M609.js → url-BrQNRDBu.js} +1 -1
  96. package/dist/assets/url-DB-tKBH7.js +6 -0
  97. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CCxuDvI3.js → useAiCfoDashboardSuggestedQuestionsChips-CHjcD3qK.js} +1 -1
  98. package/dist/assets/useAskAiCfoHostNavButtonProps-CUAZLkWp.js +1 -0
  99. package/dist/assets/{useChargeCardPusherEvents-u2vXo3UU.js → useChargeCardPusherEvents-DxGF12MJ.js} +1 -1
  100. package/dist/assets/{useDeviceId-Bunv1-ta.js → useDeviceId-Dv4OUci8.js} +1 -1
  101. package/dist/assets/useEmailConnectResultRefresh-BAEp5F0A.js +1 -0
  102. package/dist/assets/{useInitialThreadRequest-BR_6LodZ.js → useInitialThreadRequest-1cjoi1TS.js} +1 -1
  103. package/dist/assets/useTaskManagerAccess-BKBVhoHK.js +1 -0
  104. package/dist/assets/utils-BG_QRO5u.js +36 -0
  105. package/dist/assets/{withTransactionSidePanel-DRyJqOb1.js → withTransactionSidePanel-C8geEKK4.js} +2 -2
  106. package/dist/assets/{zeni-epic-state-DzFY1eNZ.js → zeni-epic-state-BV4QdnGE.js} +3 -3
  107. package/dist/index.html +1 -1
  108. package/package.json +1 -1
  109. package/dist/assets/AccountMappingScreen-CDcb3dR7.js +0 -9
  110. package/dist/assets/AddressRoutes-loJi-MTb.js +0 -1
  111. package/dist/assets/AddressScreen-KciR_hsZ.js +0 -9
  112. package/dist/assets/CompanyPassportScreen-C-SlqPHT.js +0 -1
  113. package/dist/assets/ConnectionAuthScreen-IHk0kFrL.js +0 -11
  114. package/dist/assets/CustomerOnboardingAuthScreen-9EVdL7z6.js +0 -1
  115. package/dist/assets/DomesticWireDetailScreen-Dzk5sa_d.js +0 -18
  116. package/dist/assets/EntityDetailRoutes-CTolGUo8.js +0 -1
  117. package/dist/assets/FeaturePreviewScreen-h7p9MMUf.js +0 -1
  118. package/dist/assets/HubSpotOAuthCallbackScreen-BTzQvozK.js +0 -1
  119. package/dist/assets/MagicLinkSignInScreen-BMClM24d.js +0 -12
  120. package/dist/assets/NotFoundScreen-CBOeKuhG.js +0 -1
  121. package/dist/assets/NotificationRoutes-Dhiufflf.js +0 -1
  122. package/dist/assets/OAuthConsentScreen-Ca-lx4xM.js +0 -1
  123. package/dist/assets/PeopleRoutes-B2NEnvyj.js +0 -22
  124. package/dist/assets/PerformanceRoutes-DphKMt6B.js +0 -1
  125. package/dist/assets/QBOConnectionScreen-O0kY1C3B.js +0 -100
  126. package/dist/assets/ReimbursementApprovalRoutes-Dzvw2fZr.js +0 -1
  127. package/dist/assets/ReimbursementApprovalRuleDetailScreen-BaxtZSL2.js +0 -1
  128. package/dist/assets/RewardsRoutes-DvgOSJy0.js +0 -1
  129. package/dist/assets/ScreenRoutes-D76vOiPC.js +0 -2
  130. package/dist/assets/SettingsRoutes-DNrMSB0r.js +0 -49
  131. package/dist/assets/SignInScreen-JKxT9Chm.js +0 -1
  132. package/dist/assets/SignOutScreen-DkhnXWYi.js +0 -9
  133. package/dist/assets/TaskListScreen-D13comxS.js +0 -9
  134. package/dist/assets/TaskRoutes-BOftPZQw.js +0 -9
  135. package/dist/assets/TransactionDetailRoutes-Br_-ul_i.js +0 -1
  136. package/dist/assets/TransactionListRoutes-DQwcR30R.js +0 -1
  137. package/dist/assets/WiseConfirmationScreen-mPs6_3sL.js +0 -12
  138. package/dist/assets/ZeniAccountStatementScreen-CTIued6H.js +0 -9
  139. package/dist/assets/epic-Cg0CX13O.js +0 -2
  140. package/dist/assets/url-DKOm_9Da.js +0 -6
  141. package/dist/assets/useAskAiCfoHostNavButtonProps-B4mPUD91.js +0 -1
  142. package/dist/assets/useEmailConnectResultRefresh-DRqxGzlR.js +0 -1
  143. package/dist/assets/useTaskManagerAccess-3mEVnK_N.js +0 -1
  144. package/dist/assets/utils-CHDSUF0P.js +0 -36
@@ -1 +1 @@
1
- import{j as _}from"./liveblocks-QA8yK6T_.js";import{a as f}from"./sentry-DX8X0N2R.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as F}from"./core-OUhaP0nM.js";import{fB as ne,Tc as xe,Td as se,g5 as Ne,fA as Pe,Tj as Re,Te as je,Tf as Ve,pX as Oe,gi as Le,Ti as b,Tl as Ue,Tm as K,gj as Ze,Tn as ze,Dr as qe,g_ as He,cS as We,To as Ye,g4 as Xe,gk as Je}from"./zeni-epic-state-DzFY1eNZ.js";import{w as Ke,i as Qe,_ as ea,O as aa,c as ta,e as na,u as sa,y as c,f as oa,W as ia,z as ra,d as da,j as ca,F as la,n as ua,k as fa,l as Q,L as ma,A as ha,B as ba,p as S,h as ee,q as pa,I as ae,v as ga,x as Sa}from"./index-BjnriIg-.js";import{D as ka}from"./mui-BtZD__8k.js";import{u as Ta}from"./InboxNotificationsProvider-Y2y35nP6.js";import{u as Ea}from"./useTaskManagerAccess-3mEVnK_N.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]="222abc58-f96a-47df-9298-a02bc56e2ea9",l._sentryDebugIdIdentifier="sentry-dbid-222abc58-f96a-47df-9298-a02bc56e2ea9")}catch{}})();const Ca=Ke((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Me(),B=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:T}=Ea(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Pe(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,E=na(),{setLoading:re}=sa(),[w,M]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,x=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),P=t((e=>je(e))),{isFeatureEnabled:C}=d(c.isReferralFeatureEnabled),v=t((e=>Ve(e)));f.useEffect((()=>{E&&C&&!m&&v.fetchState==="Not-Started"&&r(Oe(!0))}),[E,C,v.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Le(e):[])),g=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=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",Te=t((e=>b(e).totalUnreadCount)),Ee=t((e=>b(e).reducedFetchCountState)),j=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),V=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),O=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:L,isLoading:U,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Ce}=Ta();f.useEffect((()=>{const e=setTimeout((()=>Ce?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(U===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&L!=null){const e=`dashboard_${o.companyId}`;M(L.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[U,Z,z]),f.useEffect((()=>{E&&T&&!m&&O.fetchState==="Not-Started"&&B.tenantId!=null&&r(Ue("task_manager","dashboard"))}),[E,T,m,O.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(K({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.useEffect((()=>{w!=null&&I.fetchState==="In-Progress"&&(r(K({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),r(se({unreadCount:w},"comments")))}),[w,I.fetchState]);const Ie={fetchStatus:Ee,count:Te},q=s!=null?ra.getSignedInUserTenant(s):null,H=t((e=>q?.tenantId!=null?Ze(e,q.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),C===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const W=t((e=>ze(e,h).fetchState)),Y=t((e=>qe(e).fetchState)),ye=A&&(W==="Completed"||W==="Error")||x&&(Y==="Completed"||Y==="Error")||!A&&!x?void 0:"disabled",we=f.useMemo((()=>He(o.userRole)),[o.userRole]),Ae=We(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&P.fetchState==="Completed"&&Ye(P.notificationSettings,p.userEmail,N,o,T),X=da(),Fe=X&&ca(a);return _.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:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?fe:H!=null?[H]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:Q(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:C,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:X,onNotificationIconClick:()=>{i(!1);let e=j===0&&V>0?"notifications/comments":"notifications/tasks";Q(a)&&(e=j===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),J=e.type,_e=ae(J)&&J!=="command_center";if(ae(e.type)&&g[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(g[o.tenantId].month,g[o.tenantId].year,"Sidebar"),_e&&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 Be=ga(e.type);Sa(e.type)?(G!=null&&r(Je()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{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(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Xe({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:T,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:ge,newYearAnimationEnabled:Se})})})),Ba=l=>{const i=te(),s=t((k=>ne(k))),a={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(k,n)=>{Qe(n)&&xe(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ca,{...l,...a})};export{Ba as M};
1
+ import{j as _}from"./liveblocks-BunSqsrT.js";import{a as f}from"./sentry-DEmvp01d.js";import{u as te,j as t,i as $e,g as Ge,h as Me,q as F}from"./core-DDzShd0J.js";import{fB as ne,SY as xe,SZ as se,g5 as Ne,fA as Pe,T3 as Re,S_ as Ve,S$ as je,pF as Le,gi as Oe,T2 as b,T5 as Ue,T6 as Q,gj as Ze,T7 as ze,Db as He,g_ as Ye,cS as qe,T8 as We,g4 as Je,gk as Ke}from"./zeni-epic-state-BV4QdnGE.js";import{w as Qe,i as Xe,c as ea,I as aa,e as ta,g as na,u as sa,d as c,h as oa,F as ia,z as ra,f as da,l as ca,n as la,s as ua,o as fa,q as X,L as ma,D as ha,H as ba,p as g,k as ee,y as pa,M as ae,B as Sa,C as ga}from"./index-Dbbb4cXf.js";import{D as ka}from"./mui-CtTzfD4a.js";import{u as Ea}from"./InboxNotificationsProvider-C0-HlAfE.js";import{u as Ta}from"./useTaskManagerAccess-BKBVhoHK.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]="5c703fca-141e-4ffc-84c2-8eb38d30f615",l._sentryDebugIdIdentifier="sentry-dbid-5c703fca-141e-4ffc-84c2-8eb38d30f615")}catch{}})();const Ca=Qe((({isAppContentDrawerOpen:l,handleDrawerToggle:i})=>{const{tenantEmailDomain:s}=$e(),a=Ge(),k=ea(),n=Me(),B=Ne(),r=te(),{useFeatureGate:d}=aa(),p=ta(),{isTaskManagerAccessEnabled:E}=Ta(p),o=t((e=>ne(e))),oe=o.masterTOSInfo?.isMasterTOSAccepted??!1,$=t((e=>Pe(e))),{status:ie}=t(Re),G=$.uiState.currentChatSessionId,T=na(),{setLoading:re}=sa(),[w,M]=f.useState(void 0),A=F("/:tenantEmailDomain/dashboard")!==null,x=F("/:tenantEmailDomain/reports")!==null,m=F("/:tenantEmailDomain/onboarding/*")!==null,de=!!o.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ce}=d(c.isChargeCardFeatureEnabled),{isFeatureEnabled:N}=d(c.isDebitCardFeatureEnabled),le=oa(o,ce,N),{isFeatureEnabled:ue}=d(c.isSettingsFeatureEnabled),P=t((e=>Ve(e))),{isFeatureEnabled:C}=d(c.isReferralFeatureEnabled),v=t((e=>je(e)));f.useEffect((()=>{T&&C&&!m&&v.fetchState==="Not-Started"&&r(Le(!0))}),[T,C,v.fetchState,m]);const D=t((e=>e.tenantState)),fe=t((e=>D.fetchState==="Completed"?Oe(e):[])),S=t((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:me}=d(c.isApAgingFeatureEnabled),{isFeatureEnabled:he}=d(c.isArAgingFeatureEnabled),R=ia(),{isFeatureEnabled:be}=d(c.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:pe}=d(c.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Se}=d(c.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:ge}=d(c.isDashboardSidebarNewYearAnimationEnabled),ke=o.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",Ee=t((e=>b(e).totalUnreadCount)),Te=t((e=>b(e).reducedFetchCountState)),V=t((e=>b(e).notificationDetailsByTab.tasks.uiState.unreadCount)),j=t((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),L=t((e=>b(e).notificationDetailsByTab.tasks.fetchCountState)),I=t((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:O,isLoading:U,isFetchingMore:Z,hasFetchedAll:z,fetchMore:Ce}=Ea();f.useEffect((()=>{const e=setTimeout((()=>Ce?.()),0);return()=>clearTimeout(e)})),f.useEffect((()=>{if(U===!1&&Z===!1&&z===!0)if(o?.companyId!=null&&O!=null){const e=`dashboard_${o.companyId}`;M(O.filter((u=>u.roomId===e&&u.readAt==null)).length)}else M(0)}),[U,Z,z]),f.useEffect((()=>{T&&E&&!m&&L.fetchState==="Not-Started"&&B.tenantId!=null&&r(Ue("task_manager","dashboard"))}),[T,E,m,L.fetchState,B.tenantId,r]),f.useEffect((()=>{m||I.fetchState!=="Not-Started"||r(Q({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[m,I.fetchState,r]),f.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:Te,count:Ee},H=s!=null?ra.getSignedInUserTenant(s):null,Y=t((e=>H?.tenantId!=null?Ze(e,H.tenantId):void 0)),h=[];me===!1&&h.push("accounts_payable_aging"),he===!1&&h.push("accounts_receivable_aging"),h.push("zeni_accounts_promo_card","treasury_promo_card"),C===!1&&h.push("rewards_card"),R===!1&&h.push("expense_automation_card");const q=t((e=>ze(e,h).fetchState)),W=t((e=>He(e).fetchState)),ye=A&&(q==="Completed"||q==="Error")||x&&(W==="Completed"||W==="Error")||!A&&!x?void 0:"disabled",we=f.useMemo((()=>Ye(o.userRole)),[o.userRole]),Ae=qe(we),ve=o?.rewardsLastViewedTime==null,De=p?.userEmail!=null&&P.fetchState==="Completed"&&We(P.notificationSettings,p.userEmail,N,o,E),J=da(),Fe=J&&ca(a);return _.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:_.jsx(la,{signedInUser:p,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?fe:Y!=null?[Y]:[],currentTenant:o,isTenantDropdownDisabled:ye,isSettings:X(a),isInvoicing:fa(a)&&ie==="completed",isSettingsFeatureEnabled:ue,isVendorsTabVisible:Ae,isZeniAccountEnabled:de,isChargeCardEnabled:le,isTreasuryEnabled:ke,isNotificationsTabVisible:De,notificationCountDetails:Ie,isExpenseAutomationEnabledForUser:R,selectedMenu:ua(a),rewardsConfiguration:{isRewardsTabVisible:C,isRewardsAnimated:ve,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:J,onNotificationIconClick:()=>{i(!1);let e=V===0&&j>0?"notifications/comments":"notifications/tasks";X(a)&&(e=V===0&&j>0?"../../notifications/comments":"../../notifications/tasks");const u=g(a.state?.pathnameStackToGoBack,a.pathname);n(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{i(!1);const e=g(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:g(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=g(a.state?.pathnameStackToGoBack,a.pathname);return void n(`/${s}/ai-cfo/explore`,{state:{pathnameStackToGoBack:y,referrer:"Sidebar"}})}const u=g(a.state?.pathnameStackToGoBack,a.pathname),K=e.type,_e=ae(K)&&K!=="command_center";if(ae(e.type)&&S[o.tenantId]!=null&&ee.trackMonthEndCloseClicked(S[o.tenantId].month,S[o.tenantId].year,"Sidebar"),_e&&S[o.tenantId]!=null){const y=S[o.tenantId];return void n(`/${s}/month_end_close_checks/review/${e.type}/${y.month}-${y.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const Be=Sa(e.type);ga(e.type)?(G!=null&&r(Ke()),n(`/${s}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):n(`/${s}/${Be}`,{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(ma.TENANT_SWITCHING),i(!1),ha({dispatch:r,navigate:n,pathToNavigate:ba(e.tenantEmailDomain,a),selectedTenant:e,signedInUser:p})},onZeniLogoClick:()=>{k.toggle()},isAiCfo:Fe,aiCfoView:$,isOnDashboard:A,updateCurrentChatSessionId:e=>{r(Je({sessionId:e,agentId:"controller"})),n(`/${s}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:be,isTaskManagerAccessEnabled:E,thanksGivingAnimationEnabled:pe,christmasAnimationEnabled:Se,newYearAnimationEnabled:ge})})})),Ba=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)&&xe(n.mode)==="dashboard"&&i(se({unreadCount:n.data.unread},"tasks"))}};return _.jsx(Ca,{...l,...a})};export{Ba as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-BunSqsrT.js";import{h as r,l as i}from"./core-DDzShd0J.js";import{ak as n}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import"./sentry-DEmvp01d.js";import"./zeni-epic-state-BV4QdnGE.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.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]="e1fe4b0b-a509-4443-892f-577d1dfd5036",o._sentryDebugIdIdentifier="sentry-dbid-e1fe4b0b-a509-4443-892f-577d1dfd5036")}catch{}})();const a=i(null,(function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}}))(n);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -0,0 +1 @@
1
+ import{m as mt,a as lt,n as ft,j as N}from"./liveblocks-BunSqsrT.js";import ut from"./NotFoundScreen-pEDgT9hU.js";import{a as k}from"./sentry-DEmvp01d.js";import{h as ht,g as pt,i as kt,u as gt,j as S,l as St,n as bt,o as Z}from"./core-DDzShd0J.js";import{cz as It,S_ as O,fB as X,g_ as Tt,T2 as b,$V as H,T6 as m,SZ as E,zt as j,F9 as Ct,$W as yt,SY as Et,T8 as At,zy as _t,$X as M,br as F,gd as x,zC as J,$Y as Nt,cL as Bt,cE as wt}from"./zeni-epic-state-BV4QdnGE.js";import{ao as xt,e as vt,I as Rt,d as Dt,aq as Pt,dI as Gt,p as B,dJ as Ut,w as $t,dK as Mt,i as Ft,a2 as jt}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import{u as Vt}from"./useAskAiCfoHostNavButtonProps-CUAZLkWp.js";import{u as zt}from"./useTaskManagerAccess-BKBVhoHK.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.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]="b43d38ef-41d5-41a5-96e5-d8b7092fe39e",t._sentryDebugIdIdentifier="sentry-dbid-b43d38ef-41d5-41a5-96e5-d8b7092fe39e")}catch{}})();const Lt=(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)}))})),Wt=St((function(t,l){const n=O(t),{signedInUser:h,isDebitCardFeatureEnabled:g,isTaskManagerAccessEnabled:c}=l,o=b(t),f=X(t),{currentTab:I}=o;return{notificationView:o,isNotificationSettingsVisible:h.userEmail!=null&&At(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:R}=l;return{onNotificationClick:(a,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(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,s,d)=>{const r=s.toString().split(`/${h}/`);if(r[1]!=null){d==="unread"&&(I(a),t(M([a],F())));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:(a,s)=>{t(E(a,s))},onUpdateNotificationTabState:(a,s)=>{t(m(a,s))},onUpdateNotificationViewCurrentTabAndSubTab:(a,s)=>{t(H(a,s));const d=`../${a}`,r=B(n.state?.pathnameStackToGoBack,n.pathname);f(d,{state:{pathnameStackToGoBack:r}})},onUpdateNotificationViewSubTab:a=>{t(Nt(a))},onFetchMoreNotifications:(a,s)=>{if(a==="tasks"){const d=[];s==="all"?d.push("read","unread"):s!=="mentions"&&d.push(s),t(j("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,s,d,r)=>{a==="tasks"?t(J("task_manager",d,r)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(r.map((i=>{d==="read"&&(I(i),t(M([i],F())))}))).then((()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(E({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:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Lt(o,I).then((()=>{t(M(o,F())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(E({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 a=jt(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../../dashboard";f(s,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=B(n.state?.pathnameStackToGoBack,n.pathname);f("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}}))($t(Mt)),Yt=()=>{const t=ht(),l=pt(),{tenantEmailDomain:n,selectedTab:h}=kt(),{areTenantIdsInSync:g}=xt(),c=It(h??""),o=gt(),f=vt(),[I,R]=k.useState(!1),a=S((e=>O(e))),s=S((e=>X(e))),{useFeatureGate:d}=Rt(),{isFeatureEnabled:r}=d(Dt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:i,onAskAiCfoClick:T}=Vt({mobileExploreReferrer:"Notifications"});Pt({isDataReady:!0});const Q=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=S((e=>b(e).notificationDetailsByTab.tasks.fetchState)),z=S((e=>b(e).currentTab)),D=S((e=>b(e).currentSubTab)),tt=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),P=S((e=>b(e).notificationDetailsByTab.comments.fetchState)),et=S((e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount)),at=S((e=>b(e).allExternalNotifications)).filter((e=>e.inboxNotification.readAt==null)).map((e=>e.inboxNotification.id)),st=Gt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:G,fetchMore:ot}=mt(),{threads:L,isLoading:W,fetchMore:Y,isFetchingMore:q,hasFetchedAll:K}=lt({query:{metadata:{companyId:s.companyId,application:"dashboard"}}});k.useEffect((()=>{if(z!==c&&c!=null&&o(H(c)),c==null){const e=`../${z}`,p=B(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[c]),k.useEffect((()=>{tt.fetchState==="Not-Started"&&o(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(A===!1&&C===!0&&s?.companyId!=null&&w!=null){const e=`dashboard_${s.companyId}`,p=w.filter((y=>y.roomId===e&&y.readAt==null)).length;o(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),o(E({unreadCount:p},"comments"))}}),[A,C]),k.useEffect((()=>{V!=="In-Progress"&&g&&o(j("task_manager","dashboard",["read","unread"]))}),[g]),k.useEffect((()=>{const e=setTimeout((()=>ot?.()),0);return()=>clearTimeout(e)}));const U=A||G===!0||C!==!0||A||G===!0||C!==!0;k.useEffect((()=>{U&&P!=="In-Progress"?o(m({fetchState:"In-Progress",error:void 0},"comments")):U||P!=="In-Progress"||o(m({fetchState:"Completed",error:void 0},"comments"))}),[U,P]),k.useEffect((()=>{o(E({hasMore:C!==!0},"comments"))}),[C]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&I===!1&&(R(!0),o(Ct()))}),[a.fetchState]),k.useEffect((()=>{if(A===!1&&W===!1&&w!=null&&L!=null){const e=`dashboard_${s.companyId}`,p=w.filter((u=>u.roomId===e)).filter((u=>Ut(u.kind))),y=p.filter((u=>u.readAt==null)),_=p.map((u=>u.id)),ct=p.map((u=>{const $=L.find((dt=>{return dt.id===((v=u).kind==="thread"?v.threadId:"subjectId"in v?v.subjectId:void 0);var v}));return $!=null?{inboxNotification:{...u,threadId:$.id},thread:$}:(q||K===!0||Y==null||Y(),null)})).filter((u=>u!=null));o(m({allNotificationsIds:_},"comments")),o(E({totalCount:_.length,unreadCount:y.length},"comments")),o(yt(ct))}}),[A,G,q,C,K,W,w?.length]);const nt={events:s.userRoleId!=null?[`private-encrypted-${s.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Ft(p)){const y=Et(p.mode);if(y==="dashboard"&&o(E({unreadCount:p.data.unread},"tasks")),V!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),o(j("task_manager",y,_,!0))}}}},it=ft(),{isTaskManagerAccessEnabled:rt}=zt(f);return N.jsx(Wt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:f,externalNotificationsUnreadCount:et,location:l,navigate:t,isDebitCardFeatureEnabled:r,isTaskManagerAccessEnabled:rt,users:st,markInboxNotificationAsRead:it,allUnreadCommentsNotificationIds:at,isAiCfoAccessEnabled:i,onAskAiCfoClick:T,...nt})};function me(){return N.jsxs(bt,{children:[N.jsx(Z,{path:"/:selectedTab",element:N.jsx(Yt,{})}),N.jsx(Z,{path:"*",element:N.jsx(ut,{})})]})}export{me as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-BunSqsrT.js";import{a as r}from"./sentry-DEmvp01d.js";import{u as A,g as C,j as o,N as j}from"./core-DDzShd0J.js";import{Ty as z,fB as P,gi as x,Tz as D,TA as M,TB as R,TC as B,pw as k,Sh as L}from"./zeni-epic-state-BV4QdnGE.js";import{z as h,af as I}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="cc779f62-37dc-4c1a-acfa-672e1c6f32db",n._sentryDebugIdIdentifier="sentry-dbid-cc779f62-37dc-4c1a-acfa-672e1c6f32db")}catch{}})();function ee(){const n=A(),a=C(),{params:t,error:i}=r.useMemo((()=>z(a.search)),[a.search]),w=r.useMemo((()=>new URLSearchParams(a.search).get("client_name")??t?.clientId??"Unknown Application"),[a.search,t]),f=h.isSignedIn(),s=h.getSignedInUser(),p=o((e=>P(e))),l=o((e=>x(e))),c=o((e=>e.tenantState.fetchState)),y=o(D),S=o(M),d=o(R),[v,b]=r.useState(null),[T,E]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(B())}),[n,a.search]),r.useEffect((()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)}),[i]);const g=r.useRef(!1);r.useEffect((()=>{f&&s!=null&&!g.current&&(c!=="Not-Started"&&c!=="Error"||(g.current=!0,n(k(s.userId,s.zeniSessionId??void 0))))}),[f,s,c,n]),r.useEffect((()=>{d!=null&&d!==""&&(window.location.href=d)}),[d]);const _=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((U=>U.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=v??_;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:s?.userEmail,isInitializing:c!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:b,approveError:T??S,isApproving:y==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&s!=null&&u!=null&&n(L(s.userId,s.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{E("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(j,{to:"/signin/auth",state:{origin:a.pathname+a.search},replace:!0})}export{ee as default};
@@ -1 +1 @@
1
- import{j as n}from"./liveblocks-QA8yK6T_.js";import{h as J,u as K,g as Q,i as X,j as d,l as Z,n as ee,o as C}from"./core-OUhaP0nM.js";import{fB as M,zu as R,us as ae,UF as w,un as y,bq as te,b_ as se,uo as oe,UG as re,Un as S,e8 as ne,Dg as ce,UH as ie,DE as le,dV as de,dU as me}from"./zeni-epic-state-DzFY1eNZ.js";import{ag as fe,z as pe,ao as ue,aq as he,V as ge,O as q,y as B,a6 as Fe,h as _,aB as be,p as Ie}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import Ce from"./NotFoundScreen-CBOeKuhG.js";import{F as Se}from"./FeaturePreviewScreen-h7p9MMUf.js";import{a as g}from"./sentry-DX8X0N2R.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-B4mPUD91.js";import{u as Te}from"./useInitialThreadRequest-BR_6LodZ.js";import{t as De}from"./routePaths-Cz-sxWeK.js";import{M as Ae}from"./MobileAppDrawer-DLiH8K3Y.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.js";import"./InboxNotificationsProvider-Y2y35nP6.js";import"./useTaskManagerAccess-3mEVnK_N.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]="bcab5081-9e6f-40ee-ad70-3f86b739c710",s._sentryDebugIdIdentifier="sentry-dbid-bcab5081-9e6f-40ee-ad70-3f86b739c710")}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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(y(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(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=ne(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=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=J(),a=K(),o=Q(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,D]=g.useState(!1),F=pe.getSignedInUser(),A=d((t=>M(t))),G=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),E=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:V}=ye({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,P,O)=>P!=null?f.forecasts.findIndex((I=>I.id===P)):O!=null?f.forecasts.findIndex((I=>I.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(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&&!E(i.forecasts[t].id)&&b&&a(y(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,R,y,b]);const U=ge(),$=U?.loggedInUserRole!=null&&te(U.loggedInUserRole),{useFeatureGate:W}=q(),{isFeatureEnabled:k}=W(B.isReportsCommentingEnabled),Y=Te(k?A?.companyId:void 0,{clearParams:l&&m}),[z,H]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:G,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:E,meetingUrl:se(h.toString()),hasTransactionAccess:$,isAiCfoAccessEnabled:N,onAskAiCfoClick:V,isReportsCommentingEnabled:k,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d((c=>M(c))),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(B.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as default};
1
+ import{j as n}from"./liveblocks-BunSqsrT.js";import{h as J,u as K,g as Q,i as X,j as d,l as Z,n as ee,o as C}from"./core-DDzShd0J.js";import{fB as M,ze as O,ub as ae,Up as q,u6 as T,bq as te,b_ as se,u7 as oe,Uq as re,U7 as S,e8 as ne,D0 as ce,Ur as ie,Do as le,dV as de,dU as me}from"./zeni-epic-state-BV4QdnGE.js";import{ag as fe,z as pe,ao as ue,aq as he,U as ge,I as w,d as B,a6 as Fe,k as _,aB as be,p as Ie}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import Ce from"./NotFoundScreen-pEDgT9hU.js";import{F as Se}from"./FeaturePreviewScreen-DXqxJKH0.js";import{a as g}from"./sentry-DEmvp01d.js";import{u as Te}from"./useAskAiCfoHostNavButtonProps-CUAZLkWp.js";import{u as ye}from"./useInitialThreadRequest-1cjoi1TS.js";import{t as De}from"./routePaths-B6D81jZB.js";import{M as Ae}from"./MobileAppDrawer-w29pHTah.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.js";import"./InboxNotificationsProvider-C0-HlAfE.js";import"./useTaskManagerAccess-BKBVhoHK.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]="d2fdd780-3569-47ec-90cd-a730b5e73410",s._sentryDebugIdIdentifier="sentry-dbid-d2fdd780-3569-47ec-90cd-a730b5e73410")}catch{}})();const y=(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})}},xe=Z((function(s){const e=re(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:_}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(q(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(le(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ce(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=ne(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=De(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=Ie(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(S({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(S({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(be);function v(){const s=fe(),e=J(),a=K(),o=Q(),{forecastId:r,tenantEmailDomain:c}=X(),[p,u]=g.useState(!1),[m,D]=g.useState(!1),F=pe.getSignedInUser(),A=d((t=>M(t))),$=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>O(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),x=d((t=>t.profitAndLossState)),U=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>x.pandLByForecastID[t]!=null&&oe(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:b}=ue();he({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:G}=Te({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!p&&b)u(!0),l||a(ae());else if(l&&!m){D(!0);const t=((f,P,R)=>P!=null?f.forecasts.findIndex((I=>I.id===P)):R!=null?f.forecasts.findIndex((I=>I.id===R)):f.forecasts.length>0?0:-1)(i,r,U?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=U?.index?(a(q(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&b&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,D,O,T,b]);const j=ge(),V=j?.loggedInUserRole!=null&&te(j.loggedInUserRole),{useFeatureGate:W}=w(),{isFeatureEnabled:E}=W(B.isReportsCommentingEnabled),Y=ye(E?A?.companyId:void 0,{clearParams:l&&m}),[z,H]=g.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",F?.firstName??""),h.searchParams.set("lastname",F?.lastName??""),h.searchParams.set("email",F?.userEmail??"");const L=t=>{H(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(Fe,{analytics:_,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Ae,{isAppContentDrawerOpen:z,handleDrawerToggle:L}),n.jsx(xe,{firstMonthOfFY:$,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:se(h.toString()),hasTransactionAccess:V,isAiCfoAccessEnabled:N,onAskAiCfoClick:G,isReportsCommentingEnabled:E,initialOpenThreadRequest:Y,onClickMenuIcon:()=>{L(!0)}})]})}function Ke(){const s=d((c=>M(c))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(B.isDebitCardFeatureEnabled),o=de(a,s),r=me(s);return o===!0||r===!0?n.jsx(Se,{}):n.jsxs(ee,{children:[n.jsx(C,{path:"/",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId",element:n.jsx(v,{})}),n.jsx(C,{path:"/:forecastId/*",element:n.jsx(Ce,{})})]})}export{Ke as default};
@@ -1,15 +1,15 @@
1
- import{j as a}from"./liveblocks-QA8yK6T_.js";import{a as p}from"./sentry-DX8X0N2R.js";import{C as c,H as r,a7 as m,ab as f,ac as h}from"./index-BjnriIg-.js";import"./mui-BtZD__8k.js";import{i as y}from"./core-OUhaP0nM.js";import"./zeni-epic-state-DzFY1eNZ.js";import"./recharts-CnI5kYGO.js";import"./analytics-drf9tsEq.js";import"./plaid-Bbika4Gn.js";import"./dnd-XtKnRPbJ.js";import"./stripe-cKAAJElX.js";import"./lottie-DaBLQBPb.js";import"./lexical-cGeYDtsl.js";import"./pdf-BMGNA2GO.js";import"./utils-CHDSUF0P.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]="14a769ae-f041-4637-9426-dab994959d93",e._sentryDebugIdIdentifier="sentry-dbid-14a769ae-f041-4637-9426-dab994959d93")}catch{}})();const g=c("div")`
1
+ import{j as r}from"./liveblocks-BunSqsrT.js";import{a as p}from"./sentry-DEmvp01d.js";import{J as c,K as a,a7 as m,ab as f,ac as h}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import{i as y}from"./core-DDzShd0J.js";import"./zeni-epic-state-BV4QdnGE.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.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]="2012cfb4-548c-4aab-9220-efd79b933e1c",e._sentryDebugIdIdentifier="sentry-dbid-2012cfb4-548c-4aab-9220-efd79b933e1c")}catch{}})();const g=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
- `,k=c("header")`
7
+ `,b=c("header")`
8
8
  flex-shrink: 0;
9
- padding: ${r.sp3} ${r.sp4};
10
- `,b=c(m)`
11
- width: ${r.sp4};
12
- height: ${r.sp4};
9
+ padding: ${a.sp3} ${a.sp4};
10
+ `,k=c(m)`
11
+ width: ${a.sp4};
12
+ height: ${a.sp4};
13
13
  color: ${e=>e.theme.colors.brandColorJade};
14
14
  `,x=c("main")`
15
15
  display: flex;
@@ -17,5 +17,5 @@ import{j as a}from"./liveblocks-QA8yK6T_.js";import{a as p}from"./sentry-DX8X0N2
17
17
  flex-direction: column;
18
18
  align-items: center;
19
19
  justify-content: center;
20
- padding: ${r.sp4};
21
- `;function j({children:e}){return a.jsxs(g,{"data-testid":"invoicing-collect-payment-layout",children:[a.jsx(k,{children:a.jsx(b,{"aria-label":"Zeni",role:"img"})}),a.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"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.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 a.jsx(j,{children:a.jsx(f,{portal:o})})}export{B as default};
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"}),d=await l.json();if(!l.ok)throw new w(d.status?.message??`Request failed (${l.status}).`,l.status);return d.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};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-BunSqsrT.js";import{Ul as re,fB as Y,lF as G,dV as N,dU as le,Rh as Q,TK as de,BZ as Pe,Um as J,BO as je,C7 as Le,C1 as ce,BS as pe,C5 as Te,C2 as ve,Un as ue,rr as Ae,g2 as Oe,gA as Re,Uo as H,BW as me,BV as ge,Ca as Ve,c7 as Fe}from"./zeni-epic-state-BV4QdnGE.js";import{$ as he,I as X,d as _,z as K,h as fe,O as Ce,ad as ye,ax as be,ay as Be,a9 as Se,K as V,ae as we,G as W,az as Ue,ao as Ze,aq as $e,a6 as ze,k as xe,S as He,p as _e,aA as Ge,U as Ke}from"./index-Dbbb4cXf.js";import{D as De,n as M,S as Ie}from"./mui-CtTzfD4a.js";import ae from"./NotFoundScreen-pEDgT9hU.js";import{a as d}from"./sentry-DEmvp01d.js";import{u as ee,i as We,j as g,h as Me,g as qe,l as Je,n as se,o as z}from"./core-DDzShd0J.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-CUAZLkWp.js";import{M as Ne}from"./MobileAppDrawer-w29pHTah.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.js";import"./InboxNotificationsProvider-C0-HlAfE.js";import"./useTaskManagerAccess-BKBVhoHK.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]="ca6b62d3-7dfa-41d1-b615-e6610799cd55",e._sentryDebugIdIdentifier="sentry-dbid-ca6b62d3-7dfa-41d1-b615-e6610799cd55")}catch{}})();const Qe={overlayWidth:new Se(100,100,48)},te=W.getLocalizedStrings().peoplePage.invitePage,ne=W.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=We(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>G(l))),{useFeatureGate:D}=X(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=N(I,p),T=le(p),v=Q(p),U=de(p),Z=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(J()),b()},A=()=>{F===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=fe(p,j,I),{isCardsHidden:O}=Ce(p?.tenantId),y=!L||O,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(h==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(Pe(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:Qe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,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(we.H6Regular)`
6
+ margin-top: ${V.sp7};
7
+ padding-left: ${V.sp8};
8
+ padding-right: ${V.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ee=M(we.LargeRegularSp)`
12
+ color: ${e=>e.theme.colors.hero};
13
+ padding-left: ${V.sp8};
14
+ padding-right: ${V.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${V.sp4};
17
+ white-space: pre-line;
18
+ `,aa={overlayWidth:new Se(100,100,48)},oe=W.getLocalizedStrings().peoplePage.invitePage,ie=W.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:h,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const f=he(),m=ee(),[F,B]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>re(o))),r=g((o=>Y(o))),p=g((o=>G(o))),{useFeatureGate:E}=X(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=N(D,r),P=le(r),T=Q(r),v=de(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(J())},C=()=>{F===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=fe(r,j,D),{isCardsHidden:O}=Ce(r?.tenantId),y=!L||O,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:h,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(ce({peopleLocalData:o})),B(!0)},onResetClick:x,onSaveClick:()=>{m(h==="zeni_only"?Te(e):ve())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:Z};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(J()))}),[w.invitePersonState.fetchState]),a.jsx(De,{anchor:"right",open:i,PaperProps:{style:{width:aa.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:C,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:A}):null,a.jsx(Ue,{...s})]})})},ta=M(Ie)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,na=Je((function(e,t){const c=ue(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:xe}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:h}=t;return{personAction:{onPersonDelete:(i,b)=>{e(pe(i,b))},onResendInvite:i=>{e(Ve(i))},onReloadPeople:()=>{e(me()),e(ge(n,h))},onBackClick:()=>{c("../../")},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 c=Me(),n=ee(),h=qe(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),f=g((s=>Y(s))),{useFeatureGate:m}=X(),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),B=g((s=>G(s))),k=!N(F,f)&&B,S=Q(f),w=f?.tenantId,{tenantEmailDomain:r}=f,[p,E]=d.useState(!1),[D,I]=d.useState(!1),[P,T]=d.useState(!1),[v,U]=d.useState("off"),[Z,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=Ye({mobileExploreReferrer:"People"}),u=g((s=>ue(s)));$e({isDataReady:u.fetchState==="Completed"});const j=g((s=>Ae(s.classState,s.classListState))),L=g((s=>Oe(s.userState,s.userRoleState,s.userListViewState,"manager"))),O=g((s=>Re(s))),y=f?.companyId;d.useEffect((()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(me()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ge(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),T(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(ze,{analytics:xe,onLoad:s=>s.trackPageLoaded(He.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Xe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:O,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Ne,{isAppContentDrawerOpen:Z,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:f.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=_e(h.state?.pathnameStackToGoBack,h.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function ka(){const e=Ke();return Fe(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-BunSqsrT.js";import E from"./NotFoundScreen-pEDgT9hU.js";import{a as r}from"./sentry-DEmvp01d.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as B,o as b}from"./core-DDzShd0J.js";import{fB as O,$Z as h,bo as F,bn as N,iI as V,gd as $}from"./zeni-epic-state-BV4QdnGE.js";import{c as q,z as I,aq as L,dL as Z}from"./index-Dbbb4cXf.js";import"./mui-CtTzfD4a.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CUAZLkWp.js";import{M as H}from"./MobileAppDrawer-w29pHTah.js";import"./recharts-OFxTnh_R.js";import"./analytics-RQNlJ1pt.js";import"./plaid-DK2LE-P_.js";import"./dnd-8v-oSlGw.js";import"./stripe-cKAAJElX.js";import"./lottie-BQuZvDrr.js";import"./lexical-DySIClNM.js";import"./pdf-BxUaMSt_.js";import"./utils-BG_QRO5u.js";import"./InboxNotificationsProvider-C0-HlAfE.js";import"./useTaskManagerAccess-BKBVhoHK.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]="5b1ca5eb-8922-47a1-b48b-d0efe53e39c0",e._sentryDebugIdIdentifier="sentry-dbid-5b1ca5eb-8922-47a1-b48b-d0efe53e39c0")}catch{}})();const J=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))(Z),K=()=>{const e=_(),t=v(),c=q(),o=p((a=>O(a))),{aggregatedReportViewState:n}=p((a=>h(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=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=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 D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return L({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(B,{children:[s.jsx(b,{path:"*",element:s.jsx(K,{})}),s.jsx(b,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
@@ -1 +1 @@
1
- import{a as h,R as a}from"./sentry-DX8X0N2R.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-DEmvp01d.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};