@zeniai/web-app-ui 5.1.50-dev → 5.1.50-qa

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 (62) hide show
  1. package/dist/assets/{AddressRoutes-BO0Y1XuG.js → AddressRoutes-g9hsklrH.js} +1 -1
  2. package/dist/assets/{AddressScreen-cCnouRSn.js → AddressScreen-CROQK-4n.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-DuDTdplv.js → AiCfoScreen-CU17MHVZ.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-B_ArN4m-.js → BillPayApprovalRoutes-DI3GeN36.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CeSWBsHw.js → BillPayRoutes-P7Y6TLRl.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-B8bnbJvI.js → BusinessVerificationPageScreen-B6nnpXHm.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen-BFi-6bPY.js → CardsAiCfoScreen-C86bVfoq.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-3ZPc6bsC.js → ChargeCardRoutes-B7sSoo6a.js} +1 -1
  9. package/dist/assets/{CompanyPassportScreen--e7woif_.js → CompanyPassportScreen-Cgus-IIN.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-DYP_9VcK.js → ConnectionAuthScreen-BQrFf5wV.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingAuthScreen-vzmXnBfR.js → CustomerOnboardingAuthScreen-DPNE702o.js} +1 -1
  12. package/dist/assets/{CustomerOnboardingRoutes-DY7mGrS8.js → CustomerOnboardingRoutes-p6Uk3iSA.js} +1 -1
  13. package/dist/assets/{DashboardRoutes-CWWt-YY9.js → DashboardRoutes-DNmUL7Mt.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-Bi_Nepv1.js → DefaultTenantHome-CArToClw.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-BtjmG_jm.js → DomesticWireDetailScreen-Du8m5leq.js} +1 -1
  16. package/dist/assets/{DrawerScreen-Bhvl5Bpw.js → DrawerScreen-m2dilTdj.js} +1 -1
  17. package/dist/assets/{EntityDetailRoutes-DWUflhpV.js → EntityDetailRoutes-BR5FqZ6H.js} +1 -1
  18. package/dist/assets/{ExpenseAutomationRoutes-5xMDqEkK.js → ExpenseAutomationRoutes-c8htRkth.js} +1 -1
  19. package/dist/assets/{FeaturePreviewScreen-Cs1JStpc.js → FeaturePreviewScreen-BN_uvK-S.js} +1 -1
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-C2hS7TqE.js → HubSpotOAuthCallbackScreen-Bz7yvuoV.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-DIheMWou.js → MagicLinkRoutes-DAvXqhJs.js} +1 -1
  22. package/dist/assets/{MagicLinkSignInScreen-BhydWF2v.js → MagicLinkSignInScreen-B6HjyZXP.js} +1 -1
  23. package/dist/assets/{MobileAppDrawer-bZsvcUIO.js → MobileAppDrawer-Di4Asbvj.js} +1 -1
  24. package/dist/assets/{NotFoundScreen-DkPaaWNr.js → NotFoundScreen-C6d7g4SD.js} +1 -1
  25. package/dist/assets/{NotificationRoutes-Debt_KCq.js → NotificationRoutes-D30uoziM.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-BYk52B4_.js → OAuthConsentScreen-ChiMp_o9.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-DvAao1a8.js → PandLWithForecastRoutes-BNImskJm.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-jjBWyySA.js → PeopleRoutes-iIMj8eLi.js} +1 -1
  29. package/dist/assets/{PerformanceRoutes-K4zUr9LW.js → PerformanceRoutes-Di1aWI-4.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-Bq-1t6Xi.js → QBOConnectionScreen-BRLzEkDk.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-_mz3EFDf.js → ReferralListScreen-qJwU61pa.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-DrGF2MTj.js → ReimbursementApprovalRoutes-f5ArhwXZ.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BWFBxfUH.js → ReimbursementApprovalRuleDetailScreen-T0juC1PH.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-DY21Vmvy.js → ReimbursementRoutes-BSjsp3vu.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-WmSJGW8t.js → ReportsRoutes-DCLcYlo7.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-BZ9NRCXj.js → RewardsRoutes-22WA6TT7.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-Cf5Tsx0Z.js → ScreenRoutes-DdzWD1U9.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-C9qtCzkG.js → SettingsRoutes-XvLWREEF.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-B_L42KP-.js → SetupPagesScreen-BHoPLick.js} +1 -1
  40. package/dist/assets/{SignInScreen-ChB2BnS8.js → SignInScreen-CNtwWkn8.js} +1 -1
  41. package/dist/assets/{SignOutScreen-BwwfTIGJ.js → SignOutScreen-BvFuH3BL.js} +1 -1
  42. package/dist/assets/{TaskListScreen-DP-G56Cv.js → TaskListScreen-CaQaxe3c.js} +1 -1
  43. package/dist/assets/{TaskRoutes-B1qP8Ev_.js → TaskRoutes-Cl6WmGjc.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-q6akxnYr.js → TransactionDetailRoutes-DG6Ytg87.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-BDokO385.js → TransactionDetailScreen-wFSRY2vY.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-4uU8xSo5.js → TransactionListRoutes-CwzK16MP.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-Cwxw4OCX.js → TreasuryRoutes-B9PQeIn4.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-CYXZWLCR.js → VendorsRoutes-CWH9LrHd.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-DFk6ctUo.js → WiseConfirmationScreen-2rmdb0s6.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-Dkb3Uwio.js → ZeniAccountRoutes-Du2IGRi6.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-Cp587aU0.js → ZeniAccountStatementScreen-C6xjVyVS.js} +1 -1
  52. package/dist/assets/{analyticsHelper-DcxhhZJu.js → analyticsHelper-BTLx1JWo.js} +1 -1
  53. package/dist/assets/{getLocaleForTenant-Bixn6PX7.js → getLocaleForTenant-yKPZZnim.js} +1 -1
  54. package/dist/assets/{index-B2U2XMzI.js → index-DLvmOqpd.js} +5 -5
  55. package/dist/assets/{routePaths-BhCcxP1S.js → routePaths-2w3X-cgQ.js} +1 -1
  56. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-B4QfsEVQ.js → useAiCfoDashboardSuggestedQuestionsChips-B3aexdxF.js} +1 -1
  57. package/dist/assets/{useAskAiCfoHostNavButtonProps-Bt3rxiW7.js → useAskAiCfoHostNavButtonProps-CKXnZIoK.js} +1 -1
  58. package/dist/assets/{useCashManagementBanner-BdFPdsZy.js → useCashManagementBanner-H0sv1SAg.js} +1 -1
  59. package/dist/assets/{useInitialThreadRequest-j8y2-Pa3.js → useInitialThreadRequest-CzZzqfSl.js} +1 -1
  60. package/dist/assets/{withTransactionSidePanel-BZm11u-w.js → withTransactionSidePanel-Cey9nHHc.js} +1 -1
  61. package/dist/index.html +1 -1
  62. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zeni-epic-state-BzDw8pi_.js","assets/sentry-lku8kjDH.js","assets/core-B5TeChD4.js","assets/index-B0QsCXA7.js","assets/DefaultTenantHome-Bi_Nepv1.js","assets/mui-Da8iY16Z.js","assets/getLocaleForTenant-Bixn6PX7.js","assets/analytics-CkXhIYGA.js","assets/utils-Dw1Jg_v9.js","assets/ScreenRoutes-Cf5Tsx0Z.js","assets/analyticsHelper-DcxhhZJu.js","assets/ConnectionAuthScreen-DYP_9VcK.js","assets/QBOConnectionScreen-Bq-1t6Xi.js","assets/empty-D1f-cCDu.js","assets/index-CGTF1rlJ.js","assets/url-ByXYagPi.js","assets/index-R3BgB7Uo.js","assets/decodeURIComponentSafe-DXB7OyA3.js","assets/SignInScreen-ChB2BnS8.js","assets/useDeviceId-bV7jqaoy.js","assets/MagicLinkSignInScreen-BhydWF2v.js","assets/NotFoundScreen-DkPaaWNr.js","assets/MagicLinkRoutes-DIheMWou.js","assets/WiseConfirmationScreen-DFk6ctUo.js","assets/HubSpotOAuthCallbackScreen-C2hS7TqE.js","assets/CustomerOnboardingAuthScreen-vzmXnBfR.js","assets/SignOutScreen-BwwfTIGJ.js","assets/OAuthConsentScreen-BYk52B4_.js"])))=>i.map(i=>d[i]);
2
- import{a as m,b as T,c as Lre,R as V$t,p as rY,r as gp,g as Pnt,e as R2e,f as H$t,s as N2e,i as U$t,w as W$t,j as Q$t,S as G$t,k as Y$t,l as q$t,m as K$t,n as Z$t,o as J$t}from"./sentry-lku8kjDH.js";import{L as X$t,C as V2e,_ as fp,a as rT,b as ekt,c as gH,d as aT,u as Bnt,T as tkt,e as nkt,f as okt,g as ikt,h as Mnt,i as rkt,k as akt,j as Tt,l as lkt}from"./liveblocks-C-n95g0A.js";import{f as _nt,r as Br,R as N8,P as Ll,O as skt,N as znt,u as Ju,g as lh,h as lT,i as Ont,j as qo,m as zde,k as Fnt,s as H2e,l as bE,n as ckt,o as dkt,p as hu,q as ukt,B as pkt}from"./core-B5TeChD4.js";import{L as U2e,bl as hkt,bm as mkt,bn as P6,bo as gkt,bp as fkt,bq as Vt,br as z$,bs as x2,bt as ll,bu as xkt,bv as G5,bw as il,bx as ykt,by as bkt,bz as wkt,bA as eL,bB as M5,bC as T3,bD as fH,bE as pn,bF as Rnt,bG as a1,bH as Ckt,bI as u6,bJ as Nnt,bK as Vnt,bL as Ode,bM as sh,bN as D3,bO as yd,bP as x5,bQ as vkt,bR as gs,bS as Skt,bT as O$,bU as $kt,bV as kkt,bW as Tre,bX as Akt,bY as _y,bZ as jkt,b_ as W2e,b$ as Ekt,c0 as Ikt,c1 as Lkt,c2 as Tkt,c3 as Dkt,c4 as Pkt,c5 as Bkt,c6 as Mkt,c7 as q7,c8 as xH,c9 as _kt,ca as yH,cb as bH,cc as wH,cd as Fde,ce as CH,cf as GS,cg as YS,ch as vH,ci as zkt,cj as Okt,ck as Q2e,cl as Fkt,cm as Rkt,cn as Nkt,co as Hnt,cp as Rde,cq as Vkt,cr as Qx,cs as G2e,ct as Hkt,cu as Ukt,cv as Wkt,cw as ub,cx as pb,cy as Unt,cz as Wnt,cA as Nde,cB as Qkt,cC as Qnt,cD as Gkt,cE as BF,cF as Gnt,cG as Ykt,cH as Ynt,cI as qkt,cJ as wE,cK as Y2e,cL as Kkt,cM as qnt,cN as Knt,cO as Znt,cP as Zkt,cQ as q2e,cR as Jkt,cS as Xkt,cT as Jnt,cU as eAt,cV as K2e,cW as _c,cX as Pl,cY as tAt,cZ as qS,c_ as t1,c$ as Xnt,d0 as nAt,d1 as tL,d2 as fy,d3 as za,d4 as oAt,d5 as iAt,d6 as rAt,d7 as FD,d8 as s0,d9 as aAt,da as lAt,db as sAt,dc as cAt,dd as RD,de as zy,df as SH,dg as dAt,dh as uAt,di as hb,dj as l1,dk as eot,dl as tot,dm as pAt,dn as hAt,dp as mAt,dq as F$,dr as gAt,ds as R1,dt as Oy,du as Vde,dv as not,dw as oot,dx as iot,dy as rot,dz as aot,dA as lot,dB as fAt,dC as Z2e,dD as xAt,_ as Ld,dE as Hde,dF as sot,dG as yAt,dH as J2e,dI as Sp,dJ as y5,dK as bAt,dL as wAt,dM as cot,dN as Dre,dO as fO,dP as CAt,dQ as vAt,dR as SAt,dS as $At,dT as kAt,dU as AAt,dV as jAt,dW as EAt,dX as IAt,dY as LAt,dZ as eI,d_ as tI,d$ as dot,e0 as Zp,e1 as TAt,e2 as Ude,e3 as Wde,e4 as R$,e5 as Qde,e6 as Gde,e7 as Yde,e8 as qde,e9 as uot,ea as Kde,eb as DAt,ec as PAt,ed as pot,ee as X2e,ef as BAt,eg as Zde,eh as MAt,ei as _At,ej as hot,ek as zAt,el as OAt,em as FAt,en as mot,eo as RAt,ep as got,eq as fot,er as NAt,es as VAt,et as HAt,eu as UAt,ev as WAt,ew as QAt,ex as GAt,ey as YAt,ez as xot,eA as qAt,eB as ege,eC as $H,eD as KAt,eE as ZAt,eF as JAt,eG as XAt,eH as ejt,eI as tjt,eJ as njt,eK as ojt,eL as tge,eM as yot,eN as bot,eO as wot,eP as Cot,eQ as vot,eR as Sot,eS as ijt,eT as rjt,eU as ajt,v as ljt,eV as sT,eW as X1,eX as $ot,eY as sjt,eZ as cjt,e_ as djt,e$ as ujt,f0 as Jde,f1 as cT,f2 as Xde,f3 as kot,f4 as pjt,f5 as hjt,f6 as mjt,f7 as Aot,f8 as nge,f9 as gjt,fa as jot,fb as fjt,fc as Eot,fd as xjt,fe as Iot,ff as yjt,fg as Lot,fh as bjt,fi as wjt,fj as Cjt,fk as vjt,fl as Sjt,fm as oge,fn as Tot,fo as xw,fp as ige,fq as $jt,fr as rge,fs as kjt,ft as Ajt,fu as Dot,fv as Pot,fw as jjt,fx as Ejt,fy as Ijt,fz as Ljt,fA as Tjt,fB as Djt,fC as MF,fD as e1e,fE as Bot,fF as Pjt,fG as nI,fH as Bjt,fI as Mjt,fJ as _jt,fK as zjt,fL as Ojt,fM as Fjt,fN as Rjt,fO as Njt,fP as Vjt,fQ as Mot,fR as Hjt,fS as Ujt,fT as age,fU as Wjt,fV as Qjt,fW as Gjt,fX as Yjt,fY as qjt,fZ as Kjt,f_ as Zjt,f$ as Jjt,g0 as Xjt,g1 as eEt,g2 as tEt,g3 as nEt,g4 as oEt,g5 as iEt,g6 as lge,g7 as rEt,g8 as aEt,g9 as lEt,ga as sEt,gb as cEt,gc as dEt,gd as _ot,ge as uEt,gf as pEt,gg as hEt,gh as sge,gi as mEt,gj as gEt,gk as fEt,gl as xEt,gm as yEt,gn as Pre,go as bEt,gp as wEt,gq as CEt,gr as vEt,gs as SEt,gt as $Et,gu as kEt,gv as AEt,gw as cge,gx as jEt,gy as EEt}from"./zeni-epic-state-BzDw8pi_.js";import{n as l,T as zot,G as dT,j as ei,c as Ee,k as Nn,C as Oot,u as t1e,a as Bre,A as IEt,b as LEt,I as TEt,d as DEt,D as _F,S as Fot}from"./mui-Da8iY16Z.js";import{r as PEt,m as Zh}from"./analytics-CkXhIYGA.js";import{u as xh}from"./plaid-kqYG7b9d.js";import{D as n1e,H as kH,g as BEt,O as MEt,S as _Et,T as zEt,u as o1e,a as i1e,b as OEt}from"./dnd-CWnSyq9-.js";import{l as FEt}from"./stripe-DMRn4zHo.js";import{L as dS}from"./lottie-zNHYqEBz.js";import{r as zs}from"./lexical-D7c0ykAW.js";import{D as Mre,P as _re,_ as Rot,a as Not}from"./pdf-BM7gJkYi.js";import{R as KS,G as p6,H as ap,X as es,Y as zl,I as Vc,J as REt,K as h6,L as mb,M as yh,N as N$,O as Vot,P as NEt,Q as VEt,S as AH,U as uS,V as HEt,W as r1e,Z as UEt,_ as WEt,$ as QEt,d as GEt}from"./recharts--v-RQjOV.js";import{r as YEt,n as dge}from"./utils-Dw1Jg_v9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="211765c8-d63a-40be-b256-3dae2a6cde2d",e._sentryDebugIdIdentifier="sentry-dbid-211765c8-d63a-40be-b256-3dae2a6cde2d")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0})}function n(o){if(o.ep)return;o.ep=!0;const r=function(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}(o);fetch(o.href,r)}})();var uge,ND={},qEt=function(){if(uge)return ND;uge=1;var e=_nt();return ND.createRoot=e.createRoot,ND.hydrateRoot=e.hydrateRoot,ND}(),qu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Lre<"u"?Lre:typeof self<"u"?self:{};function zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pge,hge,mge={exports:{}},zk={};function Hot(){return hge||(hge=1,mge.exports=function(){if(pge)return zk;pge=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(d,u,p){var h,g={},f=null,x=null;for(h in p!==void 0&&(f=""+p),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(x=u.ref),u)r.call(u,h)&&!s.hasOwnProperty(h)&&(g[h]=u[h]);if(d&&d.defaultProps)for(h in u=d.defaultProps)g[h]===void 0&&(g[h]=u[h]);return{$$typeof:n,type:d,key:f,ref:x,props:g,_owner:a.current}}return zk.Fragment=o,zk.jsx=c,zk.jsxs=c,zk}()),mge.exports}var t=Hot();const KEt=m.createContext(null),aY={didCatch:!1,error:null};let ZEt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=aY}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState(aY)}}componentDidCatch(e,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;var a,s;o&&n.error!==null&&function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return c.length!==d.length||c.some((u,p)=>!Object.is(u,d[p]))}(e.resetKeys,r)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(aY))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:a,error:s}=this.state;let c=e;if(a){const d={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(o)c=m.createElement(o,d);else{if(r===void 0)throw s;c=r}}return m.createElement(KEt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var gge,lY={exports:{}},fge,xge,sY,JEt=(gge||(gge=1,xge=lY.exports,sY=function(){var e,n,o,r,a,s,c={},d={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function h(g,f){this._input=g,this._value=f}return e=function(g){var f,x,y,b;if(e.isNumeral(g))f=g.value();else if(g===0||typeof g>"u")f=0;else if(g===null||n.isNaN(g))f=null;else if(typeof g=="string")if(p.zeroFormat&&g===p.zeroFormat)f=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)f=null;else{for(x in c)if((b=typeof c[x].regexps.unformat=="function"?c[x].regexps.unformat():c[x].regexps.unformat)&&g.match(b)){y=c[x].unformat;break}f=(y=y||e._.stringToNumber)(g)}else f=Number(g)||null;return new h(g,f)},e.version="2.0.6",e.isNumeral=function(g){return g instanceof h},e._=n={numberToFormat:function(g,f,x){var y,b,w,C,v,S,k,j,A=d[e.options.currentLocale],E=!1,I=!1,L="",z=1e12,M=1e9,_=1e6,U="",R=!1;if(g=g||0,w=Math.abs(g),e._.includes(f,"(")?(E=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(S=e._.includes(f,"+")?f.indexOf("+"):g<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(b=!!(b=f.match(/a(k|m|b|t)?/))&&b[1],e._.includes(f," a")&&(L=" "),f=f.replace(new RegExp(L+"a[kmbt]?"),""),w>=z&&!b||b==="t"?(L+=A.abbreviations.trillion,g/=z):w<z&&w>=M&&!b||b==="b"?(L+=A.abbreviations.billion,g/=M):w<M&&w>=_&&!b||b==="m"?(L+=A.abbreviations.million,g/=_):(w<_&&w>=1e3&&!b||b==="k")&&(L+=A.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(I=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],k=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),U=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):U=e._.toFixed(g,v.length,x),C=U.split(".")[0],U=e._.includes(U,".")?A.delimiters.decimal+U.split(".")[1]:"",I&&Number(U.slice(1))===0&&(U="")):C=e._.toFixed(g,0,x),L&&!b&&Number(C)>=1e3&&L!==A.abbreviations.trillion)switch(C=String(Number(C)/1e3),L){case A.abbreviations.thousand:L=A.abbreviations.million;break;case A.abbreviations.million:L=A.abbreviations.billion;break;case A.abbreviations.billion:L=A.abbreviations.trillion}if(e._.includes(C,"-")&&(C=C.slice(1),R=!0),C.length<y)for(var O=y-C.length;O>0;O--)C="0"+C;return k>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+A.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+U+(L||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):S>=0?j=S===0?(R?"-":"+")+j:j+(R?"-":"+"):R&&(j="-"+j),j},stringToNumber:function(g){var f,x,y,b=d[p.currentLocale],w=g,C={thousand:3,million:6,billion:9,trillion:12};if(p.zeroFormat&&g===p.zeroFormat)x=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)x=null;else{for(f in x=1,b.delimiters.decimal!=="."&&(g=g.replace(/\./g,"").replace(b.delimiters.decimal,".")),C)if(y=new RegExp("[^a-zA-Z]"+b.abbreviations[f]+"(?:\\)|(\\"+b.currency.symbol+")?(?:\\))?)?$"),w.match(y)){x*=Math.pow(10,C[f]);break}x*=(g.split("-").length+Math.min(g.split("(").length-1,g.split(")").length-1))%2?1:-1,g=g.replace(/[^0-9\.]+/g,""),x*=Number(g)}return x},isNaN:function(g){return typeof g=="number"&&isNaN(g)},includes:function(g,f){return g.indexOf(f)!==-1},insert:function(g,f,x){return g.slice(0,x)+f+g.slice(x)},reduce:function(g,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var x,y=Object(g),b=y.length>>>0,w=0;if(arguments.length===3)x=arguments[2];else{for(;w<b&&!(w in y);)w++;if(w>=b)throw new TypeError("Reduce of empty array with no initial value");x=y[w++]}for(;w<b;w++)w in y&&(x=f(x,y[w],w,y));return x},multiplier:function(g){var f=g.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(g,f){var x=n.multiplier(f);return g>x?g:x},1)},toFixed:function(g,f,x,y){var b,w,C,v,S=g.toString().split("."),k=f-(y||0);return b=S.length===2?Math.min(Math.max(S[1].length,k),f):k,C=Math.pow(10,b),v=(x(g+"e+"+b)/C).toFixed(b),y>f-b&&(w=new RegExp("\\.?0{1,"+(y-(f-b))+"}$"),v=v.replace(w,"")),v}},e.options=p,e.formats=c,e.locales=d,e.locale=function(g){return g&&(p.currentLocale=g.toLowerCase()),p.currentLocale},e.localeData=function(g){if(!g)return d[p.currentLocale];if(g=g.toLowerCase(),!d[g])throw new Error("Unknown locale : "+g);return d[g]},e.reset=function(){for(var g in u)p[g]=u[g]},e.zeroFormat=function(g){p.zeroFormat=typeof g=="string"?g:null},e.nullFormat=function(g){p.nullFormat=typeof g=="string"?g:null},e.defaultFormat=function(g){p.defaultFormat=typeof g=="string"?g:"0.0"},e.register=function(g,f,x){if(f=f.toLowerCase(),this[g+"s"][f])throw new TypeError(f+" "+g+" already registered.");return this[g+"s"][f]=x,x},e.validate=function(g,f){var x,y,b,w,C,v,S,k;if(typeof g!="string"&&(g+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",g)),(g=g.trim()).match(/^\d+$/))return!0;if(g==="")return!1;try{S=e.localeData(f)}catch{S=e.localeData(e.locale())}return b=S.currency.symbol,C=S.abbreviations,x=S.delimiters.decimal,y=S.delimiters.thousands==="."?"\\.":S.delimiters.thousands,!((k=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),k[0]!==b)||(k=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),k[0]!==C.thousand&&k[0]!==C.million&&k[0]!==C.billion&&k[0]!==C.trillion)||(v=new RegExp(y+"{2}"),g.match(/[^\d.,]/g)||(w=g.split(x)).length>2||(w.length<2?!w[0].match(/^\d+.*\d$/)||w[0].match(v):w[0].length===1?!w[0].match(/^\d+$/)||w[0].match(v)||!w[1].match(/^\d+$/):!w[0].match(/^\d+.*\d$/)||w[0].match(v)||!w[1].match(/^\d+$/))))},e.fn=h.prototype={clone:function(){return e(this)},format:function(g,f){var x,y,b,w=this._value,C=g||p.defaultFormat;if(f=f||Math.round,w===0&&p.zeroFormat!==null)y=p.zeroFormat;else if(w===null&&p.nullFormat!==null)y=p.nullFormat;else{for(x in c)if(C.match(c[x].regexps.format)){b=c[x].format;break}y=(b=b||e._.numberToFormat)(w,C,f)}return y},value:function(){return this._value},input:function(){return this._input},set:function(g){return this._value=Number(g),this},add:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([this._value,g],function(x,y,b,w){return x+Math.round(f*y)},0)/f,this},subtract:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([g],function(x,y,b,w){return x-Math.round(f*y)},Math.round(this._value*f))/f,this},multiply:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)*Math.round(x*w)/Math.round(w*w)},1),this},divide:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)/Math.round(x*w)}),this},difference:function(g){return Math.abs(e(this._value).subtract(g).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(g){var f=g%10;return~~(g%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(g,f,x){var y,b=e._.includes(f," BPS")?" ":"";return g*=1e4,f=f.replace(/\s?BPS/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"BPS"),y=y.join("")):y=y+b+"BPS",y},unformat:function(g){return+(1e-4*e._.stringToNumber(g)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},a=(o={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(g){return o.suffixes.indexOf(g)<0})),s="("+(s=a.join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(g,f,x){var y,b,w,C=e._.includes(f,"ib")?r:o,v=e._.includes(f," b")||e._.includes(f," ib")?" ":"";for(f=f.replace(/\s?i?b/,""),y=0;y<=C.suffixes.length;y++)if(b=Math.pow(C.base,y),w=Math.pow(C.base,y+1),g===null||g===0||g>=b&&g<w){v+=C.suffixes[y],b>0&&(g/=b);break}return e._.numberToFormat(g,f,x)+v},unformat:function(g){var f,x,y=e._.stringToNumber(g);if(y){for(f=o.suffixes.length-1;f>=0;f--){if(e._.includes(g,o.suffixes[f])){x=Math.pow(o.base,f);break}if(e._.includes(g,r.suffixes[f])){x=Math.pow(r.base,f);break}}y*=x||1}return y}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(g,f,x){var y,b,w,C=e.locales[e.options.currentLocale],v={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(f=f.replace(/\s?\$\s?/,""),y=e._.numberToFormat(g,f,x),g>=0?(v.before=v.before.replace(/[\-\(]/,""),v.after=v.after.replace(/[\-\)]/,"")):g<0&&!e._.includes(v.before,"-")&&!e._.includes(v.before,"(")&&(v.before="-"+v.before),w=0;w<v.before.length;w++)switch(b=v.before[w],b){case"$":y=e._.insert(y,C.currency.symbol,w);break;case" ":y=e._.insert(y," ",w+C.currency.symbol.length-1)}for(w=v.after.length-1;w>=0;w--)switch(b=v.after[w],b){case"$":y=w===v.after.length-1?y+C.currency.symbol:e._.insert(y,C.currency.symbol,-(v.after.length-(1+w)));break;case" ":y=w===v.after.length-1?y+" ":e._.insert(y," ",-(v.after.length-(1+w)+C.currency.symbol.length-1))}return y}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(g,f,x){var y=(typeof g!="number"||e._.isNaN(g)?"0e+0":g.toExponential()).split("e");return f=f.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(y[0]),f,x)+"e"+y[1]},unformat:function(g){var f=e._.includes(g,"e+")?g.split("e+"):g.split("e-"),x=Number(f[0]),y=Number(f[1]);return y=e._.includes(g,"e-")?y*=-1:y,e._.reduce([x,Math.pow(10,y)],function(b,w,C,v){var S=e._.correctionFactor(b,w);return b*S*(w*S)/(S*S)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(g,f,x){var y=e.locales[e.options.currentLocale],b=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),b+=y.ordinal(g),e._.numberToFormat(g,f,x)+b}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(g,f,x){var y,b=e._.includes(f," %")?" ":"";return e.options.scalePercentBy100&&(g*=100),f=f.replace(/\s?\%/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"%"),y=y.join("")):y=y+b+"%",y},unformat:function(g){var f=e._.stringToNumber(g);return e.options.scalePercentBy100?.01*f:f}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(g,f,x){var y=Math.floor(g/60/60),b=Math.floor((g-60*y*60)/60),w=Math.round(g-60*y*60-60*b);return y+":"+(b<10?"0"+b:b)+":"+(w<10?"0"+w:w)},unformat:function(g){var f=g.split(":"),x=0;return f.length===3?(x+=60*Number(f[0])*60,x+=60*Number(f[1]),x+=Number(f[2])):f.length===2&&(x+=60*Number(f[0]),x+=Number(f[1])),Number(x)}}),e},(fge=lY).exports?fge.exports=sY():xge.numeral=sY()),lY.exports);const k5=zi(JEt);function _5(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(r=>o.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${o} for the full message.`}const A5="$$material";var XEt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function eIt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var tIt=/[A-Z]|^ms/g,nIt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Uot=function(e){return e.charCodeAt(1)===45},yge=function(e){return e!=null&&typeof e!="boolean"},cY=eIt(function(e){return Uot(e)?e:e.replace(tIt,"-$&").toLowerCase()}),bge=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(nIt,function(o,r,a){return T7={name:r,styles:a,next:T7},r})}return XEt[e]===1||Uot(e)||typeof n!="number"||n===0?n:n+"px"};function zF(e,n,o){if(o==null)return"";var r=o;if(r.__emotion_styles!==void 0)return r;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return T7={name:a.name,styles:a.styles,next:T7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)T7={name:c.name,styles:c.styles,next:T7},c=c.next;return s.styles+";"}return function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=zF(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;yge(y)&&(h+=cY(f)+":"+bge(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)yge(x[b])&&(h+=cY(f)+":"+bge(f,x[b])+";");else{var w=zF(d,u,x);switch(f){case"animation":case"animationName":h+=cY(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var T7,wge=/label:\s*([^\s;{]+)\s*(;|$)/g,Cge,vge,Sge,$ge,kge,Age={exports:{}};function oIt(){return vge?Cge:(vge=1,Cge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function iIt(){if($ge)return Sge;$ge=1;var e=oIt();function n(){}function o(){}return o.resetWarningCache=n,Sge=function(){function r(c,d,u,p,h,g){if(g!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function a(){return r}r.isRequired=r;var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function a1e(){return kge||(kge=1,Age.exports=iIt()()),Age.exports}const Sn=zi(a1e());var rIt=function(){function e(o){var r=this;this._insertTag=function(a){var s;s=r.tags.length===0?r.insertionPoint?r.insertionPoint.nextSibling:r.prepend?r.container.firstChild:r.before:r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=o.speedy===void 0||o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(o){o.forEach(this._insertTag)},n.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(s){var c=document.createElement("style");return c.setAttribute("data-emotion",s.key),s.nonce!==void 0&&c.setAttribute("nonce",s.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(s){if(s.sheet)return s.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===s)return document.styleSheets[c]}(r);try{a.insertRule(o,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e}(),qd="-ms-",jge="-moz-",Jr="-webkit-",Wot="comm",l1e="rule",s1e="decl",Qot="@keyframes",aIt=Math.abs,jH=String.fromCharCode,lIt=Object.assign;function Got(e){return e.trim()}function Xr(e,n,o){return e.replace(n,o)}function zre(e,n){return e.indexOf(n)}function pd(e,n){return 0|e.charCodeAt(n)}function nL(e,n,o){return e.slice(n,o)}function Ug(e){return e.length}function c1e(e){return e.length}function VD(e,n){return n.push(e),e}var EH=1,ZS=1,Yot=0,lp=0,Ds=0,V$="";function IH(e,n,o,r,a,s,c){return{value:e,root:n,parent:o,type:r,props:a,children:s,line:EH,column:ZS,length:c,return:""}}function Ok(e,n){return lIt(IH("",null,null,"",null,null,0),e,{length:-e.length},n)}function nh(){return Ds=lp<Yot?pd(V$,lp++):0,ZS++,Ds===10&&(ZS=1,EH++),Ds}function w3(){return pd(V$,lp)}function xO(){return lp}function uT(e,n){return nL(V$,e,n)}function oL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qot(e){return EH=ZS=1,Yot=Ug(V$=e),lp=0,[]}function Kot(e){return V$="",e}function yO(e){return Got(uT(lp-1,Ore(e===91?e+2:e===40?e+1:e)))}function sIt(e){for(;(Ds=w3())&&Ds<33;)nh();return oL(e)>2||oL(Ds)>3?"":" "}function cIt(e,n){for(;--n&&nh()&&!(Ds<48||Ds>102||Ds>57&&Ds<65||Ds>70&&Ds<97););return uT(e,xO()+(n<6&&w3()==32&&nh()==32))}function Ore(e){for(;nh();)switch(Ds){case e:return lp;case 34:case 39:e!==34&&e!==39&&Ore(Ds);break;case 40:e===41&&Ore(e);break;case 92:nh()}return lp}function dIt(e,n){for(;nh()&&e+Ds!==57&&(e+Ds!==84||w3()!==47););return"/*"+uT(n,lp-1)+"*"+jH(e===47?e:nh())}function uIt(e){for(;!oL(w3());)nh();return uT(e,lp)}function pIt(e){return Kot(bO("",null,null,null,[""],e=qot(e),0,[0],e))}function bO(e,n,o,r,a,s,c,d,u){for(var p=0,h=0,g=c,f=0,x=0,y=0,b=1,w=1,C=1,v=0,S="",k=a,j=s,A=r,E=S;w;)switch(y=v,v=nh()){case 40:if(y!=108&&pd(E,g-1)==58){zre(E+=Xr(yO(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=yO(v);break;case 9:case 10:case 13:case 32:E+=sIt(y);break;case 92:E+=cIt(xO()-1,7);continue;case 47:switch(w3()){case 42:case 47:VD(hIt(dIt(nh(),xO()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=Ug(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=Xr(E,/\f/g,"")),x>0&&Ug(E)-g&&VD(x>32?Ige(E+";",r,o,g-1):Ige(Xr(E," ","")+";",r,o,g-2),u);break;case 59:E+=";";default:if(VD(A=Ege(E,n,o,p,h,a,d,S,k=[],j=[],g),s),v===123)if(h===0)bO(E,n,A,A,k,s,g,d,j);else switch(f===99&&pd(E,3)===110?100:f){case 100:case 108:case 109:case 115:bO(e,A,A,r&&VD(Ege(e,A,A,0,0,a,d,S,a,k=[],g),j),a,j,g,d,r?k:j);break;default:bO(E,A,A,A,[""],j,0,d,j)}}p=h=x=0,b=C=1,S=E="",g=c;break;case 58:g=1+Ug(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Ds=lp>0?pd(V$,--lp):0,ZS--,Ds===10&&(ZS=1,EH--),Ds==125))continue}switch(E+=jH(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(Ug(E)-1)*C,C=1;break;case 64:w3()===45&&(E+=yO(nh())),f=w3(),h=g=Ug(S=E+=uIt(xO())),v++;break;case 45:y===45&&Ug(E)==2&&(b=0)}}return s}function Ege(e,n,o,r,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=c1e(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=nL(e,g+1,g=aIt(b=c[y])),S=e;C<x;++C)(S=Got(b>0?f[C]+" "+v:Xr(v,/&\f/g,f[C])))&&(u[w++]=S);return IH(e,n,o,a===0?l1e:d,u,p,h)}function hIt(e,n,o){return IH(e,n,o,Wot,jH(Ds),nL(e,2,-2),0)}function Ige(e,n,o,r){return IH(e,n,o,s1e,nL(e,0,r),nL(e,r+1,-1),r)}function pS(e,n){for(var o="",r=c1e(e),a=0;a<r;a++)o+=n(e[a],a,e,n)||"";return o}function mIt(e,n,o,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case s1e:return e.return=e.return||e.value;case Wot:return"";case Qot:return e.return=e.value+"{"+pS(e.children,r)+"}";case l1e:e.value=e.props.join(",")}return Ug(o=pS(e.children,r))?e.return=e.value+"{"+o+"}":""}function gIt(e){return function(n){n.root||(n=n.return)&&e(n)}}var fIt=function(e,n,o){for(var r=0,a=0;r=a,a=w3(),r===38&&a===12&&(n[o]=1),!oL(a);)nh();return uT(e,lp)},xIt=function(e,n){return Kot(function(o,r){var a=-1,s=44;do switch(oL(s)){case 0:s===38&&w3()===12&&(r[a]=1),o[a]+=fIt(lp-1,r,a);break;case 2:o[a]+=yO(s);break;case 4:if(s===44){o[++a]=w3()===58?"&\f":"",r[a]=o[a].length;break}default:o[a]+=jH(s)}while(s=nh());return o}(qot(e),n))},Lge=new WeakMap,yIt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,r=e.column===o.column&&e.line===o.line;o.type!=="rule";)if(!(o=o.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||Lge.get(o))&&!r){Lge.set(e,!0);for(var a=[],s=xIt(n,a),c=o.props,d=0,u=0;d<s.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=a[d]?s[d].replace(/&\f/g,c[p]):c[p]+" "+s[d]}}},bIt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Zot(e,n){switch(function(o,r){return 45^pd(o,0)?(((r<<2^pd(o,0))<<2^pd(o,1))<<2^pd(o,2))<<2^pd(o,3):0}(e,n)){case 5103:return Jr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Jr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Jr+e+jge+e+qd+e+e;case 6828:case 4268:return Jr+e+qd+e+e;case 6165:return Jr+e+qd+"flex-"+e+e;case 5187:return Jr+e+Xr(e,/(\w+).+(:[^]+)/,Jr+"box-$1$2"+qd+"flex-$1$2")+e;case 5443:return Jr+e+qd+"flex-item-"+Xr(e,/flex-|-self/,"")+e;case 4675:return Jr+e+qd+"flex-line-pack"+Xr(e,/align-content|flex-|-self/,"")+e;case 5548:return Jr+e+qd+Xr(e,"shrink","negative")+e;case 5292:return Jr+e+qd+Xr(e,"basis","preferred-size")+e;case 6060:return Jr+"box-"+Xr(e,"-grow","")+Jr+e+qd+Xr(e,"grow","positive")+e;case 4554:return Jr+Xr(e,/([^-])(transform)/g,"$1"+Jr+"$2")+e;case 6187:return Xr(Xr(Xr(e,/(zoom-|grab)/,Jr+"$1"),/(image-set)/,Jr+"$1"),e,"")+e;case 5495:case 3959:return Xr(e,/(image-set\([^]*)/,Jr+"$1$`$1");case 4968:return Xr(Xr(e,/(.+:)(flex-)?(.*)/,Jr+"box-pack:$3"+qd+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Jr+e+e;case 4095:case 3583:case 4068:case 2532:return Xr(e,/(.+)-inline(.+)/,Jr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ug(e)-1-n>6)switch(pd(e,n+1)){case 109:if(pd(e,n+4)!==45)break;case 102:return Xr(e,/(.+:)(.+)-([^]+)/,"$1"+Jr+"$2-$3$1"+jge+(pd(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~zre(e,"stretch")?Zot(Xr(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(pd(e,n+1)!==115)break;case 6444:switch(pd(e,Ug(e)-3-(~zre(e,"!important")&&10))){case 107:return Xr(e,":",":"+Jr)+e;case 101:return Xr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Jr+(pd(e,14)===45?"inline-":"")+"box$3$1"+Jr+"$2$3$1"+qd+"$2box$3")+e}break;case 5936:switch(pd(e,n+11)){case 114:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Jr+e+qd+e+e}return e}var wIt=[function(e,n,o,r){if(e.length>-1&&!e.return)switch(e.type){case s1e:e.return=Zot(e.value,e.length);break;case Qot:return pS([Ok(e,{value:Xr(e.value,"@","@"+Jr)})],r);case l1e:if(e.length)return function(a,s){return a.map(s).join("")}(e.props,function(a){switch(function(s,c){return(s=c.exec(s))?s[0]:s}(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pS([Ok(e,{props:[Xr(a,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return pS([Ok(e,{props:[Xr(a,/:(plac\w+)/,":"+Jr+"input-$1")]}),Ok(e,{props:[Xr(a,/:(plac\w+)/,":-moz-$1")]}),Ok(e,{props:[Xr(a,/:(plac\w+)/,qd+"input-$1")]})],r)}return""})}}],Jot=function(e){var n=e.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var r,a=e.stylisPlugins||wIt,s={},c=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)s[y[b]]=!0;c.push(x)});var d,u,p=[yIt,bIt],h=[mIt,gIt(function(x){u.insert(x)})],g=function(x){var y=c1e(x);return function(b,w,C,v){for(var S="",k=0;k<y;k++)S+=x[k](b,w,C,v)||"";return S}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){pS(pIt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new rIt({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:d};return f.sheet.hydrate(c),f};function Xot(e){const{styles:n,defaultTheme:o={}}=e,r=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(dT,{styles:r})}const Tge=[];function K7(e){return Tge[0]=e,function(n,o,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";T7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=zF(r,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=zF(r,o,n[d]),a&&(s+=c[d]);wge.lastIndex=0;for(var u,p="";(u=wge.exec(s))!==null;)p+="-"+u[1];var h=function(g){for(var f,x=0,y=0,b=g.length;b>=4;++y,b-=4)f=1540483477*(65535&(f=255&g.charCodeAt(y)|(255&g.charCodeAt(++y))<<8|(255&g.charCodeAt(++y))<<16|(255&g.charCodeAt(++y))<<24))+(59797*(f>>>16)<<16),x=1540483477*(65535&(f^=f>>>24))+(59797*(f>>>16)<<16)^1540483477*(65535&x)+(59797*(x>>>16)<<16);switch(b){case 3:x^=(255&g.charCodeAt(y+2))<<16;case 2:x^=(255&g.charCodeAt(y+1))<<8;case 1:x=1540483477*(65535&(x^=255&g.charCodeAt(y)))+(59797*(x>>>16)<<16)}return(((x=1540483477*(65535&(x^=x>>>13))+(59797*(x>>>16)<<16))^x>>>15)>>>0).toString(36)}(s)+p;return{name:h,styles:s,next:T7}}(Tge)}var Dge,Pge,Bge={exports:{}},ja={};function CIt(){if(Dge)return ja;Dge=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type){case o:case a:case r:case u:case p:case f:return b;default:switch(b=b&&b.$$typeof){case c:case d:case g:case h:case s:return b;default:return w}}case n:return w}}}return ja.ContextConsumer=s,ja.ContextProvider=c,ja.Element=e,ja.ForwardRef=d,ja.Fragment=o,ja.Lazy=g,ja.Memo=h,ja.Portal=n,ja.Profiler=a,ja.StrictMode=r,ja.Suspense=u,ja.SuspenseList=p,ja.isContextConsumer=function(b){return y(b)===s},ja.isContextProvider=function(b){return y(b)===c},ja.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ja.isForwardRef=function(b){return y(b)===d},ja.isFragment=function(b){return y(b)===o},ja.isLazy=function(b){return y(b)===g},ja.isMemo=function(b){return y(b)===h},ja.isPortal=function(b){return y(b)===n},ja.isProfiler=function(b){return y(b)===a},ja.isStrictMode=function(b){return y(b)===r},ja.isSuspense=function(b){return y(b)===u},ja.isSuspenseList=function(b){return y(b)===p},ja.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===s||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},ja.typeOf=y,ja}function vIt(){return Pge||(Pge=1,Bge.exports=CIt()),Bge.exports}var eit=vIt();function a5(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return!(n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function tit(e){if(m.isValidElement(e)||eit.isValidElementType(e)||!a5(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=tit(e[o])}),n}function s1(e,n,o={clone:!0}){const r=o.clone?{...e}:e;return a5(e)&&a5(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||eit.isValidElementType(n[a])?r[a]=n[a]:a5(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&a5(e[a])?r[a]=s1(e[a],n[a],o):o.clone?r[a]=a5(n[a])?tit(n[a]):n[a]:r[a]=n[a]}),r}function SIt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:r=5,...a}=e,s=(h=>{const g=Object.keys(h).map(f=>({key:f,val:h[f]}))||[];return g.sort((f,x)=>f.val-x.val),g.reduce((f,x)=>({...f,[x.key]:x.val}),{})})(n),c=Object.keys(s);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${o})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${o})`}return{keys:c,values:s,up:d,down:u,between:p,only:function(h){return c.indexOf(h)+1<c.length?p(h,c[c.indexOf(h)+1]):d(h)},not:function(h){const g=c.indexOf(h);return g===0?d(c[1]):g===c.length-1?u(c[g]):p(h,c[c.indexOf(h)+1]).replace("@media","@media not all and")},unit:o,...a}}function Mge(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((r,a)=>{const s=n[a];return delete r[a],r[a]=s,r},{...n}):n}const $It={borderRadius:4};function oI(e,n){return n?s1(e,n,{clone:!1}):e}const LH={xs:0,sm:600,md:900,lg:1200,xl:1536},_ge={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${LH[e]}px)`},kIt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:LH[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function z5(e,n,o){const r=e.theme||{};if(Array.isArray(n)){const a=r.breakpoints||_ge;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=r.breakpoints||_ge;return Object.keys(n).reduce((s,c)=>{if(function(d,u){return u==="@"||u.startsWith("@")&&(d.some(p=>u.startsWith(`@${p}`))||!!u.match(/^@\d/))}(a.keys,c)){const d=function(u,p){const h=p.match(/^@([^/]+)?\/?(.+)?$/);if(!h)return null;const[,g,f]=h,x=Number.isNaN(+g)?g||0:+g;return u.containerQueries(f).up(x)}(r.containerQueries?r:kIt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||LH).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function zge(e,n){return e.reduce((o,r)=>{const a=o[r];return(!a||Object.keys(a).length===0)&&delete o[r],o},n)}function ki(e){if(typeof e!="string")throw new Error(_5(7));return e.charAt(0).toUpperCase()+e.slice(1)}function TH(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const r=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return n.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function OF(e,n,o,r=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||r:TH(e,o)||r,n&&(a=n(a,r,e)),a}function ds(e){const{prop:n,cssProperty:o=e.prop,themeKey:r,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=TH(c.theme,r)||{};return z5(c,d,p=>{let h=OF(u,a,p);return p===h&&typeof p=="string"&&(h=OF(u,a,`${n}${p==="default"?"":ki(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const AIt={m:"margin",p:"padding"},jIt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oge={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},EIt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!Oge[e])return[e];e=Oge[e]}const[n,o]=e.split(""),r=AIt[n],a=jIt[o]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),nit=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oit=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function pT(e,n,o,r){const a=TH(e,n,!0)??o;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const c=Math.abs(s),d=a[c];return s>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof a=="function"?a:()=>{}}function d1e(e){return pT(e,"spacing",8)}function hT(e,n){return typeof n=="string"||n==null?n:e(n)}function IIt(e,n,o,r){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=hT(c,d),u),{})}(EIt(o),r);return z5(e,e[o],a)}function iit(e,n){const o=d1e(e.theme);return Object.keys(e).map(r=>IIt(e,n,r,o)).reduce(oI,{})}function Hl(e){return iit(e,nit)}function Ul(e){return iit(e,oit)}function rit(e=8,n=d1e({spacing:e})){if(e.mui)return e;const o=(...r)=>(r.length===0?[1]:r).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function DH(...e){const n=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),o=r=>Object.keys(r).reduce((a,s)=>n[s]?oI(a,n[s](r)):a,{});return o.propTypes={},o.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),o}function c0(e){return typeof e!="number"?e:`${e}px solid`}function O0(e,n){return ds({prop:e,themeKey:"borders",transform:n})}Hl.propTypes={},Hl.filterProps=nit,Ul.propTypes={},Ul.filterProps=oit;const LIt=O0("border",c0),TIt=O0("borderTop",c0),DIt=O0("borderRight",c0),PIt=O0("borderBottom",c0),BIt=O0("borderLeft",c0),MIt=O0("borderColor"),_It=O0("borderTopColor"),zIt=O0("borderRightColor"),OIt=O0("borderBottomColor"),FIt=O0("borderLeftColor"),RIt=O0("outline",c0),NIt=O0("outlineColor"),wO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=pT(e.theme,"shape.borderRadius",4),o=r=>({borderRadius:hT(n,r)});return z5(e,e.borderRadius,o)}return null};wO.propTypes={},wO.filterProps=["borderRadius"],DH(LIt,TIt,DIt,PIt,BIt,MIt,_It,zIt,OIt,FIt,wO,RIt,NIt);const FF=e=>{if(e.gap!==void 0&&e.gap!==null){const n=pT(e.theme,"spacing",8),o=r=>({gap:hT(n,r)});return z5(e,e.gap,o)}return null};FF.propTypes={},FF.filterProps=["gap"];const RF=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=pT(e.theme,"spacing",8),o=r=>({columnGap:hT(n,r)});return z5(e,e.columnGap,o)}return null};RF.propTypes={},RF.filterProps=["columnGap"];const NF=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=pT(e.theme,"spacing",8),o=r=>({rowGap:hT(n,r)});return z5(e,e.rowGap,o)}return null};NF.propTypes={},NF.filterProps=["rowGap"];function hS(e,n){return n==="grey"?n:e}DH(FF,RF,NF,ds({prop:"gridColumn"}),ds({prop:"gridRow"}),ds({prop:"gridAutoFlow"}),ds({prop:"gridAutoColumns"}),ds({prop:"gridAutoRows"}),ds({prop:"gridTemplateColumns"}),ds({prop:"gridTemplateRows"}),ds({prop:"gridTemplateAreas"}),ds({prop:"gridArea"}));function Yp(e){return e<=1&&e!==0?100*e+"%":e}DH(ds({prop:"color",themeKey:"palette",transform:hS}),ds({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hS}),ds({prop:"backgroundColor",themeKey:"palette",transform:hS}));const VIt=ds({prop:"width",transform:Yp}),u1e=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const r=e.theme?.breakpoints?.values?.[o]||LH[o];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Yp(o)}};return z5(e,e.maxWidth,n)}return null};u1e.filterProps=["maxWidth"];const HIt=ds({prop:"minWidth",transform:Yp}),UIt=ds({prop:"height",transform:Yp}),WIt=ds({prop:"maxHeight",transform:Yp}),QIt=ds({prop:"minHeight",transform:Yp});ds({prop:"size",cssProperty:"width",transform:Yp}),ds({prop:"size",cssProperty:"height",transform:Yp});DH(VIt,u1e,HIt,UIt,WIt,QIt,ds({prop:"boxSizing"}));const PH={border:{themeKey:"borders",transform:c0},borderTop:{themeKey:"borders",transform:c0},borderRight:{themeKey:"borders",transform:c0},borderBottom:{themeKey:"borders",transform:c0},borderLeft:{themeKey:"borders",transform:c0},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:c0},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:wO},color:{themeKey:"palette",transform:hS},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hS},backgroundColor:{themeKey:"palette",transform:hS},p:{style:Ul},pt:{style:Ul},pr:{style:Ul},pb:{style:Ul},pl:{style:Ul},px:{style:Ul},py:{style:Ul},padding:{style:Ul},paddingTop:{style:Ul},paddingRight:{style:Ul},paddingBottom:{style:Ul},paddingLeft:{style:Ul},paddingX:{style:Ul},paddingY:{style:Ul},paddingInline:{style:Ul},paddingInlineStart:{style:Ul},paddingInlineEnd:{style:Ul},paddingBlock:{style:Ul},paddingBlockStart:{style:Ul},paddingBlockEnd:{style:Ul},m:{style:Hl},mt:{style:Hl},mr:{style:Hl},mb:{style:Hl},ml:{style:Hl},mx:{style:Hl},my:{style:Hl},margin:{style:Hl},marginTop:{style:Hl},marginRight:{style:Hl},marginBottom:{style:Hl},marginLeft:{style:Hl},marginX:{style:Hl},marginY:{style:Hl},marginInline:{style:Hl},marginInlineStart:{style:Hl},marginInlineEnd:{style:Hl},marginBlock:{style:Hl},marginBlockStart:{style:Hl},marginBlockEnd:{style:Hl},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:FF},rowGap:{style:NF},columnGap:{style:RF},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yp},maxWidth:{style:u1e},minWidth:{transform:Yp},height:{transform:Yp},maxHeight:{transform:Yp},minHeight:{transform:Yp},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Fy=function(){function e(n,o,r,a){const s={[n]:o,theme:r},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const g=TH(r,u)||{};return h?h(s):z5(s,o,f=>{let x=OF(g,p,f);return f===x&&typeof f=="string"&&(x=OF(g,p,`${n}${f==="default"?"":ki(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:r,theme:a={},nested:s}=o||{};if(!r)return null;const c=a.unstable_sxConfig??PH;function d(u){let p=u;if(typeof u=="function")p=u(a);else if(typeof u!="object")return u;if(!p)return null;const h=function(x={}){return x.keys?.reduce((y,b)=>(y[x.up(b)]={},y),{})||{}}(a.breakpoints),g=Object.keys(h);let f=h;return Object.keys(p).forEach(x=>{const y=function(b,w){return typeof b=="function"?b(w):b}(p[x],a);if(y!=null)if(typeof y=="object")if(c[x])f=oI(f,e(x,y,a,c));else{const b=z5({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((S,k)=>S.concat(Object.keys(k)),[]),v=new Set(C);return w.every(S=>v.size===Object.keys(S).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=oI(f,b)}else f=oI(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":Mge(a,zge(g,f))}:Mge(a,zge(g,f))}return Array.isArray(r)?r.map(d):d(r)}}();function GIt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let r=o.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return o.palette.mode===e?n:{}}function p1e(e={},...n){const{breakpoints:o={},palette:r={},spacing:a,shape:s={},...c}=e;let d=s1({breakpoints:SIt(o),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:rit(a),shape:{...$It,...s}},c);return d=function(u){const p=(x,y)=>x.replace("@media",y?`@container ${y}`:"@container");function h(x,y){x.up=(...b)=>p(u.breakpoints.up(...b),y),x.down=(...b)=>p(u.breakpoints.down(...b),y),x.between=(...b)=>p(u.breakpoints.between(...b),y),x.only=(...b)=>p(u.breakpoints.only(...b),y),x.not=(...b)=>{const w=p(u.breakpoints.not(...b),y);return w.includes("not all and")?w.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):w}}const g={},f=x=>(h(g,x),g);return h(f),{...u,containerQueries:f}}(d),d.applyStyles=GIt,d=n.reduce((u,p)=>s1(u,p),d),d.unstable_sxConfig={...PH,...c?.unstable_sxConfig},d.unstable_sx=function(u){return Fy({sx:u,theme:this})},d}function Fre(e=null){const n=m.useContext(zot);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}Fy.filterProps=["sx"];const YIt=p1e();function ait(e=YIt){return Fre(e)}function Fge(e){const n=K7(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function lit({styles:e,themeId:n,defaultTheme:o={}}){const r=ait(o),a=n&&r[n]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>Fge(typeof c=="function"?c(a):c)):Fge(s)),t.jsx(Xot,{styles:s})}const Rge=e=>e,qIt=(()=>{let e=Rge;return{configure(n){e=n},generate:n=>e(n),reset(){e=Rge}}})();function sit(e){var n,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=sit(e[n]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ji(){for(var e,n,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=sit(e))&&(r&&(r+=" "),r+=n);return r}const KIt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function na(e,n,o="Mui"){const r=KIt[n];return r?`${o}-${r}`:`${qIt.generate(e)}-${n}`}function Mr(e,n,o="Mui"){const r={};return n.forEach(a=>{r[a]=na(e,a,o)}),r}function cit(e){const{variants:n,...o}=e,r={variants:n,style:K7(o),isProcessed:!0};return r.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=K7(a.style))}),r}const ZIt=p1e();function dY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function V8(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function JIt(e){return e?(n,o)=>o[e]:null}function CO(e,n,o){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap(a=>CO(e,a,o));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=o?V8(r.style,o):r.style;else{const{variants:s,...c}=r;a=o?V8(K7(c),o):c}return dit(e,r.variants,[a],o)}return r?.isProcessed?o?V8(K7(r.style),o):r.style:o?V8(K7(r),o):r}function dit(e,n,o=[],r=void 0){let a;e:for(let s=0;s<n.length;s+=1){const c=n[s];if(typeof c.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(a))continue}else for(const d in c.props)if(e[d]!==c.props[d]&&e.ownerState?.[d]!==c.props[d])continue e;typeof c.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},o.push(r?V8(K7(c.style(a)),r):c.style(a))):o.push(r?V8(K7(c.style),r):c.style)}return o}function XIt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Rre(e,n,o=!1){const r={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){r[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[s][p]=Rre(c[p],d[p],o)}}else r[s]=d;else r[s]=c||{}}else s==="className"&&o&&n.className?r.className=ji(e?.className,n?.className):s==="style"&&o&&n.style?r.style={...e?.style,...n?.style}:r[s]===void 0&&(r[s]=e[s])}return r}const ch=typeof window<"u"?m.useLayoutEffect:m.useEffect;function h1e(e,n=0,o=1){return function(r,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(r,s))}(e,n,o)}function m6(e){if(e.type)return e;if(e.charAt(0)==="#")return m6(function(s){s=s.slice(1);const c=new RegExp(`.{1,${s.length>=6?2:1}}`,"g");let d=s.match(c);return d&&d[0].length===1&&(d=d.map(u=>u+u)),d?`rgb${d.length===4?"a":""}(${d.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}(e));const n=e.indexOf("("),o=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(o))throw new Error(_5(9,e));let r,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),r=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(_5(10,r))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:r}}const CE=(e,n)=>{try{return(o=>{const r=m6(o);return r.values.slice(0,3).map((a,s)=>r.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function BH(e){const{type:n,colorSpace:o}=e;let{values:r}=e;return n.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${o} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function uit(e){e=m6(e);const{values:n}=e,o=n[0],r=n[1]/100,a=n[2]/100,s=r*Math.min(a,1-a),c=(p,h=(p+o/30)%12)=>a-s*Math.max(Math.min(h-3,9-h,1),-1);let d="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return e.type==="hsla"&&(d+="a",u.push(n[3])),BH({type:d,values:u})}function Nre(e){let n=(e=m6(e)).type==="hsl"||e.type==="hsla"?m6(uit(e)).values:e.values;return n=n.map(o=>(e.type!=="color"&&(o/=255),o<=.03928?o/12.92:((o+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function VF(e,n){return e=m6(e),n=h1e(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,BH(e)}function Gx(e,n,o){try{return VF(e,n)}catch{return e}}function MH(e,n){if(e=m6(e),n=h1e(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]*=1-n;return BH(e)}function pa(e,n,o){try{return MH(e,n)}catch{return e}}function _H(e,n){if(e=m6(e),n=h1e(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let o=0;o<3;o+=1)e.values[o]+=(255-e.values[o])*n;else if(e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]+=(1-e.values[o])*n;return BH(e)}function ha(e,n,o){try{return _H(e,n)}catch{return e}}function HD(e,n,o){try{return function(r,a=.15){return Nre(r)>.5?MH(r,a):_H(r,a)}(e,n)}catch{return e}}const pit=m.createContext(null);function m1e(){return m.useContext(pit)}const eLt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function tLt(e){const{children:n,theme:o}=e,r=m1e(),a=m.useMemo(()=>{const s=r===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(r,o);return s!=null&&(s[eLt]=r!==null),s},[o,r]);return t.jsx(pit.Provider,{value:a,children:n})}const hit=m.createContext();function nLt({value:e,...n}){return t.jsx(hit.Provider,{value:e??!0,...n})}const zH=()=>m.useContext(hit)??!1,mit=m.createContext(void 0);function oLt({value:e,children:n}){return t.jsx(mit.Provider,{value:e,children:n})}function iLt({props:e,name:n}){return function(o){const{theme:r,name:a,props:s}=o;if(!r||!r.components||!r.components[a])return s;const c=r.components[a];return c.defaultProps?Rre(c.defaultProps,s,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:Rre(c,s,r.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(mit)}})}let Nge=0;const Vge={...V$t}.useId;function OH(e){if(Vge!==void 0){const n=Vge();return e??n}return function(n){const[o,r]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(Nge+=1,r(`mui-${Nge}`))},[o]),a}(e)}const Hge={};function Uge(e,n,o,r=!1){return m.useMemo(()=>{const a=e&&n[e]||n;if(typeof o=="function"){const s=o(a),c=e?{...n,[e]:s}:s;return r?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,r])}function git(e){const{children:n,theme:o,themeId:r}=e,a=Fre(Hge),s=m1e()||Hge,c=Uge(r,a,o),d=Uge(r,s,o,!0),u=(r?c[r]:c).direction==="rtl",p=function(h){const g=Fre(),f=OH()||"",{modularCssLayers:x}=h;let y="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return y=x&&g===null?typeof x=="string"?x.replace(/mui(?!\.)/g,y):`@layer ${y};`:"",ch(()=>{const b=document.querySelector("head");if(!b)return;const w=b.firstChild;if(y){if(w&&w.hasAttribute?.("data-mui-layer-order")&&w.getAttribute("data-mui-layer-order")===f)return;const C=document.createElement("style");C.setAttribute("data-mui-layer-order",f),C.textContent=y,b.prepend(C)}else b.querySelector(`style[data-mui-layer-order="${f}"]`)?.remove()},[y,f]),y?t.jsx(lit,{styles:y}):null}(c);return t.jsx(tLt,{theme:d,children:t.jsx(zot.Provider,{value:c,children:t.jsx(nLt,{value:u,children:t.jsxs(oLt,{value:r?c[r].components:c.components,children:[p,n]})})})})}const Wge={theme:void 0},Vre="mode",Hre="color-scheme",rLt="data-color-scheme";function aLt(){}const lLt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let r;try{r=n.localStorage.getItem(e)}catch{}return r||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return aLt;const r=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function uY(){}function Qge(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Gge(e,n){return e.mode==="light"||e.mode==="system"&&e.systemMode==="light"?n("light"):e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark"?n("dark"):void 0}function sLt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Vre,colorSchemeStorageKey:c=Hre,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=lLt,noSsr:p=!1}=e,h=a.join(","),g=a.length>1,f=m.useMemo(()=>u?.({key:s,storageWindow:d}),[u,s,d]),x=m.useMemo(()=>u?.({key:`${c}-light`,storageWindow:d}),[u,c,d]),y=m.useMemo(()=>u?.({key:`${c}-dark`,storageWindow:d}),[u,c,d]),[b,w]=m.useState(()=>{const I=f?.get(n)||n,L=x?.get(o)||o,z=y?.get(r)||r;return{mode:I,systemMode:Qge(I),lightColorScheme:L,darkColorScheme:z}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const S=function(I){return Gge(I,L=>L==="light"?I.lightColorScheme:L==="dark"?I.darkColorScheme:void 0)}(b),k=m.useCallback(I=>{w(L=>{if(I===L.mode)return L;const z=I??n;return f?.set(z),{...L,mode:z,systemMode:Qge(z)}})},[f,n]),j=m.useCallback(I=>{I?typeof I=="string"?I&&!h.includes(I)?console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`):w(L=>{const z={...L};return Gge(L,M=>{M==="light"&&(x?.set(I),z.lightColorScheme=I),M==="dark"&&(y?.set(I),z.darkColorScheme=I)}),z}):w(L=>{const z={...L},M=I.light===null?o:I.light,_=I.dark===null?r:I.dark;return M&&(h.includes(M)?(z.lightColorScheme=M,x?.set(M)):console.error(`\`${M}\` does not exist in \`theme.colorSchemes\`.`)),_&&(h.includes(_)?(z.darkColorScheme=_,y?.set(_)):console.error(`\`${_}\` does not exist in \`theme.colorSchemes\`.`)),z}):w(L=>(x?.set(o),y?.set(r),{...L,lightColorScheme:o,darkColorScheme:r}))},[h,x,y,o,r]),A=m.useCallback(I=>{b.mode==="system"&&w(L=>{const z=I?.matches?"dark":"light";return L.systemMode===z?L:{...L,systemMode:z}})},[b.mode]),E=m.useRef(A);return E.current=A,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const I=(...z)=>E.current(...z),L=window.matchMedia("(prefers-color-scheme: dark)");return L.addListener(I),I(L),()=>{L.removeListener(I)}},[g]),m.useEffect(()=>{if(g){const I=f?.subscribe(M=>{(!M||["light","dark","system"].includes(M))&&k(M||n)})||uY,L=x?.subscribe(M=>{(!M||h.match(M))&&j({light:M})})||uY,z=y?.subscribe(M=>{(!M||h.match(M))&&j({dark:M})})||uY;return()=>{I(),L(),z()}}},[j,k,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?S:void 0,setMode:k,setColorScheme:j}}function cLt(e=""){function n(...o){if(!o.length)return"";const r=o[0];return typeof r!="string"||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${n(...o.slice(1))})`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${n(...r)})`}const Yge=(e,n,o,r=[])=>{let a=e;n.forEach((s,c)=>{c===n.length-1?Array.isArray(a)?a[Number(s)]=o:a&&typeof a=="object"&&(a[s]=o):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})};function pY(e,n){const{prefix:o,shouldSkipGeneratingVar:r}=n||{},a={},s={},c={};return((d,u,p)=>{(function h(g,f=[],x=[]){Object.entries(g).forEach(([y,b])=>{(!p||p&&!p([...f,y]))&&b!=null&&(typeof b=="object"&&Object.keys(b).length>0?h(b,[...f,y],Array.isArray(b)?[...x,y]:x):u([...f,y],b,x))})})(d)})(e,(d,u,p)=>{if(!(typeof u!="string"&&typeof u!="number"||r&&r(d,u))){const h=`--${o?`${o}-`:""}${d.join("-")}`,g=((f,x)=>typeof x=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(y=>f.includes(y))||f[f.length-1].toLowerCase().includes("opacity")?x:`${x}px`:x)(d,u);Object.assign(a,{[h]:g}),Yge(s,d,`var(${h})`,p),Yge(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function oa(e,n,o=void 0){const r={};for(const a in e){const s=e[a];let c="",d=!0;for(let u=0;u<s.length;u+=1){const p=s[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,o&&o[p]&&(c+=" "+o[p]))}r[a]=c}return r}function hY(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const iL={black:"#000",white:"#fff"},dLt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},uLt="#f3e5f5",pLt="#ce93d8",hLt="#ba68c8",mLt="#ab47bc",gLt="#9c27b0",fLt="#7b1fa2",xLt="#e57373",yLt="#ef5350",bLt="#f44336",qge="#d32f2f",wLt="#c62828",CLt="#ffb74d",vLt="#ffa726",SLt="#ff9800",$Lt="#f57c00",kLt="#e65100",ALt="#e3f2fd",jLt="#90caf9",Kge="#42a5f5",ELt="#1976d2",ILt="#1565c0",LLt="#4fc3f7",TLt="#29b6f6",DLt="#03a9f4",Zge="#0288d1",PLt="#01579b",BLt="#81c784",MLt="#66bb6a",_Lt="#4caf50",zLt="#388e3c",OLt="#2e7d32",FLt="#1b5e20";function fit(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:iL.white,default:iL.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const xit=fit();function yit(){return{text:{primary:iL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:iL.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Ure=yit();function Jge(e,n,o,r){const a=r.light||r,s=r.dark||1.5*r;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=_H(e.main,a):n==="dark"&&(e.dark=MH(e.main,s)))}function Xge(e,n,o,r,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(r)?n[o]=n[r]:o==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*s).toFixed(0)}%)`:o==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function g1e(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:r=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:jLt,light:ALt,dark:Kge}:{main:ELt,light:Kge,dark:ILt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:pLt,light:uLt,dark:mLt}:{main:gLt,light:hLt,dark:fLt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:bLt,light:xLt,dark:qge}:{main:qge,light:yLt,dark:wLt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:TLt,light:LLt,dark:Zge}:{main:Zge,light:DLt,dark:PLt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:MLt,light:BLt,dark:zLt}:{main:OLt,light:_Lt,dark:FLt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:vLt,light:CLt,dark:$Lt}:{main:"#ed6c02",light:SLt,dark:kLt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const S=Nre(C),k=Nre(v);return(Math.max(S,k)+.05)/(Math.min(S,k)+.05)}(b,Ure.text.primary)>=o?Ure.text.primary:xit.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:S=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(_5(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(_5(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(Xge(a,b,"light",v,r),Xge(a,b,"dark",S,r)):(Jge(b,"light",v,r),Jge(b,"dark",S,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=fit():n==="dark"&&(y=yit()),s1({common:{...iL},mode:n,primary:x({color:c,name:"primary"}),secondary:x({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:x({color:u,name:"error"}),warning:x({color:g,name:"warning"}),info:x({color:p,name:"info"}),success:x({color:h,name:"success"}),grey:dLt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:r,...y},s)}function RLt(e){const n={};return Object.entries(e).forEach(o=>{const[r,a]=o;typeof a=="object"&&(n[r]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),n}function NLt(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function VLt(e){return Math.round(1e5*e)/1e5}const e3e={textTransform:"uppercase"},t3e='"Roboto", "Helvetica", "Arial", sans-serif';function bit(e,n){const{fontFamily:o=t3e,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:u=16,allVariants:p,pxToRem:h,...g}=typeof n=="function"?n(e):n,f=r/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,S,k)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===t3e?{letterSpacing:`${VLt(S/C)}em`}:{},...k,...p}),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(c,14,1.75,.4,e3e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,e3e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return s1({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function xl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const HLt=["none",xl(0,2,1,-1,0,1,1,0,0,1,3,0),xl(0,3,1,-2,0,2,2,0,0,1,5,0),xl(0,3,3,-2,0,3,4,0,0,1,8,0),xl(0,2,4,-1,0,4,5,0,0,1,10,0),xl(0,3,5,-1,0,5,8,0,0,1,14,0),xl(0,3,5,-1,0,6,10,0,0,1,18,0),xl(0,4,5,-2,0,7,10,1,0,2,16,1),xl(0,5,5,-3,0,8,10,1,0,3,14,2),xl(0,5,6,-3,0,9,12,1,0,3,16,2),xl(0,6,6,-3,0,10,14,1,0,4,18,3),xl(0,6,7,-4,0,11,15,1,0,4,20,3),xl(0,7,8,-4,0,12,17,2,0,5,22,4),xl(0,7,8,-4,0,13,19,2,0,5,24,4),xl(0,7,9,-4,0,14,21,2,0,5,26,4),xl(0,8,9,-5,0,15,22,2,0,6,28,5),xl(0,8,10,-5,0,16,24,2,0,6,30,5),xl(0,8,11,-5,0,17,26,2,0,6,32,5),xl(0,9,11,-5,0,18,28,2,0,7,34,6),xl(0,9,12,-6,0,19,29,2,0,7,36,6),xl(0,10,13,-6,0,20,31,3,0,8,38,7),xl(0,10,13,-6,0,21,33,3,0,8,40,7),xl(0,10,14,-6,0,22,35,3,0,8,42,7),xl(0,11,14,-7,0,23,36,3,0,9,44,8),xl(0,11,15,-7,0,24,38,3,0,9,46,8)],ULt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wit={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function n3e(e){return`${Math.round(e)}ms`}function WLt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function QLt(e){const n={...ULt,...e.easing},o={...wit,...e.duration};return{getAutoHeightDuration:WLt,create:(r=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof s=="string"?s:n3e(s)} ${c} ${typeof d=="string"?d:n3e(d)}`).join(",")},...e,easing:n,duration:o}}const GLt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function YLt(e){return a5(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Cit(e={}){const n={...e};return function o(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[c,d]=a[s];!YLt(d)||c.startsWith("unstable_")?delete r[c]:a5(d)&&(r[c]={...d},o(r[c]))}}(n),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zeni-epic-state-BzDw8pi_.js","assets/sentry-lku8kjDH.js","assets/core-B5TeChD4.js","assets/index-B0QsCXA7.js","assets/DefaultTenantHome-CArToClw.js","assets/mui-Da8iY16Z.js","assets/getLocaleForTenant-yKPZZnim.js","assets/analytics-CkXhIYGA.js","assets/utils-Dw1Jg_v9.js","assets/ScreenRoutes-DdzWD1U9.js","assets/analyticsHelper-BTLx1JWo.js","assets/ConnectionAuthScreen-BQrFf5wV.js","assets/QBOConnectionScreen-BRLzEkDk.js","assets/empty-D1f-cCDu.js","assets/index-CGTF1rlJ.js","assets/url-ByXYagPi.js","assets/index-R3BgB7Uo.js","assets/decodeURIComponentSafe-DXB7OyA3.js","assets/SignInScreen-CNtwWkn8.js","assets/useDeviceId-bV7jqaoy.js","assets/MagicLinkSignInScreen-B6HjyZXP.js","assets/NotFoundScreen-C6d7g4SD.js","assets/MagicLinkRoutes-DAvXqhJs.js","assets/WiseConfirmationScreen-2rmdb0s6.js","assets/HubSpotOAuthCallbackScreen-Bz7yvuoV.js","assets/CustomerOnboardingAuthScreen-DPNE702o.js","assets/SignOutScreen-BvFuH3BL.js","assets/OAuthConsentScreen-ChiMp_o9.js"])))=>i.map(i=>d[i]);
2
+ import{a as m,b as T,c as Lre,R as V$t,p as rY,r as gp,g as Pnt,e as R2e,f as H$t,s as N2e,i as U$t,w as W$t,j as Q$t,S as G$t,k as Y$t,l as q$t,m as K$t,n as Z$t,o as J$t}from"./sentry-lku8kjDH.js";import{L as X$t,C as V2e,_ as fp,a as rT,b as ekt,c as gH,d as aT,u as Bnt,T as tkt,e as nkt,f as okt,g as ikt,h as Mnt,i as rkt,k as akt,j as Tt,l as lkt}from"./liveblocks-C-n95g0A.js";import{f as _nt,r as Br,R as N8,P as Ll,O as skt,N as znt,u as Ju,g as lh,h as lT,i as Ont,j as qo,m as zde,k as Fnt,s as H2e,l as bE,n as ckt,o as dkt,p as hu,q as ukt,B as pkt}from"./core-B5TeChD4.js";import{L as U2e,bl as hkt,bm as mkt,bn as P6,bo as gkt,bp as fkt,bq as Vt,br as z$,bs as x2,bt as ll,bu as xkt,bv as G5,bw as il,bx as ykt,by as bkt,bz as wkt,bA as eL,bB as M5,bC as T3,bD as fH,bE as pn,bF as Rnt,bG as a1,bH as Ckt,bI as u6,bJ as Nnt,bK as Vnt,bL as Ode,bM as sh,bN as D3,bO as yd,bP as x5,bQ as vkt,bR as gs,bS as Skt,bT as O$,bU as $kt,bV as kkt,bW as Tre,bX as Akt,bY as _y,bZ as jkt,b_ as W2e,b$ as Ekt,c0 as Ikt,c1 as Lkt,c2 as Tkt,c3 as Dkt,c4 as Pkt,c5 as Bkt,c6 as Mkt,c7 as q7,c8 as xH,c9 as _kt,ca as yH,cb as bH,cc as wH,cd as Fde,ce as CH,cf as GS,cg as YS,ch as vH,ci as zkt,cj as Okt,ck as Q2e,cl as Fkt,cm as Rkt,cn as Nkt,co as Hnt,cp as Rde,cq as Vkt,cr as Qx,cs as G2e,ct as Hkt,cu as Ukt,cv as Wkt,cw as ub,cx as pb,cy as Unt,cz as Wnt,cA as Nde,cB as Qkt,cC as Qnt,cD as Gkt,cE as BF,cF as Gnt,cG as Ykt,cH as Ynt,cI as qkt,cJ as wE,cK as Y2e,cL as Kkt,cM as qnt,cN as Knt,cO as Znt,cP as Zkt,cQ as q2e,cR as Jkt,cS as Xkt,cT as Jnt,cU as eAt,cV as K2e,cW as _c,cX as Pl,cY as tAt,cZ as qS,c_ as t1,c$ as Xnt,d0 as nAt,d1 as tL,d2 as fy,d3 as za,d4 as oAt,d5 as iAt,d6 as rAt,d7 as FD,d8 as s0,d9 as aAt,da as lAt,db as sAt,dc as cAt,dd as RD,de as zy,df as SH,dg as dAt,dh as uAt,di as hb,dj as l1,dk as eot,dl as tot,dm as pAt,dn as hAt,dp as mAt,dq as F$,dr as gAt,ds as R1,dt as Oy,du as Vde,dv as not,dw as oot,dx as iot,dy as rot,dz as aot,dA as lot,dB as fAt,dC as Z2e,dD as xAt,_ as Ld,dE as Hde,dF as sot,dG as yAt,dH as J2e,dI as Sp,dJ as y5,dK as bAt,dL as wAt,dM as cot,dN as Dre,dO as fO,dP as CAt,dQ as vAt,dR as SAt,dS as $At,dT as kAt,dU as AAt,dV as jAt,dW as EAt,dX as IAt,dY as LAt,dZ as eI,d_ as tI,d$ as dot,e0 as Zp,e1 as TAt,e2 as Ude,e3 as Wde,e4 as R$,e5 as Qde,e6 as Gde,e7 as Yde,e8 as qde,e9 as uot,ea as Kde,eb as DAt,ec as PAt,ed as pot,ee as X2e,ef as BAt,eg as Zde,eh as MAt,ei as _At,ej as hot,ek as zAt,el as OAt,em as FAt,en as mot,eo as RAt,ep as got,eq as fot,er as NAt,es as VAt,et as HAt,eu as UAt,ev as WAt,ew as QAt,ex as GAt,ey as YAt,ez as xot,eA as qAt,eB as ege,eC as $H,eD as KAt,eE as ZAt,eF as JAt,eG as XAt,eH as ejt,eI as tjt,eJ as njt,eK as ojt,eL as tge,eM as yot,eN as bot,eO as wot,eP as Cot,eQ as vot,eR as Sot,eS as ijt,eT as rjt,eU as ajt,v as ljt,eV as sT,eW as X1,eX as $ot,eY as sjt,eZ as cjt,e_ as djt,e$ as ujt,f0 as Jde,f1 as cT,f2 as Xde,f3 as kot,f4 as pjt,f5 as hjt,f6 as mjt,f7 as Aot,f8 as nge,f9 as gjt,fa as jot,fb as fjt,fc as Eot,fd as xjt,fe as Iot,ff as yjt,fg as Lot,fh as bjt,fi as wjt,fj as Cjt,fk as vjt,fl as Sjt,fm as oge,fn as Tot,fo as xw,fp as ige,fq as $jt,fr as rge,fs as kjt,ft as Ajt,fu as Dot,fv as Pot,fw as jjt,fx as Ejt,fy as Ijt,fz as Ljt,fA as Tjt,fB as Djt,fC as MF,fD as e1e,fE as Bot,fF as Pjt,fG as nI,fH as Bjt,fI as Mjt,fJ as _jt,fK as zjt,fL as Ojt,fM as Fjt,fN as Rjt,fO as Njt,fP as Vjt,fQ as Mot,fR as Hjt,fS as Ujt,fT as age,fU as Wjt,fV as Qjt,fW as Gjt,fX as Yjt,fY as qjt,fZ as Kjt,f_ as Zjt,f$ as Jjt,g0 as Xjt,g1 as eEt,g2 as tEt,g3 as nEt,g4 as oEt,g5 as iEt,g6 as lge,g7 as rEt,g8 as aEt,g9 as lEt,ga as sEt,gb as cEt,gc as dEt,gd as _ot,ge as uEt,gf as pEt,gg as hEt,gh as sge,gi as mEt,gj as gEt,gk as fEt,gl as xEt,gm as yEt,gn as Pre,go as bEt,gp as wEt,gq as CEt,gr as vEt,gs as SEt,gt as $Et,gu as kEt,gv as AEt,gw as cge,gx as jEt,gy as EEt}from"./zeni-epic-state-BzDw8pi_.js";import{n as l,T as zot,G as dT,j as ei,c as Ee,k as Nn,C as Oot,u as t1e,a as Bre,A as IEt,b as LEt,I as TEt,d as DEt,D as _F,S as Fot}from"./mui-Da8iY16Z.js";import{r as PEt,m as Zh}from"./analytics-CkXhIYGA.js";import{u as xh}from"./plaid-kqYG7b9d.js";import{D as n1e,H as kH,g as BEt,O as MEt,S as _Et,T as zEt,u as o1e,a as i1e,b as OEt}from"./dnd-CWnSyq9-.js";import{l as FEt}from"./stripe-DMRn4zHo.js";import{L as dS}from"./lottie-zNHYqEBz.js";import{r as zs}from"./lexical-D7c0ykAW.js";import{D as Mre,P as _re,_ as Rot,a as Not}from"./pdf-BM7gJkYi.js";import{R as KS,G as p6,H as ap,X as es,Y as zl,I as Vc,J as REt,K as h6,L as mb,M as yh,N as N$,O as Vot,P as NEt,Q as VEt,S as AH,U as uS,V as HEt,W as r1e,Z as UEt,_ as WEt,$ as QEt,d as GEt}from"./recharts--v-RQjOV.js";import{r as YEt,n as dge}from"./utils-Dw1Jg_v9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b59f0313-cb5a-415b-99c6-439143cf5cee",e._sentryDebugIdIdentifier="sentry-dbid-b59f0313-cb5a-415b-99c6-439143cf5cee")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0})}function n(o){if(o.ep)return;o.ep=!0;const r=function(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}(o);fetch(o.href,r)}})();var uge,ND={},qEt=function(){if(uge)return ND;uge=1;var e=_nt();return ND.createRoot=e.createRoot,ND.hydrateRoot=e.hydrateRoot,ND}(),qu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Lre<"u"?Lre:typeof self<"u"?self:{};function zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pge,hge,mge={exports:{}},zk={};function Hot(){return hge||(hge=1,mge.exports=function(){if(pge)return zk;pge=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(d,u,p){var h,g={},f=null,x=null;for(h in p!==void 0&&(f=""+p),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(x=u.ref),u)r.call(u,h)&&!s.hasOwnProperty(h)&&(g[h]=u[h]);if(d&&d.defaultProps)for(h in u=d.defaultProps)g[h]===void 0&&(g[h]=u[h]);return{$$typeof:n,type:d,key:f,ref:x,props:g,_owner:a.current}}return zk.Fragment=o,zk.jsx=c,zk.jsxs=c,zk}()),mge.exports}var t=Hot();const KEt=m.createContext(null),aY={didCatch:!1,error:null};let ZEt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=aY}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState(aY)}}componentDidCatch(e,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;var a,s;o&&n.error!==null&&function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return c.length!==d.length||c.some((u,p)=>!Object.is(u,d[p]))}(e.resetKeys,r)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(aY))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:a,error:s}=this.state;let c=e;if(a){const d={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(o)c=m.createElement(o,d);else{if(r===void 0)throw s;c=r}}return m.createElement(KEt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var gge,lY={exports:{}},fge,xge,sY,JEt=(gge||(gge=1,xge=lY.exports,sY=function(){var e,n,o,r,a,s,c={},d={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function h(g,f){this._input=g,this._value=f}return e=function(g){var f,x,y,b;if(e.isNumeral(g))f=g.value();else if(g===0||typeof g>"u")f=0;else if(g===null||n.isNaN(g))f=null;else if(typeof g=="string")if(p.zeroFormat&&g===p.zeroFormat)f=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)f=null;else{for(x in c)if((b=typeof c[x].regexps.unformat=="function"?c[x].regexps.unformat():c[x].regexps.unformat)&&g.match(b)){y=c[x].unformat;break}f=(y=y||e._.stringToNumber)(g)}else f=Number(g)||null;return new h(g,f)},e.version="2.0.6",e.isNumeral=function(g){return g instanceof h},e._=n={numberToFormat:function(g,f,x){var y,b,w,C,v,S,k,j,A=d[e.options.currentLocale],E=!1,I=!1,L="",z=1e12,M=1e9,_=1e6,U="",R=!1;if(g=g||0,w=Math.abs(g),e._.includes(f,"(")?(E=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(S=e._.includes(f,"+")?f.indexOf("+"):g<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(b=!!(b=f.match(/a(k|m|b|t)?/))&&b[1],e._.includes(f," a")&&(L=" "),f=f.replace(new RegExp(L+"a[kmbt]?"),""),w>=z&&!b||b==="t"?(L+=A.abbreviations.trillion,g/=z):w<z&&w>=M&&!b||b==="b"?(L+=A.abbreviations.billion,g/=M):w<M&&w>=_&&!b||b==="m"?(L+=A.abbreviations.million,g/=_):(w<_&&w>=1e3&&!b||b==="k")&&(L+=A.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(I=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],k=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),U=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):U=e._.toFixed(g,v.length,x),C=U.split(".")[0],U=e._.includes(U,".")?A.delimiters.decimal+U.split(".")[1]:"",I&&Number(U.slice(1))===0&&(U="")):C=e._.toFixed(g,0,x),L&&!b&&Number(C)>=1e3&&L!==A.abbreviations.trillion)switch(C=String(Number(C)/1e3),L){case A.abbreviations.thousand:L=A.abbreviations.million;break;case A.abbreviations.million:L=A.abbreviations.billion;break;case A.abbreviations.billion:L=A.abbreviations.trillion}if(e._.includes(C,"-")&&(C=C.slice(1),R=!0),C.length<y)for(var O=y-C.length;O>0;O--)C="0"+C;return k>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+A.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+U+(L||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):S>=0?j=S===0?(R?"-":"+")+j:j+(R?"-":"+"):R&&(j="-"+j),j},stringToNumber:function(g){var f,x,y,b=d[p.currentLocale],w=g,C={thousand:3,million:6,billion:9,trillion:12};if(p.zeroFormat&&g===p.zeroFormat)x=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)x=null;else{for(f in x=1,b.delimiters.decimal!=="."&&(g=g.replace(/\./g,"").replace(b.delimiters.decimal,".")),C)if(y=new RegExp("[^a-zA-Z]"+b.abbreviations[f]+"(?:\\)|(\\"+b.currency.symbol+")?(?:\\))?)?$"),w.match(y)){x*=Math.pow(10,C[f]);break}x*=(g.split("-").length+Math.min(g.split("(").length-1,g.split(")").length-1))%2?1:-1,g=g.replace(/[^0-9\.]+/g,""),x*=Number(g)}return x},isNaN:function(g){return typeof g=="number"&&isNaN(g)},includes:function(g,f){return g.indexOf(f)!==-1},insert:function(g,f,x){return g.slice(0,x)+f+g.slice(x)},reduce:function(g,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var x,y=Object(g),b=y.length>>>0,w=0;if(arguments.length===3)x=arguments[2];else{for(;w<b&&!(w in y);)w++;if(w>=b)throw new TypeError("Reduce of empty array with no initial value");x=y[w++]}for(;w<b;w++)w in y&&(x=f(x,y[w],w,y));return x},multiplier:function(g){var f=g.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(g,f){var x=n.multiplier(f);return g>x?g:x},1)},toFixed:function(g,f,x,y){var b,w,C,v,S=g.toString().split("."),k=f-(y||0);return b=S.length===2?Math.min(Math.max(S[1].length,k),f):k,C=Math.pow(10,b),v=(x(g+"e+"+b)/C).toFixed(b),y>f-b&&(w=new RegExp("\\.?0{1,"+(y-(f-b))+"}$"),v=v.replace(w,"")),v}},e.options=p,e.formats=c,e.locales=d,e.locale=function(g){return g&&(p.currentLocale=g.toLowerCase()),p.currentLocale},e.localeData=function(g){if(!g)return d[p.currentLocale];if(g=g.toLowerCase(),!d[g])throw new Error("Unknown locale : "+g);return d[g]},e.reset=function(){for(var g in u)p[g]=u[g]},e.zeroFormat=function(g){p.zeroFormat=typeof g=="string"?g:null},e.nullFormat=function(g){p.nullFormat=typeof g=="string"?g:null},e.defaultFormat=function(g){p.defaultFormat=typeof g=="string"?g:"0.0"},e.register=function(g,f,x){if(f=f.toLowerCase(),this[g+"s"][f])throw new TypeError(f+" "+g+" already registered.");return this[g+"s"][f]=x,x},e.validate=function(g,f){var x,y,b,w,C,v,S,k;if(typeof g!="string"&&(g+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",g)),(g=g.trim()).match(/^\d+$/))return!0;if(g==="")return!1;try{S=e.localeData(f)}catch{S=e.localeData(e.locale())}return b=S.currency.symbol,C=S.abbreviations,x=S.delimiters.decimal,y=S.delimiters.thousands==="."?"\\.":S.delimiters.thousands,!((k=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),k[0]!==b)||(k=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),k[0]!==C.thousand&&k[0]!==C.million&&k[0]!==C.billion&&k[0]!==C.trillion)||(v=new RegExp(y+"{2}"),g.match(/[^\d.,]/g)||(w=g.split(x)).length>2||(w.length<2?!w[0].match(/^\d+.*\d$/)||w[0].match(v):w[0].length===1?!w[0].match(/^\d+$/)||w[0].match(v)||!w[1].match(/^\d+$/):!w[0].match(/^\d+.*\d$/)||w[0].match(v)||!w[1].match(/^\d+$/))))},e.fn=h.prototype={clone:function(){return e(this)},format:function(g,f){var x,y,b,w=this._value,C=g||p.defaultFormat;if(f=f||Math.round,w===0&&p.zeroFormat!==null)y=p.zeroFormat;else if(w===null&&p.nullFormat!==null)y=p.nullFormat;else{for(x in c)if(C.match(c[x].regexps.format)){b=c[x].format;break}y=(b=b||e._.numberToFormat)(w,C,f)}return y},value:function(){return this._value},input:function(){return this._input},set:function(g){return this._value=Number(g),this},add:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([this._value,g],function(x,y,b,w){return x+Math.round(f*y)},0)/f,this},subtract:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([g],function(x,y,b,w){return x-Math.round(f*y)},Math.round(this._value*f))/f,this},multiply:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)*Math.round(x*w)/Math.round(w*w)},1),this},divide:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)/Math.round(x*w)}),this},difference:function(g){return Math.abs(e(this._value).subtract(g).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(g){var f=g%10;return~~(g%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(g,f,x){var y,b=e._.includes(f," BPS")?" ":"";return g*=1e4,f=f.replace(/\s?BPS/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"BPS"),y=y.join("")):y=y+b+"BPS",y},unformat:function(g){return+(1e-4*e._.stringToNumber(g)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},a=(o={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(g){return o.suffixes.indexOf(g)<0})),s="("+(s=a.join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(g,f,x){var y,b,w,C=e._.includes(f,"ib")?r:o,v=e._.includes(f," b")||e._.includes(f," ib")?" ":"";for(f=f.replace(/\s?i?b/,""),y=0;y<=C.suffixes.length;y++)if(b=Math.pow(C.base,y),w=Math.pow(C.base,y+1),g===null||g===0||g>=b&&g<w){v+=C.suffixes[y],b>0&&(g/=b);break}return e._.numberToFormat(g,f,x)+v},unformat:function(g){var f,x,y=e._.stringToNumber(g);if(y){for(f=o.suffixes.length-1;f>=0;f--){if(e._.includes(g,o.suffixes[f])){x=Math.pow(o.base,f);break}if(e._.includes(g,r.suffixes[f])){x=Math.pow(r.base,f);break}}y*=x||1}return y}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(g,f,x){var y,b,w,C=e.locales[e.options.currentLocale],v={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(f=f.replace(/\s?\$\s?/,""),y=e._.numberToFormat(g,f,x),g>=0?(v.before=v.before.replace(/[\-\(]/,""),v.after=v.after.replace(/[\-\)]/,"")):g<0&&!e._.includes(v.before,"-")&&!e._.includes(v.before,"(")&&(v.before="-"+v.before),w=0;w<v.before.length;w++)switch(b=v.before[w],b){case"$":y=e._.insert(y,C.currency.symbol,w);break;case" ":y=e._.insert(y," ",w+C.currency.symbol.length-1)}for(w=v.after.length-1;w>=0;w--)switch(b=v.after[w],b){case"$":y=w===v.after.length-1?y+C.currency.symbol:e._.insert(y,C.currency.symbol,-(v.after.length-(1+w)));break;case" ":y=w===v.after.length-1?y+" ":e._.insert(y," ",-(v.after.length-(1+w)+C.currency.symbol.length-1))}return y}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(g,f,x){var y=(typeof g!="number"||e._.isNaN(g)?"0e+0":g.toExponential()).split("e");return f=f.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(y[0]),f,x)+"e"+y[1]},unformat:function(g){var f=e._.includes(g,"e+")?g.split("e+"):g.split("e-"),x=Number(f[0]),y=Number(f[1]);return y=e._.includes(g,"e-")?y*=-1:y,e._.reduce([x,Math.pow(10,y)],function(b,w,C,v){var S=e._.correctionFactor(b,w);return b*S*(w*S)/(S*S)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(g,f,x){var y=e.locales[e.options.currentLocale],b=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),b+=y.ordinal(g),e._.numberToFormat(g,f,x)+b}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(g,f,x){var y,b=e._.includes(f," %")?" ":"";return e.options.scalePercentBy100&&(g*=100),f=f.replace(/\s?\%/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"%"),y=y.join("")):y=y+b+"%",y},unformat:function(g){var f=e._.stringToNumber(g);return e.options.scalePercentBy100?.01*f:f}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(g,f,x){var y=Math.floor(g/60/60),b=Math.floor((g-60*y*60)/60),w=Math.round(g-60*y*60-60*b);return y+":"+(b<10?"0"+b:b)+":"+(w<10?"0"+w:w)},unformat:function(g){var f=g.split(":"),x=0;return f.length===3?(x+=60*Number(f[0])*60,x+=60*Number(f[1]),x+=Number(f[2])):f.length===2&&(x+=60*Number(f[0]),x+=Number(f[1])),Number(x)}}),e},(fge=lY).exports?fge.exports=sY():xge.numeral=sY()),lY.exports);const k5=zi(JEt);function _5(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(r=>o.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${o} for the full message.`}const A5="$$material";var XEt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function eIt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var tIt=/[A-Z]|^ms/g,nIt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Uot=function(e){return e.charCodeAt(1)===45},yge=function(e){return e!=null&&typeof e!="boolean"},cY=eIt(function(e){return Uot(e)?e:e.replace(tIt,"-$&").toLowerCase()}),bge=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(nIt,function(o,r,a){return T7={name:r,styles:a,next:T7},r})}return XEt[e]===1||Uot(e)||typeof n!="number"||n===0?n:n+"px"};function zF(e,n,o){if(o==null)return"";var r=o;if(r.__emotion_styles!==void 0)return r;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return T7={name:a.name,styles:a.styles,next:T7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)T7={name:c.name,styles:c.styles,next:T7},c=c.next;return s.styles+";"}return function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=zF(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;yge(y)&&(h+=cY(f)+":"+bge(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)yge(x[b])&&(h+=cY(f)+":"+bge(f,x[b])+";");else{var w=zF(d,u,x);switch(f){case"animation":case"animationName":h+=cY(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var T7,wge=/label:\s*([^\s;{]+)\s*(;|$)/g,Cge,vge,Sge,$ge,kge,Age={exports:{}};function oIt(){return vge?Cge:(vge=1,Cge="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function iIt(){if($ge)return Sge;$ge=1;var e=oIt();function n(){}function o(){}return o.resetWarningCache=n,Sge=function(){function r(c,d,u,p,h,g){if(g!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function a(){return r}r.isRequired=r;var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function a1e(){return kge||(kge=1,Age.exports=iIt()()),Age.exports}const Sn=zi(a1e());var rIt=function(){function e(o){var r=this;this._insertTag=function(a){var s;s=r.tags.length===0?r.insertionPoint?r.insertionPoint.nextSibling:r.prepend?r.container.firstChild:r.before:r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=o.speedy===void 0||o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(o){o.forEach(this._insertTag)},n.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(s){var c=document.createElement("style");return c.setAttribute("data-emotion",s.key),s.nonce!==void 0&&c.setAttribute("nonce",s.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(s){if(s.sheet)return s.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===s)return document.styleSheets[c]}(r);try{a.insertRule(o,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e}(),qd="-ms-",jge="-moz-",Jr="-webkit-",Wot="comm",l1e="rule",s1e="decl",Qot="@keyframes",aIt=Math.abs,jH=String.fromCharCode,lIt=Object.assign;function Got(e){return e.trim()}function Xr(e,n,o){return e.replace(n,o)}function zre(e,n){return e.indexOf(n)}function pd(e,n){return 0|e.charCodeAt(n)}function nL(e,n,o){return e.slice(n,o)}function Ug(e){return e.length}function c1e(e){return e.length}function VD(e,n){return n.push(e),e}var EH=1,ZS=1,Yot=0,lp=0,Ds=0,V$="";function IH(e,n,o,r,a,s,c){return{value:e,root:n,parent:o,type:r,props:a,children:s,line:EH,column:ZS,length:c,return:""}}function Ok(e,n){return lIt(IH("",null,null,"",null,null,0),e,{length:-e.length},n)}function nh(){return Ds=lp<Yot?pd(V$,lp++):0,ZS++,Ds===10&&(ZS=1,EH++),Ds}function w3(){return pd(V$,lp)}function xO(){return lp}function uT(e,n){return nL(V$,e,n)}function oL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qot(e){return EH=ZS=1,Yot=Ug(V$=e),lp=0,[]}function Kot(e){return V$="",e}function yO(e){return Got(uT(lp-1,Ore(e===91?e+2:e===40?e+1:e)))}function sIt(e){for(;(Ds=w3())&&Ds<33;)nh();return oL(e)>2||oL(Ds)>3?"":" "}function cIt(e,n){for(;--n&&nh()&&!(Ds<48||Ds>102||Ds>57&&Ds<65||Ds>70&&Ds<97););return uT(e,xO()+(n<6&&w3()==32&&nh()==32))}function Ore(e){for(;nh();)switch(Ds){case e:return lp;case 34:case 39:e!==34&&e!==39&&Ore(Ds);break;case 40:e===41&&Ore(e);break;case 92:nh()}return lp}function dIt(e,n){for(;nh()&&e+Ds!==57&&(e+Ds!==84||w3()!==47););return"/*"+uT(n,lp-1)+"*"+jH(e===47?e:nh())}function uIt(e){for(;!oL(w3());)nh();return uT(e,lp)}function pIt(e){return Kot(bO("",null,null,null,[""],e=qot(e),0,[0],e))}function bO(e,n,o,r,a,s,c,d,u){for(var p=0,h=0,g=c,f=0,x=0,y=0,b=1,w=1,C=1,v=0,S="",k=a,j=s,A=r,E=S;w;)switch(y=v,v=nh()){case 40:if(y!=108&&pd(E,g-1)==58){zre(E+=Xr(yO(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=yO(v);break;case 9:case 10:case 13:case 32:E+=sIt(y);break;case 92:E+=cIt(xO()-1,7);continue;case 47:switch(w3()){case 42:case 47:VD(hIt(dIt(nh(),xO()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=Ug(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=Xr(E,/\f/g,"")),x>0&&Ug(E)-g&&VD(x>32?Ige(E+";",r,o,g-1):Ige(Xr(E," ","")+";",r,o,g-2),u);break;case 59:E+=";";default:if(VD(A=Ege(E,n,o,p,h,a,d,S,k=[],j=[],g),s),v===123)if(h===0)bO(E,n,A,A,k,s,g,d,j);else switch(f===99&&pd(E,3)===110?100:f){case 100:case 108:case 109:case 115:bO(e,A,A,r&&VD(Ege(e,A,A,0,0,a,d,S,a,k=[],g),j),a,j,g,d,r?k:j);break;default:bO(E,A,A,A,[""],j,0,d,j)}}p=h=x=0,b=C=1,S=E="",g=c;break;case 58:g=1+Ug(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Ds=lp>0?pd(V$,--lp):0,ZS--,Ds===10&&(ZS=1,EH--),Ds==125))continue}switch(E+=jH(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(Ug(E)-1)*C,C=1;break;case 64:w3()===45&&(E+=yO(nh())),f=w3(),h=g=Ug(S=E+=uIt(xO())),v++;break;case 45:y===45&&Ug(E)==2&&(b=0)}}return s}function Ege(e,n,o,r,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=c1e(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=nL(e,g+1,g=aIt(b=c[y])),S=e;C<x;++C)(S=Got(b>0?f[C]+" "+v:Xr(v,/&\f/g,f[C])))&&(u[w++]=S);return IH(e,n,o,a===0?l1e:d,u,p,h)}function hIt(e,n,o){return IH(e,n,o,Wot,jH(Ds),nL(e,2,-2),0)}function Ige(e,n,o,r){return IH(e,n,o,s1e,nL(e,0,r),nL(e,r+1,-1),r)}function pS(e,n){for(var o="",r=c1e(e),a=0;a<r;a++)o+=n(e[a],a,e,n)||"";return o}function mIt(e,n,o,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case s1e:return e.return=e.return||e.value;case Wot:return"";case Qot:return e.return=e.value+"{"+pS(e.children,r)+"}";case l1e:e.value=e.props.join(",")}return Ug(o=pS(e.children,r))?e.return=e.value+"{"+o+"}":""}function gIt(e){return function(n){n.root||(n=n.return)&&e(n)}}var fIt=function(e,n,o){for(var r=0,a=0;r=a,a=w3(),r===38&&a===12&&(n[o]=1),!oL(a);)nh();return uT(e,lp)},xIt=function(e,n){return Kot(function(o,r){var a=-1,s=44;do switch(oL(s)){case 0:s===38&&w3()===12&&(r[a]=1),o[a]+=fIt(lp-1,r,a);break;case 2:o[a]+=yO(s);break;case 4:if(s===44){o[++a]=w3()===58?"&\f":"",r[a]=o[a].length;break}default:o[a]+=jH(s)}while(s=nh());return o}(qot(e),n))},Lge=new WeakMap,yIt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,r=e.column===o.column&&e.line===o.line;o.type!=="rule";)if(!(o=o.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||Lge.get(o))&&!r){Lge.set(e,!0);for(var a=[],s=xIt(n,a),c=o.props,d=0,u=0;d<s.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=a[d]?s[d].replace(/&\f/g,c[p]):c[p]+" "+s[d]}}},bIt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Zot(e,n){switch(function(o,r){return 45^pd(o,0)?(((r<<2^pd(o,0))<<2^pd(o,1))<<2^pd(o,2))<<2^pd(o,3):0}(e,n)){case 5103:return Jr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Jr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Jr+e+jge+e+qd+e+e;case 6828:case 4268:return Jr+e+qd+e+e;case 6165:return Jr+e+qd+"flex-"+e+e;case 5187:return Jr+e+Xr(e,/(\w+).+(:[^]+)/,Jr+"box-$1$2"+qd+"flex-$1$2")+e;case 5443:return Jr+e+qd+"flex-item-"+Xr(e,/flex-|-self/,"")+e;case 4675:return Jr+e+qd+"flex-line-pack"+Xr(e,/align-content|flex-|-self/,"")+e;case 5548:return Jr+e+qd+Xr(e,"shrink","negative")+e;case 5292:return Jr+e+qd+Xr(e,"basis","preferred-size")+e;case 6060:return Jr+"box-"+Xr(e,"-grow","")+Jr+e+qd+Xr(e,"grow","positive")+e;case 4554:return Jr+Xr(e,/([^-])(transform)/g,"$1"+Jr+"$2")+e;case 6187:return Xr(Xr(Xr(e,/(zoom-|grab)/,Jr+"$1"),/(image-set)/,Jr+"$1"),e,"")+e;case 5495:case 3959:return Xr(e,/(image-set\([^]*)/,Jr+"$1$`$1");case 4968:return Xr(Xr(e,/(.+:)(flex-)?(.*)/,Jr+"box-pack:$3"+qd+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Jr+e+e;case 4095:case 3583:case 4068:case 2532:return Xr(e,/(.+)-inline(.+)/,Jr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ug(e)-1-n>6)switch(pd(e,n+1)){case 109:if(pd(e,n+4)!==45)break;case 102:return Xr(e,/(.+:)(.+)-([^]+)/,"$1"+Jr+"$2-$3$1"+jge+(pd(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~zre(e,"stretch")?Zot(Xr(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(pd(e,n+1)!==115)break;case 6444:switch(pd(e,Ug(e)-3-(~zre(e,"!important")&&10))){case 107:return Xr(e,":",":"+Jr)+e;case 101:return Xr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Jr+(pd(e,14)===45?"inline-":"")+"box$3$1"+Jr+"$2$3$1"+qd+"$2box$3")+e}break;case 5936:switch(pd(e,n+11)){case 114:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Jr+e+qd+Xr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Jr+e+qd+e+e}return e}var wIt=[function(e,n,o,r){if(e.length>-1&&!e.return)switch(e.type){case s1e:e.return=Zot(e.value,e.length);break;case Qot:return pS([Ok(e,{value:Xr(e.value,"@","@"+Jr)})],r);case l1e:if(e.length)return function(a,s){return a.map(s).join("")}(e.props,function(a){switch(function(s,c){return(s=c.exec(s))?s[0]:s}(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pS([Ok(e,{props:[Xr(a,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return pS([Ok(e,{props:[Xr(a,/:(plac\w+)/,":"+Jr+"input-$1")]}),Ok(e,{props:[Xr(a,/:(plac\w+)/,":-moz-$1")]}),Ok(e,{props:[Xr(a,/:(plac\w+)/,qd+"input-$1")]})],r)}return""})}}],Jot=function(e){var n=e.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var r,a=e.stylisPlugins||wIt,s={},c=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)s[y[b]]=!0;c.push(x)});var d,u,p=[yIt,bIt],h=[mIt,gIt(function(x){u.insert(x)})],g=function(x){var y=c1e(x);return function(b,w,C,v){for(var S="",k=0;k<y;k++)S+=x[k](b,w,C,v)||"";return S}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){pS(pIt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new rIt({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:d};return f.sheet.hydrate(c),f};function Xot(e){const{styles:n,defaultTheme:o={}}=e,r=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(dT,{styles:r})}const Tge=[];function K7(e){return Tge[0]=e,function(n,o,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";T7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=zF(r,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=zF(r,o,n[d]),a&&(s+=c[d]);wge.lastIndex=0;for(var u,p="";(u=wge.exec(s))!==null;)p+="-"+u[1];var h=function(g){for(var f,x=0,y=0,b=g.length;b>=4;++y,b-=4)f=1540483477*(65535&(f=255&g.charCodeAt(y)|(255&g.charCodeAt(++y))<<8|(255&g.charCodeAt(++y))<<16|(255&g.charCodeAt(++y))<<24))+(59797*(f>>>16)<<16),x=1540483477*(65535&(f^=f>>>24))+(59797*(f>>>16)<<16)^1540483477*(65535&x)+(59797*(x>>>16)<<16);switch(b){case 3:x^=(255&g.charCodeAt(y+2))<<16;case 2:x^=(255&g.charCodeAt(y+1))<<8;case 1:x=1540483477*(65535&(x^=255&g.charCodeAt(y)))+(59797*(x>>>16)<<16)}return(((x=1540483477*(65535&(x^=x>>>13))+(59797*(x>>>16)<<16))^x>>>15)>>>0).toString(36)}(s)+p;return{name:h,styles:s,next:T7}}(Tge)}var Dge,Pge,Bge={exports:{}},ja={};function CIt(){if(Dge)return ja;Dge=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type){case o:case a:case r:case u:case p:case f:return b;default:switch(b=b&&b.$$typeof){case c:case d:case g:case h:case s:return b;default:return w}}case n:return w}}}return ja.ContextConsumer=s,ja.ContextProvider=c,ja.Element=e,ja.ForwardRef=d,ja.Fragment=o,ja.Lazy=g,ja.Memo=h,ja.Portal=n,ja.Profiler=a,ja.StrictMode=r,ja.Suspense=u,ja.SuspenseList=p,ja.isContextConsumer=function(b){return y(b)===s},ja.isContextProvider=function(b){return y(b)===c},ja.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ja.isForwardRef=function(b){return y(b)===d},ja.isFragment=function(b){return y(b)===o},ja.isLazy=function(b){return y(b)===g},ja.isMemo=function(b){return y(b)===h},ja.isPortal=function(b){return y(b)===n},ja.isProfiler=function(b){return y(b)===a},ja.isStrictMode=function(b){return y(b)===r},ja.isSuspense=function(b){return y(b)===u},ja.isSuspenseList=function(b){return y(b)===p},ja.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===s||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},ja.typeOf=y,ja}function vIt(){return Pge||(Pge=1,Bge.exports=CIt()),Bge.exports}var eit=vIt();function a5(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return!(n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function tit(e){if(m.isValidElement(e)||eit.isValidElementType(e)||!a5(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=tit(e[o])}),n}function s1(e,n,o={clone:!0}){const r=o.clone?{...e}:e;return a5(e)&&a5(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||eit.isValidElementType(n[a])?r[a]=n[a]:a5(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&a5(e[a])?r[a]=s1(e[a],n[a],o):o.clone?r[a]=a5(n[a])?tit(n[a]):n[a]:r[a]=n[a]}),r}function SIt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:r=5,...a}=e,s=(h=>{const g=Object.keys(h).map(f=>({key:f,val:h[f]}))||[];return g.sort((f,x)=>f.val-x.val),g.reduce((f,x)=>({...f,[x.key]:x.val}),{})})(n),c=Object.keys(s);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${o})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${o})`}return{keys:c,values:s,up:d,down:u,between:p,only:function(h){return c.indexOf(h)+1<c.length?p(h,c[c.indexOf(h)+1]):d(h)},not:function(h){const g=c.indexOf(h);return g===0?d(c[1]):g===c.length-1?u(c[g]):p(h,c[c.indexOf(h)+1]).replace("@media","@media not all and")},unit:o,...a}}function Mge(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((r,a)=>{const s=n[a];return delete r[a],r[a]=s,r},{...n}):n}const $It={borderRadius:4};function oI(e,n){return n?s1(e,n,{clone:!1}):e}const LH={xs:0,sm:600,md:900,lg:1200,xl:1536},_ge={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${LH[e]}px)`},kIt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:LH[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function z5(e,n,o){const r=e.theme||{};if(Array.isArray(n)){const a=r.breakpoints||_ge;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=r.breakpoints||_ge;return Object.keys(n).reduce((s,c)=>{if(function(d,u){return u==="@"||u.startsWith("@")&&(d.some(p=>u.startsWith(`@${p}`))||!!u.match(/^@\d/))}(a.keys,c)){const d=function(u,p){const h=p.match(/^@([^/]+)?\/?(.+)?$/);if(!h)return null;const[,g,f]=h,x=Number.isNaN(+g)?g||0:+g;return u.containerQueries(f).up(x)}(r.containerQueries?r:kIt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||LH).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function zge(e,n){return e.reduce((o,r)=>{const a=o[r];return(!a||Object.keys(a).length===0)&&delete o[r],o},n)}function ki(e){if(typeof e!="string")throw new Error(_5(7));return e.charAt(0).toUpperCase()+e.slice(1)}function TH(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const r=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return n.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function OF(e,n,o,r=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||r:TH(e,o)||r,n&&(a=n(a,r,e)),a}function ds(e){const{prop:n,cssProperty:o=e.prop,themeKey:r,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=TH(c.theme,r)||{};return z5(c,d,p=>{let h=OF(u,a,p);return p===h&&typeof p=="string"&&(h=OF(u,a,`${n}${p==="default"?"":ki(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const AIt={m:"margin",p:"padding"},jIt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Oge={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},EIt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!Oge[e])return[e];e=Oge[e]}const[n,o]=e.split(""),r=AIt[n],a=jIt[o]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),nit=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oit=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function pT(e,n,o,r){const a=TH(e,n,!0)??o;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const c=Math.abs(s),d=a[c];return s>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof a=="function"?a:()=>{}}function d1e(e){return pT(e,"spacing",8)}function hT(e,n){return typeof n=="string"||n==null?n:e(n)}function IIt(e,n,o,r){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=hT(c,d),u),{})}(EIt(o),r);return z5(e,e[o],a)}function iit(e,n){const o=d1e(e.theme);return Object.keys(e).map(r=>IIt(e,n,r,o)).reduce(oI,{})}function Hl(e){return iit(e,nit)}function Ul(e){return iit(e,oit)}function rit(e=8,n=d1e({spacing:e})){if(e.mui)return e;const o=(...r)=>(r.length===0?[1]:r).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function DH(...e){const n=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),o=r=>Object.keys(r).reduce((a,s)=>n[s]?oI(a,n[s](r)):a,{});return o.propTypes={},o.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),o}function c0(e){return typeof e!="number"?e:`${e}px solid`}function O0(e,n){return ds({prop:e,themeKey:"borders",transform:n})}Hl.propTypes={},Hl.filterProps=nit,Ul.propTypes={},Ul.filterProps=oit;const LIt=O0("border",c0),TIt=O0("borderTop",c0),DIt=O0("borderRight",c0),PIt=O0("borderBottom",c0),BIt=O0("borderLeft",c0),MIt=O0("borderColor"),_It=O0("borderTopColor"),zIt=O0("borderRightColor"),OIt=O0("borderBottomColor"),FIt=O0("borderLeftColor"),RIt=O0("outline",c0),NIt=O0("outlineColor"),wO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=pT(e.theme,"shape.borderRadius",4),o=r=>({borderRadius:hT(n,r)});return z5(e,e.borderRadius,o)}return null};wO.propTypes={},wO.filterProps=["borderRadius"],DH(LIt,TIt,DIt,PIt,BIt,MIt,_It,zIt,OIt,FIt,wO,RIt,NIt);const FF=e=>{if(e.gap!==void 0&&e.gap!==null){const n=pT(e.theme,"spacing",8),o=r=>({gap:hT(n,r)});return z5(e,e.gap,o)}return null};FF.propTypes={},FF.filterProps=["gap"];const RF=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=pT(e.theme,"spacing",8),o=r=>({columnGap:hT(n,r)});return z5(e,e.columnGap,o)}return null};RF.propTypes={},RF.filterProps=["columnGap"];const NF=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=pT(e.theme,"spacing",8),o=r=>({rowGap:hT(n,r)});return z5(e,e.rowGap,o)}return null};NF.propTypes={},NF.filterProps=["rowGap"];function hS(e,n){return n==="grey"?n:e}DH(FF,RF,NF,ds({prop:"gridColumn"}),ds({prop:"gridRow"}),ds({prop:"gridAutoFlow"}),ds({prop:"gridAutoColumns"}),ds({prop:"gridAutoRows"}),ds({prop:"gridTemplateColumns"}),ds({prop:"gridTemplateRows"}),ds({prop:"gridTemplateAreas"}),ds({prop:"gridArea"}));function Yp(e){return e<=1&&e!==0?100*e+"%":e}DH(ds({prop:"color",themeKey:"palette",transform:hS}),ds({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hS}),ds({prop:"backgroundColor",themeKey:"palette",transform:hS}));const VIt=ds({prop:"width",transform:Yp}),u1e=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const r=e.theme?.breakpoints?.values?.[o]||LH[o];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Yp(o)}};return z5(e,e.maxWidth,n)}return null};u1e.filterProps=["maxWidth"];const HIt=ds({prop:"minWidth",transform:Yp}),UIt=ds({prop:"height",transform:Yp}),WIt=ds({prop:"maxHeight",transform:Yp}),QIt=ds({prop:"minHeight",transform:Yp});ds({prop:"size",cssProperty:"width",transform:Yp}),ds({prop:"size",cssProperty:"height",transform:Yp});DH(VIt,u1e,HIt,UIt,WIt,QIt,ds({prop:"boxSizing"}));const PH={border:{themeKey:"borders",transform:c0},borderTop:{themeKey:"borders",transform:c0},borderRight:{themeKey:"borders",transform:c0},borderBottom:{themeKey:"borders",transform:c0},borderLeft:{themeKey:"borders",transform:c0},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:c0},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:wO},color:{themeKey:"palette",transform:hS},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hS},backgroundColor:{themeKey:"palette",transform:hS},p:{style:Ul},pt:{style:Ul},pr:{style:Ul},pb:{style:Ul},pl:{style:Ul},px:{style:Ul},py:{style:Ul},padding:{style:Ul},paddingTop:{style:Ul},paddingRight:{style:Ul},paddingBottom:{style:Ul},paddingLeft:{style:Ul},paddingX:{style:Ul},paddingY:{style:Ul},paddingInline:{style:Ul},paddingInlineStart:{style:Ul},paddingInlineEnd:{style:Ul},paddingBlock:{style:Ul},paddingBlockStart:{style:Ul},paddingBlockEnd:{style:Ul},m:{style:Hl},mt:{style:Hl},mr:{style:Hl},mb:{style:Hl},ml:{style:Hl},mx:{style:Hl},my:{style:Hl},margin:{style:Hl},marginTop:{style:Hl},marginRight:{style:Hl},marginBottom:{style:Hl},marginLeft:{style:Hl},marginX:{style:Hl},marginY:{style:Hl},marginInline:{style:Hl},marginInlineStart:{style:Hl},marginInlineEnd:{style:Hl},marginBlock:{style:Hl},marginBlockStart:{style:Hl},marginBlockEnd:{style:Hl},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:FF},rowGap:{style:NF},columnGap:{style:RF},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Yp},maxWidth:{style:u1e},minWidth:{transform:Yp},height:{transform:Yp},maxHeight:{transform:Yp},minHeight:{transform:Yp},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Fy=function(){function e(n,o,r,a){const s={[n]:o,theme:r},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const g=TH(r,u)||{};return h?h(s):z5(s,o,f=>{let x=OF(g,p,f);return f===x&&typeof f=="string"&&(x=OF(g,p,`${n}${f==="default"?"":ki(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:r,theme:a={},nested:s}=o||{};if(!r)return null;const c=a.unstable_sxConfig??PH;function d(u){let p=u;if(typeof u=="function")p=u(a);else if(typeof u!="object")return u;if(!p)return null;const h=function(x={}){return x.keys?.reduce((y,b)=>(y[x.up(b)]={},y),{})||{}}(a.breakpoints),g=Object.keys(h);let f=h;return Object.keys(p).forEach(x=>{const y=function(b,w){return typeof b=="function"?b(w):b}(p[x],a);if(y!=null)if(typeof y=="object")if(c[x])f=oI(f,e(x,y,a,c));else{const b=z5({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((S,k)=>S.concat(Object.keys(k)),[]),v=new Set(C);return w.every(S=>v.size===Object.keys(S).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=oI(f,b)}else f=oI(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":Mge(a,zge(g,f))}:Mge(a,zge(g,f))}return Array.isArray(r)?r.map(d):d(r)}}();function GIt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let r=o.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return o.palette.mode===e?n:{}}function p1e(e={},...n){const{breakpoints:o={},palette:r={},spacing:a,shape:s={},...c}=e;let d=s1({breakpoints:SIt(o),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:rit(a),shape:{...$It,...s}},c);return d=function(u){const p=(x,y)=>x.replace("@media",y?`@container ${y}`:"@container");function h(x,y){x.up=(...b)=>p(u.breakpoints.up(...b),y),x.down=(...b)=>p(u.breakpoints.down(...b),y),x.between=(...b)=>p(u.breakpoints.between(...b),y),x.only=(...b)=>p(u.breakpoints.only(...b),y),x.not=(...b)=>{const w=p(u.breakpoints.not(...b),y);return w.includes("not all and")?w.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):w}}const g={},f=x=>(h(g,x),g);return h(f),{...u,containerQueries:f}}(d),d.applyStyles=GIt,d=n.reduce((u,p)=>s1(u,p),d),d.unstable_sxConfig={...PH,...c?.unstable_sxConfig},d.unstable_sx=function(u){return Fy({sx:u,theme:this})},d}function Fre(e=null){const n=m.useContext(zot);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}Fy.filterProps=["sx"];const YIt=p1e();function ait(e=YIt){return Fre(e)}function Fge(e){const n=K7(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function lit({styles:e,themeId:n,defaultTheme:o={}}){const r=ait(o),a=n&&r[n]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>Fge(typeof c=="function"?c(a):c)):Fge(s)),t.jsx(Xot,{styles:s})}const Rge=e=>e,qIt=(()=>{let e=Rge;return{configure(n){e=n},generate:n=>e(n),reset(){e=Rge}}})();function sit(e){var n,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=sit(e[n]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ji(){for(var e,n,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=sit(e))&&(r&&(r+=" "),r+=n);return r}const KIt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function na(e,n,o="Mui"){const r=KIt[n];return r?`${o}-${r}`:`${qIt.generate(e)}-${n}`}function Mr(e,n,o="Mui"){const r={};return n.forEach(a=>{r[a]=na(e,a,o)}),r}function cit(e){const{variants:n,...o}=e,r={variants:n,style:K7(o),isProcessed:!0};return r.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=K7(a.style))}),r}const ZIt=p1e();function dY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function V8(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function JIt(e){return e?(n,o)=>o[e]:null}function CO(e,n,o){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap(a=>CO(e,a,o));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=o?V8(r.style,o):r.style;else{const{variants:s,...c}=r;a=o?V8(K7(c),o):c}return dit(e,r.variants,[a],o)}return r?.isProcessed?o?V8(K7(r.style),o):r.style:o?V8(K7(r),o):r}function dit(e,n,o=[],r=void 0){let a;e:for(let s=0;s<n.length;s+=1){const c=n[s];if(typeof c.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(a))continue}else for(const d in c.props)if(e[d]!==c.props[d]&&e.ownerState?.[d]!==c.props[d])continue e;typeof c.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},o.push(r?V8(K7(c.style(a)),r):c.style(a))):o.push(r?V8(K7(c.style),r):c.style)}return o}function XIt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Rre(e,n,o=!1){const r={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){r[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[s][p]=Rre(c[p],d[p],o)}}else r[s]=d;else r[s]=c||{}}else s==="className"&&o&&n.className?r.className=ji(e?.className,n?.className):s==="style"&&o&&n.style?r.style={...e?.style,...n?.style}:r[s]===void 0&&(r[s]=e[s])}return r}const ch=typeof window<"u"?m.useLayoutEffect:m.useEffect;function h1e(e,n=0,o=1){return function(r,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(r,s))}(e,n,o)}function m6(e){if(e.type)return e;if(e.charAt(0)==="#")return m6(function(s){s=s.slice(1);const c=new RegExp(`.{1,${s.length>=6?2:1}}`,"g");let d=s.match(c);return d&&d[0].length===1&&(d=d.map(u=>u+u)),d?`rgb${d.length===4?"a":""}(${d.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}(e));const n=e.indexOf("("),o=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(o))throw new Error(_5(9,e));let r,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),r=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(_5(10,r))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:r}}const CE=(e,n)=>{try{return(o=>{const r=m6(o);return r.values.slice(0,3).map((a,s)=>r.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function BH(e){const{type:n,colorSpace:o}=e;let{values:r}=e;return n.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${o} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function uit(e){e=m6(e);const{values:n}=e,o=n[0],r=n[1]/100,a=n[2]/100,s=r*Math.min(a,1-a),c=(p,h=(p+o/30)%12)=>a-s*Math.max(Math.min(h-3,9-h,1),-1);let d="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return e.type==="hsla"&&(d+="a",u.push(n[3])),BH({type:d,values:u})}function Nre(e){let n=(e=m6(e)).type==="hsl"||e.type==="hsla"?m6(uit(e)).values:e.values;return n=n.map(o=>(e.type!=="color"&&(o/=255),o<=.03928?o/12.92:((o+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function VF(e,n){return e=m6(e),n=h1e(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,BH(e)}function Gx(e,n,o){try{return VF(e,n)}catch{return e}}function MH(e,n){if(e=m6(e),n=h1e(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]*=1-n;return BH(e)}function pa(e,n,o){try{return MH(e,n)}catch{return e}}function _H(e,n){if(e=m6(e),n=h1e(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let o=0;o<3;o+=1)e.values[o]+=(255-e.values[o])*n;else if(e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]+=(1-e.values[o])*n;return BH(e)}function ha(e,n,o){try{return _H(e,n)}catch{return e}}function HD(e,n,o){try{return function(r,a=.15){return Nre(r)>.5?MH(r,a):_H(r,a)}(e,n)}catch{return e}}const pit=m.createContext(null);function m1e(){return m.useContext(pit)}const eLt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function tLt(e){const{children:n,theme:o}=e,r=m1e(),a=m.useMemo(()=>{const s=r===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(r,o);return s!=null&&(s[eLt]=r!==null),s},[o,r]);return t.jsx(pit.Provider,{value:a,children:n})}const hit=m.createContext();function nLt({value:e,...n}){return t.jsx(hit.Provider,{value:e??!0,...n})}const zH=()=>m.useContext(hit)??!1,mit=m.createContext(void 0);function oLt({value:e,children:n}){return t.jsx(mit.Provider,{value:e,children:n})}function iLt({props:e,name:n}){return function(o){const{theme:r,name:a,props:s}=o;if(!r||!r.components||!r.components[a])return s;const c=r.components[a];return c.defaultProps?Rre(c.defaultProps,s,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:Rre(c,s,r.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(mit)}})}let Nge=0;const Vge={...V$t}.useId;function OH(e){if(Vge!==void 0){const n=Vge();return e??n}return function(n){const[o,r]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(Nge+=1,r(`mui-${Nge}`))},[o]),a}(e)}const Hge={};function Uge(e,n,o,r=!1){return m.useMemo(()=>{const a=e&&n[e]||n;if(typeof o=="function"){const s=o(a),c=e?{...n,[e]:s}:s;return r?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,r])}function git(e){const{children:n,theme:o,themeId:r}=e,a=Fre(Hge),s=m1e()||Hge,c=Uge(r,a,o),d=Uge(r,s,o,!0),u=(r?c[r]:c).direction==="rtl",p=function(h){const g=Fre(),f=OH()||"",{modularCssLayers:x}=h;let y="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return y=x&&g===null?typeof x=="string"?x.replace(/mui(?!\.)/g,y):`@layer ${y};`:"",ch(()=>{const b=document.querySelector("head");if(!b)return;const w=b.firstChild;if(y){if(w&&w.hasAttribute?.("data-mui-layer-order")&&w.getAttribute("data-mui-layer-order")===f)return;const C=document.createElement("style");C.setAttribute("data-mui-layer-order",f),C.textContent=y,b.prepend(C)}else b.querySelector(`style[data-mui-layer-order="${f}"]`)?.remove()},[y,f]),y?t.jsx(lit,{styles:y}):null}(c);return t.jsx(tLt,{theme:d,children:t.jsx(zot.Provider,{value:c,children:t.jsx(nLt,{value:u,children:t.jsxs(oLt,{value:r?c[r].components:c.components,children:[p,n]})})})})}const Wge={theme:void 0},Vre="mode",Hre="color-scheme",rLt="data-color-scheme";function aLt(){}const lLt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let r;try{r=n.localStorage.getItem(e)}catch{}return r||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return aLt;const r=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function uY(){}function Qge(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Gge(e,n){return e.mode==="light"||e.mode==="system"&&e.systemMode==="light"?n("light"):e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark"?n("dark"):void 0}function sLt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Vre,colorSchemeStorageKey:c=Hre,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=lLt,noSsr:p=!1}=e,h=a.join(","),g=a.length>1,f=m.useMemo(()=>u?.({key:s,storageWindow:d}),[u,s,d]),x=m.useMemo(()=>u?.({key:`${c}-light`,storageWindow:d}),[u,c,d]),y=m.useMemo(()=>u?.({key:`${c}-dark`,storageWindow:d}),[u,c,d]),[b,w]=m.useState(()=>{const I=f?.get(n)||n,L=x?.get(o)||o,z=y?.get(r)||r;return{mode:I,systemMode:Qge(I),lightColorScheme:L,darkColorScheme:z}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const S=function(I){return Gge(I,L=>L==="light"?I.lightColorScheme:L==="dark"?I.darkColorScheme:void 0)}(b),k=m.useCallback(I=>{w(L=>{if(I===L.mode)return L;const z=I??n;return f?.set(z),{...L,mode:z,systemMode:Qge(z)}})},[f,n]),j=m.useCallback(I=>{I?typeof I=="string"?I&&!h.includes(I)?console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`):w(L=>{const z={...L};return Gge(L,M=>{M==="light"&&(x?.set(I),z.lightColorScheme=I),M==="dark"&&(y?.set(I),z.darkColorScheme=I)}),z}):w(L=>{const z={...L},M=I.light===null?o:I.light,_=I.dark===null?r:I.dark;return M&&(h.includes(M)?(z.lightColorScheme=M,x?.set(M)):console.error(`\`${M}\` does not exist in \`theme.colorSchemes\`.`)),_&&(h.includes(_)?(z.darkColorScheme=_,y?.set(_)):console.error(`\`${_}\` does not exist in \`theme.colorSchemes\`.`)),z}):w(L=>(x?.set(o),y?.set(r),{...L,lightColorScheme:o,darkColorScheme:r}))},[h,x,y,o,r]),A=m.useCallback(I=>{b.mode==="system"&&w(L=>{const z=I?.matches?"dark":"light";return L.systemMode===z?L:{...L,systemMode:z}})},[b.mode]),E=m.useRef(A);return E.current=A,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const I=(...z)=>E.current(...z),L=window.matchMedia("(prefers-color-scheme: dark)");return L.addListener(I),I(L),()=>{L.removeListener(I)}},[g]),m.useEffect(()=>{if(g){const I=f?.subscribe(M=>{(!M||["light","dark","system"].includes(M))&&k(M||n)})||uY,L=x?.subscribe(M=>{(!M||h.match(M))&&j({light:M})})||uY,z=y?.subscribe(M=>{(!M||h.match(M))&&j({dark:M})})||uY;return()=>{I(),L(),z()}}},[j,k,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?S:void 0,setMode:k,setColorScheme:j}}function cLt(e=""){function n(...o){if(!o.length)return"";const r=o[0];return typeof r!="string"||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${n(...o.slice(1))})`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${n(...r)})`}const Yge=(e,n,o,r=[])=>{let a=e;n.forEach((s,c)=>{c===n.length-1?Array.isArray(a)?a[Number(s)]=o:a&&typeof a=="object"&&(a[s]=o):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})};function pY(e,n){const{prefix:o,shouldSkipGeneratingVar:r}=n||{},a={},s={},c={};return((d,u,p)=>{(function h(g,f=[],x=[]){Object.entries(g).forEach(([y,b])=>{(!p||p&&!p([...f,y]))&&b!=null&&(typeof b=="object"&&Object.keys(b).length>0?h(b,[...f,y],Array.isArray(b)?[...x,y]:x):u([...f,y],b,x))})})(d)})(e,(d,u,p)=>{if(!(typeof u!="string"&&typeof u!="number"||r&&r(d,u))){const h=`--${o?`${o}-`:""}${d.join("-")}`,g=((f,x)=>typeof x=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(y=>f.includes(y))||f[f.length-1].toLowerCase().includes("opacity")?x:`${x}px`:x)(d,u);Object.assign(a,{[h]:g}),Yge(s,d,`var(${h})`,p),Yge(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function oa(e,n,o=void 0){const r={};for(const a in e){const s=e[a];let c="",d=!0;for(let u=0;u<s.length;u+=1){const p=s[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,o&&o[p]&&(c+=" "+o[p]))}r[a]=c}return r}function hY(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const iL={black:"#000",white:"#fff"},dLt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},uLt="#f3e5f5",pLt="#ce93d8",hLt="#ba68c8",mLt="#ab47bc",gLt="#9c27b0",fLt="#7b1fa2",xLt="#e57373",yLt="#ef5350",bLt="#f44336",qge="#d32f2f",wLt="#c62828",CLt="#ffb74d",vLt="#ffa726",SLt="#ff9800",$Lt="#f57c00",kLt="#e65100",ALt="#e3f2fd",jLt="#90caf9",Kge="#42a5f5",ELt="#1976d2",ILt="#1565c0",LLt="#4fc3f7",TLt="#29b6f6",DLt="#03a9f4",Zge="#0288d1",PLt="#01579b",BLt="#81c784",MLt="#66bb6a",_Lt="#4caf50",zLt="#388e3c",OLt="#2e7d32",FLt="#1b5e20";function fit(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:iL.white,default:iL.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const xit=fit();function yit(){return{text:{primary:iL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:iL.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Ure=yit();function Jge(e,n,o,r){const a=r.light||r,s=r.dark||1.5*r;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=_H(e.main,a):n==="dark"&&(e.dark=MH(e.main,s)))}function Xge(e,n,o,r,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(r)?n[o]=n[r]:o==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*s).toFixed(0)}%)`:o==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function g1e(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:r=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:jLt,light:ALt,dark:Kge}:{main:ELt,light:Kge,dark:ILt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:pLt,light:uLt,dark:mLt}:{main:gLt,light:hLt,dark:fLt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:bLt,light:xLt,dark:qge}:{main:qge,light:yLt,dark:wLt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:TLt,light:LLt,dark:Zge}:{main:Zge,light:DLt,dark:PLt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:MLt,light:BLt,dark:zLt}:{main:OLt,light:_Lt,dark:FLt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:vLt,light:CLt,dark:$Lt}:{main:"#ed6c02",light:SLt,dark:kLt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const S=Nre(C),k=Nre(v);return(Math.max(S,k)+.05)/(Math.min(S,k)+.05)}(b,Ure.text.primary)>=o?Ure.text.primary:xit.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:S=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(_5(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(_5(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(Xge(a,b,"light",v,r),Xge(a,b,"dark",S,r)):(Jge(b,"light",v,r),Jge(b,"dark",S,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=fit():n==="dark"&&(y=yit()),s1({common:{...iL},mode:n,primary:x({color:c,name:"primary"}),secondary:x({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:x({color:u,name:"error"}),warning:x({color:g,name:"warning"}),info:x({color:p,name:"info"}),success:x({color:h,name:"success"}),grey:dLt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:r,...y},s)}function RLt(e){const n={};return Object.entries(e).forEach(o=>{const[r,a]=o;typeof a=="object"&&(n[r]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),n}function NLt(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function VLt(e){return Math.round(1e5*e)/1e5}const e3e={textTransform:"uppercase"},t3e='"Roboto", "Helvetica", "Arial", sans-serif';function bit(e,n){const{fontFamily:o=t3e,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:u=16,allVariants:p,pxToRem:h,...g}=typeof n=="function"?n(e):n,f=r/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,S,k)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===t3e?{letterSpacing:`${VLt(S/C)}em`}:{},...k,...p}),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(c,14,1.75,.4,e3e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,e3e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return s1({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function xl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const HLt=["none",xl(0,2,1,-1,0,1,1,0,0,1,3,0),xl(0,3,1,-2,0,2,2,0,0,1,5,0),xl(0,3,3,-2,0,3,4,0,0,1,8,0),xl(0,2,4,-1,0,4,5,0,0,1,10,0),xl(0,3,5,-1,0,5,8,0,0,1,14,0),xl(0,3,5,-1,0,6,10,0,0,1,18,0),xl(0,4,5,-2,0,7,10,1,0,2,16,1),xl(0,5,5,-3,0,8,10,1,0,3,14,2),xl(0,5,6,-3,0,9,12,1,0,3,16,2),xl(0,6,6,-3,0,10,14,1,0,4,18,3),xl(0,6,7,-4,0,11,15,1,0,4,20,3),xl(0,7,8,-4,0,12,17,2,0,5,22,4),xl(0,7,8,-4,0,13,19,2,0,5,24,4),xl(0,7,9,-4,0,14,21,2,0,5,26,4),xl(0,8,9,-5,0,15,22,2,0,6,28,5),xl(0,8,10,-5,0,16,24,2,0,6,30,5),xl(0,8,11,-5,0,17,26,2,0,6,32,5),xl(0,9,11,-5,0,18,28,2,0,7,34,6),xl(0,9,12,-6,0,19,29,2,0,7,36,6),xl(0,10,13,-6,0,20,31,3,0,8,38,7),xl(0,10,13,-6,0,21,33,3,0,8,40,7),xl(0,10,14,-6,0,22,35,3,0,8,42,7),xl(0,11,14,-7,0,23,36,3,0,9,44,8),xl(0,11,15,-7,0,24,38,3,0,9,46,8)],ULt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},wit={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function n3e(e){return`${Math.round(e)}ms`}function WLt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function QLt(e){const n={...ULt,...e.easing},o={...wit,...e.duration};return{getAutoHeightDuration:WLt,create:(r=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof s=="string"?s:n3e(s)} ${c} ${typeof d=="string"?d:n3e(d)}`).join(",")},...e,easing:n,duration:o}}const GLt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function YLt(e){return a5(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Cit(e={}){const n={...e};return function o(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[c,d]=a[s];!YLt(d)||c.startsWith("unstable_")?delete r[c]:a5(d)&&(r[c]={...d},o(r[c]))}}(n),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
3
3
 
4
4
  const theme = ${JSON.stringify(n,null,2)};
5
5
 
@@ -79421,7 +79421,7 @@ ${Va.beneficiaryAddress} ${te}`,d(xe),L(!0)})(o),"data-testid":Y("title-text-cop
79421
79421
  padding: ${i.sp3} ${i.sp0};
79422
79422
  `,ont=l(It)`
79423
79423
  min-width: 140px;
79424
- `,JI=Pnt(YEt()),MRr=["sandbox","production"],_Rr=["development","staging","production"],WS=()=>Mc==="DEV"||Mc==="QA"||Mc==="PUNE"||Mc==="SUNNYVALE"||Mc==="DELHI"||Mc==="MOHALI",g2e="https://zeni-webapp-dev.uc.r.appspot.com",Mc=G5("DEV",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),xQr=(e=>G5(e,MRr))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Mc)),int=(e=>G5(e,_Rr))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Mc)),f2e=Mc==="DEV"||Mc==="QA"?.2:.8,HSt=f2e,Ua={sentryDsn:"",sentryTraceSamplingRate:f2e,sentryProfileSamplingRate:HSt,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let _$,oT;function zRr(e){Ua.sentryDsn=e.keys.SENTRY_DSN,Ua.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):f2e,Ua.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):HSt,Ua.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ua.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ua.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ua.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ua.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ua.pusherCluster=e.keys.PUSHER_CLUSTER,Ua.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ua.appUrl=e.keys.WEB_ENDPOINT,Ua.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ua.cardVaultId=e.keys.UNIT_VAULT_ID,Ua.stripeKey=e.keys.STRIPE_KEY,Ua.qboRedirectionUrl=e.keys.QBO_URL,Ua.mixpanelUrl=e.keys.MIXPANEL_URL,Ua.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,oT=e.externalEndPoints,_$=e.apiEndPoints,function(n,o){const r=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{r.add(new URL(s).origin)}catch{}for(const s of r){if(document.querySelector(`link[rel="preconnect"][href="${s}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=s,document.head.appendChild(c)}}(_$,oT)}let rnt=!1;function Pv(){rnt||(Zh.init("63d3a2406505a5737a2b4debdb513f20",{api_host:oT.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),rnt=!0)}const ORr=new Set(Array.from(po.EVENTS_WITHOUT_SUPER_PROPERTIES));let ant=!1,lnt=!1;function Dde(){if(ant)return;ant=!0,Pv();const e=po.extractUtmParamsFromUrl();Object.keys(e).length>0&&Zh.register(e),WS()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const FRr=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function RRr(){const e=function(){return Zh?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||FRr.has(o));for(const o of n)Zh.unregister(o);WS()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function snt(){lnt||(lnt=!0,RRr())}class cS{identify(n,o){if(Pv(),this.#t=n,n!=null&&o!=null&&(cS.#e==null||!ljt({userId:n,traits:o},cS.#e))){const{$email:r,...a}={...o};Zh.identify(n),r&&r!=null&&Zh.people.set_once({$email:r}),Zh.people.set(a),cS.#e={userId:n,traits:o},WS()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,r,a,s){throw Error("Use identify in the web-app!!")}track(n,o){Pv();const r=ORr.has(n);if(this.#t!=null||r){if(Dde(),this.#t!=null){const a={distinct_id:this.#t,...o};Zh.track(n,a)}else Zh.track(n,o);if(snt(),WS()){const a=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(o)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(o)}`;console.log(a)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,o){Pv(),Dde(),Zh.track(n,o),snt(),WS()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){Pv(),Zh.alias(n,o)}reset(){Pv(),Zh.identify(void 0),this.#t=void 0,cS.#e=void 0}static#e;#t}const Pde=new cS,USt=new po.Analytics(Pde);USt.trackWithoutUserId=Pde.trackWithoutUserId.bind(Pde);const vd=USt,NRr="openAiCfoScope",Bde="openAiCfoScopeOnDashboard";function VRr(e){const{location:n,navigate:o,mergeState:r}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[Bde]:!0,...r}})}function yQr(e){const n=sT(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const o=n.uiState?.currentChatSessionId;return o!=null&&n.responseStateByChatSessionId?.[o]?.answer?.fetchState==="In-Progress"}function x2e(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,r=o?.questionAnswers??[],a=r[r.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:r}}function WSt(e,n){return(e||n?.chatSessionSummary)??null}const QSt="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",hH="zeni-ai-cfo-upload-promo-storage-changed",_i=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);return n!=null&&e!=null?JSON.parse(this.decrypt(n,e)):void 0}isZeniUser(){const e=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);if(this._isZeniUserCache!=null&&this._isZeniUserCache.encryptedUser===e)return this._isZeniUserCache.result;const n=this.getSignedInUser()?.userEmail?.toLowerCase().endsWith("@zeni.ai")===!0;return this._isZeniUserCache={encryptedUser:e,result:n},n}getShowNegativeAmountInParenthesis(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!1}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!0}getSignedInUserTenant(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantEmailDomain===e)}getSignedInUserTenantWithId(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantId===e)}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_ACTIVE_TENANT_DOMAIN);if(!(n==null||e==null)){const o=this.decrypt(n,e),r=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(r!=null)return JSON.parse(this.decrypt(r,e)).find(a=>a.tenantEmailDomain===o)}}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_FORCE_REFRESHED_COMPONENTS);if(n&&e!=null){const o=this.decrypt(n,e);return o?JSON.parse(o):[]}return[]}saveForceRefreshedComponents(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(e),n)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveActiveTenantDomainForUser(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_ACTIVE_TENANT_DOMAIN,this.encrypt(e,n)):console.warn("Can't update the active tenant domain when the user is logged out!")}saveSignedInUserWithSession(e,n){if(e==null||n==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.setItem(this.ZENI_SESSION_ID,n),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(e),n))}saveSignedInUserTenants(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),o)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(e),n))}saveShowNegativeAmountInParenthesisPDF(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(e),n))}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(e=>window.localStorage.getItem(e)!=null).reduce((e,n)=>e&&n)}clearAll(){const e=new Set([this.ZENI_MAGIC_LINK_EMAIL,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN]);this.ALL_IDs.filter(n=>!e.has(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_OTP_TOKEN}_card`).test(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_MAGIC_LINK_TRIGGERED}_`).test(n)).forEach(n=>window.localStorage.removeItem(n))}setTheme(e){window.localStorage.setItem(this.ZENI_THEME,e)}getTheme(){const e=window.localStorage.getItem(this.ZENI_THEME);if(e==="light"||e==="dark")return e;e!=null&&window.localStorage.removeItem(this.ZENI_THEME)}saveZeniOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null&&window.localStorage.setItem(this.ZENI_OTP_TOKEN,this.encrypt(JSON.stringify(e),n))}getZeniOtpToken(){const e=window.localStorage.getItem(this.ZENI_OTP_TOKEN),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null){let o=JSON.parse(this.decrypt(e,n));return o={...o,expiry:pn(o.expiry.toString())},o}}getTreasuryPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_TREASURY_POPUP_SEEN),!1}return!1}saveTreasuryPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(r))}getCardPolicyPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_CARD_POLICY_POPUP_SEEN),!1}return!1}saveCardPolicyPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_CARD_POLICY_POPUP_SEEN,JSON.stringify(r))}getAiCfoUploadPromoSeen(e){const n=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);if(n!=null)try{const o=JSON.parse(n);return o!==null&&typeof o=="object"&&o[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(hH)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(hH))}savePayNowInfoTooltip(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),o))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_PAY_NOW_INFO_TOOLTIP),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null)try{const o=this.decrypt(e,n);return o===""||o==null?void 0:JSON.parse(o)}catch{return}}saveZeniOtpTokenForCardHolder(e,n){const o=window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),o))}getZeniOtpTokenForCardHolder(e){const n=window.localStorage.getItem(`${this.ZENI_OTP_TOKEN}_${e}`),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)try{const r=this.decrypt(n,o);if(r===""||r==null)return;let a=JSON.parse(r);return a={...a,expiry:pn(a.expiry.toString())},a}catch{return}}saveMagicLinkCodeVerifier(e){window.localStorage.setItem(this.ZENI_CODE_VERIFIER,e)}getMagicLinkCodeVerifier(){return window.localStorage.getItem(this.ZENI_CODE_VERIFIER)}saveMagicLinkTriggered(e){window.localStorage.setItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`,"true")}isMagicLinkTriggered(e){const n=window.localStorage.getItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`);return n!=null&&n==="true"}saveLastUsedMagicLinkToken(e){window.localStorage.setItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getLastUsedMagicLinkToken(){const e=window.localStorage.getItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),n="7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c";if(e!=null)try{return this.decrypt(e,n)}catch{return window.localStorage.removeItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),null}return null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){const e=window.localStorage.getItem(this.ZENI_MAGIC_LINK_EMAIL);return e!=null?this.decrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"):null}encrypt(e,n){return JI.AES.encrypt(e,n).toString()}decrypt(e,n){return JI.AES.decrypt(e,n).toString(JI.enc.Utf8)}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_ACTIVE_TENANT_DOMAIN="ZENI_ACTIVE_TENANT_DOMAIN";ZENI_THEME="ZENI_THEME";ZENI_OTP_TOKEN="ZENI_OTP_TOKEN";ZENI_PAY_NOW_INFO_TOOLTIP="ZENI_PAY_NOW_INFO_TOOLTIP";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";ZENI_CODE_VERIFIER="ZENI_CODE_VERIFIER";ZENI_MAGIC_LINK_TRIGGERED="ZENI_MAGIC_LINK_TRIGGERED";ZENI_LAST_USED_MAGIC_LINK_TOKEN="ZENI_LAST_USED_MAGIC_LINK_TOKEN";ZENI_MAGIC_LINK_EMAIL="ZENI_MAGIC_LINK_EMAIL";ZENI_TREASURY_POPUP_SEEN="ZENI_TREASURY_POPUP_SEEN";ZENI_CARD_POLICY_POPUP_SEEN="ZENI_CARD_POLICY_POPUP_SEEN";ZENI_AI_CFO_UPLOAD_PROMO_SEEN=QSt;ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_THEME,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS,this.ZENI_PAY_NOW_INFO_TOOLTIP,this.ZENI_TREASURY_POPUP_SEEN,this.ZENI_CARD_POLICY_POPUP_SEEN,this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,this.ZENI_CODE_VERIFIER,this.ZENI_MAGIC_LINK_TRIGGERED,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_MAGIC_LINK_EMAIL]},g3=(e,n)=>{const o=[...e??[]];return o.push(n),o},bQr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},wQr=({state:e})=>_i.isSignedIn()===!0?Tt.jsx(skt,{}):Tt.jsx(znt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function HRr(){const e=Ju(),n=lh(),o=lT(),{tenantEmailDomain:r}=Ont(),[a,s]=m.useState(!1),c=qo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?X1(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=qo(x=>sT(x));m.useEffect(()=>{const x=n.state;x?.[Bde]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[Bde]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(r==null)return;const x=g3(n.state?.pathnameStackToGoBack,n.pathname);o(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,r]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e($ot(c.userRoleId))},[e,d,c?.userRoleId]);return Tt.jsx(gSt,{open:a,onClose:g,children:Tt.jsxs(mSt,{children:[a&&!d?Tt.jsx(yhe,{analytics:vd,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Tt.jsx(ble,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const Mde=m.createContext(void 0);function KG(){const e=m.useContext(Mde);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const y2e=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],b2e=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],GSt=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],YSt=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],qSt=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],KSt=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],ZSt=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],JSt=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],XSt=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function e$t(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let o=1;o<n.length;o+=1)if(n[o]==="transaction")return!0;return!1}const t$t=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],n$t=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],o$t=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],URr=[...GSt,...y2e,...b2e,"/:tenantEmailDomain/vendors/*","/:tenantEmailDomain/vendors","/:tenantEmailDomain/month_end_close_checks/*","/:tenantEmailDomain/month_end_close_checks","/:tenantEmailDomain/tasks/*","/:tenantEmailDomain/tasks","/:tenantEmailDomain/bills/*","/:tenantEmailDomain/bills","/:tenantEmailDomain/reimbursements/*","/:tenantEmailDomain/reimbursements",...t$t,...n$t,...o$t,...YSt,...qSt,...KSt,...ZSt,...JSt,...XSt];function i$t(){const{pathname:e}=lh(),n=e??"";return URr.some(o=>zde(o,n)!=null)||e$t(e)}function jc(e){const{pathname:n}=lh(),o=n??"";return e.some(r=>zde(r,o)!=null)}const r$t=m.createContext(null),w2e={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function WRr({children:e}){const[n,o]=m.useState(()=>new Set([])),r=n.size>0,a=m.useCallback(d=>{o(u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p})},[]),s=m.useCallback(d=>{o(u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p})},[]),c={isLoading:r,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Tt.jsx(r$t.Provider,{value:c,children:e})}function ZG(){const e=m.useContext(r$t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}const QRr=e=>{const n=Z.currencyFormatter(0);return o=>{const r=cjt(e.chargeCardState,o);if(r==null)return;const a=djt(e.userState,r.cardHolderUserId),s=((u,p,h)=>{const g=u!=null&&u.length>0,f=p!=null&&p.length>0;return g&&f?`${u} ${p}`:g?u:f?p:h??""})(a?.firstName,a?.lastName,a?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:s,recommendedLimitFormatted:d}}},GRr=e=>n=>{const o=sjt(e.cardPolicyState,n);if(o==null)return;const r=o.cardsCount>0?o.cardsCount:o.appliedCards.length,a=o.allowedEntity.merchantNames.length+o.blockedEntity.merchantNames.length,s=o.allowedEntity.categoryCodes.length+o.blockedEntity.categoryCodes.length;return{name:o.name,description:o.description,cardsCount:r,vendorRestrictionsCount:a,categoryRestrictionsCount:s}},a$t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],l$t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],YRr=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],qRr=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],KRr=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],ZRr=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],JRr=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],s$t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],c$t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],XRr=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function C2e(e){const n=Yu(e),o=n.indexOf("review");if(o<2||n[o-1]!=="month_end_close_checks")return null;if(o===n.length-1)return"overview";const r=n[o+1];return r==null?"overview":XRr.includes(r)?r:null}const eNr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),tNr=new Set(["setup","verification","promo","approval-rules"]);function Yu(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function v2e(e){const n=Yu(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const r=n[o+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const a=n[o+2];return a==="prepaid_expenses"?"prepaid_expenses":a==="fixed_assets"?"fixed_assets":a==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function d$t(e,n,o){const r=Yu(e);return!(r.length<2||r[1]!==n)&&(r.length===2||o(r[2]))}function u$t(e,n,o){return d$t(e,n,r=>!o.has(r))}function p$t(e){return u$t(e,"bills",eNr)}function h$t(e){return u$t(e,"reimbursements",tNr)}function m$t(e){return d$t(e,"tasks",n=>n==="group")}const nNr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),oNr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function S2e(e){const n=Yu(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return nNr.has(o)?"checking":"checking_details"}function $2e(e){const n=Yu(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];if(o==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return oNr.has(o)?"cards":"cards_detail"}function g$t(e){const n=Yu(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function f$t(e){return Yu(e)[1]==="performance"?"performance":void 0}function x$t(e){const n=Yu(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function y$t(e){const n=Yu(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function bm(e,n){return n.some(o=>zde(o,e)!=null)}function iNr(e){return bm(e,y2e)?"reports":bm(e,a$t)?"ap_aging":bm(e,l$t)?"ar_aging":v2e(e)!=null?"vendors_tab":bm(e,b2e)?"forecast":C2e(e)!=null?"month_end_close_review":bm(e,s$t)?"cash_balance":bm(e,c$t)?"card_balance":m$t(e)?"task_checklist":g$t(e)!=null?"transaction_detail":f$t(e)!=null?"performance":x$t(e)!=null?"bills_detail":y$t(e)!=null?"reimbursement_detail":p$t(e)?"bills_list":h$t(e)?"reimbursement_list":bm(e,YRr)?"cash_in_cash_out":bm(e,qRr)?"operating_expenses":bm(e,KRr)?"revenue":bm(e,ZRr)?"net_burn_or_income":bm(e,JRr)?"cash_position":function(n){const o=Yu(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":S2e(e)!=null?"checking":function(n){return Yu(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":$2e(e)!=null?"cards":function(n){return Yu(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return Yu(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return Yu(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function b$t(e,n){switch(iNr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(r){switch(r){case"balance_sheet":return"balance_sheet";case"profit_and_loss":case"profit_and_loss_by_classes":return"profit_loss";case"cash_flow":return"cash_flow";case"vendor":case"vendors_tab":return"vendors";case"accounts_payable_aging":return"accounts_payable";case"accounts_receivable_aging":return"accounts_receivable";case"transaction_detail":return"transaction_details";case"transaction_list_of_account":case"transaction_list_of_account_by_class":case"transaction_list_missing_receipt":return"transactions";default:return}}(o)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return v2e(e);case"forecast":return"forecast";case"month_end_close_review":{const o=C2e(e);return o==null?void 0:function(r){switch(r){case"overview":return"command_centre";case"transaction_categorization":return"transactions";case"je_schedules":return"je_schedules";case"reconciliation":return"reconciliation";case"missing_receipts":return"receipts";case"flux_analysis":return"flux_analysis";case"month_end_insights":return"mei"}}(o)}case"cash_balance":return"cash_balance";case"card_balance":return"card_balance";case"task_checklist":return"task_checklist";case"transaction_detail":return"transaction_details";case"performance":return"performance";case"bills_detail":return"bills_details";case"reimbursement_detail":return"reimbursement_details";case"bills_list":return"bills_list";case"reimbursement_list":return"reimbursement_list";case"cash_in_cash_out":return"cash_in_cash_out";case"operating_expenses":return"operating_expenses";case"revenue":return"revenue";case"net_burn_or_income":return"net_burn_or_income";case"cash_position":return"cash_position";case"dashboard":return"dashboard";case"checking":return S2e(e);case"treasury":return"treasury";case"cards":return $2e(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function w$t(){const{pathname:e}=lh(),n=e??"",o=qo(r=>r.financeStatementState?.selectedReportId);return m.useMemo(()=>b$t(n,{selectedReportId:o}),[n,o])}function JG(){const{useFeatureGate:e}=ba(),{isFeatureEnabled:n}=e(Li.isAiCfoEnabled),o=qo(a=>X1(a)),r=_i.getSignedInUser();return r!=null&&r.userId!=null&&o!=null&&o.companyId!=null&&n}function rNr(){const{useFeatureGate:e}=ba(),{isFeatureEnabled:n}=e(Li.isAiCfoNavButtonEnabled),o=JG();return n&&o}const C$t=m.createContext(void 0),aNr=({children:e})=>{const{tenantEmailDomain:n}=Ont(),o=n!=null?_i.getSignedInUserTenant(n):void 0,r=qo(u=>X1(u)),a=cT().tenantId,s=o?.tenantId,c=r?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Tt.jsx(C$t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},lNr=()=>{const e=m.useContext(C$t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function v$t(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function S$t(e){const{areTenantIdsInSync:n}=lNr(),o=JG(),r=rNr();return n&&e&&r&&o}function CQr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,r=Ju(),a=Fnt(),s=m.useRef(null);m.useEffect(()=>{const c=s.current===!1&&o===!0;if(s.current=o,o&&n!=null&&n.length!==0)for(const d of n){const u=Xde(a.getState(),d)?.fetchState;v$t(u,c)&&r(kot({pageContext:d}))}},[o,r,n,a])}function $$t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:r,noCardCreated:a}=n,s=Ju(),c=Fnt(),d=m.useRef(null),u=m.useRef(void 0);m.useEffect(()=>{const p=d.current===!1&&r===!0;d.current=r;const h=u.current!==void 0&&u.current!==a;if(u.current=a,o==null||!r)return;const g=Xde(c.getState(),o)?.fetchState;v$t(g,p||h)&&s(kot({pageContext:o,noCardCreated:a}))},[r,s,a,o,c])})({canFetchSuggestedQuestions:S$t(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function vQr(e){$$t({pageContext:w$t(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:sNr,sampleQuestion2:cNr,sampleQuestion3:dNr}}=Z.getLocalizedStrings().aiCfo,uNr=[sNr,cNr,dNr];function pNr(e,n=!1){$$t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=S$t(!0),r=qo(g=>e!=null&&e!==""?Xde(g,e):void 0),{useDynamicConfig:a}=ba(),{configValue:s}=a(lg.aiCfoMessageDynamicConfig),c=m.useMemo(()=>Array.isArray(s?.default_message_list)?[...s.default_message_list]:[],[s?.default_message_list]),d=m.useMemo(()=>c.length>0?c:[...uNr],[c]),u=e!=null&&e!=="",p=u&&o&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(r?.fetchState==="Error")return d;const g=(r?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function hNr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!_i.getAiCfoUploadPromoSeen(n),[e,n]),[r,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(hH,s);const c=d=>{d.key===QSt&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(hH,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback(()=>{n!=null&&_i.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const k$t=m.createContext(void 0),k2e=()=>m.useContext(k$t),mNr=e=>{const n=_i.isSignedIn(),o=_i.getSignedInUser(),[r,a]=m.useState(void 0),s=m.useMemo(()=>r,[r]),c=qo(p=>X1(p)),d=c.companyId,u=c.userRoleId;return m.useEffect(()=>{let p,h=!1;if(n&&c.tenantId!=null&&o?.userId!=null&&o.zeniSessionId!=null){r!=null&&(r.channels.all().forEach(w=>{r.unsubscribe(w.name)}),r.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await fjt(Ua.pusherClientSecret,{cluster:Ua.pusherCluster},{userId:g,tenantId:f,sessionId:x},!0)}catch(C){return void console.warn("Failed to initialize Pusher",C)}h?w?.disconnect():(a(w),w!=null&&(d!=null&&XI(w,d),g!=null&&XI(w,g),u!=null&&XI(w,u)))},b=()=>{const w=cT();return w.tenantId===f&&w.userId===g&&w.sessionId===x};if(b())y();else{let w=0;p=setInterval(()=>{h||(w++,b()?(clearInterval(p),y()):w>=30&&(clearInterval(p),jot(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),r?.channels.all().forEach(g=>r?.unsubscribe(g.name)),r?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Tt.jsx(k$t.Provider,{value:s,children:e.children})};function XI(e,n){const o=`private-encrypted-${n}`,r=e.channel(o);if(r?.subscribed===!0)return r;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const gNr=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},A2e=e=>n=>{const o=k2e(),r=m.useRef(n.eventCallback),a=m.useRef(n.onSubscribed),s=m.useRef({}),c=m.useRef(0);m.useEffect(()=>{r.current=n.eventCallback,a.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;s.current=g},[n]);const d=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(a.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,a.current(s.current))};return u.forEach(f=>{const[x,y]=gNr(f);if(y==="")return;const b=o.channel(x),w=v=>{r.current(y,v,s.current)};let C;if(b?.subscribed===!0)C=b,C.bind(y,w),h.has(x)||(h.add(x),g()),p.push(()=>{b.unbind(y,w)});else{if(C=b??o.subscribe(x),C.bind(y,w),!h.has(x)){h.add(x);const v=()=>{g()};C.bind("pusher:subscription_succeeded",v),p.push(()=>{C.unbind("pusher:subscription_succeeded",v)})}p.push(()=>{C.unbind(y,w)})}}),()=>{p.forEach(f=>f())}}},[o,d]),Tt.jsx(e,{...n})},fNr=({children:e})=>{const n=Bre("(prefers-color-scheme: dark)"),[o,r]=T.useState({dark:n});m.useEffect(()=>{const d=_i.getTheme()==null?n:_i.getTheme()==="dark";o.dark!==d&&r({dark:d})},[o,n]);const a=o.dark?HF({palette:{mode:"dark"},...rTe},aTe,moo,foo):HF({palette:{mode:"light"},...rTe},aTe,hoo,goo),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Tt.jsx(OFn,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;_i.setTheme(d?"dark":"light"),r({...o,dark:d})},nonce:c,children:e})},A$t=m.createContext(!1),xNr=A$t.Provider;function yNr(){return m.useContext(A$t)}const bNr=()=>qo(e=>X1(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}=lkt();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}})();function wNr({isTreasuryPromoVideoRemindMeLaterClicked:e,isTreasuryPromoVideoPlayed:n,loginCounterForTreasuryPromoVideo:o,isTreasuryVideoClosed:r=!1}){return!r&&!n&&(!e||o>0&&o%5==0)}const _de=e=>PAn.includes(e),PF=e=>o2t.includes(e),cnt=e=>_de(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":AN(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:PF(e)?`ai-cfo/${e}`:e,CNr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],dnt=(e,n)=>e.includes(n),mH=e=>{switch(e.split("/")[2]){case"cards":return"cards";case"rewards":case"dashboard":case"transactions":case"transaction":case"notifications":return"home";case"checking":return"checking";case"bills":case"bill":return"bills";case"reimbursements":case"reimbursement":return"reimbursements";case"vendors":return"vendors";case"forecast":return"forecast";case"reports":return"reports";case"tasks":case"task":return"task_checklist";case"people":return"users_and_roles";case"settings":return function(n){if(n==null)return;const o=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of o)if(dnt(n,r))switch(r){case"accounting":return"accounting";case"approval_rules":return"approval_rules";case"billing":return"billing";case"my_bank_connections":return"my_bank_connections";case"bank_connections":return"bank_connections";case"business_verification":return"business_verification";case"company_details":return"company_details";case"integrations":return"integrations";case"my_profile":return"my_profile";case"notifications":return"notifications"}}(e);case"performance":return"performance";case"month_end_close_checks":return function(n){if(!n.includes("month_end_close_checks/review"))return"command_center";const o=n.split("/"),r=o.indexOf("review"),a=r>=0?o[r+1]:void 0;return a!=null&&AN(a)?n2t(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of o2t)if(dnt(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function unt(e){let n=mH(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<o.length&&n==null;++r)n=mH(o[r])}return n??"home"}function vNr(e){return e.pathname.includes("settings")}function SNr(e){return e.pathname.includes("ai-cfo")}const $Nr=()=>{const e=kNr();return bE("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},kNr=()=>lh().state?.message==="expenseAutomation";function ANr(e){return(e??[]).reduce((n,o)=>{const r=o.yield;return Math.max(n,r)},0)}const jNr=(e,n,o)=>{const r=Eot(e),a=xjt(e),s=Iot(o,e);return n||o||a||r||s},dv="AppDrawer",Wm={root:`${dv}-root`,drawer:`${dv}-drawer`,appBar:`${dv}-appBar`,menuButton:`${dv}-menuButton`,appBarZenilogo:`${dv}-appBarZenilogo`,drawerZenilogo:`${dv}-drawerZenilogo`},iT=210,ENr=Fn("div",{slot:"Root"})(({theme:e})=>({[`&.${Wm.root}`]:{display:"flex"},[`& .${Wm.drawer}`]:{[e.breakpoints.up("md")]:{width:iT,flexShrink:0,backgroundColor:e.colors.background}},[`& .${Wm.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${Wm.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${Wm.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${Wm.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),INr=A2e(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=KG(),[r,a]=T.useState(!1),[s,c]=m.useState(!1),d=lh(),u=lT(),p=cT(),h=Jpe(),g=Ju(),[f,x]=m.useState(!1),y=Pe(),{useFeatureGate:b}=ba(),{isFeatureEnabled:w}=b(Li.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(Li.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(Li.isExpenseAutomationEnabledV2),[S,k]=m.useState(()=>_i.getSignedInUser());m.useEffect(()=>{const Yt=()=>{const uo=_i.getSignedInUser();k(uo)};return window.addEventListener("completeProfileDone",Yt),()=>{window.removeEventListener("completeProfileDone",Yt)}},[]);const j=qo(Yt=>X1(Yt)),A=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=ZG(),I=JG(),L=P6(S),z=v||C&&L,M=yNr(),[_,U]=m.useState(void 0),{isFeatureEnabled:R}=b(Li.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(Li.isChargeCardFeatureEnabled),F=jNr(j,O,w),{isFeatureEnabled:B}=b(Li.isSettingsFeatureEnabled),{isFeatureEnabled:H}=b(Li.isReferralFeatureEnabled),{isFeatureEnabled:N}=b(Li.isTreasuryEnabled),{isFeatureEnabled:Q}=b(Li.isTaskManagerCustomerUserAccessEnabled),V=L||!L&&Q,G=qo(Yt=>bjt(Yt));m.useEffect(()=>{const Yt=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",Yt),()=>{window.removeEventListener("scroll",Yt)}},[]);const K=qo(Yt=>wjt(Yt)),q=qo(Yt=>Yt.expenseAutomationViewState.selectedPeriodByTenantId),te=qo(Yt=>Cjt(Yt)),{monthEndCloseChecksView:oe}=te,X=bE("/signout")!==null,ne=bE("/:tenantEmailDomain/dashboard")!==null,ie=bE("/:tenantEmailDomain/reports")!==null,ae=bE("/:tenantEmailDomain/onboarding/*")!==null,ue=$Nr();m.useEffect(()=>{M&&H&&!ae&&K.fetchState==="Not-Started"&&g(vjt(!0))},[M,H,K.fetchState,ae]),m.useEffect(()=>{if(ue){const Yt=d.state?.origin;if(Yt!=null){const uo=Sjt(Yt);uo!=null&&g(oge(uo))}}},[ue,d.state]);const xe=X||ae,pe=qo(Yt=>Yt.tenantState),ge=qo(Yt=>pe.fetchState==="Completed"?Tot(Yt):[]),{isFeatureEnabled:re}=b(Li.isApAgingFeatureEnabled),{isFeatureEnabled:se}=b(Li.isArAgingFeatureEnabled),{isFeatureEnabled:de}=b(Li.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:me}=b(Li.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(Li.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:be}=b(Li.isDashboardSidebarNewYearAnimationEnabled),ye=qo(Yt=>xw(Yt).totalUnreadCount),Ce=qo(Yt=>xw(Yt).notificationDetailsByTab.tasks.uiState.unreadCount),Ae=qo(Yt=>xw(Yt).notificationDetailsByTab.comments.uiState.unreadCount),Te=qo(Yt=>xw(Yt).reducedFetchCountState),Ie=qo(Yt=>xw(Yt).notificationDetailsByTab.tasks.fetchCountState),je=qo(Yt=>sT(Yt)),[Fe,ze]=m.useState(void 0),Le=je.uiState.currentChatSessionId,Se=Fe!=null?je.deleteChatSessionStateByChatSessionId[Fe]?.fetchState:void 0,ve=Pt(Se),{inboxNotifications:Me,isLoading:Be,isFetchingMore:Re,hasFetchedAll:it,fetchMore:Qe}=bNr(),Ue=qo(Yt=>xw(Yt).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const Yt=setTimeout(()=>Qe?.(),0);return()=>clearTimeout(Yt)}),m.useEffect(()=>{if(Fe!=null)return ve==="In-Progress"&&Se==="Completed"?(g(ige({chatSessionId:Fe})),ze(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Se==="Error"&&(g(ige({chatSessionId:Fe})),ze(void 0)))},[g,d.state,u,Se,Fe,ve,e]),m.useEffect(()=>{if(Be===!1&&Re===!1&&it===!0&&j?.companyId!=null&&Me!=null){const Yt=`dashboard_${j.companyId}`;U(Me.filter(uo=>uo.roomId===Yt&&uo.readAt==null).length)}},[Be,Re,it,j?.companyId,Me]),m.useEffect(()=>{M&&L&&!ae&&Ie.fetchState==="Not-Started"&&p.tenantId!=null&&g($jt("task_manager","dashboard"))},[M,p.tenantId]),m.useEffect(()=>{ae||Ue.fetchState!=="Not-Started"||g(rge({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(_!=null){const{fetchState:Yt}=Ue;Yt!=="In-Progress"&&Yt!=="Completed"||(Yt==="In-Progress"&&g(rge({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(Lot({unreadCount:_},"comments")))}},[_,Ue.fetchState]);const dt={fetchStatus:Te,count:ye},tt=[];re===!1&&tt.push("accounts_payable_aging"),se===!1&&tt.push("accounts_receivable_aging"),R===!1&&tt.push("zeni_accounts_promo_card"),H===!1&&tt.push("rewards_card"),z===!1&&tt.push("expense_automation_card");const Ht=gn(),xt=qo(Yt=>kjt(Yt,tt,S,v,C,N).fetchState),nt=qo(Yt=>Ajt(Yt).fetchState),kt=e!=null?_i.getSignedInUserTenant(e):null,Gt=qo(Yt=>kt?.tenantId!=null?Dot(Yt,kt.tenantId):void 0),en=ne&&(xt==="Completed"||xt==="Error")||ie&&(nt==="Completed"||nt==="Error")||!ne&&!ie?void 0:"disabled",rt=m.useMemo(()=>Pot(j.userRole),[j.userRole]),Zt=Znt(rt),hn=Yt=>{a(Yt)},bt=j.company!=null&&jjt(j.company),Ut=N&&bt,ln=Jnt(Ht?.loggedInUserRoleMap),cn=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Bt=qo(Yt=>Yt.treasurySetupViewState.treasuryFundsDetails),xn=qo(Yt=>Yt.dashboardState.isTreasuryVideoClosed),an=j.isTreasuryPromoVideoRemindMeLaterClicked,Et=j.isTreasuryPromoVideoPlayed,Mn=j.loginCounterForTreasuryPromoVideo,go=m.useMemo(()=>wNr({isTreasuryPromoVideoRemindMeLaterClicked:an,isTreasuryPromoVideoPlayed:Et,loginCounterForTreasuryPromoVideo:Mn,isTreasuryVideoClosed:xn}),[j.isTreasuryPromoVideoRemindMeLaterClicked,j.isTreasuryPromoVideoPlayed,j.loginCounterForTreasuryPromoVideo,xn]),Qn=mH(d.pathname)==="home"&&go,yo=m.useCallback(()=>Ut&&ln&&Bt?.fetchStatus.fetchState==="Completed"&&!_i.getTreasuryPopupSeen(e??"")&&j.isTreasuryPromoVideoPlayed!==!0&&cn===!1&&mH(d.pathname)!=="treasury"&&Qn!==!0,[Ut,ln,cn,d.pathname,e,Bt?.fetchStatus,j.isTreasuryPromoVideoPlayed,go,Qn]),[Co,Xn]=m.useState(yo);m.useEffect(()=>{M&&Ut&&Bt?.fetchStatus.fetchState==="Not-Started"&&g(Ejt())},[M,Ut,Bt?.fetchStatus.fetchState]),m.useEffect(()=>{Xn(yo())},[yo]);const kn=ANr(Bt.fundsDetails),dn=j?.rewardsLastViewedTime==null,qn=S?.userEmail!=null&&G.fetchState==="Completed"&&Ijt(G.notificationSettings,S.userEmail,w,j),Io=m.useCallback(Yt=>{const uo=d.state?.referrer;if(oe.monthEndCloseChecks?.auditSummary!=null&&vd.trackMonthCloseAuditPage(Yt.month,Yt.year,oe.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",oe.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,uo??null),g(Ljt(j.tenantId,Yt)),q[j.tenantId]!=null){const Ao=g3(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${te.currentSelectedView}/${Yt.month}-${Yt.year}`,{state:{pathnameStackToGoBack:Ao,referrer:te.currentSelectedView}})}g(oge(te.currentSelectedView)),te.reconciliation.selectedAccountId!=null&&g(Tjt({selectedAccountId:void 0}))},[te.reconciliation.selectedAccountId,te.currentSelectedView,j.tenantId,oe.monthEndCloseChecks?.auditSummary,oe.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),ho=m.useMemo(()=>({zIndex:s||Co?12:$[2]}),[s,Co]),zo=I&&SNr(d),li=Tt.jsx(Vmo,{signedInUser:S,currentTenantId:pe.currentTenantId??"",tenants:pe.fetchState==="Completed"?ge:Gt!=null?[Gt]:[],rewardsConfiguration:{isRewardsTabVisible:H,isRewardsAnimated:dn,rewardsPlan:K.rewardsPlan},selectedMenu:n===!0?n2t("ai_cfo"):unt(d),isTenantDropdownDisabled:en,isSettings:vNr(d),isSettingsFeatureEnabled:B,currentTenant:j,isVendorsTabVisible:Zt,isZeniAccountEnabled:R,isChargeCardEnabled:F,isTreasuryEnabled:Ut,isTreasuryPopupVisible:Co,treasuryYieldPercentage:kn,isNotificationsTabVisible:qn,notificationCountDetails:dt,isExpenseAutomationEnabledForUser:z&&ll(j.userRole)===!1,isAiCfoAccessEnabled:I,onNotificationIconClick:()=>{hn(!1);const Yt=L?Ce===0&&Ae>0?"notifications/comments":"notifications/tasks":"notifications/comments",uo=g3(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${Yt}`,{state:{pathnameStackToGoBack:uo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:Yt=>{E(w2e.TENANT_SWITCHING),hn(!1);const uo=Yt.tenantEmailDomain,Ao=unt(d),Ni=Ao;let fo="";const ii=AN(Ni);Ao==="home"?fo+="dashboard":Ao==="users_and_roles"?fo+="people":_de(Ao)?fo+="settings/my_profile":PF(Ao)?fo+=`ai-cfo/${Ao}`:fo+=Ni==="task_checklist"?"tasks":ii?"month_end_close_checks/review":encodeURIComponent(Ao);const Kt=`/${encodeURIComponent(uo)}/${fo}`;u(Kt,{replace:!0}),S!=null&&(g(e1e(Yt.tenantId)),g(Bot(S.userId,Yt.tenantId,S.zeniSessionId)));const yn=Yt;vd.trackCompanySwitch(yn.companyId,yn.companyName,yn.userRole)},handleMenuChange:(Yt,uo)=>{if(S!=null&&vd.trackSidePanelClicked(Yt.type,Yt.group),hn(!1),e==null)return;if(n&&(Kt=>{if(_de(Kt)||PF(Kt))return!0;const yn=cnt(Kt).split("/")[0];return!CNr.includes(yn)})(Yt.type)&&o(!1),Yt.type==="ai_cfo"){if(vd.trackAICFOChatScreenStateChanged("viewed","left_menu",Le??null,null),!A)return void VRr({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const Kt=g3(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:Kt,referrer:"Sidebar"}})}const Ao=g3(d.state?.pathnameStackToGoBack,d.pathname),Ni=Yt.type,fo=AN(Ni)&&Ni!=="command_center";if(Ni!=="command_center"&&!fo||q[j.tenantId]==null||vd.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),fo&&q[j.tenantId]!=null){const Kt=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${Yt.type}/${Kt.month}-${Kt.year}`,{state:{pathnameStackToGoBack:Ao,message:uo,referrer:"Sidebar"}})}const ii=cnt(Yt.type);PF(Yt.type)?(Le!=null&&g(MF()),u(`/${e}/ai-cfo/${Yt.type}`,{state:{pathnameStackToGoBack:Ao.slice(0,-1),message:uo,referrer:"Sidebar"}})):u(`../${e}/${ii}`,{state:{pathnameStackToGoBack:Ao,message:uo,referrer:"Sidebar"}})},onDeleteChatSession:Yt=>{g(Djt(Yt)),Le===Yt&&ze(Yt)},handleLogOutClick:()=>{hn(!1);const Yt=g3(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:Yt,message:"logout"}})},handleMyProfileClick:()=>{u(`${e}/settings/my_profile`)},handleReferralsClick:()=>{u(`${e}/rewards`)},handleBackClick:()=>{u(`${e}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},handlePopupClose:()=>{_i.saveTreasuryPopupSeen(e??"",!0),Xn(!1)},monthEndCloseChecksView:oe,onPeriodChange:Io,onCalendarOpen:c,aiCfoView:je,isAiCfo:zo,isOnDashboard:ne,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:Yt=>{g(Jde({sessionId:Yt,agentId:"controller"})),u(`../${e}/ai-cfo/${Yt}`,{state:{...d.state}})},halloweenAnimationEnabled:de,thanksGivingAnimationEnabled:me,christmasAnimationEnabled:fe,newYearAnimationEnabled:be}),rr=Tt.jsx(IEt,{position:"fixed",className:Wm.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Tt.jsxs(LEt,{style:{minHeight:Zmt},children:[Tt.jsx(TEt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>hn(!0),className:Wm.menuButton,size:"large",children:Tt.jsx(LNr,{})}),Tt.jsx(TNr,{className:Wm.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),Go=Bre(Yt=>Yt.breakpoints.up("md")),Qr=Bre(Yt=>Yt.breakpoints.down("md"));return e==null?null:Tt.jsxs(ENr,{className:Wm.root,children:[Tt.jsx(DEt,{}),xe===!1?Tt.jsxs(Tt.Fragment,{children:[Go||!ne?null:rr,Tt.jsxs("nav",{className:Wm.drawer,children:[Go?null:Tt.jsx(_F,{container:window.document.body,variant:"temporary",open:r,onClose:()=>hn(!1),PaperProps:{sx:{width:iT,zIndex:$[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:li}),Qr?null:Tt.jsx(_F,{PaperProps:{sx:{width:iT,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...ho}},variant:"permanent",open:!0,children:li})]})]}):null]})});function pnt(e){return e?.data.unread!=null&&e?.mode!=null}const LNr=Fn(e=>m.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"})))`
79424
+ `,JI=Pnt(YEt()),MRr=["sandbox","production"],_Rr=["development","staging","production"],WS=()=>Mc==="DEV"||Mc==="QA"||Mc==="PUNE"||Mc==="SUNNYVALE"||Mc==="DELHI"||Mc==="MOHALI",g2e="https://zeni-webapp-qa.uc.r.appspot.com",Mc=G5("QA",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),xQr=(e=>G5(e,MRr))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Mc)),int=(e=>G5(e,_Rr))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Mc)),f2e=Mc==="DEV"||Mc==="QA"?.2:.8,HSt=f2e,Ua={sentryDsn:"",sentryTraceSamplingRate:f2e,sentryProfileSamplingRate:HSt,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let _$,oT;function zRr(e){Ua.sentryDsn=e.keys.SENTRY_DSN,Ua.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):f2e,Ua.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):HSt,Ua.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ua.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ua.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ua.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ua.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ua.pusherCluster=e.keys.PUSHER_CLUSTER,Ua.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ua.appUrl=e.keys.WEB_ENDPOINT,Ua.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ua.cardVaultId=e.keys.UNIT_VAULT_ID,Ua.stripeKey=e.keys.STRIPE_KEY,Ua.qboRedirectionUrl=e.keys.QBO_URL,Ua.mixpanelUrl=e.keys.MIXPANEL_URL,Ua.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,oT=e.externalEndPoints,_$=e.apiEndPoints,function(n,o){const r=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{r.add(new URL(s).origin)}catch{}for(const s of r){if(document.querySelector(`link[rel="preconnect"][href="${s}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=s,document.head.appendChild(c)}}(_$,oT)}let rnt=!1;function Pv(){rnt||(Zh.init("ed1936cb971f6aad4104ddbe708f812c",{api_host:oT.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),rnt=!0)}const ORr=new Set(Array.from(po.EVENTS_WITHOUT_SUPER_PROPERTIES));let ant=!1,lnt=!1;function Dde(){if(ant)return;ant=!0,Pv();const e=po.extractUtmParamsFromUrl();Object.keys(e).length>0&&Zh.register(e),WS()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const FRr=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function RRr(){const e=function(){return Zh?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||FRr.has(o));for(const o of n)Zh.unregister(o);WS()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function snt(){lnt||(lnt=!0,RRr())}class cS{identify(n,o){if(Pv(),this.#t=n,n!=null&&o!=null&&(cS.#e==null||!ljt({userId:n,traits:o},cS.#e))){const{$email:r,...a}={...o};Zh.identify(n),r&&r!=null&&Zh.people.set_once({$email:r}),Zh.people.set(a),cS.#e={userId:n,traits:o},WS()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,r,a,s){throw Error("Use identify in the web-app!!")}track(n,o){Pv();const r=ORr.has(n);if(this.#t!=null||r){if(Dde(),this.#t!=null){const a={distinct_id:this.#t,...o};Zh.track(n,a)}else Zh.track(n,o);if(snt(),WS()){const a=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(o)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(o)}`;console.log(a)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,o){Pv(),Dde(),Zh.track(n,o),snt(),WS()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){Pv(),Zh.alias(n,o)}reset(){Pv(),Zh.identify(void 0),this.#t=void 0,cS.#e=void 0}static#e;#t}const Pde=new cS,USt=new po.Analytics(Pde);USt.trackWithoutUserId=Pde.trackWithoutUserId.bind(Pde);const vd=USt,NRr="openAiCfoScope",Bde="openAiCfoScopeOnDashboard";function VRr(e){const{location:n,navigate:o,mergeState:r}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[Bde]:!0,...r}})}function yQr(e){const n=sT(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const o=n.uiState?.currentChatSessionId;return o!=null&&n.responseStateByChatSessionId?.[o]?.answer?.fetchState==="In-Progress"}function x2e(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,r=o?.questionAnswers??[],a=r[r.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:r}}function WSt(e,n){return(e||n?.chatSessionSummary)??null}const QSt="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",hH="zeni-ai-cfo-upload-promo-storage-changed",_i=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);return n!=null&&e!=null?JSON.parse(this.decrypt(n,e)):void 0}isZeniUser(){const e=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);if(this._isZeniUserCache!=null&&this._isZeniUserCache.encryptedUser===e)return this._isZeniUserCache.result;const n=this.getSignedInUser()?.userEmail?.toLowerCase().endsWith("@zeni.ai")===!0;return this._isZeniUserCache={encryptedUser:e,result:n},n}getShowNegativeAmountInParenthesis(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!1}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!0}getSignedInUserTenant(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantEmailDomain===e)}getSignedInUserTenantWithId(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantId===e)}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_ACTIVE_TENANT_DOMAIN);if(!(n==null||e==null)){const o=this.decrypt(n,e),r=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(r!=null)return JSON.parse(this.decrypt(r,e)).find(a=>a.tenantEmailDomain===o)}}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_FORCE_REFRESHED_COMPONENTS);if(n&&e!=null){const o=this.decrypt(n,e);return o?JSON.parse(o):[]}return[]}saveForceRefreshedComponents(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(e),n)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveActiveTenantDomainForUser(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_ACTIVE_TENANT_DOMAIN,this.encrypt(e,n)):console.warn("Can't update the active tenant domain when the user is logged out!")}saveSignedInUserWithSession(e,n){if(e==null||n==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.setItem(this.ZENI_SESSION_ID,n),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(e),n))}saveSignedInUserTenants(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),o)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(e),n))}saveShowNegativeAmountInParenthesisPDF(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(e),n))}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(e=>window.localStorage.getItem(e)!=null).reduce((e,n)=>e&&n)}clearAll(){const e=new Set([this.ZENI_MAGIC_LINK_EMAIL,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN]);this.ALL_IDs.filter(n=>!e.has(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_OTP_TOKEN}_card`).test(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_MAGIC_LINK_TRIGGERED}_`).test(n)).forEach(n=>window.localStorage.removeItem(n))}setTheme(e){window.localStorage.setItem(this.ZENI_THEME,e)}getTheme(){const e=window.localStorage.getItem(this.ZENI_THEME);if(e==="light"||e==="dark")return e;e!=null&&window.localStorage.removeItem(this.ZENI_THEME)}saveZeniOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null&&window.localStorage.setItem(this.ZENI_OTP_TOKEN,this.encrypt(JSON.stringify(e),n))}getZeniOtpToken(){const e=window.localStorage.getItem(this.ZENI_OTP_TOKEN),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null){let o=JSON.parse(this.decrypt(e,n));return o={...o,expiry:pn(o.expiry.toString())},o}}getTreasuryPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_TREASURY_POPUP_SEEN),!1}return!1}saveTreasuryPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(r))}getCardPolicyPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_CARD_POLICY_POPUP_SEEN),!1}return!1}saveCardPolicyPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_CARD_POLICY_POPUP_SEEN,JSON.stringify(r))}getAiCfoUploadPromoSeen(e){const n=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);if(n!=null)try{const o=JSON.parse(n);return o!==null&&typeof o=="object"&&o[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(hH)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(hH))}savePayNowInfoTooltip(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),o))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_PAY_NOW_INFO_TOOLTIP),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null)try{const o=this.decrypt(e,n);return o===""||o==null?void 0:JSON.parse(o)}catch{return}}saveZeniOtpTokenForCardHolder(e,n){const o=window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),o))}getZeniOtpTokenForCardHolder(e){const n=window.localStorage.getItem(`${this.ZENI_OTP_TOKEN}_${e}`),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)try{const r=this.decrypt(n,o);if(r===""||r==null)return;let a=JSON.parse(r);return a={...a,expiry:pn(a.expiry.toString())},a}catch{return}}saveMagicLinkCodeVerifier(e){window.localStorage.setItem(this.ZENI_CODE_VERIFIER,e)}getMagicLinkCodeVerifier(){return window.localStorage.getItem(this.ZENI_CODE_VERIFIER)}saveMagicLinkTriggered(e){window.localStorage.setItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`,"true")}isMagicLinkTriggered(e){const n=window.localStorage.getItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`);return n!=null&&n==="true"}saveLastUsedMagicLinkToken(e){window.localStorage.setItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getLastUsedMagicLinkToken(){const e=window.localStorage.getItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),n="7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c";if(e!=null)try{return this.decrypt(e,n)}catch{return window.localStorage.removeItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),null}return null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){const e=window.localStorage.getItem(this.ZENI_MAGIC_LINK_EMAIL);return e!=null?this.decrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"):null}encrypt(e,n){return JI.AES.encrypt(e,n).toString()}decrypt(e,n){return JI.AES.decrypt(e,n).toString(JI.enc.Utf8)}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_ACTIVE_TENANT_DOMAIN="ZENI_ACTIVE_TENANT_DOMAIN";ZENI_THEME="ZENI_THEME";ZENI_OTP_TOKEN="ZENI_OTP_TOKEN";ZENI_PAY_NOW_INFO_TOOLTIP="ZENI_PAY_NOW_INFO_TOOLTIP";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";ZENI_CODE_VERIFIER="ZENI_CODE_VERIFIER";ZENI_MAGIC_LINK_TRIGGERED="ZENI_MAGIC_LINK_TRIGGERED";ZENI_LAST_USED_MAGIC_LINK_TOKEN="ZENI_LAST_USED_MAGIC_LINK_TOKEN";ZENI_MAGIC_LINK_EMAIL="ZENI_MAGIC_LINK_EMAIL";ZENI_TREASURY_POPUP_SEEN="ZENI_TREASURY_POPUP_SEEN";ZENI_CARD_POLICY_POPUP_SEEN="ZENI_CARD_POLICY_POPUP_SEEN";ZENI_AI_CFO_UPLOAD_PROMO_SEEN=QSt;ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_THEME,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS,this.ZENI_PAY_NOW_INFO_TOOLTIP,this.ZENI_TREASURY_POPUP_SEEN,this.ZENI_CARD_POLICY_POPUP_SEEN,this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,this.ZENI_CODE_VERIFIER,this.ZENI_MAGIC_LINK_TRIGGERED,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_MAGIC_LINK_EMAIL]},g3=(e,n)=>{const o=[...e??[]];return o.push(n),o},bQr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},wQr=({state:e})=>_i.isSignedIn()===!0?Tt.jsx(skt,{}):Tt.jsx(znt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function HRr(){const e=Ju(),n=lh(),o=lT(),{tenantEmailDomain:r}=Ont(),[a,s]=m.useState(!1),c=qo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?X1(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=qo(x=>sT(x));m.useEffect(()=>{const x=n.state;x?.[Bde]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[Bde]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(r==null)return;const x=g3(n.state?.pathnameStackToGoBack,n.pathname);o(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,r]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e($ot(c.userRoleId))},[e,d,c?.userRoleId]);return Tt.jsx(gSt,{open:a,onClose:g,children:Tt.jsxs(mSt,{children:[a&&!d?Tt.jsx(yhe,{analytics:vd,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Tt.jsx(ble,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const Mde=m.createContext(void 0);function KG(){const e=m.useContext(Mde);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const y2e=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],b2e=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],GSt=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],YSt=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],qSt=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],KSt=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],ZSt=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],JSt=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],XSt=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function e$t(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let o=1;o<n.length;o+=1)if(n[o]==="transaction")return!0;return!1}const t$t=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],n$t=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],o$t=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],URr=[...GSt,...y2e,...b2e,"/:tenantEmailDomain/vendors/*","/:tenantEmailDomain/vendors","/:tenantEmailDomain/month_end_close_checks/*","/:tenantEmailDomain/month_end_close_checks","/:tenantEmailDomain/tasks/*","/:tenantEmailDomain/tasks","/:tenantEmailDomain/bills/*","/:tenantEmailDomain/bills","/:tenantEmailDomain/reimbursements/*","/:tenantEmailDomain/reimbursements",...t$t,...n$t,...o$t,...YSt,...qSt,...KSt,...ZSt,...JSt,...XSt];function i$t(){const{pathname:e}=lh(),n=e??"";return URr.some(o=>zde(o,n)!=null)||e$t(e)}function jc(e){const{pathname:n}=lh(),o=n??"";return e.some(r=>zde(r,o)!=null)}const r$t=m.createContext(null),w2e={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function WRr({children:e}){const[n,o]=m.useState(()=>new Set([])),r=n.size>0,a=m.useCallback(d=>{o(u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p})},[]),s=m.useCallback(d=>{o(u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p})},[]),c={isLoading:r,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Tt.jsx(r$t.Provider,{value:c,children:e})}function ZG(){const e=m.useContext(r$t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}const QRr=e=>{const n=Z.currencyFormatter(0);return o=>{const r=cjt(e.chargeCardState,o);if(r==null)return;const a=djt(e.userState,r.cardHolderUserId),s=((u,p,h)=>{const g=u!=null&&u.length>0,f=p!=null&&p.length>0;return g&&f?`${u} ${p}`:g?u:f?p:h??""})(a?.firstName,a?.lastName,a?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:s,recommendedLimitFormatted:d}}},GRr=e=>n=>{const o=sjt(e.cardPolicyState,n);if(o==null)return;const r=o.cardsCount>0?o.cardsCount:o.appliedCards.length,a=o.allowedEntity.merchantNames.length+o.blockedEntity.merchantNames.length,s=o.allowedEntity.categoryCodes.length+o.blockedEntity.categoryCodes.length;return{name:o.name,description:o.description,cardsCount:r,vendorRestrictionsCount:a,categoryRestrictionsCount:s}},a$t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],l$t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],YRr=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],qRr=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],KRr=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],ZRr=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],JRr=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],s$t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],c$t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],XRr=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function C2e(e){const n=Yu(e),o=n.indexOf("review");if(o<2||n[o-1]!=="month_end_close_checks")return null;if(o===n.length-1)return"overview";const r=n[o+1];return r==null?"overview":XRr.includes(r)?r:null}const eNr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),tNr=new Set(["setup","verification","promo","approval-rules"]);function Yu(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function v2e(e){const n=Yu(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const r=n[o+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const a=n[o+2];return a==="prepaid_expenses"?"prepaid_expenses":a==="fixed_assets"?"fixed_assets":a==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function d$t(e,n,o){const r=Yu(e);return!(r.length<2||r[1]!==n)&&(r.length===2||o(r[2]))}function u$t(e,n,o){return d$t(e,n,r=>!o.has(r))}function p$t(e){return u$t(e,"bills",eNr)}function h$t(e){return u$t(e,"reimbursements",tNr)}function m$t(e){return d$t(e,"tasks",n=>n==="group")}const nNr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),oNr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function S2e(e){const n=Yu(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return nNr.has(o)?"checking":"checking_details"}function $2e(e){const n=Yu(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];if(o==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return oNr.has(o)?"cards":"cards_detail"}function g$t(e){const n=Yu(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function f$t(e){return Yu(e)[1]==="performance"?"performance":void 0}function x$t(e){const n=Yu(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function y$t(e){const n=Yu(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function bm(e,n){return n.some(o=>zde(o,e)!=null)}function iNr(e){return bm(e,y2e)?"reports":bm(e,a$t)?"ap_aging":bm(e,l$t)?"ar_aging":v2e(e)!=null?"vendors_tab":bm(e,b2e)?"forecast":C2e(e)!=null?"month_end_close_review":bm(e,s$t)?"cash_balance":bm(e,c$t)?"card_balance":m$t(e)?"task_checklist":g$t(e)!=null?"transaction_detail":f$t(e)!=null?"performance":x$t(e)!=null?"bills_detail":y$t(e)!=null?"reimbursement_detail":p$t(e)?"bills_list":h$t(e)?"reimbursement_list":bm(e,YRr)?"cash_in_cash_out":bm(e,qRr)?"operating_expenses":bm(e,KRr)?"revenue":bm(e,ZRr)?"net_burn_or_income":bm(e,JRr)?"cash_position":function(n){const o=Yu(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":S2e(e)!=null?"checking":function(n){return Yu(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":$2e(e)!=null?"cards":function(n){return Yu(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return Yu(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return Yu(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function b$t(e,n){switch(iNr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(r){switch(r){case"balance_sheet":return"balance_sheet";case"profit_and_loss":case"profit_and_loss_by_classes":return"profit_loss";case"cash_flow":return"cash_flow";case"vendor":case"vendors_tab":return"vendors";case"accounts_payable_aging":return"accounts_payable";case"accounts_receivable_aging":return"accounts_receivable";case"transaction_detail":return"transaction_details";case"transaction_list_of_account":case"transaction_list_of_account_by_class":case"transaction_list_missing_receipt":return"transactions";default:return}}(o)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return v2e(e);case"forecast":return"forecast";case"month_end_close_review":{const o=C2e(e);return o==null?void 0:function(r){switch(r){case"overview":return"command_centre";case"transaction_categorization":return"transactions";case"je_schedules":return"je_schedules";case"reconciliation":return"reconciliation";case"missing_receipts":return"receipts";case"flux_analysis":return"flux_analysis";case"month_end_insights":return"mei"}}(o)}case"cash_balance":return"cash_balance";case"card_balance":return"card_balance";case"task_checklist":return"task_checklist";case"transaction_detail":return"transaction_details";case"performance":return"performance";case"bills_detail":return"bills_details";case"reimbursement_detail":return"reimbursement_details";case"bills_list":return"bills_list";case"reimbursement_list":return"reimbursement_list";case"cash_in_cash_out":return"cash_in_cash_out";case"operating_expenses":return"operating_expenses";case"revenue":return"revenue";case"net_burn_or_income":return"net_burn_or_income";case"cash_position":return"cash_position";case"dashboard":return"dashboard";case"checking":return S2e(e);case"treasury":return"treasury";case"cards":return $2e(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function w$t(){const{pathname:e}=lh(),n=e??"",o=qo(r=>r.financeStatementState?.selectedReportId);return m.useMemo(()=>b$t(n,{selectedReportId:o}),[n,o])}function JG(){const{useFeatureGate:e}=ba(),{isFeatureEnabled:n}=e(Li.isAiCfoEnabled),o=qo(a=>X1(a)),r=_i.getSignedInUser();return r!=null&&r.userId!=null&&o!=null&&o.companyId!=null&&n}function rNr(){const{useFeatureGate:e}=ba(),{isFeatureEnabled:n}=e(Li.isAiCfoNavButtonEnabled),o=JG();return n&&o}const C$t=m.createContext(void 0),aNr=({children:e})=>{const{tenantEmailDomain:n}=Ont(),o=n!=null?_i.getSignedInUserTenant(n):void 0,r=qo(u=>X1(u)),a=cT().tenantId,s=o?.tenantId,c=r?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Tt.jsx(C$t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},lNr=()=>{const e=m.useContext(C$t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function v$t(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function S$t(e){const{areTenantIdsInSync:n}=lNr(),o=JG(),r=rNr();return n&&e&&r&&o}function CQr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,r=Ju(),a=Fnt(),s=m.useRef(null);m.useEffect(()=>{const c=s.current===!1&&o===!0;if(s.current=o,o&&n!=null&&n.length!==0)for(const d of n){const u=Xde(a.getState(),d)?.fetchState;v$t(u,c)&&r(kot({pageContext:d}))}},[o,r,n,a])}function $$t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:r,noCardCreated:a}=n,s=Ju(),c=Fnt(),d=m.useRef(null),u=m.useRef(void 0);m.useEffect(()=>{const p=d.current===!1&&r===!0;d.current=r;const h=u.current!==void 0&&u.current!==a;if(u.current=a,o==null||!r)return;const g=Xde(c.getState(),o)?.fetchState;v$t(g,p||h)&&s(kot({pageContext:o,noCardCreated:a}))},[r,s,a,o,c])})({canFetchSuggestedQuestions:S$t(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function vQr(e){$$t({pageContext:w$t(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:sNr,sampleQuestion2:cNr,sampleQuestion3:dNr}}=Z.getLocalizedStrings().aiCfo,uNr=[sNr,cNr,dNr];function pNr(e,n=!1){$$t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=S$t(!0),r=qo(g=>e!=null&&e!==""?Xde(g,e):void 0),{useDynamicConfig:a}=ba(),{configValue:s}=a(lg.aiCfoMessageDynamicConfig),c=m.useMemo(()=>Array.isArray(s?.default_message_list)?[...s.default_message_list]:[],[s?.default_message_list]),d=m.useMemo(()=>c.length>0?c:[...uNr],[c]),u=e!=null&&e!=="",p=u&&o&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(r?.fetchState==="Error")return d;const g=(r?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function hNr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!_i.getAiCfoUploadPromoSeen(n),[e,n]),[r,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(hH,s);const c=d=>{d.key===QSt&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(hH,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback(()=>{n!=null&&_i.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const k$t=m.createContext(void 0),k2e=()=>m.useContext(k$t),mNr=e=>{const n=_i.isSignedIn(),o=_i.getSignedInUser(),[r,a]=m.useState(void 0),s=m.useMemo(()=>r,[r]),c=qo(p=>X1(p)),d=c.companyId,u=c.userRoleId;return m.useEffect(()=>{let p,h=!1;if(n&&c.tenantId!=null&&o?.userId!=null&&o.zeniSessionId!=null){r!=null&&(r.channels.all().forEach(w=>{r.unsubscribe(w.name)}),r.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await fjt(Ua.pusherClientSecret,{cluster:Ua.pusherCluster},{userId:g,tenantId:f,sessionId:x},!0)}catch(C){return void console.warn("Failed to initialize Pusher",C)}h?w?.disconnect():(a(w),w!=null&&(d!=null&&XI(w,d),g!=null&&XI(w,g),u!=null&&XI(w,u)))},b=()=>{const w=cT();return w.tenantId===f&&w.userId===g&&w.sessionId===x};if(b())y();else{let w=0;p=setInterval(()=>{h||(w++,b()?(clearInterval(p),y()):w>=30&&(clearInterval(p),jot(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),r?.channels.all().forEach(g=>r?.unsubscribe(g.name)),r?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Tt.jsx(k$t.Provider,{value:s,children:e.children})};function XI(e,n){const o=`private-encrypted-${n}`,r=e.channel(o);if(r?.subscribed===!0)return r;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const gNr=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},A2e=e=>n=>{const o=k2e(),r=m.useRef(n.eventCallback),a=m.useRef(n.onSubscribed),s=m.useRef({}),c=m.useRef(0);m.useEffect(()=>{r.current=n.eventCallback,a.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;s.current=g},[n]);const d=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(a.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,a.current(s.current))};return u.forEach(f=>{const[x,y]=gNr(f);if(y==="")return;const b=o.channel(x),w=v=>{r.current(y,v,s.current)};let C;if(b?.subscribed===!0)C=b,C.bind(y,w),h.has(x)||(h.add(x),g()),p.push(()=>{b.unbind(y,w)});else{if(C=b??o.subscribe(x),C.bind(y,w),!h.has(x)){h.add(x);const v=()=>{g()};C.bind("pusher:subscription_succeeded",v),p.push(()=>{C.unbind("pusher:subscription_succeeded",v)})}p.push(()=>{C.unbind(y,w)})}}),()=>{p.forEach(f=>f())}}},[o,d]),Tt.jsx(e,{...n})},fNr=({children:e})=>{const n=Bre("(prefers-color-scheme: dark)"),[o,r]=T.useState({dark:n});m.useEffect(()=>{const d=_i.getTheme()==null?n:_i.getTheme()==="dark";o.dark!==d&&r({dark:d})},[o,n]);const a=o.dark?HF({palette:{mode:"dark"},...rTe},aTe,moo,foo):HF({palette:{mode:"light"},...rTe},aTe,hoo,goo),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Tt.jsx(OFn,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;_i.setTheme(d?"dark":"light"),r({...o,dark:d})},nonce:c,children:e})},A$t=m.createContext(!1),xNr=A$t.Provider;function yNr(){return m.useContext(A$t)}const bNr=()=>qo(e=>X1(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}=lkt();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}})();function wNr({isTreasuryPromoVideoRemindMeLaterClicked:e,isTreasuryPromoVideoPlayed:n,loginCounterForTreasuryPromoVideo:o,isTreasuryVideoClosed:r=!1}){return!r&&!n&&(!e||o>0&&o%5==0)}const _de=e=>PAn.includes(e),PF=e=>o2t.includes(e),cnt=e=>_de(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":AN(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:PF(e)?`ai-cfo/${e}`:e,CNr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],dnt=(e,n)=>e.includes(n),mH=e=>{switch(e.split("/")[2]){case"cards":return"cards";case"rewards":case"dashboard":case"transactions":case"transaction":case"notifications":return"home";case"checking":return"checking";case"bills":case"bill":return"bills";case"reimbursements":case"reimbursement":return"reimbursements";case"vendors":return"vendors";case"forecast":return"forecast";case"reports":return"reports";case"tasks":case"task":return"task_checklist";case"people":return"users_and_roles";case"settings":return function(n){if(n==null)return;const o=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of o)if(dnt(n,r))switch(r){case"accounting":return"accounting";case"approval_rules":return"approval_rules";case"billing":return"billing";case"my_bank_connections":return"my_bank_connections";case"bank_connections":return"bank_connections";case"business_verification":return"business_verification";case"company_details":return"company_details";case"integrations":return"integrations";case"my_profile":return"my_profile";case"notifications":return"notifications"}}(e);case"performance":return"performance";case"month_end_close_checks":return function(n){if(!n.includes("month_end_close_checks/review"))return"command_center";const o=n.split("/"),r=o.indexOf("review"),a=r>=0?o[r+1]:void 0;return a!=null&&AN(a)?n2t(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of o2t)if(dnt(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function unt(e){let n=mH(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<o.length&&n==null;++r)n=mH(o[r])}return n??"home"}function vNr(e){return e.pathname.includes("settings")}function SNr(e){return e.pathname.includes("ai-cfo")}const $Nr=()=>{const e=kNr();return bE("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},kNr=()=>lh().state?.message==="expenseAutomation";function ANr(e){return(e??[]).reduce((n,o)=>{const r=o.yield;return Math.max(n,r)},0)}const jNr=(e,n,o)=>{const r=Eot(e),a=xjt(e),s=Iot(o,e);return n||o||a||r||s},dv="AppDrawer",Wm={root:`${dv}-root`,drawer:`${dv}-drawer`,appBar:`${dv}-appBar`,menuButton:`${dv}-menuButton`,appBarZenilogo:`${dv}-appBarZenilogo`,drawerZenilogo:`${dv}-drawerZenilogo`},iT=210,ENr=Fn("div",{slot:"Root"})(({theme:e})=>({[`&.${Wm.root}`]:{display:"flex"},[`& .${Wm.drawer}`]:{[e.breakpoints.up("md")]:{width:iT,flexShrink:0,backgroundColor:e.colors.background}},[`& .${Wm.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${Wm.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${Wm.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${Wm.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),INr=A2e(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=KG(),[r,a]=T.useState(!1),[s,c]=m.useState(!1),d=lh(),u=lT(),p=cT(),h=Jpe(),g=Ju(),[f,x]=m.useState(!1),y=Pe(),{useFeatureGate:b}=ba(),{isFeatureEnabled:w}=b(Li.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(Li.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(Li.isExpenseAutomationEnabledV2),[S,k]=m.useState(()=>_i.getSignedInUser());m.useEffect(()=>{const Yt=()=>{const uo=_i.getSignedInUser();k(uo)};return window.addEventListener("completeProfileDone",Yt),()=>{window.removeEventListener("completeProfileDone",Yt)}},[]);const j=qo(Yt=>X1(Yt)),A=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=ZG(),I=JG(),L=P6(S),z=v||C&&L,M=yNr(),[_,U]=m.useState(void 0),{isFeatureEnabled:R}=b(Li.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(Li.isChargeCardFeatureEnabled),F=jNr(j,O,w),{isFeatureEnabled:B}=b(Li.isSettingsFeatureEnabled),{isFeatureEnabled:H}=b(Li.isReferralFeatureEnabled),{isFeatureEnabled:N}=b(Li.isTreasuryEnabled),{isFeatureEnabled:Q}=b(Li.isTaskManagerCustomerUserAccessEnabled),V=L||!L&&Q,G=qo(Yt=>bjt(Yt));m.useEffect(()=>{const Yt=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",Yt),()=>{window.removeEventListener("scroll",Yt)}},[]);const K=qo(Yt=>wjt(Yt)),q=qo(Yt=>Yt.expenseAutomationViewState.selectedPeriodByTenantId),te=qo(Yt=>Cjt(Yt)),{monthEndCloseChecksView:oe}=te,X=bE("/signout")!==null,ne=bE("/:tenantEmailDomain/dashboard")!==null,ie=bE("/:tenantEmailDomain/reports")!==null,ae=bE("/:tenantEmailDomain/onboarding/*")!==null,ue=$Nr();m.useEffect(()=>{M&&H&&!ae&&K.fetchState==="Not-Started"&&g(vjt(!0))},[M,H,K.fetchState,ae]),m.useEffect(()=>{if(ue){const Yt=d.state?.origin;if(Yt!=null){const uo=Sjt(Yt);uo!=null&&g(oge(uo))}}},[ue,d.state]);const xe=X||ae,pe=qo(Yt=>Yt.tenantState),ge=qo(Yt=>pe.fetchState==="Completed"?Tot(Yt):[]),{isFeatureEnabled:re}=b(Li.isApAgingFeatureEnabled),{isFeatureEnabled:se}=b(Li.isArAgingFeatureEnabled),{isFeatureEnabled:de}=b(Li.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:me}=b(Li.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(Li.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:be}=b(Li.isDashboardSidebarNewYearAnimationEnabled),ye=qo(Yt=>xw(Yt).totalUnreadCount),Ce=qo(Yt=>xw(Yt).notificationDetailsByTab.tasks.uiState.unreadCount),Ae=qo(Yt=>xw(Yt).notificationDetailsByTab.comments.uiState.unreadCount),Te=qo(Yt=>xw(Yt).reducedFetchCountState),Ie=qo(Yt=>xw(Yt).notificationDetailsByTab.tasks.fetchCountState),je=qo(Yt=>sT(Yt)),[Fe,ze]=m.useState(void 0),Le=je.uiState.currentChatSessionId,Se=Fe!=null?je.deleteChatSessionStateByChatSessionId[Fe]?.fetchState:void 0,ve=Pt(Se),{inboxNotifications:Me,isLoading:Be,isFetchingMore:Re,hasFetchedAll:it,fetchMore:Qe}=bNr(),Ue=qo(Yt=>xw(Yt).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const Yt=setTimeout(()=>Qe?.(),0);return()=>clearTimeout(Yt)}),m.useEffect(()=>{if(Fe!=null)return ve==="In-Progress"&&Se==="Completed"?(g(ige({chatSessionId:Fe})),ze(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Se==="Error"&&(g(ige({chatSessionId:Fe})),ze(void 0)))},[g,d.state,u,Se,Fe,ve,e]),m.useEffect(()=>{if(Be===!1&&Re===!1&&it===!0&&j?.companyId!=null&&Me!=null){const Yt=`dashboard_${j.companyId}`;U(Me.filter(uo=>uo.roomId===Yt&&uo.readAt==null).length)}},[Be,Re,it,j?.companyId,Me]),m.useEffect(()=>{M&&L&&!ae&&Ie.fetchState==="Not-Started"&&p.tenantId!=null&&g($jt("task_manager","dashboard"))},[M,p.tenantId]),m.useEffect(()=>{ae||Ue.fetchState!=="Not-Started"||g(rge({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(_!=null){const{fetchState:Yt}=Ue;Yt!=="In-Progress"&&Yt!=="Completed"||(Yt==="In-Progress"&&g(rge({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(Lot({unreadCount:_},"comments")))}},[_,Ue.fetchState]);const dt={fetchStatus:Te,count:ye},tt=[];re===!1&&tt.push("accounts_payable_aging"),se===!1&&tt.push("accounts_receivable_aging"),R===!1&&tt.push("zeni_accounts_promo_card"),H===!1&&tt.push("rewards_card"),z===!1&&tt.push("expense_automation_card");const Ht=gn(),xt=qo(Yt=>kjt(Yt,tt,S,v,C,N).fetchState),nt=qo(Yt=>Ajt(Yt).fetchState),kt=e!=null?_i.getSignedInUserTenant(e):null,Gt=qo(Yt=>kt?.tenantId!=null?Dot(Yt,kt.tenantId):void 0),en=ne&&(xt==="Completed"||xt==="Error")||ie&&(nt==="Completed"||nt==="Error")||!ne&&!ie?void 0:"disabled",rt=m.useMemo(()=>Pot(j.userRole),[j.userRole]),Zt=Znt(rt),hn=Yt=>{a(Yt)},bt=j.company!=null&&jjt(j.company),Ut=N&&bt,ln=Jnt(Ht?.loggedInUserRoleMap),cn=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Bt=qo(Yt=>Yt.treasurySetupViewState.treasuryFundsDetails),xn=qo(Yt=>Yt.dashboardState.isTreasuryVideoClosed),an=j.isTreasuryPromoVideoRemindMeLaterClicked,Et=j.isTreasuryPromoVideoPlayed,Mn=j.loginCounterForTreasuryPromoVideo,go=m.useMemo(()=>wNr({isTreasuryPromoVideoRemindMeLaterClicked:an,isTreasuryPromoVideoPlayed:Et,loginCounterForTreasuryPromoVideo:Mn,isTreasuryVideoClosed:xn}),[j.isTreasuryPromoVideoRemindMeLaterClicked,j.isTreasuryPromoVideoPlayed,j.loginCounterForTreasuryPromoVideo,xn]),Qn=mH(d.pathname)==="home"&&go,yo=m.useCallback(()=>Ut&&ln&&Bt?.fetchStatus.fetchState==="Completed"&&!_i.getTreasuryPopupSeen(e??"")&&j.isTreasuryPromoVideoPlayed!==!0&&cn===!1&&mH(d.pathname)!=="treasury"&&Qn!==!0,[Ut,ln,cn,d.pathname,e,Bt?.fetchStatus,j.isTreasuryPromoVideoPlayed,go,Qn]),[Co,Xn]=m.useState(yo);m.useEffect(()=>{M&&Ut&&Bt?.fetchStatus.fetchState==="Not-Started"&&g(Ejt())},[M,Ut,Bt?.fetchStatus.fetchState]),m.useEffect(()=>{Xn(yo())},[yo]);const kn=ANr(Bt.fundsDetails),dn=j?.rewardsLastViewedTime==null,qn=S?.userEmail!=null&&G.fetchState==="Completed"&&Ijt(G.notificationSettings,S.userEmail,w,j),Io=m.useCallback(Yt=>{const uo=d.state?.referrer;if(oe.monthEndCloseChecks?.auditSummary!=null&&vd.trackMonthCloseAuditPage(Yt.month,Yt.year,oe.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",oe.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,uo??null),g(Ljt(j.tenantId,Yt)),q[j.tenantId]!=null){const Ao=g3(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${te.currentSelectedView}/${Yt.month}-${Yt.year}`,{state:{pathnameStackToGoBack:Ao,referrer:te.currentSelectedView}})}g(oge(te.currentSelectedView)),te.reconciliation.selectedAccountId!=null&&g(Tjt({selectedAccountId:void 0}))},[te.reconciliation.selectedAccountId,te.currentSelectedView,j.tenantId,oe.monthEndCloseChecks?.auditSummary,oe.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),ho=m.useMemo(()=>({zIndex:s||Co?12:$[2]}),[s,Co]),zo=I&&SNr(d),li=Tt.jsx(Vmo,{signedInUser:S,currentTenantId:pe.currentTenantId??"",tenants:pe.fetchState==="Completed"?ge:Gt!=null?[Gt]:[],rewardsConfiguration:{isRewardsTabVisible:H,isRewardsAnimated:dn,rewardsPlan:K.rewardsPlan},selectedMenu:n===!0?n2t("ai_cfo"):unt(d),isTenantDropdownDisabled:en,isSettings:vNr(d),isSettingsFeatureEnabled:B,currentTenant:j,isVendorsTabVisible:Zt,isZeniAccountEnabled:R,isChargeCardEnabled:F,isTreasuryEnabled:Ut,isTreasuryPopupVisible:Co,treasuryYieldPercentage:kn,isNotificationsTabVisible:qn,notificationCountDetails:dt,isExpenseAutomationEnabledForUser:z&&ll(j.userRole)===!1,isAiCfoAccessEnabled:I,onNotificationIconClick:()=>{hn(!1);const Yt=L?Ce===0&&Ae>0?"notifications/comments":"notifications/tasks":"notifications/comments",uo=g3(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${Yt}`,{state:{pathnameStackToGoBack:uo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:Yt=>{E(w2e.TENANT_SWITCHING),hn(!1);const uo=Yt.tenantEmailDomain,Ao=unt(d),Ni=Ao;let fo="";const ii=AN(Ni);Ao==="home"?fo+="dashboard":Ao==="users_and_roles"?fo+="people":_de(Ao)?fo+="settings/my_profile":PF(Ao)?fo+=`ai-cfo/${Ao}`:fo+=Ni==="task_checklist"?"tasks":ii?"month_end_close_checks/review":encodeURIComponent(Ao);const Kt=`/${encodeURIComponent(uo)}/${fo}`;u(Kt,{replace:!0}),S!=null&&(g(e1e(Yt.tenantId)),g(Bot(S.userId,Yt.tenantId,S.zeniSessionId)));const yn=Yt;vd.trackCompanySwitch(yn.companyId,yn.companyName,yn.userRole)},handleMenuChange:(Yt,uo)=>{if(S!=null&&vd.trackSidePanelClicked(Yt.type,Yt.group),hn(!1),e==null)return;if(n&&(Kt=>{if(_de(Kt)||PF(Kt))return!0;const yn=cnt(Kt).split("/")[0];return!CNr.includes(yn)})(Yt.type)&&o(!1),Yt.type==="ai_cfo"){if(vd.trackAICFOChatScreenStateChanged("viewed","left_menu",Le??null,null),!A)return void VRr({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const Kt=g3(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:Kt,referrer:"Sidebar"}})}const Ao=g3(d.state?.pathnameStackToGoBack,d.pathname),Ni=Yt.type,fo=AN(Ni)&&Ni!=="command_center";if(Ni!=="command_center"&&!fo||q[j.tenantId]==null||vd.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),fo&&q[j.tenantId]!=null){const Kt=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${Yt.type}/${Kt.month}-${Kt.year}`,{state:{pathnameStackToGoBack:Ao,message:uo,referrer:"Sidebar"}})}const ii=cnt(Yt.type);PF(Yt.type)?(Le!=null&&g(MF()),u(`/${e}/ai-cfo/${Yt.type}`,{state:{pathnameStackToGoBack:Ao.slice(0,-1),message:uo,referrer:"Sidebar"}})):u(`../${e}/${ii}`,{state:{pathnameStackToGoBack:Ao,message:uo,referrer:"Sidebar"}})},onDeleteChatSession:Yt=>{g(Djt(Yt)),Le===Yt&&ze(Yt)},handleLogOutClick:()=>{hn(!1);const Yt=g3(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:Yt,message:"logout"}})},handleMyProfileClick:()=>{u(`${e}/settings/my_profile`)},handleReferralsClick:()=>{u(`${e}/rewards`)},handleBackClick:()=>{u(`${e}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},handlePopupClose:()=>{_i.saveTreasuryPopupSeen(e??"",!0),Xn(!1)},monthEndCloseChecksView:oe,onPeriodChange:Io,onCalendarOpen:c,aiCfoView:je,isAiCfo:zo,isOnDashboard:ne,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:Yt=>{g(Jde({sessionId:Yt,agentId:"controller"})),u(`../${e}/ai-cfo/${Yt}`,{state:{...d.state}})},halloweenAnimationEnabled:de,thanksGivingAnimationEnabled:me,christmasAnimationEnabled:fe,newYearAnimationEnabled:be}),rr=Tt.jsx(IEt,{position:"fixed",className:Wm.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Tt.jsxs(LEt,{style:{minHeight:Zmt},children:[Tt.jsx(TEt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>hn(!0),className:Wm.menuButton,size:"large",children:Tt.jsx(LNr,{})}),Tt.jsx(TNr,{className:Wm.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),Go=Bre(Yt=>Yt.breakpoints.up("md")),Qr=Bre(Yt=>Yt.breakpoints.down("md"));return e==null?null:Tt.jsxs(ENr,{className:Wm.root,children:[Tt.jsx(DEt,{}),xe===!1?Tt.jsxs(Tt.Fragment,{children:[Go||!ne?null:rr,Tt.jsxs("nav",{className:Wm.drawer,children:[Go?null:Tt.jsx(_F,{container:window.document.body,variant:"temporary",open:r,onClose:()=>hn(!1),PaperProps:{sx:{width:iT,zIndex:$[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:li}),Qr?null:Tt.jsx(_F,{PaperProps:{sx:{width:iT,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...ho}},variant:"permanent",open:!0,children:li})]})]}):null]})});function pnt(e){return e?.data.unread!=null&&e?.mode!=null}const LNr=Fn(e=>m.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"})))`
79425
79425
  height: 20px;
79426
79426
  width: 20px;
79427
79427
  color: ${e=>e.theme.colors.primary};
@@ -79518,7 +79518,7 @@ ${Va.beneficiaryAddress} ${te}`,d(xe),L(!0)})(o),"data-testid":Y("title-text-cop
79518
79518
  display: flex;
79519
79519
  min-height: 100%;
79520
79520
  flex-direction: column;
79521
- `,nVr=()=>{const[e,n]=m.useState(()=>_i.getSignedInUser()),o=Ju(),[r,a]=m.useState(!1),[s,c]=m.useState(!1),d=qo(g=>_ot(g).fetchState),u=qo(g=>X1(g));m.useEffect(()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);a(g)},[e]);const p=m.useCallback(()=>{const g=_i.getSignedInUser();n(f=>JSON.stringify(f)!==JSON.stringify(g)?g:f)},[]);m.useEffect(()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)}),[]),m.useEffect(()=>{d!=="In-Progress"&&d!=="Completed"&&o(mEt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Tt.jsxs(m.Fragment,{children:[s&&Tt.jsx(bhe,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Tt.jsx(eVr,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},hnt="init-enter",oVr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const r=n.get(o||hnt);iVr(r!==void 0?r:0)}),null},(e,n)=>{const{location:o,visitedUrl:r}=e,{location:a}=n,s=o.pathname||hnt,c=rVr();return r.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),iVr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),rVr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},kh=e=>m.lazy(async()=>{const n=e.toString(),o=_i.getForceRefreshedComponents(),r=new Set(o),a=_i.isSignedIn(),s=r.has(n);try{const c=await e();return r.delete(n),a&&_i.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw s||(r.add(n),a&&_i.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}}),L$t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),T$t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),D$t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),P$t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function ss(...e){const n=Mc==="DEV"||Mc==="QA";if(L$t||T$t||D$t||P$t)return void console.log(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.log(...e)}function QS(...e){const n=Mc==="DEV"||Mc==="QA";if(L$t||T$t||D$t||P$t)return void console.warn(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.warn(...e)}let uv=null,yE=!1;const cs=Mc==="PROD"?"https://api.zeni.ai":Mc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function mnt(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),a=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),c=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),d=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),u=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),p=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]}));return[{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const aVr={dashboard:function(e){return[...mnt()]},reports:mnt,aging:function(e){return[]},transactions:function(e){return[]},forecast:function(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Years (first load)",apiType:"forecast"}]},checking:function(e){const n=encodeURIComponent(JSON.stringify({is_include_deposit_accounts_summary:!0}));return[{url:`${cs}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${cs}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${cs}/banking/1.0/baas/config`,priority:"HIGH",reason:"Checking - BAAS Config (first load)",apiType:"checking"}]},rewards:function(e){const n=encodeURIComponent(JSON.stringify({is_primary_refer_reward_plan:!0}));return[{url:`${cs}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${cs}/tenant/1.0/company-referrals`,priority:"HIGH",reason:"Rewards Page - Referrals (first load)",apiType:"rewards"}]},people:function(e){const n=encodeURIComponent(JSON.stringify({is_manager_candidate:!0})),{companyId:o}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${cs}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${cs}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${cs}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${cs}/tenant/1.0/companies/${o}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function gnt(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:r,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,aVr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return ss(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function fnt(e,n=0,o){if("serviceWorker"in navigator)try{const r=await async function(u=1e4){if(!("serviceWorker"in navigator))throw new Error("Service Worker not supported");if(navigator.serviceWorker.controller)return navigator.serviceWorker.ready;const p=await navigator.serviceWorker.ready;return navigator.serviceWorker.controller!=null?p:new Promise((h,g)=>{const f=Date.now();let x=100;const y=()=>navigator.serviceWorker.controller?(C(),void h(p)):Date.now()-f>=u?(C(),void(p.active?(ss("[Prefetch Manager - Service Worker] ⚠️ No controller but SW is active, proceeding anyway"),h(p)):g(new Error("Service Worker controller timeout")))):(x=Math.min(1.5*x,1e3),void(b=setTimeout(y,x)));let b;const w=()=>{navigator.serviceWorker.controller&&(C(),h(p))},C=()=>{clearTimeout(b),navigator.serviceWorker.removeEventListener("controllerchange",w)};navigator.serviceWorker.addEventListener("controllerchange",w),b=setTimeout(y,x)})}(1e4),a=navigator.serviceWorker.controller||r.active;if(!a)return void QS("[Prefetch Manager - Service Worker] No active Service Worker available");const s=function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort((h,g)=>p[h.priority]-p[g.priority])}(e);ss("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:s.length,high:s.filter(u=>u.priority==="HIGH").length,medium:s.filter(u=>u.priority==="MEDIUM").length,low:s.filter(u=>u.priority==="LOW").length,batchSize:n>0?n:"disabled",expirationTime:o??"20 minutes",viaController:!!navigator.serviceWorker.controller}),s.forEach((u,p)=>{ss(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),ss(` URL: ${u.url}`)});const c=cT(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};a.postMessage({type:"PREFETCH_URLS",payload:{urls:s.map(u=>({url:u.url,priority:u.priority,apiType:u.apiType})),authHeaders:d,batchSize:n,expirationTime:o}}),ss("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){QS("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else QS("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function lVr({children:e,currentPage:n,tenantId:o,batchCalls:r=0,expirationTime:a,delay:s=1e3,enabled:c=!0,enableIdlePrefetch:d=!1,features:u,forecastId:p,idleTimeout:h=2e3,isPageIndependent:g=!1,isRefreshTriggerEnabled:f=!1}){const[x,y]=m.useState(!1),[b,w]=m.useState(!1),C=m.useRef(null),v=lh(),S=_i.getSignedInUser(),{useFeatureGate:k}=ba(),{isFeatureEnabled:j}=k(Li.isReferralFeatureEnabled),A=gn(),E=q7(A?.loggedInUserRole??[]),I=qo(U=>X1(U)),{isFeatureEnabled:L}=k(Li.isDebitCardFeatureEnabled),z=Iot(L,I),M=Eot(I),_=z===!1&&M===!1;return m.useEffect(()=>{if(!c||x||!S||!o)return;const U=gnt({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:_,companyId:I?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(U.length===0)return void ss(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);ss(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${U.length} URLs to prefetch`);const O=setTimeout(()=>{fnt(U,r,a).catch(F=>{QS(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,F)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,S,o,n,u,p,j,E,_,I?.companyId,g,r,a,s,v.pathname]),m.useEffect(()=>{y(!1)},[o,v.pathname]),m.useEffect(()=>{g||(y(!1),w(!1))},[v.pathname,g]),m.useEffect(()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&S&&o)||b)return;ss(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const U=function(R){const{timeout:O=2e3,onIdle:F}=R;ss(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const B=()=>{yE&&(ss("[Idle Detection - Service Worker] 🏃 User became active again"),yE=!1),uv&&clearTimeout(uv),uv=setTimeout(()=>{yE||(ss("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),yE=!0,F())},O)},H=["mousedown","mousemove","keypress","scroll","touchstart","click"];return H.forEach(N=>{document.addEventListener(N,B,!0)}),B(),()=>{ss("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),uv&&(clearTimeout(uv),uv=null),H.forEach(N=>{document.removeEventListener(N,B,!0)}),yE=!1}}({timeout:h,onIdle:()=>{if(b)return;ss("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=gnt({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:_,companyId:I.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(ss(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),fnt(R,r,a).catch(F=>{QS(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,F)}),w(!0)):ss(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=U,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,S,o,b,n,u,p,j,E,_,I.companyId,g,r,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const U=performance.getEntriesByType("navigation");if(U.length>0)return U[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(ss("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const U=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||U.active;if(!R)return;ss("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(U){QS("[Prefetch Provider] Failed to notify service worker of refresh:",U)}}())},[]),Tt.jsx(Tt.Fragment,{children:e})}function sVr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:r=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=lh(),u=qo(y=>X1(y)),p=(h=d.pathname).includes("/dashboard")?"dashboard":h.includes("/reports")||h.includes("/financials")?"reports":h.includes("/aging")?"aging":h.includes("/transactions")?"transactions":h.includes("/forecast")?"forecast":h.includes("/checking")||h.includes("/bank-accounts")?"checking":h.includes("/rewards")?"rewards":null;var h;const g=u.tenantId,{useFeatureGate:f}=ba(),{isFeatureEnabled:x}=f(Li.isServiceWorkerPrefetchingEnabled);return g&&p?Tt.jsx(lVr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:r,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Tt.jsx(Tt.Fragment,{children:e})}function cVr(e,n){const o=po.extractUtmParamsFromUrl(n),r=new URLSearchParams(o).toString();if(!r)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${r}`}const dVr=kh(()=>Ld(()=>import("./DefaultTenantHome-Bi_Nepv1.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),xnt=kh(()=>Ld(()=>Promise.resolve().then(()=>DNr),void 0)),ynt=kh(()=>Ld(()=>import("./ScreenRoutes-Cf5Tsx0Z.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),uVr=kh(()=>Ld(()=>import("./ConnectionAuthScreen-DYP_9VcK.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),pVr=kh(()=>Ld(()=>import("./SignInScreen-ChB2BnS8.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),hVr=kh(()=>Ld(()=>import("./MagicLinkSignInScreen-BhydWF2v.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),bnt=kh(()=>Ld(()=>import("./NotFoundScreen-DkPaaWNr.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),mVr=kh(()=>Ld(()=>import("./MagicLinkRoutes-DIheMWou.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),gVr=kh(()=>Ld(()=>import("./WiseConfirmationScreen-DFk6ctUo.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),fVr=kh(()=>Ld(()=>import("./HubSpotOAuthCallbackScreen-C2hS7TqE.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),xVr=kh(()=>Ld(()=>import("./CustomerOnboardingAuthScreen-vzmXnBfR.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),yVr=kh(()=>Ld(()=>import("./SignOutScreen-BwwfTIGJ.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),bVr=kh(()=>Ld(()=>import("./OAuthConsentScreen-BYk52B4_.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),wVr=()=>{const e=lh(),n=new URLSearchParams(e.search),o=n.get("question"),r=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=cVr("/",n);return Tt.jsx(znt,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:a?"true":"false"}}})};function wnt(){const{isOpen:e}=Vb(),n=Xjn(),{isAiCfoOpen:o,setIsAiCfoOpen:r}=KG(),a=m.useRef(!1),s=m.useRef(o),c=m.useRef(!1);return m.useLayoutEffect(()=>{const d=o&&!s.current;s.current=o,d&&e&&(r(!1),n(),c.current=!0)},[o,e,r,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&r(!1)),a.current=e},[e,o,r]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,r(!0))},[e,r]),null}const CVr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=_i.isSignedIn(),r=qo(_=>X1(_)),a=_i.getSignedInUser(),s=o&&P6(a),c=qo(_=>gEt(_)).tenantsBaseInOrder.map(_=>({companyId:_.companyId,tenantId:_.tenantId,companyName:_.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r.tenantId??""},u=Ju(),p=jc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=i$t(),g=JG(),[f,x]=m.useState(!1),[y,b]=m.useState(null),w=m.useMemo(()=>({isAiCfoOpen:f,setIsAiCfoOpen:x,aiCfoSidePanelQuestionToSubmit:y,setAiCfoSidePanelQuestionToSubmit:b}),[f,y,x,b]),{useFeatureGate:C}=ba(),{isFeatureEnabled:v}=C(Li.isAiCfoFileUploadEnabled),{isFeatureEnabled:S}=C(Li.isBillPayCommentingEnabled),{isFeatureEnabled:k}=C(Li.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(Li.isExpenseAutomationEnabled),{isFeatureEnabled:A}=C(Li.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(Li.isTreasuryCommentingEnabled),{isFeatureEnabled:I}=C(Li.isCheckingCommentingEnabled),{isFeatureEnabled:L}=C(Li.isTransactionCommentingEnabled),{isFeatureEnabled:z}=C(Li.isCardsCommentingEnabled),M=S||k||s&&j||!s&&A||E||I||L||z;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(fEt())},[u,h]),Tt.jsx(Jjn,{children:r.tenantId!=null?Tt.jsx(ypr,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${_$.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${_$.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||L||z,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:M,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:Tt.jsxs(Mde.Provider,{value:w,children:[Tt.jsx(wnt,{}),Tt.jsxs(Snt,{children:[Tt.jsx(xnt,{tenantEmailDomain:e}),Tt.jsx(vnt,{children:Tt.jsx(Cnt,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Tt.jsx(wpr,{children:Tt.jsxs(Mde.Provider,{value:w,children:[Tt.jsx(wnt,{}),Tt.jsxs(Snt,{children:[Tt.jsx(xnt,{tenantEmailDomain:e}),Tt.jsx(vnt,{children:Tt.jsx(Cnt,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Cnt=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:r})=>{const a=qo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=ba(),{configValue:c}=s(lg.webappPrefetchConfig),d=typeof c.SERVICE_WORKER_BATCH_CALLS=="number"?c.SERVICE_WORKER_BATCH_CALLS:15,u=typeof c.SERVICE_WORKER_IDLE_TIMEOUT=="number"?c.SERVICE_WORKER_IDLE_TIMEOUT:3e3,p=typeof c.EXPIRATION_TIME=="number"&&c.EXPIRATION_TIME>0?c.EXPIRATION_TIME:12e5,{clearLoading:h}=ZG(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=KG();return m.useEffect(()=>{h(w2e.APP_INITIALIZATION)},[h]),Tt.jsx(m.Suspense,{fallback:null,children:Tt.jsx(sVr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Tt.jsxs(dkt,{children:[Tt.jsx(hu,{path:"/magic_links/*",element:Tt.jsx(mVr,{})}),Tt.jsx(hu,{path:"/wise/callback/link-account/*",element:Tt.jsx(gVr,{})}),Tt.jsx(hu,{path:"/page-not-found",element:Tt.jsx(bnt,{})}),Tt.jsx(hu,{path:"/",element:Tt.jsx(dVr,{})}),Tt.jsx(hu,{path:"/aicfo",element:Tt.jsx(wVr,{})}),Tt.jsx(hu,{path:"/onboarding/auth",element:Tt.jsx(xVr,{})}),Tt.jsx(hu,{path:"/:tenantEmailDomain/*",element:Tt.jsx($Vr,{children:Tt.jsxs(aNr,{children:[Tt.jsxs(kVr,{children:[a!=null?Tt.jsx(nVr,{}):null,n?Tt.jsx(ynt,{setTenantEmailDomain:e}):Tt.jsx(Ere,{children:Tt.jsx(ynt,{setTenantEmailDomain:e})})]}),o?Tt.jsxs(Tt.Fragment,{children:[Tt.jsx(HRr,{}),Tt.jsx(AVr,{isOpen:g,children:Tt.jsx(QNr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Tt.jsx(hu,{path:"/signin/auth",element:Tt.jsx(Ere,{children:Tt.jsx(pVr,{setTenantEmailDomain:e})})}),Tt.jsx(hu,{path:"/signin/magic-link",element:Tt.jsx(Ere,{children:Tt.jsx(hVr,{})})}),Tt.jsx(hu,{path:"/signout",element:Tt.jsx(yVr,{})}),Tt.jsx(hu,{path:"/connection/auth",element:Tt.jsx(uVr,{})}),Tt.jsx(hu,{path:"/oauth/hubspot/callback",element:Tt.jsx(fVr,{})}),Tt.jsx(hu,{path:"/oauth/authorize",element:Tt.jsx(bVr,{})}),Tt.jsx(hu,{path:"*",element:Tt.jsx(bnt,{})})]})})})},vnt=({children:e})=>{const{isOpen:n,width:o}=Vb();return Tt.jsx(SVr,{commentsDrawerWidth:n?o:0,children:e})},vVr=Fn("div")`
79521
+ `,nVr=()=>{const[e,n]=m.useState(()=>_i.getSignedInUser()),o=Ju(),[r,a]=m.useState(!1),[s,c]=m.useState(!1),d=qo(g=>_ot(g).fetchState),u=qo(g=>X1(g));m.useEffect(()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);a(g)},[e]);const p=m.useCallback(()=>{const g=_i.getSignedInUser();n(f=>JSON.stringify(f)!==JSON.stringify(g)?g:f)},[]);m.useEffect(()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)}),[]),m.useEffect(()=>{d!=="In-Progress"&&d!=="Completed"&&o(mEt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Tt.jsxs(m.Fragment,{children:[s&&Tt.jsx(bhe,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Tt.jsx(eVr,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},hnt="init-enter",oVr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const r=n.get(o||hnt);iVr(r!==void 0?r:0)}),null},(e,n)=>{const{location:o,visitedUrl:r}=e,{location:a}=n,s=o.pathname||hnt,c=rVr();return r.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),iVr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),rVr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},kh=e=>m.lazy(async()=>{const n=e.toString(),o=_i.getForceRefreshedComponents(),r=new Set(o),a=_i.isSignedIn(),s=r.has(n);try{const c=await e();return r.delete(n),a&&_i.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw s||(r.add(n),a&&_i.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}}),L$t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),T$t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),D$t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),P$t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function ss(...e){const n=Mc==="DEV"||Mc==="QA";if(L$t||T$t||D$t||P$t)return void console.log(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.log(...e)}function QS(...e){const n=Mc==="DEV"||Mc==="QA";if(L$t||T$t||D$t||P$t)return void console.warn(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.warn(...e)}let uv=null,yE=!1;const cs=Mc==="PROD"?"https://api.zeni.ai":Mc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function mnt(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),a=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),c=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),d=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),u=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),p=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]}));return[{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${cs}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const aVr={dashboard:function(e){return[...mnt()]},reports:mnt,aging:function(e){return[]},transactions:function(e){return[]},forecast:function(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${cs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Years (first load)",apiType:"forecast"}]},checking:function(e){const n=encodeURIComponent(JSON.stringify({is_include_deposit_accounts_summary:!0}));return[{url:`${cs}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${cs}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${cs}/banking/1.0/baas/config`,priority:"HIGH",reason:"Checking - BAAS Config (first load)",apiType:"checking"}]},rewards:function(e){const n=encodeURIComponent(JSON.stringify({is_primary_refer_reward_plan:!0}));return[{url:`${cs}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${cs}/tenant/1.0/company-referrals`,priority:"HIGH",reason:"Rewards Page - Referrals (first load)",apiType:"rewards"}]},people:function(e){const n=encodeURIComponent(JSON.stringify({is_manager_candidate:!0})),{companyId:o}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${cs}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${cs}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${cs}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${cs}/tenant/1.0/companies/${o}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function gnt(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:r,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,aVr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(ss(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return ss(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function fnt(e,n=0,o){if("serviceWorker"in navigator)try{const r=await async function(u=1e4){if(!("serviceWorker"in navigator))throw new Error("Service Worker not supported");if(navigator.serviceWorker.controller)return navigator.serviceWorker.ready;const p=await navigator.serviceWorker.ready;return navigator.serviceWorker.controller!=null?p:new Promise((h,g)=>{const f=Date.now();let x=100;const y=()=>navigator.serviceWorker.controller?(C(),void h(p)):Date.now()-f>=u?(C(),void(p.active?(ss("[Prefetch Manager - Service Worker] ⚠️ No controller but SW is active, proceeding anyway"),h(p)):g(new Error("Service Worker controller timeout")))):(x=Math.min(1.5*x,1e3),void(b=setTimeout(y,x)));let b;const w=()=>{navigator.serviceWorker.controller&&(C(),h(p))},C=()=>{clearTimeout(b),navigator.serviceWorker.removeEventListener("controllerchange",w)};navigator.serviceWorker.addEventListener("controllerchange",w),b=setTimeout(y,x)})}(1e4),a=navigator.serviceWorker.controller||r.active;if(!a)return void QS("[Prefetch Manager - Service Worker] No active Service Worker available");const s=function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort((h,g)=>p[h.priority]-p[g.priority])}(e);ss("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:s.length,high:s.filter(u=>u.priority==="HIGH").length,medium:s.filter(u=>u.priority==="MEDIUM").length,low:s.filter(u=>u.priority==="LOW").length,batchSize:n>0?n:"disabled",expirationTime:o??"20 minutes",viaController:!!navigator.serviceWorker.controller}),s.forEach((u,p)=>{ss(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),ss(` URL: ${u.url}`)});const c=cT(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};a.postMessage({type:"PREFETCH_URLS",payload:{urls:s.map(u=>({url:u.url,priority:u.priority,apiType:u.apiType})),authHeaders:d,batchSize:n,expirationTime:o}}),ss("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){QS("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else QS("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function lVr({children:e,currentPage:n,tenantId:o,batchCalls:r=0,expirationTime:a,delay:s=1e3,enabled:c=!0,enableIdlePrefetch:d=!1,features:u,forecastId:p,idleTimeout:h=2e3,isPageIndependent:g=!1,isRefreshTriggerEnabled:f=!1}){const[x,y]=m.useState(!1),[b,w]=m.useState(!1),C=m.useRef(null),v=lh(),S=_i.getSignedInUser(),{useFeatureGate:k}=ba(),{isFeatureEnabled:j}=k(Li.isReferralFeatureEnabled),A=gn(),E=q7(A?.loggedInUserRole??[]),I=qo(U=>X1(U)),{isFeatureEnabled:L}=k(Li.isDebitCardFeatureEnabled),z=Iot(L,I),M=Eot(I),_=z===!1&&M===!1;return m.useEffect(()=>{if(!c||x||!S||!o)return;const U=gnt({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:_,companyId:I?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(U.length===0)return void ss(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);ss(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${U.length} URLs to prefetch`);const O=setTimeout(()=>{fnt(U,r,a).catch(F=>{QS(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,F)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,S,o,n,u,p,j,E,_,I?.companyId,g,r,a,s,v.pathname]),m.useEffect(()=>{y(!1)},[o,v.pathname]),m.useEffect(()=>{g||(y(!1),w(!1))},[v.pathname,g]),m.useEffect(()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&S&&o)||b)return;ss(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const U=function(R){const{timeout:O=2e3,onIdle:F}=R;ss(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const B=()=>{yE&&(ss("[Idle Detection - Service Worker] 🏃 User became active again"),yE=!1),uv&&clearTimeout(uv),uv=setTimeout(()=>{yE||(ss("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),yE=!0,F())},O)},H=["mousedown","mousemove","keypress","scroll","touchstart","click"];return H.forEach(N=>{document.addEventListener(N,B,!0)}),B(),()=>{ss("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),uv&&(clearTimeout(uv),uv=null),H.forEach(N=>{document.removeEventListener(N,B,!0)}),yE=!1}}({timeout:h,onIdle:()=>{if(b)return;ss("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=gnt({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:_,companyId:I.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(ss(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),fnt(R,r,a).catch(F=>{QS(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,F)}),w(!0)):ss(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=U,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,S,o,b,n,u,p,j,E,_,I.companyId,g,r,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const U=performance.getEntriesByType("navigation");if(U.length>0)return U[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(ss("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const U=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||U.active;if(!R)return;ss("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(U){QS("[Prefetch Provider] Failed to notify service worker of refresh:",U)}}())},[]),Tt.jsx(Tt.Fragment,{children:e})}function sVr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:r=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=lh(),u=qo(y=>X1(y)),p=(h=d.pathname).includes("/dashboard")?"dashboard":h.includes("/reports")||h.includes("/financials")?"reports":h.includes("/aging")?"aging":h.includes("/transactions")?"transactions":h.includes("/forecast")?"forecast":h.includes("/checking")||h.includes("/bank-accounts")?"checking":h.includes("/rewards")?"rewards":null;var h;const g=u.tenantId,{useFeatureGate:f}=ba(),{isFeatureEnabled:x}=f(Li.isServiceWorkerPrefetchingEnabled);return g&&p?Tt.jsx(lVr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:r,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Tt.jsx(Tt.Fragment,{children:e})}function cVr(e,n){const o=po.extractUtmParamsFromUrl(n),r=new URLSearchParams(o).toString();if(!r)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${r}`}const dVr=kh(()=>Ld(()=>import("./DefaultTenantHome-CArToClw.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),xnt=kh(()=>Ld(()=>Promise.resolve().then(()=>DNr),void 0)),ynt=kh(()=>Ld(()=>import("./ScreenRoutes-DdzWD1U9.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),uVr=kh(()=>Ld(()=>import("./ConnectionAuthScreen-BQrFf5wV.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),pVr=kh(()=>Ld(()=>import("./SignInScreen-CNtwWkn8.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),hVr=kh(()=>Ld(()=>import("./MagicLinkSignInScreen-B6HjyZXP.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),bnt=kh(()=>Ld(()=>import("./NotFoundScreen-C6d7g4SD.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),mVr=kh(()=>Ld(()=>import("./MagicLinkRoutes-DAvXqhJs.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),gVr=kh(()=>Ld(()=>import("./WiseConfirmationScreen-2rmdb0s6.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),fVr=kh(()=>Ld(()=>import("./HubSpotOAuthCallbackScreen-Bz7yvuoV.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),xVr=kh(()=>Ld(()=>import("./CustomerOnboardingAuthScreen-DPNE702o.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),yVr=kh(()=>Ld(()=>import("./SignOutScreen-BvFuH3BL.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),bVr=kh(()=>Ld(()=>import("./OAuthConsentScreen-ChiMp_o9.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),wVr=()=>{const e=lh(),n=new URLSearchParams(e.search),o=n.get("question"),r=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=cVr("/",n);return Tt.jsx(znt,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:a?"true":"false"}}})};function wnt(){const{isOpen:e}=Vb(),n=Xjn(),{isAiCfoOpen:o,setIsAiCfoOpen:r}=KG(),a=m.useRef(!1),s=m.useRef(o),c=m.useRef(!1);return m.useLayoutEffect(()=>{const d=o&&!s.current;s.current=o,d&&e&&(r(!1),n(),c.current=!0)},[o,e,r,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&r(!1)),a.current=e},[e,o,r]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,r(!0))},[e,r]),null}const CVr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=_i.isSignedIn(),r=qo(_=>X1(_)),a=_i.getSignedInUser(),s=o&&P6(a),c=qo(_=>gEt(_)).tenantsBaseInOrder.map(_=>({companyId:_.companyId,tenantId:_.tenantId,companyName:_.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r.tenantId??""},u=Ju(),p=jc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=i$t(),g=JG(),[f,x]=m.useState(!1),[y,b]=m.useState(null),w=m.useMemo(()=>({isAiCfoOpen:f,setIsAiCfoOpen:x,aiCfoSidePanelQuestionToSubmit:y,setAiCfoSidePanelQuestionToSubmit:b}),[f,y,x,b]),{useFeatureGate:C}=ba(),{isFeatureEnabled:v}=C(Li.isAiCfoFileUploadEnabled),{isFeatureEnabled:S}=C(Li.isBillPayCommentingEnabled),{isFeatureEnabled:k}=C(Li.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(Li.isExpenseAutomationEnabled),{isFeatureEnabled:A}=C(Li.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(Li.isTreasuryCommentingEnabled),{isFeatureEnabled:I}=C(Li.isCheckingCommentingEnabled),{isFeatureEnabled:L}=C(Li.isTransactionCommentingEnabled),{isFeatureEnabled:z}=C(Li.isCardsCommentingEnabled),M=S||k||s&&j||!s&&A||E||I||L||z;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(fEt())},[u,h]),Tt.jsx(Jjn,{children:r.tenantId!=null?Tt.jsx(ypr,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${_$.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${_$.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||L||z,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:M,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:Tt.jsxs(Mde.Provider,{value:w,children:[Tt.jsx(wnt,{}),Tt.jsxs(Snt,{children:[Tt.jsx(xnt,{tenantEmailDomain:e}),Tt.jsx(vnt,{children:Tt.jsx(Cnt,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Tt.jsx(wpr,{children:Tt.jsxs(Mde.Provider,{value:w,children:[Tt.jsx(wnt,{}),Tt.jsxs(Snt,{children:[Tt.jsx(xnt,{tenantEmailDomain:e}),Tt.jsx(vnt,{children:Tt.jsx(Cnt,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Cnt=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:r})=>{const a=qo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=ba(),{configValue:c}=s(lg.webappPrefetchConfig),d=typeof c.SERVICE_WORKER_BATCH_CALLS=="number"?c.SERVICE_WORKER_BATCH_CALLS:15,u=typeof c.SERVICE_WORKER_IDLE_TIMEOUT=="number"?c.SERVICE_WORKER_IDLE_TIMEOUT:3e3,p=typeof c.EXPIRATION_TIME=="number"&&c.EXPIRATION_TIME>0?c.EXPIRATION_TIME:12e5,{clearLoading:h}=ZG(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=KG();return m.useEffect(()=>{h(w2e.APP_INITIALIZATION)},[h]),Tt.jsx(m.Suspense,{fallback:null,children:Tt.jsx(sVr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Tt.jsxs(dkt,{children:[Tt.jsx(hu,{path:"/magic_links/*",element:Tt.jsx(mVr,{})}),Tt.jsx(hu,{path:"/wise/callback/link-account/*",element:Tt.jsx(gVr,{})}),Tt.jsx(hu,{path:"/page-not-found",element:Tt.jsx(bnt,{})}),Tt.jsx(hu,{path:"/",element:Tt.jsx(dVr,{})}),Tt.jsx(hu,{path:"/aicfo",element:Tt.jsx(wVr,{})}),Tt.jsx(hu,{path:"/onboarding/auth",element:Tt.jsx(xVr,{})}),Tt.jsx(hu,{path:"/:tenantEmailDomain/*",element:Tt.jsx($Vr,{children:Tt.jsxs(aNr,{children:[Tt.jsxs(kVr,{children:[a!=null?Tt.jsx(nVr,{}):null,n?Tt.jsx(ynt,{setTenantEmailDomain:e}):Tt.jsx(Ere,{children:Tt.jsx(ynt,{setTenantEmailDomain:e})})]}),o?Tt.jsxs(Tt.Fragment,{children:[Tt.jsx(HRr,{}),Tt.jsx(AVr,{isOpen:g,children:Tt.jsx(QNr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Tt.jsx(hu,{path:"/signin/auth",element:Tt.jsx(Ere,{children:Tt.jsx(pVr,{setTenantEmailDomain:e})})}),Tt.jsx(hu,{path:"/signin/magic-link",element:Tt.jsx(Ere,{children:Tt.jsx(hVr,{})})}),Tt.jsx(hu,{path:"/signout",element:Tt.jsx(yVr,{})}),Tt.jsx(hu,{path:"/connection/auth",element:Tt.jsx(uVr,{})}),Tt.jsx(hu,{path:"/oauth/hubspot/callback",element:Tt.jsx(fVr,{})}),Tt.jsx(hu,{path:"/oauth/authorize",element:Tt.jsx(bVr,{})}),Tt.jsx(hu,{path:"*",element:Tt.jsx(bnt,{})})]})})})},vnt=({children:e})=>{const{isOpen:n,width:o}=Vb();return Tt.jsx(SVr,{commentsDrawerWidth:n?o:0,children:e})},vVr=Fn("div")`
79522
79522
  display:flex;
79523
79523
  `,Snt=Fn("div")`
79524
79524
  display: flex;
@@ -79640,4 +79640,4 @@ ${Va.beneficiaryAddress} ${te}`,d(xe),L(!0)})(o),"data-testid":Y("title-text-cop
79640
79640
  }
79641
79641
  `,BVr=({fetchState:e,style:n})=>e==="In-Progress"||e==="Not-Started"?Tt.jsxs(IVr,{style:n,children:[Tt.jsxs(LVr,{children:[Tt.jsx(mO,{children:Tt.jsx(Vh,{width:96,height:20})}),Tt.jsxs(mO,{children:[Tt.jsx(Vh,{width:55,height:12}),Tt.jsx(Vh,{width:78,height:16}),Tt.jsx(Vh,{width:46,height:16})]}),Tt.jsxs(mO,{children:[Tt.jsx(Vh,{width:55,height:12}),Tt.jsx(Vh,{width:110,height:16}),Tt.jsx(Vh,{width:84,height:16})]}),Tt.jsxs(mO,{children:[Tt.jsx(Vh,{width:55,height:12}),Tt.jsx(Vh,{width:84,height:16}),Tt.jsx(Vh,{width:64,height:16})]})]}),Tt.jsxs(TVr,{children:[Tt.jsxs(DVr,{children:[Tt.jsx(Vh,{width:106,height:27}),Tt.jsx(Vh,{width:111,height:32})]}),Tt.jsx(PVr,{children:Tt.jsx(EVr,{width:96,height:96})})]})]}):null;function MVr({minDisplayTime:e=0}){const{isLoading:n}=ZG(),[o,r]=m.useState(!1),a=m.useRef(),s=m.useRef(null);return m.useLayoutEffect(()=>{if(a.current&&clearTimeout(a.current),_i.isSignedIn()===!1&&document.querySelector("#app-shell-loader")?.remove(),n)o||(r(!0),s.current=Date.now());else if(!n&&o){document.querySelector("#app-shell-loader")?.remove();const c=s.current;if(c!=null){const d=Date.now()-c,u=Math.max(0,e-d);a.current=setTimeout(()=>{r(!1),s.current=null},u)}else r(!1)}},[n,o,e]),m.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),!n&&o||!o?null:Tt.jsx(BVr,{fetchState:"In-Progress"})}const $nt="missing-receipts-batch-completed",S8=new class{state={activeTenantFetchFired:new Set,activeTenantFetchInProgress:!1,allTenantsFetchFired:!1,allTenantsFetchInProgress:!1,connectionsFetchFired:new Set,excludedResourcesFetchFired:new Set};reset(){this.state={activeTenantFetchFired:new Set,activeTenantFetchInProgress:!1,allTenantsFetchFired:!1,allTenantsFetchInProgress:!1,connectionsFetchFired:new Set,excludedResourcesFetchFired:new Set}}shouldFetchActiveTenant(e){return!this.state.activeTenantFetchInProgress&&!this.state.activeTenantFetchFired.has(e)}markActiveTenantFetchStarted(e){this.state.activeTenantFetchInProgress=!0,this.state.activeTenantFetchFired.add(e)}markActiveTenantFetchCompleted(e){this.state.activeTenantFetchInProgress=!1}markActiveTenantFetchFailed(e){this.state.activeTenantFetchInProgress=!1}shouldFetchAllTenants(){return!this.state.allTenantsFetchInProgress&&!this.state.allTenantsFetchFired}markAllTenantsFetchStarted(){this.state.allTenantsFetchInProgress=!0,this.state.allTenantsFetchFired=!0}markAllTenantsFetchCompleted(){this.state.allTenantsFetchInProgress=!1}markAllTenantsFetchFailed(){this.state.allTenantsFetchInProgress=!1,this.state.allTenantsFetchFired=!1}shouldFetchExcludedResources(e){return!this.state.excludedResourcesFetchFired.has(e)}markExcludedResourcesFetchStarted(e){this.state.excludedResourcesFetchFired.add(e)}shouldFetchConnections(e){return!this.state.connectionsFetchFired.has(e)}markConnectionsFetchStarted(e){this.state.connectionsFetchFired.add(e)}clearTenant(e){this.state.activeTenantFetchFired.delete(e),this.state.connectionsFetchFired.delete(e),this.state.excludedResourcesFetchFired.delete(e)}clearAllFiredStates(){this.state.activeTenantFetchFired.clear(),this.state.connectionsFetchFired.clear(),this.state.excludedResourcesFetchFired.clear(),this.state.allTenantsFetchInProgress||(this.state.allTenantsFetchFired=!1)}getState(){return{...this.state,activeTenantFetchFired:Array.from(this.state.activeTenantFetchFired)}}};Z.updateAppLocaleID("en");let Bv=null;function _Vr(){return Bv===null&&(Bv=function(){console.warn(`initializing epic state with url ${JSON.stringify(_$)}`);const e=_i.getSignedInUser(),n=e!=null?function(){const a=window.location.pathname.split("/").filter(Boolean)[0],s=["signin","signout"];if(a!=null&&!s.includes(a)){const d=_i.getSignedInUserTenant(a);if(d?.tenantId!=null)return d.tenantId}return _i.getActiveTenantForUser()?.tenantId}():void 0,o=wEt(_$,e?.userId,e?.zeniSessionId,n,WS(),RVr);Pre();const r=cT();return r.userId!=null&&vd.identify(r.userId,{tenant_id:r.tenantId}),o}(),Pre().then(()=>{Bv!=null&&(S8.reset(),FVr(Bv))}).catch(e=>{console.error("Failed to load feature epics:",e),Q$t(e,{tags:{critical:"true",module:"epicManager"}}),alert(`The application failed to load required modules. Some features may not work correctly.
79642
79642
 
79643
- Please refresh the page to try again.`)})),Bv}function $Qr(){return Bv}const gO=new yEt,knt=()=>{const e=Ju(),n=_i.getSignedInUser(),o=qo(w=>X1(w)),[r,a]=m.useState(null),s=function(w){const{useDynamicConfig:C}=ba(),{configValue:v,isDynamicConfigLoading:S}=C(epe.sessionAutoLogoutConfig),k=v!=null&&Object.keys(v).length>0;if(S||w==null||!k)return z_;const j=hWe(v.users_disabled_for_auto_logout),A=hWe(v.users_enabled_for_auto_logout),E=v.is_inactivity_based_logout_feature_enabled===!0,I=j.includes(w),L=!I&&A.includes(w);return{heartbeatIntervalMinutes:I?0:noe(v.heartbeat_interval_minutes,z_.heartbeatIntervalMinutes),idleTimeoutMinutes:noe(v.idle_timeout_minutes,z_.idleTimeoutMinutes),isAutoLogoutEnabled:!I&&(L||E),warningDurationSeconds:noe(v.warning_duration_seconds,z_.warningDurationSeconds)}}(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?function(C){try{sessionStorage.setItem(Che,"auto-logout"),sessionStorage.setItem(vhe,String(C.idleTimeoutMinutes)),sessionStorage.setItem(She,String(Date.now())),TI=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes}):(F3t(),TI=void 0),a(null),gO.stop(),e(SEt()),e($Et(!1)),_i.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return gO.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(kEt()),onWarningStart:w=>{vd.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{vd.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>gO.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=qo(w=>AEt(w,o.companyId)),u=jc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(cge())},[]);const h=qo(w=>jEt(w));(()=>{const w=k2e(),C=Ju(),{useFeatureGate:v}=ba(),{isFeatureEnabled:S}=v(Li.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(S!==!0||w==null)return;const k=_i.getSignedInUser()?.userId;if(k==null)return;const j=XI(w,k),A=E=>{C(xEt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind($nt,A),()=>{j.unbind($nt,A)}},[w,C,S])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>Pot(o.userRole),[o.userRole]),x={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.toast-message-user-notification`]:[],eventCallback:(w,C)=>{var v;v=C,v?.data!=null&&e(EEt(C))}},y=m.useMemo(()=>_i.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Tt.jsxs(i5n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Tt.jsx(Kfn,{toolkit:{analytics:vd,sentry:G$t,authParams:b},children:Tt.jsxs(gfn,{endPoint:{url:g2e},children:[Tt.jsx(z3i,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(cge())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Tt.jsx(jVr,{...x})]})}),r!=null&&n!=null?Tt.jsx(SRr,{secondsRemaining:r,onContinueSession:()=>{vd.trackSessionTimeoutClicked("continue",r),gO.continueSession()},onSignOut:()=>{vd.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},zVr=()=>{const e=_i.isSignedIn(),n=qo(s=>X1(s)).companyId,o=qo(s=>bEt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),r=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:int,featureClientSecret:Ua.featureClientSecret,providerEndPoint:oT.statsigBaseUrl}),[int,Ua.featureClientSecret,oT.statsigBaseUrl]);return n?Tt.jsx(m6n,{isUserSignedIn:e,featureGateCustomFields:r,zeniFeatureConfig:a,children:Tt.jsx(knt,{})}):Tt.jsx(knt,{})},OVr=W$t(function(){const e=m.useMemo(()=>_Vr(),[]),[n,o]=m.useState(!1),[r,a]=m.useState(!1);m.useEffect(()=>{Pre().then(()=>o(!0)).catch(()=>{})},[]);const s=m.useCallback(c=>{c.data?.type==="UPDATE_READY"?a(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&a(!1)},[]);return m.useEffect(()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",s),navigator.serviceWorker.addEventListener("controllerchange",()=>{a(!1)})),()=>{navigator.serviceWorker.removeEventListener("message",s)}),[s]),Tt.jsx(fNr,{children:Tt.jsx(ukt,{store:e,children:Tt.jsx(xNr,{value:n,children:Tt.jsxs(WRr,{children:[Tt.jsx(MVr,{}),Tt.jsx(bKt,{children:Tt.jsx(mNr,{children:Tt.jsxs(Yfn,{children:[r?Tt.jsx(ojn,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Tt.jsx(zVr,{})]})})})]})})})})});function FVr(e){const n=e.getState(),o=n.tenantState.loggedInUser,r=o?.zeniSessionId!=null?o:_i.getSignedInUser();if(r?.userId==null||r?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=X1(n);let c;if(!a||["signin","signout"].includes(a))if(s?.tenantEmailDomain!=null&&s?.tenantId!=null)a=s.tenantEmailDomain,c=s.tenantId;else{const d=_i.getActiveTenantForUser();if(d?.tenantEmailDomain==null||d?.tenantId==null)return;a=d.tenantEmailDomain,c=d.tenantId}else c=_i.getSignedInUserTenant(a)?.tenantId;c!=null&&(jot(r.userId,r.zeniSessionId,c),e.dispatch(e1e(c)),a!=null&&_i.saveActiveTenantDomainForUser(a),S8.shouldFetchActiveTenant(c)&&(S8.markActiveTenantFetchStarted(c),e.dispatch(Bot(r.userId,c,r.zeniSessionId))),S8.shouldFetchExcludedResources(c)&&(S8.markExcludedResourcesFetchStarted(c),e.dispatch(CEt(r.userId,c))),S8.shouldFetchConnections(c)&&(S8.markConnectionsFetchStarted(c),e.dispatch(vEt(r.userId,c))))}function RVr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const NVr=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),Ant=`/service-worker.js?v=${Date.now()}&env=DEV&endpoint=${encodeURIComponent("https://zeni-webapp-dev.uc.r.appspot.com")}`;function jnt(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const r=o.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content available; will be used when all tabs are closed."),navigator.serviceWorker.controller?.postMessage({type:"UPDATE_READY"}),o.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},o.waiting&&o.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",()=>{console.log("New service worker activated."),o.active?.postMessage({type:"CLIENTS_CLAIM"})})}).catch(o=>{console.error("Error during service worker registration:",o)})}const Ent="zeni-chunk-reload-at",VVr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function Int(e){try{const n=Number(sessionStorage.getItem(Ent))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(Ent,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let Ire=!1,Lnt=null;const Tnt="//js.hs-scripts.com/5991084.js",Dnt="hs-script-loader",HVr=_i.getSignedInUser(),UVr=HVr?.zeniSessionId;var i8;window.addEventListener("vite:preloadError",e=>{const n=e;Int(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return VVr.some(r=>o.includes(r))})(e.reason)&&Int(e.reason)}),async function(){try{const o=await async function(){const a={environment:Mc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${g2e}/api/keys?query=${s}`);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c.json()}catch(c){return console.error("Error fetching details:",c),null}}(),r=(e=o,n="ZENI-WEB-APP-"+Mc,JI.AES.decrypt(e,n).toString(JI.enc.Utf8));zRr(JSON.parse(r)),qEt.createRoot(document.getElementById("root")).render(Tt.jsx(T.StrictMode,{children:Tt.jsx(pkt,{children:Tt.jsx(OVr,{})})})),function(){const a=()=>{const s=Ua.sentryDsn?.trim();if(!s)return;const c=Ua.sentryProfileSamplingRate>0;Y$t({dsn:s,tracesSampleRate:Ua.sentryTraceSamplingRate,profilesSampleRate:c?Ua.sentryProfileSamplingRate:0,integrations:[q$t(),...c?[K$t()]:[],Z$t({maskAllText:!0,blockAllMedia:!0})],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSendTransaction:d=>(d.breadcrumbs&&(d.breadcrumbs=d.breadcrumbs.filter(u=>u.category!=="console"||!((u.message??"").toLowerCase().includes("called people set")||Array.isArray(u.data?.arguments)&&u.data.arguments.some(p=>typeof p=="string"&&p.toLowerCase().includes("called people set"))||(Array.isArray(u.data?.arguments)&&(u.data.arguments=u.data.arguments.map(p=>{if(typeof p=="string"&&p.includes("user_roles"))try{const h=p.match(/\{.*\}/s);if(h!==null){const g=JSON.parse(h[0]);if(g.user_roles!=null)return delete g.user_roles,p.replace(h[0],JSON.stringify(g))}}catch{}return p})),0)))),d)}),J$t("session-id",UVr)};"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,0)}()}catch(o){console.error("Error initializing app:",o)}var e,n}(),typeof window>"u"?Promise.resolve(!1):Lnt!==null||(Lnt=new Promise(e=>{if(Ire)return void e(!0);const n=()=>{Ire?e(!0):(Ire=!0,new Promise((r,a)=>{if(document.getElementById(Dnt))return void r();const s=document.createElement("script");s.id=Dnt,s.src=Tnt,s.async=!0,s.onload=()=>r(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${Tnt}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(r=>{console.error("Error loading third-party scripts:",r),e(!0)}))},o=()=>{var r,a;r=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:a}):setTimeout(r,50)};document.readyState==="complete"?o():window.addEventListener("load",o,{once:!0})})),function(){if("serviceWorker"in navigator){if(new URL("https://dev.app.zeni.ai",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{var e;NVr?(e=Ant,fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const o=n.headers.get("content-type");n.status===404||o!=null&&!o.includes("javascript")?navigator.serviceWorker.ready.then(r=>{r.unregister().then(()=>window.location.reload())}):jnt(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):jnt(Ant)})}}(),(i8=console.log)&&i8 instanceof Function&&Ld(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a})=>{e(i8),n(i8),o(i8),r(i8),a(i8)});export{VRr as $,HUr as A,ZNr as B,P as C,Z as D,aHr as E,VUr as F,mPo as G,Jpe as H,WUr as I,xQr as J,ce as K,w2e as L,$n as M,ba as N,_Hr as O,wQr as P,iNr as Q,S$t as R,EVr as S,QUr as T,CQr as U,KG as V,SHr as W,rHr as X,lNr as Y,rNr as Z,vQr as _,JG as a,w$t as a$,LHr as a0,Ku as a1,g2e as a2,mH as a3,ZWr as a4,n2t as a5,WWr as a6,A2e as a7,pnt as a8,jNr as a9,gWr as aA,yWr as aB,bWr as aC,vHr as aD,JUr as aE,CUr as aF,$Ur as aG,ime as aH,tWr as aI,eWr as aJ,SUr as aK,vUr as aL,CHr as aM,lg as aN,BUr as aO,$Nr as aP,RUr as aQ,YDo as aR,MHr as aS,bXn as aT,_2o as aU,KUr as aV,qUr as aW,ZUr as aX,jHr as aY,wn as aZ,Ir as a_,bNr as aa,SNr as ab,ANr as ac,Vmo as ad,unt as ae,vNr as af,_de as ag,PF as ah,AN as ai,cnt as aj,Qo as ak,yUr as al,xUr as am,S_o as an,BHr as ao,zUr as ap,Pt as aq,MUr as ar,iT as as,_$ as at,K3 as au,_Ur as av,xWr as aw,r2t as ax,mWr as ay,fWr as az,cVr as b,XWr as b$,yQr as b0,RNr as b1,IHr as b2,THr as b3,wNr as b4,x2e as b5,NRr as b6,$Hr as b7,iro as b8,m0t as b9,YHr as bA,La as bB,CWr as bC,iUr as bD,nUr as bE,dQr as bF,DUr as bG,iQr as bH,sUr as bI,lUr as bJ,dUr as bK,cUr as bL,mUr as bM,hUr as bN,FUr as bO,qHr as bP,KHr as bQ,OUr as bR,NUr as bS,XHr as bT,eUr as bU,tUr as bV,pUr as bW,uUr as bX,wHr as bY,gUr as bZ,fUr as b_,zHr as ba,qWr as bb,GWr as bc,pNr as bd,rUr as be,uHr as bf,fHr as bg,Ppe as bh,pHr as bi,JWr as bj,wUr as bk,mHr as bl,gHr as bm,hHr as bn,WS as bo,XUr as bp,UHr as bq,QHr as br,WHr as bs,NHr as bt,RHr as bu,GHr as bv,GUr as bw,VHr as bx,HHr as by,YUr as bz,vd as c,nQr as c$,oUr as c0,gQr as c1,mQr as c2,Qzr as c3,rQr as c4,jUr as c5,LUr as c6,EUr as c7,sHr as c8,kUr as c9,xHr as cA,IUr as cB,Hi as cC,FKi as cD,AWr as cE,$$t as cF,vWr as cG,IWr as cH,SWr as cI,EWr as cJ,RWr as cK,yHr as cL,bHr as cM,VWr as cN,$ as cO,OWr as cP,zWr as cQ,kWr as cR,FWr as cS,wWr as cT,QWr as cU,KWr as cV,tQr as cW,eQr as cX,oQr as cY,dHr as cZ,bUr as c_,AUr as ca,bhe as cb,TUr as cc,PUr as cd,CLr as ce,IDr as cf,Zie as cg,uQr as ch,pQr as ci,hQr as cj,cQr as ck,EHr as cl,cbt as cm,MWr as cn,BWr as co,DWr as cp,_Wr as cq,PWr as cr,aQr as cs,TWr as ct,LWr as cu,NWr as cv,k2e as cw,gNr as cx,$Wr as cy,jWr as cz,i as d,aUr as d0,Xjn as d1,Vb as d2,fQr as d3,Ajo as d4,YWr as d5,UWr as d6,ZHr as d7,HWr as d8,hNr as d9,PNr as da,NNr as db,ble as dc,gSt as dd,mSt as de,cHr as df,GRr as dg,QRr as dh,WSt as di,SQr as dj,xlr as dk,FVr as e,Li as f,po as g,$Qr as h,Ua as i,gn as j,PHr as k,kh as l,Pe as m,j_n as n,bho as o,bQr as p,UUr as q,g3 as r,DHr as s,S8 as t,ZG as u,yNr as v,yhe as w,Rdi as x,D as y,_i as z};
79643
+ Please refresh the page to try again.`)})),Bv}function $Qr(){return Bv}const gO=new yEt,knt=()=>{const e=Ju(),n=_i.getSignedInUser(),o=qo(w=>X1(w)),[r,a]=m.useState(null),s=function(w){const{useDynamicConfig:C}=ba(),{configValue:v,isDynamicConfigLoading:S}=C(epe.sessionAutoLogoutConfig),k=v!=null&&Object.keys(v).length>0;if(S||w==null||!k)return z_;const j=hWe(v.users_disabled_for_auto_logout),A=hWe(v.users_enabled_for_auto_logout),E=v.is_inactivity_based_logout_feature_enabled===!0,I=j.includes(w),L=!I&&A.includes(w);return{heartbeatIntervalMinutes:I?0:noe(v.heartbeat_interval_minutes,z_.heartbeatIntervalMinutes),idleTimeoutMinutes:noe(v.idle_timeout_minutes,z_.idleTimeoutMinutes),isAutoLogoutEnabled:!I&&(L||E),warningDurationSeconds:noe(v.warning_duration_seconds,z_.warningDurationSeconds)}}(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?function(C){try{sessionStorage.setItem(Che,"auto-logout"),sessionStorage.setItem(vhe,String(C.idleTimeoutMinutes)),sessionStorage.setItem(She,String(Date.now())),TI=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes}):(F3t(),TI=void 0),a(null),gO.stop(),e(SEt()),e($Et(!1)),_i.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return gO.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(kEt()),onWarningStart:w=>{vd.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{vd.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>gO.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=qo(w=>AEt(w,o.companyId)),u=jc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(cge())},[]);const h=qo(w=>jEt(w));(()=>{const w=k2e(),C=Ju(),{useFeatureGate:v}=ba(),{isFeatureEnabled:S}=v(Li.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(S!==!0||w==null)return;const k=_i.getSignedInUser()?.userId;if(k==null)return;const j=XI(w,k),A=E=>{C(xEt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind($nt,A),()=>{j.unbind($nt,A)}},[w,C,S])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>Pot(o.userRole),[o.userRole]),x={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.toast-message-user-notification`]:[],eventCallback:(w,C)=>{var v;v=C,v?.data!=null&&e(EEt(C))}},y=m.useMemo(()=>_i.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Tt.jsxs(i5n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Tt.jsx(Kfn,{toolkit:{analytics:vd,sentry:G$t,authParams:b},children:Tt.jsxs(gfn,{endPoint:{url:g2e},children:[Tt.jsx(z3i,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(cge())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Tt.jsx(jVr,{...x})]})}),r!=null&&n!=null?Tt.jsx(SRr,{secondsRemaining:r,onContinueSession:()=>{vd.trackSessionTimeoutClicked("continue",r),gO.continueSession()},onSignOut:()=>{vd.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},zVr=()=>{const e=_i.isSignedIn(),n=qo(s=>X1(s)).companyId,o=qo(s=>bEt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),r=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:int,featureClientSecret:Ua.featureClientSecret,providerEndPoint:oT.statsigBaseUrl}),[int,Ua.featureClientSecret,oT.statsigBaseUrl]);return n?Tt.jsx(m6n,{isUserSignedIn:e,featureGateCustomFields:r,zeniFeatureConfig:a,children:Tt.jsx(knt,{})}):Tt.jsx(knt,{})},OVr=W$t(function(){const e=m.useMemo(()=>_Vr(),[]),[n,o]=m.useState(!1),[r,a]=m.useState(!1);m.useEffect(()=>{Pre().then(()=>o(!0)).catch(()=>{})},[]);const s=m.useCallback(c=>{c.data?.type==="UPDATE_READY"?a(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&a(!1)},[]);return m.useEffect(()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",s),navigator.serviceWorker.addEventListener("controllerchange",()=>{a(!1)})),()=>{navigator.serviceWorker.removeEventListener("message",s)}),[s]),Tt.jsx(fNr,{children:Tt.jsx(ukt,{store:e,children:Tt.jsx(xNr,{value:n,children:Tt.jsxs(WRr,{children:[Tt.jsx(MVr,{}),Tt.jsx(bKt,{children:Tt.jsx(mNr,{children:Tt.jsxs(Yfn,{children:[r?Tt.jsx(ojn,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Tt.jsx(zVr,{})]})})})]})})})})});function FVr(e){const n=e.getState(),o=n.tenantState.loggedInUser,r=o?.zeniSessionId!=null?o:_i.getSignedInUser();if(r?.userId==null||r?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=X1(n);let c;if(!a||["signin","signout"].includes(a))if(s?.tenantEmailDomain!=null&&s?.tenantId!=null)a=s.tenantEmailDomain,c=s.tenantId;else{const d=_i.getActiveTenantForUser();if(d?.tenantEmailDomain==null||d?.tenantId==null)return;a=d.tenantEmailDomain,c=d.tenantId}else c=_i.getSignedInUserTenant(a)?.tenantId;c!=null&&(jot(r.userId,r.zeniSessionId,c),e.dispatch(e1e(c)),a!=null&&_i.saveActiveTenantDomainForUser(a),S8.shouldFetchActiveTenant(c)&&(S8.markActiveTenantFetchStarted(c),e.dispatch(Bot(r.userId,c,r.zeniSessionId))),S8.shouldFetchExcludedResources(c)&&(S8.markExcludedResourcesFetchStarted(c),e.dispatch(CEt(r.userId,c))),S8.shouldFetchConnections(c)&&(S8.markConnectionsFetchStarted(c),e.dispatch(vEt(r.userId,c))))}function RVr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const NVr=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),Ant=`/service-worker.js?v=${Date.now()}&env=QA&endpoint=${encodeURIComponent("https://zeni-webapp-qa.uc.r.appspot.com")}`;function jnt(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const r=o.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content available; will be used when all tabs are closed."),navigator.serviceWorker.controller?.postMessage({type:"UPDATE_READY"}),o.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},o.waiting&&o.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",()=>{console.log("New service worker activated."),o.active?.postMessage({type:"CLIENTS_CLAIM"})})}).catch(o=>{console.error("Error during service worker registration:",o)})}const Ent="zeni-chunk-reload-at",VVr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function Int(e){try{const n=Number(sessionStorage.getItem(Ent))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(Ent,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let Ire=!1,Lnt=null;const Tnt="//js.hs-scripts.com/5991084.js",Dnt="hs-script-loader",HVr=_i.getSignedInUser(),UVr=HVr?.zeniSessionId;var i8;window.addEventListener("vite:preloadError",e=>{const n=e;Int(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return VVr.some(r=>o.includes(r))})(e.reason)&&Int(e.reason)}),async function(){try{const o=await async function(){const a={environment:Mc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${g2e}/api/keys?query=${s}`);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c.json()}catch(c){return console.error("Error fetching details:",c),null}}(),r=(e=o,n="ZENI-WEB-APP-"+Mc,JI.AES.decrypt(e,n).toString(JI.enc.Utf8));zRr(JSON.parse(r)),qEt.createRoot(document.getElementById("root")).render(Tt.jsx(T.StrictMode,{children:Tt.jsx(pkt,{children:Tt.jsx(OVr,{})})})),function(){const a=()=>{const s=Ua.sentryDsn?.trim();if(!s)return;const c=Ua.sentryProfileSamplingRate>0;Y$t({dsn:s,tracesSampleRate:Ua.sentryTraceSamplingRate,profilesSampleRate:c?Ua.sentryProfileSamplingRate:0,integrations:[q$t(),...c?[K$t()]:[],Z$t({maskAllText:!0,blockAllMedia:!0})],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSendTransaction:d=>(d.breadcrumbs&&(d.breadcrumbs=d.breadcrumbs.filter(u=>u.category!=="console"||!((u.message??"").toLowerCase().includes("called people set")||Array.isArray(u.data?.arguments)&&u.data.arguments.some(p=>typeof p=="string"&&p.toLowerCase().includes("called people set"))||(Array.isArray(u.data?.arguments)&&(u.data.arguments=u.data.arguments.map(p=>{if(typeof p=="string"&&p.includes("user_roles"))try{const h=p.match(/\{.*\}/s);if(h!==null){const g=JSON.parse(h[0]);if(g.user_roles!=null)return delete g.user_roles,p.replace(h[0],JSON.stringify(g))}}catch{}return p})),0)))),d)}),J$t("session-id",UVr)};"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,0)}()}catch(o){console.error("Error initializing app:",o)}var e,n}(),typeof window>"u"?Promise.resolve(!1):Lnt!==null||(Lnt=new Promise(e=>{if(Ire)return void e(!0);const n=()=>{Ire?e(!0):(Ire=!0,new Promise((r,a)=>{if(document.getElementById(Dnt))return void r();const s=document.createElement("script");s.id=Dnt,s.src=Tnt,s.async=!0,s.onload=()=>r(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${Tnt}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(r=>{console.error("Error loading third-party scripts:",r),e(!0)}))},o=()=>{var r,a;r=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:a}):setTimeout(r,50)};document.readyState==="complete"?o():window.addEventListener("load",o,{once:!0})})),function(){if("serviceWorker"in navigator){if(new URL("https://qa.app.zeni.ai",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{var e;NVr?(e=Ant,fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const o=n.headers.get("content-type");n.status===404||o!=null&&!o.includes("javascript")?navigator.serviceWorker.ready.then(r=>{r.unregister().then(()=>window.location.reload())}):jnt(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):jnt(Ant)})}}(),(i8=console.log)&&i8 instanceof Function&&Ld(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a})=>{e(i8),n(i8),o(i8),r(i8),a(i8)});export{VRr as $,HUr as A,ZNr as B,P as C,Z as D,aHr as E,VUr as F,mPo as G,Jpe as H,WUr as I,xQr as J,ce as K,w2e as L,$n as M,ba as N,_Hr as O,wQr as P,iNr as Q,S$t as R,EVr as S,QUr as T,CQr as U,KG as V,SHr as W,rHr as X,lNr as Y,rNr as Z,vQr as _,JG as a,w$t as a$,LHr as a0,Ku as a1,g2e as a2,mH as a3,ZWr as a4,n2t as a5,WWr as a6,A2e as a7,pnt as a8,jNr as a9,gWr as aA,yWr as aB,bWr as aC,vHr as aD,JUr as aE,CUr as aF,$Ur as aG,ime as aH,tWr as aI,eWr as aJ,SUr as aK,vUr as aL,CHr as aM,lg as aN,BUr as aO,$Nr as aP,RUr as aQ,YDo as aR,MHr as aS,bXn as aT,_2o as aU,KUr as aV,qUr as aW,ZUr as aX,jHr as aY,wn as aZ,Ir as a_,bNr as aa,SNr as ab,ANr as ac,Vmo as ad,unt as ae,vNr as af,_de as ag,PF as ah,AN as ai,cnt as aj,Qo as ak,yUr as al,xUr as am,S_o as an,BHr as ao,zUr as ap,Pt as aq,MUr as ar,iT as as,_$ as at,K3 as au,_Ur as av,xWr as aw,r2t as ax,mWr as ay,fWr as az,cVr as b,XWr as b$,yQr as b0,RNr as b1,IHr as b2,THr as b3,wNr as b4,x2e as b5,NRr as b6,$Hr as b7,iro as b8,m0t as b9,YHr as bA,La as bB,CWr as bC,iUr as bD,nUr as bE,dQr as bF,DUr as bG,iQr as bH,sUr as bI,lUr as bJ,dUr as bK,cUr as bL,mUr as bM,hUr as bN,FUr as bO,qHr as bP,KHr as bQ,OUr as bR,NUr as bS,XHr as bT,eUr as bU,tUr as bV,pUr as bW,uUr as bX,wHr as bY,gUr as bZ,fUr as b_,zHr as ba,qWr as bb,GWr as bc,pNr as bd,rUr as be,uHr as bf,fHr as bg,Ppe as bh,pHr as bi,JWr as bj,wUr as bk,mHr as bl,gHr as bm,hHr as bn,WS as bo,XUr as bp,UHr as bq,QHr as br,WHr as bs,NHr as bt,RHr as bu,GHr as bv,GUr as bw,VHr as bx,HHr as by,YUr as bz,vd as c,nQr as c$,oUr as c0,gQr as c1,mQr as c2,Qzr as c3,rQr as c4,jUr as c5,LUr as c6,EUr as c7,sHr as c8,kUr as c9,xHr as cA,IUr as cB,Hi as cC,FKi as cD,AWr as cE,$$t as cF,vWr as cG,IWr as cH,SWr as cI,EWr as cJ,RWr as cK,yHr as cL,bHr as cM,VWr as cN,$ as cO,OWr as cP,zWr as cQ,kWr as cR,FWr as cS,wWr as cT,QWr as cU,KWr as cV,tQr as cW,eQr as cX,oQr as cY,dHr as cZ,bUr as c_,AUr as ca,bhe as cb,TUr as cc,PUr as cd,CLr as ce,IDr as cf,Zie as cg,uQr as ch,pQr as ci,hQr as cj,cQr as ck,EHr as cl,cbt as cm,MWr as cn,BWr as co,DWr as cp,_Wr as cq,PWr as cr,aQr as cs,TWr as ct,LWr as cu,NWr as cv,k2e as cw,gNr as cx,$Wr as cy,jWr as cz,i as d,aUr as d0,Xjn as d1,Vb as d2,fQr as d3,Ajo as d4,YWr as d5,UWr as d6,ZHr as d7,HWr as d8,hNr as d9,PNr as da,NNr as db,ble as dc,gSt as dd,mSt as de,cHr as df,GRr as dg,QRr as dh,WSt as di,SQr as dj,xlr as dk,FVr as e,Li as f,po as g,$Qr as h,Ua as i,gn as j,PHr as k,kh as l,Pe as m,j_n as n,bho as o,bQr as p,UUr as q,g3 as r,DHr as s,S8 as t,ZG as u,yNr as v,yhe as w,Rdi as x,D as y,_i as z};