@zeniai/web-app-ui 5.0.98-dev → 5.0.98-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 (60) hide show
  1. package/dist/assets/{AddressRoutes-DDaIV4eZ.js → AddressRoutes-CZnINFd1.js} +1 -1
  2. package/dist/assets/{AddressScreen-DxaubiXq.js → AddressScreen-CWbRsmbp.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-m8Zgq_GS.js → AiCfoScreen-ByJaMYdf.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-B4r-0-50.js → BillPayApprovalRoutes-B3i4J9uo.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DQzlGeQi.js → BillPayRoutes-6NMIykXi.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-BIrHn3fq.js → BusinessVerificationPageScreen-CKWDQbki.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-Qksh7aEY.js → ChargeCardRoutes-CuET-m0-.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-Bh0KRqU9.js → CompanyPassportScreen-gi1zQDQy.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-9JU_wknG.js → ConnectionAuthScreen-De-vuICZ.js} +1 -1
  10. package/dist/assets/{CustomerOnboardingAuthScreen-Bmz9Q3W4.js → CustomerOnboardingAuthScreen-Cm9qzjcw.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingRoutes-X_ZDpwiP.js → CustomerOnboardingRoutes-3ZdetMQC.js} +1 -1
  12. package/dist/assets/{DashboardRoutes-BogZbtoT.js → DashboardRoutes-B4iMdus4.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-Q-dqiquI.js → DefaultTenantHome-CmtmKMal.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-BY-jUiMw.js → DomesticWireDetailScreen-i5P7thz2.js} +1 -1
  15. package/dist/assets/{DrawerScreen-Drpask10.js → DrawerScreen-8pLwC76h.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-CbdIl_vZ.js → EntityDetailRoutes-Dr3SOu7N.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-DtnWFchZ.js → ExpenseAutomationRoutes-TQM73kS9.js} +1 -1
  18. package/dist/assets/{FeaturePreviewScreen-DvNQU3gG.js → FeaturePreviewScreen-C1MJa7gv.js} +1 -1
  19. package/dist/assets/{HubSpotOAuthCallbackScreen-DQMaXQ2W.js → HubSpotOAuthCallbackScreen-B7ampOQu.js} +1 -1
  20. package/dist/assets/{MagicLinkRoutes-TtaU4o7n.js → MagicLinkRoutes-NEjpbABr.js} +1 -1
  21. package/dist/assets/{MagicLinkSignInScreen-ZdC4mZB_.js → MagicLinkSignInScreen-CosgA8eP.js} +1 -1
  22. package/dist/assets/{MobileAppDrawer-BkelcJG3.js → MobileAppDrawer-n526oWrk.js} +1 -1
  23. package/dist/assets/{NotFoundScreen-Dpz39bup.js → NotFoundScreen-Brpo5hIh.js} +1 -1
  24. package/dist/assets/{NotificationRoutes-DMPt7wnb.js → NotificationRoutes-VqdMKuyJ.js} +1 -1
  25. package/dist/assets/{OAuthConsentScreen-CUDMrd3J.js → OAuthConsentScreen-BB710FHj.js} +1 -1
  26. package/dist/assets/{PandLWithForecastRoutes-gaSgTRi0.js → PandLWithForecastRoutes-ZxQLGrNQ.js} +1 -1
  27. package/dist/assets/{PeopleRoutes-ulChxGY4.js → PeopleRoutes-CAPFlXeC.js} +1 -1
  28. package/dist/assets/{PerformanceRoutes-FHM73Dcm.js → PerformanceRoutes-DRea1YUE.js} +1 -1
  29. package/dist/assets/{QBOConnectionScreen-CPvxeBk6.js → QBOConnectionScreen-DvvmYU71.js} +1 -1
  30. package/dist/assets/{ReferralListScreen-D2RlSd8S.js → ReferralListScreen-D8LbwXaw.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRoutes-ClT51Soc.js → ReimbursementApprovalRoutes-DRpummvD.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Ck-1sOnS.js → ReimbursementApprovalRuleDetailScreen-DqylTjul.js} +1 -1
  33. package/dist/assets/{ReimbursementRoutes-D9TuG6Wi.js → ReimbursementRoutes-Ck-7Lo_C.js} +1 -1
  34. package/dist/assets/{ReportsRoutes-B8B68Eos.js → ReportsRoutes-Cmht3lbb.js} +1 -1
  35. package/dist/assets/{RewardsRoutes-C2gyLmQq.js → RewardsRoutes-PWORm-gP.js} +1 -1
  36. package/dist/assets/{ScreenRoutes-CrkYMUz1.js → ScreenRoutes-CA8fUnaP.js} +2 -2
  37. package/dist/assets/{SettingsRoutes-CpAwrhPW.js → SettingsRoutes-Dni4ADoP.js} +1 -1
  38. package/dist/assets/{SetupPagesScreen-NIC2w04g.js → SetupPagesScreen-_IKYoHXM.js} +1 -1
  39. package/dist/assets/{SignInScreen-_pR-7wM2.js → SignInScreen-RaghIVhM.js} +1 -1
  40. package/dist/assets/{SignOutScreen-BPL7WsWD.js → SignOutScreen-CNkJNt7x.js} +1 -1
  41. package/dist/assets/{TaskListScreen-tKxgJp9M.js → TaskListScreen-D8kgWT4b.js} +1 -1
  42. package/dist/assets/{TaskRoutes-CnDOH5U1.js → TaskRoutes-Cz1ZyHoB.js} +1 -1
  43. package/dist/assets/{TransactionDetailRoutes-AzvoZbPr.js → TransactionDetailRoutes-63tKIp6E.js} +1 -1
  44. package/dist/assets/{TransactionDetailScreen-VjAJduyc.js → TransactionDetailScreen-DioDP0gW.js} +1 -1
  45. package/dist/assets/{TransactionListRoutes-DAers0Rg.js → TransactionListRoutes-Dtm4HNMN.js} +1 -1
  46. package/dist/assets/{TreasuryRoutes-jwSS6VHf.js → TreasuryRoutes-BhRZ97cm.js} +1 -1
  47. package/dist/assets/{VendorsRoutes-BVKYJ6yV.js → VendorsRoutes-ODAB2xhO.js} +1 -1
  48. package/dist/assets/{WiseConfirmationScreen-Bp7k95gU.js → WiseConfirmationScreen-BXqYXseQ.js} +1 -1
  49. package/dist/assets/{ZeniAccountRoutes-9-ipmrl8.js → ZeniAccountRoutes-RdAjME8K.js} +1 -1
  50. package/dist/assets/{ZeniAccountStatementScreen-CYFmOZM9.js → ZeniAccountStatementScreen-Dh6yAFkp.js} +1 -1
  51. package/dist/assets/{analyticsHelper-StfDTSGk.js → analyticsHelper-CnXSrEd_.js} +1 -1
  52. package/dist/assets/{getLocaleForTenant-JJvZDWEQ.js → getLocaleForTenant-B-vHrKHL.js} +1 -1
  53. package/dist/assets/{index-BcoFhJ4O.js → index-Sm9Ycasn.js} +5 -5
  54. package/dist/assets/{routePaths-BPSPu97F.js → routePaths-Pqm-PNC8.js} +1 -1
  55. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CRHV9fCR.js → useAiCfoDashboardSuggestedQuestionsChips-CUpKl9RP.js} +1 -1
  56. package/dist/assets/{useAskAiCfoHostNavButtonProps-HZkyXVvQ.js → useAskAiCfoHostNavButtonProps-B40bGqEV.js} +1 -1
  57. package/dist/assets/{useInitialThreadRequest-Ro9Y0en9.js → useInitialThreadRequest-ELLLToSA.js} +1 -1
  58. package/dist/assets/{withTransactionSidePanel-Bez35evJ.js → withTransactionSidePanel-Dk7__fUW.js} +1 -1
  59. package/dist/index.html +1 -1
  60. 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-i1VxNGkd.js","assets/sentry-5pTQe3BK.js","assets/core-Fwwp8hop.js","assets/index-B-WtQiD1.js","assets/DefaultTenantHome-Q-dqiquI.js","assets/mui-Dar_oGjJ.js","assets/getLocaleForTenant-JJvZDWEQ.js","assets/analytics-D310XSjQ.js","assets/utils-3_hFkWEq.js","assets/ScreenRoutes-CrkYMUz1.js","assets/analyticsHelper-StfDTSGk.js","assets/ConnectionAuthScreen-9JU_wknG.js","assets/QBOConnectionScreen-CPvxeBk6.js","assets/empty-BOxndxwD.js","assets/index-D6xVpTbl.js","assets/url-CfkU6Gnm.js","assets/index-CfQpPMgv.js","assets/decodeURIComponentSafe-DaWuthXc.js","assets/SignInScreen-_pR-7wM2.js","assets/useDeviceId-9VsPbMb7.js","assets/MagicLinkSignInScreen-ZdC4mZB_.js","assets/NotFoundScreen-Dpz39bup.js","assets/MagicLinkRoutes-TtaU4o7n.js","assets/WiseConfirmationScreen-Bp7k95gU.js","assets/HubSpotOAuthCallbackScreen-DQMaXQ2W.js","assets/CustomerOnboardingAuthScreen-Bmz9Q3W4.js","assets/SignOutScreen-BPL7WsWD.js","assets/OAuthConsentScreen-CUDMrd3J.js"])))=>i.map(i=>d[i]);
2
- import{a as m,b as T,c as vne,R as m8t,p as kW,r as Yu,g as rKe,e as Xpe,f as g8t,s as ehe,i as f8t,w as x8t,j as y8t,S as b8t,k as w8t,l as C8t,m as v8t,n as S8t,o as k8t}from"./sentry-5pTQe3BK.js";import{L as $8t,C as the,_ as qu,a as MI,b as A8t,c as MR,d as _I,u as aKe,T as j8t,e as E8t,f as I8t,g as L8t,h as lKe,i as T8t,k as D8t,j as Et,l as P8t}from"./liveblocks-D1TxH59e.js";import{f as sKe,r as Dr,R as fx,P as gl,O as B8t,N as cKe,u as Op,g as Fp,h as zI,i as dKe,j as Jo,m as Sle,k as uKe,l as gj,n as M8t,o as _8t,p as tu,q as z8t,B as O8t}from"./core-Fwwp8hop.js";import{L as nhe,bl as F8t,bm as R8t,bn as I4,bo as pKe,bp as N8t,bq as Nt,br as HS,bs as G2,bt as Wa,bu as V8t,bv as L4,bw as Va,bx as H8t,by as U8t,bz as W8t,bA as ME,bB as x4,bC as u3,bD as _R,bE as cn,bF as hKe,bG as mKe,bH as kle,bI as Rp,bJ as p3,bK as ed,bL as Kf,bM as Q8t,bN as Rl,bO as G8t,bP as US,bQ as Y8t,bR as q8t,bS as K8t,bT as py,bU as Z8t,bV as ohe,bW as J8t,bX as X8t,bY as ext,bZ as txt,b_ as nxt,b$ as oxt,c0 as ixt,c1 as rxt,c2 as D7,c3 as zR,c4 as axt,c5 as OR,c6 as FR,c7 as RR,c8 as $le,c9 as NR,ca as nS,cb as oS,cc as VR,cd as lxt,ce as sxt,cf as ihe,cg as cxt,ch as dxt,ci as uxt,cj as Rd,ck as gKe,cl as Ale,cm as pxt,cn as j9,co as rhe,cp as hxt,cq as mxt,cr as gxt,cs as Hy,ct as Uy,cu as fKe,cv as xKe,cw as jle,cx as fxt,cy as xxt,cz as xz,cA as yKe,cB as yxt,cC as bKe,cD as bxt,cE as fj,cF as ahe,cG as wxt,cH as wKe,cI as CKe,cJ as vKe,cK as Cxt,cL as lhe,cM as vxt,cN as Sxt,cO as SKe,cP as kxt,cQ as she,cR as vc,cS as yl,cT as $xt,cU as iS,cV as Bd,cW as kKe,cX as Axt,cY as _E,cZ as Hx,c_ as wa,c$ as jxt,d0 as Ext,d1 as Ixt,d2 as Lxt,d3 as nT,d4 as Oh,d5 as Txt,d6 as Dxt,d7 as Pxt,d8 as Bxt,d9 as oT,da as hy,db as HR,dc as Mxt,dd as _xt,de as Wy,df as Nd,dg as $Ke,dh as AKe,di as zxt,dj as WS,dk as Sne,dl as Oxt,dm as j1,dn as my,dp as Ele,dq as jKe,dr as EKe,ds as IKe,dt as LKe,du as TKe,dv as DKe,dw as Fxt,dx as che,dy as Rxt,_ as cd,dz as Ile,dA as PKe,dB as Nxt,dC as dhe,dD as np,dE as Zf,dF as Vxt,dG as Hxt,dH as BKe,dI as kne,dJ as r_,dK as Uxt,dL as Wxt,dM as Qxt,dN as Gxt,dO as Yxt,dP as qxt,dQ as Kxt,dR as Zxt,dS as Jxt,dT as Xxt,dU as Gj,dV as Yj,dW as MKe,dX as YC,dY as Lle,dZ as Tle,d_ as QS,d$ as Dle,e0 as Ple,e1 as Ble,e2 as Mle,e3 as _Ke,e4 as _le,e5 as eyt,e6 as tyt,e7 as zKe,e8 as uhe,e9 as nyt,ea as zle,eb as oyt,ec as iyt,ed as OKe,ee as ryt,ef as ayt,eg as lyt,eh as FKe,ei as syt,ej as RKe,ek as NKe,el as cyt,em as dyt,en as uyt,eo as pyt,ep as hyt,eq as myt,er as gyt,es as fyt,et as xyt,eu as phe,ev as UR,ew as yyt,ex as byt,ey as wyt,ez as Cyt,eA as vyt,eB as Syt,eC as kyt,eD as $yt,eE as hhe,eF as VKe,eG as HKe,eH as UKe,eI as WKe,eJ as QKe,eK as GKe,eL as Ayt,eM as jyt,eN as Eyt,v as Iyt,eO as OI,eP as V1,eQ as YKe,eR as Lyt,eS as Ole,eT as FI,eU as Fle,eV as qKe,eW as KKe,eX as Tyt,eY as ZKe,eZ as Dyt,e_ as JKe,e$ as Pyt,f0 as XKe,f1 as Byt,f2 as Myt,f3 as _yt,f4 as zyt,f5 as Oyt,f6 as mhe,f7 as eZe,f8 as zb,f9 as ghe,fa as Fyt,fb as fhe,fc as Ryt,fd as Nyt,fe as tZe,ff as nZe,fg as Vyt,fh as Hyt,fi as Uyt,fj as Wyt,fk as Qyt,fl as Gyt,fm as yz,fn as Rle,fo as oZe,fp as Yyt,fq as qj,fr as qyt,fs as Kyt,ft as Zyt,fu as Jyt,fv as Xyt,fw as ebt,fx as tbt,fy as nbt,fz as obt,fA as ibt,fB as iZe,fC as rbt,fD as abt,fE as lbt,fF as xhe,fG as sbt,fH as cbt,fI as dbt,fJ as ubt,fK as pbt,fL as $ne,fM as hbt,fN as mbt,fO as gbt,fP as fbt,fQ as xbt,fR as ybt,fS as bbt,fT as wbt,fU as yhe,fV as Cbt,fW as vbt}from"./zeni-epic-state-i1VxNGkd.js";import{n as l,T as rZe,G as RI,j as Uo,c as Te,k as Rn,C as aZe,u as Nle,a as Ane,A as Sbt,b as kbt,I as $bt,d as Abt,D as bz,S as lZe}from"./mui-Dar_oGjJ.js";import{r as jbt,m as Eh}from"./analytics-D310XSjQ.js";import{u as Qp}from"./plaid-BGhwh8RZ.js";import{g as Ebt,O as Ibt,H as Lbt,S as Tbt,T as Dbt,a as Pbt,u as Bbt,b as Mbt}from"./dnd-B_nt-Uf4.js";import{l as _bt}from"./stripe-DMRn4zHo.js";import{L as wv}from"./lottie-BGeomX3N.js";import{r as js}from"./lexical-D4DqnnDh.js";import{D as jne,P as Ene,_ as sZe,a as cZe}from"./pdf-BftxTBXg.js";import{R as zE,G as gy,X as os,Y as Nl,H as fy,I as ad,J as Np,K as Qy,L as Gp,M as GS,N as dZe,O as zbt,P as Obt,Q as WR,S as Cv,U as Fbt,V as Vle,W as Rbt,Z as Nbt,_ as Vbt}from"./recharts-DuOI9Nsb.js";import{r as Hbt}from"./utils-3_hFkWEq.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]="71cb0523-2923-4e32-8053-3056bed05f50",e._sentryDebugIdIdentifier="sentry-dbid-71cb0523-2923-4e32-8053-3056bed05f50")}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 i of o)if(i.type==="childList")for(const a of i.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 i=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,i)}})();var bhe,iT={},Ubt=function(){if(bhe)return iT;bhe=1;var e=sKe();return iT.createRoot=e.createRoot,iT.hydrateRoot=e.hydrateRoot,iT}(),Pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof vne<"u"?vne:typeof self<"u"?self:{};function Ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var whe,Che,vhe={exports:{}},Wk={};function uZe(){return Che||(Che=1,vhe.exports=function(){if(whe)return Wk;whe=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=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)i.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 Wk.Fragment=o,Wk.jsx=c,Wk.jsxs=c,Wk}()),vhe.exports}var t=uZe();const Wbt=m.createContext(null),$W={didCatch:!1,error:null};let Qbt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$W}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState($W)}}componentDidCatch(e,n){var o,i;(o=(i=this.props).onError)===null||o===void 0||o.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:i}=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,i)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState($W))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:i}=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(i===void 0)throw s;c=i}}return m.createElement(Wbt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var She,AW={exports:{}},khe,$he,jW,Gbt=(She||(She=1,$he=AW.exports,jW=function(){var e,n,o,i,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,k,$,j,A=d[e.options.currentLocale],E=!1,L=!1,I="",_=1e12,z=1e9,B=1e6,N="",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,"-"))&&(k=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")&&(I=" "),f=f.replace(new RegExp(I+"a[kmbt]?"),""),w>=_&&!b||b==="t"?(I+=A.abbreviations.trillion,g/=_):w<_&&w>=z&&!b||b==="b"?(I+=A.abbreviations.billion,g/=z):w<z&&w>=B&&!b||b==="m"?(I+=A.abbreviations.million,g/=B):(w<B&&w>=1e3&&!b||b==="k")&&(I+=A.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(L=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],$=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),N=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):N=e._.toFixed(g,v.length,x),C=N.split(".")[0],N=e._.includes(N,".")?A.delimiters.decimal+N.split(".")[1]:"",L&&Number(N.slice(1))===0&&(N="")):C=e._.toFixed(g,0,x),I&&!b&&Number(C)>=1e3&&I!==A.abbreviations.trillion)switch(C=String(Number(C)/1e3),I){case A.abbreviations.thousand:I=A.abbreviations.million;break;case A.abbreviations.million:I=A.abbreviations.billion;break;case A.abbreviations.billion:I=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 $>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+A.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+N+(I||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):k>=0?j=k===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,k=g.toString().split("."),$=f-(y||0);return b=k.length===2?Math.min(Math.max(k[1].length,$),f):$,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,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{k=e.localeData(f)}catch{k=e.localeData(e.locale())}return b=k.currency.symbol,C=k.abbreviations,x=k.delimiters.decimal,y=k.delimiters.thousands==="."?"\\.":k.delimiters.thousands,!(($=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),$[0]!==b)||($=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),$[0]!==C.thousand&&$[0]!==C.million&&$[0]!==C.billion&&$[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)}}),i={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(i.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")?i: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,i.suffixes[f])){x=Math.pow(i.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 k=e._.correctionFactor(b,w);return b*k*(w*k)/(k*k)},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},(khe=AW).exports?khe.exports=jW():$he.numeral=jW()),AW.exports);const i4=Ai(Gbt);function y4(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(i=>o.searchParams.append("args[]",i)),`Minified MUI error #${e}; visit ${o} for the full message.`}const r4="$$material";var Ybt={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 qbt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var Kbt=/[A-Z]|^ms/g,Zbt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pZe=function(e){return e.charCodeAt(1)===45},Ahe=function(e){return e!=null&&typeof e!="boolean"},EW=qbt(function(e){return pZe(e)?e:e.replace(Kbt,"-$&").toLowerCase()}),jhe=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Zbt,function(o,i,a){return h7={name:i,styles:a,next:h7},i})}return Ybt[e]===1||pZe(e)||typeof n!="number"||n===0?n:n+"px"};function wz(e,n,o){if(o==null)return"";var i=o;if(i.__emotion_styles!==void 0)return i;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return h7={name:a.name,styles:a.styles,next:h7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)h7={name:c.name,styles:c.styles,next:h7},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+=wz(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;Ahe(y)&&(h+=EW(f)+":"+jhe(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)Ahe(x[b])&&(h+=EW(f)+":"+jhe(f,x[b])+";");else{var w=wz(d,u,x);switch(f){case"animation":case"animationName":h+=EW(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var h7,Ehe=/label:\s*([^\s;{]+)\s*(;|$)/g,Ihe,Lhe,The,Dhe,Phe,Bhe={exports:{}};function Jbt(){return Lhe?Ihe:(Lhe=1,Ihe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Xbt(){if(Dhe)return The;Dhe=1;var e=Jbt();function n(){}function o(){}return o.resetWarningCache=n,The=function(){function i(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 i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function Hle(){return Phe||(Phe=1,Bhe.exports=Xbt()()),Bhe.exports}const Cn=Ai(Hle());var ewt=function(){function e(o){var i=this;this._insertTag=function(a){var s;s=i.tags.length===0?i.insertionPoint?i.insertionPoint.nextSibling:i.prepend?i.container.firstChild:i.before:i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(a,s),i.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 i=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]}(i);try{a.insertRule(o,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)}),this.tags=[],this.ctr=0},e}(),Ed="-ms-",Mhe="-moz-",zr="-webkit-",hZe="comm",Ule="rule",Wle="decl",mZe="@keyframes",twt=Math.abs,QR=String.fromCharCode,nwt=Object.assign;function gZe(e){return e.trim()}function Or(e,n,o){return e.replace(n,o)}function Ine(e,n){return e.indexOf(n)}function Gc(e,n){return 0|e.charCodeAt(n)}function OE(e,n,o){return e.slice(n,o)}function vg(e){return e.length}function Qle(e){return e.length}function rT(e,n){return n.push(e),e}var GR=1,rS=1,fZe=0,Hu=0,Ss=0,YS="";function YR(e,n,o,i,a,s,c){return{value:e,root:n,parent:o,type:i,props:a,children:s,line:GR,column:rS,length:c,return:""}}function Qk(e,n){return nwt(YR("",null,null,"",null,null,0),e,{length:-e.length},n)}function Bp(){return Ss=Hu<fZe?Gc(YS,Hu++):0,rS++,Ss===10&&(rS=1,GR++),Ss}function e3(){return Gc(YS,Hu)}function a_(){return Hu}function NI(e,n){return OE(YS,e,n)}function FE(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 xZe(e){return GR=rS=1,fZe=vg(YS=e),Hu=0,[]}function yZe(e){return YS="",e}function l_(e){return gZe(NI(Hu-1,Lne(e===91?e+2:e===40?e+1:e)))}function owt(e){for(;(Ss=e3())&&Ss<33;)Bp();return FE(e)>2||FE(Ss)>3?"":" "}function iwt(e,n){for(;--n&&Bp()&&!(Ss<48||Ss>102||Ss>57&&Ss<65||Ss>70&&Ss<97););return NI(e,a_()+(n<6&&e3()==32&&Bp()==32))}function Lne(e){for(;Bp();)switch(Ss){case e:return Hu;case 34:case 39:e!==34&&e!==39&&Lne(Ss);break;case 40:e===41&&Lne(e);break;case 92:Bp()}return Hu}function rwt(e,n){for(;Bp()&&e+Ss!==57&&(e+Ss!==84||e3()!==47););return"/*"+NI(n,Hu-1)+"*"+QR(e===47?e:Bp())}function awt(e){for(;!FE(e3());)Bp();return NI(e,Hu)}function lwt(e){return yZe(s_("",null,null,null,[""],e=xZe(e),0,[0],e))}function s_(e,n,o,i,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,k="",$=a,j=s,A=i,E=k;w;)switch(y=v,v=Bp()){case 40:if(y!=108&&Gc(E,g-1)==58){Ine(E+=Or(l_(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=l_(v);break;case 9:case 10:case 13:case 32:E+=owt(y);break;case 92:E+=iwt(a_()-1,7);continue;case 47:switch(e3()){case 42:case 47:rT(swt(rwt(Bp(),a_()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=vg(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=Or(E,/\f/g,"")),x>0&&vg(E)-g&&rT(x>32?zhe(E+";",i,o,g-1):zhe(Or(E," ","")+";",i,o,g-2),u);break;case 59:E+=";";default:if(rT(A=_he(E,n,o,p,h,a,d,k,$=[],j=[],g),s),v===123)if(h===0)s_(E,n,A,A,$,s,g,d,j);else switch(f===99&&Gc(E,3)===110?100:f){case 100:case 108:case 109:case 115:s_(e,A,A,i&&rT(_he(e,A,A,0,0,a,d,k,a,$=[],g),j),a,j,g,d,i?$:j);break;default:s_(E,A,A,A,[""],j,0,d,j)}}p=h=x=0,b=C=1,k=E="",g=c;break;case 58:g=1+vg(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Ss=Hu>0?Gc(YS,--Hu):0,rS--,Ss===10&&(rS=1,GR--),Ss==125))continue}switch(E+=QR(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(vg(E)-1)*C,C=1;break;case 64:e3()===45&&(E+=l_(Bp())),f=e3(),h=g=vg(k=E+=awt(a_())),v++;break;case 45:y===45&&vg(E)==2&&(b=0)}}return s}function _he(e,n,o,i,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=Qle(f),y=0,b=0,w=0;y<i;++y)for(var C=0,v=OE(e,g+1,g=twt(b=c[y])),k=e;C<x;++C)(k=gZe(b>0?f[C]+" "+v:Or(v,/&\f/g,f[C])))&&(u[w++]=k);return YR(e,n,o,a===0?Ule:d,u,p,h)}function swt(e,n,o){return YR(e,n,o,hZe,QR(Ss),OE(e,2,-2),0)}function zhe(e,n,o,i){return YR(e,n,o,Wle,OE(e,0,i),OE(e,i+1,-1),i)}function vv(e,n){for(var o="",i=Qle(e),a=0;a<i;a++)o+=n(e[a],a,e,n)||"";return o}function cwt(e,n,o,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Wle:return e.return=e.return||e.value;case hZe:return"";case mZe:return e.return=e.value+"{"+vv(e.children,i)+"}";case Ule:e.value=e.props.join(",")}return vg(o=vv(e.children,i))?e.return=e.value+"{"+o+"}":""}function dwt(e){return function(n){n.root||(n=n.return)&&e(n)}}var uwt=function(e,n,o){for(var i=0,a=0;i=a,a=e3(),i===38&&a===12&&(n[o]=1),!FE(a);)Bp();return NI(e,Hu)},pwt=function(e,n){return yZe(function(o,i){var a=-1,s=44;do switch(FE(s)){case 0:s===38&&e3()===12&&(i[a]=1),o[a]+=uwt(Hu-1,i,a);break;case 2:o[a]+=l_(s);break;case 4:if(s===44){o[++a]=e3()===58?"&\f":"",i[a]=o[a].length;break}default:o[a]+=QR(s)}while(s=Bp());return o}(xZe(e),n))},Ohe=new WeakMap,hwt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,i=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||Ohe.get(o))&&!i){Ohe.set(e,!0);for(var a=[],s=pwt(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]}}},mwt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function bZe(e,n){switch(function(o,i){return 45^Gc(o,0)?(((i<<2^Gc(o,0))<<2^Gc(o,1))<<2^Gc(o,2))<<2^Gc(o,3):0}(e,n)){case 5103:return zr+"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 zr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zr+e+Mhe+e+Ed+e+e;case 6828:case 4268:return zr+e+Ed+e+e;case 6165:return zr+e+Ed+"flex-"+e+e;case 5187:return zr+e+Or(e,/(\w+).+(:[^]+)/,zr+"box-$1$2"+Ed+"flex-$1$2")+e;case 5443:return zr+e+Ed+"flex-item-"+Or(e,/flex-|-self/,"")+e;case 4675:return zr+e+Ed+"flex-line-pack"+Or(e,/align-content|flex-|-self/,"")+e;case 5548:return zr+e+Ed+Or(e,"shrink","negative")+e;case 5292:return zr+e+Ed+Or(e,"basis","preferred-size")+e;case 6060:return zr+"box-"+Or(e,"-grow","")+zr+e+Ed+Or(e,"grow","positive")+e;case 4554:return zr+Or(e,/([^-])(transform)/g,"$1"+zr+"$2")+e;case 6187:return Or(Or(Or(e,/(zoom-|grab)/,zr+"$1"),/(image-set)/,zr+"$1"),e,"")+e;case 5495:case 3959:return Or(e,/(image-set\([^]*)/,zr+"$1$`$1");case 4968:return Or(Or(e,/(.+:)(flex-)?(.*)/,zr+"box-pack:$3"+Ed+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zr+e+e;case 4095:case 3583:case 4068:case 2532:return Or(e,/(.+)-inline(.+)/,zr+"$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(vg(e)-1-n>6)switch(Gc(e,n+1)){case 109:if(Gc(e,n+4)!==45)break;case 102:return Or(e,/(.+:)(.+)-([^]+)/,"$1"+zr+"$2-$3$1"+Mhe+(Gc(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~Ine(e,"stretch")?bZe(Or(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Gc(e,n+1)!==115)break;case 6444:switch(Gc(e,vg(e)-3-(~Ine(e,"!important")&&10))){case 107:return Or(e,":",":"+zr)+e;case 101:return Or(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zr+(Gc(e,14)===45?"inline-":"")+"box$3$1"+zr+"$2$3$1"+Ed+"$2box$3")+e}break;case 5936:switch(Gc(e,n+11)){case 114:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zr+e+Ed+e+e}return e}var gwt=[function(e,n,o,i){if(e.length>-1&&!e.return)switch(e.type){case Wle:e.return=bZe(e.value,e.length);break;case mZe:return vv([Qk(e,{value:Or(e.value,"@","@"+zr)})],i);case Ule: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 vv([Qk(e,{props:[Or(a,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return vv([Qk(e,{props:[Or(a,/:(plac\w+)/,":"+zr+"input-$1")]}),Qk(e,{props:[Or(a,/:(plac\w+)/,":-moz-$1")]}),Qk(e,{props:[Or(a,/:(plac\w+)/,Ed+"input-$1")]})],i)}return""})}}],wZe=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 i,a=e.stylisPlugins||gwt,s={},c=[];i=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=[hwt,mwt],h=[cwt,dwt(function(x){u.insert(x)})],g=function(x){var y=Qle(x);return function(b,w,C,v){for(var k="",$=0;$<y;$++)k+=x[$](b,w,C,v)||"";return k}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){vv(lwt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new ewt({key:n,container:i,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 CZe(e){const{styles:n,defaultTheme:o={}}=e,i=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(RI,{styles:i})}const Fhe=[];function P7(e){return Fhe[0]=e,function(n,o,i){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";h7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=wz(i,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=wz(i,o,n[d]),a&&(s+=c[d]);Ehe.lastIndex=0;for(var u,p="";(u=Ehe.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:h7}}(Fhe)}var Rhe,Nhe,Vhe={exports:{}},sa={};function fwt(){if(Rhe)return sa;Rhe=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=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 i: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 sa.ContextConsumer=s,sa.ContextProvider=c,sa.Element=e,sa.ForwardRef=d,sa.Fragment=o,sa.Lazy=g,sa.Memo=h,sa.Portal=n,sa.Profiler=a,sa.StrictMode=i,sa.Suspense=u,sa.SuspenseList=p,sa.isContextConsumer=function(b){return y(b)===s},sa.isContextProvider=function(b){return y(b)===c},sa.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},sa.isForwardRef=function(b){return y(b)===d},sa.isFragment=function(b){return y(b)===o},sa.isLazy=function(b){return y(b)===g},sa.isMemo=function(b){return y(b)===h},sa.isPortal=function(b){return y(b)===n},sa.isProfiler=function(b){return y(b)===a},sa.isStrictMode=function(b){return y(b)===i},sa.isSuspense=function(b){return y(b)===u},sa.isSuspenseList=function(b){return y(b)===p},sa.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===i||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)},sa.typeOf=y,sa}function xwt(){return Nhe||(Nhe=1,Vhe.exports=fwt()),Vhe.exports}var vZe=xwt();function Of(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 SZe(e){if(m.isValidElement(e)||vZe.isValidElementType(e)||!Of(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=SZe(e[o])}),n}function Vd(e,n,o={clone:!0}){const i=o.clone?{...e}:e;return Of(e)&&Of(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||vZe.isValidElementType(n[a])?i[a]=n[a]:Of(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Of(e[a])?i[a]=Vd(e[a],n[a],o):o.clone?i[a]=Of(n[a])?SZe(n[a]):n[a]:i[a]=n[a]}),i}function ywt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:i=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)-i/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)-i/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 Hhe(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(i=>i.startsWith("@container")).sort((i,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(i.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((i,a)=>{const s=n[a];return delete i[a],i[a]=s,i},{...n}):n}const bwt={borderRadius:4};function Kj(e,n){return n?Vd(e,n,{clone:!1}):e}const qR={xs:0,sm:600,md:900,lg:1200,xl:1536},Uhe={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${qR[e]}px)`},wwt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:qR[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function b4(e,n,o){const i=e.theme||{};if(Array.isArray(n)){const a=i.breakpoints||Uhe;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=i.breakpoints||Uhe;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)}(i.containerQueries?i:wwt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||qR).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function Whe(e,n){return e.reduce((o,i)=>{const a=o[i];return(!a||Object.keys(a).length===0)&&delete o[i],o},n)}function gi(e){if(typeof e!="string")throw new Error(y4(7));return e.charAt(0).toUpperCase()+e.slice(1)}function KR(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const i=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(i!=null)return i}return n.split(".").reduce((i,a)=>i&&i[a]!=null?i[a]:null,e)}function Cz(e,n,o,i=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||i:KR(e,o)||i,n&&(a=n(a,i,e)),a}function Jl(e){const{prop:n,cssProperty:o=e.prop,themeKey:i,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=KR(c.theme,i)||{};return b4(c,d,p=>{let h=Cz(u,a,p);return p===h&&typeof p=="string"&&(h=Cz(u,a,`${n}${p==="default"?"":gi(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const Cwt={m:"margin",p:"padding"},vwt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Qhe={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Swt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!Qhe[e])return[e];e=Qhe[e]}const[n,o]=e.split(""),i=Cwt[n],a=vwt[o]||"";return Array.isArray(a)?a.map(s=>i+s):[i+a]}),kZe=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],$Ze=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function VI(e,n,o,i){const a=KR(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 Gle(e){return VI(e,"spacing",8)}function HI(e,n){return typeof n=="string"||n==null?n:e(n)}function kwt(e,n,o,i){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=HI(c,d),u),{})}(Swt(o),i);return b4(e,e[o],a)}function AZe(e,n){const o=Gle(e.theme);return Object.keys(e).map(i=>kwt(e,n,i,o)).reduce(Kj,{})}function Ll(e){return AZe(e,kZe)}function Tl(e){return AZe(e,$Ze)}function jZe(e=8,n=Gle({spacing:e})){if(e.mui)return e;const o=(...i)=>(i.length===0?[1]:i).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function ZR(...e){const n=e.reduce((i,a)=>(a.filterProps.forEach(s=>{i[s]=a}),i),{}),o=i=>Object.keys(i).reduce((a,s)=>n[s]?Kj(a,n[s](i)):a,{});return o.propTypes={},o.filterProps=e.reduce((i,a)=>i.concat(a.filterProps),[]),o}function Fh(e){return typeof e!="number"?e:`${e}px solid`}function w0(e,n){return Jl({prop:e,themeKey:"borders",transform:n})}Ll.propTypes={},Ll.filterProps=kZe,Tl.propTypes={},Tl.filterProps=$Ze;const $wt=w0("border",Fh),Awt=w0("borderTop",Fh),jwt=w0("borderRight",Fh),Ewt=w0("borderBottom",Fh),Iwt=w0("borderLeft",Fh),Lwt=w0("borderColor"),Twt=w0("borderTopColor"),Dwt=w0("borderRightColor"),Pwt=w0("borderBottomColor"),Bwt=w0("borderLeftColor"),Mwt=w0("outline",Fh),_wt=w0("outlineColor"),c_=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=VI(e.theme,"shape.borderRadius",4),o=i=>({borderRadius:HI(n,i)});return b4(e,e.borderRadius,o)}return null};c_.propTypes={},c_.filterProps=["borderRadius"],ZR($wt,Awt,jwt,Ewt,Iwt,Lwt,Twt,Dwt,Pwt,Bwt,c_,Mwt,_wt);const vz=e=>{if(e.gap!==void 0&&e.gap!==null){const n=VI(e.theme,"spacing",8),o=i=>({gap:HI(n,i)});return b4(e,e.gap,o)}return null};vz.propTypes={},vz.filterProps=["gap"];const Sz=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=VI(e.theme,"spacing",8),o=i=>({columnGap:HI(n,i)});return b4(e,e.columnGap,o)}return null};Sz.propTypes={},Sz.filterProps=["columnGap"];const kz=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=VI(e.theme,"spacing",8),o=i=>({rowGap:HI(n,i)});return b4(e,e.rowGap,o)}return null};kz.propTypes={},kz.filterProps=["rowGap"];function Sv(e,n){return n==="grey"?n:e}ZR(vz,Sz,kz,Jl({prop:"gridColumn"}),Jl({prop:"gridRow"}),Jl({prop:"gridAutoFlow"}),Jl({prop:"gridAutoColumns"}),Jl({prop:"gridAutoRows"}),Jl({prop:"gridTemplateColumns"}),Jl({prop:"gridTemplateRows"}),Jl({prop:"gridTemplateAreas"}),Jl({prop:"gridArea"}));function jp(e){return e<=1&&e!==0?100*e+"%":e}ZR(Jl({prop:"color",themeKey:"palette",transform:Sv}),Jl({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Sv}),Jl({prop:"backgroundColor",themeKey:"palette",transform:Sv}));const zwt=Jl({prop:"width",transform:jp}),Yle=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const i=e.theme?.breakpoints?.values?.[o]||qR[o];return i?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:jp(o)}};return b4(e,e.maxWidth,n)}return null};Yle.filterProps=["maxWidth"];const Owt=Jl({prop:"minWidth",transform:jp}),Fwt=Jl({prop:"height",transform:jp}),Rwt=Jl({prop:"maxHeight",transform:jp}),Nwt=Jl({prop:"minHeight",transform:jp});Jl({prop:"size",cssProperty:"width",transform:jp}),Jl({prop:"size",cssProperty:"height",transform:jp});ZR(zwt,Yle,Owt,Fwt,Rwt,Nwt,Jl({prop:"boxSizing"}));const JR={border:{themeKey:"borders",transform:Fh},borderTop:{themeKey:"borders",transform:Fh},borderRight:{themeKey:"borders",transform:Fh},borderBottom:{themeKey:"borders",transform:Fh},borderLeft:{themeKey:"borders",transform:Fh},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fh},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:c_},color:{themeKey:"palette",transform:Sv},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Sv},backgroundColor:{themeKey:"palette",transform:Sv},p:{style:Tl},pt:{style:Tl},pr:{style:Tl},pb:{style:Tl},pl:{style:Tl},px:{style:Tl},py:{style:Tl},padding:{style:Tl},paddingTop:{style:Tl},paddingRight:{style:Tl},paddingBottom:{style:Tl},paddingLeft:{style:Tl},paddingX:{style:Tl},paddingY:{style:Tl},paddingInline:{style:Tl},paddingInlineStart:{style:Tl},paddingInlineEnd:{style:Tl},paddingBlock:{style:Tl},paddingBlockStart:{style:Tl},paddingBlockEnd:{style:Tl},m:{style:Ll},mt:{style:Ll},mr:{style:Ll},mb:{style:Ll},ml:{style:Ll},mx:{style:Ll},my:{style:Ll},margin:{style:Ll},marginTop:{style:Ll},marginRight:{style:Ll},marginBottom:{style:Ll},marginLeft:{style:Ll},marginX:{style:Ll},marginY:{style:Ll},marginInline:{style:Ll},marginInlineStart:{style:Ll},marginInlineEnd:{style:Ll},marginBlock:{style:Ll},marginBlockStart:{style:Ll},marginBlockEnd:{style:Ll},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:vz},rowGap:{style:kz},columnGap:{style:Sz},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:jp},maxWidth:{style:Yle},minWidth:{transform:jp},height:{transform:jp},maxHeight:{transform:jp},minHeight:{transform:jp},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"}},xy=function(){function e(n,o,i,a){const s={[n]:o,theme:i},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=KR(i,u)||{};return h?h(s):b4(s,o,f=>{let x=Cz(g,p,f);return f===x&&typeof f=="string"&&(x=Cz(g,p,`${n}${f==="default"?"":gi(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:i,theme:a={},nested:s}=o||{};if(!i)return null;const c=a.unstable_sxConfig??JR;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=Kj(f,e(x,y,a,c));else{const b=b4({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((k,$)=>k.concat(Object.keys($)),[]),v=new Set(C);return w.every(k=>v.size===Object.keys(k).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=Kj(f,b)}else f=Kj(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":Hhe(a,Whe(g,f))}:Hhe(a,Whe(g,f))}return Array.isArray(i)?i.map(d):d(i)}}();function Vwt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let i=o.getColorSchemeSelector(e);return i==="&"?n:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:n})}return o.palette.mode===e?n:{}}function qle(e={},...n){const{breakpoints:o={},palette:i={},spacing:a,shape:s={},...c}=e;let d=Vd({breakpoints:ywt(o),direction:"ltr",components:{},palette:{mode:"light",...i},spacing:jZe(a),shape:{...bwt,...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=Vwt,d=n.reduce((u,p)=>Vd(u,p),d),d.unstable_sxConfig={...JR,...c?.unstable_sxConfig},d.unstable_sx=function(u){return xy({sx:u,theme:this})},d}function Tne(e=null){const n=m.useContext(rZe);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}xy.filterProps=["sx"];const Hwt=qle();function EZe(e=Hwt){return Tne(e)}function Ghe(e){const n=P7(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function IZe({styles:e,themeId:n,defaultTheme:o={}}){const i=EZe(o),a=n&&i[n]||i;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>Ghe(typeof c=="function"?c(a):c)):Ghe(s)),t.jsx(CZe,{styles:s})}const Yhe=e=>e,Uwt=(()=>{let e=Yhe;return{configure(n){e=n},generate:n=>e(n),reset(){e=Yhe}}})();function LZe(e){var n,o,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=LZe(e[n]))&&(i&&(i+=" "),i+=o)}else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function xi(){for(var e,n,o=0,i="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=LZe(e))&&(i&&(i+=" "),i+=n);return i}const Wwt={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 Vr(e,n,o="Mui"){const i=Wwt[n];return i?`${o}-${i}`:`${Uwt.generate(e)}-${n}`}function Cr(e,n,o="Mui"){const i={};return n.forEach(a=>{i[a]=Vr(e,a,o)}),i}function TZe(e){const{variants:n,...o}=e,i={variants:n,style:P7(o),isProcessed:!0};return i.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=P7(a.style))}),i}const Qwt=qle();function IW(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function xx(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function Gwt(e){return e?(n,o)=>o[e]:null}function d_(e,n,o){const i=typeof n=="function"?n(e):n;if(Array.isArray(i))return i.flatMap(a=>d_(e,a,o));if(Array.isArray(i?.variants)){let a;if(i.isProcessed)a=o?xx(i.style,o):i.style;else{const{variants:s,...c}=i;a=o?xx(P7(c),o):c}return DZe(e,i.variants,[a],o)}return i?.isProcessed?o?xx(P7(i.style),o):i.style:o?xx(P7(i),o):i}function DZe(e,n,o=[],i=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(i?xx(P7(c.style(a)),i):c.style(a))):o.push(i?xx(P7(c.style),i):c.style)}return o}function Ywt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Dne(e,n,o=!1){const i={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")i[s]={...e[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){i[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;i[s][p]=Dne(c[p],d[p],o)}}else i[s]=d;else i[s]=c||{}}else s==="className"&&o&&n.className?i.className=xi(e?.className,n?.className):s==="style"&&o&&n.style?i.style={...e?.style,...n?.style}:i[s]===void 0&&(i[s]=e[s])}return i}const a0=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Kle(e,n=0,o=1){return function(i,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(i,s))}(e,n,o)}function G7(e){if(e.type)return e;if(e.charAt(0)==="#")return G7(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(y4(9,e));let i,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),i=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(i))throw new Error(y4(10,i))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:i}}const xj=(e,n)=>{try{return(o=>{const i=G7(o);return i.values.slice(0,3).map((a,s)=>i.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function XR(e){const{type:n,colorSpace:o}=e;let{values:i}=e;return n.includes("rgb")?i=i.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),i=n.includes("color")?`${o} ${i.join(" ")}`:`${i.join(", ")}`,`${n}(${i})`}function PZe(e){e=G7(e);const{values:n}=e,o=n[0],i=n[1]/100,a=n[2]/100,s=i*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])),XR({type:d,values:u})}function Pne(e){let n=(e=G7(e)).type==="hsl"||e.type==="hsla"?G7(PZe(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 $z(e,n){return e=G7(e),n=Kle(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,XR(e)}function E9(e,n,o){try{return $z(e,n)}catch{return e}}function eN(e,n){if(e=G7(e),n=Kle(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 XR(e)}function Xr(e,n,o){try{return eN(e,n)}catch{return e}}function tN(e,n){if(e=G7(e),n=Kle(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 XR(e)}function ea(e,n,o){try{return tN(e,n)}catch{return e}}function aT(e,n,o){try{return function(i,a=.15){return Pne(i)>.5?eN(i,a):tN(i,a)}(e,n)}catch{return e}}const BZe=m.createContext(null);function Zle(){return m.useContext(BZe)}const qwt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Kwt(e){const{children:n,theme:o}=e,i=Zle(),a=m.useMemo(()=>{const s=i===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(i,o);return s!=null&&(s[qwt]=i!==null),s},[o,i]);return t.jsx(BZe.Provider,{value:a,children:n})}const MZe=m.createContext();function Zwt({value:e,...n}){return t.jsx(MZe.Provider,{value:e??!0,...n})}const nN=()=>m.useContext(MZe)??!1,_Ze=m.createContext(void 0);function Jwt({value:e,children:n}){return t.jsx(_Ze.Provider,{value:e,children:n})}function Xwt({props:e,name:n}){return function(o){const{theme:i,name:a,props:s}=o;if(!i||!i.components||!i.components[a])return s;const c=i.components[a];return c.defaultProps?Dne(c.defaultProps,s,i.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:Dne(c,s,i.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(_Ze)}})}let qhe=0;const Khe={...m8t}.useId;function oN(e){if(Khe!==void 0){const n=Khe();return e??n}return function(n){const[o,i]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(qhe+=1,i(`mui-${qhe}`))},[o]),a}(e)}const Zhe={};function Jhe(e,n,o,i=!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 i?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,i])}function zZe(e){const{children:n,theme:o,themeId:i}=e,a=Tne(Zhe),s=Zle()||Zhe,c=Jhe(i,a,o),d=Jhe(i,s,o,!0),u=(i?c[i]:c).direction==="rtl",p=function(h){const g=Tne(),f=oN()||"",{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};`:"",a0(()=>{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(IZe,{styles:y}):null}(c);return t.jsx(Kwt,{theme:d,children:t.jsx(rZe.Provider,{value:c,children:t.jsx(Zwt,{value:u,children:t.jsxs(Jwt,{value:i?c[i].components:c.components,children:[p,n]})})})})}const Xhe={theme:void 0},Bne="mode",Mne="color-scheme",eCt="data-color-scheme";function tCt(){}const nCt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let i;try{i=n.localStorage.getItem(e)}catch{}return i||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return tCt;const i=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",i),()=>{n.removeEventListener("storage",i)}}});function LW(){}function e0e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function t0e(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 oCt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:i,supportedColorSchemes:a=[],modeStorageKey:s=Bne,colorSchemeStorageKey:c=Mne,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=nCt,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 L=f?.get(n)||n,I=x?.get(o)||o,_=y?.get(i)||i;return{mode:L,systemMode:e0e(L),lightColorScheme:I,darkColorScheme:_}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const k=function(L){return t0e(L,I=>I==="light"?L.lightColorScheme:I==="dark"?L.darkColorScheme:void 0)}(b),$=m.useCallback(L=>{w(I=>{if(L===I.mode)return I;const _=L??n;return f?.set(_),{...I,mode:_,systemMode:e0e(_)}})},[f,n]),j=m.useCallback(L=>{L?typeof L=="string"?L&&!h.includes(L)?console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`):w(I=>{const _={...I};return t0e(I,z=>{z==="light"&&(x?.set(L),_.lightColorScheme=L),z==="dark"&&(y?.set(L),_.darkColorScheme=L)}),_}):w(I=>{const _={...I},z=L.light===null?o:L.light,B=L.dark===null?i:L.dark;return z&&(h.includes(z)?(_.lightColorScheme=z,x?.set(z)):console.error(`\`${z}\` does not exist in \`theme.colorSchemes\`.`)),B&&(h.includes(B)?(_.darkColorScheme=B,y?.set(B)):console.error(`\`${B}\` does not exist in \`theme.colorSchemes\`.`)),_}):w(I=>(x?.set(o),y?.set(i),{...I,lightColorScheme:o,darkColorScheme:i}))},[h,x,y,o,i]),A=m.useCallback(L=>{b.mode==="system"&&w(I=>{const _=L?.matches?"dark":"light";return I.systemMode===_?I:{...I,systemMode:_}})},[b.mode]),E=m.useRef(A);return E.current=A,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const L=(..._)=>E.current(..._),I=window.matchMedia("(prefers-color-scheme: dark)");return I.addListener(L),L(I),()=>{I.removeListener(L)}},[g]),m.useEffect(()=>{if(g){const L=f?.subscribe(z=>{(!z||["light","dark","system"].includes(z))&&$(z||n)})||LW,I=x?.subscribe(z=>{(!z||h.match(z))&&j({light:z})})||LW,_=y?.subscribe(z=>{(!z||h.match(z))&&j({dark:z})})||LW;return()=>{L(),I(),_()}}},[j,$,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?k:void 0,setMode:$,setColorScheme:j}}function iCt(e=""){function n(...o){if(!o.length)return"";const i=o[0];return typeof i!="string"||i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${i}`:`, var(--${e?`${e}-`:""}${i}${n(...o.slice(1))})`}return(o,...i)=>`var(--${e?`${e}-`:""}${o}${n(...i)})`}const n0e=(e,n,o,i=[])=>{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]=i.includes(s)?[]:{}),a=a[s])})};function TW(e,n){const{prefix:o,shouldSkipGeneratingVar:i}=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"||i&&i(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}),n0e(s,d,`var(${h})`,p),n0e(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function Hr(e,n,o=void 0){const i={};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]))}i[a]=c}return i}function DW(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const RE={black:"#000",white:"#fff"},rCt={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"},aCt="#f3e5f5",lCt="#ce93d8",sCt="#ba68c8",cCt="#ab47bc",dCt="#9c27b0",uCt="#7b1fa2",pCt="#e57373",hCt="#ef5350",mCt="#f44336",o0e="#d32f2f",gCt="#c62828",fCt="#ffb74d",xCt="#ffa726",yCt="#ff9800",bCt="#f57c00",wCt="#e65100",CCt="#e3f2fd",vCt="#90caf9",i0e="#42a5f5",SCt="#1976d2",kCt="#1565c0",$Ct="#4fc3f7",ACt="#29b6f6",jCt="#03a9f4",r0e="#0288d1",ECt="#01579b",ICt="#81c784",LCt="#66bb6a",TCt="#4caf50",DCt="#388e3c",PCt="#2e7d32",BCt="#1b5e20";function OZe(){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:RE.white,default:RE.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 FZe=OZe();function RZe(){return{text:{primary:RE.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:RE.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 _ne=RZe();function a0e(e,n,o,i){const a=i.light||i,s=i.dark||1.5*i;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=tN(e.main,a):n==="dark"&&(e.dark=eN(e.main,s)))}function l0e(e,n,o,i,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(i)?n[o]=n[i]: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 Jle(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:i=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:vCt,light:CCt,dark:i0e}:{main:SCt,light:i0e,dark:kCt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:lCt,light:aCt,dark:cCt}:{main:dCt,light:sCt,dark:uCt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:mCt,light:pCt,dark:o0e}:{main:o0e,light:hCt,dark:gCt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:ACt,light:$Ct,dark:r0e}:{main:r0e,light:jCt,dark:ECt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:LCt,light:ICt,dark:DCt}:{main:PCt,light:TCt,dark:BCt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:xCt,light:fCt,dark:bCt}:{main:"#ed6c02",light:yCt,dark:wCt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const k=Pne(C),$=Pne(v);return(Math.max(k,$)+.05)/(Math.min(k,$)+.05)}(b,_ne.text.primary)>=o?_ne.text.primary:FZe.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:k=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(y4(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(y4(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(l0e(a,b,"light",v,i),l0e(a,b,"dark",k,i)):(a0e(b,"light",v,i),a0e(b,"dark",k,i)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=OZe():n==="dark"&&(y=RZe()),Vd({common:{...RE},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:rCt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:i,...y},s)}function MCt(e){const n={};return Object.entries(e).forEach(o=>{const[i,a]=o;typeof a=="object"&&(n[i]=`${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 _Ct(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function zCt(e){return Math.round(1e5*e)/1e5}const s0e={textTransform:"uppercase"},c0e='"Roboto", "Helvetica", "Arial", sans-serif';function NZe(e,n){const{fontFamily:o=c0e,fontSize:i=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=i/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,k,$)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===c0e?{letterSpacing:`${zCt(k/C)}em`}:{},...$,...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,s0e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,s0e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Vd({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:i,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function nl(...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 OCt=["none",nl(0,2,1,-1,0,1,1,0,0,1,3,0),nl(0,3,1,-2,0,2,2,0,0,1,5,0),nl(0,3,3,-2,0,3,4,0,0,1,8,0),nl(0,2,4,-1,0,4,5,0,0,1,10,0),nl(0,3,5,-1,0,5,8,0,0,1,14,0),nl(0,3,5,-1,0,6,10,0,0,1,18,0),nl(0,4,5,-2,0,7,10,1,0,2,16,1),nl(0,5,5,-3,0,8,10,1,0,3,14,2),nl(0,5,6,-3,0,9,12,1,0,3,16,2),nl(0,6,6,-3,0,10,14,1,0,4,18,3),nl(0,6,7,-4,0,11,15,1,0,4,20,3),nl(0,7,8,-4,0,12,17,2,0,5,22,4),nl(0,7,8,-4,0,13,19,2,0,5,24,4),nl(0,7,9,-4,0,14,21,2,0,5,26,4),nl(0,8,9,-5,0,15,22,2,0,6,28,5),nl(0,8,10,-5,0,16,24,2,0,6,30,5),nl(0,8,11,-5,0,17,26,2,0,6,32,5),nl(0,9,11,-5,0,18,28,2,0,7,34,6),nl(0,9,12,-6,0,19,29,2,0,7,36,6),nl(0,10,13,-6,0,20,31,3,0,8,38,7),nl(0,10,13,-6,0,21,33,3,0,8,40,7),nl(0,10,14,-6,0,22,35,3,0,8,42,7),nl(0,11,14,-7,0,23,36,3,0,9,44,8),nl(0,11,15,-7,0,24,38,3,0,9,46,8)],FCt={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)"},VZe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function d0e(e){return`${Math.round(e)}ms`}function RCt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function NCt(e){const n={...FCt,...e.easing},o={...VZe,...e.duration};return{getAutoHeightDuration:RCt,create:(i=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(i)?i:[i]).map(p=>`${p} ${typeof s=="string"?s:d0e(s)} ${c} ${typeof d=="string"?d:d0e(d)}`).join(",")},...e,easing:n,duration:o}}const VCt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function HCt(e){return Of(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function HZe(e={}){const n={...e};return function o(i){const a=Object.entries(i);for(let s=0;s<a.length;s++){const[c,d]=a[s];!HCt(d)||c.startsWith("unstable_")?delete i[c]:Of(d)&&(i[c]={...d},o(i[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-i1VxNGkd.js","assets/sentry-5pTQe3BK.js","assets/core-Fwwp8hop.js","assets/index-B-WtQiD1.js","assets/DefaultTenantHome-CmtmKMal.js","assets/mui-Dar_oGjJ.js","assets/getLocaleForTenant-B-vHrKHL.js","assets/analytics-D310XSjQ.js","assets/utils-3_hFkWEq.js","assets/ScreenRoutes-CA8fUnaP.js","assets/analyticsHelper-CnXSrEd_.js","assets/ConnectionAuthScreen-De-vuICZ.js","assets/QBOConnectionScreen-DvvmYU71.js","assets/empty-BOxndxwD.js","assets/index-D6xVpTbl.js","assets/url-CfkU6Gnm.js","assets/index-CfQpPMgv.js","assets/decodeURIComponentSafe-DaWuthXc.js","assets/SignInScreen-RaghIVhM.js","assets/useDeviceId-9VsPbMb7.js","assets/MagicLinkSignInScreen-CosgA8eP.js","assets/NotFoundScreen-Brpo5hIh.js","assets/MagicLinkRoutes-NEjpbABr.js","assets/WiseConfirmationScreen-BXqYXseQ.js","assets/HubSpotOAuthCallbackScreen-B7ampOQu.js","assets/CustomerOnboardingAuthScreen-Cm9qzjcw.js","assets/SignOutScreen-CNkJNt7x.js","assets/OAuthConsentScreen-BB710FHj.js"])))=>i.map(i=>d[i]);
2
+ import{a as m,b as T,c as vne,R as m8t,p as kW,r as Yu,g as rKe,e as Xpe,f as g8t,s as ehe,i as f8t,w as x8t,j as y8t,S as b8t,k as w8t,l as C8t,m as v8t,n as S8t,o as k8t}from"./sentry-5pTQe3BK.js";import{L as $8t,C as the,_ as qu,a as MI,b as A8t,c as MR,d as _I,u as aKe,T as j8t,e as E8t,f as I8t,g as L8t,h as lKe,i as T8t,k as D8t,j as Et,l as P8t}from"./liveblocks-D1TxH59e.js";import{f as sKe,r as Dr,R as fx,P as gl,O as B8t,N as cKe,u as Op,g as Fp,h as zI,i as dKe,j as Jo,m as Sle,k as uKe,l as gj,n as M8t,o as _8t,p as tu,q as z8t,B as O8t}from"./core-Fwwp8hop.js";import{L as nhe,bl as F8t,bm as R8t,bn as I4,bo as pKe,bp as N8t,bq as Nt,br as HS,bs as G2,bt as Wa,bu as V8t,bv as L4,bw as Va,bx as H8t,by as U8t,bz as W8t,bA as ME,bB as x4,bC as u3,bD as _R,bE as cn,bF as hKe,bG as mKe,bH as kle,bI as Rp,bJ as p3,bK as ed,bL as Kf,bM as Q8t,bN as Rl,bO as G8t,bP as US,bQ as Y8t,bR as q8t,bS as K8t,bT as py,bU as Z8t,bV as ohe,bW as J8t,bX as X8t,bY as ext,bZ as txt,b_ as nxt,b$ as oxt,c0 as ixt,c1 as rxt,c2 as D7,c3 as zR,c4 as axt,c5 as OR,c6 as FR,c7 as RR,c8 as $le,c9 as NR,ca as nS,cb as oS,cc as VR,cd as lxt,ce as sxt,cf as ihe,cg as cxt,ch as dxt,ci as uxt,cj as Rd,ck as gKe,cl as Ale,cm as pxt,cn as j9,co as rhe,cp as hxt,cq as mxt,cr as gxt,cs as Hy,ct as Uy,cu as fKe,cv as xKe,cw as jle,cx as fxt,cy as xxt,cz as xz,cA as yKe,cB as yxt,cC as bKe,cD as bxt,cE as fj,cF as ahe,cG as wxt,cH as wKe,cI as CKe,cJ as vKe,cK as Cxt,cL as lhe,cM as vxt,cN as Sxt,cO as SKe,cP as kxt,cQ as she,cR as vc,cS as yl,cT as $xt,cU as iS,cV as Bd,cW as kKe,cX as Axt,cY as _E,cZ as Hx,c_ as wa,c$ as jxt,d0 as Ext,d1 as Ixt,d2 as Lxt,d3 as nT,d4 as Oh,d5 as Txt,d6 as Dxt,d7 as Pxt,d8 as Bxt,d9 as oT,da as hy,db as HR,dc as Mxt,dd as _xt,de as Wy,df as Nd,dg as $Ke,dh as AKe,di as zxt,dj as WS,dk as Sne,dl as Oxt,dm as j1,dn as my,dp as Ele,dq as jKe,dr as EKe,ds as IKe,dt as LKe,du as TKe,dv as DKe,dw as Fxt,dx as che,dy as Rxt,_ as cd,dz as Ile,dA as PKe,dB as Nxt,dC as dhe,dD as np,dE as Zf,dF as Vxt,dG as Hxt,dH as BKe,dI as kne,dJ as r_,dK as Uxt,dL as Wxt,dM as Qxt,dN as Gxt,dO as Yxt,dP as qxt,dQ as Kxt,dR as Zxt,dS as Jxt,dT as Xxt,dU as Gj,dV as Yj,dW as MKe,dX as YC,dY as Lle,dZ as Tle,d_ as QS,d$ as Dle,e0 as Ple,e1 as Ble,e2 as Mle,e3 as _Ke,e4 as _le,e5 as eyt,e6 as tyt,e7 as zKe,e8 as uhe,e9 as nyt,ea as zle,eb as oyt,ec as iyt,ed as OKe,ee as ryt,ef as ayt,eg as lyt,eh as FKe,ei as syt,ej as RKe,ek as NKe,el as cyt,em as dyt,en as uyt,eo as pyt,ep as hyt,eq as myt,er as gyt,es as fyt,et as xyt,eu as phe,ev as UR,ew as yyt,ex as byt,ey as wyt,ez as Cyt,eA as vyt,eB as Syt,eC as kyt,eD as $yt,eE as hhe,eF as VKe,eG as HKe,eH as UKe,eI as WKe,eJ as QKe,eK as GKe,eL as Ayt,eM as jyt,eN as Eyt,v as Iyt,eO as OI,eP as V1,eQ as YKe,eR as Lyt,eS as Ole,eT as FI,eU as Fle,eV as qKe,eW as KKe,eX as Tyt,eY as ZKe,eZ as Dyt,e_ as JKe,e$ as Pyt,f0 as XKe,f1 as Byt,f2 as Myt,f3 as _yt,f4 as zyt,f5 as Oyt,f6 as mhe,f7 as eZe,f8 as zb,f9 as ghe,fa as Fyt,fb as fhe,fc as Ryt,fd as Nyt,fe as tZe,ff as nZe,fg as Vyt,fh as Hyt,fi as Uyt,fj as Wyt,fk as Qyt,fl as Gyt,fm as yz,fn as Rle,fo as oZe,fp as Yyt,fq as qj,fr as qyt,fs as Kyt,ft as Zyt,fu as Jyt,fv as Xyt,fw as ebt,fx as tbt,fy as nbt,fz as obt,fA as ibt,fB as iZe,fC as rbt,fD as abt,fE as lbt,fF as xhe,fG as sbt,fH as cbt,fI as dbt,fJ as ubt,fK as pbt,fL as $ne,fM as hbt,fN as mbt,fO as gbt,fP as fbt,fQ as xbt,fR as ybt,fS as bbt,fT as wbt,fU as yhe,fV as Cbt,fW as vbt}from"./zeni-epic-state-i1VxNGkd.js";import{n as l,T as rZe,G as RI,j as Uo,c as Te,k as Rn,C as aZe,u as Nle,a as Ane,A as Sbt,b as kbt,I as $bt,d as Abt,D as bz,S as lZe}from"./mui-Dar_oGjJ.js";import{r as jbt,m as Eh}from"./analytics-D310XSjQ.js";import{u as Qp}from"./plaid-BGhwh8RZ.js";import{g as Ebt,O as Ibt,H as Lbt,S as Tbt,T as Dbt,a as Pbt,u as Bbt,b as Mbt}from"./dnd-B_nt-Uf4.js";import{l as _bt}from"./stripe-DMRn4zHo.js";import{L as wv}from"./lottie-BGeomX3N.js";import{r as js}from"./lexical-D4DqnnDh.js";import{D as jne,P as Ene,_ as sZe,a as cZe}from"./pdf-BftxTBXg.js";import{R as zE,G as gy,X as os,Y as Nl,H as fy,I as ad,J as Np,K as Qy,L as Gp,M as GS,N as dZe,O as zbt,P as Obt,Q as WR,S as Cv,U as Fbt,V as Vle,W as Rbt,Z as Nbt,_ as Vbt}from"./recharts-DuOI9Nsb.js";import{r as Hbt}from"./utils-3_hFkWEq.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]="004eab8d-6df3-41ed-b0dd-6988a8235807",e._sentryDebugIdIdentifier="sentry-dbid-004eab8d-6df3-41ed-b0dd-6988a8235807")}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 i of o)if(i.type==="childList")for(const a of i.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 i=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,i)}})();var bhe,iT={},Ubt=function(){if(bhe)return iT;bhe=1;var e=sKe();return iT.createRoot=e.createRoot,iT.hydrateRoot=e.hydrateRoot,iT}(),Pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof vne<"u"?vne:typeof self<"u"?self:{};function Ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var whe,Che,vhe={exports:{}},Wk={};function uZe(){return Che||(Che=1,vhe.exports=function(){if(whe)return Wk;whe=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=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)i.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 Wk.Fragment=o,Wk.jsx=c,Wk.jsxs=c,Wk}()),vhe.exports}var t=uZe();const Wbt=m.createContext(null),$W={didCatch:!1,error:null};let Qbt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=$W}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState($W)}}componentDidCatch(e,n){var o,i;(o=(i=this.props).onError)===null||o===void 0||o.call(i,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:i}=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,i)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState($W))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:i}=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(i===void 0)throw s;c=i}}return m.createElement(Wbt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var She,AW={exports:{}},khe,$he,jW,Gbt=(She||(She=1,$he=AW.exports,jW=function(){var e,n,o,i,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,k,$,j,A=d[e.options.currentLocale],E=!1,L=!1,I="",_=1e12,z=1e9,B=1e6,N="",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,"-"))&&(k=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")&&(I=" "),f=f.replace(new RegExp(I+"a[kmbt]?"),""),w>=_&&!b||b==="t"?(I+=A.abbreviations.trillion,g/=_):w<_&&w>=z&&!b||b==="b"?(I+=A.abbreviations.billion,g/=z):w<z&&w>=B&&!b||b==="m"?(I+=A.abbreviations.million,g/=B):(w<B&&w>=1e3&&!b||b==="k")&&(I+=A.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(L=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],$=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),N=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):N=e._.toFixed(g,v.length,x),C=N.split(".")[0],N=e._.includes(N,".")?A.delimiters.decimal+N.split(".")[1]:"",L&&Number(N.slice(1))===0&&(N="")):C=e._.toFixed(g,0,x),I&&!b&&Number(C)>=1e3&&I!==A.abbreviations.trillion)switch(C=String(Number(C)/1e3),I){case A.abbreviations.thousand:I=A.abbreviations.million;break;case A.abbreviations.million:I=A.abbreviations.billion;break;case A.abbreviations.billion:I=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 $>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+A.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+N+(I||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):k>=0?j=k===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,k=g.toString().split("."),$=f-(y||0);return b=k.length===2?Math.min(Math.max(k[1].length,$),f):$,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,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{k=e.localeData(f)}catch{k=e.localeData(e.locale())}return b=k.currency.symbol,C=k.abbreviations,x=k.delimiters.decimal,y=k.delimiters.thousands==="."?"\\.":k.delimiters.thousands,!(($=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),$[0]!==b)||($=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),$[0]!==C.thousand&&$[0]!==C.million&&$[0]!==C.billion&&$[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)}}),i={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(i.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")?i: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,i.suffixes[f])){x=Math.pow(i.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 k=e._.correctionFactor(b,w);return b*k*(w*k)/(k*k)},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},(khe=AW).exports?khe.exports=jW():$he.numeral=jW()),AW.exports);const i4=Ai(Gbt);function y4(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(i=>o.searchParams.append("args[]",i)),`Minified MUI error #${e}; visit ${o} for the full message.`}const r4="$$material";var Ybt={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 qbt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var Kbt=/[A-Z]|^ms/g,Zbt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,pZe=function(e){return e.charCodeAt(1)===45},Ahe=function(e){return e!=null&&typeof e!="boolean"},EW=qbt(function(e){return pZe(e)?e:e.replace(Kbt,"-$&").toLowerCase()}),jhe=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Zbt,function(o,i,a){return h7={name:i,styles:a,next:h7},i})}return Ybt[e]===1||pZe(e)||typeof n!="number"||n===0?n:n+"px"};function wz(e,n,o){if(o==null)return"";var i=o;if(i.__emotion_styles!==void 0)return i;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return h7={name:a.name,styles:a.styles,next:h7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)h7={name:c.name,styles:c.styles,next:h7},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+=wz(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;Ahe(y)&&(h+=EW(f)+":"+jhe(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)Ahe(x[b])&&(h+=EW(f)+":"+jhe(f,x[b])+";");else{var w=wz(d,u,x);switch(f){case"animation":case"animationName":h+=EW(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var h7,Ehe=/label:\s*([^\s;{]+)\s*(;|$)/g,Ihe,Lhe,The,Dhe,Phe,Bhe={exports:{}};function Jbt(){return Lhe?Ihe:(Lhe=1,Ihe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Xbt(){if(Dhe)return The;Dhe=1;var e=Jbt();function n(){}function o(){}return o.resetWarningCache=n,The=function(){function i(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 i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function Hle(){return Phe||(Phe=1,Bhe.exports=Xbt()()),Bhe.exports}const Cn=Ai(Hle());var ewt=function(){function e(o){var i=this;this._insertTag=function(a){var s;s=i.tags.length===0?i.insertionPoint?i.insertionPoint.nextSibling:i.prepend?i.container.firstChild:i.before:i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(a,s),i.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 i=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]}(i);try{a.insertRule(o,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)}),this.tags=[],this.ctr=0},e}(),Ed="-ms-",Mhe="-moz-",zr="-webkit-",hZe="comm",Ule="rule",Wle="decl",mZe="@keyframes",twt=Math.abs,QR=String.fromCharCode,nwt=Object.assign;function gZe(e){return e.trim()}function Or(e,n,o){return e.replace(n,o)}function Ine(e,n){return e.indexOf(n)}function Gc(e,n){return 0|e.charCodeAt(n)}function OE(e,n,o){return e.slice(n,o)}function vg(e){return e.length}function Qle(e){return e.length}function rT(e,n){return n.push(e),e}var GR=1,rS=1,fZe=0,Hu=0,Ss=0,YS="";function YR(e,n,o,i,a,s,c){return{value:e,root:n,parent:o,type:i,props:a,children:s,line:GR,column:rS,length:c,return:""}}function Qk(e,n){return nwt(YR("",null,null,"",null,null,0),e,{length:-e.length},n)}function Bp(){return Ss=Hu<fZe?Gc(YS,Hu++):0,rS++,Ss===10&&(rS=1,GR++),Ss}function e3(){return Gc(YS,Hu)}function a_(){return Hu}function NI(e,n){return OE(YS,e,n)}function FE(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 xZe(e){return GR=rS=1,fZe=vg(YS=e),Hu=0,[]}function yZe(e){return YS="",e}function l_(e){return gZe(NI(Hu-1,Lne(e===91?e+2:e===40?e+1:e)))}function owt(e){for(;(Ss=e3())&&Ss<33;)Bp();return FE(e)>2||FE(Ss)>3?"":" "}function iwt(e,n){for(;--n&&Bp()&&!(Ss<48||Ss>102||Ss>57&&Ss<65||Ss>70&&Ss<97););return NI(e,a_()+(n<6&&e3()==32&&Bp()==32))}function Lne(e){for(;Bp();)switch(Ss){case e:return Hu;case 34:case 39:e!==34&&e!==39&&Lne(Ss);break;case 40:e===41&&Lne(e);break;case 92:Bp()}return Hu}function rwt(e,n){for(;Bp()&&e+Ss!==57&&(e+Ss!==84||e3()!==47););return"/*"+NI(n,Hu-1)+"*"+QR(e===47?e:Bp())}function awt(e){for(;!FE(e3());)Bp();return NI(e,Hu)}function lwt(e){return yZe(s_("",null,null,null,[""],e=xZe(e),0,[0],e))}function s_(e,n,o,i,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,k="",$=a,j=s,A=i,E=k;w;)switch(y=v,v=Bp()){case 40:if(y!=108&&Gc(E,g-1)==58){Ine(E+=Or(l_(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=l_(v);break;case 9:case 10:case 13:case 32:E+=owt(y);break;case 92:E+=iwt(a_()-1,7);continue;case 47:switch(e3()){case 42:case 47:rT(swt(rwt(Bp(),a_()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=vg(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=Or(E,/\f/g,"")),x>0&&vg(E)-g&&rT(x>32?zhe(E+";",i,o,g-1):zhe(Or(E," ","")+";",i,o,g-2),u);break;case 59:E+=";";default:if(rT(A=_he(E,n,o,p,h,a,d,k,$=[],j=[],g),s),v===123)if(h===0)s_(E,n,A,A,$,s,g,d,j);else switch(f===99&&Gc(E,3)===110?100:f){case 100:case 108:case 109:case 115:s_(e,A,A,i&&rT(_he(e,A,A,0,0,a,d,k,a,$=[],g),j),a,j,g,d,i?$:j);break;default:s_(E,A,A,A,[""],j,0,d,j)}}p=h=x=0,b=C=1,k=E="",g=c;break;case 58:g=1+vg(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Ss=Hu>0?Gc(YS,--Hu):0,rS--,Ss===10&&(rS=1,GR--),Ss==125))continue}switch(E+=QR(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(vg(E)-1)*C,C=1;break;case 64:e3()===45&&(E+=l_(Bp())),f=e3(),h=g=vg(k=E+=awt(a_())),v++;break;case 45:y===45&&vg(E)==2&&(b=0)}}return s}function _he(e,n,o,i,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=Qle(f),y=0,b=0,w=0;y<i;++y)for(var C=0,v=OE(e,g+1,g=twt(b=c[y])),k=e;C<x;++C)(k=gZe(b>0?f[C]+" "+v:Or(v,/&\f/g,f[C])))&&(u[w++]=k);return YR(e,n,o,a===0?Ule:d,u,p,h)}function swt(e,n,o){return YR(e,n,o,hZe,QR(Ss),OE(e,2,-2),0)}function zhe(e,n,o,i){return YR(e,n,o,Wle,OE(e,0,i),OE(e,i+1,-1),i)}function vv(e,n){for(var o="",i=Qle(e),a=0;a<i;a++)o+=n(e[a],a,e,n)||"";return o}function cwt(e,n,o,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Wle:return e.return=e.return||e.value;case hZe:return"";case mZe:return e.return=e.value+"{"+vv(e.children,i)+"}";case Ule:e.value=e.props.join(",")}return vg(o=vv(e.children,i))?e.return=e.value+"{"+o+"}":""}function dwt(e){return function(n){n.root||(n=n.return)&&e(n)}}var uwt=function(e,n,o){for(var i=0,a=0;i=a,a=e3(),i===38&&a===12&&(n[o]=1),!FE(a);)Bp();return NI(e,Hu)},pwt=function(e,n){return yZe(function(o,i){var a=-1,s=44;do switch(FE(s)){case 0:s===38&&e3()===12&&(i[a]=1),o[a]+=uwt(Hu-1,i,a);break;case 2:o[a]+=l_(s);break;case 4:if(s===44){o[++a]=e3()===58?"&\f":"",i[a]=o[a].length;break}default:o[a]+=QR(s)}while(s=Bp());return o}(xZe(e),n))},Ohe=new WeakMap,hwt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,i=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||Ohe.get(o))&&!i){Ohe.set(e,!0);for(var a=[],s=pwt(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]}}},mwt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function bZe(e,n){switch(function(o,i){return 45^Gc(o,0)?(((i<<2^Gc(o,0))<<2^Gc(o,1))<<2^Gc(o,2))<<2^Gc(o,3):0}(e,n)){case 5103:return zr+"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 zr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zr+e+Mhe+e+Ed+e+e;case 6828:case 4268:return zr+e+Ed+e+e;case 6165:return zr+e+Ed+"flex-"+e+e;case 5187:return zr+e+Or(e,/(\w+).+(:[^]+)/,zr+"box-$1$2"+Ed+"flex-$1$2")+e;case 5443:return zr+e+Ed+"flex-item-"+Or(e,/flex-|-self/,"")+e;case 4675:return zr+e+Ed+"flex-line-pack"+Or(e,/align-content|flex-|-self/,"")+e;case 5548:return zr+e+Ed+Or(e,"shrink","negative")+e;case 5292:return zr+e+Ed+Or(e,"basis","preferred-size")+e;case 6060:return zr+"box-"+Or(e,"-grow","")+zr+e+Ed+Or(e,"grow","positive")+e;case 4554:return zr+Or(e,/([^-])(transform)/g,"$1"+zr+"$2")+e;case 6187:return Or(Or(Or(e,/(zoom-|grab)/,zr+"$1"),/(image-set)/,zr+"$1"),e,"")+e;case 5495:case 3959:return Or(e,/(image-set\([^]*)/,zr+"$1$`$1");case 4968:return Or(Or(e,/(.+:)(flex-)?(.*)/,zr+"box-pack:$3"+Ed+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zr+e+e;case 4095:case 3583:case 4068:case 2532:return Or(e,/(.+)-inline(.+)/,zr+"$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(vg(e)-1-n>6)switch(Gc(e,n+1)){case 109:if(Gc(e,n+4)!==45)break;case 102:return Or(e,/(.+:)(.+)-([^]+)/,"$1"+zr+"$2-$3$1"+Mhe+(Gc(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~Ine(e,"stretch")?bZe(Or(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(Gc(e,n+1)!==115)break;case 6444:switch(Gc(e,vg(e)-3-(~Ine(e,"!important")&&10))){case 107:return Or(e,":",":"+zr)+e;case 101:return Or(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zr+(Gc(e,14)===45?"inline-":"")+"box$3$1"+zr+"$2$3$1"+Ed+"$2box$3")+e}break;case 5936:switch(Gc(e,n+11)){case 114:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zr+e+Ed+Or(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zr+e+Ed+e+e}return e}var gwt=[function(e,n,o,i){if(e.length>-1&&!e.return)switch(e.type){case Wle:e.return=bZe(e.value,e.length);break;case mZe:return vv([Qk(e,{value:Or(e.value,"@","@"+zr)})],i);case Ule: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 vv([Qk(e,{props:[Or(a,/:(read-\w+)/,":-moz-$1")]})],i);case"::placeholder":return vv([Qk(e,{props:[Or(a,/:(plac\w+)/,":"+zr+"input-$1")]}),Qk(e,{props:[Or(a,/:(plac\w+)/,":-moz-$1")]}),Qk(e,{props:[Or(a,/:(plac\w+)/,Ed+"input-$1")]})],i)}return""})}}],wZe=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 i,a=e.stylisPlugins||gwt,s={},c=[];i=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=[hwt,mwt],h=[cwt,dwt(function(x){u.insert(x)})],g=function(x){var y=Qle(x);return function(b,w,C,v){for(var k="",$=0;$<y;$++)k+=x[$](b,w,C,v)||"";return k}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){vv(lwt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new ewt({key:n,container:i,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 CZe(e){const{styles:n,defaultTheme:o={}}=e,i=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(RI,{styles:i})}const Fhe=[];function P7(e){return Fhe[0]=e,function(n,o,i){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";h7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=wz(i,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=wz(i,o,n[d]),a&&(s+=c[d]);Ehe.lastIndex=0;for(var u,p="";(u=Ehe.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:h7}}(Fhe)}var Rhe,Nhe,Vhe={exports:{}},sa={};function fwt(){if(Rhe)return sa;Rhe=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=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 i: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 sa.ContextConsumer=s,sa.ContextProvider=c,sa.Element=e,sa.ForwardRef=d,sa.Fragment=o,sa.Lazy=g,sa.Memo=h,sa.Portal=n,sa.Profiler=a,sa.StrictMode=i,sa.Suspense=u,sa.SuspenseList=p,sa.isContextConsumer=function(b){return y(b)===s},sa.isContextProvider=function(b){return y(b)===c},sa.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},sa.isForwardRef=function(b){return y(b)===d},sa.isFragment=function(b){return y(b)===o},sa.isLazy=function(b){return y(b)===g},sa.isMemo=function(b){return y(b)===h},sa.isPortal=function(b){return y(b)===n},sa.isProfiler=function(b){return y(b)===a},sa.isStrictMode=function(b){return y(b)===i},sa.isSuspense=function(b){return y(b)===u},sa.isSuspenseList=function(b){return y(b)===p},sa.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===i||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)},sa.typeOf=y,sa}function xwt(){return Nhe||(Nhe=1,Vhe.exports=fwt()),Vhe.exports}var vZe=xwt();function Of(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 SZe(e){if(m.isValidElement(e)||vZe.isValidElementType(e)||!Of(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=SZe(e[o])}),n}function Vd(e,n,o={clone:!0}){const i=o.clone?{...e}:e;return Of(e)&&Of(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||vZe.isValidElementType(n[a])?i[a]=n[a]:Of(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&Of(e[a])?i[a]=Vd(e[a],n[a],o):o.clone?i[a]=Of(n[a])?SZe(n[a]):n[a]:i[a]=n[a]}),i}function ywt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:i=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)-i/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)-i/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 Hhe(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(i=>i.startsWith("@container")).sort((i,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(i.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((i,a)=>{const s=n[a];return delete i[a],i[a]=s,i},{...n}):n}const bwt={borderRadius:4};function Kj(e,n){return n?Vd(e,n,{clone:!1}):e}const qR={xs:0,sm:600,md:900,lg:1200,xl:1536},Uhe={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${qR[e]}px)`},wwt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:qR[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function b4(e,n,o){const i=e.theme||{};if(Array.isArray(n)){const a=i.breakpoints||Uhe;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=i.breakpoints||Uhe;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)}(i.containerQueries?i:wwt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||qR).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function Whe(e,n){return e.reduce((o,i)=>{const a=o[i];return(!a||Object.keys(a).length===0)&&delete o[i],o},n)}function gi(e){if(typeof e!="string")throw new Error(y4(7));return e.charAt(0).toUpperCase()+e.slice(1)}function KR(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const i=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(i!=null)return i}return n.split(".").reduce((i,a)=>i&&i[a]!=null?i[a]:null,e)}function Cz(e,n,o,i=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||i:KR(e,o)||i,n&&(a=n(a,i,e)),a}function Jl(e){const{prop:n,cssProperty:o=e.prop,themeKey:i,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=KR(c.theme,i)||{};return b4(c,d,p=>{let h=Cz(u,a,p);return p===h&&typeof p=="string"&&(h=Cz(u,a,`${n}${p==="default"?"":gi(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const Cwt={m:"margin",p:"padding"},vwt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Qhe={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Swt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!Qhe[e])return[e];e=Qhe[e]}const[n,o]=e.split(""),i=Cwt[n],a=vwt[o]||"";return Array.isArray(a)?a.map(s=>i+s):[i+a]}),kZe=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],$Ze=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function VI(e,n,o,i){const a=KR(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 Gle(e){return VI(e,"spacing",8)}function HI(e,n){return typeof n=="string"||n==null?n:e(n)}function kwt(e,n,o,i){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=HI(c,d),u),{})}(Swt(o),i);return b4(e,e[o],a)}function AZe(e,n){const o=Gle(e.theme);return Object.keys(e).map(i=>kwt(e,n,i,o)).reduce(Kj,{})}function Ll(e){return AZe(e,kZe)}function Tl(e){return AZe(e,$Ze)}function jZe(e=8,n=Gle({spacing:e})){if(e.mui)return e;const o=(...i)=>(i.length===0?[1]:i).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function ZR(...e){const n=e.reduce((i,a)=>(a.filterProps.forEach(s=>{i[s]=a}),i),{}),o=i=>Object.keys(i).reduce((a,s)=>n[s]?Kj(a,n[s](i)):a,{});return o.propTypes={},o.filterProps=e.reduce((i,a)=>i.concat(a.filterProps),[]),o}function Fh(e){return typeof e!="number"?e:`${e}px solid`}function w0(e,n){return Jl({prop:e,themeKey:"borders",transform:n})}Ll.propTypes={},Ll.filterProps=kZe,Tl.propTypes={},Tl.filterProps=$Ze;const $wt=w0("border",Fh),Awt=w0("borderTop",Fh),jwt=w0("borderRight",Fh),Ewt=w0("borderBottom",Fh),Iwt=w0("borderLeft",Fh),Lwt=w0("borderColor"),Twt=w0("borderTopColor"),Dwt=w0("borderRightColor"),Pwt=w0("borderBottomColor"),Bwt=w0("borderLeftColor"),Mwt=w0("outline",Fh),_wt=w0("outlineColor"),c_=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=VI(e.theme,"shape.borderRadius",4),o=i=>({borderRadius:HI(n,i)});return b4(e,e.borderRadius,o)}return null};c_.propTypes={},c_.filterProps=["borderRadius"],ZR($wt,Awt,jwt,Ewt,Iwt,Lwt,Twt,Dwt,Pwt,Bwt,c_,Mwt,_wt);const vz=e=>{if(e.gap!==void 0&&e.gap!==null){const n=VI(e.theme,"spacing",8),o=i=>({gap:HI(n,i)});return b4(e,e.gap,o)}return null};vz.propTypes={},vz.filterProps=["gap"];const Sz=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=VI(e.theme,"spacing",8),o=i=>({columnGap:HI(n,i)});return b4(e,e.columnGap,o)}return null};Sz.propTypes={},Sz.filterProps=["columnGap"];const kz=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=VI(e.theme,"spacing",8),o=i=>({rowGap:HI(n,i)});return b4(e,e.rowGap,o)}return null};kz.propTypes={},kz.filterProps=["rowGap"];function Sv(e,n){return n==="grey"?n:e}ZR(vz,Sz,kz,Jl({prop:"gridColumn"}),Jl({prop:"gridRow"}),Jl({prop:"gridAutoFlow"}),Jl({prop:"gridAutoColumns"}),Jl({prop:"gridAutoRows"}),Jl({prop:"gridTemplateColumns"}),Jl({prop:"gridTemplateRows"}),Jl({prop:"gridTemplateAreas"}),Jl({prop:"gridArea"}));function jp(e){return e<=1&&e!==0?100*e+"%":e}ZR(Jl({prop:"color",themeKey:"palette",transform:Sv}),Jl({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Sv}),Jl({prop:"backgroundColor",themeKey:"palette",transform:Sv}));const zwt=Jl({prop:"width",transform:jp}),Yle=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const i=e.theme?.breakpoints?.values?.[o]||qR[o];return i?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:jp(o)}};return b4(e,e.maxWidth,n)}return null};Yle.filterProps=["maxWidth"];const Owt=Jl({prop:"minWidth",transform:jp}),Fwt=Jl({prop:"height",transform:jp}),Rwt=Jl({prop:"maxHeight",transform:jp}),Nwt=Jl({prop:"minHeight",transform:jp});Jl({prop:"size",cssProperty:"width",transform:jp}),Jl({prop:"size",cssProperty:"height",transform:jp});ZR(zwt,Yle,Owt,Fwt,Rwt,Nwt,Jl({prop:"boxSizing"}));const JR={border:{themeKey:"borders",transform:Fh},borderTop:{themeKey:"borders",transform:Fh},borderRight:{themeKey:"borders",transform:Fh},borderBottom:{themeKey:"borders",transform:Fh},borderLeft:{themeKey:"borders",transform:Fh},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Fh},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:c_},color:{themeKey:"palette",transform:Sv},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Sv},backgroundColor:{themeKey:"palette",transform:Sv},p:{style:Tl},pt:{style:Tl},pr:{style:Tl},pb:{style:Tl},pl:{style:Tl},px:{style:Tl},py:{style:Tl},padding:{style:Tl},paddingTop:{style:Tl},paddingRight:{style:Tl},paddingBottom:{style:Tl},paddingLeft:{style:Tl},paddingX:{style:Tl},paddingY:{style:Tl},paddingInline:{style:Tl},paddingInlineStart:{style:Tl},paddingInlineEnd:{style:Tl},paddingBlock:{style:Tl},paddingBlockStart:{style:Tl},paddingBlockEnd:{style:Tl},m:{style:Ll},mt:{style:Ll},mr:{style:Ll},mb:{style:Ll},ml:{style:Ll},mx:{style:Ll},my:{style:Ll},margin:{style:Ll},marginTop:{style:Ll},marginRight:{style:Ll},marginBottom:{style:Ll},marginLeft:{style:Ll},marginX:{style:Ll},marginY:{style:Ll},marginInline:{style:Ll},marginInlineStart:{style:Ll},marginInlineEnd:{style:Ll},marginBlock:{style:Ll},marginBlockStart:{style:Ll},marginBlockEnd:{style:Ll},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:vz},rowGap:{style:kz},columnGap:{style:Sz},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:jp},maxWidth:{style:Yle},minWidth:{transform:jp},height:{transform:jp},maxHeight:{transform:jp},minHeight:{transform:jp},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"}},xy=function(){function e(n,o,i,a){const s={[n]:o,theme:i},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=KR(i,u)||{};return h?h(s):b4(s,o,f=>{let x=Cz(g,p,f);return f===x&&typeof f=="string"&&(x=Cz(g,p,`${n}${f==="default"?"":gi(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:i,theme:a={},nested:s}=o||{};if(!i)return null;const c=a.unstable_sxConfig??JR;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=Kj(f,e(x,y,a,c));else{const b=b4({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((k,$)=>k.concat(Object.keys($)),[]),v=new Set(C);return w.every(k=>v.size===Object.keys(k).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=Kj(f,b)}else f=Kj(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":Hhe(a,Whe(g,f))}:Hhe(a,Whe(g,f))}return Array.isArray(i)?i.map(d):d(i)}}();function Vwt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let i=o.getColorSchemeSelector(e);return i==="&"?n:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:n})}return o.palette.mode===e?n:{}}function qle(e={},...n){const{breakpoints:o={},palette:i={},spacing:a,shape:s={},...c}=e;let d=Vd({breakpoints:ywt(o),direction:"ltr",components:{},palette:{mode:"light",...i},spacing:jZe(a),shape:{...bwt,...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=Vwt,d=n.reduce((u,p)=>Vd(u,p),d),d.unstable_sxConfig={...JR,...c?.unstable_sxConfig},d.unstable_sx=function(u){return xy({sx:u,theme:this})},d}function Tne(e=null){const n=m.useContext(rZe);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}xy.filterProps=["sx"];const Hwt=qle();function EZe(e=Hwt){return Tne(e)}function Ghe(e){const n=P7(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function IZe({styles:e,themeId:n,defaultTheme:o={}}){const i=EZe(o),a=n&&i[n]||i;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>Ghe(typeof c=="function"?c(a):c)):Ghe(s)),t.jsx(CZe,{styles:s})}const Yhe=e=>e,Uwt=(()=>{let e=Yhe;return{configure(n){e=n},generate:n=>e(n),reset(){e=Yhe}}})();function LZe(e){var n,o,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=LZe(e[n]))&&(i&&(i+=" "),i+=o)}else for(o in e)e[o]&&(i&&(i+=" "),i+=o);return i}function xi(){for(var e,n,o=0,i="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=LZe(e))&&(i&&(i+=" "),i+=n);return i}const Wwt={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 Vr(e,n,o="Mui"){const i=Wwt[n];return i?`${o}-${i}`:`${Uwt.generate(e)}-${n}`}function Cr(e,n,o="Mui"){const i={};return n.forEach(a=>{i[a]=Vr(e,a,o)}),i}function TZe(e){const{variants:n,...o}=e,i={variants:n,style:P7(o),isProcessed:!0};return i.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=P7(a.style))}),i}const Qwt=qle();function IW(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function xx(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function Gwt(e){return e?(n,o)=>o[e]:null}function d_(e,n,o){const i=typeof n=="function"?n(e):n;if(Array.isArray(i))return i.flatMap(a=>d_(e,a,o));if(Array.isArray(i?.variants)){let a;if(i.isProcessed)a=o?xx(i.style,o):i.style;else{const{variants:s,...c}=i;a=o?xx(P7(c),o):c}return DZe(e,i.variants,[a],o)}return i?.isProcessed?o?xx(P7(i.style),o):i.style:o?xx(P7(i),o):i}function DZe(e,n,o=[],i=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(i?xx(P7(c.style(a)),i):c.style(a))):o.push(i?xx(P7(c.style),i):c.style)}return o}function Ywt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Dne(e,n,o=!1){const i={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")i[s]={...e[s],...i[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){i[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;i[s][p]=Dne(c[p],d[p],o)}}else i[s]=d;else i[s]=c||{}}else s==="className"&&o&&n.className?i.className=xi(e?.className,n?.className):s==="style"&&o&&n.style?i.style={...e?.style,...n?.style}:i[s]===void 0&&(i[s]=e[s])}return i}const a0=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Kle(e,n=0,o=1){return function(i,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(i,s))}(e,n,o)}function G7(e){if(e.type)return e;if(e.charAt(0)==="#")return G7(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(y4(9,e));let i,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),i=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(i))throw new Error(y4(10,i))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:i}}const xj=(e,n)=>{try{return(o=>{const i=G7(o);return i.values.slice(0,3).map((a,s)=>i.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function XR(e){const{type:n,colorSpace:o}=e;let{values:i}=e;return n.includes("rgb")?i=i.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(i[1]=`${i[1]}%`,i[2]=`${i[2]}%`),i=n.includes("color")?`${o} ${i.join(" ")}`:`${i.join(", ")}`,`${n}(${i})`}function PZe(e){e=G7(e);const{values:n}=e,o=n[0],i=n[1]/100,a=n[2]/100,s=i*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])),XR({type:d,values:u})}function Pne(e){let n=(e=G7(e)).type==="hsl"||e.type==="hsla"?G7(PZe(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 $z(e,n){return e=G7(e),n=Kle(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,XR(e)}function E9(e,n,o){try{return $z(e,n)}catch{return e}}function eN(e,n){if(e=G7(e),n=Kle(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 XR(e)}function Xr(e,n,o){try{return eN(e,n)}catch{return e}}function tN(e,n){if(e=G7(e),n=Kle(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 XR(e)}function ea(e,n,o){try{return tN(e,n)}catch{return e}}function aT(e,n,o){try{return function(i,a=.15){return Pne(i)>.5?eN(i,a):tN(i,a)}(e,n)}catch{return e}}const BZe=m.createContext(null);function Zle(){return m.useContext(BZe)}const qwt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Kwt(e){const{children:n,theme:o}=e,i=Zle(),a=m.useMemo(()=>{const s=i===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(i,o);return s!=null&&(s[qwt]=i!==null),s},[o,i]);return t.jsx(BZe.Provider,{value:a,children:n})}const MZe=m.createContext();function Zwt({value:e,...n}){return t.jsx(MZe.Provider,{value:e??!0,...n})}const nN=()=>m.useContext(MZe)??!1,_Ze=m.createContext(void 0);function Jwt({value:e,children:n}){return t.jsx(_Ze.Provider,{value:e,children:n})}function Xwt({props:e,name:n}){return function(o){const{theme:i,name:a,props:s}=o;if(!i||!i.components||!i.components[a])return s;const c=i.components[a];return c.defaultProps?Dne(c.defaultProps,s,i.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:Dne(c,s,i.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(_Ze)}})}let qhe=0;const Khe={...m8t}.useId;function oN(e){if(Khe!==void 0){const n=Khe();return e??n}return function(n){const[o,i]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(qhe+=1,i(`mui-${qhe}`))},[o]),a}(e)}const Zhe={};function Jhe(e,n,o,i=!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 i?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,i])}function zZe(e){const{children:n,theme:o,themeId:i}=e,a=Tne(Zhe),s=Zle()||Zhe,c=Jhe(i,a,o),d=Jhe(i,s,o,!0),u=(i?c[i]:c).direction==="rtl",p=function(h){const g=Tne(),f=oN()||"",{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};`:"",a0(()=>{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(IZe,{styles:y}):null}(c);return t.jsx(Kwt,{theme:d,children:t.jsx(rZe.Provider,{value:c,children:t.jsx(Zwt,{value:u,children:t.jsxs(Jwt,{value:i?c[i].components:c.components,children:[p,n]})})})})}const Xhe={theme:void 0},Bne="mode",Mne="color-scheme",eCt="data-color-scheme";function tCt(){}const nCt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let i;try{i=n.localStorage.getItem(e)}catch{}return i||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return tCt;const i=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",i),()=>{n.removeEventListener("storage",i)}}});function LW(){}function e0e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function t0e(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 oCt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:i,supportedColorSchemes:a=[],modeStorageKey:s=Bne,colorSchemeStorageKey:c=Mne,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=nCt,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 L=f?.get(n)||n,I=x?.get(o)||o,_=y?.get(i)||i;return{mode:L,systemMode:e0e(L),lightColorScheme:I,darkColorScheme:_}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const k=function(L){return t0e(L,I=>I==="light"?L.lightColorScheme:I==="dark"?L.darkColorScheme:void 0)}(b),$=m.useCallback(L=>{w(I=>{if(L===I.mode)return I;const _=L??n;return f?.set(_),{...I,mode:_,systemMode:e0e(_)}})},[f,n]),j=m.useCallback(L=>{L?typeof L=="string"?L&&!h.includes(L)?console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`):w(I=>{const _={...I};return t0e(I,z=>{z==="light"&&(x?.set(L),_.lightColorScheme=L),z==="dark"&&(y?.set(L),_.darkColorScheme=L)}),_}):w(I=>{const _={...I},z=L.light===null?o:L.light,B=L.dark===null?i:L.dark;return z&&(h.includes(z)?(_.lightColorScheme=z,x?.set(z)):console.error(`\`${z}\` does not exist in \`theme.colorSchemes\`.`)),B&&(h.includes(B)?(_.darkColorScheme=B,y?.set(B)):console.error(`\`${B}\` does not exist in \`theme.colorSchemes\`.`)),_}):w(I=>(x?.set(o),y?.set(i),{...I,lightColorScheme:o,darkColorScheme:i}))},[h,x,y,o,i]),A=m.useCallback(L=>{b.mode==="system"&&w(I=>{const _=L?.matches?"dark":"light";return I.systemMode===_?I:{...I,systemMode:_}})},[b.mode]),E=m.useRef(A);return E.current=A,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const L=(..._)=>E.current(..._),I=window.matchMedia("(prefers-color-scheme: dark)");return I.addListener(L),L(I),()=>{I.removeListener(L)}},[g]),m.useEffect(()=>{if(g){const L=f?.subscribe(z=>{(!z||["light","dark","system"].includes(z))&&$(z||n)})||LW,I=x?.subscribe(z=>{(!z||h.match(z))&&j({light:z})})||LW,_=y?.subscribe(z=>{(!z||h.match(z))&&j({dark:z})})||LW;return()=>{L(),I(),_()}}},[j,$,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?k:void 0,setMode:$,setColorScheme:j}}function iCt(e=""){function n(...o){if(!o.length)return"";const i=o[0];return typeof i!="string"||i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${i}`:`, var(--${e?`${e}-`:""}${i}${n(...o.slice(1))})`}return(o,...i)=>`var(--${e?`${e}-`:""}${o}${n(...i)})`}const n0e=(e,n,o,i=[])=>{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]=i.includes(s)?[]:{}),a=a[s])})};function TW(e,n){const{prefix:o,shouldSkipGeneratingVar:i}=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"||i&&i(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}),n0e(s,d,`var(${h})`,p),n0e(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function Hr(e,n,o=void 0){const i={};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]))}i[a]=c}return i}function DW(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const RE={black:"#000",white:"#fff"},rCt={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"},aCt="#f3e5f5",lCt="#ce93d8",sCt="#ba68c8",cCt="#ab47bc",dCt="#9c27b0",uCt="#7b1fa2",pCt="#e57373",hCt="#ef5350",mCt="#f44336",o0e="#d32f2f",gCt="#c62828",fCt="#ffb74d",xCt="#ffa726",yCt="#ff9800",bCt="#f57c00",wCt="#e65100",CCt="#e3f2fd",vCt="#90caf9",i0e="#42a5f5",SCt="#1976d2",kCt="#1565c0",$Ct="#4fc3f7",ACt="#29b6f6",jCt="#03a9f4",r0e="#0288d1",ECt="#01579b",ICt="#81c784",LCt="#66bb6a",TCt="#4caf50",DCt="#388e3c",PCt="#2e7d32",BCt="#1b5e20";function OZe(){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:RE.white,default:RE.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 FZe=OZe();function RZe(){return{text:{primary:RE.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:RE.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 _ne=RZe();function a0e(e,n,o,i){const a=i.light||i,s=i.dark||1.5*i;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=tN(e.main,a):n==="dark"&&(e.dark=eN(e.main,s)))}function l0e(e,n,o,i,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(i)?n[o]=n[i]: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 Jle(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:i=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:vCt,light:CCt,dark:i0e}:{main:SCt,light:i0e,dark:kCt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:lCt,light:aCt,dark:cCt}:{main:dCt,light:sCt,dark:uCt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:mCt,light:pCt,dark:o0e}:{main:o0e,light:hCt,dark:gCt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:ACt,light:$Ct,dark:r0e}:{main:r0e,light:jCt,dark:ECt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:LCt,light:ICt,dark:DCt}:{main:PCt,light:TCt,dark:BCt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:xCt,light:fCt,dark:bCt}:{main:"#ed6c02",light:yCt,dark:wCt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const k=Pne(C),$=Pne(v);return(Math.max(k,$)+.05)/(Math.min(k,$)+.05)}(b,_ne.text.primary)>=o?_ne.text.primary:FZe.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:k=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(y4(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(y4(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(l0e(a,b,"light",v,i),l0e(a,b,"dark",k,i)):(a0e(b,"light",v,i),a0e(b,"dark",k,i)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=OZe():n==="dark"&&(y=RZe()),Vd({common:{...RE},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:rCt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:i,...y},s)}function MCt(e){const n={};return Object.entries(e).forEach(o=>{const[i,a]=o;typeof a=="object"&&(n[i]=`${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 _Ct(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function zCt(e){return Math.round(1e5*e)/1e5}const s0e={textTransform:"uppercase"},c0e='"Roboto", "Helvetica", "Arial", sans-serif';function NZe(e,n){const{fontFamily:o=c0e,fontSize:i=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=i/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,k,$)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===c0e?{letterSpacing:`${zCt(k/C)}em`}:{},...$,...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,s0e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,s0e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Vd({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:i,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function nl(...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 OCt=["none",nl(0,2,1,-1,0,1,1,0,0,1,3,0),nl(0,3,1,-2,0,2,2,0,0,1,5,0),nl(0,3,3,-2,0,3,4,0,0,1,8,0),nl(0,2,4,-1,0,4,5,0,0,1,10,0),nl(0,3,5,-1,0,5,8,0,0,1,14,0),nl(0,3,5,-1,0,6,10,0,0,1,18,0),nl(0,4,5,-2,0,7,10,1,0,2,16,1),nl(0,5,5,-3,0,8,10,1,0,3,14,2),nl(0,5,6,-3,0,9,12,1,0,3,16,2),nl(0,6,6,-3,0,10,14,1,0,4,18,3),nl(0,6,7,-4,0,11,15,1,0,4,20,3),nl(0,7,8,-4,0,12,17,2,0,5,22,4),nl(0,7,8,-4,0,13,19,2,0,5,24,4),nl(0,7,9,-4,0,14,21,2,0,5,26,4),nl(0,8,9,-5,0,15,22,2,0,6,28,5),nl(0,8,10,-5,0,16,24,2,0,6,30,5),nl(0,8,11,-5,0,17,26,2,0,6,32,5),nl(0,9,11,-5,0,18,28,2,0,7,34,6),nl(0,9,12,-6,0,19,29,2,0,7,36,6),nl(0,10,13,-6,0,20,31,3,0,8,38,7),nl(0,10,13,-6,0,21,33,3,0,8,40,7),nl(0,10,14,-6,0,22,35,3,0,8,42,7),nl(0,11,14,-7,0,23,36,3,0,9,44,8),nl(0,11,15,-7,0,24,38,3,0,9,46,8)],FCt={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)"},VZe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function d0e(e){return`${Math.round(e)}ms`}function RCt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function NCt(e){const n={...FCt,...e.easing},o={...VZe,...e.duration};return{getAutoHeightDuration:RCt,create:(i=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(i)?i:[i]).map(p=>`${p} ${typeof s=="string"?s:d0e(s)} ${c} ${typeof d=="string"?d:d0e(d)}`).join(",")},...e,easing:n,duration:o}}const VCt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function HCt(e){return Of(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function HZe(e={}){const n={...e};return function o(i){const a=Object.entries(i);for(let s=0;s<a.length;s++){const[c,d]=a[s];!HCt(d)||c.startsWith("unstable_")?delete i[c]:Of(d)&&(i[c]={...d},o(i[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
 
@@ -73959,7 +73959,7 @@ ${Aa.beneficiaryAddress} ${ne}`,d(ye),I(!0)})(o),"data-testid":K("title-text-cop
73959
73959
  padding: ${r.sp3} ${r.sp0};
73960
73960
  `,Iqe=l(zt)`
73961
73961
  min-width: 140px;
73962
- `,PE=rKe(Hbt()),z8r=["sandbox","production"],O8r=["development","staging","production"],eS=()=>Cc==="DEV"||Cc==="QA"||Cc==="PUNE"||Cc==="SUNNYVALE"||Cc==="DELHI"||Cc==="MOHALI",Epe="https://zeni-webapp-dev.uc.r.appspot.com",Cc=L4("DEV",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),XCr=(e=>L4(e,z8r))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Cc)),Lqe=(e=>L4(e,O8r))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Cc)),Ipe=Cc==="DEV"||Cc==="QA"?.2:.8,g9t=Ipe,Ea={sentryDsn:"",sentryTraceSamplingRate:Ipe,sentryProfileSamplingRate:g9t,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let VS,PI;function F8r(e){Ea.sentryDsn=e.keys.SENTRY_DSN,Ea.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):Ipe,Ea.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):g9t,Ea.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ea.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ea.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ea.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ea.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ea.pusherCluster=e.keys.PUSHER_CLUSTER,Ea.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ea.appUrl=e.keys.WEB_ENDPOINT,Ea.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ea.cardVaultId=e.keys.UNIT_VAULT_ID,Ea.stripeKey=e.keys.STRIPE_KEY,Ea.qboRedirectionUrl=e.keys.QBO_URL,Ea.mixpanelUrl=e.keys.MIXPANEL_URL,Ea.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,PI=e.externalEndPoints,VS=e.apiEndPoints,function(n,o){const i=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{i.add(new URL(s).origin)}catch{}for(const s of i){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)}}(VS,PI)}let Tqe=!1;function QC(){Tqe||(Eh.init("63d3a2406505a5737a2b4debdb513f20",{api_host:PI.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Tqe=!0)}const R8r=new Set(Array.from(ro.EVENTS_WITHOUT_SUPER_PROPERTIES));let Dqe=!1,Pqe=!1;function xle(){if(Dqe)return;Dqe=!0,QC();const e=ro.extractUtmParamsFromUrl();Object.keys(e).length>0&&Eh.register(e),eS()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const N8r=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function V8r(){const e=function(){return Eh?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||N8r.has(o));for(const o of n)Eh.unregister(o);eS()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function Bqe(){Pqe||(Pqe=!0,V8r())}class bv{identify(n,o){if(QC(),this.#t=n,n!=null&&o!=null&&(bv.#e==null||!Iyt({userId:n,traits:o},bv.#e))){const{$email:i,...a}={...o};Eh.identify(n),i&&i!=null&&Eh.people.set_once({$email:i}),Eh.people.set(a),bv.#e={userId:n,traits:o},eS()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,i,a,s){throw Error("Use identify in the web-app!!")}track(n,o){QC();const i=R8r.has(n);if(this.#t!=null||i){if(xle(),this.#t!=null){const a={distinct_id:this.#t,...o};Eh.track(n,a)}else Eh.track(n,o);if(Bqe(),eS()){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){QC(),xle(),Eh.track(n,o),Bqe(),eS()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){QC(),Eh.alias(n,o)}reset(){QC(),Eh.identify(void 0),this.#t=void 0,bv.#e=void 0}static#e;#t}const yle=new bv,f9t=new ro.Analytics(yle);f9t.trackWithoutUserId=yle.trackWithoutUserId.bind(yle);const id=f9t,H8r="openAiCfoScope",ble="openAiCfoScopeOnDashboard";function U8r(e){const{location:n,navigate:o,mergeState:i}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[ble]:!0,...i}})}function evr(e){const n=OI(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 Lpe(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,i=o?.questionAnswers??[],a=i[i.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:i}}function x9t(e,n){return(e||n?.chatSessionSummary)??null}const y9t="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",BR="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(i=>i.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(i=>i.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),i=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(i!=null)return JSON.parse(this.decrypt(i,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:cn(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 i={};if(o!=null)try{const a=JSON.parse(o);i=a!==null&&typeof a=="object"?a:{}}catch{i={}}i[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(i))}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(BR)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let i={};if(o!=null)try{const a=JSON.parse(o);i=a!==null&&typeof a=="object"?a:{}}catch{i={}}i[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(i)),window.dispatchEvent(new CustomEvent(BR))}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 i=this.decrypt(n,o);if(i===""||i==null)return;let a=JSON.parse(i);return a={...a,expiry:cn(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 PE.AES.encrypt(e,n).toString()}decrypt(e,n){return PE.AES.decrypt(e,n).toString(PE.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_AI_CFO_UPLOAD_PROMO_SEEN=y9t;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_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]},Yg=(e,n)=>{const o=[...e??[]];return o.push(n),o},tvr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},nvr=({state:e})=>$i.isSignedIn()===!0?Et.jsx(B8t,{}):Et.jsx(cKe,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function W8r(){const e=Op(),n=Fp(),o=zI(),{tenantEmailDomain:i}=dKe(),[a,s]=m.useState(!1),c=Jo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?V1(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=Jo(x=>OI(x));m.useEffect(()=>{const x=n.state;x?.[ble]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[ble]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(i==null)return;const x=Yg(n.state?.pathnameStackToGoBack,n.pathname);o(`/${i}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,i]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e(YKe(c.userRoleId))},[e,d,c?.userRoleId]);return Et.jsx(Q6t,{open:a,onClose:g,children:Et.jsxs(W6t,{children:[a&&!d?Et.jsx(Ude,{analytics:id,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Et.jsx(hie,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const wle=m.createContext(void 0);function fW(){const e=m.useContext(wle);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const Tpe=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],Dpe=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],b9t=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],w9t=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],C9t=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],v9t=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],S9t=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],k9t=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],$9t=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function A9t(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 j9t=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],E9t=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],I9t=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],Q8r=[...b9t,...Tpe,...Dpe,"/: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",...j9t,...E9t,...I9t,...w9t,...C9t,...v9t,...S9t,...k9t,...$9t];function L9t(){const{pathname:e}=Fp(),n=e??"";return Q8r.some(o=>Sle(o,n)!=null)||A9t(e)}function gc(e){const{pathname:n}=Fp(),o=n??"";return e.some(i=>Sle(i,o)!=null)}const T9t=m.createContext(null),Ppe={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function G8r({children:e}){const[n,o]=m.useState(()=>new Set([])),i=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:i,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Et.jsx(T9t.Provider,{value:c,children:e})}function xW(){const e=m.useContext(T9t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}const D9t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],P9t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],Y8r=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],q8r=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],K8r=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],Z8r=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],J8r=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],B9t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],M9t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],X8r=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function Bpe(e){const n=Du(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 i=n[o+1];return i==null?"overview":X8r.includes(i)?i:null}const exr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),txr=new Set(["setup","verification","promo","approval-rules"]);function Du(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function Mpe(e){const n=Du(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const i=n[o+1];if(i==="summary")return"vendors";if(i==="opex")return"opex_by_vendor";if(i==="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 i==="filing_1099"?"form_1099":void 0}function _9t(e,n,o){const i=Du(e);return!(i.length<2||i[1]!==n)&&(i.length===2||o(i[2]))}function z9t(e,n,o){return _9t(e,n,i=>!o.has(i))}function O9t(e){return z9t(e,"bills",exr)}function F9t(e){return z9t(e,"reimbursements",txr)}function R9t(e){return _9t(e,"tasks",n=>n==="group")}const nxr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),oxr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function _pe(e){const n=Du(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return nxr.has(o)?"checking":"checking_details"}function zpe(e){const n=Du(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];return oxr.has(o)?"cards":"cards_detail"}function N9t(e){const n=Du(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function V9t(e){return Du(e)[1]==="performance"?"performance":void 0}function H9t(e){const n=Du(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function U9t(e){const n=Du(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function Z0(e,n){return n.some(o=>Sle(o,e)!=null)}function ixr(e){return Z0(e,Tpe)?"reports":Z0(e,D9t)?"ap_aging":Z0(e,P9t)?"ar_aging":Mpe(e)!=null?"vendors_tab":Z0(e,Dpe)?"forecast":Bpe(e)!=null?"month_end_close_review":Z0(e,B9t)?"cash_balance":Z0(e,M9t)?"card_balance":R9t(e)?"task_checklist":N9t(e)!=null?"transaction_detail":V9t(e)!=null?"performance":H9t(e)!=null?"bills_detail":U9t(e)!=null?"reimbursement_detail":O9t(e)?"bills_list":F9t(e)?"reimbursement_list":Z0(e,Y8r)?"cash_in_cash_out":Z0(e,q8r)?"operating_expenses":Z0(e,K8r)?"revenue":Z0(e,Z8r)?"net_burn_or_income":Z0(e,J8r)?"cash_position":function(n){const o=Du(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":_pe(e)!=null?"checking":function(n){return Du(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":zpe(e)!=null?"cards":function(n){return Du(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return Du(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return Du(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function W9t(e,n){switch(ixr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(i){switch(i){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 Mpe(e);case"forecast":return"forecast";case"month_end_close_review":{const o=Bpe(e);return o==null?void 0:function(i){switch(i){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 _pe(e);case"treasury":return"treasury";case"cards":return zpe(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function Q9t(){const{pathname:e}=Fp(),n=e??"",o=Jo(i=>i.financeStatementState?.selectedReportId);return m.useMemo(()=>W9t(n,{selectedReportId:o}),[n,o])}function yW(){const{useFeatureGate:e}=Hl(),{isFeatureEnabled:n}=e(qi.isAiCfoEnabled),o=Jo(a=>V1(a)),i=$i.getSignedInUser();if(i==null||i.userId==null||o==null||o.companyId==null)return!1;if(!I4(i)){const a=o.userRole??[];return pKe(a)&&n}return n}function rxr(){const{useFeatureGate:e}=Hl(),{isFeatureEnabled:n}=e(qi.isAiCfoNavButtonEnabled),o=yW();return n&&o}const G9t=m.createContext(void 0),axr=({children:e})=>{const{tenantEmailDomain:n}=dKe(),o=n!=null?$i.getSignedInUserTenant(n):void 0,i=Jo(u=>V1(u)),a=FI().tenantId,s=o?.tenantId,c=i?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Et.jsx(G9t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},lxr=()=>{const e=m.useContext(G9t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function Y9t(e,n){return e!=="Completed"&&e!=="In-Progress"&&!(e==="Error"&&!n)}function q9t(e){const{areTenantIdsInSync:n}=lxr(),o=yW(),i=rxr();return n&&e&&i&&o}function ovr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,i=Op(),a=uKe(),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=Fle(a.getState(),d)?.fetchState;Y9t(u,c)&&i(qKe({pageContext:d}))}},[o,i,n,a])}function K9t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:i}=n,a=Op(),s=uKe(),c=m.useRef(null);m.useEffect(()=>{const d=c.current===!1&&i===!0;if(c.current=i,o==null||!i)return;const u=Fle(s.getState(),o)?.fetchState;Y9t(u,d)&&a(qKe({pageContext:o}))},[i,a,o,s])})({canFetchSuggestedQuestions:q9t(e.isDataReady),pageContext:e.pageContext})}function ivr(e){K9t({pageContext:Q9t(),isDataReady:e.isDataReady})}const{questionTemplates:{sampleQuestion1:sxr,sampleQuestion2:cxr,sampleQuestion3:dxr}}=J.getLocalizedStrings().aiCfo,uxr=[sxr,cxr,dxr];function pxr(e,n=!1){K9t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=q9t(!0),i=Jo(g=>e!=null&&e!==""?Fle(g,e):void 0),{useDynamicConfig:a}=Hl(),{configValue:s}=a(Om.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:[...uxr],[c]),u=e!=null&&e!=="",p=u&&o&&(i==null||i.fetchState!=="Completed"&&i.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(i?.fetchState==="Error")return d;const g=(i?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,i?.fetchState,i?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function hxr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!$i.getAiCfoUploadPromoSeen(n),[e,n]),[i,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(BR,s);const c=d=>{d.key===y9t&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(BR,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:i,handleUploadPromoClose:m.useCallback(()=>{n!=null&&$i.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const Z9t=m.createContext(void 0),Ope=()=>m.useContext(Z9t),mxr=e=>{const n=$i.isSignedIn(),o=$i.getSignedInUser(),[i,a]=m.useState(void 0),s=m.useMemo(()=>i,[i]),c=Jo(p=>V1(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){i!=null&&(i.channels.all().forEach(w=>{i.unsubscribe(w.name)}),i.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await Tyt(Ea.pusherClientSecret,{cluster:Ea.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&&BE(w,d),g!=null&&BE(w,g),u!=null&&BE(w,u)))},b=()=>{const w=FI();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),KKe(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),i?.channels.all().forEach(g=>i?.unsubscribe(g.name)),i?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Et.jsx(Z9t.Provider,{value:s,children:e.children})};function BE(e,n){const o=`private-encrypted-${n}`,i=e.channel(o);if(i?.subscribed===!0)return i;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const Fpe=e=>n=>{const o=Ope(),i=m.useRef(n.eventCallback),a=m.useRef({});m.useEffect(()=>{i.current=n.eventCallback;const{events:c,eventCallback:d,...u}=n;a.current=u},[n]);const s=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:c}=n,d=[];return c.length===0?void 0:(c.forEach(u=>{const[p,h]=(y=>y.split("."))(u),g=o.channel(p),f=y=>{i.current(h,y,a.current)};let x;if(g?.subscribed===!0)x=g,x.bind(h,f),d.push(()=>{g.unbind(h,f)});else{x=g??o.subscribe(p),x.bind(h,f);const y=()=>{};x.bind("pusher:subscription_succeeded",y),x.subscribed===!0&&x.unbind("pusher:subscription_succeeded",y),d.push(()=>{x.unbind(h,f),x.unbind("pusher:subscription_succeeded",y)})}}),()=>{d.forEach(u=>u())})}},[o,s]),Et.jsx(e,{...n})},gxr=({children:e})=>{const n=Ane("(prefers-color-scheme: dark)"),[o,i]=T.useState({dark:n});m.useEffect(()=>{const d=$i.getTheme()==null?n:$i.getTheme()==="dark";o.dark!==d&&i({dark:d})},[o,n]);const a=o.dark?Az({palette:{mode:"dark"},...vAe},SAe,GVn,qVn):Az({palette:{mode:"light"},...vAe},SAe,QVn,YVn),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Et.jsx(Kkn,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;$i.setTheme(d?"dark":"light"),i({...o,dark:d})},nonce:c,children:e})},J9t=m.createContext(!1),fxr=J9t.Provider;function xxr(){return m.useContext(J9t)}const yxr=()=>Jo(e=>V1(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:i,fetchMore:a}=P8t();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:i,fetchMore:a}})(),Cle=e=>C4n.includes(e),fz=e=>Gct.includes(e),Mqe=e=>Cle(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":aF(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:fz(e)?`ai-cfo/${e}`:e,bxr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],_qe=(e,n)=>e.includes(n),vle=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 i of o)if(_qe(n,i))switch(i){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("/"),i=o.indexOf("review"),a=i>=0?o[i+1]:void 0;return a!=null&&aF(a)?Qct(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of Gct)if(_qe(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function zqe(e){let n=vle(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let i=0;i<o.length&&n==null;++i)n=vle(o[i])}return n??"home"}function wxr(e){return e.pathname.includes("settings")}function Cxr(e){return e.pathname.includes("ai-cfo")}const vxr=()=>{const e=Sxr();return gj("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},Sxr=()=>Fp().state?.message==="expenseAutomation";function kxr(e){return(e??[]).reduce((n,o)=>{const i=o.yield;return Math.max(n,i)},0)}const $xr=(e,n,o)=>{const i=ZKe(e),a=Dyt(e),s=JKe(o,e);return n||o||a||i||s},SC="AppDrawer",v2={root:`${SC}-root`,drawer:`${SC}-drawer`,appBar:`${SC}-appBar`,menuButton:`${SC}-menuButton`,appBarZenilogo:`${SC}-appBarZenilogo`,drawerZenilogo:`${SC}-drawerZenilogo`},BI=210,Axr=Mn("div",{slot:"Root"})(({theme:e})=>({[`&.${v2.root}`]:{display:"flex"},[`& .${v2.drawer}`]:{[e.breakpoints.up("md")]:{width:BI,flexShrink:0,backgroundColor:e.colors.background}},[`& .${v2.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${v2.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${v2.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${v2.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),jxr=Fpe(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=fW(),[i,a]=T.useState(!1),[s,c]=m.useState(!1),d=Fp(),u=zI(),p=FI(),h=Cde(),g=Op(),[f,x]=m.useState(!1),y=Le(),{useFeatureGate:b}=Hl(),{isFeatureEnabled:w}=b(qi.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(qi.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(qi.isExpenseAutomationEnabledV2),[k,$]=m.useState(()=>$i.getSignedInUser());m.useEffect(()=>{const Ht=()=>{const mo=$i.getSignedInUser();$(mo)};return window.addEventListener("completeProfileDone",Ht),()=>{window.removeEventListener("completeProfileDone",Ht)}},[]);const j=Jo(Ht=>V1(Ht)),A=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=xW(),L=yW(),I=I4(k),_=v||C&&I,z=xxr(),[B,N]=m.useState(void 0),{isFeatureEnabled:R}=b(qi.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(qi.isChargeCardFeatureEnabled),F=$xr(j,O,w),{isFeatureEnabled:M}=b(qi.isSettingsFeatureEnabled),{isFeatureEnabled:U}=b(qi.isReferralFeatureEnabled),{isFeatureEnabled:H}=b(qi.isTreasuryEnabled),{isFeatureEnabled:G}=b(qi.isTaskManagerCustomerUserAccessEnabled),V=I||!I&&G,Q=Jo(Ht=>Byt(Ht));m.useEffect(()=>{const Ht=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",Ht),()=>{window.removeEventListener("scroll",Ht)}},[]);const Y=Jo(Ht=>Myt(Ht)),q=Jo(Ht=>Ht.expenseAutomationViewState.selectedPeriodByTenantId),ne=Jo(Ht=>_yt(Ht)),{monthEndCloseChecksView:ie}=ne,ee=gj("/signout")!==null,te=gj("/:tenantEmailDomain/dashboard")!==null,oe=gj("/:tenantEmailDomain/reports")!==null,re=gj("/:tenantEmailDomain/onboarding/*")!==null,de=vxr();m.useEffect(()=>{z&&U&&!re&&Y.fetchState==="Not-Started"&&g(zyt(!0))},[z,U,Y.fetchState,re]),m.useEffect(()=>{if(de){const Ht=d.state?.origin;if(Ht!=null){const mo=Oyt(Ht);g(mhe(mo))}}},[de,d.state]);const ye=ee||re,se=Jo(Ht=>Ht.tenantState),ce=Jo(Ht=>se.fetchState==="Completed"?eZe(Ht):[]),{isFeatureEnabled:le}=b(qi.isApAgingFeatureEnabled),{isFeatureEnabled:pe}=b(qi.isArAgingFeatureEnabled),{isFeatureEnabled:me}=b(qi.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ge}=b(qi.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(qi.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:we}=b(qi.isDashboardSidebarNewYearAnimationEnabled),xe=Jo(Ht=>zb(Ht).totalUnreadCount),ve=Jo(Ht=>zb(Ht).notificationDetailsByTab.tasks.uiState.unreadCount),ke=Jo(Ht=>zb(Ht).notificationDetailsByTab.comments.uiState.unreadCount),Ee=Jo(Ht=>zb(Ht).reducedFetchCountState),Be=Jo(Ht=>zb(Ht).notificationDetailsByTab.tasks.fetchCountState),Ie=Jo(Ht=>OI(Ht)),[_e,Ve]=m.useState(void 0),je=Ie.uiState.currentChatSessionId,Ce=_e!=null?Ie.deleteChatSessionStateByChatSessionId[_e]?.fetchState:void 0,$e=Lt(Ce),{inboxNotifications:Oe,isLoading:He,isFetchingMore:qe,hasFetchedAll:Ct,fetchMore:Je}=yxr(),We=Jo(Ht=>zb(Ht).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const Ht=setTimeout(()=>Je?.(),0);return()=>clearTimeout(Ht)}),m.useEffect(()=>{if(_e!=null)return $e==="In-Progress"&&Ce==="Completed"?(g(ghe({chatSessionId:_e})),Ve(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Ce==="Error"&&(g(ghe({chatSessionId:_e})),Ve(void 0)))},[g,d.state,u,Ce,_e,$e,e]),m.useEffect(()=>{if(He===!1&&qe===!1&&Ct===!0&&j?.companyId!=null&&Oe!=null){const Ht=`dashboard_${j.companyId}`;N(Oe.filter(mo=>mo.roomId===Ht&&mo.readAt==null).length)}},[He,qe,Ct,j?.companyId,Oe]),m.useEffect(()=>{z&&I&&!re&&Be.fetchState==="Not-Started"&&p.tenantId!=null&&g(Fyt("task_manager","dashboard"))},[z,p.tenantId]),m.useEffect(()=>{re||We.fetchState!=="Not-Started"||g(fhe({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(B!=null){const{fetchState:Ht}=We;Ht!=="In-Progress"&&Ht!=="Completed"||(Ht==="In-Progress"&&g(fhe({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(XKe({unreadCount:B},"comments")))}},[B,We.fetchState]);const xt={fetchStatus:Ee,count:xe},ut=[];le===!1&&ut.push("accounts_payable_aging"),pe===!1&&ut.push("accounts_receivable_aging"),R===!1&&ut.push("zeni_accounts_promo_card"),U===!1&&ut.push("rewards_card"),_===!1&&ut.push("expense_automation_card");const jt=mn(),lt=Jo(Ht=>Ryt(Ht,ut,k,v,C,H).fetchState),pt=Jo(Ht=>Nyt(Ht).fetchState),It=e!=null?$i.getSignedInUserTenant(e):null,nn=Jo(Ht=>It?.tenantId!=null?tZe(Ht,It.tenantId):void 0),rn=te&&(lt==="Completed"||lt==="Error")||oe&&(pt==="Completed"||pt==="Error")||!te&&!oe?void 0:"disabled",Ke=m.useMemo(()=>nZe(j.userRole),[j.userRole]),Kt=vKe(Ke),ln=Ht=>{a(Ht)},ht=j.company!=null&&Vyt(j.company),At=H&&ht,Jt=SKe(jt?.loggedInUserRoleMap),un=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Gt=Jo(Ht=>Ht.treasurySetupViewState.treasuryFundsDetails),Nn=m.useCallback(()=>At&&Jt&&Gt?.fetchStatus.fetchState==="Completed"&&!$i.getTreasuryPopupSeen(e??"")&&j.isTreasuryVideoViewed!==!0&&un===!1&&vle(d.pathname)!=="treasury",[At,Jt,un,d.pathname,e,Gt?.fetchStatus,j.isTreasuryVideoViewed]),[fn,Ft]=m.useState(Nn);m.useEffect(()=>{z&&At&&Gt?.fetchStatus.fetchState==="Not-Started"&&g(Hyt())},[z,At,Gt?.fetchStatus.fetchState]),m.useEffect(()=>{Ft(Nn())},[Nn]);const Ut=kxr(Gt.fundsDetails),Hn=j?.rewardsLastViewedTime==null,yn=k?.userEmail!=null&&Q.fetchState==="Completed"&&Uyt(Q.notificationSettings,k.userEmail,w,j),po=m.useCallback(Ht=>{const mo=d.state?.referrer;if(ie.monthEndCloseChecks?.auditSummary!=null&&id.trackMonthCloseAuditPage(Ht.month,Ht.year,ie.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",ie.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,mo??null),g(Wyt(j.tenantId,Ht)),q[j.tenantId]!=null){const Qn=Yg(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${ne.currentSelectedView}/${Ht.month}-${Ht.year}`,{state:{pathnameStackToGoBack:Qn,referrer:ne.currentSelectedView}})}g(mhe(ne.currentSelectedView)),ne.reconciliation.selectedAccountId!=null&&g(Qyt({selectedAccountId:void 0}))},[ne.reconciliation.selectedAccountId,ne.currentSelectedView,j.tenantId,ie.monthEndCloseChecks?.auditSummary,ie.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),Oo=m.useMemo(()=>({zIndex:s||fn?12:S[2]}),[s,fn]),Jn=L&&Cxr(d),zn=Et.jsx(Kto,{signedInUser:k,currentTenantId:se.currentTenantId??"",tenants:se.fetchState==="Completed"?ce:nn!=null?[nn]:[],rewardsConfiguration:{isRewardsTabVisible:U,isRewardsAnimated:Hn,rewardsPlan:Y.rewardsPlan},selectedMenu:n===!0?Qct("ai_cfo"):zqe(d),isTenantDropdownDisabled:rn,isSettings:wxr(d),isSettingsFeatureEnabled:M,currentTenant:j,isVendorsTabVisible:Kt,isZeniAccountEnabled:R,isChargeCardEnabled:F,isTreasuryEnabled:At,isTreasuryPopupVisible:fn,treasuryYieldPercentage:Ut,isNotificationsTabVisible:yn,notificationCountDetails:xt,isExpenseAutomationEnabledForUser:_&&Wa(j.userRole)===!1,isAiCfoAccessEnabled:L,onNotificationIconClick:()=>{ln(!1);const Ht=I?ve===0&&ke>0?"notifications/comments":"notifications/tasks":"notifications/comments",mo=Yg(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${Ht}`,{state:{pathnameStackToGoBack:mo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:Ht=>{E(Ppe.TENANT_SWITCHING),ln(!1);const mo=Ht.tenantEmailDomain,Qn=zqe(d),Ii=Qn;let hn="";const ao=aF(Ii);Qn==="home"?hn+="dashboard":Qn==="users_and_roles"?hn+="people":Cle(Qn)?hn+="settings/my_profile":fz(Qn)?hn+=`ai-cfo/${Qn}`:hn+=Ii==="task_checklist"?"tasks":ao?"month_end_close_checks/review":encodeURIComponent(Qn);const fo=`/${encodeURIComponent(mo)}/${hn}`;u(fo,{replace:!0}),k!=null&&(g(Rle(Ht.tenantId)),g(oZe(k.userId,Ht.tenantId,k.zeniSessionId)));const Fo=Ht;id.trackCompanySwitch(Fo.companyId,Fo.companyName,Fo.userRole)},handleMenuChange:(Ht,mo)=>{if(k!=null&&id.trackSidePanelClicked(Ht.type,Ht.group),ln(!1),e==null)return;if(n&&(fo=>{if(Cle(fo)||fz(fo))return!0;const Fo=Mqe(fo).split("/")[0];return!bxr.includes(Fo)})(Ht.type)&&o(!1),Ht.type==="ai_cfo"){if(id.trackAICFOChatScreenStateChanged("viewed","left_menu",je??null,null),!A)return void U8r({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const fo=Yg(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:fo,referrer:"Sidebar"}})}const Qn=Yg(d.state?.pathnameStackToGoBack,d.pathname),Ii=Ht.type,hn=aF(Ii)&&Ii!=="command_center";if(Ii!=="command_center"&&!hn||q[j.tenantId]==null||id.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),hn&&q[j.tenantId]!=null){const fo=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${Ht.type}/${fo.month}-${fo.year}`,{state:{pathnameStackToGoBack:Qn,message:mo,referrer:"Sidebar"}})}const ao=Mqe(Ht.type);fz(Ht.type)?(je!=null&&g(yz()),u(`/${e}/ai-cfo/${Ht.type}`,{state:{pathnameStackToGoBack:Qn.slice(0,-1),message:mo,referrer:"Sidebar"}})):u(`../${e}/${ao}`,{state:{pathnameStackToGoBack:Qn,message:mo,referrer:"Sidebar"}})},onDeleteChatSession:Ht=>{g(Gyt(Ht)),je===Ht&&Ve(Ht)},handleLogOutClick:()=>{ln(!1);const Ht=Yg(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:Ht,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),Ft(!1)},monthEndCloseChecksView:ie,onPeriodChange:po,onCalendarOpen:c,aiCfoView:Ie,isAiCfo:Jn,isOnDashboard:te,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:Ht=>{g(Ole({sessionId:Ht,agentId:"controller"})),u(`../${e}/ai-cfo/${Ht}`,{state:{...d.state}})},halloweenAnimationEnabled:me,thanksGivingAnimationEnabled:ge,christmasAnimationEnabled:fe,newYearAnimationEnabled:we}),so=Et.jsx(Sbt,{position:"fixed",className:v2.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Et.jsxs(kbt,{style:{minHeight:Vct},children:[Et.jsx($bt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>ln(!0),className:v2.menuButton,size:"large",children:Et.jsx(Exr,{})}),Et.jsx(Ixr,{className:v2.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),ho=Ane(Ht=>Ht.breakpoints.up("md")),Ko=Ane(Ht=>Ht.breakpoints.down("md"));return e==null?null:Et.jsxs(Axr,{className:v2.root,children:[Et.jsx(Abt,{}),ye===!1?Et.jsxs(Et.Fragment,{children:[ho||!te?null:so,Et.jsxs("nav",{className:v2.drawer,children:[ho?null:Et.jsx(bz,{container:window.document.body,variant:"temporary",open:i,onClose:()=>ln(!1),PaperProps:{sx:{width:BI,zIndex:S[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:zn}),Ko?null:Et.jsx(bz,{PaperProps:{sx:{width:BI,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...Oo}},variant:"permanent",open:!0,children:zn})]})]}):null]})});function Oqe(e){return e?.data.unread!=null&&e?.mode!=null}const Exr=Mn(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"})))`
73962
+ `,PE=rKe(Hbt()),z8r=["sandbox","production"],O8r=["development","staging","production"],eS=()=>Cc==="DEV"||Cc==="QA"||Cc==="PUNE"||Cc==="SUNNYVALE"||Cc==="DELHI"||Cc==="MOHALI",Epe="https://zeni-webapp-qa.uc.r.appspot.com",Cc=L4("QA",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),XCr=(e=>L4(e,z8r))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Cc)),Lqe=(e=>L4(e,O8r))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Cc)),Ipe=Cc==="DEV"||Cc==="QA"?.2:.8,g9t=Ipe,Ea={sentryDsn:"",sentryTraceSamplingRate:Ipe,sentryProfileSamplingRate:g9t,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let VS,PI;function F8r(e){Ea.sentryDsn=e.keys.SENTRY_DSN,Ea.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):Ipe,Ea.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):g9t,Ea.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ea.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ea.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ea.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ea.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ea.pusherCluster=e.keys.PUSHER_CLUSTER,Ea.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ea.appUrl=e.keys.WEB_ENDPOINT,Ea.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ea.cardVaultId=e.keys.UNIT_VAULT_ID,Ea.stripeKey=e.keys.STRIPE_KEY,Ea.qboRedirectionUrl=e.keys.QBO_URL,Ea.mixpanelUrl=e.keys.MIXPANEL_URL,Ea.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,PI=e.externalEndPoints,VS=e.apiEndPoints,function(n,o){const i=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{i.add(new URL(s).origin)}catch{}for(const s of i){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)}}(VS,PI)}let Tqe=!1;function QC(){Tqe||(Eh.init("ed1936cb971f6aad4104ddbe708f812c",{api_host:PI.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Tqe=!0)}const R8r=new Set(Array.from(ro.EVENTS_WITHOUT_SUPER_PROPERTIES));let Dqe=!1,Pqe=!1;function xle(){if(Dqe)return;Dqe=!0,QC();const e=ro.extractUtmParamsFromUrl();Object.keys(e).length>0&&Eh.register(e),eS()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const N8r=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function V8r(){const e=function(){return Eh?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||N8r.has(o));for(const o of n)Eh.unregister(o);eS()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function Bqe(){Pqe||(Pqe=!0,V8r())}class bv{identify(n,o){if(QC(),this.#t=n,n!=null&&o!=null&&(bv.#e==null||!Iyt({userId:n,traits:o},bv.#e))){const{$email:i,...a}={...o};Eh.identify(n),i&&i!=null&&Eh.people.set_once({$email:i}),Eh.people.set(a),bv.#e={userId:n,traits:o},eS()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,i,a,s){throw Error("Use identify in the web-app!!")}track(n,o){QC();const i=R8r.has(n);if(this.#t!=null||i){if(xle(),this.#t!=null){const a={distinct_id:this.#t,...o};Eh.track(n,a)}else Eh.track(n,o);if(Bqe(),eS()){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){QC(),xle(),Eh.track(n,o),Bqe(),eS()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){QC(),Eh.alias(n,o)}reset(){QC(),Eh.identify(void 0),this.#t=void 0,bv.#e=void 0}static#e;#t}const yle=new bv,f9t=new ro.Analytics(yle);f9t.trackWithoutUserId=yle.trackWithoutUserId.bind(yle);const id=f9t,H8r="openAiCfoScope",ble="openAiCfoScopeOnDashboard";function U8r(e){const{location:n,navigate:o,mergeState:i}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[ble]:!0,...i}})}function evr(e){const n=OI(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 Lpe(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,i=o?.questionAnswers??[],a=i[i.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:i}}function x9t(e,n){return(e||n?.chatSessionSummary)??null}const y9t="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",BR="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(i=>i.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(i=>i.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),i=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(i!=null)return JSON.parse(this.decrypt(i,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:cn(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 i={};if(o!=null)try{const a=JSON.parse(o);i=a!==null&&typeof a=="object"?a:{}}catch{i={}}i[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(i))}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(BR)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let i={};if(o!=null)try{const a=JSON.parse(o);i=a!==null&&typeof a=="object"?a:{}}catch{i={}}i[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(i)),window.dispatchEvent(new CustomEvent(BR))}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 i=this.decrypt(n,o);if(i===""||i==null)return;let a=JSON.parse(i);return a={...a,expiry:cn(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 PE.AES.encrypt(e,n).toString()}decrypt(e,n){return PE.AES.decrypt(e,n).toString(PE.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_AI_CFO_UPLOAD_PROMO_SEEN=y9t;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_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]},Yg=(e,n)=>{const o=[...e??[]];return o.push(n),o},tvr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},nvr=({state:e})=>$i.isSignedIn()===!0?Et.jsx(B8t,{}):Et.jsx(cKe,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function W8r(){const e=Op(),n=Fp(),o=zI(),{tenantEmailDomain:i}=dKe(),[a,s]=m.useState(!1),c=Jo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?V1(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=Jo(x=>OI(x));m.useEffect(()=>{const x=n.state;x?.[ble]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[ble]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(i==null)return;const x=Yg(n.state?.pathnameStackToGoBack,n.pathname);o(`/${i}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,i]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e(YKe(c.userRoleId))},[e,d,c?.userRoleId]);return Et.jsx(Q6t,{open:a,onClose:g,children:Et.jsxs(W6t,{children:[a&&!d?Et.jsx(Ude,{analytics:id,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Et.jsx(hie,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const wle=m.createContext(void 0);function fW(){const e=m.useContext(wle);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const Tpe=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],Dpe=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],b9t=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],w9t=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],C9t=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],v9t=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],S9t=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],k9t=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],$9t=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function A9t(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 j9t=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],E9t=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],I9t=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],Q8r=[...b9t,...Tpe,...Dpe,"/: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",...j9t,...E9t,...I9t,...w9t,...C9t,...v9t,...S9t,...k9t,...$9t];function L9t(){const{pathname:e}=Fp(),n=e??"";return Q8r.some(o=>Sle(o,n)!=null)||A9t(e)}function gc(e){const{pathname:n}=Fp(),o=n??"";return e.some(i=>Sle(i,o)!=null)}const T9t=m.createContext(null),Ppe={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function G8r({children:e}){const[n,o]=m.useState(()=>new Set([])),i=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:i,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Et.jsx(T9t.Provider,{value:c,children:e})}function xW(){const e=m.useContext(T9t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}const D9t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],P9t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],Y8r=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],q8r=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],K8r=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],Z8r=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],J8r=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],B9t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],M9t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],X8r=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function Bpe(e){const n=Du(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 i=n[o+1];return i==null?"overview":X8r.includes(i)?i:null}const exr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),txr=new Set(["setup","verification","promo","approval-rules"]);function Du(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function Mpe(e){const n=Du(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const i=n[o+1];if(i==="summary")return"vendors";if(i==="opex")return"opex_by_vendor";if(i==="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 i==="filing_1099"?"form_1099":void 0}function _9t(e,n,o){const i=Du(e);return!(i.length<2||i[1]!==n)&&(i.length===2||o(i[2]))}function z9t(e,n,o){return _9t(e,n,i=>!o.has(i))}function O9t(e){return z9t(e,"bills",exr)}function F9t(e){return z9t(e,"reimbursements",txr)}function R9t(e){return _9t(e,"tasks",n=>n==="group")}const nxr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),oxr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function _pe(e){const n=Du(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return nxr.has(o)?"checking":"checking_details"}function zpe(e){const n=Du(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];return oxr.has(o)?"cards":"cards_detail"}function N9t(e){const n=Du(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function V9t(e){return Du(e)[1]==="performance"?"performance":void 0}function H9t(e){const n=Du(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function U9t(e){const n=Du(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function Z0(e,n){return n.some(o=>Sle(o,e)!=null)}function ixr(e){return Z0(e,Tpe)?"reports":Z0(e,D9t)?"ap_aging":Z0(e,P9t)?"ar_aging":Mpe(e)!=null?"vendors_tab":Z0(e,Dpe)?"forecast":Bpe(e)!=null?"month_end_close_review":Z0(e,B9t)?"cash_balance":Z0(e,M9t)?"card_balance":R9t(e)?"task_checklist":N9t(e)!=null?"transaction_detail":V9t(e)!=null?"performance":H9t(e)!=null?"bills_detail":U9t(e)!=null?"reimbursement_detail":O9t(e)?"bills_list":F9t(e)?"reimbursement_list":Z0(e,Y8r)?"cash_in_cash_out":Z0(e,q8r)?"operating_expenses":Z0(e,K8r)?"revenue":Z0(e,Z8r)?"net_burn_or_income":Z0(e,J8r)?"cash_position":function(n){const o=Du(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":_pe(e)!=null?"checking":function(n){return Du(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":zpe(e)!=null?"cards":function(n){return Du(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return Du(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return Du(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function W9t(e,n){switch(ixr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(i){switch(i){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 Mpe(e);case"forecast":return"forecast";case"month_end_close_review":{const o=Bpe(e);return o==null?void 0:function(i){switch(i){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 _pe(e);case"treasury":return"treasury";case"cards":return zpe(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function Q9t(){const{pathname:e}=Fp(),n=e??"",o=Jo(i=>i.financeStatementState?.selectedReportId);return m.useMemo(()=>W9t(n,{selectedReportId:o}),[n,o])}function yW(){const{useFeatureGate:e}=Hl(),{isFeatureEnabled:n}=e(qi.isAiCfoEnabled),o=Jo(a=>V1(a)),i=$i.getSignedInUser();if(i==null||i.userId==null||o==null||o.companyId==null)return!1;if(!I4(i)){const a=o.userRole??[];return pKe(a)&&n}return n}function rxr(){const{useFeatureGate:e}=Hl(),{isFeatureEnabled:n}=e(qi.isAiCfoNavButtonEnabled),o=yW();return n&&o}const G9t=m.createContext(void 0),axr=({children:e})=>{const{tenantEmailDomain:n}=dKe(),o=n!=null?$i.getSignedInUserTenant(n):void 0,i=Jo(u=>V1(u)),a=FI().tenantId,s=o?.tenantId,c=i?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Et.jsx(G9t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},lxr=()=>{const e=m.useContext(G9t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function Y9t(e,n){return e!=="Completed"&&e!=="In-Progress"&&!(e==="Error"&&!n)}function q9t(e){const{areTenantIdsInSync:n}=lxr(),o=yW(),i=rxr();return n&&e&&i&&o}function ovr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,i=Op(),a=uKe(),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=Fle(a.getState(),d)?.fetchState;Y9t(u,c)&&i(qKe({pageContext:d}))}},[o,i,n,a])}function K9t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:i}=n,a=Op(),s=uKe(),c=m.useRef(null);m.useEffect(()=>{const d=c.current===!1&&i===!0;if(c.current=i,o==null||!i)return;const u=Fle(s.getState(),o)?.fetchState;Y9t(u,d)&&a(qKe({pageContext:o}))},[i,a,o,s])})({canFetchSuggestedQuestions:q9t(e.isDataReady),pageContext:e.pageContext})}function ivr(e){K9t({pageContext:Q9t(),isDataReady:e.isDataReady})}const{questionTemplates:{sampleQuestion1:sxr,sampleQuestion2:cxr,sampleQuestion3:dxr}}=J.getLocalizedStrings().aiCfo,uxr=[sxr,cxr,dxr];function pxr(e,n=!1){K9t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=q9t(!0),i=Jo(g=>e!=null&&e!==""?Fle(g,e):void 0),{useDynamicConfig:a}=Hl(),{configValue:s}=a(Om.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:[...uxr],[c]),u=e!=null&&e!=="",p=u&&o&&(i==null||i.fetchState!=="Completed"&&i.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(i?.fetchState==="Error")return d;const g=(i?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,i?.fetchState,i?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function hxr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!$i.getAiCfoUploadPromoSeen(n),[e,n]),[i,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(BR,s);const c=d=>{d.key===y9t&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(BR,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:i,handleUploadPromoClose:m.useCallback(()=>{n!=null&&$i.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const Z9t=m.createContext(void 0),Ope=()=>m.useContext(Z9t),mxr=e=>{const n=$i.isSignedIn(),o=$i.getSignedInUser(),[i,a]=m.useState(void 0),s=m.useMemo(()=>i,[i]),c=Jo(p=>V1(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){i!=null&&(i.channels.all().forEach(w=>{i.unsubscribe(w.name)}),i.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await Tyt(Ea.pusherClientSecret,{cluster:Ea.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&&BE(w,d),g!=null&&BE(w,g),u!=null&&BE(w,u)))},b=()=>{const w=FI();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),KKe(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),i?.channels.all().forEach(g=>i?.unsubscribe(g.name)),i?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Et.jsx(Z9t.Provider,{value:s,children:e.children})};function BE(e,n){const o=`private-encrypted-${n}`,i=e.channel(o);if(i?.subscribed===!0)return i;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const Fpe=e=>n=>{const o=Ope(),i=m.useRef(n.eventCallback),a=m.useRef({});m.useEffect(()=>{i.current=n.eventCallback;const{events:c,eventCallback:d,...u}=n;a.current=u},[n]);const s=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:c}=n,d=[];return c.length===0?void 0:(c.forEach(u=>{const[p,h]=(y=>y.split("."))(u),g=o.channel(p),f=y=>{i.current(h,y,a.current)};let x;if(g?.subscribed===!0)x=g,x.bind(h,f),d.push(()=>{g.unbind(h,f)});else{x=g??o.subscribe(p),x.bind(h,f);const y=()=>{};x.bind("pusher:subscription_succeeded",y),x.subscribed===!0&&x.unbind("pusher:subscription_succeeded",y),d.push(()=>{x.unbind(h,f),x.unbind("pusher:subscription_succeeded",y)})}}),()=>{d.forEach(u=>u())})}},[o,s]),Et.jsx(e,{...n})},gxr=({children:e})=>{const n=Ane("(prefers-color-scheme: dark)"),[o,i]=T.useState({dark:n});m.useEffect(()=>{const d=$i.getTheme()==null?n:$i.getTheme()==="dark";o.dark!==d&&i({dark:d})},[o,n]);const a=o.dark?Az({palette:{mode:"dark"},...vAe},SAe,GVn,qVn):Az({palette:{mode:"light"},...vAe},SAe,QVn,YVn),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Et.jsx(Kkn,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;$i.setTheme(d?"dark":"light"),i({...o,dark:d})},nonce:c,children:e})},J9t=m.createContext(!1),fxr=J9t.Provider;function xxr(){return m.useContext(J9t)}const yxr=()=>Jo(e=>V1(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:i,fetchMore:a}=P8t();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:i,fetchMore:a}})(),Cle=e=>C4n.includes(e),fz=e=>Gct.includes(e),Mqe=e=>Cle(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":aF(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:fz(e)?`ai-cfo/${e}`:e,bxr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],_qe=(e,n)=>e.includes(n),vle=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 i of o)if(_qe(n,i))switch(i){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("/"),i=o.indexOf("review"),a=i>=0?o[i+1]:void 0;return a!=null&&aF(a)?Qct(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of Gct)if(_qe(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function zqe(e){let n=vle(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let i=0;i<o.length&&n==null;++i)n=vle(o[i])}return n??"home"}function wxr(e){return e.pathname.includes("settings")}function Cxr(e){return e.pathname.includes("ai-cfo")}const vxr=()=>{const e=Sxr();return gj("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},Sxr=()=>Fp().state?.message==="expenseAutomation";function kxr(e){return(e??[]).reduce((n,o)=>{const i=o.yield;return Math.max(n,i)},0)}const $xr=(e,n,o)=>{const i=ZKe(e),a=Dyt(e),s=JKe(o,e);return n||o||a||i||s},SC="AppDrawer",v2={root:`${SC}-root`,drawer:`${SC}-drawer`,appBar:`${SC}-appBar`,menuButton:`${SC}-menuButton`,appBarZenilogo:`${SC}-appBarZenilogo`,drawerZenilogo:`${SC}-drawerZenilogo`},BI=210,Axr=Mn("div",{slot:"Root"})(({theme:e})=>({[`&.${v2.root}`]:{display:"flex"},[`& .${v2.drawer}`]:{[e.breakpoints.up("md")]:{width:BI,flexShrink:0,backgroundColor:e.colors.background}},[`& .${v2.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${v2.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${v2.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${v2.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),jxr=Fpe(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=fW(),[i,a]=T.useState(!1),[s,c]=m.useState(!1),d=Fp(),u=zI(),p=FI(),h=Cde(),g=Op(),[f,x]=m.useState(!1),y=Le(),{useFeatureGate:b}=Hl(),{isFeatureEnabled:w}=b(qi.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(qi.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(qi.isExpenseAutomationEnabledV2),[k,$]=m.useState(()=>$i.getSignedInUser());m.useEffect(()=>{const Ht=()=>{const mo=$i.getSignedInUser();$(mo)};return window.addEventListener("completeProfileDone",Ht),()=>{window.removeEventListener("completeProfileDone",Ht)}},[]);const j=Jo(Ht=>V1(Ht)),A=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=xW(),L=yW(),I=I4(k),_=v||C&&I,z=xxr(),[B,N]=m.useState(void 0),{isFeatureEnabled:R}=b(qi.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(qi.isChargeCardFeatureEnabled),F=$xr(j,O,w),{isFeatureEnabled:M}=b(qi.isSettingsFeatureEnabled),{isFeatureEnabled:U}=b(qi.isReferralFeatureEnabled),{isFeatureEnabled:H}=b(qi.isTreasuryEnabled),{isFeatureEnabled:G}=b(qi.isTaskManagerCustomerUserAccessEnabled),V=I||!I&&G,Q=Jo(Ht=>Byt(Ht));m.useEffect(()=>{const Ht=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",Ht),()=>{window.removeEventListener("scroll",Ht)}},[]);const Y=Jo(Ht=>Myt(Ht)),q=Jo(Ht=>Ht.expenseAutomationViewState.selectedPeriodByTenantId),ne=Jo(Ht=>_yt(Ht)),{monthEndCloseChecksView:ie}=ne,ee=gj("/signout")!==null,te=gj("/:tenantEmailDomain/dashboard")!==null,oe=gj("/:tenantEmailDomain/reports")!==null,re=gj("/:tenantEmailDomain/onboarding/*")!==null,de=vxr();m.useEffect(()=>{z&&U&&!re&&Y.fetchState==="Not-Started"&&g(zyt(!0))},[z,U,Y.fetchState,re]),m.useEffect(()=>{if(de){const Ht=d.state?.origin;if(Ht!=null){const mo=Oyt(Ht);g(mhe(mo))}}},[de,d.state]);const ye=ee||re,se=Jo(Ht=>Ht.tenantState),ce=Jo(Ht=>se.fetchState==="Completed"?eZe(Ht):[]),{isFeatureEnabled:le}=b(qi.isApAgingFeatureEnabled),{isFeatureEnabled:pe}=b(qi.isArAgingFeatureEnabled),{isFeatureEnabled:me}=b(qi.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:ge}=b(qi.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(qi.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:we}=b(qi.isDashboardSidebarNewYearAnimationEnabled),xe=Jo(Ht=>zb(Ht).totalUnreadCount),ve=Jo(Ht=>zb(Ht).notificationDetailsByTab.tasks.uiState.unreadCount),ke=Jo(Ht=>zb(Ht).notificationDetailsByTab.comments.uiState.unreadCount),Ee=Jo(Ht=>zb(Ht).reducedFetchCountState),Be=Jo(Ht=>zb(Ht).notificationDetailsByTab.tasks.fetchCountState),Ie=Jo(Ht=>OI(Ht)),[_e,Ve]=m.useState(void 0),je=Ie.uiState.currentChatSessionId,Ce=_e!=null?Ie.deleteChatSessionStateByChatSessionId[_e]?.fetchState:void 0,$e=Lt(Ce),{inboxNotifications:Oe,isLoading:He,isFetchingMore:qe,hasFetchedAll:Ct,fetchMore:Je}=yxr(),We=Jo(Ht=>zb(Ht).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const Ht=setTimeout(()=>Je?.(),0);return()=>clearTimeout(Ht)}),m.useEffect(()=>{if(_e!=null)return $e==="In-Progress"&&Ce==="Completed"?(g(ghe({chatSessionId:_e})),Ve(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Ce==="Error"&&(g(ghe({chatSessionId:_e})),Ve(void 0)))},[g,d.state,u,Ce,_e,$e,e]),m.useEffect(()=>{if(He===!1&&qe===!1&&Ct===!0&&j?.companyId!=null&&Oe!=null){const Ht=`dashboard_${j.companyId}`;N(Oe.filter(mo=>mo.roomId===Ht&&mo.readAt==null).length)}},[He,qe,Ct,j?.companyId,Oe]),m.useEffect(()=>{z&&I&&!re&&Be.fetchState==="Not-Started"&&p.tenantId!=null&&g(Fyt("task_manager","dashboard"))},[z,p.tenantId]),m.useEffect(()=>{re||We.fetchState!=="Not-Started"||g(fhe({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(B!=null){const{fetchState:Ht}=We;Ht!=="In-Progress"&&Ht!=="Completed"||(Ht==="In-Progress"&&g(fhe({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(XKe({unreadCount:B},"comments")))}},[B,We.fetchState]);const xt={fetchStatus:Ee,count:xe},ut=[];le===!1&&ut.push("accounts_payable_aging"),pe===!1&&ut.push("accounts_receivable_aging"),R===!1&&ut.push("zeni_accounts_promo_card"),U===!1&&ut.push("rewards_card"),_===!1&&ut.push("expense_automation_card");const jt=mn(),lt=Jo(Ht=>Ryt(Ht,ut,k,v,C,H).fetchState),pt=Jo(Ht=>Nyt(Ht).fetchState),It=e!=null?$i.getSignedInUserTenant(e):null,nn=Jo(Ht=>It?.tenantId!=null?tZe(Ht,It.tenantId):void 0),rn=te&&(lt==="Completed"||lt==="Error")||oe&&(pt==="Completed"||pt==="Error")||!te&&!oe?void 0:"disabled",Ke=m.useMemo(()=>nZe(j.userRole),[j.userRole]),Kt=vKe(Ke),ln=Ht=>{a(Ht)},ht=j.company!=null&&Vyt(j.company),At=H&&ht,Jt=SKe(jt?.loggedInUserRoleMap),un=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Gt=Jo(Ht=>Ht.treasurySetupViewState.treasuryFundsDetails),Nn=m.useCallback(()=>At&&Jt&&Gt?.fetchStatus.fetchState==="Completed"&&!$i.getTreasuryPopupSeen(e??"")&&j.isTreasuryVideoViewed!==!0&&un===!1&&vle(d.pathname)!=="treasury",[At,Jt,un,d.pathname,e,Gt?.fetchStatus,j.isTreasuryVideoViewed]),[fn,Ft]=m.useState(Nn);m.useEffect(()=>{z&&At&&Gt?.fetchStatus.fetchState==="Not-Started"&&g(Hyt())},[z,At,Gt?.fetchStatus.fetchState]),m.useEffect(()=>{Ft(Nn())},[Nn]);const Ut=kxr(Gt.fundsDetails),Hn=j?.rewardsLastViewedTime==null,yn=k?.userEmail!=null&&Q.fetchState==="Completed"&&Uyt(Q.notificationSettings,k.userEmail,w,j),po=m.useCallback(Ht=>{const mo=d.state?.referrer;if(ie.monthEndCloseChecks?.auditSummary!=null&&id.trackMonthCloseAuditPage(Ht.month,Ht.year,ie.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",ie.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,mo??null),g(Wyt(j.tenantId,Ht)),q[j.tenantId]!=null){const Qn=Yg(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${ne.currentSelectedView}/${Ht.month}-${Ht.year}`,{state:{pathnameStackToGoBack:Qn,referrer:ne.currentSelectedView}})}g(mhe(ne.currentSelectedView)),ne.reconciliation.selectedAccountId!=null&&g(Qyt({selectedAccountId:void 0}))},[ne.reconciliation.selectedAccountId,ne.currentSelectedView,j.tenantId,ie.monthEndCloseChecks?.auditSummary,ie.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),Oo=m.useMemo(()=>({zIndex:s||fn?12:S[2]}),[s,fn]),Jn=L&&Cxr(d),zn=Et.jsx(Kto,{signedInUser:k,currentTenantId:se.currentTenantId??"",tenants:se.fetchState==="Completed"?ce:nn!=null?[nn]:[],rewardsConfiguration:{isRewardsTabVisible:U,isRewardsAnimated:Hn,rewardsPlan:Y.rewardsPlan},selectedMenu:n===!0?Qct("ai_cfo"):zqe(d),isTenantDropdownDisabled:rn,isSettings:wxr(d),isSettingsFeatureEnabled:M,currentTenant:j,isVendorsTabVisible:Kt,isZeniAccountEnabled:R,isChargeCardEnabled:F,isTreasuryEnabled:At,isTreasuryPopupVisible:fn,treasuryYieldPercentage:Ut,isNotificationsTabVisible:yn,notificationCountDetails:xt,isExpenseAutomationEnabledForUser:_&&Wa(j.userRole)===!1,isAiCfoAccessEnabled:L,onNotificationIconClick:()=>{ln(!1);const Ht=I?ve===0&&ke>0?"notifications/comments":"notifications/tasks":"notifications/comments",mo=Yg(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${Ht}`,{state:{pathnameStackToGoBack:mo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:Ht=>{E(Ppe.TENANT_SWITCHING),ln(!1);const mo=Ht.tenantEmailDomain,Qn=zqe(d),Ii=Qn;let hn="";const ao=aF(Ii);Qn==="home"?hn+="dashboard":Qn==="users_and_roles"?hn+="people":Cle(Qn)?hn+="settings/my_profile":fz(Qn)?hn+=`ai-cfo/${Qn}`:hn+=Ii==="task_checklist"?"tasks":ao?"month_end_close_checks/review":encodeURIComponent(Qn);const fo=`/${encodeURIComponent(mo)}/${hn}`;u(fo,{replace:!0}),k!=null&&(g(Rle(Ht.tenantId)),g(oZe(k.userId,Ht.tenantId,k.zeniSessionId)));const Fo=Ht;id.trackCompanySwitch(Fo.companyId,Fo.companyName,Fo.userRole)},handleMenuChange:(Ht,mo)=>{if(k!=null&&id.trackSidePanelClicked(Ht.type,Ht.group),ln(!1),e==null)return;if(n&&(fo=>{if(Cle(fo)||fz(fo))return!0;const Fo=Mqe(fo).split("/")[0];return!bxr.includes(Fo)})(Ht.type)&&o(!1),Ht.type==="ai_cfo"){if(id.trackAICFOChatScreenStateChanged("viewed","left_menu",je??null,null),!A)return void U8r({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const fo=Yg(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:fo,referrer:"Sidebar"}})}const Qn=Yg(d.state?.pathnameStackToGoBack,d.pathname),Ii=Ht.type,hn=aF(Ii)&&Ii!=="command_center";if(Ii!=="command_center"&&!hn||q[j.tenantId]==null||id.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),hn&&q[j.tenantId]!=null){const fo=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${Ht.type}/${fo.month}-${fo.year}`,{state:{pathnameStackToGoBack:Qn,message:mo,referrer:"Sidebar"}})}const ao=Mqe(Ht.type);fz(Ht.type)?(je!=null&&g(yz()),u(`/${e}/ai-cfo/${Ht.type}`,{state:{pathnameStackToGoBack:Qn.slice(0,-1),message:mo,referrer:"Sidebar"}})):u(`../${e}/${ao}`,{state:{pathnameStackToGoBack:Qn,message:mo,referrer:"Sidebar"}})},onDeleteChatSession:Ht=>{g(Gyt(Ht)),je===Ht&&Ve(Ht)},handleLogOutClick:()=>{ln(!1);const Ht=Yg(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:Ht,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),Ft(!1)},monthEndCloseChecksView:ie,onPeriodChange:po,onCalendarOpen:c,aiCfoView:Ie,isAiCfo:Jn,isOnDashboard:te,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:Ht=>{g(Ole({sessionId:Ht,agentId:"controller"})),u(`../${e}/ai-cfo/${Ht}`,{state:{...d.state}})},halloweenAnimationEnabled:me,thanksGivingAnimationEnabled:ge,christmasAnimationEnabled:fe,newYearAnimationEnabled:we}),so=Et.jsx(Sbt,{position:"fixed",className:v2.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Et.jsxs(kbt,{style:{minHeight:Vct},children:[Et.jsx($bt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>ln(!0),className:v2.menuButton,size:"large",children:Et.jsx(Exr,{})}),Et.jsx(Ixr,{className:v2.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),ho=Ane(Ht=>Ht.breakpoints.up("md")),Ko=Ane(Ht=>Ht.breakpoints.down("md"));return e==null?null:Et.jsxs(Axr,{className:v2.root,children:[Et.jsx(Abt,{}),ye===!1?Et.jsxs(Et.Fragment,{children:[ho||!te?null:so,Et.jsxs("nav",{className:v2.drawer,children:[ho?null:Et.jsx(bz,{container:window.document.body,variant:"temporary",open:i,onClose:()=>ln(!1),PaperProps:{sx:{width:BI,zIndex:S[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:zn}),Ko?null:Et.jsx(bz,{PaperProps:{sx:{width:BI,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...Oo}},variant:"permanent",open:!0,children:zn})]})]}):null]})});function Oqe(e){return e?.data.unread!=null&&e?.mode!=null}const Exr=Mn(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"})))`
73963
73963
  height: 20px;
73964
73964
  width: 20px;
73965
73965
  color: ${e=>e.theme.colors.primary};
@@ -74056,7 +74056,7 @@ ${Aa.beneficiaryAddress} ${ne}`,d(ye),I(!0)})(o),"data-testid":K("title-text-cop
74056
74056
  display: flex;
74057
74057
  min-height: 100%;
74058
74058
  flex-direction: column;
74059
- `,Jxr=()=>{const[e,n]=m.useState(()=>$i.getSignedInUser()),o=Op(),[i,a]=m.useState(!1),[s,c]=m.useState(!1),d=Jo(g=>iZe(g).fetchState),u=Jo(g=>V1(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(sbt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Et.jsxs(m.Fragment,{children:[s&&Et.jsx(Wde,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Et.jsx(Kxr,{userEmail:e.userEmail,isCompleteProfileOpen:i,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},Fqe="init-enter",Xxr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const i=n.get(o||Fqe);eyr(i!==void 0?i:0)}),null},(e,n)=>{const{location:o,visitedUrl:i}=e,{location:a}=n,s=o.pathname||Fqe,c=tyr();return i.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),eyr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),tyr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},th=e=>m.lazy(async()=>{const n=e.toString(),o=$i.getForceRefreshedComponents(),i=new Set(o),a=$i.isSignedIn(),s=i.has(n);try{const c=await e();return i.delete(n),a&&$i.saveForceRefreshedComponents(Array.from(i)),c}catch(c){throw s||(i.add(n),a&&$i.saveForceRefreshedComponents(Array.from(i)),location.reload()),c}}),n8t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),o8t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),i8t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),r8t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function Kl(...e){const n=Cc==="DEV"||Cc==="QA";if(n8t||o8t||i8t||r8t)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 tS(...e){const n=Cc==="DEV"||Cc==="QA";if(n8t||o8t||i8t||r8t)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 kC=null,mj=!1;const Zl=Cc==="PROD"?"https://api.zeni.ai":Cc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function Rqe(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"]})),i=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:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const nyr={dashboard:function(e){return[...Rqe()]},reports:Rqe,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})),i=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${i}`,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:`${Zl}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${Zl}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${Zl}/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:`${Zl}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${Zl}/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,i=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${Zl}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${Zl}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${Zl}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${Zl}/tenant/1.0/companies/${o}?query=${i}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function Nqe(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:i,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,nyr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):i===!1&&u.reason.includes("People")?(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return Kl(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function Vqe(e,n=0,o){if("serviceWorker"in navigator)try{const i=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?(Kl("[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||i.active;if(!a)return void tS("[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);Kl("[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)=>{Kl(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),Kl(` URL: ${u.url}`)});const c=FI(),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}}),Kl("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(i){tS("[Prefetch Manager - Service Worker] Failed to send prefetch request:",i instanceof Error?i.message:"Unknown error")}else tS("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function oyr({children:e,currentPage:n,tenantId:o,batchCalls:i=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=Fp(),k=$i.getSignedInUser(),{useFeatureGate:$}=Hl(),{isFeatureEnabled:j}=$(qi.isReferralFeatureEnabled),A=mn(),E=D7(A?.loggedInUserRole??[]),L=Jo(N=>V1(N)),{isFeatureEnabled:I}=$(qi.isDebitCardFeatureEnabled),_=JKe(I,L),z=ZKe(L),B=_===!1&&z===!1;return m.useEffect(()=>{if(!c||x||!k||!o)return;const N=Nqe({currentPage:n,userId:k.userId,tenantId:o,sessionId:k.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:B,companyId:L?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(N.length===0)return void Kl(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);Kl(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${N.length} URLs to prefetch`);const O=setTimeout(()=>{Vqe(N,i,a).catch(F=>{tS(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,F)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,k,o,n,u,p,j,E,B,L?.companyId,g,i,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&&k&&o)||b)return;Kl(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const N=function(R){const{timeout:O=2e3,onIdle:F}=R;Kl(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const M=()=>{mj&&(Kl("[Idle Detection - Service Worker] 🏃 User became active again"),mj=!1),kC&&clearTimeout(kC),kC=setTimeout(()=>{mj||(Kl("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),mj=!0,F())},O)},U=["mousedown","mousemove","keypress","scroll","touchstart","click"];return U.forEach(H=>{document.addEventListener(H,M,!0)}),M(),()=>{Kl("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),kC&&(clearTimeout(kC),kC=null),U.forEach(H=>{document.removeEventListener(H,M,!0)}),mj=!1}}({timeout:h,onIdle:()=>{if(b)return;Kl("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=Nqe({currentPage:n,userId:k.userId,tenantId:o,sessionId:k.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:B,companyId:L.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(Kl(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),Vqe(R,i,a).catch(F=>{tS(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,F)}),w(!0)):Kl(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=N,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,k,o,b,n,u,p,j,E,B,L.companyId,g,i,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const N=performance.getEntriesByType("navigation");if(N.length>0)return N[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(Kl("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const N=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||N.active;if(!R)return;Kl("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(N){tS("[Prefetch Provider] Failed to notify service worker of refresh:",N)}}())},[]),Et.jsx(Et.Fragment,{children:e})}function iyr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:i=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=Fp(),u=Jo(y=>V1(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}=Hl(),{isFeatureEnabled:x}=f(qi.isServiceWorkerPrefetchingEnabled);return g&&p?Et.jsx(oyr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:i,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Et.jsx(Et.Fragment,{children:e})}function ryr(e,n){const o=ro.extractUtmParamsFromUrl(n),i=new URLSearchParams(o).toString();if(!i)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${i}`}const ayr=th(()=>cd(()=>import("./DefaultTenantHome-Q-dqiquI.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),Hqe=th(()=>cd(()=>Promise.resolve().then(()=>Lxr),void 0)),Uqe=th(()=>cd(()=>import("./ScreenRoutes-CrkYMUz1.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),lyr=th(()=>cd(()=>import("./ConnectionAuthScreen-9JU_wknG.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),syr=th(()=>cd(()=>import("./SignInScreen-_pR-7wM2.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),cyr=th(()=>cd(()=>import("./MagicLinkSignInScreen-ZdC4mZB_.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),Wqe=th(()=>cd(()=>import("./NotFoundScreen-Dpz39bup.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),dyr=th(()=>cd(()=>import("./MagicLinkRoutes-TtaU4o7n.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),uyr=th(()=>cd(()=>import("./WiseConfirmationScreen-Bp7k95gU.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),pyr=th(()=>cd(()=>import("./HubSpotOAuthCallbackScreen-DQMaXQ2W.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),hyr=th(()=>cd(()=>import("./CustomerOnboardingAuthScreen-Bmz9Q3W4.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),myr=th(()=>cd(()=>import("./SignOutScreen-BPL7WsWD.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),gyr=th(()=>cd(()=>import("./OAuthConsentScreen-CUDMrd3J.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),fyr=()=>{const e=Fp(),n=new URLSearchParams(e.search),o=n.get("question"),i=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=ryr("/",n);return Et.jsx(cKe,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:i,aiCfoShouldSubmit:a?"true":"false"}}})};function Qqe(){const{isOpen:e}=gb(),n=N5n(),{isAiCfoOpen:o,setIsAiCfoOpen:i}=fW(),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&&(i(!1),n(),c.current=!0)},[o,e,i,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&i(!1)),a.current=e},[e,o,i]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,i(!0))},[e,i]),null}const xyr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=$i.isSignedIn(),i=Jo(B=>V1(B)),a=$i.getSignedInUser(),s=o&&I4(a),c=Jo(B=>cbt(B)).tenantsBaseInOrder.map(B=>({companyId:B.companyId,tenantId:B.tenantId,companyName:B.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i.tenantId??""},u=Op(),p=gc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=L9t(),g=yW(),[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}=Hl(),{isFeatureEnabled:v}=C(qi.isAiCfoFileUploadEnabled),{isFeatureEnabled:k}=C(qi.isBillPayCommentingEnabled),{isFeatureEnabled:$}=C(qi.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(qi.isExpenseAutomationEnabled),{isFeatureEnabled:A}=C(qi.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(qi.isTreasuryCommentingEnabled),{isFeatureEnabled:L}=C(qi.isCheckingCommentingEnabled),{isFeatureEnabled:I}=C(qi.isTransactionCommentingEnabled),{isFeatureEnabled:_}=C(qi.isCardsCommentingEnabled),z=k||$||s&&j||!s&&A||E||L||I||_;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(dbt())},[u,h]),Et.jsx(R5n,{children:i.tenantId!=null?Et.jsx(FWi,{roomId:`dashboard_${i.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${VS.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${VS.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||I||_,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:z,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:i.companyId},children:Et.jsxs(wle.Provider,{value:w,children:[Et.jsx(Qqe,{}),Et.jsxs(qqe,{children:[Et.jsx(Hqe,{tenantEmailDomain:e}),Et.jsx(Yqe,{children:Et.jsx(Gqe,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Et.jsx(NWi,{children:Et.jsxs(wle.Provider,{value:w,children:[Et.jsx(Qqe,{}),Et.jsxs(qqe,{children:[Et.jsx(Hqe,{tenantEmailDomain:e}),Et.jsx(Yqe,{children:Et.jsx(Gqe,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Gqe=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:i})=>{const a=Jo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=Hl(),{configValue:c}=s(Om.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}=xW(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=fW();return m.useEffect(()=>{h(Ppe.APP_INITIALIZATION)},[h]),Et.jsx(m.Suspense,{fallback:null,children:Et.jsx(iyr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Et.jsxs(_8t,{children:[Et.jsx(tu,{path:"/magic_links/*",element:Et.jsx(dyr,{})}),Et.jsx(tu,{path:"/wise/callback/link-account/*",element:Et.jsx(uyr,{})}),Et.jsx(tu,{path:"/page-not-found",element:Et.jsx(Wqe,{})}),Et.jsx(tu,{path:"/",element:Et.jsx(ayr,{})}),Et.jsx(tu,{path:"/aicfo",element:Et.jsx(fyr,{})}),Et.jsx(tu,{path:"/onboarding/auth",element:Et.jsx(hyr,{})}),Et.jsx(tu,{path:"/:tenantEmailDomain/*",element:Et.jsx(wyr,{children:Et.jsxs(axr,{children:[Et.jsxs(Cyr,{children:[a!=null?Et.jsx(Jxr,{}):null,n?Et.jsx(Uqe,{setTenantEmailDomain:e}):Et.jsx(wne,{children:Et.jsx(Uqe,{setTenantEmailDomain:e})})]}),o?Et.jsxs(Et.Fragment,{children:[Et.jsx(W8r,{}),Et.jsx(vyr,{isOpen:g,children:Et.jsx(Vxr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:i})})]}):null]})})}),Et.jsx(tu,{path:"/signin/auth",element:Et.jsx(wne,{children:Et.jsx(syr,{setTenantEmailDomain:e})})}),Et.jsx(tu,{path:"/signin/magic-link",element:Et.jsx(wne,{children:Et.jsx(cyr,{})})}),Et.jsx(tu,{path:"/signout",element:Et.jsx(myr,{})}),Et.jsx(tu,{path:"/connection/auth",element:Et.jsx(lyr,{})}),Et.jsx(tu,{path:"/oauth/hubspot/callback",element:Et.jsx(pyr,{})}),Et.jsx(tu,{path:"/oauth/authorize",element:Et.jsx(gyr,{})}),Et.jsx(tu,{path:"*",element:Et.jsx(Wqe,{})})]})})})},Yqe=({children:e})=>{const{isOpen:n,width:o}=gb();return Et.jsx(byr,{commentsDrawerWidth:n?o:0,children:e})},yyr=Mn("div")`
74059
+ `,Jxr=()=>{const[e,n]=m.useState(()=>$i.getSignedInUser()),o=Op(),[i,a]=m.useState(!1),[s,c]=m.useState(!1),d=Jo(g=>iZe(g).fetchState),u=Jo(g=>V1(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(sbt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Et.jsxs(m.Fragment,{children:[s&&Et.jsx(Wde,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Et.jsx(Kxr,{userEmail:e.userEmail,isCompleteProfileOpen:i,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},Fqe="init-enter",Xxr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const i=n.get(o||Fqe);eyr(i!==void 0?i:0)}),null},(e,n)=>{const{location:o,visitedUrl:i}=e,{location:a}=n,s=o.pathname||Fqe,c=tyr();return i.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),eyr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),tyr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},th=e=>m.lazy(async()=>{const n=e.toString(),o=$i.getForceRefreshedComponents(),i=new Set(o),a=$i.isSignedIn(),s=i.has(n);try{const c=await e();return i.delete(n),a&&$i.saveForceRefreshedComponents(Array.from(i)),c}catch(c){throw s||(i.add(n),a&&$i.saveForceRefreshedComponents(Array.from(i)),location.reload()),c}}),n8t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),o8t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),i8t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),r8t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function Kl(...e){const n=Cc==="DEV"||Cc==="QA";if(n8t||o8t||i8t||r8t)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 tS(...e){const n=Cc==="DEV"||Cc==="QA";if(n8t||o8t||i8t||r8t)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 kC=null,mj=!1;const Zl=Cc==="PROD"?"https://api.zeni.ai":Cc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function Rqe(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"]})),i=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:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${Zl}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const nyr={dashboard:function(e){return[...Rqe()]},reports:Rqe,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})),i=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${Zl}/accounting/2.0/reports/profit_and_loss?query=${i}`,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:`${Zl}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${Zl}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${Zl}/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:`${Zl}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${Zl}/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,i=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${Zl}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${Zl}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${Zl}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${Zl}/tenant/1.0/companies/${o}?query=${i}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function Nqe(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:i,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,nyr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):i===!1&&u.reason.includes("People")?(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(Kl(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return Kl(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function Vqe(e,n=0,o){if("serviceWorker"in navigator)try{const i=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?(Kl("[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||i.active;if(!a)return void tS("[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);Kl("[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)=>{Kl(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),Kl(` URL: ${u.url}`)});const c=FI(),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}}),Kl("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(i){tS("[Prefetch Manager - Service Worker] Failed to send prefetch request:",i instanceof Error?i.message:"Unknown error")}else tS("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function oyr({children:e,currentPage:n,tenantId:o,batchCalls:i=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=Fp(),k=$i.getSignedInUser(),{useFeatureGate:$}=Hl(),{isFeatureEnabled:j}=$(qi.isReferralFeatureEnabled),A=mn(),E=D7(A?.loggedInUserRole??[]),L=Jo(N=>V1(N)),{isFeatureEnabled:I}=$(qi.isDebitCardFeatureEnabled),_=JKe(I,L),z=ZKe(L),B=_===!1&&z===!1;return m.useEffect(()=>{if(!c||x||!k||!o)return;const N=Nqe({currentPage:n,userId:k.userId,tenantId:o,sessionId:k.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:B,companyId:L?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(N.length===0)return void Kl(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);Kl(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${N.length} URLs to prefetch`);const O=setTimeout(()=>{Vqe(N,i,a).catch(F=>{tS(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,F)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,k,o,n,u,p,j,E,B,L?.companyId,g,i,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&&k&&o)||b)return;Kl(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const N=function(R){const{timeout:O=2e3,onIdle:F}=R;Kl(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const M=()=>{mj&&(Kl("[Idle Detection - Service Worker] 🏃 User became active again"),mj=!1),kC&&clearTimeout(kC),kC=setTimeout(()=>{mj||(Kl("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),mj=!0,F())},O)},U=["mousedown","mousemove","keypress","scroll","touchstart","click"];return U.forEach(H=>{document.addEventListener(H,M,!0)}),M(),()=>{Kl("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),kC&&(clearTimeout(kC),kC=null),U.forEach(H=>{document.removeEventListener(H,M,!0)}),mj=!1}}({timeout:h,onIdle:()=>{if(b)return;Kl("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=Nqe({currentPage:n,userId:k.userId,tenantId:o,sessionId:k.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:B,companyId:L.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(Kl(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),Vqe(R,i,a).catch(F=>{tS(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,F)}),w(!0)):Kl(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=N,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,k,o,b,n,u,p,j,E,B,L.companyId,g,i,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const N=performance.getEntriesByType("navigation");if(N.length>0)return N[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(Kl("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const N=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||N.active;if(!R)return;Kl("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(N){tS("[Prefetch Provider] Failed to notify service worker of refresh:",N)}}())},[]),Et.jsx(Et.Fragment,{children:e})}function iyr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:i=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=Fp(),u=Jo(y=>V1(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}=Hl(),{isFeatureEnabled:x}=f(qi.isServiceWorkerPrefetchingEnabled);return g&&p?Et.jsx(oyr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:i,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Et.jsx(Et.Fragment,{children:e})}function ryr(e,n){const o=ro.extractUtmParamsFromUrl(n),i=new URLSearchParams(o).toString();if(!i)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${i}`}const ayr=th(()=>cd(()=>import("./DefaultTenantHome-CmtmKMal.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),Hqe=th(()=>cd(()=>Promise.resolve().then(()=>Lxr),void 0)),Uqe=th(()=>cd(()=>import("./ScreenRoutes-CA8fUnaP.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),lyr=th(()=>cd(()=>import("./ConnectionAuthScreen-De-vuICZ.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),syr=th(()=>cd(()=>import("./SignInScreen-RaghIVhM.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),cyr=th(()=>cd(()=>import("./MagicLinkSignInScreen-CosgA8eP.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),Wqe=th(()=>cd(()=>import("./NotFoundScreen-Brpo5hIh.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),dyr=th(()=>cd(()=>import("./MagicLinkRoutes-NEjpbABr.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),uyr=th(()=>cd(()=>import("./WiseConfirmationScreen-BXqYXseQ.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),pyr=th(()=>cd(()=>import("./HubSpotOAuthCallbackScreen-B7ampOQu.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),hyr=th(()=>cd(()=>import("./CustomerOnboardingAuthScreen-Cm9qzjcw.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),myr=th(()=>cd(()=>import("./SignOutScreen-CNkJNt7x.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),gyr=th(()=>cd(()=>import("./OAuthConsentScreen-BB710FHj.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),fyr=()=>{const e=Fp(),n=new URLSearchParams(e.search),o=n.get("question"),i=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=ryr("/",n);return Et.jsx(cKe,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:i,aiCfoShouldSubmit:a?"true":"false"}}})};function Qqe(){const{isOpen:e}=gb(),n=N5n(),{isAiCfoOpen:o,setIsAiCfoOpen:i}=fW(),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&&(i(!1),n(),c.current=!0)},[o,e,i,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&i(!1)),a.current=e},[e,o,i]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,i(!0))},[e,i]),null}const xyr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=$i.isSignedIn(),i=Jo(B=>V1(B)),a=$i.getSignedInUser(),s=o&&I4(a),c=Jo(B=>cbt(B)).tenantsBaseInOrder.map(B=>({companyId:B.companyId,tenantId:B.tenantId,companyName:B.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i.tenantId??""},u=Op(),p=gc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=L9t(),g=yW(),[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}=Hl(),{isFeatureEnabled:v}=C(qi.isAiCfoFileUploadEnabled),{isFeatureEnabled:k}=C(qi.isBillPayCommentingEnabled),{isFeatureEnabled:$}=C(qi.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(qi.isExpenseAutomationEnabled),{isFeatureEnabled:A}=C(qi.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(qi.isTreasuryCommentingEnabled),{isFeatureEnabled:L}=C(qi.isCheckingCommentingEnabled),{isFeatureEnabled:I}=C(qi.isTransactionCommentingEnabled),{isFeatureEnabled:_}=C(qi.isCardsCommentingEnabled),z=k||$||s&&j||!s&&A||E||L||I||_;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(dbt())},[u,h]),Et.jsx(R5n,{children:i.tenantId!=null?Et.jsx(FWi,{roomId:`dashboard_${i.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${VS.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${VS.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||I||_,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:z,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:i.companyId},children:Et.jsxs(wle.Provider,{value:w,children:[Et.jsx(Qqe,{}),Et.jsxs(qqe,{children:[Et.jsx(Hqe,{tenantEmailDomain:e}),Et.jsx(Yqe,{children:Et.jsx(Gqe,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Et.jsx(NWi,{children:Et.jsxs(wle.Provider,{value:w,children:[Et.jsx(Qqe,{}),Et.jsxs(qqe,{children:[Et.jsx(Hqe,{tenantEmailDomain:e}),Et.jsx(Yqe,{children:Et.jsx(Gqe,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Gqe=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:i})=>{const a=Jo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=Hl(),{configValue:c}=s(Om.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}=xW(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=fW();return m.useEffect(()=>{h(Ppe.APP_INITIALIZATION)},[h]),Et.jsx(m.Suspense,{fallback:null,children:Et.jsx(iyr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Et.jsxs(_8t,{children:[Et.jsx(tu,{path:"/magic_links/*",element:Et.jsx(dyr,{})}),Et.jsx(tu,{path:"/wise/callback/link-account/*",element:Et.jsx(uyr,{})}),Et.jsx(tu,{path:"/page-not-found",element:Et.jsx(Wqe,{})}),Et.jsx(tu,{path:"/",element:Et.jsx(ayr,{})}),Et.jsx(tu,{path:"/aicfo",element:Et.jsx(fyr,{})}),Et.jsx(tu,{path:"/onboarding/auth",element:Et.jsx(hyr,{})}),Et.jsx(tu,{path:"/:tenantEmailDomain/*",element:Et.jsx(wyr,{children:Et.jsxs(axr,{children:[Et.jsxs(Cyr,{children:[a!=null?Et.jsx(Jxr,{}):null,n?Et.jsx(Uqe,{setTenantEmailDomain:e}):Et.jsx(wne,{children:Et.jsx(Uqe,{setTenantEmailDomain:e})})]}),o?Et.jsxs(Et.Fragment,{children:[Et.jsx(W8r,{}),Et.jsx(vyr,{isOpen:g,children:Et.jsx(Vxr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:i})})]}):null]})})}),Et.jsx(tu,{path:"/signin/auth",element:Et.jsx(wne,{children:Et.jsx(syr,{setTenantEmailDomain:e})})}),Et.jsx(tu,{path:"/signin/magic-link",element:Et.jsx(wne,{children:Et.jsx(cyr,{})})}),Et.jsx(tu,{path:"/signout",element:Et.jsx(myr,{})}),Et.jsx(tu,{path:"/connection/auth",element:Et.jsx(lyr,{})}),Et.jsx(tu,{path:"/oauth/hubspot/callback",element:Et.jsx(pyr,{})}),Et.jsx(tu,{path:"/oauth/authorize",element:Et.jsx(gyr,{})}),Et.jsx(tu,{path:"*",element:Et.jsx(Wqe,{})})]})})})},Yqe=({children:e})=>{const{isOpen:n,width:o}=gb();return Et.jsx(byr,{commentsDrawerWidth:n?o:0,children:e})},yyr=Mn("div")`
74060
74060
  display:flex;
74061
74061
  `,qqe=Mn("div")`
74062
74062
  display: flex;
@@ -74178,4 +74178,4 @@ ${Aa.beneficiaryAddress} ${ne}`,d(ye),I(!0)})(o),"data-testid":K("title-text-cop
74178
74178
  }
74179
74179
  `,Lyr=({fetchState:e,style:n})=>e==="In-Progress"||e==="Not-Started"?Et.jsxs($yr,{style:n,children:[Et.jsxs(Ayr,{children:[Et.jsx(o_,{children:Et.jsx(bh,{width:96,height:20})}),Et.jsxs(o_,{children:[Et.jsx(bh,{width:55,height:12}),Et.jsx(bh,{width:78,height:16}),Et.jsx(bh,{width:46,height:16})]}),Et.jsxs(o_,{children:[Et.jsx(bh,{width:55,height:12}),Et.jsx(bh,{width:110,height:16}),Et.jsx(bh,{width:84,height:16})]}),Et.jsxs(o_,{children:[Et.jsx(bh,{width:55,height:12}),Et.jsx(bh,{width:84,height:16}),Et.jsx(bh,{width:64,height:16})]})]}),Et.jsxs(jyr,{children:[Et.jsxs(Eyr,{children:[Et.jsx(bh,{width:106,height:27}),Et.jsx(bh,{width:111,height:32})]}),Et.jsx(Iyr,{children:Et.jsx(kyr,{width:96,height:96})})]})]}):null;function Tyr({minDisplayTime:e=0}){const{isLoading:n}=xW(),[o,i]=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||(i(!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(()=>{i(!1),s.current=null},u)}else i(!1)}},[n,o,e]),m.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),!n&&o||!o?null:Et.jsx(Lyr,{fetchState:"In-Progress"})}const Kqe="missing-receipts-batch-completed",J8=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)}}};J.updateAppLocaleID("en");let GC=null;function Dyr(){return GC===null&&(GC=function(){console.warn(`initializing epic state with url ${JSON.stringify(VS)}`);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=mbt(VS,e?.userId,e?.zeniSessionId,n,eS(),_yr);$ne();const i=FI();return i.userId!=null&&id.identify(i.userId,{tenant_id:i.tenantId}),o}(),$ne().then(()=>{GC!=null&&(J8.reset(),Myr(GC))}).catch(e=>{console.error("Failed to load feature epics:",e),y8t(e,{tags:{critical:"true",module:"epicManager"}}),alert(`The application failed to load required modules. Some features may not work correctly.
74180
74180
 
74181
- Please refresh the page to try again.`)})),GC}function rvr(){return GC}const i_=new pbt,Zqe=()=>{const e=Op(),n=$i.getSignedInUser(),o=Jo(w=>V1(w)),[i,a]=m.useState(null),s=X6i(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?(console.warn("[autoLogout] triggerLogout",{reason:w}),function(C){try{sessionStorage.setItem(Gde,"auto-logout"),sessionStorage.setItem(Yde,String(C.idleTimeoutMinutes)),sessionStorage.setItem(qde,String(Date.now())),console.warn("[autoLogout] context written",C),pE=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes})):(Iut(),pE=void 0),a(null),i_.stop(),e(xbt()),e(ybt(!1)),$i.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return i_.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(bbt()),onWarningStart:w=>{console.warn("[autoLogout] onWarningStart",{seconds:w}),id.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{console.warn("[autoLogout] onAutoLogout fired by SessionManager"),id.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>i_.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=Jo(w=>wbt(w,o.companyId)),u=gc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(yhe())},[]);const h=Jo(w=>Cbt(w));(()=>{const w=Ope(),C=Op(),{useFeatureGate:v}=Hl(),{isFeatureEnabled:k}=v(qi.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(k!==!0||w==null)return;const $=$i.getSignedInUser()?.userId;if($==null)return;const j=BE(w,$),A=E=>{C(ubt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind(Kqe,A),()=>{j.unbind(Kqe,A)}},[w,C,k])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>nZe(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(vbt(C))}},y=m.useMemo(()=>$i.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Et.jsxs(P1n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Et.jsx($1n,{toolkit:{analytics:id,sentry:b8t,authParams:b},children:Et.jsxs(Udn,{endPoint:{url:Epe},children:[Et.jsx(Bti,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(yhe())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Et.jsx(Syr,{...x})]})}),i!=null&&n!=null?Et.jsx($8r,{secondsRemaining:i,onContinueSession:()=>{id.trackSessionTimeoutClicked("continue",i),i_.continueSession()},onSignOut:()=>{id.trackSessionTimeoutClicked("sign_out",i),c()}}):null]})},Pyr=()=>{const e=$i.isSignedIn(),n=Jo(s=>V1(s)).companyId,o=Jo(s=>hbt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),i=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:Lqe,featureClientSecret:Ea.featureClientSecret,providerEndPoint:PI.statsigBaseUrl}),[Lqe,Ea.featureClientSecret,PI.statsigBaseUrl]);return n?Et.jsx(Hhn,{isUserSignedIn:e,featureGateCustomFields:i,zeniFeatureConfig:a,children:Et.jsx(Zqe,{})}):Et.jsx(Zqe,{})},Byr=x8t(function(){const e=m.useMemo(()=>Dyr(),[]),[n,o]=m.useState(!1),[i,a]=m.useState(!1);m.useEffect(()=>{$ne().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]),Et.jsx(gxr,{children:Et.jsx(z8t,{store:e,children:Et.jsx(fxr,{value:n,children:Et.jsxs(G8r,{children:[Et.jsx(Tyr,{}),Et.jsx(QRt,{children:Et.jsx(mxr,{children:Et.jsxs(S1n,{children:[i?Et.jsx(W4n,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Et.jsx(Pyr,{})]})})})]})})})})});function Myr(e){const n=e.getState(),o=n.tenantState.loggedInUser,i=o?.zeniSessionId!=null?o:$i.getSignedInUser();if(i?.userId==null||i?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=V1(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&&(KKe(i.userId,i.zeniSessionId,c),e.dispatch(Rle(c)),a!=null&&$i.saveActiveTenantDomainForUser(a),J8.shouldFetchActiveTenant(c)&&(J8.markActiveTenantFetchStarted(c),e.dispatch(oZe(i.userId,c,i.zeniSessionId))),J8.shouldFetchExcludedResources(c)&&(J8.markExcludedResourcesFetchStarted(c),e.dispatch(gbt(i.userId,c))),J8.shouldFetchConnections(c)&&(J8.markConnectionsFetchStarted(c),e.dispatch(fbt(i.userId,c))))}function _yr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const zyr=!!(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}$/)),Jqe=`/service-worker.js?v=${Date.now()}&env=DEV&endpoint=${encodeURIComponent("https://zeni-webapp-dev.uc.r.appspot.com")}`;function Xqe(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const i=o.installing;i!=null&&(i.onstatechange=()=>{i.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 eKe="zeni-chunk-reload-at",Oyr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function tKe(e){try{const n=Number(sessionStorage.getItem(eKe))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(eKe,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let Cne=!1,nKe=null;const oKe="//js.hs-scripts.com/5991084.js",iKe="hs-script-loader",Fyr=$i.getSignedInUser(),Ryr=Fyr?.zeniSessionId;var B8;window.addEventListener("vite:preloadError",e=>{const n=e;tKe(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return Oyr.some(i=>o.includes(i))})(e.reason)&&tKe(e.reason)}),async function(){try{const o=await async function(){const a={environment:Cc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${Epe}/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}}(),i=(e=o,n="ZENI-WEB-APP-"+Cc,PE.AES.decrypt(e,n).toString(PE.enc.Utf8));F8r(JSON.parse(i)),Ubt.createRoot(document.getElementById("root")).render(Et.jsx(T.StrictMode,{children:Et.jsx(O8t,{children:Et.jsx(Byr,{})})})),function(){const a=()=>{const s=Ea.sentryDsn?.trim();if(!s)return;const c=Ea.sentryProfileSamplingRate>0;w8t({dsn:s,tracesSampleRate:Ea.sentryTraceSamplingRate,profilesSampleRate:c?Ea.sentryProfileSamplingRate:0,integrations:[C8t(),...c?[v8t()]:[],S8t({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)}),k8t("session-id",Ryr)};"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):nKe!==null||(nKe=new Promise(e=>{if(Cne)return void e(!0);const n=()=>{Cne?e(!0):(Cne=!0,new Promise((i,a)=>{if(document.getElementById(iKe))return void i();const s=document.createElement("script");s.id=iKe,s.src=oKe,s.async=!0,s.onload=()=>i(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${oKe}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(i=>{console.error("Error loading third-party scripts:",i),e(!0)}))},o=()=>{var i,a;i=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(i,{timeout:a}):setTimeout(i,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;zyr?(e=Jqe,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(i=>{i.unregister().then(()=>window.location.reload())}):Xqe(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):Xqe(Jqe)})}}(),(B8=console.log)&&B8 instanceof Function&&cd(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a})=>{e(B8),n(B8),o(B8),i(B8),a(B8)});export{Hl as $,XCr as A,Sn as B,Ibr as C,Owr as D,Bwr as E,Cde as F,Dbr as G,Ude as H,qi as I,ue as J,ixr as K,Ppe as L,_wr as M,q9t as N,J as O,nvr as P,ovr as Q,Mwr as R,kyr as S,fW as T,lxr as U,SXn as V,wCn as W,rxr as X,ivr as Y,U8r as Z,zwr as _,yW as a,evr as a$,Abr as a0,Bu as a1,Epe as a2,vle as a3,MCr as a4,Qct as a5,ICr as a6,Fpe as a7,Oqe as a8,$xr as a9,aCr as aA,cCr as aB,dCr as aC,ybr as aD,Hwr as aE,hwr as aF,fwr as aG,kue as aH,Qwr as aI,Wwr as aJ,gwr as aK,mwr as aL,xbr as aM,Om as aN,jwr as aO,vxr as aP,axo as aQ,Tbr as aR,XOn as aS,Uno as aT,Nwr as aU,Rwr as aV,Vwr as aW,Sbr as aX,$n as aY,Zr as aZ,Q9t as a_,yxr as aa,Cxr as ab,kxr as ac,Kto as ad,zqe as ae,wxr as af,Cle as ag,fz as ah,aF as ai,Mqe as aj,No as ak,dwr as al,cwr as am,Mwo as an,Lbr as ao,Lwr as ap,Lt as aq,Ewr as ar,BI as as,VS as at,L3 as au,Iwr as av,sCr as aw,qct as ax,rCr as ay,lCr as az,ryr as b,ibr as b$,Oxr as b0,$br as b1,jbr as b2,Lpe as b3,H8r as b4,wbr as b5,zUn as b6,Ist as b7,Pbr as b8,PCr as b9,ewr as bA,Jbr as bB,GCr as bC,kwr as bD,VCr as bE,owr as bF,iwr as bG,awr as bH,Dwr as bI,Wbr as bJ,Qbr as bK,Twr as bL,Pwr as bM,qbr as bN,Kbr as bO,Zbr as bP,rwr as bQ,fbr as bR,lwr as bS,swr as bT,zCr as bU,Xbr as bV,ZCr as bW,HCr as bX,bwr as bY,vwr as bZ,wwr as b_,TCr as ba,pxr as bb,twr as bc,lbr as bd,pbr as be,Kce as bf,sbr as bg,_Cr as bh,pwr as bi,dbr as bj,ubr as bk,cbr as bl,eS as bm,Uwr as bn,Rbr as bo,Vbr as bp,Nbr as bq,zbr as br,_br as bs,Hbr as bt,Fwr as bu,Obr as bv,Fbr as bw,Ubr as bx,da as by,pCr as bz,id as c,xwr as c0,ywr as c1,$wr as c2,Wde as c3,Swr as c4,Awr as c5,qmr as c6,ofr as c7,Yte as c8,YCr as c9,LCr as cA,BCr as cB,FCr as cC,OCr as cD,NCr as cE,abr as cF,uwr as cG,RCr as cH,nwr as cI,N5n as cJ,gb as cK,JCr as cL,DCr as cM,ECr as cN,Gbr as cO,jCr as cP,hxr as cQ,Txr as cR,Fxr as cS,hie as cT,Q6t as cU,W6t as cV,rbr as cW,x9t as cX,qCr as ca,KCr as cb,QCr as cc,kbr as cd,$Cr as ce,gCr as cf,yCr as cg,hbr as ch,Cwr as ci,Pi as cj,qLi as ck,xCr as cl,hCr as cm,wCr as cn,mCr as co,bCr as cp,kCr as cq,mbr as cr,gbr as cs,ACr as ct,S as cu,vCr as cv,CCr as cw,fCr as cx,SCr as cy,uCr as cz,Myr as d,ro as e,bbr as f,rvr as g,Le as h,Ea as i,tbr as j,mn as k,th as l,Yg as m,xxr as n,r as o,tvr as p,Gxr as q,kqo as r,D as s,J8 as t,xW as u,P as v,nbr as w,Axo as x,Ebr as y,$i as z};
74181
+ Please refresh the page to try again.`)})),GC}function rvr(){return GC}const i_=new pbt,Zqe=()=>{const e=Op(),n=$i.getSignedInUser(),o=Jo(w=>V1(w)),[i,a]=m.useState(null),s=X6i(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?(console.warn("[autoLogout] triggerLogout",{reason:w}),function(C){try{sessionStorage.setItem(Gde,"auto-logout"),sessionStorage.setItem(Yde,String(C.idleTimeoutMinutes)),sessionStorage.setItem(qde,String(Date.now())),console.warn("[autoLogout] context written",C),pE=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes})):(Iut(),pE=void 0),a(null),i_.stop(),e(xbt()),e(ybt(!1)),$i.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return i_.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(bbt()),onWarningStart:w=>{console.warn("[autoLogout] onWarningStart",{seconds:w}),id.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{console.warn("[autoLogout] onAutoLogout fired by SessionManager"),id.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>i_.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=Jo(w=>wbt(w,o.companyId)),u=gc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(yhe())},[]);const h=Jo(w=>Cbt(w));(()=>{const w=Ope(),C=Op(),{useFeatureGate:v}=Hl(),{isFeatureEnabled:k}=v(qi.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(k!==!0||w==null)return;const $=$i.getSignedInUser()?.userId;if($==null)return;const j=BE(w,$),A=E=>{C(ubt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind(Kqe,A),()=>{j.unbind(Kqe,A)}},[w,C,k])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>nZe(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(vbt(C))}},y=m.useMemo(()=>$i.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Et.jsxs(P1n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Et.jsx($1n,{toolkit:{analytics:id,sentry:b8t,authParams:b},children:Et.jsxs(Udn,{endPoint:{url:Epe},children:[Et.jsx(Bti,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(yhe())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Et.jsx(Syr,{...x})]})}),i!=null&&n!=null?Et.jsx($8r,{secondsRemaining:i,onContinueSession:()=>{id.trackSessionTimeoutClicked("continue",i),i_.continueSession()},onSignOut:()=>{id.trackSessionTimeoutClicked("sign_out",i),c()}}):null]})},Pyr=()=>{const e=$i.isSignedIn(),n=Jo(s=>V1(s)).companyId,o=Jo(s=>hbt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),i=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:Lqe,featureClientSecret:Ea.featureClientSecret,providerEndPoint:PI.statsigBaseUrl}),[Lqe,Ea.featureClientSecret,PI.statsigBaseUrl]);return n?Et.jsx(Hhn,{isUserSignedIn:e,featureGateCustomFields:i,zeniFeatureConfig:a,children:Et.jsx(Zqe,{})}):Et.jsx(Zqe,{})},Byr=x8t(function(){const e=m.useMemo(()=>Dyr(),[]),[n,o]=m.useState(!1),[i,a]=m.useState(!1);m.useEffect(()=>{$ne().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]),Et.jsx(gxr,{children:Et.jsx(z8t,{store:e,children:Et.jsx(fxr,{value:n,children:Et.jsxs(G8r,{children:[Et.jsx(Tyr,{}),Et.jsx(QRt,{children:Et.jsx(mxr,{children:Et.jsxs(S1n,{children:[i?Et.jsx(W4n,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Et.jsx(Pyr,{})]})})})]})})})})});function Myr(e){const n=e.getState(),o=n.tenantState.loggedInUser,i=o?.zeniSessionId!=null?o:$i.getSignedInUser();if(i?.userId==null||i?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=V1(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&&(KKe(i.userId,i.zeniSessionId,c),e.dispatch(Rle(c)),a!=null&&$i.saveActiveTenantDomainForUser(a),J8.shouldFetchActiveTenant(c)&&(J8.markActiveTenantFetchStarted(c),e.dispatch(oZe(i.userId,c,i.zeniSessionId))),J8.shouldFetchExcludedResources(c)&&(J8.markExcludedResourcesFetchStarted(c),e.dispatch(gbt(i.userId,c))),J8.shouldFetchConnections(c)&&(J8.markConnectionsFetchStarted(c),e.dispatch(fbt(i.userId,c))))}function _yr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const zyr=!!(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}$/)),Jqe=`/service-worker.js?v=${Date.now()}&env=QA&endpoint=${encodeURIComponent("https://zeni-webapp-qa.uc.r.appspot.com")}`;function Xqe(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const i=o.installing;i!=null&&(i.onstatechange=()=>{i.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 eKe="zeni-chunk-reload-at",Oyr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function tKe(e){try{const n=Number(sessionStorage.getItem(eKe))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(eKe,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let Cne=!1,nKe=null;const oKe="//js.hs-scripts.com/5991084.js",iKe="hs-script-loader",Fyr=$i.getSignedInUser(),Ryr=Fyr?.zeniSessionId;var B8;window.addEventListener("vite:preloadError",e=>{const n=e;tKe(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return Oyr.some(i=>o.includes(i))})(e.reason)&&tKe(e.reason)}),async function(){try{const o=await async function(){const a={environment:Cc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${Epe}/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}}(),i=(e=o,n="ZENI-WEB-APP-"+Cc,PE.AES.decrypt(e,n).toString(PE.enc.Utf8));F8r(JSON.parse(i)),Ubt.createRoot(document.getElementById("root")).render(Et.jsx(T.StrictMode,{children:Et.jsx(O8t,{children:Et.jsx(Byr,{})})})),function(){const a=()=>{const s=Ea.sentryDsn?.trim();if(!s)return;const c=Ea.sentryProfileSamplingRate>0;w8t({dsn:s,tracesSampleRate:Ea.sentryTraceSamplingRate,profilesSampleRate:c?Ea.sentryProfileSamplingRate:0,integrations:[C8t(),...c?[v8t()]:[],S8t({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)}),k8t("session-id",Ryr)};"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):nKe!==null||(nKe=new Promise(e=>{if(Cne)return void e(!0);const n=()=>{Cne?e(!0):(Cne=!0,new Promise((i,a)=>{if(document.getElementById(iKe))return void i();const s=document.createElement("script");s.id=iKe,s.src=oKe,s.async=!0,s.onload=()=>i(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${oKe}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(i=>{console.error("Error loading third-party scripts:",i),e(!0)}))},o=()=>{var i,a;i=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(i,{timeout:a}):setTimeout(i,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;zyr?(e=Jqe,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(i=>{i.unregister().then(()=>window.location.reload())}):Xqe(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):Xqe(Jqe)})}}(),(B8=console.log)&&B8 instanceof Function&&cd(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:i,getTTFB:a})=>{e(B8),n(B8),o(B8),i(B8),a(B8)});export{Hl as $,XCr as A,Sn as B,Ibr as C,Owr as D,Bwr as E,Cde as F,Dbr as G,Ude as H,qi as I,ue as J,ixr as K,Ppe as L,_wr as M,q9t as N,J as O,nvr as P,ovr as Q,Mwr as R,kyr as S,fW as T,lxr as U,SXn as V,wCn as W,rxr as X,ivr as Y,U8r as Z,zwr as _,yW as a,evr as a$,Abr as a0,Bu as a1,Epe as a2,vle as a3,MCr as a4,Qct as a5,ICr as a6,Fpe as a7,Oqe as a8,$xr as a9,aCr as aA,cCr as aB,dCr as aC,ybr as aD,Hwr as aE,hwr as aF,fwr as aG,kue as aH,Qwr as aI,Wwr as aJ,gwr as aK,mwr as aL,xbr as aM,Om as aN,jwr as aO,vxr as aP,axo as aQ,Tbr as aR,XOn as aS,Uno as aT,Nwr as aU,Rwr as aV,Vwr as aW,Sbr as aX,$n as aY,Zr as aZ,Q9t as a_,yxr as aa,Cxr as ab,kxr as ac,Kto as ad,zqe as ae,wxr as af,Cle as ag,fz as ah,aF as ai,Mqe as aj,No as ak,dwr as al,cwr as am,Mwo as an,Lbr as ao,Lwr as ap,Lt as aq,Ewr as ar,BI as as,VS as at,L3 as au,Iwr as av,sCr as aw,qct as ax,rCr as ay,lCr as az,ryr as b,ibr as b$,Oxr as b0,$br as b1,jbr as b2,Lpe as b3,H8r as b4,wbr as b5,zUn as b6,Ist as b7,Pbr as b8,PCr as b9,ewr as bA,Jbr as bB,GCr as bC,kwr as bD,VCr as bE,owr as bF,iwr as bG,awr as bH,Dwr as bI,Wbr as bJ,Qbr as bK,Twr as bL,Pwr as bM,qbr as bN,Kbr as bO,Zbr as bP,rwr as bQ,fbr as bR,lwr as bS,swr as bT,zCr as bU,Xbr as bV,ZCr as bW,HCr as bX,bwr as bY,vwr as bZ,wwr as b_,TCr as ba,pxr as bb,twr as bc,lbr as bd,pbr as be,Kce as bf,sbr as bg,_Cr as bh,pwr as bi,dbr as bj,ubr as bk,cbr as bl,eS as bm,Uwr as bn,Rbr as bo,Vbr as bp,Nbr as bq,zbr as br,_br as bs,Hbr as bt,Fwr as bu,Obr as bv,Fbr as bw,Ubr as bx,da as by,pCr as bz,id as c,xwr as c0,ywr as c1,$wr as c2,Wde as c3,Swr as c4,Awr as c5,qmr as c6,ofr as c7,Yte as c8,YCr as c9,LCr as cA,BCr as cB,FCr as cC,OCr as cD,NCr as cE,abr as cF,uwr as cG,RCr as cH,nwr as cI,N5n as cJ,gb as cK,JCr as cL,DCr as cM,ECr as cN,Gbr as cO,jCr as cP,hxr as cQ,Txr as cR,Fxr as cS,hie as cT,Q6t as cU,W6t as cV,rbr as cW,x9t as cX,qCr as ca,KCr as cb,QCr as cc,kbr as cd,$Cr as ce,gCr as cf,yCr as cg,hbr as ch,Cwr as ci,Pi as cj,qLi as ck,xCr as cl,hCr as cm,wCr as cn,mCr as co,bCr as cp,kCr as cq,mbr as cr,gbr as cs,ACr as ct,S as cu,vCr as cv,CCr as cw,fCr as cx,SCr as cy,uCr as cz,Myr as d,ro as e,bbr as f,rvr as g,Le as h,Ea as i,tbr as j,mn as k,th as l,Yg as m,xxr as n,r as o,tvr as p,Gxr as q,kqo as r,D as s,J8 as t,xW as u,P as v,nbr as w,Axo as x,Ebr as y,$i as z};