var Ot=e=>{throw TypeError(e)};var Xe=(e,t,n)=>t.has(e)||Ot("Cannot "+n);var d=(e,t,n)=>(Xe(e,t,"read from private field"),n?n.call(e):t.get(e)),O=(e,t,n)=>t.has(e)?Ot("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(Xe(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),A=(e,t,n)=>(Xe(e,t,"access private method"),n);import{c as ae,S as Ir,N as kt,O as K,G as it,Q as Me,K as ct,T as ut,U as jt,W as Pr,Y as Ar,Z as Dr,_ as Lt,J as tn,r as s,M as Tr,p as Or,z as Ee,l as be,j as c,P as H,n as kr,f as xt,x as nn,A as jr,k as Ke,i as _,D as Lr,C as Fr,y as Ur,$ as rn,a0 as $r,B as Br,v as Kr,w as Gr,h as zr,d as G,m as lt,u as Qr,a1 as Wr,a2 as Vr,L as je,a3 as N}from"./index-CdLZCFax.js";import{B as qe}from"./button-D6hPD216.js";import{e as on,R as Hr,I as Yr,d as Xr,c as Ft,m as qr,B as Zr,U as Jr}from"./index-Dr4C0uWC.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eo=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const to=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const no=ae("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ro=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oo=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ao=ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const so=ae("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);var F,C,_e,k,ne,me,Z,J,Ie,ve,ge,re,oe,ee,ye,E,Ce,dt,ft,ht,pt,mt,vt,gt,an,en,io=(en=class extends Ir{constructor(t,n){super();O(this,E);O(this,F);O(this,C);O(this,_e);O(this,k);O(this,ne);O(this,me);O(this,Z);O(this,J);O(this,Ie);O(this,ve);O(this,ge);O(this,re);O(this,oe);O(this,ee);O(this,ye,new Set);this.options=n,I(this,F,t),I(this,J,null),I(this,Z,kt()),this.options.experimental_prefetchInRender||d(this,Z).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(d(this,C).addObserver(this),Ut(d(this,C),this.options)?A(this,E,Ce).call(this):this.updateResult(),A(this,E,pt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yt(d(this,C),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yt(d(this,C),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,A(this,E,mt).call(this),A(this,E,vt).call(this),d(this,C).removeObserver(this)}setOptions(t){const n=this.options,r=d(this,C);if(this.options=d(this,F).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof K(this.options.enabled,d(this,C))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");A(this,E,gt).call(this),d(this,C).setOptions(this.options),n._defaulted&&!it(this.options,n)&&d(this,F).getQueryCache().notify({type:"observerOptionsUpdated",query:d(this,C),observer:this});const o=this.hasListeners();o&&$t(d(this,C),r,this.options,n)&&A(this,E,Ce).call(this),this.updateResult(),o&&(d(this,C)!==r||K(this.options.enabled,d(this,C))!==K(n.enabled,d(this,C))||Me(this.options.staleTime,d(this,C))!==Me(n.staleTime,d(this,C)))&&A(this,E,dt).call(this);const a=A(this,E,ft).call(this);o&&(d(this,C)!==r||K(this.options.enabled,d(this,C))!==K(n.enabled,d(this,C))||a!==d(this,ee))&&A(this,E,ht).call(this,a)}getOptimisticResult(t){const n=d(this,F).getQueryCache().build(d(this,F),t),r=this.createResult(n,t);return uo(this,r)&&(I(this,k,r),I(this,me,this.options),I(this,ne,d(this,C).state)),r}getCurrentResult(){return d(this,k)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){d(this,ye).add(t)}getCurrentQuery(){return d(this,C)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=d(this,F).defaultQueryOptions(t),r=d(this,F).getQueryCache().build(d(this,F),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return A(this,E,Ce).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),d(this,k)))}createResult(t,n){var z;const r=d(this,C),o=this.options,a=d(this,k),u=d(this,ne),i=d(this,me),v=t!==r?t.state:d(this,_e),{state:m}=t;let l={...m},p=!1,g;if(n._optimisticResults){const T=this.hasListeners(),ce=!T&&Ut(t,n),Q=T&&$t(t,r,n,o);(ce||Q)&&(l={...l,...Dr(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:b,errorUpdatedAt:f,status:y}=l;g=l.data;let x=!1;if(n.placeholderData!==void 0&&g===void 0&&y==="pending"){let T;a!=null&&a.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData)?(T=a.data,x=!0):T=typeof n.placeholderData=="function"?n.placeholderData((z=d(this,ge))==null?void 0:z.state.data,d(this,ge)):n.placeholderData,T!==void 0&&(y="success",g=Lt(a==null?void 0:a.data,T,n),p=!0)}if(n.select&&g!==void 0&&!x)if(a&&g===(u==null?void 0:u.data)&&n.select===d(this,Ie))g=d(this,ve);else try{I(this,Ie,n.select),g=n.select(g),g=Lt(a==null?void 0:a.data,g,n),I(this,ve,g),I(this,J,null)}catch(T){I(this,J,T)}d(this,J)&&(b=d(this,J),g=d(this,ve),f=Date.now(),y="error");const S=l.fetchStatus==="fetching",M=y==="pending",R=y==="error",P=M&&S,U=g!==void 0,D={status:y,fetchStatus:l.fetchStatus,isPending:M,isSuccess:y==="success",isError:R,isInitialLoading:P,isLoading:P,data:g,dataUpdatedAt:l.dataUpdatedAt,error:b,errorUpdatedAt:f,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>v.dataUpdateCount||l.errorUpdateCount>v.errorUpdateCount,isFetching:S,isRefetching:S&&!M,isLoadingError:R&&!U,isPaused:l.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:R&&U,isStale:Ct(t,n),refetch:this.refetch,promise:d(this,Z),isEnabled:K(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=te=>{D.status==="error"?te.reject(D.error):D.data!==void 0&&te.resolve(D.data)},ce=()=>{const te=I(this,Z,D.promise=kt());T(te)},Q=d(this,Z);switch(Q.status){case"pending":t.queryHash===r.queryHash&&T(Q);break;case"fulfilled":(D.status==="error"||D.data!==Q.value)&&ce();break;case"rejected":(D.status!=="error"||D.error!==Q.reason)&&ce();break}}return D}updateResult(){const t=d(this,k),n=this.createResult(d(this,C),this.options);if(I(this,ne,d(this,C).state),I(this,me,this.options),d(this,ne).data!==void 0&&I(this,ge,d(this,C)),it(n,t))return;I(this,k,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!d(this,ye).size)return!0;const u=new Set(a??d(this,ye));return this.options.throwOnError&&u.add("error"),Object.keys(d(this,k)).some(i=>{const h=i;return d(this,k)[h]!==t[h]&&u.has(h)})};A(this,E,an).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&A(this,E,pt).call(this)}},F=new WeakMap,C=new WeakMap,_e=new WeakMap,k=new WeakMap,ne=new WeakMap,me=new WeakMap,Z=new WeakMap,J=new WeakMap,Ie=new WeakMap,ve=new WeakMap,ge=new WeakMap,re=new WeakMap,oe=new WeakMap,ee=new WeakMap,ye=new WeakMap,E=new WeakSet,Ce=function(t){A(this,E,gt).call(this);let n=d(this,C).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ct)),n},dt=function(){A(this,E,mt).call(this);const t=Me(this.options.staleTime,d(this,C));if(ut||d(this,k).isStale||!jt(t))return;const r=Pr(d(this,k).dataUpdatedAt,t)+1;I(this,re,setTimeout(()=>{d(this,k).isStale||this.updateResult()},r))},ft=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(d(this,C)):this.options.refetchInterval)??!1},ht=function(t){A(this,E,vt).call(this),I(this,ee,t),!(ut||K(this.options.enabled,d(this,C))===!1||!jt(d(this,ee))||d(this,ee)===0)&&I(this,oe,setInterval(()=>{(this.options.refetchIntervalInBackground||Ar.isFocused())&&A(this,E,Ce).call(this)},d(this,ee)))},pt=function(){A(this,E,dt).call(this),A(this,E,ht).call(this,A(this,E,ft).call(this))},mt=function(){d(this,re)&&(clearTimeout(d(this,re)),I(this,re,void 0))},vt=function(){d(this,oe)&&(clearInterval(d(this,oe)),I(this,oe,void 0))},gt=function(){const t=d(this,F).getQueryCache().build(d(this,F),this.options);if(t===d(this,C))return;const n=d(this,C);I(this,C,t),I(this,_e,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},an=function(t){tn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(d(this,k))}),d(this,F).getQueryCache().notify({query:d(this,C),type:"observerResultsUpdated"})})},en);function co(e,t){return K(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ut(e,t){return co(e,t)||e.state.data!==void 0&&yt(e,t,t.refetchOnMount)}function yt(e,t,n){if(K(t.enabled,e)!==!1&&Me(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ct(e,t)}return!1}function $t(e,t,n,r){return(e!==t||K(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ct(e,n)}function Ct(e,t){return K(t.enabled,e)!==!1&&e.isStaleByTime(Me(t.staleTime,e))}function uo(e,t){return!it(e.getCurrentResult(),t)}var sn=s.createContext(!1),lo=()=>s.useContext(sn);sn.Provider;function fo(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ho=s.createContext(fo()),po=()=>s.useContext(ho),mo=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vo=e=>{s.useEffect(()=>{e.clearReset()},[e])},go=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Tr(n,[e.error,r])),yo=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},wo=(e,t)=>e.isLoading&&e.isFetching&&!t,bo=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function xo(e,t,n){var l,p,g,b,f;const r=lo(),o=po(),a=Or(),u=a.defaultQueryOptions(e);(p=(l=a.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||p.call(l,u),u._optimisticResults=r?"isRestoring":"optimistic",yo(u),mo(u,o),vo(o);const i=!a.getQueryCache().get(u.queryHash),[h]=s.useState(()=>new t(a,u)),v=h.getOptimisticResult(u),m=!r&&e.subscribed!==!1;if(s.useSyncExternalStore(s.useCallback(y=>{const x=m?h.subscribe(tn.batchCalls(y)):ct;return h.updateResult(),x},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),s.useEffect(()=>{h.setOptions(u)},[u,h]),bo(u,v))throw Bt(u,h,o);if(go({result:v,errorResetBoundary:o,throwOnError:u.throwOnError,query:a.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw v.error;if((b=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,u,v),u.experimental_prefetchInRender&&!ut&&wo(v,r)){const y=i?Bt(u,h,o):(f=a.getQueryCache().get(u.queryHash))==null?void 0:f.promise;y==null||y.catch(ct).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?v:h.trackResult(v)}function Js(e,t){return xo(e,io)}var Ze=0;function Co(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Kt()),document.body.insertAdjacentElement("beforeend",e[1]??Kt()),Ze++,()=>{Ze===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ze--}},[])}function Kt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Je="focusScope.autoFocusOnMount",et="focusScope.autoFocusOnUnmount",Gt={bubbles:!1,cancelable:!0},So="FocusScope",cn=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...u}=e,[i,h]=s.useState(null),v=Ee(o),m=Ee(a),l=s.useRef(null),p=be(t,f=>h(f)),g=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let f=function(M){if(g.paused||!i)return;const R=M.target;i.contains(R)?l.current=R:q(l.current,{select:!0})},y=function(M){if(g.paused||!i)return;const R=M.relatedTarget;R!==null&&(i.contains(R)||q(l.current,{select:!0}))},x=function(M){if(document.activeElement===document.body)for(const P of M)P.removedNodes.length>0&&q(i)};document.addEventListener("focusin",f),document.addEventListener("focusout",y);const S=new MutationObserver(x);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",y),S.disconnect()}}},[r,i,g.paused]),s.useEffect(()=>{if(i){Qt.add(g);const f=document.activeElement;if(!i.contains(f)){const x=new CustomEvent(Je,Gt);i.addEventListener(Je,v),i.dispatchEvent(x),x.defaultPrevented||(Mo(Io(un(i)),{select:!0}),document.activeElement===f&&q(i))}return()=>{i.removeEventListener(Je,v),setTimeout(()=>{const x=new CustomEvent(et,Gt);i.addEventListener(et,m),i.dispatchEvent(x),x.defaultPrevented||q(f??document.body,{select:!0}),i.removeEventListener(et,m),Qt.remove(g)},0)}}},[i,v,m,g]);const b=s.useCallback(f=>{if(!n&&!r||g.paused)return;const y=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,x=document.activeElement;if(y&&x){const S=f.currentTarget,[M,R]=Eo(S);M&&R?!f.shiftKey&&x===R?(f.preventDefault(),n&&q(M,{select:!0})):f.shiftKey&&x===M&&(f.preventDefault(),n&&q(R,{select:!0})):x===S&&f.preventDefault()}},[n,r,g.paused]);return c.jsx(H.div,{tabIndex:-1,...u,ref:p,onKeyDown:b})});cn.displayName=So;function Mo(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(q(r,{select:t}),document.activeElement!==n)return}function Eo(e){const t=un(e),n=zt(t,e),r=zt(t.reverse(),e);return[n,r]}function un(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zt(e,t){for(const n of e)if(!Ro(n,{upTo:t}))return n}function Ro(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function No(e){return e instanceof HTMLInputElement&&"select"in e}function q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&No(e)&&t&&e.select()}}var Qt=_o();function _o(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Wt(e,t),e.unshift(t)},remove(t){var n;e=Wt(e,t),(n=e[0])==null||n.resume()}}}function Wt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Io(e){return e.filter(t=>t.tagName!=="A")}var Po=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},de=new WeakMap,De=new WeakMap,Te={},tt=0,ln=function(e){return e&&(e.host||ln(e.parentNode))},Ao=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ln(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Do=function(e,t,n,r){var o=Ao(t,Array.isArray(e)?e:[e]);Te[n]||(Te[n]=new WeakMap);var a=Te[n],u=[],i=new Set,h=new Set(o),v=function(l){!l||i.has(l)||(i.add(l),v(l.parentNode))};o.forEach(v);var m=function(l){!l||h.has(l)||Array.prototype.forEach.call(l.children,function(p){if(i.has(p))m(p);else try{var g=p.getAttribute(r),b=g!==null&&g!=="false",f=(de.get(p)||0)+1,y=(a.get(p)||0)+1;de.set(p,f),a.set(p,y),u.push(p),f===1&&b&&De.set(p,!0),y===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return m(t),i.clear(),tt++,function(){u.forEach(function(l){var p=de.get(l)-1,g=a.get(l)-1;de.set(l,p),a.set(l,g),p||(De.has(l)||l.removeAttribute(r),De.delete(l)),g||l.removeAttribute(n)}),tt--,tt||(de=new WeakMap,de=new WeakMap,De=new WeakMap,Te={})}},To=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Po(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Do(r,o,n,"aria-hidden")):function(){return null}},V=function(){return V=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},V.apply(this,arguments)};function dn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Oo(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Le="right-scroll-bar-position",Fe="width-before-scroll-bar",ko="with-scroll-bars-hidden",jo="--removed-body-scroll-bar-size";function nt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Lo(e,t){var n=s.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Fo=typeof window<"u"?s.useLayoutEffect:s.useEffect,Vt=new WeakMap;function Uo(e,t){var n=Lo(null,function(r){return e.forEach(function(o){return nt(o,r)})});return Fo(function(){var r=Vt.get(n);if(r){var o=new Set(r),a=new Set(e),u=n.current;o.forEach(function(i){a.has(i)||nt(i,null)}),a.forEach(function(i){o.has(i)||nt(i,u)})}Vt.set(n,e)},[e]),n}function $o(e){return e}function Bo(e,t){t===void 0&&(t=$o);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var u=t(a,r);return n.push(u),function(){n=n.filter(function(i){return i!==u})}},assignSyncMedium:function(a){for(r=!0;n.length;){var u=n;n=[],u.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var u=[];if(n.length){var i=n;n=[],i.forEach(a),u=n}var h=function(){var m=u;u=[],m.forEach(a)},v=function(){return Promise.resolve().then(h)};v(),n={push:function(m){u.push(m),v()},filter:function(m){return u=u.filter(m),n}}}};return o}function Ko(e){e===void 0&&(e={});var t=Bo(null);return t.options=V({async:!0,ssr:!1},e),t}var fn=function(e){var t=e.sideCar,n=dn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,V({},n))};fn.isSideCarExport=!0;function Go(e,t){return e.useMedium(t),fn}var hn=Ko(),rt=function(){},Ge=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:rt,onWheelCapture:rt,onTouchMoveCapture:rt}),o=r[0],a=r[1],u=e.forwardProps,i=e.children,h=e.className,v=e.removeScrollBar,m=e.enabled,l=e.shards,p=e.sideCar,g=e.noRelative,b=e.noIsolation,f=e.inert,y=e.allowPinchZoom,x=e.as,S=x===void 0?"div":x,M=e.gapMode,R=dn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=p,U=Uo([n,t]),L=V(V({},R),o);return s.createElement(s.Fragment,null,m&&s.createElement(P,{sideCar:hn,removeScrollBar:v,shards:l,noRelative:g,noIsolation:b,inert:f,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:M}),u?s.cloneElement(s.Children.only(i),V(V({},L),{ref:U})):s.createElement(S,V({},L,{className:h,ref:U}),i))});Ge.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ge.classNames={fullWidth:Fe,zeroRight:Le};var zo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=zo();return t&&e.setAttribute("nonce",t),e}function Wo(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ho=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qo())&&(Wo(t,n),Vo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Yo=function(){var e=Ho();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},pn=function(){var e=Yo(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Xo={left:0,top:0,right:0,gap:0},ot=function(e){return parseInt(e||"",10)||0},qo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ot(n),ot(r),ot(o)]},Zo=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Xo;var t=qo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Jo=pn(),pe="data-scroll-locked",ea=function(e,t,n,r){var o=e.left,a=e.top,u=e.right,i=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(ko,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(i,"px ").concat(r,`;
  }
  body[`).concat(pe,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(o,`px;
    padding-top: `).concat(a,`px;
    padding-right: `).concat(u,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(i,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Le,` {
    right: `).concat(i,"px ").concat(r,`;
  }
  
  .`).concat(Fe,` {
    margin-right: `).concat(i,"px ").concat(r,`;
  }
  
  .`).concat(Le," .").concat(Le,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(Fe," .").concat(Fe,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(pe,`] {
    `).concat(jo,": ").concat(i,`px;
  }
`)},Ht=function(){var e=parseInt(document.body.getAttribute(pe)||"0",10);return isFinite(e)?e:0},ta=function(){s.useEffect(function(){return document.body.setAttribute(pe,(Ht()+1).toString()),function(){var e=Ht()-1;e<=0?document.body.removeAttribute(pe):document.body.setAttribute(pe,e.toString())}},[])},na=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ta();var a=s.useMemo(function(){return Zo(o)},[o]);return s.createElement(Jo,{styles:ea(a,!t,o,n?"":"!important")})},wt=!1;if(typeof window<"u")try{var Oe=Object.defineProperty({},"passive",{get:function(){return wt=!0,!0}});window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch{wt=!1}var fe=wt?{passive:!1}:!1,ra=function(e){return e.tagName==="TEXTAREA"},mn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ra(e)&&n[t]==="visible")},oa=function(e){return mn(e,"overflowY")},aa=function(e){return mn(e,"overflowX")},Yt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=vn(e,r);if(o){var a=gn(e,r),u=a[1],i=a[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sa=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ia=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vn=function(e,t){return e==="v"?oa(t):aa(t)},gn=function(e,t){return e==="v"?sa(t):ia(t)},ca=function(e,t){return e==="h"&&t==="rtl"?-1:1},ua=function(e,t,n,r,o){var a=ca(e,window.getComputedStyle(t).direction),u=a*r,i=n.target,h=t.contains(i),v=!1,m=u>0,l=0,p=0;do{if(!i)break;var g=gn(e,i),b=g[0],f=g[1],y=g[2],x=f-y-a*b;(b||x)&&vn(e,i)&&(l+=x,p+=b);var S=i.parentNode;i=S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE?S.host:S}while(!h&&i!==document.body||h&&(t.contains(i)||t===i));return(m&&(Math.abs(l)<1||!o)||!m&&(Math.abs(p)<1||!o))&&(v=!0),v},ke=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xt=function(e){return[e.deltaX,e.deltaY]},qt=function(e){return e&&"current"in e?e.current:e},la=function(e,t){return e[0]===t[0]&&e[1]===t[1]},da=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},fa=0,he=[];function ha(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(fa++)[0],a=s.useState(pn)[0],u=s.useRef(e);s.useEffect(function(){u.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Oo([e.lockRef.current],(e.shards||[]).map(qt),!0).filter(Boolean);return f.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=s.useCallback(function(f,y){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!u.current.allowPinchZoom;var x=ke(f),S=n.current,M="deltaX"in f?f.deltaX:S[0]-x[0],R="deltaY"in f?f.deltaY:S[1]-x[1],P,U=f.target,L=Math.abs(M)>Math.abs(R)?"h":"v";if("touches"in f&&L==="h"&&U.type==="range")return!1;var D=Yt(L,U);if(!D)return!0;if(D?P=L:(P=L==="v"?"h":"v",D=Yt(L,U)),!D)return!1;if(!r.current&&"changedTouches"in f&&(M||R)&&(r.current=P),!P)return!0;var z=r.current||P;return ua(z,y,f,z==="h"?M:R,!0)},[]),h=s.useCallback(function(f){var y=f;if(!(!he.length||he[he.length-1]!==a)){var x="deltaY"in y?Xt(y):ke(y),S=t.current.filter(function(P){return P.name===y.type&&(P.target===y.target||y.target===P.shadowParent)&&la(P.delta,x)})[0];if(S&&S.should){y.cancelable&&y.preventDefault();return}if(!S){var M=(u.current.shards||[]).map(qt).filter(Boolean).filter(function(P){return P.contains(y.target)}),R=M.length>0?i(y,M[0]):!u.current.noIsolation;R&&y.cancelable&&y.preventDefault()}}},[]),v=s.useCallback(function(f,y,x,S){var M={name:f,delta:y,target:x,should:S,shadowParent:pa(x)};t.current.push(M),setTimeout(function(){t.current=t.current.filter(function(R){return R!==M})},1)},[]),m=s.useCallback(function(f){n.current=ke(f),r.current=void 0},[]),l=s.useCallback(function(f){v(f.type,Xt(f),f.target,i(f,e.lockRef.current))},[]),p=s.useCallback(function(f){v(f.type,ke(f),f.target,i(f,e.lockRef.current))},[]);s.useEffect(function(){return he.push(a),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:p}),document.addEventListener("wheel",h,fe),document.addEventListener("touchmove",h,fe),document.addEventListener("touchstart",m,fe),function(){he=he.filter(function(f){return f!==a}),document.removeEventListener("wheel",h,fe),document.removeEventListener("touchmove",h,fe),document.removeEventListener("touchstart",m,fe)}},[]);var g=e.removeScrollBar,b=e.inert;return s.createElement(s.Fragment,null,b?s.createElement(a,{styles:da(o)}):null,g?s.createElement(na,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ma=Go(hn,ha);var yn=s.forwardRef(function(e,t){return s.createElement(Ge,V({},e,{ref:t,sideCar:ma}))});yn.classNames=Ge.classNames;var bt=["Enter"," "],va=["ArrowDown","PageUp","Home"],wn=["ArrowUp","PageDown","End"],ga=[...va,...wn],ya={ltr:[...bt,"ArrowRight"],rtl:[...bt,"ArrowLeft"]},wa={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pe="Menu",[Re,ba,xa]=kr(Pe),[se,bn]=xt(Pe,[xa,nn,on]),ze=nn(),xn=on(),[Ca,ie]=se(Pe),[Sa,Ae]=se(Pe),Cn=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:u=!0}=e,i=ze(t),[h,v]=s.useState(null),m=s.useRef(!1),l=Ee(a),p=Xr(o);return s.useEffect(()=>{const g=()=>{m.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>m.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),c.jsx(Br,{...i,children:c.jsx(Ca,{scope:t,open:n,onOpenChange:l,content:h,onContentChange:v,children:c.jsx(Sa,{scope:t,onClose:s.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:m,dir:p,modal:u,children:r})})})};Cn.displayName=Pe;var Ma="MenuAnchor",St=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ze(n);return c.jsx(jr,{...o,...r,ref:t})});St.displayName=Ma;var Mt="MenuPortal",[Ea,Sn]=se(Mt,{forceMount:void 0}),Mn=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=ie(Mt,t);return c.jsx(Ea,{scope:t,forceMount:n,children:c.jsx(Ke,{present:n||a.open,children:c.jsx(Kr,{asChild:!0,container:o,children:r})})})};Mn.displayName=Mt;var B="MenuContent",[Ra,Et]=se(B),En=s.forwardRef((e,t)=>{const n=Sn(B,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=ie(B,e.__scopeMenu),u=Ae(B,e.__scopeMenu);return c.jsx(Re.Provider,{scope:e.__scopeMenu,children:c.jsx(Ke,{present:r||a.open,children:c.jsx(Re.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(Na,{...o,ref:t}):c.jsx(_a,{...o,ref:t})})})})}),Na=s.forwardRef((e,t)=>{const n=ie(B,e.__scopeMenu),r=s.useRef(null),o=be(t,r);return s.useEffect(()=>{const a=r.current;if(a)return To(a)},[]),c.jsx(Rt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:_(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),_a=s.forwardRef((e,t)=>{const n=ie(B,e.__scopeMenu);return c.jsx(Rt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ia=Gr("MenuContent.ScrollLock"),Rt=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:h,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:l,onInteractOutside:p,onDismiss:g,disableOutsideScroll:b,...f}=e,y=ie(B,n),x=Ae(B,n),S=ze(n),M=xn(n),R=ba(n),[P,U]=s.useState(null),L=s.useRef(null),D=be(t,L,y.onContentChange),z=s.useRef(0),T=s.useRef(""),ce=s.useRef(0),Q=s.useRef(null),te=s.useRef("right"),Ve=s.useRef(0),Rr=b?yn:s.Fragment,Nr=b?{as:Ia,allowPinchZoom:!0}:void 0,_r=w=>{var le,Dt;const $=T.current+w,W=R().filter(Y=>!Y.disabled),X=document.activeElement,He=(le=W.find(Y=>Y.ref.current===X))==null?void 0:le.textValue,Ye=W.map(Y=>Y.textValue),At=Ba(Ye,$,He),xe=(Dt=W.find(Y=>Y.textValue===At))==null?void 0:Dt.ref.current;(function Y(Tt){T.current=Tt,window.clearTimeout(z.current),Tt!==""&&(z.current=window.setTimeout(()=>Y(""),1e3))})($),xe&&setTimeout(()=>xe.focus())};s.useEffect(()=>()=>window.clearTimeout(z.current),[]),Co();const ue=s.useCallback(w=>{var W,X;return te.current===((W=Q.current)==null?void 0:W.side)&&Ga(w,(X=Q.current)==null?void 0:X.area)},[]);return c.jsx(Ra,{scope:n,searchRef:T,onItemEnter:s.useCallback(w=>{ue(w)&&w.preventDefault()},[ue]),onItemLeave:s.useCallback(w=>{var $;ue(w)||(($=L.current)==null||$.focus(),U(null))},[ue]),onTriggerLeave:s.useCallback(w=>{ue(w)&&w.preventDefault()},[ue]),pointerGraceTimerRef:ce,onPointerGraceIntentChange:s.useCallback(w=>{Q.current=w},[]),children:c.jsx(Rr,{...Nr,children:c.jsx(cn,{asChild:!0,trapped:o,onMountAutoFocus:_(a,w=>{var $;w.preventDefault(),($=L.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(Lr,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:v,onPointerDownOutside:m,onFocusOutside:l,onInteractOutside:p,onDismiss:g,children:c.jsx(Hr,{asChild:!0,...M,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:U,onEntryFocus:_(h,w=>{x.isUsingKeyboardRef.current||w.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Fr,{role:"menu","aria-orientation":"vertical","data-state":Bn(y.open),"data-radix-menu-content":"",dir:x.dir,...S,...f,ref:D,style:{outline:"none",...f.style},onKeyDown:_(f.onKeyDown,w=>{const W=w.target.closest("[data-radix-menu-content]")===w.currentTarget,X=w.ctrlKey||w.altKey||w.metaKey,He=w.key.length===1;W&&(w.key==="Tab"&&w.preventDefault(),!X&&He&&_r(w.key));const Ye=L.current;if(w.target!==Ye||!ga.includes(w.key))return;w.preventDefault();const xe=R().filter(le=>!le.disabled).map(le=>le.ref.current);wn.includes(w.key)&&xe.reverse(),Ua(xe)}),onBlur:_(e.onBlur,w=>{w.currentTarget.contains(w.target)||(window.clearTimeout(z.current),T.current="")}),onPointerMove:_(e.onPointerMove,Ne(w=>{const $=w.target,W=Ve.current!==w.clientX;if(w.currentTarget.contains($)&&W){const X=w.clientX>Ve.current?"right":"left";te.current=X,Ve.current=w.clientX}}))})})})})})})});En.displayName=B;var Pa="MenuGroup",Nt=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(H.div,{role:"group",...r,ref:t})});Nt.displayName=Pa;var Aa="MenuLabel",Rn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(H.div,{...r,ref:t})});Rn.displayName=Aa;var $e="MenuItem",Zt="menu.itemSelect",Qe=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),u=Ae($e,e.__scopeMenu),i=Et($e,e.__scopeMenu),h=be(t,a),v=s.useRef(!1),m=()=>{const l=a.current;if(!n&&l){const p=new CustomEvent(Zt,{bubbles:!0,cancelable:!0});l.addEventListener(Zt,g=>r==null?void 0:r(g),{once:!0}),$r(l,p),p.defaultPrevented?v.current=!1:u.onClose()}};return c.jsx(Nn,{...o,ref:h,disabled:n,onClick:_(e.onClick,m),onPointerDown:l=>{var p;(p=e.onPointerDown)==null||p.call(e,l),v.current=!0},onPointerUp:_(e.onPointerUp,l=>{var p;v.current||(p=l.currentTarget)==null||p.click()}),onKeyDown:_(e.onKeyDown,l=>{const p=i.searchRef.current!=="";n||p&&l.key===" "||bt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Qe.displayName=$e;var Nn=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,u=Et($e,n),i=xn(n),h=s.useRef(null),v=be(t,h),[m,l]=s.useState(!1),[p,g]=s.useState("");return s.useEffect(()=>{const b=h.current;b&&g((b.textContent??"").trim())},[a.children]),c.jsx(Re.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:c.jsx(Yr,{asChild:!0,...i,focusable:!r,children:c.jsx(H.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:v,onPointerMove:_(e.onPointerMove,Ne(b=>{r?u.onItemLeave(b):(u.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:_(e.onPointerLeave,Ne(b=>u.onItemLeave(b))),onFocus:_(e.onFocus,()=>l(!0)),onBlur:_(e.onBlur,()=>l(!1))})})})}),Da="MenuCheckboxItem",_n=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Tn,{scope:e.__scopeMenu,checked:n,children:c.jsx(Qe,{role:"menuitemcheckbox","aria-checked":Be(n)?"mixed":n,...o,ref:t,"data-state":It(n),onSelect:_(o.onSelect,()=>r==null?void 0:r(Be(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_n.displayName=Da;var In="MenuRadioGroup",[Ta,Oa]=se(In,{value:void 0,onValueChange:()=>{}}),Pn=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ee(r);return c.jsx(Ta,{scope:e.__scopeMenu,value:n,onValueChange:a,children:c.jsx(Nt,{...o,ref:t})})});Pn.displayName=In;var An="MenuRadioItem",Dn=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=Oa(An,e.__scopeMenu),a=n===o.value;return c.jsx(Tn,{scope:e.__scopeMenu,checked:a,children:c.jsx(Qe,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":It(a),onSelect:_(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Dn.displayName=An;var _t="MenuItemIndicator",[Tn,ka]=se(_t,{checked:!1}),On=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=ka(_t,n);return c.jsx(Ke,{present:r||Be(a.checked)||a.checked===!0,children:c.jsx(H.span,{...o,ref:t,"data-state":It(a.checked)})})});On.displayName=_t;var ja="MenuSeparator",kn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});kn.displayName=ja;var La="MenuArrow",jn=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ze(n);return c.jsx(Ur,{...o,...r,ref:t})});jn.displayName=La;var Fa="MenuSub",[ei,Ln]=se(Fa),Se="MenuSubTrigger",Fn=s.forwardRef((e,t)=>{const n=ie(Se,e.__scopeMenu),r=Ae(Se,e.__scopeMenu),o=Ln(Se,e.__scopeMenu),a=Et(Se,e.__scopeMenu),u=s.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:h}=a,v={__scopeMenu:e.__scopeMenu},m=s.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return s.useEffect(()=>m,[m]),s.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),h(null)}},[i,h]),c.jsx(St,{asChild:!0,...v,children:c.jsx(Nn,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Bn(n.open),...e,ref:rn(t,o.onTriggerChange),onClick:l=>{var p;(p=e.onClick)==null||p.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:_(e.onPointerMove,Ne(l=>{a.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(a.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:_(e.onPointerLeave,Ne(l=>{var g,b;m();const p=(g=n.content)==null?void 0:g.getBoundingClientRect();if(p){const f=(b=n.content)==null?void 0:b.dataset.side,y=f==="right",x=y?-5:5,S=p[y?"left":"right"],M=p[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+x,y:l.clientY},{x:S,y:p.top},{x:M,y:p.top},{x:M,y:p.bottom},{x:S,y:p.bottom}],side:f}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(l),l.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:_(e.onKeyDown,l=>{var g;const p=a.searchRef.current!=="";e.disabled||p&&l.key===" "||ya[r.dir].includes(l.key)&&(n.onOpenChange(!0),(g=n.content)==null||g.focus(),l.preventDefault())})})})});Fn.displayName=Se;var Un="MenuSubContent",$n=s.forwardRef((e,t)=>{const n=Sn(B,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=ie(B,e.__scopeMenu),u=Ae(B,e.__scopeMenu),i=Ln(Un,e.__scopeMenu),h=s.useRef(null),v=be(t,h);return c.jsx(Re.Provider,{scope:e.__scopeMenu,children:c.jsx(Ke,{present:r||a.open,children:c.jsx(Re.Slot,{scope:e.__scopeMenu,children:c.jsx(Rt,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:v,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var l;u.isUsingKeyboardRef.current&&((l=h.current)==null||l.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:_(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:_(e.onEscapeKeyDown,m=>{u.onClose(),m.preventDefault()}),onKeyDown:_(e.onKeyDown,m=>{var g;const l=m.currentTarget.contains(m.target),p=wa[u.dir].includes(m.key);l&&p&&(a.onOpenChange(!1),(g=i.trigger)==null||g.focus(),m.preventDefault())})})})})})});$n.displayName=Un;function Bn(e){return e?"open":"closed"}function Be(e){return e==="indeterminate"}function It(e){return Be(e)?"indeterminate":e?"checked":"unchecked"}function Ua(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $a(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ba(e,t,n){const o=t.length>1&&Array.from(t).every(v=>v===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let u=$a(e,Math.max(a,0));o.length===1&&(u=u.filter(v=>v!==n));const h=u.find(v=>v.toLowerCase().startsWith(o.toLowerCase()));return h!==n?h:void 0}function Ka(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,u=t.length-1;a<t.length;u=a++){const i=t[a],h=t[u],v=i.x,m=i.y,l=h.x,p=h.y;m>r!=p>r&&n<(l-v)*(r-m)/(p-m)+v&&(o=!o)}return o}function Ga(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ka(n,t)}function Ne(e){return t=>t.pointerType==="mouse"?e(t):void 0}var za=Cn,Qa=St,Wa=Mn,Va=En,Ha=Nt,Ya=Rn,Xa=Qe,qa=_n,Za=Pn,Ja=Dn,es=On,ts=kn,ns=jn,rs=Fn,os=$n,We="DropdownMenu",[as,ti]=xt(We,[bn]),j=bn(),[ss,Kn]=as(We),Gn=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:u,modal:i=!0}=e,h=j(t),v=s.useRef(null),[m,l]=zr({prop:o,defaultProp:a??!1,onChange:u,caller:We});return c.jsx(ss,{scope:t,triggerId:Ft(),triggerRef:v,contentId:Ft(),open:m,onOpenChange:l,onOpenToggle:s.useCallback(()=>l(p=>!p),[l]),modal:i,children:c.jsx(za,{...h,open:m,onOpenChange:l,dir:r,modal:i,children:n})})};Gn.displayName=We;var zn="DropdownMenuTrigger",Qn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Kn(zn,n),u=j(n);return c.jsx(Qa,{asChild:!0,...u,children:c.jsx(H.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:rn(t,a.triggerRef),onPointerDown:_(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:_(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Qn.displayName=zn;var is="DropdownMenuPortal",Wn=e=>{const{__scopeDropdownMenu:t,...n}=e,r=j(t);return c.jsx(Wa,{...r,...n})};Wn.displayName=is;var Vn="DropdownMenuContent",Hn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Kn(Vn,n),a=j(n),u=s.useRef(!1);return c.jsx(Va,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:_(e.onCloseAutoFocus,i=>{var h;u.current||(h=o.triggerRef.current)==null||h.focus(),u.current=!1,i.preventDefault()}),onInteractOutside:_(e.onInteractOutside,i=>{const h=i.detail.originalEvent,v=h.button===0&&h.ctrlKey===!0,m=h.button===2||v;(!o.modal||m)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hn.displayName=Vn;var cs="DropdownMenuGroup",us=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(Ha,{...o,...r,ref:t})});us.displayName=cs;var ls="DropdownMenuLabel",Yn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(Ya,{...o,...r,ref:t})});Yn.displayName=ls;var ds="DropdownMenuItem",Xn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(Xa,{...o,...r,ref:t})});Xn.displayName=ds;var fs="DropdownMenuCheckboxItem",qn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(qa,{...o,...r,ref:t})});qn.displayName=fs;var hs="DropdownMenuRadioGroup",ps=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(Za,{...o,...r,ref:t})});ps.displayName=hs;var ms="DropdownMenuRadioItem",Zn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(Ja,{...o,...r,ref:t})});Zn.displayName=ms;var vs="DropdownMenuItemIndicator",Jn=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(es,{...o,...r,ref:t})});Jn.displayName=vs;var gs="DropdownMenuSeparator",er=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(ts,{...o,...r,ref:t})});er.displayName=gs;var ys="DropdownMenuArrow",ws=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(ns,{...o,...r,ref:t})});ws.displayName=ys;var bs="DropdownMenuSubTrigger",tr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(rs,{...o,...r,ref:t})});tr.displayName=bs;var xs="DropdownMenuSubContent",nr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=j(n);return c.jsx(os,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nr.displayName=xs;var Cs=Gn,Ss=Qn,Ms=Wn,rr=Hn,or=Yn,ar=Xn,sr=qn,ir=Zn,cr=Jn,ur=er,lr=tr,dr=nr;const Es=Cs,Rs=Ss,Ns=s.forwardRef(({className:e,inset:t,children:n,...r},o)=>c.jsxs(lr,{ref:o,className:G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,c.jsx(to,{className:"ml-auto h-4 w-4"})]}));Ns.displayName=lr.displayName;const _s=s.forwardRef(({className:e,...t},n)=>c.jsx(dr,{ref:n,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));_s.displayName=dr.displayName;const fr=s.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(Ms,{children:c.jsx(rr,{ref:r,sideOffset:t,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));fr.displayName=rr.displayName;const Ue=s.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(ar,{ref:r,className:G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Ue.displayName=ar.displayName;const Is=s.forwardRef(({className:e,children:t,checked:n,...r},o)=>c.jsxs(sr,{ref:o,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(cr,{children:c.jsx(eo,{className:"h-4 w-4"})})}),t]}));Is.displayName=sr.displayName;const Ps=s.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(ir,{ref:r,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(cr,{children:c.jsx(no,{className:"h-2 w-2 fill-current"})})}),t]}));Ps.displayName=ir.displayName;const As=s.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(or,{ref:r,className:G("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));As.displayName=or.displayName;const Ds=s.forwardRef(({className:e,...t},n)=>c.jsx(ur,{ref:n,className:G("-mx-1 my-1 h-px bg-muted",e),...t}));Ds.displayName=ur.displayName;var hr={exports:{}},pr={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var we=s;function Ts(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Os=typeof Object.is=="function"?Object.is:Ts,ks=we.useState,js=we.useEffect,Ls=we.useLayoutEffect,Fs=we.useDebugValue;function Us(e,t){var n=t(),r=ks({inst:{value:n,getSnapshot:t}}),o=r[0].inst,a=r[1];return Ls(function(){o.value=n,o.getSnapshot=t,at(o)&&a({inst:o})},[e,n,t]),js(function(){return at(o)&&a({inst:o}),e(function(){at(o)&&a({inst:o})})},[e]),Fs(n),n}function at(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Os(e,n)}catch{return!0}}function $s(e,t){return t()}var Bs=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$s:Us;pr.useSyncExternalStore=we.useSyncExternalStore!==void 0?we.useSyncExternalStore:Bs;hr.exports=pr;var Ks=hr.exports;function Gs(){return Ks.useSyncExternalStore(zs,()=>!0,()=>!1)}function zs(){return()=>{}}var Pt="Avatar",[Qs,ni]=xt(Pt),[Ws,mr]=Qs(Pt),vr=s.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=s.useState("idle");return c.jsx(Ws,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:c.jsx(H.span,{...r,ref:t})})});vr.displayName=Pt;var gr="AvatarImage",yr=s.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,u=mr(gr,n),i=Vs(r,a),h=Ee(v=>{o(v),u.onImageLoadingStatusChange(v)});return lt(()=>{i!=="idle"&&h(i)},[i,h]),i==="loaded"?c.jsx(H.img,{...a,ref:t,src:r}):null});yr.displayName=gr;var wr="AvatarFallback",br=s.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=mr(wr,n),[u,i]=s.useState(r===void 0);return s.useEffect(()=>{if(r!==void 0){const h=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(h)}},[r]),u&&a.imageLoadingStatus!=="loaded"?c.jsx(H.span,{...o,ref:t}):null});br.displayName=wr;function Jt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Vs(e,{referrerPolicy:t,crossOrigin:n}){const r=Gs(),o=s.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[u,i]=s.useState(()=>Jt(a,e));return lt(()=>{i(Jt(a,e))},[a,e]),lt(()=>{const h=l=>()=>{i(l)};if(!a)return;const v=h("loaded"),m=h("error");return a.addEventListener("load",v),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",v),a.removeEventListener("error",m)}},[a,n,t]),u}var xr=vr,Cr=yr,Sr=br;const Mr=s.forwardRef(({className:e,...t},n)=>c.jsx(xr,{ref:n,className:G("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Mr.displayName=xr.displayName;const Hs=s.forwardRef(({className:e,...t},n)=>c.jsx(Cr,{ref:n,className:G("aspect-square h-full w-full",e),...t}));Hs.displayName=Cr.displayName;const Er=s.forwardRef(({className:e,...t},n)=>c.jsx(Sr,{ref:n,className:G("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Er.displayName=Sr.displayName;function ri(){var u,i;const{user:e,isAuthenticated:t,logout:n}=Qr(),{theme:r,toggleTheme:o}=Wr(),a=Vr();return c.jsx(qr.header,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},className:"fixed top-0 left-0 right-0 z-50 w-full border-b border-white/10 bg-background/80 backdrop-blur-md",children:c.jsx("div",{className:"container max-w-6xl mx-auto px-4",children:c.jsxs("nav",{className:"h-16 flex items-center justify-between",children:[c.jsxs(je,{to:t?"/courses":"/",className:"flex items-center gap-2 group",children:[c.jsx("div",{className:"w-9 h-9 rounded-xl gradient-primary flex items-center justify-center shadow-glow",children:c.jsx(Zr,{className:"w-5 h-5 text-primary-foreground"})}),c.jsx("span",{className:"font-heading font-bold text-xl tracking-tight",children:"E-Maths"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[t&&c.jsxs("div",{className:"hidden sm:flex items-center gap-1 mr-2",children:[c.jsx(st,{to:"/courses",active:a.pathname.startsWith("/courses"),children:"Courses"}),((u=e==null?void 0:e.role)==null?void 0:u.toLowerCase())==="admin"?c.jsx(st,{to:"/admin",active:a.pathname.startsWith("/admin"),children:"Admin Dashboard"}):c.jsx(st,{to:"/dashboard",active:a.pathname==="/dashboard",children:"Dashboard"})]}),c.jsx(qe,{variant:"ghost",size:"icon",onClick:o,className:"rounded-xl",children:r==="dark"?c.jsx(so,{className:"w-4 h-4"}):c.jsx(ao,{className:"w-4 h-4"})}),t?c.jsxs(Es,{children:[c.jsx(Rs,{asChild:!0,children:c.jsx(qe,{variant:"ghost",size:"icon",className:"rounded-xl",children:c.jsx(Mr,{className:"w-8 h-8",children:c.jsx(Er,{className:"gradient-primary text-primary-foreground text-xs font-semibold",children:((i=e==null?void 0:e.name)==null?void 0:i.charAt(0))||"U"})})})}),c.jsxs(fr,{align:"end",className:"w-48",children:[c.jsxs(Ue,{className:"gap-2",children:[c.jsx(Jr,{className:"w-4 h-4"})," ",e==null?void 0:e.name]}),c.jsx(Ue,{asChild:!0,children:c.jsxs(je,{to:"/dashboard",className:"gap-2",children:[c.jsx(ro,{className:"w-4 h-4"})," Dashboard"]})}),c.jsxs(Ue,{onClick:n,className:"gap-2 text-destructive",children:[c.jsx(oo,{className:"w-4 h-4"})," Logout"]})]})]}):c.jsx(qe,{asChild:!0,size:"sm",className:"rounded-xl gradient-primary text-primary-foreground border-0",children:c.jsx(je,{to:"/login",children:"Sign In"})})]})]})})})}function st({to:e,active:t,children:n}){return c.jsx(je,{to:e,className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${t?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:n})}const oi={getCourses:async()=>N.fetch("/courses"),getCourse:async e=>N.fetch(`/courses/${e}`),getUserProgress:async e=>N.fetch(`/progress/${e}`),getAllCourseProgress:async()=>N.fetch("/progress/all"),getDashboardStats:async()=>N.fetch("/dashboard/stats"),toggleSectionComplete:async(e,t)=>N.post(`/sections/${e}/toggle-complete`,{isCompleted:t}),createCourse:async e=>N.post("/courses",{data:JSON.stringify(e)}),updateCourse:async(e,t)=>N.put(`/courses/${e}`,{data:JSON.stringify(t)}),patchCourse:async(e,t)=>N.patch(`/courses/${e}`,t),deleteCourse:async e=>N.delete(`/courses/${e}`),addChapter:async(e,t)=>N.post(`/courses/${e}/chapters`,{...t,course_id:e}),updateChapter:async(e,t)=>N.put(`/chapters/${e}`,t),deleteChapter:async e=>N.delete(`/chapters/${e}`),addSection:async(e,t,n)=>N.post(`/chapters/${e}/sections`,{...t,parentId:n}),updateSection:async(e,t)=>N.put(`/sections/${e}`,t),deleteSection:async e=>N.delete(`/sections/${e}`),getSectionFiles:async e=>N.fetch(`/sections/${e}/files`),uploadSectionFiles:async(e,t)=>N.fetch(`/sections/${e}/files`,{method:"POST",body:t,headers:{}}),reorderCourses:async e=>N.post("/reorder/courses",{courseIds:e}),reorderChapters:async e=>N.post("/reorder/chapters",{chapterIds:e}),reorderSections:async e=>N.post("/reorder/sections",{sectionIds:e}),getQuizzesByCourse:async e=>N.fetch(`/quizzes/course/${e}`),generateAiQuiz:async(e,t,n)=>N.post("/quizzes/generate-ai",{chapterId:e,questionCount:t,customInstructions:n}),saveQuiz:async e=>N.post("/quizzes",e),deleteQuiz:async e=>N.delete(`/quizzes/${e}`),submitQuizAttempt:async e=>N.post("/quizzes/submit",e),getQuizAttempts:async e=>N.fetch(`/quizzes/${e}/attempts`)};export{to as C,cn as F,ri as N,yn as R,oi as a,no as b,Co as c,eo as d,To as h,Js as u};
