import{r as s,j as n,R as K,u as an,$ as sn,a as cn,b as un,O as ln}from"./index-B3TsnAiv.js";import{c as ze,a as Ye,R as dn,u as A,W as fn,b as te,C as pn,d as w,S as mn,T as gn,D as xn,e as Ve,P as vn,O as hn,f as wn,g as S,h as We,i as Ce,j as De,k,l as He,m as je,n as Xe,o as Mn,A as Cn,p as fe,q as Dn,r as _n,s as bn,t as yn,v as Rn,F as jn,w as Sn,x as In,y as An,z as qe,B as Qe,E as ce,G as ie,H as Se,I as Ze,J as Je,L as En,K as Nn,M as Pn,N as Tn,Q as On,U as Fn,V as kn,X as Ln,Y as $n,Z as Gn,_ as Kn,$ as Un,a0 as Bn,a1 as zn,a2 as Yn}from"./sidebar-toggle-D8wRPeaZ.js";import{S as Vn}from"./index-C5pqq8p4.js";/**
 * @license lucide-react v0.479.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wn=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Hn=ze("ChevronUp",Wn);/**
 * @license lucide-react v0.479.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qn=ze("Plus",Xn),Ke=Symbol.for("constructDateFrom");function F(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ke in e?e[Ke](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ie(e,t){return F(e,e)}function et(e,t,o){const r=Ie(e);return isNaN(t)?F(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qn(e,t,o){const r=Ie(e);if(isNaN(t))return F(e,NaN);const a=r.getDate(),c=F(e,r.getTime());c.setMonth(r.getMonth()+t+1,0);const i=c.getDate();return a>=i?c:(r.setFullYear(c.getFullYear(),c.getMonth(),a),r)}function Zn(e,...t){const o=F.bind(null,t.find(r=>typeof r=="object"));return t.map(o)}function Ue(e,t){const o=Ie(e);return o.setHours(0,0,0,0),o}function Jn(e,t,o){return et(e,t*7)}function tt(e){return F(e,Date.now())}function nt(e,t,o){const[r,a]=Zn(o==null?void 0:o.in,e,t);return+Ue(r)==+Ue(a)}function eo(e,t){return nt(F(e,e),tt(e))}function to(e,t,o){return et(e,-1)}function no(e,t){return nt(F(e,e),to(tt(e)))}function oo(e,t,o){return Qn(e,-1)}function ro(e,t,o){return Jn(e,-1)}var ot="AlertDialog",[ao,wa]=te(ot,[Ye]),T=Ye(),rt=e=>{const{__scopeAlertDialog:t,...o}=e,r=T(t);return n.jsx(dn,{...r,...o,modal:!0})};rt.displayName=ot;var so="AlertDialogTrigger",co=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=T(o);return n.jsx(wn,{...a,...r,ref:t})});co.displayName=so;var io="AlertDialogPortal",at=e=>{const{__scopeAlertDialog:t,...o}=e,r=T(t);return n.jsx(vn,{...r,...o})};at.displayName=io;var uo="AlertDialogOverlay",st=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=T(o);return n.jsx(hn,{...a,...r,ref:t})});st.displayName=uo;var W="AlertDialogContent",[lo,fo]=ao(W),ct=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,children:r,...a}=e,c=T(o),i=s.useRef(null),p=A(t,i),f=s.useRef(null);return n.jsx(fn,{contentName:W,titleName:it,docsSlug:"alert-dialog",children:n.jsx(lo,{scope:o,cancelRef:f,children:n.jsxs(pn,{role:"alertdialog",...c,...a,ref:p,onOpenAutoFocus:w(a.onOpenAutoFocus,x=>{var g;x.preventDefault(),(g=f.current)==null||g.focus({preventScroll:!0})}),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault(),children:[n.jsx(mn,{children:r}),n.jsx(mo,{contentRef:i})]})})})});ct.displayName=W;var it="AlertDialogTitle",ut=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=T(o);return n.jsx(gn,{...a,...r,ref:t})});ut.displayName=it;var lt="AlertDialogDescription",dt=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=T(o);return n.jsx(xn,{...a,...r,ref:t})});dt.displayName=lt;var po="AlertDialogAction",ft=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,a=T(o);return n.jsx(Ve,{...a,...r,ref:t})});ft.displayName=po;var pt="AlertDialogCancel",mt=s.forwardRef((e,t)=>{const{__scopeAlertDialog:o,...r}=e,{cancelRef:a}=fo(pt,o),c=T(o),i=A(t,a);return n.jsx(Ve,{...c,...r,ref:i})});mt.displayName=pt;var mo=({contentRef:e})=>{const t=`\`${W}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${W}\` by passing a \`${lt}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${W}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},go=rt,xo=at,vo=st,ho=ct,wo=ft,Mo=mt,Co=ut,Do=dt;function _o({...e}){return n.jsx(go,{"data-slot":"alert-dialog",...e})}function bo({...e}){return n.jsx(xo,{"data-slot":"alert-dialog-portal",...e})}function yo({className:e,...t}){return n.jsx(vo,{"data-slot":"alert-dialog-overlay",className:S("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t})}function Ro({className:e,...t}){return n.jsxs(bo,{children:[n.jsx(yo,{}),n.jsx(ho,{"data-slot":"alert-dialog-content",className:S("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function jo({className:e,...t}){return n.jsx("div",{"data-slot":"alert-dialog-header",className:S("flex flex-col gap-2 text-center sm:text-left",e),...t})}function So({className:e,...t}){return n.jsx("div",{"data-slot":"alert-dialog-footer",className:S("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Io({className:e,...t}){return n.jsx(Co,{"data-slot":"alert-dialog-title",className:S("text-lg font-semibold",e),...t})}function Ao({className:e,...t}){return n.jsx(Do,{"data-slot":"alert-dialog-description",className:S("text-muted-foreground text-sm",e),...t})}function Eo({className:e,...t}){return n.jsx(wo,{className:S(We(),e),...t})}function No({className:e,...t}){return n.jsx(Mo,{className:S(We({variant:"outline"}),e),...t})}function gt(e){const t=e+"CollectionProvider",[o,r]=te(t),[a,c]=o(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:d,children:D}=m,C=K.useRef(null),h=K.useRef(new Map).current;return n.jsx(a,{scope:d,itemMap:h,collectionRef:C,children:D})};i.displayName=t;const p=e+"CollectionSlot",f=K.forwardRef((m,d)=>{const{scope:D,children:C}=m,h=c(p,D),M=A(d,h.collectionRef);return n.jsx(Ce,{ref:M,children:C})});f.displayName=p;const x=e+"CollectionItemSlot",g="data-radix-collection-item",u=K.forwardRef((m,d)=>{const{scope:D,children:C,...h}=m,M=K.useRef(null),j=A(d,M),E=c(x,D);return K.useEffect(()=>(E.itemMap.set(M,{ref:M,...h}),()=>void E.itemMap.delete(M))),n.jsx(Ce,{[g]:"",ref:j,children:C})});u.displayName=x;function l(m){const d=c(e+"CollectionConsumer",m);return K.useCallback(()=>{const C=d.collectionRef.current;if(!C)return[];const h=Array.from(C.querySelectorAll(`[${g}]`));return Array.from(d.itemMap.values()).sort((E,L)=>h.indexOf(E.ref.current)-h.indexOf(L.ref.current))},[d.collectionRef,d.itemMap])}return[{Provider:i,Slot:f,ItemSlot:u},l,r]}var Po=s.createContext(void 0);function xt(e){const t=s.useContext(Po);return e||t||"ltr"}var we="rovingFocusGroup.onEntryFocus",To={bubbles:!1,cancelable:!0},pe="RovingFocusGroup",[_e,vt,Oo]=gt(pe),[Fo,ht]=te(pe,[Oo]),[ko,Lo]=Fo(pe),wt=s.forwardRef((e,t)=>n.jsx(_e.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(_e.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx($o,{...e,ref:t})})}));wt.displayName=pe;var $o=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:c,currentTabStopId:i,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:f,onEntryFocus:x,preventScrollOnEntryFocus:g=!1,...u}=e,l=s.useRef(null),m=A(t,l),d=xt(c),[D=null,C]=He({prop:i,defaultProp:p,onChange:f}),[h,M]=s.useState(!1),j=je(x),E=vt(o),L=s.useRef(!1),[re,$]=s.useState(0);return s.useEffect(()=>{const _=l.current;if(_)return _.addEventListener(we,j),()=>_.removeEventListener(we,j)},[j]),n.jsx(ko,{scope:o,orientation:r,dir:d,loop:a,currentTabStopId:D,onItemFocus:s.useCallback(_=>C(_),[C]),onItemShiftTab:s.useCallback(()=>M(!0),[]),onFocusableItemAdd:s.useCallback(()=>$(_=>_+1),[]),onFocusableItemRemove:s.useCallback(()=>$(_=>_-1),[]),children:n.jsx(k.div,{tabIndex:h||re===0?-1:0,"data-orientation":r,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:w(e.onMouseDown,()=>{L.current=!0}),onFocus:w(e.onFocus,_=>{const z=!L.current;if(_.target===_.currentTarget&&z&&!h){const G=new CustomEvent(we,To);if(_.currentTarget.dispatchEvent(G),!G.defaultPrevented){const H=E().filter(N=>N.focusable),X=H.find(N=>N.active),ae=H.find(N=>N.id===D),xe=[X,ae,...H].filter(Boolean).map(N=>N.ref.current);Dt(xe,g)}}L.current=!1}),onBlur:w(e.onBlur,()=>M(!1))})})}),Mt="RovingFocusGroupItem",Ct=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:c,...i}=e,p=De(),f=c||p,x=Lo(Mt,o),g=x.currentTabStopId===f,u=vt(o),{onFocusableItemAdd:l,onFocusableItemRemove:m}=x;return s.useEffect(()=>{if(r)return l(),()=>m()},[r,l,m]),n.jsx(_e.ItemSlot,{scope:o,id:f,focusable:r,active:a,children:n.jsx(k.span,{tabIndex:g?0:-1,"data-orientation":x.orientation,...i,ref:t,onMouseDown:w(e.onMouseDown,d=>{r?x.onItemFocus(f):d.preventDefault()}),onFocus:w(e.onFocus,()=>x.onItemFocus(f)),onKeyDown:w(e.onKeyDown,d=>{if(d.key==="Tab"&&d.shiftKey){x.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const D=Uo(d,x.orientation,x.dir);if(D!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||d.shiftKey)return;d.preventDefault();let h=u().filter(M=>M.focusable).map(M=>M.ref.current);if(D==="last")h.reverse();else if(D==="prev"||D==="next"){D==="prev"&&h.reverse();const M=h.indexOf(d.currentTarget);h=x.loop?Bo(h,M+1):h.slice(M+1)}setTimeout(()=>Dt(h))}})})})});Ct.displayName=Mt;var Go={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ko(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Uo(e,t,o){const r=Ko(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Go[r]}function Dt(e,t=!1){const o=document.activeElement;for(const r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function Bo(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var zo=wt,Yo=Ct,be=["Enter"," "],Vo=["ArrowDown","PageUp","Home"],_t=["ArrowUp","PageDown","End"],Wo=[...Vo,..._t],Ho={ltr:[...be,"ArrowRight"],rtl:[...be,"ArrowLeft"]},Xo={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ne="Menu",[J,qo,Qo]=gt(ne),[U,bt]=te(ne,[Qo,Xe,ht]),me=Xe(),yt=ht(),[Zo,B]=U(ne),[Jo,oe]=U(ne),Rt=e=>{const{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:c,modal:i=!0}=e,p=me(t),[f,x]=s.useState(null),g=s.useRef(!1),u=je(c),l=xt(a);return s.useEffect(()=>{const m=()=>{g.current=!0,document.addEventListener("pointerdown",d,{capture:!0,once:!0}),document.addEventListener("pointermove",d,{capture:!0,once:!0})},d=()=>g.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",d,{capture:!0}),document.removeEventListener("pointermove",d,{capture:!0})}},[]),n.jsx(Mn,{...p,children:n.jsx(Zo,{scope:t,open:o,onOpenChange:u,content:f,onContentChange:x,children:n.jsx(Jo,{scope:t,onClose:s.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:g,dir:l,modal:i,children:r})})})};Rt.displayName=ne;var er="MenuAnchor",Ae=s.forwardRef((e,t)=>{const{__scopeMenu:o,...r}=e,a=me(o);return n.jsx(Cn,{...a,...r,ref:t})});Ae.displayName=er;var Ee="MenuPortal",[tr,jt]=U(Ee,{forceMount:void 0}),St=e=>{const{__scopeMenu:t,forceMount:o,children:r,container:a}=e,c=B(Ee,t);return n.jsx(tr,{scope:t,forceMount:o,children:n.jsx(fe,{present:o||c.open,children:n.jsx(Dn,{asChild:!0,container:a,children:r})})})};St.displayName=Ee;var R="MenuContent",[nr,Ne]=U(R),It=s.forwardRef((e,t)=>{const o=jt(R,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,c=B(R,e.__scopeMenu),i=oe(R,e.__scopeMenu);return n.jsx(J.Provider,{scope:e.__scopeMenu,children:n.jsx(fe,{present:r||c.open,children:n.jsx(J.Slot,{scope:e.__scopeMenu,children:i.modal?n.jsx(or,{...a,ref:t}):n.jsx(rr,{...a,ref:t})})})})}),or=s.forwardRef((e,t)=>{const o=B(R,e.__scopeMenu),r=s.useRef(null),a=A(t,r);return s.useEffect(()=>{const c=r.current;if(c)return _n(c)},[]),n.jsx(Pe,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:w(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),rr=s.forwardRef((e,t)=>{const o=B(R,e.__scopeMenu);return n.jsx(Pe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),Pe=s.forwardRef((e,t)=>{const{__scopeMenu:o,loop:r=!1,trapFocus:a,onOpenAutoFocus:c,onCloseAutoFocus:i,disableOutsidePointerEvents:p,onEntryFocus:f,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:u,onInteractOutside:l,onDismiss:m,disableOutsideScroll:d,...D}=e,C=B(R,o),h=oe(R,o),M=me(o),j=yt(o),E=qo(o),[L,re]=s.useState(null),$=s.useRef(null),_=A(t,$,C.onContentChange),z=s.useRef(0),G=s.useRef(""),H=s.useRef(0),X=s.useRef(null),ae=s.useRef("right"),se=s.useRef(0),xe=d?Rn:s.Fragment,N=d?{as:Ce,allowPinchZoom:!0}:void 0,rn=v=>{var V,$e;const y=G.current+v,I=E().filter(P=>!P.disabled),O=document.activeElement,ve=(V=I.find(P=>P.ref.current===O))==null?void 0:V.textValue,he=I.map(P=>P.textValue),Le=xr(he,y,ve),q=($e=I.find(P=>P.textValue===Le))==null?void 0:$e.ref.current;(function P(Ge){G.current=Ge,window.clearTimeout(z.current),Ge!==""&&(z.current=window.setTimeout(()=>P(""),1e3))})(y),q&&setTimeout(()=>q.focus())};s.useEffect(()=>()=>window.clearTimeout(z.current),[]),yn();const Y=s.useCallback(v=>{var I,O;return ae.current===((I=X.current)==null?void 0:I.side)&&hr(v,(O=X.current)==null?void 0:O.area)},[]);return n.jsx(nr,{scope:o,searchRef:G,onItemEnter:s.useCallback(v=>{Y(v)&&v.preventDefault()},[Y]),onItemLeave:s.useCallback(v=>{var y;Y(v)||((y=$.current)==null||y.focus(),re(null))},[Y]),onTriggerLeave:s.useCallback(v=>{Y(v)&&v.preventDefault()},[Y]),pointerGraceTimerRef:H,onPointerGraceIntentChange:s.useCallback(v=>{X.current=v},[]),children:n.jsx(xe,{...N,children:n.jsx(jn,{asChild:!0,trapped:a,onMountAutoFocus:w(c,v=>{var y;v.preventDefault(),(y=$.current)==null||y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:n.jsx(Sn,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:x,onPointerDownOutside:g,onFocusOutside:u,onInteractOutside:l,onDismiss:m,children:n.jsx(zo,{asChild:!0,...j,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:L,onCurrentTabStopIdChange:re,onEntryFocus:w(f,v=>{h.isUsingKeyboardRef.current||v.preventDefault()}),preventScrollOnEntryFocus:!0,children:n.jsx(In,{role:"menu","aria-orientation":"vertical","data-state":Yt(C.open),"data-radix-menu-content":"",dir:h.dir,...M,...D,ref:_,style:{outline:"none",...D.style},onKeyDown:w(D.onKeyDown,v=>{const I=v.target.closest("[data-radix-menu-content]")===v.currentTarget,O=v.ctrlKey||v.altKey||v.metaKey,ve=v.key.length===1;I&&(v.key==="Tab"&&v.preventDefault(),!O&&ve&&rn(v.key));const he=$.current;if(v.target!==he||!Wo.includes(v.key))return;v.preventDefault();const q=E().filter(V=>!V.disabled).map(V=>V.ref.current);_t.includes(v.key)&&q.reverse(),mr(q)}),onBlur:w(e.onBlur,v=>{v.currentTarget.contains(v.target)||(window.clearTimeout(z.current),G.current="")}),onPointerMove:w(e.onPointerMove,ee(v=>{const y=v.target,I=se.current!==v.clientX;if(v.currentTarget.contains(y)&&I){const O=v.clientX>se.current?"right":"left";ae.current=O,se.current=v.clientX}}))})})})})})})});It.displayName=R;var ar="MenuGroup",Te=s.forwardRef((e,t)=>{const{__scopeMenu:o,...r}=e;return n.jsx(k.div,{role:"group",...r,ref:t})});Te.displayName=ar;var sr="MenuLabel",At=s.forwardRef((e,t)=>{const{__scopeMenu:o,...r}=e;return n.jsx(k.div,{...r,ref:t})});At.displayName=sr;var le="MenuItem",Be="menu.itemSelect",ge=s.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:r,...a}=e,c=s.useRef(null),i=oe(le,e.__scopeMenu),p=Ne(le,e.__scopeMenu),f=A(t,c),x=s.useRef(!1),g=()=>{const u=c.current;if(!o&&u){const l=new CustomEvent(Be,{bubbles:!0,cancelable:!0});u.addEventListener(Be,m=>r==null?void 0:r(m),{once:!0}),bn(u,l),l.defaultPrevented?x.current=!1:i.onClose()}};return n.jsx(Et,{...a,ref:f,disabled:o,onClick:w(e.onClick,g),onPointerDown:u=>{var l;(l=e.onPointerDown)==null||l.call(e,u),x.current=!0},onPointerUp:w(e.onPointerUp,u=>{var l;x.current||(l=u.currentTarget)==null||l.click()}),onKeyDown:w(e.onKeyDown,u=>{const l=p.searchRef.current!=="";o||l&&u.key===" "||be.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});ge.displayName=le;var Et=s.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:r=!1,textValue:a,...c}=e,i=Ne(le,o),p=yt(o),f=s.useRef(null),x=A(t,f),[g,u]=s.useState(!1),[l,m]=s.useState("");return s.useEffect(()=>{const d=f.current;d&&m((d.textContent??"").trim())},[c.children]),n.jsx(J.ItemSlot,{scope:o,disabled:r,textValue:a??l,children:n.jsx(Yo,{asChild:!0,...p,focusable:!r,children:n.jsx(k.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...c,ref:x,onPointerMove:w(e.onPointerMove,ee(d=>{r?i.onItemLeave(d):(i.onItemEnter(d),d.defaultPrevented||d.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:w(e.onPointerLeave,ee(d=>i.onItemLeave(d))),onFocus:w(e.onFocus,()=>u(!0)),onBlur:w(e.onBlur,()=>u(!1))})})})}),cr="MenuCheckboxItem",Nt=s.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:r,...a}=e;return n.jsx(kt,{scope:e.__scopeMenu,checked:o,children:n.jsx(ge,{role:"menuitemcheckbox","aria-checked":de(o)?"mixed":o,...a,ref:t,"data-state":Fe(o),onSelect:w(a.onSelect,()=>r==null?void 0:r(de(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Nt.displayName=cr;var Pt="MenuRadioGroup",[ir,ur]=U(Pt,{value:void 0,onValueChange:()=>{}}),Tt=s.forwardRef((e,t)=>{const{value:o,onValueChange:r,...a}=e,c=je(r);return n.jsx(ir,{scope:e.__scopeMenu,value:o,onValueChange:c,children:n.jsx(Te,{...a,ref:t})})});Tt.displayName=Pt;var Ot="MenuRadioItem",Ft=s.forwardRef((e,t)=>{const{value:o,...r}=e,a=ur(Ot,e.__scopeMenu),c=o===a.value;return n.jsx(kt,{scope:e.__scopeMenu,checked:c,children:n.jsx(ge,{role:"menuitemradio","aria-checked":c,...r,ref:t,"data-state":Fe(c),onSelect:w(r.onSelect,()=>{var i;return(i=a.onValueChange)==null?void 0:i.call(a,o)},{checkForDefaultPrevented:!1})})})});Ft.displayName=Ot;var Oe="MenuItemIndicator",[kt,lr]=U(Oe,{checked:!1}),Lt=s.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:r,...a}=e,c=lr(Oe,o);return n.jsx(fe,{present:r||de(c.checked)||c.checked===!0,children:n.jsx(k.span,{...a,ref:t,"data-state":Fe(c.checked)})})});Lt.displayName=Oe;var dr="MenuSeparator",$t=s.forwardRef((e,t)=>{const{__scopeMenu:o,...r}=e;return n.jsx(k.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});$t.displayName=dr;var fr="MenuArrow",Gt=s.forwardRef((e,t)=>{const{__scopeMenu:o,...r}=e,a=me(o);return n.jsx(An,{...a,...r,ref:t})});Gt.displayName=fr;var pr="MenuSub",[Ma,Kt]=U(pr),Z="MenuSubTrigger",Ut=s.forwardRef((e,t)=>{const o=B(Z,e.__scopeMenu),r=oe(Z,e.__scopeMenu),a=Kt(Z,e.__scopeMenu),c=Ne(Z,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:f}=c,x={__scopeMenu:e.__scopeMenu},g=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>g,[g]),s.useEffect(()=>{const u=p.current;return()=>{window.clearTimeout(u),f(null)}},[p,f]),n.jsx(Ae,{asChild:!0,...x,children:n.jsx(Et,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":Yt(o.open),...e,ref:qe(t,a.onTriggerChange),onClick:u=>{var l;(l=e.onClick)==null||l.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:w(e.onPointerMove,ee(u=>{c.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(c.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),g()},100))})),onPointerLeave:w(e.onPointerLeave,ee(u=>{var m,d;g();const l=(m=o.content)==null?void 0:m.getBoundingClientRect();if(l){const D=(d=o.content)==null?void 0:d.dataset.side,C=D==="right",h=C?-5:5,M=l[C?"left":"right"],j=l[C?"right":"left"];c.onPointerGraceIntentChange({area:[{x:u.clientX+h,y:u.clientY},{x:M,y:l.top},{x:j,y:l.top},{x:j,y:l.bottom},{x:M,y:l.bottom}],side:D}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(u),u.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:w(e.onKeyDown,u=>{var m;const l=c.searchRef.current!=="";e.disabled||l&&u.key===" "||Ho[r.dir].includes(u.key)&&(o.onOpenChange(!0),(m=o.content)==null||m.focus(),u.preventDefault())})})})});Ut.displayName=Z;var Bt="MenuSubContent",zt=s.forwardRef((e,t)=>{const o=jt(R,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,c=B(R,e.__scopeMenu),i=oe(R,e.__scopeMenu),p=Kt(Bt,e.__scopeMenu),f=s.useRef(null),x=A(t,f);return n.jsx(J.Provider,{scope:e.__scopeMenu,children:n.jsx(fe,{present:r||c.open,children:n.jsx(J.Slot,{scope:e.__scopeMenu,children:n.jsx(Pe,{id:p.contentId,"aria-labelledby":p.triggerId,...a,ref:x,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var u;i.isUsingKeyboardRef.current&&((u=f.current)==null||u.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:w(e.onFocusOutside,g=>{g.target!==p.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:w(e.onEscapeKeyDown,g=>{i.onClose(),g.preventDefault()}),onKeyDown:w(e.onKeyDown,g=>{var m;const u=g.currentTarget.contains(g.target),l=Xo[i.dir].includes(g.key);u&&l&&(c.onOpenChange(!1),(m=p.trigger)==null||m.focus(),g.preventDefault())})})})})})});zt.displayName=Bt;function Yt(e){return e?"open":"closed"}function de(e){return e==="indeterminate"}function Fe(e){return de(e)?"indeterminate":e?"checked":"unchecked"}function mr(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function gr(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function xr(e,t,o){const a=t.length>1&&Array.from(t).every(x=>x===t[0])?t[0]:t,c=o?e.indexOf(o):-1;let i=gr(e,Math.max(c,0));a.length===1&&(i=i.filter(x=>x!==o));const f=i.find(x=>x.toLowerCase().startsWith(a.toLowerCase()));return f!==o?f:void 0}function vr(e,t){const{x:o,y:r}=e;let a=!1;for(let c=0,i=t.length-1;c<t.length;i=c++){const p=t[c].x,f=t[c].y,x=t[i].x,g=t[i].y;f>r!=g>r&&o<(x-p)*(r-f)/(g-f)+p&&(a=!a)}return a}function hr(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return vr(o,t)}function ee(e){return t=>t.pointerType==="mouse"?e(t):void 0}var wr=Rt,Mr=Ae,Cr=St,Dr=It,_r=Te,br=At,yr=ge,Rr=Nt,jr=Tt,Sr=Ft,Ir=Lt,Ar=$t,Er=Gt,Nr=Ut,Pr=zt,ke="DropdownMenu",[Tr,Ca]=te(ke,[bt]),b=bt(),[Or,Vt]=Tr(ke),Wt=e=>{const{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:c,onOpenChange:i,modal:p=!0}=e,f=b(t),x=s.useRef(null),[g=!1,u]=He({prop:a,defaultProp:c,onChange:i});return n.jsx(Or,{scope:t,triggerId:De(),triggerRef:x,contentId:De(),open:g,onOpenChange:u,onOpenToggle:s.useCallback(()=>u(l=>!l),[u]),modal:p,children:n.jsx(wr,{...f,open:g,onOpenChange:u,dir:r,modal:p,children:o})})};Wt.displayName=ke;var Ht="DropdownMenuTrigger",Xt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,c=Vt(Ht,o),i=b(o);return n.jsx(Mr,{asChild:!0,...i,children:n.jsx(k.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:qe(t,c.triggerRef),onPointerDown:w(e.onPointerDown,p=>{!r&&p.button===0&&p.ctrlKey===!1&&(c.onOpenToggle(),c.open||p.preventDefault())}),onKeyDown:w(e.onKeyDown,p=>{r||(["Enter"," "].includes(p.key)&&c.onOpenToggle(),p.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})});Xt.displayName=Ht;var Fr="DropdownMenuPortal",qt=e=>{const{__scopeDropdownMenu:t,...o}=e,r=b(t);return n.jsx(Cr,{...r,...o})};qt.displayName=Fr;var Qt="DropdownMenuContent",Zt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=Vt(Qt,o),c=b(o),i=s.useRef(!1);return n.jsx(Dr,{id:a.contentId,"aria-labelledby":a.triggerId,...c,...r,ref:t,onCloseAutoFocus:w(e.onCloseAutoFocus,p=>{var f;i.current||(f=a.triggerRef.current)==null||f.focus(),i.current=!1,p.preventDefault()}),onInteractOutside:w(e.onInteractOutside,p=>{const f=p.detail.originalEvent,x=f.button===0&&f.ctrlKey===!0,g=f.button===2||x;(!a.modal||g)&&(i.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)"}})});Zt.displayName=Qt;var kr="DropdownMenuGroup",Lr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(_r,{...a,...r,ref:t})});Lr.displayName=kr;var $r="DropdownMenuLabel",Gr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(br,{...a,...r,ref:t})});Gr.displayName=$r;var Kr="DropdownMenuItem",Jt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(yr,{...a,...r,ref:t})});Jt.displayName=Kr;var Ur="DropdownMenuCheckboxItem",Br=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Rr,{...a,...r,ref:t})});Br.displayName=Ur;var zr="DropdownMenuRadioGroup",Yr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(jr,{...a,...r,ref:t})});Yr.displayName=zr;var Vr="DropdownMenuRadioItem",Wr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Sr,{...a,...r,ref:t})});Wr.displayName=Vr;var Hr="DropdownMenuItemIndicator",Xr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Ir,{...a,...r,ref:t})});Xr.displayName=Hr;var qr="DropdownMenuSeparator",en=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Ar,{...a,...r,ref:t})});en.displayName=qr;var Qr="DropdownMenuArrow",Zr=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Er,{...a,...r,ref:t})});Zr.displayName=Qr;var Jr="DropdownMenuSubTrigger",ea=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Nr,{...a,...r,ref:t})});ea.displayName=Jr;var ta="DropdownMenuSubContent",na=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...r}=e,a=b(o);return n.jsx(Pr,{...a,...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)"}})});na.displayName=ta;var oa=Wt,ra=Xt,aa=qt,sa=Zt,ca=Jt,ia=en;function tn({...e}){return n.jsx(oa,{"data-slot":"dropdown-menu",...e})}function nn({...e}){return n.jsx(ra,{"data-slot":"dropdown-menu-trigger",...e})}function on({className:e,sideOffset:t=4,...o}){return n.jsx(aa,{children:n.jsx(sa,{"data-slot":"dropdown-menu-content",sideOffset:t,className:S("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...o})})}function ye({className:e,inset:t,variant:o="default",...r}){return n.jsx(ca,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":o,className:S("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function ua({className:e,...t}){return n.jsx(ia,{"data-slot":"dropdown-menu-separator",className:S("bg-border -mx-1 my-1 h-px",e),...t})}const la=({session:e,isActive:t,onDelete:o,setOpenMobile:r})=>n.jsxs(Ze,{children:[n.jsx(Je,{asChild:!0,isActive:t,children:n.jsx(En,{to:"/session/$sessionId",params:{sessionId:e.id},onClick:()=>r(!1),children:n.jsx("span",{children:e.title})})}),n.jsxs(tn,{modal:!0,children:[n.jsx(nn,{asChild:!0,children:n.jsxs(Nn,{className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground mr-0.5",showOnHover:!t,children:[n.jsx(Pn,{}),n.jsx("span",{className:"sr-only",children:"More"})]})}),n.jsx(on,{side:"bottom",align:"end",children:n.jsxs(ye,{className:"cursor-pointer text-destructive focus:bg-destructive/15 focus:text-destructive dark:text-red-500",onSelect:()=>o(e.id),children:[n.jsx(Tn,{}),n.jsx("span",{children:"Delete"})]})})]})]}),Q=s.memo(la,(e,t)=>e.isActive===t.isActive);function da({user:e}){var u;const{setOpenMobile:t}=Qe(),{sessionId:o}=an({strict:!1}),{data:r,isLoading:a}=sn.useQuery("get","/api/sessions",{},{select:l=>l.data}),[c,i]=s.useState(null),[p,f]=s.useState(!1),x=async()=>{};if(!e)return n.jsx(ce,{children:n.jsx(ie,{children:n.jsx("div",{className:"px-2 text-zinc-500 w-full flex flex-row justify-center items-center text-sm gap-2",children:"Login to save and revisit previous chats!"})})});if(a)return n.jsxs(ce,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50",children:"Today"}),n.jsx(ie,{children:n.jsx("div",{className:"flex flex-col",children:[44,32,28,64,52].map(l=>n.jsx("div",{className:"rounded-md h-8 flex gap-2 px-2 items-center",children:n.jsx("div",{className:"h-4 rounded-md flex-1 max-w-(length:--skeleton-width) bg-sidebar-accent-foreground/10",style:{"--skeleton-width":`${l}%`}})},l))})})]});if((r==null?void 0:r.length)===0)return n.jsx(ce,{children:n.jsx(ie,{children:n.jsx("div",{className:"px-2 text-zinc-500 w-full flex flex-row justify-center items-center text-sm gap-2",children:"Your conversations will appear here once you start chatting!"})})});const g=l=>{const m=new Date,d=ro(m),D=oo(m);return l.reduce((C,h)=>{const M=new Date(h.created_at);return eo(M)?C.today.push(h):no(M)?C.yesterday.push(h):M>d?C.lastWeek.push(h):M>D?C.lastMonth.push(h):C.older.push(h),C},{today:[],yesterday:[],lastWeek:[],lastMonth:[],older:[]})};return n.jsxs(n.Fragment,{children:[n.jsx(ce,{children:n.jsx(ie,{children:n.jsx(Se,{children:r&&(()=>{const l=g(r);return n.jsxs(n.Fragment,{children:[l.today.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50",children:"Today"}),l.today.map(m=>n.jsx(Q,{session:m,isActive:m.id===o,onDelete:d=>{i(d),f(!0)},setOpenMobile:t},m.id))]}),l.yesterday.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Yesterday"}),l.yesterday.map(m=>n.jsx(Q,{session:m,isActive:m.id===o,onDelete:d=>{i(d),f(!0)},setOpenMobile:t},m.id))]}),l.lastWeek.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Last 7 days"}),l.lastWeek.map(m=>n.jsx(Q,{session:m,isActive:m.id===o,onDelete:d=>{i(d),f(!0)},setOpenMobile:t},m.id))]}),l.lastMonth.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Last 30 days"}),l.lastMonth.map(m=>n.jsx(Q,{session:m,isActive:m.id===o,onDelete:d=>{i(d),f(!0)},setOpenMobile:t},m.id))]}),l.older.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-2 py-1 text-xs text-sidebar-foreground/50 mt-6",children:"Older"}),l.older.map(m=>n.jsx(Q,{session:m,isActive:m.id===o,onDelete:d=>{i(d),f(!0)},setOpenMobile:t},m.id))]})]})})()})})}),n.jsx(_o,{open:p,onOpenChange:f,children:n.jsxs(Ro,{children:[n.jsxs(jo,{children:[n.jsx(Io,{children:"Delete session?"}),n.jsxs(Ao,{children:["This will delete"," ",n.jsx("span",{className:"font-bold",children:(u=r==null?void 0:r.filter(l=>l.id===c)[0])==null?void 0:u.title}),"."]})]}),n.jsxs(So,{children:[n.jsx(No,{children:"Cancel"}),n.jsx(Eo,{onClick:x,children:"Continue"})]})]})})]})}function fa({user:e}){const{setTheme:t,theme:o}=cn();return n.jsx(Se,{children:n.jsx(Ze,{children:n.jsxs(tn,{children:[n.jsx(nn,{asChild:!0,children:n.jsxs(Je,{className:"data-[state=open]:bg-sidebar-accent bg-background data-[state=open]:text-sidebar-accent-foreground h-10",children:[n.jsx("span",{className:"truncate",children:e==null?void 0:e.email}),n.jsx(Hn,{className:"ml-auto"})]})}),n.jsxs(on,{side:"top",className:"w-[--radix-popper-anchor-width]",children:[n.jsx(ye,{className:"cursor-pointer",onSelect:()=>t(o==="dark"?"light":"dark"),children:`Toggle ${o==="light"?"dark":"light"} mode`}),n.jsx(ua,{}),n.jsx(ye,{asChild:!0,children:n.jsx("button",{type:"button",className:"w-full cursor-pointer",onClick:()=>{},children:"Sign out"})})]})]})})})}function pa({user:e}){const{setOpenMobile:t}=Qe(),o=un();return n.jsxs(On,{className:"group-data-[side=left]:border-r-0",children:[n.jsx(Fn,{children:n.jsx(Se,{children:n.jsxs("div",{className:"flex flex-row justify-between items-center",children:[n.jsx(kn,{}),n.jsxs(Ln,{children:[n.jsx($n,{asChild:!0,children:n.jsx(Gn,{variant:"ghost",type:"button",className:"md:px-2 md:h-fit",onClick:()=>{t(!1),o({to:"/"})},children:n.jsx(qn,{})})}),n.jsx(Kn,{align:"end",children:"New Session"})]})]})})}),n.jsx(Un,{children:n.jsx(da,{user:e})}),n.jsx(Bn,{children:e&&n.jsx(fa,{user:e})})]})}/*! js-cookie v3.0.5 | MIT */function ue(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)e[r]=o[r]}return e}var ma={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Re(e,t){function o(a,c,i){if(!(typeof document>"u")){i=ue({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var p="";for(var f in i)i[f]&&(p+="; "+f,i[f]!==!0&&(p+="="+i[f].split(";")[0]));return document.cookie=a+"="+e.write(c,a)+p}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var c=document.cookie?document.cookie.split("; "):[],i={},p=0;p<c.length;p++){var f=c[p].split("="),x=f.slice(1).join("=");try{var g=decodeURIComponent(f[0]);if(i[g]=e.read(x,g),a===g)break}catch{}}return a?i[a]:i}}return Object.create({set:o,get:r,remove:function(a,c){o(a,"",ue({},c,{expires:-1}))},withAttributes:function(a){return Re(this.converter,ue({},this.attributes,a))},withConverter:function(a){return Re(ue({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Me=Re(ma,{path:"/"});const ga=e=>{const[t,o]=s.useState(()=>Me.get(e)||null),r=s.useCallback((c,i)=>{Me.set(e,c,i),o(c)},[e]),a=s.useCallback(()=>{Me.remove(e),o(null)},[e]);return[t,r,a]},Da=function(){const[t]=ga("sidebar_state"),o=t!=="true";return n.jsxs(zn,{defaultOpen:!o,children:[n.jsx(pa,{user:{id:"1234",name:"anonymous",email:"anonymous@acme.io"}}),n.jsx(Yn,{children:n.jsx(Vn,{children:n.jsx(ln,{})})})]})};export{Da as component};
