kf-component-library 1.3.14 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +2 -2
- package/package.json +1 -1
package/dist/main.cjs.js
CHANGED
@@ -260,7 +260,7 @@ ${n.map(([a,i])=>{const s=i.theme?.[r]||i.color;return s?` --color-${a}: ${s};`
|
|
260
260
|
`).join(`
|
261
261
|
`)}}):null},k4=g4;function A4({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:s,labelClassName:c,formatter:l,color:d,nameKey:u,labelKey:f}){const{config:m}=vC(),g=h.useMemo(()=>{if(o||!t?.length)return null;const[v]=t,b=`${f||v?.dataKey||v?.name||"value"}`,w=xf(m,v,b),x=!f&&typeof i=="string"?m[i]?.label||i:w?.label;return s?p.jsx("div",{className:O("font-medium",c),children:s(x,t)}):x?p.jsx("div",{className:O("font-medium",c),children:x}):null},[i,s,t,o,c,m,f]);if(!e||!t?.length)return null;const y=t.length===1&&r!=="dot";return p.jsxs("div",{className:O("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",n),children:[y?null:g,p.jsx("div",{className:"grid gap-1.5",children:t.map((v,b)=>{const w=`${u||v.name||v.dataKey||"value"}`,x=xf(m,v,w),S=d||v.payload?.fill||v.color;return p.jsx("div",{className:O("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",r==="dot"&&"items-center"),children:l&&v?.value!==void 0&&v.name?l(v.value,v.name,v,b,v.payload):p.jsxs(p.Fragment,{children:[x?.icon?p.jsx(x.icon,{}):!a&&p.jsx("div",{className:O("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":y&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),p.jsxs("div",{className:O("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[p.jsxs("div",{className:"grid gap-1.5",children:[y?g:null,p.jsx("span",{className:"text-muted-foreground",children:x?.label||v.name})]}),v.value&&p.jsx("span",{className:"text-foreground font-mono font-medium tabular-nums",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}const N4=Hc;function D4({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:o}){const{config:a}=vC();return n?.length?p.jsx("div",{className:O("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(i=>{const s=`${o||i.dataKey||"value"}`,c=xf(a,i,s);return p.jsxs("div",{className:O("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),children:[c?.icon&&!t?p.jsx(c.icon,{}):p.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:i.color}}),c?.label]},i.value)})}):null}function xf(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let o=n;return n in t&&typeof t[n]=="string"?o=t[n]:r&&n in r&&typeof r[n]=="string"&&(o=r[n]),o in e?e[o]:e[n]}function ia(e){const t=h.useRef({value:e,previous:e});return h.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ki(e){const[t,n]=h.useState(void 0);return qe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cl="Checkbox",[R4,IQ]=Be(cl),[I4,Am]=R4(cl);function j4(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:c,required:l,value:d="on",internal_do_not_use_render:u}=e,[f,m]=Qe({prop:n,defaultProp:o??!1,onChange:c,caller:cl}),[g,y]=h.useState(null),[v,b]=h.useState(null),w=h.useRef(!1),x=g?!!i||!!g.closest("form"):!0,S={checked:f,disabled:a,setChecked:m,control:g,setControl:y,name:s,form:i,value:d,hasConsumerStoppedPropagationRef:w,required:l,defaultChecked:fr(o)?!1:o,isFormControl:x,bubbleInput:v,setBubbleInput:b};return p.jsx(I4,{scope:t,...S,children:$4(u)?u(S):r})}var bC="CheckboxTrigger",xC=h.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:c,required:l,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:g}=Am(bC,e),y=de(o,d),v=h.useRef(c);return h.useEffect(()=>{const b=a?.form;if(b){const w=()=>u(v.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,u]),p.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":fr(c)?"mixed":c,"aria-required":l,"data-state":MC(c),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:y,onKeyDown:q(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:q(n,b=>{u(w=>fr(w)?!0:!w),g&&m&&(f.current=b.isPropagationStopped(),f.current||b.stopPropagation())})})});xC.displayName=bC;var wC=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c,onCheckedChange:l,form:d,...u}=e;return p.jsx(j4,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:l,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(xC,{...u,ref:t,__scopeCheckbox:n}),f&&p.jsx(PC,{__scopeCheckbox:n})]})})});wC.displayName=cl;var SC="CheckboxIndicator",CC=h.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Am(SC,n);return p.jsx(We,{present:r||fr(a.checked)||a.checked===!0,children:p.jsx(ee.span,{"data-state":MC(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});CC.displayName=SC;var EC="CheckboxBubbleInput",PC=h.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:c,name:l,value:d,form:u,bubbleInput:f,setBubbleInput:m}=Am(EC,e),g=de(n,m),y=ia(a),v=ki(r);h.useEffect(()=>{const w=f;if(!w)return;const x=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(x,"checked").set,M=!o.current;if(y!==a&&P){const E=new Event("click",{bubbles:M});w.indeterminate=fr(a),P.call(w,fr(a)?!1:a),w.dispatchEvent(E)}},[f,y,a,o]);const b=h.useRef(fr(a)?!1:a);return p.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:s,disabled:c,name:l,value:d,form:u,...t,tabIndex:-1,ref:g,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});PC.displayName=EC;function $4(e){return typeof e=="function"}function fr(e){return e==="indeterminate"}function MC(e){return fr(e)?"indeterminate":e?"checked":"unchecked"}function L4({className:e,...t}){return p.jsx(wC,{"data-slot":"checkbox",className:O("peer bg-input dark:bg-input/10 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border border-border transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(CC,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(p0,{className:"size-3.5"})})})}function F4({...e}){return p.jsx(R0,{"data-slot":"collapsible",...e})}function z4({...e}){return p.jsx(Qf,{"data-slot":"collapsible-trigger",...e})}function B4({...e}){return p.jsx(ep,{"data-slot":"collapsible-content",...e})}var kb=1,W4=.9,H4=.8,U4=.17,gd=.1,vd=.999,V4=.9999,q4=.99,K4=/[\\\/_+.#"@\[\(\{&]/,G4=/[\\\/_+.#"@\[\(\{&]/g,Y4=/[\s-]/,_C=/[\s-]/g;function wf(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?kb:q4;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),l=n.indexOf(c,o),d=0,u,f,m,g;l>=0;)u=wf(e,t,n,r,l+1,a+1,i),u>d&&(l===o?u*=kb:K4.test(e.charAt(l-1))?(u*=H4,m=e.slice(o,l-1).match(G4),m&&o>0&&(u*=Math.pow(vd,m.length))):Y4.test(e.charAt(l-1))?(u*=W4,g=e.slice(o,l-1).match(_C),g&&o>0&&(u*=Math.pow(vd,g.length))):(u*=U4,o>0&&(u*=Math.pow(vd,l-o))),e.charAt(l)!==t.charAt(a)&&(u*=V4)),(u<gd&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=wf(e,t,n,r,l+1,a+2,i),f*gd>u&&(u=f*gd)),u>d&&(d=u),l=n.indexOf(c,l+1);return i[s]=d,d}function Ab(e){return e.toLowerCase().replace(_C," ")}function X4(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,wf(e,t,Ab(e),Ab(t),0,0,{})}var Ca='[cmdk-group=""]',yd='[cmdk-group-items=""]',Z4='[cmdk-group-heading=""]',TC='[cmdk-item=""]',Nb=`${TC}:not([aria-disabled="true"])`,Sf="cmdk-item-select",So="data-value",Q4=(e,t,n)=>X4(e,t,n),OC=h.createContext(void 0),Ai=()=>h.useContext(OC),kC=h.createContext(void 0),Nm=()=>h.useContext(kC),AC=h.createContext(void 0),NC=h.forwardRef((e,t)=>{let n=Co(()=>{var H,R;return{search:"",value:(R=(H=e.value)!=null?H:e.defaultValue)!=null?R:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Co(()=>new Set),o=Co(()=>new Map),a=Co(()=>new Map),i=Co(()=>new Set),s=DC(e),{label:c,children:l,value:d,onValueChange:u,filter:f,shouldFilter:m,loop:g,disablePointerSelection:y=!1,vimBindings:v=!0,...b}=e,w=Le(),x=Le(),S=Le(),P=h.useRef(null),M=lU();eo(()=>{if(d!==void 0){let H=d.trim();n.current.value=H,E.emit()}},[d]),eo(()=>{M(6,$)},[]);let E=h.useMemo(()=>({subscribe:H=>(i.current.add(H),()=>i.current.delete(H)),snapshot:()=>n.current,setState:(H,R,z)=>{var F,X,D,V;if(!Object.is(n.current[H],R)){if(n.current[H]=R,H==="search")L(),I(),M(1,A);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let B=document.getElementById(S);B?B.focus():(F=document.getElementById(w))==null||F.focus()}if(M(7,()=>{var B;n.current.selectedItemId=(B=K())==null?void 0:B.id,E.emit()}),z||M(5,$),((X=s.current)==null?void 0:X.value)!==void 0){let B=R??"";(V=(D=s.current).onValueChange)==null||V.call(D,B);return}}E.emit()}},emit:()=>{i.current.forEach(H=>H())}}),[]),_=h.useMemo(()=>({value:(H,R,z)=>{var F;R!==((F=a.current.get(H))==null?void 0:F.value)&&(a.current.set(H,{value:R,keywords:z}),n.current.filtered.items.set(H,T(R,z)),M(2,()=>{I(),E.emit()}))},item:(H,R)=>(r.current.add(H),R&&(o.current.has(R)?o.current.get(R).add(H):o.current.set(R,new Set([H]))),M(3,()=>{L(),I(),n.current.value||A(),E.emit()}),()=>{a.current.delete(H),r.current.delete(H),n.current.filtered.items.delete(H);let z=K();M(4,()=>{L(),z?.getAttribute("id")===H&&A(),E.emit()})}),group:H=>(o.current.has(H)||o.current.set(H,new Set),()=>{a.current.delete(H),o.current.delete(H)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:P}),[]);function T(H,R){var z,F;let X=(F=(z=s.current)==null?void 0:z.filter)!=null?F:Q4;return H?X(H,n.current.search,R):0}function I(){if(!n.current.search||s.current.shouldFilter===!1)return;let H=n.current.filtered.items,R=[];n.current.filtered.groups.forEach(F=>{let X=o.current.get(F),D=0;X.forEach(V=>{let B=H.get(V);D=Math.max(B,D)}),R.push([F,D])});let z=P.current;Y().sort((F,X)=>{var D,V;let B=F.getAttribute("id"),Z=X.getAttribute("id");return((D=H.get(Z))!=null?D:0)-((V=H.get(B))!=null?V:0)}).forEach(F=>{let X=F.closest(yd);X?X.appendChild(F.parentElement===X?F:F.closest(`${yd} > *`)):z.appendChild(F.parentElement===z?F:F.closest(`${yd} > *`))}),R.sort((F,X)=>X[1]-F[1]).forEach(F=>{var X;let D=(X=P.current)==null?void 0:X.querySelector(`${Ca}[${So}="${encodeURIComponent(F[0])}"]`);D?.parentElement.appendChild(D)})}function A(){let H=Y().find(z=>z.getAttribute("aria-disabled")!=="true"),R=H?.getAttribute(So);E.setState("value",R||void 0)}function L(){var H,R,z,F;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let D of r.current){let V=(R=(H=a.current.get(D))==null?void 0:H.value)!=null?R:"",B=(F=(z=a.current.get(D))==null?void 0:z.keywords)!=null?F:[],Z=T(V,B);n.current.filtered.items.set(D,Z),Z>0&&X++}for(let[D,V]of o.current)for(let B of V)if(n.current.filtered.items.get(B)>0){n.current.filtered.groups.add(D);break}n.current.filtered.count=X}function $(){var H,R,z;let F=K();F&&(((H=F.parentElement)==null?void 0:H.firstChild)===F&&((z=(R=F.closest(Ca))==null?void 0:R.querySelector(Z4))==null||z.scrollIntoView({block:"nearest"})),F.scrollIntoView({block:"nearest"}))}function K(){var H;return(H=P.current)==null?void 0:H.querySelector(`${TC}[aria-selected="true"]`)}function Y(){var H;return Array.from(((H=P.current)==null?void 0:H.querySelectorAll(Nb))||[])}function W(H){let R=Y()[H];R&&E.setState("value",R.getAttribute(So))}function G(H){var R;let z=K(),F=Y(),X=F.findIndex(V=>V===z),D=F[X+H];(R=s.current)!=null&&R.loop&&(D=X+H<0?F[F.length-1]:X+H===F.length?F[0]:F[X+H]),D&&E.setState("value",D.getAttribute(So))}function j(H){let R=K(),z=R?.closest(Ca),F;for(;z&&!F;)z=H>0?sU(z,Ca):cU(z,Ca),F=z?.querySelector(Nb);F?E.setState("value",F.getAttribute(So)):G(H)}let U=()=>W(Y().length-1),oe=H=>{H.preventDefault(),H.metaKey?U():H.altKey?j(1):G(1)},ie=H=>{H.preventDefault(),H.metaKey?W(0):H.altKey?j(-1):G(-1)};return h.createElement(ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:H=>{var R;(R=b.onKeyDown)==null||R.call(b,H);let z=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||z))switch(H.key){case"n":case"j":{v&&H.ctrlKey&&oe(H);break}case"ArrowDown":{oe(H);break}case"p":case"k":{v&&H.ctrlKey&&ie(H);break}case"ArrowUp":{ie(H);break}case"Home":{H.preventDefault(),W(0);break}case"End":{H.preventDefault(),U();break}case"Enter":{H.preventDefault();let F=K();if(F){let X=new Event(Sf);F.dispatchEvent(X)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:_.inputId,id:_.labelId,style:dU},c),ll(e,H=>h.createElement(kC.Provider,{value:E},h.createElement(OC.Provider,{value:_},H))))}),J4=h.forwardRef((e,t)=>{var n,r;let o=Le(),a=h.useRef(null),i=h.useContext(AC),s=Ai(),c=DC(e),l=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i?.forceMount;eo(()=>{if(!l)return s.item(o,i?.id)},[l]);let d=RC(o,a,[e.value,e.children,a],e.keywords),u=Nm(),f=mr(M=>M.value&&M.value===d.current),m=mr(M=>l||s.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);h.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(Sf,g),()=>M.removeEventListener(Sf,g)},[m,e.onSelect,e.disabled]);function g(){var M,E;y(),(E=(M=c.current).onSelect)==null||E.call(M,d.current)}function y(){u.setState("value",d.current,!0)}if(!m)return null;let{disabled:v,value:b,onSelect:w,forceMount:x,keywords:S,...P}=e;return h.createElement(ee.div,{ref:_n(a,t),...P,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!f,"data-disabled":!!v,"data-selected":!!f,onPointerMove:v||s.getDisablePointerSelection()?void 0:y,onClick:v?void 0:g},e.children)}),eU=h.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Le(),s=h.useRef(null),c=h.useRef(null),l=Le(),d=Ai(),u=mr(m=>o||d.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);eo(()=>d.group(i),[]),RC(i,s,[e.value,e.heading,c]);let f=h.useMemo(()=>({id:i,forceMount:o}),[o]);return h.createElement(ee.div,{ref:_n(s,t),...a,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),ll(e,m=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},h.createElement(AC.Provider,{value:f},m))))}),tU=h.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=h.useRef(null),a=mr(i=>!i.search);return!n&&!a?null:h.createElement(ee.div,{ref:_n(o,t),...r,"cmdk-separator":"",role:"separator"})}),nU=h.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Nm(),i=mr(l=>l.search),s=mr(l=>l.selectedItemId),c=Ai();return h.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),h.createElement(ee.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:o?e.value:i,onChange:l=>{o||a.setState("search",l.target.value),n?.(l.target.value)}})}),rU=h.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=h.useRef(null),i=h.useRef(null),s=mr(l=>l.selectedItemId),c=Ai();return h.useEffect(()=>{if(i.current&&a.current){let l=i.current,d=a.current,u,f=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let m=l.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return f.observe(l),()=>{cancelAnimationFrame(u),f.unobserve(l)}}},[]),h.createElement(ee.div,{ref:_n(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},ll(e,l=>h.createElement("div",{ref:_n(i,c.listInnerRef),"cmdk-list-sizer":""},l)))}),oU=h.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return h.createElement(ci,{open:n,onOpenChange:r},h.createElement(li,{container:i},h.createElement(ui,{"cmdk-overlay":"",className:o}),h.createElement(di,{"aria-label":e.label,"cmdk-dialog":"",className:a},h.createElement(NC,{ref:t,...s}))))}),aU=h.forwardRef((e,t)=>mr(n=>n.filtered.count===0)?h.createElement(ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),iU=h.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return h.createElement(ee.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ll(e,i=>h.createElement("div",{"aria-hidden":!0},i)))}),fo=Object.assign(NC,{List:rU,Item:J4,Input:nU,Group:eU,Separator:tU,Dialog:oU,Empty:aU,Loading:iU});function sU(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function cU(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function DC(e){let t=h.useRef(e);return eo(()=>{t.current=e}),t}var eo=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Co(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function mr(e){let t=Nm(),n=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,n,n)}function RC(e,t,n,r=[]){let o=h.useRef(),a=Ai();return eo(()=>{var i;let s=(()=>{var l;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(l=d.current.textContent)==null?void 0:l.trim():o.current}})(),c=r.map(l=>l.trim());a.value(e,s,c),(i=t.current)==null||i.setAttribute(So,s),o.current=s}),o}var lU=()=>{let[e,t]=h.useState(),n=Co(()=>new Map);return eo(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function uU(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ll({asChild:e,children:t},n){return e&&h.isValidElement(t)?h.cloneElement(uU(t),{ref:t.ref},n(t.props.children)):n(t)}var dU={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function IC({...e}){return p.jsx(ci,{"data-slot":"dialog",...e})}function fU({...e}){return p.jsx(Tc,{"data-slot":"dialog-trigger",...e})}function pU({...e}){return p.jsx(li,{"data-slot":"dialog-portal",...e})}function mU({className:e,...t}){return p.jsx(ui,{"data-slot":"dialog-overlay",className:O("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/50",e),...t})}function jC({className:e,children:t,showCloseButton:n=!0,...r}){return p.jsxs(pU,{"data-slot":"dialog-portal",children:[p.jsx(mU,{}),p.jsxs(di,{"data-slot":"dialog-content",className:O("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),...r,children:[t,n&&p.jsxs(Xo,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[p.jsx(g0,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function $C({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:O("flex flex-col gap-2 text-center sm:text-left",e),...t})}function LC({className:e,...t}){return p.jsx(Oc,{"data-slot":"dialog-title",className:O("mt-0 mb-4 text-lg leading-none font-semibold",e),...t})}function FC({className:e,...t}){return p.jsx(kc,{"data-slot":"dialog-description",className:O("text-muted-foreground text-sm",e),...t})}function zC({className:e,...t}){return p.jsx(fo,{"data-slot":"command",className:O("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function hU({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!0,...a}){return p.jsxs(IC,{...a,children:[p.jsxs($C,{className:"sr-only",children:[p.jsx(LC,{children:e}),p.jsx(FC,{children:t})]}),p.jsx(jC,{className:O("overflow-hidden p-0",r),showCloseButton:o,children:p.jsx(zC,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:n})})]})}function gU({className:e,...t}){return p.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[p.jsx(h0,{className:"size-4 shrink-0 opacity-50"}),p.jsx(fo.Input,{"data-slot":"command-input",className:O("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function vU({className:e,...t}){return p.jsx(fo.List,{"data-slot":"command-list",className:O("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function yU({...e}){return p.jsx(fo.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-base",...e})}function bU({className:e,...t}){return p.jsx(fo.Group,{"data-slot":"command-group",className:O("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium",e),...t})}function xU({className:e,...t}){return p.jsx(fo.Separator,{"data-slot":"command-separator",className:O("bg-border -mx-1 h-px",e),...t})}function wU({className:e,...t}){return p.jsx(fo.Item,{"data-slot":"command-item",className:O("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-base outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:cursor-pointer",e),...t})}function SU({className:e,...t}){return p.jsx("span",{"data-slot":"command-shortcut",className:O("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const CU=["top","right","bottom","left"],hr=Math.min,zt=Math.max,rc=Math.round,hs=Math.floor,Mn=e=>({x:e,y:e}),EU={left:"right",right:"left",bottom:"top",top:"bottom"},PU={start:"end",end:"start"};function Cf(e,t,n){return zt(e,hr(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Qn(e){return e.split("-")[0]}function sa(e){return e.split("-")[1]}function Dm(e){return e==="x"?"y":"x"}function Rm(e){return e==="y"?"height":"width"}function En(e){return["top","bottom"].includes(Qn(e))?"y":"x"}function Im(e){return Dm(En(e))}function MU(e,t,n){n===void 0&&(n=!1);const r=sa(e),o=Im(e),a=Rm(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=oc(i)),[i,oc(i)]}function _U(e){const t=oc(e);return[Ef(e),t,Ef(t)]}function Ef(e){return e.replace(/start|end/g,t=>PU[t])}function TU(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function OU(e,t,n,r){const o=sa(e);let a=TU(Qn(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Ef)))),a}function oc(e){return e.replace(/left|right|bottom|top/g,t=>EU[t])}function kU(e){return{top:0,right:0,bottom:0,left:0,...e}}function BC(e){return typeof e!="number"?kU(e):{top:e,right:e,bottom:e,left:e}}function ac(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Db(e,t,n){let{reference:r,floating:o}=e;const a=En(t),i=Im(t),s=Rm(i),c=Qn(t),l=a==="y",d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-o.width,y:u};break;default:m={x:r.x,y:r.y}}switch(sa(t)){case"start":m[i]-=f*(n&&l?-1:1);break;case"end":m[i]+=f*(n&&l?-1:1);break}return m}const AU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=Db(l,r,c),f=r,m={},g=0;for(let y=0;y<s.length;y++){const{name:v,fn:b}=s[y],{x:w,y:x,data:S,reset:P}=await b({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:l,platform:i,elements:{reference:e,floating:t}});d=w??d,u=x??u,m={...m,[v]:{...m[v],...S}},P&&g<=50&&(g++,typeof P=="object"&&(P.placement&&(f=P.placement),P.rects&&(l=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:d,y:u}=Db(l,f,c)),y=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:m}};async function Ya(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Zn(t,e),g=BC(m),v=s[f?u==="floating"?"reference":"floating":u],b=ac(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),w=u==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},P=ac(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:x,strategy:c}):w);return{top:(b.top-P.top+g.top)/S.y,bottom:(P.bottom-b.bottom+g.bottom)/S.y,left:(b.left-P.left+g.left)/S.x,right:(P.right-b.right+g.right)/S.x}}const NU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:d=0}=Zn(e,t)||{};if(l==null)return{};const u=BC(d),f={x:n,y:r},m=Im(o),g=Rm(m),y=await i.getDimensions(l),v=m==="y",b=v?"top":"left",w=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=a.reference[g]+a.reference[m]-f[m]-a.floating[g],P=f[m]-a.reference[m],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=M?M[x]:0;(!E||!await(i.isElement==null?void 0:i.isElement(M)))&&(E=s.floating[x]||a.floating[g]);const _=S/2-P/2,T=E/2-y[g]/2-1,I=hr(u[b],T),A=hr(u[w],T),L=I,$=E-y[g]-A,K=E/2-y[g]/2+_,Y=Cf(L,K,$),W=!c.arrow&&sa(o)!=null&&K!==Y&&a.reference[g]/2-(K<L?I:A)-y[g]/2<0,G=W?K<L?K-L:K-$:0;return{[m]:f[m]+G,data:{[m]:Y,centerOffset:K-Y-G,...W&&{alignmentOffset:G}},reset:W}}}),DU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...v}=Zn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Qn(o),w=En(s),x=Qn(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),P=f||(x||!y?[oc(s)]:_U(s)),M=g!=="none";!f&&M&&P.push(...OU(s,y,g,S));const E=[s,...P],_=await Ya(t,v),T=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&T.push(_[b]),u){const K=MU(o,i,S);T.push(_[K[0]],_[K[1]])}if(I=[...I,{placement:o,overflows:T}],!T.every(K=>K<=0)){var A,L;const K=(((A=a.flip)==null?void 0:A.index)||0)+1,Y=E[K];if(Y&&(!(u==="alignment"?w!==En(Y):!1)||I.every(j=>j.overflows[0]>0&&En(j.placement)===w)))return{data:{index:K,overflows:I},reset:{placement:Y}};let W=(L=I.filter(G=>G.overflows[0]<=0).sort((G,j)=>G.overflows[1]-j.overflows[1])[0])==null?void 0:L.placement;if(!W)switch(m){case"bestFit":{var $;const G=($=I.filter(j=>{if(M){const U=En(j.placement);return U===w||U==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(U=>U>0).reduce((U,oe)=>U+oe,0)]).sort((j,U)=>j[1]-U[1])[0])==null?void 0:$[0];G&&(W=G);break}case"initialPlacement":W=s;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function Rb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ib(e){return CU.some(t=>e[t]>=0)}const RU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Zn(e,t);switch(r){case"referenceHidden":{const a=await Ya(t,{...o,elementContext:"reference"}),i=Rb(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ib(i)}}}case"escaped":{const a=await Ya(t,{...o,altBoundary:!0}),i=Rb(a,n.floating);return{data:{escapedOffsets:i,escaped:Ib(i)}}}default:return{}}}}};async function IU(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Qn(n),s=sa(n),c=En(n)==="y",l=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,u=Zn(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),c?{x:m*d,y:f*l}:{x:f*l,y:m*d}}const jU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await IU(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},$U=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...c}=Zn(e,t),l={x:n,y:r},d=await Ya(t,c),u=En(Qn(o)),f=Dm(u);let m=l[f],g=l[u];if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=m+d[v],x=m-d[b];m=Cf(w,m,x)}if(i){const v=u==="y"?"top":"left",b=u==="y"?"bottom":"right",w=g+d[v],x=g-d[b];g=Cf(w,g,x)}const y=s.fn({...t,[f]:m,[u]:g});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[f]:a,[u]:i}}}}}},LU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Zn(e,t),d={x:n,y:r},u=En(o),f=Dm(u);let m=d[f],g=d[u];const y=Zn(s,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=f==="y"?"height":"width",S=a.reference[f]-a.floating[x]+v.mainAxis,P=a.reference[f]+a.reference[x]-v.mainAxis;m<S?m=S:m>P&&(m=P)}if(l){var b,w;const x=f==="y"?"width":"height",S=["top","left"].includes(Qn(o)),P=a.reference[u]-a.floating[x]+(S&&((b=i.offset)==null?void 0:b[u])||0)+(S?0:v.crossAxis),M=a.reference[u]+a.reference[x]+(S?0:((w=i.offset)==null?void 0:w[u])||0)-(S?v.crossAxis:0);g<P?g=P:g>M&&(g=M)}return{[f]:m,[u]:g}}}},FU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=Zn(e,t),d=await Ya(t,l),u=Qn(o),f=sa(o),m=En(o)==="y",{width:g,height:y}=a.floating;let v,b;u==="top"||u==="bottom"?(v=u,b=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=u,v=f==="end"?"top":"bottom");const w=y-d.top-d.bottom,x=g-d.left-d.right,S=hr(y-d[v],w),P=hr(g-d[b],x),M=!t.middlewareData.shift;let E=S,_=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),M&&!f){const I=zt(d.left,0),A=zt(d.right,0),L=zt(d.top,0),$=zt(d.bottom,0);m?_=g-2*(I!==0||A!==0?I+A:zt(d.left,d.right)):E=y-2*(L!==0||$!==0?L+$:zt(d.top,d.bottom))}await c({...t,availableWidth:_,availableHeight:E});const T=await i.getDimensions(s.floating);return g!==T.width||y!==T.height?{reset:{rects:!0}}:{}}}};function ul(){return typeof window<"u"}function ca(e){return WC(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dn(e){var t;return(t=(WC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WC(e){return ul()?e instanceof Node||e instanceof Wt(e).Node:!1}function fn(e){return ul()?e instanceof Element||e instanceof Wt(e).Element:!1}function kn(e){return ul()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function jb(e){return!ul()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}function Ni(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function zU(e){return["table","td","th"].includes(ca(e))}function dl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function jm(e){const t=$m(),n=fn(e)?pn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function BU(e){let t=gr(e);for(;kn(t)&&!Wo(t);){if(jm(t))return t;if(dl(t))return null;t=gr(t)}return null}function $m(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wo(e){return["html","body","#document"].includes(ca(e))}function pn(e){return Wt(e).getComputedStyle(e)}function fl(e){return fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gr(e){if(ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jb(e)&&e.host||Dn(e);return jb(t)?t.host:t}function HC(e){const t=gr(e);return Wo(t)?e.ownerDocument?e.ownerDocument.body:e.body:kn(t)&&Ni(t)?t:HC(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=HC(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Wt(o);if(a){const s=Pf(i);return t.concat(i,i.visualViewport||[],Ni(o)?o:[],s&&n?Xa(s):[])}return t.concat(o,Xa(o,[],n))}function Pf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UC(e){const t=pn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=kn(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=rc(n)!==a||rc(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Lm(e){return fn(e)?e:e.contextElement}function ko(e){const t=Lm(e);if(!kn(t))return Mn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=UC(t);let i=(a?rc(n.width):n.width)/r,s=(a?rc(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const WU=Mn(0);function VC(e){const t=Wt(e);return!$m()||!t.visualViewport?WU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function HU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function to(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Lm(e);let i=Mn(1);t&&(r?fn(r)&&(i=ko(r)):i=ko(e));const s=HU(a,n,r)?VC(a):Mn(0);let c=(o.left+s.x)/i.x,l=(o.top+s.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const f=Wt(a),m=r&&fn(r)?Wt(r):r;let g=f,y=Pf(g);for(;y&&r&&m!==g;){const v=ko(y),b=y.getBoundingClientRect(),w=pn(y),x=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,S=b.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,l*=v.y,d*=v.x,u*=v.y,c+=x,l+=S,g=Wt(y),y=Pf(g)}}return ac({width:d,height:u,x:c,y:l})}function Fm(e,t){const n=fl(e).scrollLeft;return t?t.left+n:to(Dn(e)).left+n}function qC(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Fm(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function UU(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Dn(r),s=t?dl(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Mn(1);const d=Mn(0),u=kn(r);if((u||!u&&!a)&&((ca(r)!=="body"||Ni(i))&&(c=fl(r)),kn(r))){const m=to(r);l=ko(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=i&&!u&&!a?qC(i,c,!0):Mn(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+d.x+f.x,y:n.y*l.y-c.scrollTop*l.y+d.y+f.y}}function VU(e){return Array.from(e.getClientRects())}function qU(e){const t=Dn(e),n=fl(e),r=e.ownerDocument.body,o=zt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Fm(e);const s=-n.scrollTop;return pn(r).direction==="rtl"&&(i+=zt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function KU(e,t){const n=Wt(e),r=Dn(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const l=$m();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function GU(e,t){const n=to(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=kn(e)?ko(e):Mn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,l=r*a.y;return{width:i,height:s,x:c,y:l}}function $b(e,t,n){let r;if(t==="viewport")r=KU(e,n);else if(t==="document")r=qU(Dn(e));else if(fn(t))r=GU(t,n);else{const o=VC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ac(r)}function KC(e,t){const n=gr(e);return n===t||!fn(n)||Wo(n)?!1:pn(n).position==="fixed"||KC(n,t)}function YU(e,t){const n=t.get(e);if(n)return n;let r=Xa(e,[],!1).filter(s=>fn(s)&&ca(s)!=="body"),o=null;const a=pn(e).position==="fixed";let i=a?gr(e):e;for(;fn(i)&&!Wo(i);){const s=pn(i),c=jm(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ni(i)&&!c&&KC(e,i))?r=r.filter(d=>d!==i):o=s,i=gr(i)}return t.set(e,r),r}function XU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?dl(t)?[]:YU(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((l,d)=>{const u=$b(t,d,o);return l.top=zt(u.top,l.top),l.right=hr(u.right,l.right),l.bottom=hr(u.bottom,l.bottom),l.left=zt(u.left,l.left),l},$b(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function ZU(e){const{width:t,height:n}=UC(e);return{width:t,height:n}}function QU(e,t,n){const r=kn(t),o=Dn(t),a=n==="fixed",i=to(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Mn(0);function l(){c.x=Fm(o)}if(r||!r&&!a)if((ca(t)!=="body"||Ni(o))&&(s=fl(t)),r){const m=to(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&l();a&&!r&&o&&l();const d=o&&!r&&!a?qC(o,s):Mn(0),u=i.left+s.scrollLeft-c.x-d.x,f=i.top+s.scrollTop-c.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function bd(e){return pn(e).position==="static"}function Lb(e,t){if(!kn(e)||pn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Dn(e)===n&&(n=n.ownerDocument.body),n}function GC(e,t){const n=Wt(e);if(dl(e))return n;if(!kn(e)){let o=gr(e);for(;o&&!Wo(o);){if(fn(o)&&!bd(o))return o;o=gr(o)}return n}let r=Lb(e,t);for(;r&&zU(r)&&bd(r);)r=Lb(r,t);return r&&Wo(r)&&bd(r)&&!jm(r)?n:r||BU(e)||n}const JU=async function(e){const t=this.getOffsetParent||GC,n=this.getDimensions,r=await n(e.floating);return{reference:QU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eV(e){return pn(e).direction==="rtl"}const tV={convertOffsetParentRelativeRectToViewportRelativeRect:UU,getDocumentElement:Dn,getClippingRect:XU,getOffsetParent:GC,getElementRects:JU,getClientRects:VU,getDimensions:ZU,getScale:ko,isElement:fn,isRTL:eV};function YC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nV(e,t){let n=null,r;const o=Dn(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:d,top:u,width:f,height:m}=l;if(s||t(),!f||!m)return;const g=hs(u),y=hs(o.clientWidth-(d+f)),v=hs(o.clientHeight-(u+m)),b=hs(d),x={rootMargin:-g+"px "+-y+"px "+-v+"px "+-b+"px",threshold:zt(0,hr(1,c))||1};let S=!0;function P(M){const E=M[0].intersectionRatio;if(E!==c){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!YC(l,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(P,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(P,x)}n.observe(e)}return i(!0),a}function rV(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Lm(e),d=o||a?[...l?Xa(l):[],...Xa(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const u=l&&s?nV(l,n):null;let f=-1,m=null;i&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),l&&!c&&m.observe(l),m.observe(t));let g,y=c?to(e):null;c&&v();function v(){const b=to(e);y&&!YC(y,b)&&n(),y=b,g=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),u?.(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const oV=jU,aV=$U,iV=DU,sV=FU,cV=RU,Fb=NU,lV=LU,uV=(e,t,n)=>{const r=new Map,o={platform:tV,...n},a={...o.platform,_c:r};return AU(e,t,{...o,platform:a})};var dV=typeof document<"u",fV=function(){},Es=dV?C.useLayoutEffect:fV;function ic(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ic(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!ic(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function XC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zb(e,t){const n=XC(e);return Math.round(t*n)/n}function xd(e){const t=h.useRef(e);return Es(()=>{t.current=e}),t}function pV(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[d,u]=h.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=h.useState(r);ic(f,r)||m(r);const[g,y]=h.useState(null),[v,b]=h.useState(null),w=h.useCallback(j=>{j!==M.current&&(M.current=j,y(j))},[]),x=h.useCallback(j=>{j!==E.current&&(E.current=j,b(j))},[]),S=a||g,P=i||v,M=h.useRef(null),E=h.useRef(null),_=h.useRef(d),T=c!=null,I=xd(c),A=xd(o),L=xd(l),$=h.useCallback(()=>{if(!M.current||!E.current)return;const j={placement:t,strategy:n,middleware:f};A.current&&(j.platform=A.current),uV(M.current,E.current,j).then(U=>{const oe={...U,isPositioned:L.current!==!1};K.current&&!ic(_.current,oe)&&(_.current=oe,xc.flushSync(()=>{u(oe)}))})},[f,t,n,A,L]);Es(()=>{l===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,u(j=>({...j,isPositioned:!1})))},[l]);const K=h.useRef(!1);Es(()=>(K.current=!0,()=>{K.current=!1}),[]),Es(()=>{if(S&&(M.current=S),P&&(E.current=P),S&&P){if(I.current)return I.current(S,P,$);$()}},[S,P,$,I,T]);const Y=h.useMemo(()=>({reference:M,floating:E,setReference:w,setFloating:x}),[w,x]),W=h.useMemo(()=>({reference:S,floating:P}),[S,P]),G=h.useMemo(()=>{const j={position:n,left:0,top:0};if(!W.floating)return j;const U=zb(W.floating,d.x),oe=zb(W.floating,d.y);return s?{...j,transform:"translate("+U+"px, "+oe+"px)",...XC(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:oe}},[n,s,W.floating,d.x,d.y]);return h.useMemo(()=>({...d,update:$,refs:Y,elements:W,floatingStyles:G}),[d,$,Y,W,G])}const mV=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Fb({element:r.current,padding:o}).fn(n):{}:r?Fb({element:r,padding:o}).fn(n):{}}}},hV=(e,t)=>({...oV(e),options:[e,t]}),gV=(e,t)=>({...aV(e),options:[e,t]}),vV=(e,t)=>({...lV(e),options:[e,t]}),yV=(e,t)=>({...iV(e),options:[e,t]}),bV=(e,t)=>({...sV(e),options:[e,t]}),xV=(e,t)=>({...cV(e),options:[e,t]}),wV=(e,t)=>({...mV(e),options:[e,t]});var SV="Arrow",ZC=h.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return p.jsx(ee.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});ZC.displayName=SV;var CV=ZC,zm="Popper",[QC,Rn]=Be(zm),[EV,JC]=QC(zm),eE=e=>{const{__scopePopper:t,children:n}=e,[r,o]=h.useState(null);return p.jsx(EV,{scope:t,anchor:r,onAnchorChange:o,children:n})};eE.displayName=zm;var tE="PopperAnchor",nE=h.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=JC(tE,n),i=h.useRef(null),s=de(t,i),c=h.useRef(null);return h.useEffect(()=>{const l=c.current;c.current=r?.current||i.current,l!==c.current&&a.onAnchorChange(c.current)}),r?null:p.jsx(ee.div,{...o,ref:s})});nE.displayName=tE;var Bm="PopperContent",[PV,MV]=QC(Bm),rE=h.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:g,...y}=e,v=JC(Bm,n),[b,w]=h.useState(null),x=de(t,D=>w(D)),[S,P]=h.useState(null),M=ki(S),E=M?.width??0,_=M?.height??0,T=r+(a!=="center"?"-"+a:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},A=Array.isArray(l)?l:[l],L=A.length>0,$={padding:I,boundary:A.filter(TV),altBoundary:L},{refs:K,floatingStyles:Y,placement:W,isPositioned:G,middlewareData:j}=pV({strategy:"fixed",placement:T,whileElementsMounted:(...D)=>rV(...D,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[hV({mainAxis:o+_,alignmentAxis:i}),c&&gV({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?vV():void 0,...$}),c&&yV({...$}),bV({...$,apply:({elements:D,rects:V,availableWidth:B,availableHeight:Z})=>{const{width:J,height:N}=V.reference,ne=D.floating.style;ne.setProperty("--radix-popper-available-width",`${B}px`),ne.setProperty("--radix-popper-available-height",`${Z}px`),ne.setProperty("--radix-popper-anchor-width",`${J}px`),ne.setProperty("--radix-popper-anchor-height",`${N}px`)}}),S&&wV({element:S,padding:s}),OV({arrowWidth:E,arrowHeight:_}),f&&xV({strategy:"referenceHidden",...$})]}),[U,oe]=iE(W),ie=je(g);qe(()=>{G&&ie?.()},[G,ie]);const H=j.arrow?.x,R=j.arrow?.y,z=j.arrow?.centerOffset!==0,[F,X]=h.useState();return qe(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),p.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:G?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:F,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(PV,{scope:n,placedSide:U,onArrowChange:P,arrowX:H,arrowY:R,shouldHideArrow:z,children:p.jsx(ee.div,{"data-side":U,"data-align":oe,...y,ref:x,style:{...y.style,animation:G?void 0:"none"}})})})});rE.displayName=Bm;var oE="PopperArrow",_V={top:"bottom",right:"left",bottom:"top",left:"right"},aE=h.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=MV(oE,r),i=_V[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(CV,{...o,ref:n,style:{...o.style,display:"block"}})})});aE.displayName=oE;function TV(e){return e!==null}var OV=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,d]=iE(n),u={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+s/2,m=(o.arrow?.y??0)+c/2;let g="",y="";return l==="bottom"?(g=i?u:`${f}px`,y=`${-c}px`):l==="top"?(g=i?u:`${f}px`,y=`${r.floating.height+c}px`):l==="right"?(g=`${-c}px`,y=i?u:`${m}px`):l==="left"&&(g=`${r.floating.width+c}px`,y=i?u:`${m}px`),{data:{x:g,y}}}});function iE(e){const[t,n="center"]=e.split("-");return[t,n]}var la=eE,ua=nE,Di=rE,Ri=aE,wd="rovingFocusGroup.onEntryFocus",kV={bubbles:!1,cancelable:!0},Ii="RovingFocusGroup",[Mf,sE,AV]=vr(Ii),[NV,In]=Be(Ii,[AV]),[DV,RV]=NV(Ii),cE=h.forwardRef((e,t)=>p.jsx(Mf.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Mf.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(IV,{...e,ref:t})})}));cE.displayName=Ii;var IV=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...u}=e,f=h.useRef(null),m=de(t,f),g=mn(a),[y,v]=Qe({prop:i,defaultProp:s??null,onChange:c,caller:Ii}),[b,w]=h.useState(!1),x=je(l),S=sE(n),P=h.useRef(!1),[M,E]=h.useState(0);return h.useEffect(()=>{const _=f.current;if(_)return _.addEventListener(wd,x),()=>_.removeEventListener(wd,x)},[x]),p.jsx(DV,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:y,onItemFocus:h.useCallback(_=>v(_),[v]),onItemShiftTab:h.useCallback(()=>w(!0),[]),onFocusableItemAdd:h.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:h.useCallback(()=>E(_=>_-1),[]),children:p.jsx(ee.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...u,ref:m,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{P.current=!0}),onFocus:q(e.onFocus,_=>{const T=!P.current;if(_.target===_.currentTarget&&T&&!b){const I=new CustomEvent(wd,kV);if(_.currentTarget.dispatchEvent(I),!I.defaultPrevented){const A=S().filter(W=>W.focusable),L=A.find(W=>W.active),$=A.find(W=>W.id===y),Y=[L,$,...A].filter(Boolean).map(W=>W.ref.current);dE(Y,d)}}P.current=!1}),onBlur:q(e.onBlur,()=>w(!1))})})}),lE="RovingFocusGroupItem",uE=h.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=Le(),l=a||c,d=RV(lE,n),u=d.currentTabStopId===l,f=sE(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:y}=d;return h.useEffect(()=>{if(r)return m(),()=>g()},[r,m,g]),p.jsx(Mf.ItemSlot,{scope:n,id:l,focusable:r,active:o,children:p.jsx(ee.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:q(e.onMouseDown,v=>{r?d.onItemFocus(l):v.preventDefault()}),onFocus:q(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:q(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=LV(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=f().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(v.currentTarget);x=d.loop?FV(x,S+1):x.slice(S+1)}setTimeout(()=>dE(x))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:y!=null}):i})})});uE.displayName=lE;var jV={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $V(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LV(e,t,n){const r=$V(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return jV[r]}function dE(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function FV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ji=cE,$i=uE,_f=["Enter"," "],zV=["ArrowDown","PageUp","Home"],fE=["ArrowUp","PageDown","End"],BV=[...zV,...fE],WV={ltr:[..._f,"ArrowRight"],rtl:[..._f,"ArrowLeft"]},HV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Li="Menu",[Za,UV,VV]=vr(Li),[po,Fi]=Be(Li,[VV,Rn,In]),zi=Rn(),pE=In(),[mE,Pr]=po(Li),[qV,Bi]=po(Li),hE=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=zi(t),[c,l]=h.useState(null),d=h.useRef(!1),u=je(a),f=mn(o);return h.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),p.jsx(la,{...s,children:p.jsx(mE,{scope:t,open:n,onOpenChange:u,content:c,onContentChange:l,children:p.jsx(qV,{scope:t,onClose:h.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})};hE.displayName=Li;var KV="MenuAnchor",Wm=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=zi(n);return p.jsx(ua,{...o,...r,ref:t})});Wm.displayName=KV;var Hm="MenuPortal",[GV,gE]=po(Hm,{forceMount:void 0}),vE=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Pr(Hm,t);return p.jsx(GV,{scope:t,forceMount:n,children:p.jsx(We,{present:n||a.open,children:p.jsx(ao,{asChild:!0,container:o,children:r})})})};vE.displayName=Hm;var Zt="MenuContent",[YV,Um]=po(Zt),yE=h.forwardRef((e,t)=>{const n=gE(Zt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Pr(Zt,e.__scopeMenu),i=Bi(Zt,e.__scopeMenu);return p.jsx(Za.Provider,{scope:e.__scopeMenu,children:p.jsx(We,{present:r||a.open,children:p.jsx(Za.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(XV,{...o,ref:t}):p.jsx(ZV,{...o,ref:t})})})})}),XV=h.forwardRef((e,t)=>{const n=Pr(Zt,e.__scopeMenu),r=h.useRef(null),o=de(t,r);return h.useEffect(()=>{const a=r.current;if(a)return Mc(a)},[]),p.jsx(Vm,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ZV=h.forwardRef((e,t)=>{const n=Pr(Zt,e.__scopeMenu);return p.jsx(Vm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),QV=pr("MenuContent.ScrollLock"),Vm=h.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,onDismiss:m,disableOutsideScroll:g,...y}=e,v=Pr(Zt,n),b=Bi(Zt,n),w=zi(n),x=pE(n),S=UV(n),[P,M]=h.useState(null),E=h.useRef(null),_=de(t,E,v.onContentChange),T=h.useRef(0),I=h.useRef(""),A=h.useRef(0),L=h.useRef(null),$=h.useRef("right"),K=h.useRef(0),Y=g?si:h.Fragment,W=g?{as:QV,allowPinchZoom:!0}:void 0,G=U=>{const oe=I.current+U,ie=S().filter(D=>!D.disabled),H=document.activeElement,R=ie.find(D=>D.ref.current===H)?.textValue,z=ie.map(D=>D.textValue),F=uq(z,oe,R),X=ie.find(D=>D.textValue===F)?.ref.current;(function D(V){I.current=V,window.clearTimeout(T.current),V!==""&&(T.current=window.setTimeout(()=>D(""),1e3))})(oe),X&&setTimeout(()=>X.focus())};h.useEffect(()=>()=>window.clearTimeout(T.current),[]),Ec();const j=h.useCallback(U=>$.current===L.current?.side&&fq(U,L.current?.area),[]);return p.jsx(YV,{scope:n,searchRef:I,onItemEnter:h.useCallback(U=>{j(U)&&U.preventDefault()},[j]),onItemLeave:h.useCallback(U=>{j(U)||(E.current?.focus(),M(null))},[j]),onTriggerLeave:h.useCallback(U=>{j(U)&&U.preventDefault()},[j]),pointerGraceTimerRef:A,onPointerGraceIntentChange:h.useCallback(U=>{L.current=U},[]),children:p.jsx(Y,{...W,children:p.jsx(ii,{asChild:!0,trapped:o,onMountAutoFocus:q(a,U=>{U.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(yr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:u,onInteractOutside:f,onDismiss:m,children:p.jsx(ji,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:M,onEntryFocus:q(c,U=>{b.isUsingKeyboardRef.current||U.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Di,{role:"menu","aria-orientation":"vertical","data-state":IE(v.open),"data-radix-menu-content":"",dir:b.dir,...w,...y,ref:_,style:{outline:"none",...y.style},onKeyDown:q(y.onKeyDown,U=>{const ie=U.target.closest("[data-radix-menu-content]")===U.currentTarget,H=U.ctrlKey||U.altKey||U.metaKey,R=U.key.length===1;ie&&(U.key==="Tab"&&U.preventDefault(),!H&&R&&G(U.key));const z=E.current;if(U.target!==z||!BV.includes(U.key))return;U.preventDefault();const X=S().filter(D=>!D.disabled).map(D=>D.ref.current);fE.includes(U.key)&&X.reverse(),cq(X)}),onBlur:q(e.onBlur,U=>{U.currentTarget.contains(U.target)||(window.clearTimeout(T.current),I.current="")}),onPointerMove:q(e.onPointerMove,Qa(U=>{const oe=U.target,ie=K.current!==U.clientX;if(U.currentTarget.contains(oe)&&ie){const H=U.clientX>K.current?"right":"left";$.current=H,K.current=U.clientX}}))})})})})})})});yE.displayName=Zt;var JV="MenuGroup",qm=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ee.div,{role:"group",...r,ref:t})});qm.displayName=JV;var eq="MenuLabel",bE=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ee.div,{...r,ref:t})});bE.displayName=eq;var sc="MenuItem",Bb="menu.itemSelect",pl=h.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=h.useRef(null),i=Bi(sc,e.__scopeMenu),s=Um(sc,e.__scopeMenu),c=de(t,a),l=h.useRef(!1),d=()=>{const u=a.current;if(!n&&u){const f=new CustomEvent(Bb,{bubbles:!0,cancelable:!0});u.addEventListener(Bb,m=>r?.(m),{once:!0}),Ts(u,f),f.defaultPrevented?l.current=!1:i.onClose()}};return p.jsx(xE,{...o,ref:c,disabled:n,onClick:q(e.onClick,d),onPointerDown:u=>{e.onPointerDown?.(u),l.current=!0},onPointerUp:q(e.onPointerUp,u=>{l.current||u.currentTarget?.click()}),onKeyDown:q(e.onKeyDown,u=>{const f=s.searchRef.current!=="";n||f&&u.key===" "||_f.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});pl.displayName=sc;var xE=h.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Um(sc,n),s=pE(n),c=h.useRef(null),l=de(t,c),[d,u]=h.useState(!1),[f,m]=h.useState("");return h.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[a.children]),p.jsx(Za.ItemSlot,{scope:n,disabled:r,textValue:o??f,children:p.jsx($i,{asChild:!0,...s,focusable:!r,children:p.jsx(ee.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:l,onPointerMove:q(e.onPointerMove,Qa(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,Qa(g=>i.onItemLeave(g))),onFocus:q(e.onFocus,()=>u(!0)),onBlur:q(e.onBlur,()=>u(!1))})})})}),tq="MenuCheckboxItem",wE=h.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(ME,{scope:e.__scopeMenu,checked:n,children:p.jsx(pl,{role:"menuitemcheckbox","aria-checked":cc(n)?"mixed":n,...o,ref:t,"data-state":Ym(n),onSelect:q(o.onSelect,()=>r?.(cc(n)?!0:!n),{checkForDefaultPrevented:!1})})})});wE.displayName=tq;var SE="MenuRadioGroup",[nq,rq]=po(SE,{value:void 0,onValueChange:()=>{}}),CE=h.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=je(r);return p.jsx(nq,{scope:e.__scopeMenu,value:n,onValueChange:a,children:p.jsx(qm,{...o,ref:t})})});CE.displayName=SE;var EE="MenuRadioItem",PE=h.forwardRef((e,t)=>{const{value:n,...r}=e,o=rq(EE,e.__scopeMenu),a=n===o.value;return p.jsx(ME,{scope:e.__scopeMenu,checked:a,children:p.jsx(pl,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ym(a),onSelect:q(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});PE.displayName=EE;var Km="MenuItemIndicator",[ME,oq]=po(Km,{checked:!1}),_E=h.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=oq(Km,n);return p.jsx(We,{present:r||cc(a.checked)||a.checked===!0,children:p.jsx(ee.span,{...o,ref:t,"data-state":Ym(a.checked)})})});_E.displayName=Km;var aq="MenuSeparator",TE=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});TE.displayName=aq;var iq="MenuArrow",OE=h.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=zi(n);return p.jsx(Ri,{...o,...r,ref:t})});OE.displayName=iq;var Gm="MenuSub",[sq,kE]=po(Gm),AE=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Pr(Gm,t),i=zi(t),[s,c]=h.useState(null),[l,d]=h.useState(null),u=je(o);return h.useEffect(()=>(a.open===!1&&u(!1),()=>u(!1)),[a.open,u]),p.jsx(la,{...i,children:p.jsx(mE,{scope:t,open:r,onOpenChange:u,content:l,onContentChange:d,children:p.jsx(sq,{scope:t,contentId:Le(),triggerId:Le(),trigger:s,onTriggerChange:c,children:n})})})};AE.displayName=Gm;var Aa="MenuSubTrigger",NE=h.forwardRef((e,t)=>{const n=Pr(Aa,e.__scopeMenu),r=Bi(Aa,e.__scopeMenu),o=kE(Aa,e.__scopeMenu),a=Um(Aa,e.__scopeMenu),i=h.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},d=h.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.useEffect(()=>d,[d]),h.useEffect(()=>{const u=s.current;return()=>{window.clearTimeout(u),c(null)}},[s,c]),p.jsx(Wm,{asChild:!0,...l,children:p.jsx(xE,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":IE(n.open),...e,ref:_n(t,o.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,Qa(u=>{a.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:q(e.onPointerLeave,Qa(u=>{d();const f=n.content?.getBoundingClientRect();if(f){const m=n.content?.dataset.side,g=m==="right",y=g?-5:5,v=f[g?"left":"right"],b=f[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:u.clientX+y,y:u.clientY},{x:v,y:f.top},{x:b,y:f.top},{x:b,y:f.bottom},{x:v,y:f.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(u),u.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,u=>{const f=a.searchRef.current!=="";e.disabled||f&&u.key===" "||WV[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});NE.displayName=Aa;var DE="MenuSubContent",RE=h.forwardRef((e,t)=>{const n=gE(Zt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Pr(Zt,e.__scopeMenu),i=Bi(Zt,e.__scopeMenu),s=kE(DE,e.__scopeMenu),c=h.useRef(null),l=de(t,c);return p.jsx(Za.Provider,{scope:e.__scopeMenu,children:p.jsx(We,{present:r||a.open,children:p.jsx(Za.Slot,{scope:e.__scopeMenu,children:p.jsx(Vm,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:l,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&c.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:q(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:q(e.onKeyDown,d=>{const u=d.currentTarget.contains(d.target),f=HV[i.dir].includes(d.key);u&&f&&(a.onOpenChange(!1),s.trigger?.focus(),d.preventDefault())})})})})})});RE.displayName=DE;function IE(e){return e?"open":"closed"}function cc(e){return e==="indeterminate"}function Ym(e){return cc(e)?"indeterminate":e?"checked":"unchecked"}function cq(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function lq(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uq(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=lq(e,Math.max(a,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dq(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],l=s.x,d=s.y,u=c.x,f=c.y;d>r!=f>r&&n<(u-l)*(r-d)/(f-d)+l&&(o=!o)}return o}function fq(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dq(n,t)}function Qa(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xm=hE,Zm=Wm,Qm=vE,Jm=yE,eh=qm,th=bE,nh=pl,rh=wE,oh=CE,ah=PE,ih=_E,sh=TE,ch=OE,pq=AE,lh=NE,uh=RE,dh="ContextMenu",[mq,jQ]=Be(dh,[Fi]),_t=Fi(),[hq,jE]=mq(dh),$E=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[i,s]=h.useState(!1),c=_t(t),l=je(r),d=h.useCallback(u=>{s(u),l(u)},[l]);return p.jsx(hq,{scope:t,open:i,onOpenChange:d,modal:a,children:p.jsx(Xm,{...c,dir:o,open:i,onOpenChange:d,modal:a,children:n})})};$E.displayName=dh;var LE="ContextMenuTrigger",FE=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=jE(LE,n),i=_t(n),s=h.useRef({x:0,y:0}),c=h.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=h.useRef(0),d=h.useCallback(()=>window.clearTimeout(l.current),[]),u=f=>{s.current={x:f.clientX,y:f.clientY},a.onOpenChange(!0)};return h.useEffect(()=>d,[d]),h.useEffect(()=>void(r&&d()),[r,d]),p.jsxs(p.Fragment,{children:[p.jsx(Zm,{...i,virtualRef:c}),p.jsx(ee.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:q(e.onContextMenu,f=>{d(),u(f),f.preventDefault()}),onPointerDown:r?e.onPointerDown:q(e.onPointerDown,gs(f=>{d(),l.current=window.setTimeout(()=>u(f),700)})),onPointerMove:r?e.onPointerMove:q(e.onPointerMove,gs(d)),onPointerCancel:r?e.onPointerCancel:q(e.onPointerCancel,gs(d)),onPointerUp:r?e.onPointerUp:q(e.onPointerUp,gs(d))})]})});FE.displayName=LE;var gq="ContextMenuPortal",zE=e=>{const{__scopeContextMenu:t,...n}=e,r=_t(t);return p.jsx(Qm,{...r,...n})};zE.displayName=gq;var BE="ContextMenuContent",WE=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=jE(BE,n),a=_t(n),i=h.useRef(!1);return p.jsx(Jm,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),!s.defaultPrevented&&i.current&&s.preventDefault(),i.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),!s.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});WE.displayName=BE;var vq="ContextMenuGroup",yq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(eh,{...o,...r,ref:t})});yq.displayName=vq;var bq="ContextMenuLabel",xq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(th,{...o,...r,ref:t})});xq.displayName=bq;var wq="ContextMenuItem",HE=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(nh,{...o,...r,ref:t})});HE.displayName=wq;var Sq="ContextMenuCheckboxItem",Cq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(rh,{...o,...r,ref:t})});Cq.displayName=Sq;var Eq="ContextMenuRadioGroup",Pq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(oh,{...o,...r,ref:t})});Pq.displayName=Eq;var Mq="ContextMenuRadioItem",_q=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(ah,{...o,...r,ref:t})});_q.displayName=Mq;var Tq="ContextMenuItemIndicator",Oq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(ih,{...o,...r,ref:t})});Oq.displayName=Tq;var kq="ContextMenuSeparator",Aq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(sh,{...o,...r,ref:t})});Aq.displayName=kq;var Nq="ContextMenuArrow",Dq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(ch,{...o,...r,ref:t})});Dq.displayName=Nq;var Rq="ContextMenuSubTrigger",Iq=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(lh,{...o,...r,ref:t})});Iq.displayName=Rq;var jq="ContextMenuSubContent",$q=h.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=_t(n);return p.jsx(uh,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$q.displayName=jq;function gs(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Lq=$E,Fq=FE,zq=zE,Bq=WE,Wq=HE;function Hq({...e}){return p.jsx(Lq,{"data-slot":"context-menu",...e})}function Uq({...e}){return p.jsx(Fq,{"data-slot":"context-menu-trigger",...e})}function Vq({className:e,...t}){return p.jsx(zq,{children:p.jsx(Bq,{"data-slot":"context-menu-content",className:O("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-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...t})})}function qq({className:e,inset:t,variant:n="default",...r}){return p.jsx(Wq,{"data-slot":"context-menu-item","data-inset":t,"data-variant":n,className:O("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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})}const Kq=xt("flex flex-col sm:flex-row gap-4 bg-grey-100 dark:bg-grey-800 overflow-hidden rounded-xl my-4",{variants:{variant:{default:"",destructive:""}},defaultVariants:{variant:"default"}});function Gq({className:e,variant:t,...n}){return p.jsx("article",{"data-slot":"download",className:O(Kq({variant:t}),e),...n})}function Yq({className:e,src:t,...n}){return t?p.jsx("img",{"data-slot":"download-image",className:O("h-32 w-20 object-cover rounded-sm",e),src:t,...n}):null}function Xq({className:e,...t}){return p.jsx("div",{"data-slot":"download-content",className:O("flex flex-row gap-4 p-4 sm:grow",e),...t})}function Zq({className:e,...t}){return p.jsx("div",{"data-slot":"download-main",className:O(e),...t})}function Qq({className:e,children:t,...n}){return t?p.jsx("h3",{"data-slot":"download-title",className:O("pt-0 m-0",e),...n,children:t}):null}function Jq({className:e,children:t,...n}){return t?p.jsx("p",{"data-slot":"download-description",className:O("my-4 text-sm",e),...n,children:t}):null}function eK({className:e,...t}){return p.jsx("footer",{"data-slot":"download-footer",className:O("flex flex-row sm:flex-col h-10 sm:h-auto sm:min-w-[150px] items-start sm:items-center sm:grow-0",e),...t})}function tK({className:e,children:t,href:n,...r}){return!n||!t?null:p.jsxs("a",{"data-slot":"download-download-url",className:O("flex flex-row h-full sm:w-full gap-2 items-center hover:cursor-pointer hover:text-grey-950 hover:underline w-1/2 justify-center bg-grey-300 text-grey-900 p-4 dark:bg-grey-700 dark:text-grey-100",e),href:n,...r,children:[p.jsx(fO,{className:"shrink-0"}),p.jsx("span",{children:t})]})}function nK({className:e,children:t,href:n,...r}){return!n||!t?null:p.jsxs("a",{"data-slot":"download-order-url",className:O("flex flex-row h-full sm:w-full gap-2 items-center hover:cursor-pointer hover:text-grey-950 hover:underline w-1/2 justify-center bg-grey-200 text-grey-900 p-4 dark:bg-grey-600 dark:text-grey-100",e),href:n,...r,children:[p.jsx(PO,{className:"shrink-0"}),p.jsx("span",{children:t})]})}function rK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const UE=C.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Wi=()=>{const e=C.useContext(UE);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};rK(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
262
262
|
[data-state=closed]
|
263
|
-
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function oK(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function aK(){return fh(/^Mac/)}function iK(){return fh(/^iPhone/)}function Wb(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function sK(){return fh(/^iPad/)||aK()&&navigator.maxTouchPoints>1}function VE(){return iK()||sK()}function fh(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const cK=24,lK=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Hb(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Sd=typeof document<"u"&&window.visualViewport;function Ub(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function qE(e){for(Ub(e)&&(e=e.parentElement);e&&!Ub(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const uK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vs=0,Cd;function dK(e={}){let{isDisabled:t}=e;lK(()=>{if(!t)return vs++,vs===1&&VE()&&(Cd=fK()),()=>{vs--,vs===0&&Cd?.()}},[t])}function fK(){let e,t=0,n=u=>{e=qE(u.target),!(e===document.documentElement&&e===document.body)&&(t=u.changedTouches[0].pageY)},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}let f=u.changedTouches[0].pageY,m=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((m<=0&&f>t||m>=g&&f<t)&&u.preventDefault(),t=f)},o=u=>{let f=u.target;Tf(f)&&f!==document.activeElement&&(u.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},a=u=>{let f=u.target;Tf(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",Sd&&(Sd.height<window.innerHeight?requestAnimationFrame(()=>{Vb(f)}):Sd.addEventListener("resize",()=>Vb(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=Hb(pK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=Hb(Ea(document,"touchstart",n,{passive:!1,capture:!0}),Ea(document,"touchmove",r,{passive:!1,capture:!0}),Ea(document,"touchend",o,{passive:!1,capture:!0}),Ea(document,"focus",a,!0),Ea(window,"scroll",i));return()=>{l(),d(),window.scrollTo(s,c)}}function pK(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ea(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Vb(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=qE(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const i=n.getBoundingClientRect().bottom+cK;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function Tf(e){return e instanceof HTMLInputElement&&!uK.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function mK(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hK(...e){return t=>e.forEach(n=>mK(n,t))}function KE(...e){return h.useCallback(hK(...e),e)}const GE=new WeakMap;function ut(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&GE.set(e,r)}function gK(e,t){if(!e||!(e instanceof HTMLElement))return;let n=GE.get(e);n&&(e.style[t]=n[t])}const ot=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function ys(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[ot(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[ot(t)?5:4]):null)}function vK(e){return 8*(Math.log(e+1)-2)}function Ed(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function yK(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Ye={DURATION:.5,EASE:[.32,.72,0,1]},YE=.4,bK=.25,xK=100,XE=8,Rr=16,Of=26,Pd="vaul-dragging";function ZE(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function wK({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),a=ZE(t);return C.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function QE({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=wK({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=ZE(n),c=C.useCallback(l=>{if(a){const u=typeof l=="function"?l(e):l;u!==e&&s(u)}else o(l)},[a,e,o,s]);return[i,c]}function SK({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:l}){const[d,u]=QE({prop:e,defaultProp:n?.[0],onChange:t}),[f,m]=C.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);C.useEffect(()=>{function E(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const g=C.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),y=C.useMemo(()=>{var E;return(E=n?.findIndex(_=>_===d))!=null?E:null},[n,d]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===d||!n,b=C.useMemo(()=>{const E=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var _;return(_=n?.map(T=>{const I=typeof T=="string";let A=0;if(I&&(A=parseInt(T,10)),ot(s)){const $=I?A:f?T*E.height:0;return f?s==="bottom"?E.height-$:-E.height+$:$}const L=I?A:f?T*E.width:0;return f?s==="right"?E.width-L:-E.width+L:L}))!=null?_:[]},[n,f,c]),w=C.useMemo(()=>y!==null?b?.[y]:null,[b,y]),x=C.useCallback(E=>{var _;const T=(_=b?.findIndex(I=>I===E))!=null?_:null;i(T),ut(r.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(s)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),b&&T!==b.length-1&&a!==void 0&&T!==a&&T<a?ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"0"}):ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"1"}),u(n?.[Math.max(T,0)])},[r.current,n,b,a,o,u]);C.useEffect(()=>{if(d||e){var E;const _=(E=n?.findIndex(T=>T===e||T===d))!=null?E:-1;b&&_!==-1&&typeof b[_]=="number"&&x(b[_])}},[d,e,n,b,x]);function S({draggedDistance:E,closeDrawer:_,velocity:T,dismissible:I}){if(a===void 0)return;const A=s==="bottom"||s==="right"?(w??0)-E:(w??0)+E,L=y===a-1,$=y===0,K=E>0;if(L&&ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`}),!l&&T>2&&!K){I?_():x(b[0]);return}if(!l&&T>2&&K&&b&&n){x(b[n.length-1]);return}const Y=b?.reduce((G,j)=>typeof G!="number"||typeof j!="number"?G:Math.abs(j-A)<Math.abs(G-A)?j:G),W=ot(s)?window.innerHeight:window.innerWidth;if(T>YE&&Math.abs(E)<W*.4){const G=K?1:-1;if(G>0&&g&&n){x(b[n.length-1]);return}if($&&G<0&&I&&_(),y===null)return;x(b[y+G]);return}x(Y)}function P({draggedDistance:E}){if(w===null)return;const _=s==="bottom"||s==="right"?w-E:w+E;(s==="bottom"||s==="right")&&_<b[b.length-1]||(s==="top"||s==="left")&&_>b[b.length-1]||ut(r.current,{transform:ot(s)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function M(E,_){if(!n||typeof y!="number"||!b||a===void 0)return null;const T=y===a-1;if(y>=a&&_)return 0;if(T&&!_)return 1;if(!v&&!T)return null;const A=T?y+1:y-1,L=T?b[A]-b[A-1]:b[A+1]-b[A],$=E/Math.abs(L);return T?1-$:$}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:v,getPercentageDragged:M,setActiveSnapPoint:u,activeSnapPointIndex:y,onRelease:S,onDrag:P,snapPointsOffset:b}}const CK=()=>()=>{};function EK(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Wi(),a=C.useRef(null),i=C.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Of)/window.innerWidth}C.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;yK(r&&!o?Ed(document.body,{background:"black"}):CK,Ed(c,{transformOrigin:ot(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Ye.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ye.EASE.join(",")})`}));const l=Ed(c,{borderRadius:`${XE}px`,overflow:"hidden",...ot(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{l(),a.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Ye.DURATION*1e3)}}},[t,n,i])}let Pa=null;function PK({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=C.useState(()=>typeof window<"u"?window.location.href:""),c=C.useRef(0),l=C.useCallback(()=>{if(Wb()&&Pa===null&&e&&!a){Pa={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:u,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-u}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=f-window.innerHeight;m&&c.current>=f&&(document.body.style.top=`${-(c.current+m)}px`)}),300)}},[e]),d=C.useCallback(()=>{if(Wb()&&Pa!==null&&!a){const u=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Pa),window.requestAnimationFrame(()=>{if(o&&i!==window.location.href){s(window.location.href);return}window.scrollTo(f,u)}),Pa=null}},[i]);return C.useEffect(()=>{function u(){c.current=window.scrollY}return u(),window.addEventListener("scroll",u),()=>{window.removeEventListener("scroll",u)}},[]),C.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),C.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,i,t,n,l,d]),{restorePositionSetting:d}}function MK({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=bK,scrollLockTimeout:l=xK,dismissible:d=!0,handleOnly:u=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:g,fixed:y,modal:v=!0,onClose:b,nested:w,noBodyStyles:x=!1,direction:S="bottom",defaultOpen:P=!1,disablePreventScroll:M=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:_=!1,repositionInputs:T=!0,onAnimationEnd:I,container:A,autoFocus:L=!1}){var $,K;const[Y=!1,W]=QE({defaultProp:P,prop:e,onChange:re=>{t?.(re),!re&&!w&&wt(),setTimeout(()=>{I?.(re)},Ye.DURATION*1e3),re&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),re||(document.body.style.pointerEvents="auto")}}),[G,j]=C.useState(!1),[U,oe]=C.useState(!1),[ie,H]=C.useState(!1),R=C.useRef(null),z=C.useRef(null),F=C.useRef(null),X=C.useRef(null),D=C.useRef(null),V=C.useRef(!1),B=C.useRef(null),Z=C.useRef(0),J=C.useRef(!1),N=C.useRef(!P),ne=C.useRef(0),k=C.useRef(null),te=C.useRef((($=k.current)==null?void 0:$.getBoundingClientRect().height)||0),ue=C.useRef(((K=k.current)==null?void 0:K.getBoundingClientRect().width)||0),ge=C.useRef(0),be=C.useCallback(re=>{a&&re===Te.length-1&&(z.current=new Date)},[]),{activeSnapPoint:ye,activeSnapPointIndex:Pe,setActiveSnapPoint:Ke,onRelease:Ee,snapPointsOffset:Te,onDrag:tt,shouldFade:ht,getPercentageDragged:st}=SK({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:g,drawerRef:k,fadeFromIndex:f,overlayRef:R,onSnapPointChange:be,direction:S,container:A,snapToSequentialPoint:E});dK({isDisabled:!Y||U||!v||ie||!G||!T||!M});const{restorePositionSetting:wt}=PK({isOpen:Y,modal:v,nested:w??!1,hasBeenOpened:G,preventScrollRestoration:_,noBodyStyles:x});function Ot(){return(window.innerWidth-Of)/window.innerWidth}function kt(re){var ae,he;!d&&!a||k.current&&!k.current.contains(re.target)||(te.current=((ae=k.current)==null?void 0:ae.getBoundingClientRect().height)||0,ue.current=((he=k.current)==null?void 0:he.getBoundingClientRect().width)||0,oe(!0),F.current=new Date,VE()&&window.addEventListener("touchend",()=>V.current=!1,{once:!0}),re.target.setPointerCapture(re.pointerId),Z.current=ot(S)?re.pageY:re.pageX)}function nt(re,ae){var he;let ve=re;const pe=(he=window.getSelection())==null?void 0:he.toString(),fe=k.current?ys(k.current,S):null,Se=new Date;if(ve.tagName==="SELECT"||ve.hasAttribute("data-vaul-no-drag")||ve.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(z.current&&Se.getTime()-z.current.getTime()<500)return!1;if(fe!==null&&(S==="bottom"?fe>0:fe<0))return!0;if(pe&&pe.length>0)return!1;if(D.current&&Se.getTime()-D.current.getTime()<l&&fe===0||ae)return D.current=Se,!1;for(;ve;){if(ve.scrollHeight>ve.clientHeight){if(ve.scrollTop!==0)return D.current=new Date,!1;if(ve.getAttribute("role")==="dialog")return!0}ve=ve.parentNode}return!0}function qt(re){if(k.current&&U){const ae=S==="bottom"||S==="right"?1:-1,he=(Z.current-(ot(S)?re.pageY:re.pageX))*ae,ve=he>0,pe=a&&!d&&!ve;if(pe&&Pe===0)return;const fe=Math.abs(he),Se=document.querySelector("[data-vaul-drawer-wrapper]"),Oe=S==="bottom"||S==="top"?te.current:ue.current;let _e=fe/Oe;const St=st(fe,ve);if(St!==null&&(_e=St),pe&&_e>=1||!V.current&&!nt(re.target,ve))return;if(k.current.classList.add(Pd),V.current=!0,ut(k.current,{transition:"none"}),ut(R.current,{transition:"none"}),a&&tt({draggedDistance:he}),ve&&!a){const Ge=vK(he),Ln=Math.min(Ge*-1,0)*ae;ut(k.current,{transform:ot(S)?`translate3d(0, ${Ln}px, 0)`:`translate3d(${Ln}px, 0, 0)`});return}const Fe=1-_e;if((ht||f&&Pe===f-1)&&(r?.(re,_e),ut(R.current,{opacity:`${Fe}`,transition:"none"},!0)),Se&&R.current&&i){const Ge=Math.min(Ot()+_e*(1-Ot()),1),Ln=8-_e*8,At=Math.max(0,14-_e*14);ut(Se,{borderRadius:`${Ln}px`,transform:ot(S)?`scale(${Ge}) translate3d(0, ${At}px, 0)`:`scale(${Ge}) translate3d(${At}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ge=fe*ae;ut(k.current,{transform:ot(S)?`translate3d(0, ${Ge}px, 0)`:`translate3d(${Ge}px, 0, 0)`})}}}C.useEffect(()=>{window.requestAnimationFrame(()=>{N.current=!0})},[]),C.useEffect(()=>{var re;function ae(){if(!k.current||!T)return;const he=document.activeElement;if(Tf(he)||J.current){var ve;const pe=((ve=window.visualViewport)==null?void 0:ve.height)||0,fe=window.innerHeight;let Se=fe-pe;const Oe=k.current.getBoundingClientRect().height||0,_e=Oe>fe*.8;ge.current||(ge.current=Oe);const St=k.current.getBoundingClientRect().top;if(Math.abs(ne.current-Se)>60&&(J.current=!J.current),a&&a.length>0&&Te&&Pe){const Fe=Te[Pe]||0;Se+=Fe}if(ne.current=Se,Oe>pe||J.current){const Fe=k.current.getBoundingClientRect().height;let Ge=Fe;Fe>pe&&(Ge=pe-(_e?St:Of)),y?k.current.style.height=`${Fe-Math.max(Se,0)}px`:k.current.style.height=`${Math.max(Ge,pe-St)}px`}else oK()||(k.current.style.height=`${ge.current}px`);a&&a.length>0&&!J.current?k.current.style.bottom="0px":k.current.style.bottom=`${Math.max(Se,0)}px`}}return(re=window.visualViewport)==null||re.addEventListener("resize",ae),()=>{var he;return(he=window.visualViewport)==null?void 0:he.removeEventListener("resize",ae)}},[Pe,a,Te]);function rt(re){nn(),b?.(),re||W(!1),setTimeout(()=>{a&&Ke(a[0])},Ye.DURATION*1e3)}function ct(){if(!k.current)return;const re=document.querySelector("[data-vaul-drawer-wrapper]"),ae=ys(k.current,S);ut(k.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`}),ut(R.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"1"}),i&&ae&&ae>0&&Y&&ut(re,{borderRadius:`${XE}px`,overflow:"hidden",...ot(S)?{transform:`scale(${Ot()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ot()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ye.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ye.EASE.join(",")})`},!0)}function nn(){!U||!k.current||(k.current.classList.remove(Pd),V.current=!1,oe(!1),X.current=new Date)}function yn(re){if(!U||!k.current)return;k.current.classList.remove(Pd),V.current=!1,oe(!1),X.current=new Date;const ae=ys(k.current,S);if(!re||!nt(re.target,!1)||!ae||Number.isNaN(ae)||F.current===null)return;const he=X.current.getTime()-F.current.getTime(),ve=Z.current-(ot(S)?re.pageY:re.pageX),pe=Math.abs(ve)/he;if(pe>.05&&(H(!0),setTimeout(()=>{H(!1)},200)),a){Ee({draggedDistance:ve*(S==="bottom"||S==="right"?1:-1),closeDrawer:rt,velocity:pe,dismissible:d}),o?.(re,!0);return}if(S==="bottom"||S==="right"?ve>0:ve<0){ct(),o?.(re,!0);return}if(pe>YE){rt(),o?.(re,!1);return}var fe;const Se=Math.min((fe=k.current.getBoundingClientRect().height)!=null?fe:0,window.innerHeight);var Oe;const _e=Math.min((Oe=k.current.getBoundingClientRect().width)!=null?Oe:0,window.innerWidth),St=S==="left"||S==="right";if(Math.abs(ae)>=(St?_e:Se)*c){rt(),o?.(re,!1);return}o?.(re,!0),ct()}C.useEffect(()=>(Y&&(ut(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{gK(document.documentElement,"scrollBehavior")}),[Y]);function $n(re){const ae=re?(window.innerWidth-Rr)/window.innerWidth:1,he=re?-Rr:0;B.current&&window.clearTimeout(B.current),ut(k.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(S)?`scale(${ae}) translate3d(0, ${he}px, 0)`:`scale(${ae}) translate3d(${he}px, 0, 0)`}),!re&&k.current&&(B.current=setTimeout(()=>{const ve=ys(k.current,S);ut(k.current,{transition:"none",transform:ot(S)?`translate3d(0, ${ve}px, 0)`:`translate3d(${ve}px, 0, 0)`})},500))}function Ar(re,ae){if(ae<0)return;const he=(window.innerWidth-Rr)/window.innerWidth,ve=he+ae*(1-he),pe=-Rr+ae*Rr;ut(k.current,{transform:ot(S)?`scale(${ve}) translate3d(0, ${pe}px, 0)`:`scale(${ve}) translate3d(${pe}px, 0, 0)`,transition:"none"})}function xe(re,ae){const he=ot(S)?window.innerHeight:window.innerWidth,ve=ae?(he-Rr)/he:1,pe=ae?-Rr:0;ae&&ut(k.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(S)?`scale(${ve}) translate3d(0, ${pe}px, 0)`:`scale(${ve}) translate3d(${pe}px, 0, 0)`})}return C.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),C.createElement(ci,{defaultOpen:P,onOpenChange:re=>{!d&&!re||(re?j(!0):rt(!0),W(re))},open:Y},C.createElement(UE.Provider,{value:{activeSnapPoint:ye,snapPoints:a,setActiveSnapPoint:Ke,drawerRef:k,overlayRef:R,onOpenChange:t,onPress:kt,onRelease:yn,onDrag:qt,dismissible:d,shouldAnimate:N,handleOnly:u,isOpen:Y,isDragging:U,shouldFade:ht,closeDrawer:rt,onNestedDrag:Ar,onNestedOpenChange:$n,onNestedRelease:xe,keyboardIsOpen:J,modal:v,snapPointsOffset:Te,activeSnapPointIndex:Pe,direction:S,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:x,container:A,autoFocus:L}},n))}const JE=C.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:c}=Wi(),l=KE(t,n),d=r&&r.length>0;if(!s)return null;const u=C.useCallback(f=>o(f),[o]);return C.createElement(ui,{onMouseUp:u,ref:l,"data-vaul-overlay":"","data-vaul-snap-points":i&&d?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});JE.displayName="Drawer.Overlay";const eP=C.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:d,activeSnapPointIndex:u,modal:f,isOpen:m,direction:g,snapPoints:y,container:v,handleOnly:b,shouldAnimate:w,autoFocus:x}=Wi(),[S,P]=C.useState(!1),M=KE(o,a),E=C.useRef(null),_=C.useRef(null),T=C.useRef(!1),I=y&&y.length>0;EK();const A=($,K,Y=0)=>{if(T.current)return!0;const W=Math.abs($.y),G=Math.abs($.x),j=G>W,U=["bottom","right"].includes(K)?1:-1;if(K==="left"||K==="right"){if(!($.x*U<0)&&G>=0&&G<=Y)return j}else if(!($.y*U<0)&&W>=0&&W<=Y)return!j;return T.current=!0,!0};C.useEffect(()=>{I&&window.requestAnimationFrame(()=>{P(!0)})},[]);function L($){E.current=null,T.current=!1,s($)}return C.createElement(di,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":m&&I?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":w?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[u??0]}px`,...t}:t,onPointerDown:$=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,$),E.current={x:$.pageX,y:$.pageY},i($))},onOpenAutoFocus:$=>{n?.($),x||$.preventDefault()},onPointerDownOutside:$=>{if(e?.($),!f||$.defaultPrevented){$.preventDefault();return}l.current&&(l.current=!1)},onFocusOutside:$=>{if(!f){$.preventDefault();return}},onPointerMove:$=>{if(_.current=$,b||(r.onPointerMove==null||r.onPointerMove.call(r,$),!E.current))return;const K=$.pageY-E.current.y,Y=$.pageX-E.current.x,W=$.pointerType==="touch"?10:2;A({x:Y,y:K},g,W)?c($):(Math.abs(Y)>W||Math.abs(K)>W)&&(E.current=null)},onPointerUp:$=>{r.onPointerUp==null||r.onPointerUp.call(r,$),E.current=null,T.current=!1,s($)},onPointerOut:$=>{r.onPointerOut==null||r.onPointerOut.call(r,$),L(_.current)},onContextMenu:$=>{r.onContextMenu==null||r.onContextMenu.call(r,$),_.current&&L(_.current)}})});eP.displayName="Drawer.Content";const _K=250,TK=120,OK=C.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:d,isOpen:u,onPress:f,onDrag:m}=Wi(),g=C.useRef(null),y=C.useRef(!1);function v(){if(y.current){x();return}window.setTimeout(()=>{b()},TK)}function b(){if(a||e||y.current){x();return}if(x(),!i||i.length===0){l||o();return}if(s===i[i.length-1]&&l){o();return}const P=i.findIndex(E=>E===s);if(P===-1)return;const M=i[P+1];c(M)}function w(){g.current=window.setTimeout(()=>{y.current=!0},_K)}function x(){g.current&&window.clearTimeout(g.current),y.current=!1}return C.createElement("div",{onClick:v,onPointerCancel:x,onPointerDown:S=>{d&&f(S),w()},onPointerMove:S=>{d&&m(S)},ref:r,"data-vaul-drawer-visible":u?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},C.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});OK.displayName="Drawer.Handle";function kK(e){const t=Wi(),{container:n=t.container,...r}=e;return C.createElement(li,{container:n,...r})}const Mr={Root:MK,Content:eP,Overlay:JE,Trigger:Tc,Portal:kK,Close:Xo,Title:Oc,Description:kc};function AK({...e}){return p.jsx(Mr.Root,{"data-slot":"drawer",...e})}function NK({...e}){return p.jsx(Mr.Trigger,{"data-slot":"drawer-trigger",...e})}function DK({...e}){return p.jsx(Mr.Portal,{"data-slot":"drawer-portal",...e})}function RK({...e}){return p.jsx(Mr.Close,{"data-slot":"drawer-close",...e})}function IK({className:e,...t}){return p.jsx(Mr.Overlay,{"data-slot":"drawer-overlay",className:O("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/50",e),...t})}function jK({className:e,children:t,...n}){return p.jsxs(DK,{"data-slot":"drawer-portal",children:[p.jsx(IK,{}),p.jsxs(Mr.Content,{"data-slot":"drawer-content",className:O("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[p.jsx("div",{className:"bg-accent mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function $K({className:e,...t}){return p.jsx("div",{"data-slot":"drawer-header",className:O("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function LK({className:e,...t}){return p.jsx("div",{"data-slot":"drawer-footer",className:O("mt-auto flex flex-col gap-2 p-4",e),...t})}function FK({className:e,...t}){return p.jsx(Mr.Title,{"data-slot":"drawer-title",className:O("text-foreground font-semibold",e),...t})}function zK({className:e,...t}){return p.jsx(Mr.Description,{"data-slot":"drawer-description",className:O("text-muted-foreground text-sm",e),...t})}var ml="DropdownMenu",[BK,$Q]=Be(ml,[Fi]),Tt=Fi(),[WK,tP]=BK(ml),nP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Tt(t),l=h.useRef(null),[d,u]=Qe({prop:o,defaultProp:a??!1,onChange:i,caller:ml});return p.jsx(WK,{scope:t,triggerId:Le(),triggerRef:l,contentId:Le(),open:d,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(f=>!f),[u]),modal:s,children:p.jsx(Xm,{...c,open:d,onOpenChange:u,dir:r,modal:s,children:n})})};nP.displayName=ml;var rP="DropdownMenuTrigger",oP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=tP(rP,n),i=Tt(n);return p.jsx(Zm,{asChild:!0,...i,children:p.jsx(ee.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:_n(t,a.triggerRef),onPointerDown:q(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:q(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});oP.displayName=rP;var HK="DropdownMenuPortal",aP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tt(t);return p.jsx(Qm,{...r,...n})};aP.displayName=HK;var iP="DropdownMenuContent",sP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tP(iP,n),a=Tt(n),i=h.useRef(!1);return p.jsx(Jm,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,s=>{i.current||o.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:q(e.onInteractOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;(!o.modal||d)&&(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)"}})});sP.displayName=iP;var UK="DropdownMenuGroup",VK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(eh,{...o,...r,ref:t})});VK.displayName=UK;var qK="DropdownMenuLabel",cP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(th,{...o,...r,ref:t})});cP.displayName=qK;var KK="DropdownMenuItem",lP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(nh,{...o,...r,ref:t})});lP.displayName=KK;var GK="DropdownMenuCheckboxItem",YK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(rh,{...o,...r,ref:t})});YK.displayName=GK;var XK="DropdownMenuRadioGroup",ZK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(oh,{...o,...r,ref:t})});ZK.displayName=XK;var QK="DropdownMenuRadioItem",JK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ah,{...o,...r,ref:t})});JK.displayName=QK;var eG="DropdownMenuItemIndicator",tG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ih,{...o,...r,ref:t})});tG.displayName=eG;var nG="DropdownMenuSeparator",uP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(sh,{...o,...r,ref:t})});uP.displayName=nG;var rG="DropdownMenuArrow",oG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ch,{...o,...r,ref:t})});oG.displayName=rG;var aG="DropdownMenuSubTrigger",iG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(lh,{...o,...r,ref:t})});iG.displayName=aG;var sG="DropdownMenuSubContent",cG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(uh,{...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)"}})});cG.displayName=sG;var lG=nP,uG=oP,dG=aP,fG=sP,pG=cP,mG=lP,hG=uP;function dP({...e}){return p.jsx(lG,{"data-slot":"dropdown-menu",...e})}function fP({...e}){return p.jsx(uG,{"data-slot":"dropdown-menu-trigger",...e})}function pP({className:e,sideOffset:t=4,...n}){return p.jsx(dG,{children:p.jsx(fG,{"data-slot":"dropdown-menu-content",sideOffset:t,className:O("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] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md",e),...n})})}function Ps({className:e,inset:t,variant:n="default",...r}){return p.jsx(mG,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:O("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-base 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 gG({className:e,inset:t,...n}){return p.jsx(pG,{"data-slot":"dropdown-menu-label","data-inset":t,className:O("px-2 py-1.5 text-base font-medium data-[inset]:pl-8",e),...n})}function vG({className:e,...t}){return p.jsx(hG,{"data-slot":"dropdown-menu-separator",className:O("bg-border -mx-1 my-1 h-px",e),...t})}const yG=xt("bg-blue-100 rounded-xl dark:bg-blue-950",{variants:{variant:{default:""}}}),ph=C.createContext(void 0);function bG({className:e,variant:t,children:n,...r}){const[o,a]=C.useState(!1),i=()=>a(s=>!s);return p.jsx(ph.Provider,{value:{expanded:o,toggle:i},children:p.jsx("div",{"data-slot":"fact-box",className:O("fact-box",yG({variant:t}),e),...r,children:n})})}function xG({className:e,...t}){return p.jsx("h3",{"data-slot":"fact-box-title",className:O("text-2xl font-bold mt-0 mb-4",e),...t})}function wG({className:e,...t}){return p.jsx("div",{"data-slot":"fact-box-content",className:O("p-8",e),...t})}function SG({className:e,...t}){const r=C.useContext(ph)?.expanded;return p.jsx("div",{"data-slot":"fact-box-content",className:O("relative ",r?"h-auto":"h-[80px] overflow-hidden [mask-image:linear-gradient(to_bottom,black,transparent)]",e),...t})}function CG({className:e,expandText:t,contractText:n,...r}){const o=C.useContext(ph);if(!o)return null;const{expanded:a,toggle:i}=o;return p.jsx("div",{"data-slot":"fact-box-footer",className:O("flex justify-center mt-4 relative",e),...r,children:p.jsxs(An,{onClick:i,className:O("transition-all duration-200 w-10 h-10 absolute bottom-0 translate-y-1/2",a?"rotate-180":""),children:[p.jsx(JT,{}),p.jsx("span",{className:"sr-only",children:a?t:n})]})})}const EG={theme:"system",setTheme:()=>null},mP=C.createContext(EG);function PG({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,a]=C.useState(()=>localStorage.getItem(n)||t);C.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),o==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(c);return}s.classList.add(o)},[o]);const i={theme:o,setTheme:s=>{localStorage.setItem(n,s),a(s)}};return p.jsx(mP.Provider,{...r,value:i,children:e})}const mh=()=>{const e=C.useContext(mP);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function hP({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",className:O("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border border-border flex h-11 w-full min-w-0 rounded-md bg-input dark:bg-input/10 px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-md","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function hh({...e}){return p.jsx(ci,{"data-slot":"sheet",...e})}function gP({...e}){return p.jsx(Tc,{"data-slot":"sheet-trigger",...e})}function MG({...e}){return p.jsx(Xo,{"data-slot":"sheet-close",...e})}function _G({...e}){return p.jsx(li,{"data-slot":"sheet-portal",...e})}function TG({className:e,...t}){return p.jsx(ui,{"data-slot":"sheet-overlay",className:O("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/50",e),...t})}function gh({className:e,children:t,side:n="right",...r}){return p.jsxs(_G,{children:[p.jsx(TG,{}),p.jsxs(di,{"data-slot":"sheet-content",className:O("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,p.jsx(Xo,{children:p.jsxs(An,{variant:"ghost",className:"absolute top-4 right-4",children:[p.jsx(g0,{className:"size-6"}),p.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function vh({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-header",className:O("flex flex-col gap-1.5 p-4",e),...t})}function vP({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-footer",className:O("mt-auto flex flex-col gap-2 p-4",e),...t})}function yh({className:e,...t}){return p.jsx(Oc,{"data-slot":"sheet-title",className:O("text-foreground font-semibold",e),...t})}function bh({className:e,...t}){return p.jsx(kc,{"data-slot":"sheet-description",className:O("text-muted-foreground text-sm",e),...t})}const OG=xt("flex flex-row flex-stretch gap-2 items-center my-4 container mx-auto px-6",{variants:{variant:{default:"",destructive:""}},defaultVariants:{variant:"default"}});function kG({className:e,variant:t,...n}){return p.jsx("header",{"data-slot":"header",className:O(OG({variant:t}),e),...n})}function AG({className:e,src:t,darkSrc:n,href:r,...o}){const{theme:a}=mh();if(!t)return null;const i=n&&a==="dark"?n:t,s=p.jsx("img",{className:O("w-auto max-h-[100px] min-w-[150px]",e),src:i,...o});return p.jsx("div",{"data-slot":"header-logo",className:"grow",children:r?p.jsx("a",{href:r,tabIndex:0,"aria-label":"Logo",children:s}):s})}function NG({className:e,href:t,...n}){const r=p.jsx("span",{className:O("text-xl",e),...n});return p.jsx("div",{"data-slot":"header-title",className:"grow",children:t?p.jsx("a",{href:t,tabIndex:0,"aria-label":"Title",className:"hover:underline dark:hover:text-blue-200 hover:text-blue-600",children:r}):r})}function DG({className:e,...t}){return p.jsx("main",{"data-slot":"header-navigation",className:O("flex flex-row gap-4 p-4 sm:grow",e),...t})}function RG({...e}){return p.jsx(p.Fragment,{children:p.jsx("div",{className:"py-2",children:p.jsxs("div",{className:"relative w-full max-w-sm",children:[p.jsx(h0,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400",size:18}),p.jsx(hP,{placeholder:"Søk",className:"pl-10",...e})]})})})}function IG({href:e,children:t,className:n,variant:r="default"}){return t?p.jsx("a",{href:e,className:n,children:p.jsx(An,{variant:r,"data-slot":"header-button",className:"flex items-center gap-2",children:t})}):null}function jG({children:e}){return p.jsx(hh,{children:e})}function $G({children:e}){return e?p.jsx(gP,{asChild:!0,children:e}):null}function LG({children:e}){return p.jsx(p.Fragment,{children:p.jsxs(gh,{className:"w-[400px] sm:w-[540px] pt-14 flex flex-col gap-4 px-8 text-xl pb-2 bg-grey-900 text-grey-50 border-none shadow-2xl",children:[p.jsxs(vh,{className:"sr-only",children:[p.jsx(yh,{children:p.jsx("h1",{children:"Menu"})}),p.jsx(bh,{children:"Menu."})]}),e]})})}function FG({className:e,children:t}){return p.jsx(vP,{className:O("flex flex-row justify-between",e),children:t})}function zG({children:e}){return p.jsx("ul",{className:"flex flex-col gap-2 py-2",children:e})}function BG({children:e,href:t,...n}){return p.jsx("li",{children:p.jsx("a",{href:t,className:"flex items-center gap-2 hover:underline hover:text-blue-400",...n,children:e})})}var WG="Separator",qb="horizontal",HG=["horizontal","vertical"],yP=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=qb,...o}=e,a=UG(r)?r:qb,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return p.jsx(ee.div,{"data-orientation":a,...s,...o,ref:t})});yP.displayName=WG;function UG(e){return HG.includes(e)}var VG=yP;function bP({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(VG,{"data-slot":"separator",decorative:n,orientation:t,className:O("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const qG=xt("mt-4 px-6 bg-grey-800 py-10",{variants:{variant:{default:"",destructive:""}},defaultVariants:{variant:"default"}});function KG({className:e,variant:t,children:n,...r}){return p.jsx("footer",{"data-slot":"footer",className:O(qG({variant:t}),e),...r,children:n})}function GG({children:e}){return p.jsx("div",{className:"flex flex-row gap-2 container mx-auto",children:e})}function YG({children:e}){return p.jsx("div",{className:"flex flex-row gap-2 items-center container mx-auto",children:e})}function XG({children:e}){return p.jsx("ul",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 items-center container mx-auto py-10",children:e})}function ZG({children:e}){return p.jsx("li",{className:"flex flex-row gap-2 items-center ",children:e})}function QG({children:e,href:t}){return p.jsxs("a",{href:t,className:" dark:text-blue-200 dark:hover:text-blue-100 text-blue-800 hover:text-blue-900 hover:underline flex flex-row items-center",children:[p.jsx(oi,{className:"w-4 h-4"}),e]})}function JG({children:e}){return p.jsx("div",{className:"flex flex-col md:flex-row gap-4 md:gap-10 md:items-center py-10 container mx-auto",children:e})}function e8({children:e,href:t}){return p.jsx("a",{href:t,className:"dark:text-blue-200 dark:hover:text-blue-100 text-blue-800 hover:text-blue-900 hover:underline flex flex-row gap-2 items-center",children:e})}function t8({children:e}){return p.jsxs("div",{className:"container mx-auto text-grey-800 dark:text-grey-200 text-sm [&>a]:text-blue-800 [&>a]:dark:text-blue-200 [&>a]:hover:text-blue-900 [&>a]:dark:hover:text-blue-100 [&>a]:hover:underline",children:[p.jsx(bP,{className:"my-10"}),e]})}function n8({variant:e="outline",align:t="end",children:n,size:r="icon"}){const{setTheme:o}=mh();return p.jsxs(dP,{children:[p.jsx(fP,{asChild:!0,children:p.jsxs(An,{variant:e,shape:"square",size:r,className:"flex flex-row gap-2 items-center justify-center text-base group",children:[p.jsxs("div",{className:"relative w-[1.2rem] h-[1.2rem] flex items-center justify-center",children:[p.jsx(_O,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90 text-blue-700 group-hover:text-current dark:text-blue-300 dark:group-hover:text-current dark:group-focus:text-current group-focus:text-current dark:group-focus-visible:text-current"}),p.jsx(SO,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0 text-blue-700 group dark:text-blue-300 dark:group-hover:text-current group-hover:text-current group-focus:text-current dark:group-focus:text-current dark:group-focus-visible:text-current"}),r==="icon"&&p.jsx("span",{className:"sr-only",children:"Toggle theme"})]}),n||!n&&r!=="icon"&&p.jsx("span",{children:"Toggle theme"})]})}),p.jsxs(pP,{align:t,children:[p.jsx(Ps,{onClick:()=>o("light"),children:"Light"}),p.jsx(Ps,{onClick:()=>o("dark"),children:"Dark"}),p.jsx(Ps,{onClick:()=>o("system"),children:"System"})]})]})}var Md,hl="HoverCard",[xP,LQ]=Be(hl,[Rn]),gl=Rn(),[r8,vl]=xP(hl),wP=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,c=gl(t),l=h.useRef(0),d=h.useRef(0),u=h.useRef(!1),f=h.useRef(!1),[m,g]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:hl}),y=h.useCallback(()=>{clearTimeout(d.current),l.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=h.useCallback(()=>{clearTimeout(l.current),!u.current&&!f.current&&(d.current=window.setTimeout(()=>g(!1),s))},[s,g]),b=h.useCallback(()=>g(!1),[g]);return h.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(d.current)},[]),p.jsx(r8,{scope:t,open:m,onOpenChange:g,onOpen:y,onClose:v,onDismiss:b,hasSelectionRef:u,isPointerDownOnContentRef:f,children:p.jsx(la,{...c,children:n})})};wP.displayName=hl;var SP="HoverCardTrigger",CP=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=vl(SP,n),a=gl(n);return p.jsx(ua,{asChild:!0,...a,children:p.jsx(ee.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:q(e.onPointerEnter,uc(o.onOpen)),onPointerLeave:q(e.onPointerLeave,uc(o.onClose)),onFocus:q(e.onFocus,o.onOpen),onBlur:q(e.onBlur,o.onClose),onTouchStart:q(e.onTouchStart,i=>i.preventDefault())})})});CP.displayName=SP;var xh="HoverCardPortal",[o8,a8]=xP(xh,{forceMount:void 0}),EP=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=vl(xh,t);return p.jsx(o8,{scope:t,forceMount:n,children:p.jsx(We,{present:n||a.open,children:p.jsx(ao,{asChild:!0,container:o,children:r})})})};EP.displayName=xh;var lc="HoverCardContent",PP=h.forwardRef((e,t)=>{const n=a8(lc,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=vl(lc,e.__scopeHoverCard);return p.jsx(We,{present:r||a.open,children:p.jsx(i8,{"data-state":a.open?"open":"closed",...o,onPointerEnter:q(e.onPointerEnter,uc(a.onOpen)),onPointerLeave:q(e.onPointerLeave,uc(a.onClose)),ref:t})})});PP.displayName=lc;var i8=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,c=vl(lc,n),l=gl(n),d=h.useRef(null),u=de(t,d),[f,m]=h.useState(!1);return h.useEffect(()=>{if(f){const g=document.body;return Md=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Md,g.style.webkitUserSelect=Md}}},[f]),h.useEffect(()=>{if(d.current){const g=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),h.useEffect(()=>{d.current&&l8(d.current).forEach(y=>y.setAttribute("tabindex","-1"))}),p.jsx(yr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:q(a,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:p.jsx(Di,{...l,...s,onPointerDown:q(s.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:u,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),s8="HoverCardArrow",c8=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=gl(n);return p.jsx(Ri,{...o,...r,ref:t})});c8.displayName=s8;function uc(e){return t=>t.pointerType==="touch"?void 0:e()}function l8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var u8=wP,d8=CP,f8=EP,p8=PP;function m8({...e}){return p.jsx(u8,{"data-slot":"hover-card",...e})}function h8({...e}){return p.jsx(d8,{"data-slot":"hover-card-trigger",...e})}function g8({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(f8,{"data-slot":"hover-card-portal",children:p.jsx(p8,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:O("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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}const v8=xt("",{variants:{variant:{default:"grid-cols-1 md:grid-cols-2",list:"grid-cols-1"}},defaultVariants:{variant:"default"}});function y8({className:e,variant:t,...n}){return p.jsx("div",{"data-slot":"infographic",className:O("grid gap-8",v8({variant:t}),e),...n})}function b8({className:e,...t}){return p.jsx("article",{"data-slot":"infographic-item",className:O("p-10 bg-grey-100 dark:bg-grey-800 rounded-xl",e),...t})}function x8({...e}){return p.jsx("div",{"data-slot":"infographic-item-icon",...e})}function w8({className:e,...t}){return p.jsx("h3",{"data-slot":"infographic-item-title",className:O("text-lg font-bold",e),...t})}function S8({className:e,...t}){return p.jsx("span",{"data-slot":"infographic-item-title-number",className:O("text-2xl font-bold mt-4 mb-2block",e),...t})}function C8({className:e,...t}){return p.jsx("span",{"data-slot":"infographic-item-title-text",className:O("text-lg font-bold block",e),...t})}function E8({className:e,...t}){return p.jsx("p",{"data-slot":"infographic-item-description",className:O("text-base",e),...t})}var P8=Object.defineProperty,M8=Object.defineProperties,_8=Object.getOwnPropertyDescriptors,dc=Object.getOwnPropertySymbols,MP=Object.prototype.hasOwnProperty,_P=Object.prototype.propertyIsEnumerable,Kb=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T8=(e,t)=>{for(var n in t||(t={}))MP.call(t,n)&&Kb(e,n,t[n]);if(dc)for(var n of dc(t))_P.call(t,n)&&Kb(e,n,t[n]);return e},O8=(e,t)=>M8(e,_8(t)),k8=(e,t)=>{var n={};for(var r in e)MP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dc)for(var r of dc(e))t.indexOf(r)<0&&_P.call(e,r)&&(n[r]=e[r]);return n};function A8(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function N8(e){let t=h.useRef();return h.useEffect(()=>{t.current=e}),t.current}var D8=18,TP=40,R8=`${TP}px`,I8=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function j8({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,a]=h.useState(!1),[i,s]=h.useState(!1),[c,l]=h.useState(!1),d=h.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&i,[o,i,n]),u=h.useCallback(()=>{let f=e.current,m=t.current;if(!f||!m||c||n==="none")return;let g=f,y=g.getBoundingClientRect().left+g.offsetWidth,v=g.getBoundingClientRect().top+g.offsetHeight/2,b=y-D8,w=v;document.querySelectorAll(I8).length===0&&document.elementFromPoint(b,w)===f||(a(!0),l(!0))},[e,t,c,n]);return h.useEffect(()=>{let f=e.current;if(!f||n==="none")return;function m(){let y=window.innerWidth-f.getBoundingClientRect().right;s(y>=TP)}m();let g=setInterval(m,1e3);return()=>{clearInterval(g)}},[e,n]),h.useEffect(()=>{let f=r||document.activeElement===t.current;if(n==="none"||!f)return;let m=setTimeout(u,0),g=setTimeout(u,2e3),y=setTimeout(u,5e3),v=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(g),clearTimeout(y),clearTimeout(v)}},[t,r,n,u]),{hasPWMBadge:o,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:R8}}var OP=h.createContext({}),kP=h.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:a,textAlign:i="left",pattern:s,placeholder:c,inputMode:l="numeric",onComplete:d,pushPasswordManagerStrategy:u="increase-width",pasteTransformer:f,containerClassName:m,noScriptCSSFallback:g=$8,render:y,children:v}=n,b=k8(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,S,P,M;let[E,_]=h.useState(typeof b.defaultValue=="string"?b.defaultValue:""),T=r??E,I=N8(T),A=h.useCallback(k=>{o?.(k),_(k)},[o]),L=h.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),$=h.useRef(null),K=h.useRef(null),Y=h.useRef({value:T,onChange:A,isIOS:typeof window<"u"&&((x=(w=window?.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),W=h.useRef({prev:[(S=$.current)==null?void 0:S.selectionStart,(P=$.current)==null?void 0:P.selectionEnd,(M=$.current)==null?void 0:M.selectionDirection]});h.useImperativeHandle(t,()=>$.current,[]),h.useEffect(()=>{let k=$.current,te=K.current;if(!k||!te)return;Y.current.value!==k.value&&Y.current.onChange(k.value),W.current.prev=[k.selectionStart,k.selectionEnd,k.selectionDirection];function ue(){if(document.activeElement!==k){H(null),z(null);return}let ye=k.selectionStart,Pe=k.selectionEnd,Ke=k.selectionDirection,Ee=k.maxLength,Te=k.value,tt=W.current.prev,ht=-1,st=-1,wt;if(Te.length!==0&&ye!==null&&Pe!==null){let qt=ye===Pe,rt=ye===Te.length&&Te.length<Ee;if(qt&&!rt){let ct=ye;if(ct===0)ht=0,st=1,wt="forward";else if(ct===Ee)ht=ct-1,st=ct,wt="backward";else if(Ee>1&&Te.length>1){let nn=0;if(tt[0]!==null&&tt[1]!==null){wt=ct<tt[1]?"backward":"forward";let yn=tt[0]===tt[1]&&tt[0]<Ee;wt==="backward"&&!yn&&(nn=-1)}ht=nn+ct,st=nn+ct+1}}ht!==-1&&st!==-1&&ht!==st&&$.current.setSelectionRange(ht,st,wt)}let Ot=ht!==-1?ht:ye,kt=st!==-1?st:Pe,nt=wt??Ke;H(Ot),z(kt),W.current.prev=[Ot,kt,nt]}if(document.addEventListener("selectionchange",ue,{capture:!0}),ue(),document.activeElement===k&&oe(!0),!document.getElementById("input-otp-style")){let ye=document.createElement("style");if(ye.id="input-otp-style",document.head.appendChild(ye),ye.sheet){let Pe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ma(ye.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ma(ye.sheet,`[data-input-otp]:autofill { ${Pe} }`),Ma(ye.sheet,`[data-input-otp]:-webkit-autofill { ${Pe} }`),Ma(ye.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ma(ye.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ge=()=>{te&&te.style.setProperty("--root-height",`${k.clientHeight}px`)};ge();let be=new ResizeObserver(ge);return be.observe(k),()=>{document.removeEventListener("selectionchange",ue,{capture:!0}),be.disconnect()}},[]);let[G,j]=h.useState(!1),[U,oe]=h.useState(!1),[ie,H]=h.useState(null),[R,z]=h.useState(null);h.useEffect(()=>{A8(()=>{var k,te,ue,ge;(k=$.current)==null||k.dispatchEvent(new Event("input"));let be=(te=$.current)==null?void 0:te.selectionStart,ye=(ue=$.current)==null?void 0:ue.selectionEnd,Pe=(ge=$.current)==null?void 0:ge.selectionDirection;be!==null&&ye!==null&&(H(be),z(ye),W.current.prev=[be,ye,Pe])})},[T,U]),h.useEffect(()=>{I!==void 0&&T!==I&&I.length<a&&T.length===a&&d?.(T)},[a,d,I,T]);let F=j8({containerRef:K,inputRef:$,pushPasswordManagerStrategy:u,isFocused:U}),X=h.useCallback(k=>{let te=k.currentTarget.value.slice(0,a);if(te.length>0&&L&&!L.test(te)){k.preventDefault();return}typeof I=="string"&&te.length<I.length&&document.dispatchEvent(new Event("selectionchange")),A(te)},[a,A,I,L]),D=h.useCallback(()=>{var k;if($.current){let te=Math.min($.current.value.length,a-1),ue=$.current.value.length;(k=$.current)==null||k.setSelectionRange(te,ue),H(te),z(ue)}oe(!0)},[a]),V=h.useCallback(k=>{var te,ue;let ge=$.current;if(!f&&(!Y.current.isIOS||!k.clipboardData||!ge))return;let be=k.clipboardData.getData("text/plain"),ye=f?f(be):be;k.preventDefault();let Pe=(te=$.current)==null?void 0:te.selectionStart,Ke=(ue=$.current)==null?void 0:ue.selectionEnd,Ee=(Pe!==Ke?T.slice(0,Pe)+ye+T.slice(Ke):T.slice(0,Pe)+ye+T.slice(Pe)).slice(0,a);if(Ee.length>0&&L&&!L.test(Ee))return;ge.value=Ee,A(Ee);let Te=Math.min(Ee.length,a-1),tt=Ee.length;ge.setSelectionRange(Te,tt),H(Te),z(tt)},[a,A,L,T]),B=h.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),Z=h.useMemo(()=>({position:"absolute",inset:0,width:F.willPushPWMBadge?`calc(100% + ${F.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:F.willPushPWMBadge?`inset(0 ${F.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[F.PWM_BADGE_SPACE_WIDTH,F.willPushPWMBadge,i]),J=h.useMemo(()=>h.createElement("input",O8(T8({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":ie,"data-input-otp-mse":R,inputMode:l,pattern:L?.source,"aria-placeholder":c,style:Z,maxLength:a,value:T,ref:$,onPaste:k=>{var te;V(k),(te=b.onPaste)==null||te.call(b,k)},onChange:X,onMouseOver:k=>{var te;j(!0),(te=b.onMouseOver)==null||te.call(b,k)},onMouseLeave:k=>{var te;j(!1),(te=b.onMouseLeave)==null||te.call(b,k)},onFocus:k=>{var te;D(),(te=b.onFocus)==null||te.call(b,k)},onBlur:k=>{var te;oe(!1),(te=b.onBlur)==null||te.call(b,k)}})),[X,D,V,l,Z,a,R,ie,b,L?.source,T]),N=h.useMemo(()=>({slots:Array.from({length:a}).map((k,te)=>{var ue;let ge=U&&ie!==null&&R!==null&&(ie===R&&te===ie||te>=ie&&te<R),be=T[te]!==void 0?T[te]:null,ye=T[0]!==void 0?null:(ue=c?.[te])!=null?ue:null;return{char:be,placeholderChar:ye,isActive:ge,hasFakeCaret:ge&&be===null}}),isFocused:U,isHovering:!b.disabled&&G}),[U,G,a,R,ie,b.disabled,T]),ne=h.useMemo(()=>y?y(N):h.createElement(OP.Provider,{value:N},v),[v,N,y]);return h.createElement(h.Fragment,null,g!==null&&h.createElement("noscript",null,h.createElement("style",null,g)),h.createElement("div",{ref:K,"data-input-otp-container":!0,style:B,className:m},ne,h.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},J)))});kP.displayName="Input";function Ma(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var $8=`
|
263
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function oK(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function aK(){return fh(/^Mac/)}function iK(){return fh(/^iPhone/)}function Wb(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function sK(){return fh(/^iPad/)||aK()&&navigator.maxTouchPoints>1}function VE(){return iK()||sK()}function fh(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const cK=24,lK=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Hb(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Sd=typeof document<"u"&&window.visualViewport;function Ub(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function qE(e){for(Ub(e)&&(e=e.parentElement);e&&!Ub(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const uK=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let vs=0,Cd;function dK(e={}){let{isDisabled:t}=e;lK(()=>{if(!t)return vs++,vs===1&&VE()&&(Cd=fK()),()=>{vs--,vs===0&&Cd?.()}},[t])}function fK(){let e,t=0,n=u=>{e=qE(u.target),!(e===document.documentElement&&e===document.body)&&(t=u.changedTouches[0].pageY)},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}let f=u.changedTouches[0].pageY,m=e.scrollTop,g=e.scrollHeight-e.clientHeight;g!==0&&((m<=0&&f>t||m>=g&&f<t)&&u.preventDefault(),t=f)},o=u=>{let f=u.target;Tf(f)&&f!==document.activeElement&&(u.preventDefault(),f.style.transform="translateY(-2000px)",f.focus(),requestAnimationFrame(()=>{f.style.transform=""}))},a=u=>{let f=u.target;Tf(f)&&(f.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{f.style.transform="",Sd&&(Sd.height<window.innerHeight?requestAnimationFrame(()=>{Vb(f)}):Sd.addEventListener("resize",()=>Vb(f),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=Hb(pK(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let d=Hb(Ea(document,"touchstart",n,{passive:!1,capture:!0}),Ea(document,"touchmove",r,{passive:!1,capture:!0}),Ea(document,"touchend",o,{passive:!1,capture:!0}),Ea(document,"focus",a,!0),Ea(window,"scroll",i));return()=>{l(),d(),window.scrollTo(s,c)}}function pK(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ea(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Vb(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=qE(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const i=n.getBoundingClientRect().bottom+cK;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function Tf(e){return e instanceof HTMLInputElement&&!uK.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function mK(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function hK(...e){return t=>e.forEach(n=>mK(n,t))}function KE(...e){return h.useCallback(hK(...e),e)}const GE=new WeakMap;function ut(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&GE.set(e,r)}function gK(e,t){if(!e||!(e instanceof HTMLElement))return;let n=GE.get(e);n&&(e.style[t]=n[t])}const ot=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function ys(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[ot(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[ot(t)?5:4]):null)}function vK(e){return 8*(Math.log(e+1)-2)}function Ed(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function yK(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Ye={DURATION:.5,EASE:[.32,.72,0,1]},YE=.4,bK=.25,xK=100,XE=8,Rr=16,Of=26,Pd="vaul-dragging";function ZE(e){const t=C.useRef(e);return C.useEffect(()=>{t.current=e}),C.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function wK({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),a=ZE(t);return C.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function QE({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=wK({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=ZE(n),c=C.useCallback(l=>{if(a){const u=typeof l=="function"?l(e):l;u!==e&&s(u)}else o(l)},[a,e,o,s]);return[i,c]}function SK({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:l}){const[d,u]=QE({prop:e,defaultProp:n?.[0],onChange:t}),[f,m]=C.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);C.useEffect(()=>{function E(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const g=C.useMemo(()=>d===n?.[n.length-1]||null,[n,d]),y=C.useMemo(()=>{var E;return(E=n?.findIndex(_=>_===d))!=null?E:null},[n,d]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===d||!n,b=C.useMemo(()=>{const E=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var _;return(_=n?.map(T=>{const I=typeof T=="string";let A=0;if(I&&(A=parseInt(T,10)),ot(s)){const $=I?A:f?T*E.height:0;return f?s==="bottom"?E.height-$:-E.height+$:$}const L=I?A:f?T*E.width:0;return f?s==="right"?E.width-L:-E.width+L:L}))!=null?_:[]},[n,f,c]),w=C.useMemo(()=>y!==null?b?.[y]:null,[b,y]),x=C.useCallback(E=>{var _;const T=(_=b?.findIndex(I=>I===E))!=null?_:null;i(T),ut(r.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(s)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`}),b&&T!==b.length-1&&a!==void 0&&T!==a&&T<a?ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"0"}):ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"1"}),u(n?.[Math.max(T,0)])},[r.current,n,b,a,o,u]);C.useEffect(()=>{if(d||e){var E;const _=(E=n?.findIndex(T=>T===e||T===d))!=null?E:-1;b&&_!==-1&&typeof b[_]=="number"&&x(b[_])}},[d,e,n,b,x]);function S({draggedDistance:E,closeDrawer:_,velocity:T,dismissible:I}){if(a===void 0)return;const A=s==="bottom"||s==="right"?(w??0)-E:(w??0)+E,L=y===a-1,$=y===0,K=E>0;if(L&&ut(o.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`}),!l&&T>2&&!K){I?_():x(b[0]);return}if(!l&&T>2&&K&&b&&n){x(b[n.length-1]);return}const Y=b?.reduce((G,j)=>typeof G!="number"||typeof j!="number"?G:Math.abs(j-A)<Math.abs(G-A)?j:G),W=ot(s)?window.innerHeight:window.innerWidth;if(T>YE&&Math.abs(E)<W*.4){const G=K?1:-1;if(G>0&&g&&n){x(b[n.length-1]);return}if($&&G<0&&I&&_(),y===null)return;x(b[y+G]);return}x(Y)}function P({draggedDistance:E}){if(w===null)return;const _=s==="bottom"||s==="right"?w-E:w+E;(s==="bottom"||s==="right")&&_<b[b.length-1]||(s==="top"||s==="left")&&_>b[b.length-1]||ut(r.current,{transform:ot(s)?`translate3d(0, ${_}px, 0)`:`translate3d(${_}px, 0, 0)`})}function M(E,_){if(!n||typeof y!="number"||!b||a===void 0)return null;const T=y===a-1;if(y>=a&&_)return 0;if(T&&!_)return 1;if(!v&&!T)return null;const A=T?y+1:y-1,L=T?b[A]-b[A-1]:b[A+1]-b[A],$=E/Math.abs(L);return T?1-$:$}return{isLastSnapPoint:g,activeSnapPoint:d,shouldFade:v,getPercentageDragged:M,setActiveSnapPoint:u,activeSnapPointIndex:y,onRelease:S,onDrag:P,snapPointsOffset:b}}const CK=()=>()=>{};function EK(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Wi(),a=C.useRef(null),i=C.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Of)/window.innerWidth}C.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;yK(r&&!o?Ed(document.body,{background:"black"}):CK,Ed(c,{transformOrigin:ot(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Ye.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ye.EASE.join(",")})`}));const l=Ed(c,{borderRadius:`${XE}px`,overflow:"hidden",...ot(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{l(),a.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Ye.DURATION*1e3)}}},[t,n,i])}let Pa=null;function PK({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=C.useState(()=>typeof window<"u"?window.location.href:""),c=C.useRef(0),l=C.useCallback(()=>{if(Wb()&&Pa===null&&e&&!a){Pa={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:u,innerHeight:f}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-u}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=f-window.innerHeight;m&&c.current>=f&&(document.body.style.top=`${-(c.current+m)}px`)}),300)}},[e]),d=C.useCallback(()=>{if(Wb()&&Pa!==null&&!a){const u=-parseInt(document.body.style.top,10),f=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Pa),window.requestAnimationFrame(()=>{if(o&&i!==window.location.href){s(window.location.href);return}window.scrollTo(f,u)}),Pa=null}},[i]);return C.useEffect(()=>{function u(){c.current=window.scrollY}return u(),window.addEventListener("scroll",u),()=>{window.removeEventListener("scroll",u)}},[]),C.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||d()}},[t,d]),C.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout(()=>{d()},500)):d())},[e,r,i,t,n,l,d]),{restorePositionSetting:d}}function MK({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=bK,scrollLockTimeout:l=xK,dismissible:d=!0,handleOnly:u=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:m,setActiveSnapPoint:g,fixed:y,modal:v=!0,onClose:b,nested:w,noBodyStyles:x=!1,direction:S="bottom",defaultOpen:P=!1,disablePreventScroll:M=!0,snapToSequentialPoint:E=!1,preventScrollRestoration:_=!1,repositionInputs:T=!0,onAnimationEnd:I,container:A,autoFocus:L=!1}){var $,K;const[Y=!1,W]=QE({defaultProp:P,prop:e,onChange:re=>{t?.(re),!re&&!w&&wt(),setTimeout(()=>{I?.(re)},Ye.DURATION*1e3),re&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),re||(document.body.style.pointerEvents="auto")}}),[G,j]=C.useState(!1),[U,oe]=C.useState(!1),[ie,H]=C.useState(!1),R=C.useRef(null),z=C.useRef(null),F=C.useRef(null),X=C.useRef(null),D=C.useRef(null),V=C.useRef(!1),B=C.useRef(null),Z=C.useRef(0),J=C.useRef(!1),N=C.useRef(!P),ne=C.useRef(0),k=C.useRef(null),te=C.useRef((($=k.current)==null?void 0:$.getBoundingClientRect().height)||0),ue=C.useRef(((K=k.current)==null?void 0:K.getBoundingClientRect().width)||0),ge=C.useRef(0),be=C.useCallback(re=>{a&&re===Te.length-1&&(z.current=new Date)},[]),{activeSnapPoint:ye,activeSnapPointIndex:Pe,setActiveSnapPoint:Ke,onRelease:Ee,snapPointsOffset:Te,onDrag:tt,shouldFade:ht,getPercentageDragged:st}=SK({snapPoints:a,activeSnapPointProp:m,setActiveSnapPointProp:g,drawerRef:k,fadeFromIndex:f,overlayRef:R,onSnapPointChange:be,direction:S,container:A,snapToSequentialPoint:E});dK({isDisabled:!Y||U||!v||ie||!G||!T||!M});const{restorePositionSetting:wt}=PK({isOpen:Y,modal:v,nested:w??!1,hasBeenOpened:G,preventScrollRestoration:_,noBodyStyles:x});function Ot(){return(window.innerWidth-Of)/window.innerWidth}function kt(re){var ae,he;!d&&!a||k.current&&!k.current.contains(re.target)||(te.current=((ae=k.current)==null?void 0:ae.getBoundingClientRect().height)||0,ue.current=((he=k.current)==null?void 0:he.getBoundingClientRect().width)||0,oe(!0),F.current=new Date,VE()&&window.addEventListener("touchend",()=>V.current=!1,{once:!0}),re.target.setPointerCapture(re.pointerId),Z.current=ot(S)?re.pageY:re.pageX)}function nt(re,ae){var he;let ve=re;const pe=(he=window.getSelection())==null?void 0:he.toString(),fe=k.current?ys(k.current,S):null,Se=new Date;if(ve.tagName==="SELECT"||ve.hasAttribute("data-vaul-no-drag")||ve.closest("[data-vaul-no-drag]"))return!1;if(S==="right"||S==="left")return!0;if(z.current&&Se.getTime()-z.current.getTime()<500)return!1;if(fe!==null&&(S==="bottom"?fe>0:fe<0))return!0;if(pe&&pe.length>0)return!1;if(D.current&&Se.getTime()-D.current.getTime()<l&&fe===0||ae)return D.current=Se,!1;for(;ve;){if(ve.scrollHeight>ve.clientHeight){if(ve.scrollTop!==0)return D.current=new Date,!1;if(ve.getAttribute("role")==="dialog")return!0}ve=ve.parentNode}return!0}function qt(re){if(k.current&&U){const ae=S==="bottom"||S==="right"?1:-1,he=(Z.current-(ot(S)?re.pageY:re.pageX))*ae,ve=he>0,pe=a&&!d&&!ve;if(pe&&Pe===0)return;const fe=Math.abs(he),Se=document.querySelector("[data-vaul-drawer-wrapper]"),Oe=S==="bottom"||S==="top"?te.current:ue.current;let _e=fe/Oe;const St=st(fe,ve);if(St!==null&&(_e=St),pe&&_e>=1||!V.current&&!nt(re.target,ve))return;if(k.current.classList.add(Pd),V.current=!0,ut(k.current,{transition:"none"}),ut(R.current,{transition:"none"}),a&&tt({draggedDistance:he}),ve&&!a){const Ge=vK(he),Ln=Math.min(Ge*-1,0)*ae;ut(k.current,{transform:ot(S)?`translate3d(0, ${Ln}px, 0)`:`translate3d(${Ln}px, 0, 0)`});return}const Fe=1-_e;if((ht||f&&Pe===f-1)&&(r?.(re,_e),ut(R.current,{opacity:`${Fe}`,transition:"none"},!0)),Se&&R.current&&i){const Ge=Math.min(Ot()+_e*(1-Ot()),1),Ln=8-_e*8,At=Math.max(0,14-_e*14);ut(Se,{borderRadius:`${Ln}px`,transform:ot(S)?`scale(${Ge}) translate3d(0, ${At}px, 0)`:`scale(${Ge}) translate3d(${At}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ge=fe*ae;ut(k.current,{transform:ot(S)?`translate3d(0, ${Ge}px, 0)`:`translate3d(${Ge}px, 0, 0)`})}}}C.useEffect(()=>{window.requestAnimationFrame(()=>{N.current=!0})},[]),C.useEffect(()=>{var re;function ae(){if(!k.current||!T)return;const he=document.activeElement;if(Tf(he)||J.current){var ve;const pe=((ve=window.visualViewport)==null?void 0:ve.height)||0,fe=window.innerHeight;let Se=fe-pe;const Oe=k.current.getBoundingClientRect().height||0,_e=Oe>fe*.8;ge.current||(ge.current=Oe);const St=k.current.getBoundingClientRect().top;if(Math.abs(ne.current-Se)>60&&(J.current=!J.current),a&&a.length>0&&Te&&Pe){const Fe=Te[Pe]||0;Se+=Fe}if(ne.current=Se,Oe>pe||J.current){const Fe=k.current.getBoundingClientRect().height;let Ge=Fe;Fe>pe&&(Ge=pe-(_e?St:Of)),y?k.current.style.height=`${Fe-Math.max(Se,0)}px`:k.current.style.height=`${Math.max(Ge,pe-St)}px`}else oK()||(k.current.style.height=`${ge.current}px`);a&&a.length>0&&!J.current?k.current.style.bottom="0px":k.current.style.bottom=`${Math.max(Se,0)}px`}}return(re=window.visualViewport)==null||re.addEventListener("resize",ae),()=>{var he;return(he=window.visualViewport)==null?void 0:he.removeEventListener("resize",ae)}},[Pe,a,Te]);function rt(re){nn(),b?.(),re||W(!1),setTimeout(()=>{a&&Ke(a[0])},Ye.DURATION*1e3)}function ct(){if(!k.current)return;const re=document.querySelector("[data-vaul-drawer-wrapper]"),ae=ys(k.current,S);ut(k.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`}),ut(R.current,{transition:`opacity ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,opacity:"1"}),i&&ae&&ae>0&&Y&&ut(re,{borderRadius:`${XE}px`,overflow:"hidden",...ot(S)?{transform:`scale(${Ot()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ot()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ye.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ye.EASE.join(",")})`},!0)}function nn(){!U||!k.current||(k.current.classList.remove(Pd),V.current=!1,oe(!1),X.current=new Date)}function yn(re){if(!U||!k.current)return;k.current.classList.remove(Pd),V.current=!1,oe(!1),X.current=new Date;const ae=ys(k.current,S);if(!re||!nt(re.target,!1)||!ae||Number.isNaN(ae)||F.current===null)return;const he=X.current.getTime()-F.current.getTime(),ve=Z.current-(ot(S)?re.pageY:re.pageX),pe=Math.abs(ve)/he;if(pe>.05&&(H(!0),setTimeout(()=>{H(!1)},200)),a){Ee({draggedDistance:ve*(S==="bottom"||S==="right"?1:-1),closeDrawer:rt,velocity:pe,dismissible:d}),o?.(re,!0);return}if(S==="bottom"||S==="right"?ve>0:ve<0){ct(),o?.(re,!0);return}if(pe>YE){rt(),o?.(re,!1);return}var fe;const Se=Math.min((fe=k.current.getBoundingClientRect().height)!=null?fe:0,window.innerHeight);var Oe;const _e=Math.min((Oe=k.current.getBoundingClientRect().width)!=null?Oe:0,window.innerWidth),St=S==="left"||S==="right";if(Math.abs(ae)>=(St?_e:Se)*c){rt(),o?.(re,!1);return}o?.(re,!0),ct()}C.useEffect(()=>(Y&&(ut(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{gK(document.documentElement,"scrollBehavior")}),[Y]);function $n(re){const ae=re?(window.innerWidth-Rr)/window.innerWidth:1,he=re?-Rr:0;B.current&&window.clearTimeout(B.current),ut(k.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(S)?`scale(${ae}) translate3d(0, ${he}px, 0)`:`scale(${ae}) translate3d(${he}px, 0, 0)`}),!re&&k.current&&(B.current=setTimeout(()=>{const ve=ys(k.current,S);ut(k.current,{transition:"none",transform:ot(S)?`translate3d(0, ${ve}px, 0)`:`translate3d(${ve}px, 0, 0)`})},500))}function Ar(re,ae){if(ae<0)return;const he=(window.innerWidth-Rr)/window.innerWidth,ve=he+ae*(1-he),pe=-Rr+ae*Rr;ut(k.current,{transform:ot(S)?`scale(${ve}) translate3d(0, ${pe}px, 0)`:`scale(${ve}) translate3d(${pe}px, 0, 0)`,transition:"none"})}function xe(re,ae){const he=ot(S)?window.innerHeight:window.innerWidth,ve=ae?(he-Rr)/he:1,pe=ae?-Rr:0;ae&&ut(k.current,{transition:`transform ${Ye.DURATION}s cubic-bezier(${Ye.EASE.join(",")})`,transform:ot(S)?`scale(${ve}) translate3d(0, ${pe}px, 0)`:`scale(${ve}) translate3d(${pe}px, 0, 0)`})}return C.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),C.createElement(ci,{defaultOpen:P,onOpenChange:re=>{!d&&!re||(re?j(!0):rt(!0),W(re))},open:Y},C.createElement(UE.Provider,{value:{activeSnapPoint:ye,snapPoints:a,setActiveSnapPoint:Ke,drawerRef:k,overlayRef:R,onOpenChange:t,onPress:kt,onRelease:yn,onDrag:qt,dismissible:d,shouldAnimate:N,handleOnly:u,isOpen:Y,isDragging:U,shouldFade:ht,closeDrawer:rt,onNestedDrag:Ar,onNestedOpenChange:$n,onNestedRelease:xe,keyboardIsOpen:J,modal:v,snapPointsOffset:Te,activeSnapPointIndex:Pe,direction:S,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:x,container:A,autoFocus:L}},n))}const JE=C.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:c}=Wi(),l=KE(t,n),d=r&&r.length>0;if(!s)return null;const u=C.useCallback(f=>o(f),[o]);return C.createElement(ui,{onMouseUp:u,ref:l,"data-vaul-overlay":"","data-vaul-snap-points":i&&d?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false","data-vaul-animate":c?.current?"true":"false",...e})});JE.displayName="Drawer.Overlay";const eP=C.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:d,activeSnapPointIndex:u,modal:f,isOpen:m,direction:g,snapPoints:y,container:v,handleOnly:b,shouldAnimate:w,autoFocus:x}=Wi(),[S,P]=C.useState(!1),M=KE(o,a),E=C.useRef(null),_=C.useRef(null),T=C.useRef(!1),I=y&&y.length>0;EK();const A=($,K,Y=0)=>{if(T.current)return!0;const W=Math.abs($.y),G=Math.abs($.x),j=G>W,U=["bottom","right"].includes(K)?1:-1;if(K==="left"||K==="right"){if(!($.x*U<0)&&G>=0&&G<=Y)return j}else if(!($.y*U<0)&&W>=0&&W<=Y)return!j;return T.current=!0,!0};C.useEffect(()=>{I&&window.requestAnimationFrame(()=>{P(!0)})},[]);function L($){E.current=null,T.current=!1,s($)}return C.createElement(di,{"data-vaul-drawer-direction":g,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":m&&I?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":w?.current?"true":"false",...r,ref:M,style:d&&d.length>0?{"--snap-point-height":`${d[u??0]}px`,...t}:t,onPointerDown:$=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,$),E.current={x:$.pageX,y:$.pageY},i($))},onOpenAutoFocus:$=>{n?.($),x||$.preventDefault()},onPointerDownOutside:$=>{if(e?.($),!f||$.defaultPrevented){$.preventDefault();return}l.current&&(l.current=!1)},onFocusOutside:$=>{if(!f){$.preventDefault();return}},onPointerMove:$=>{if(_.current=$,b||(r.onPointerMove==null||r.onPointerMove.call(r,$),!E.current))return;const K=$.pageY-E.current.y,Y=$.pageX-E.current.x,W=$.pointerType==="touch"?10:2;A({x:Y,y:K},g,W)?c($):(Math.abs(Y)>W||Math.abs(K)>W)&&(E.current=null)},onPointerUp:$=>{r.onPointerUp==null||r.onPointerUp.call(r,$),E.current=null,T.current=!1,s($)},onPointerOut:$=>{r.onPointerOut==null||r.onPointerOut.call(r,$),L(_.current)},onContextMenu:$=>{r.onContextMenu==null||r.onContextMenu.call(r,$),_.current&&L(_.current)}})});eP.displayName="Drawer.Content";const _K=250,TK=120,OK=C.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:d,isOpen:u,onPress:f,onDrag:m}=Wi(),g=C.useRef(null),y=C.useRef(!1);function v(){if(y.current){x();return}window.setTimeout(()=>{b()},TK)}function b(){if(a||e||y.current){x();return}if(x(),!i||i.length===0){l||o();return}if(s===i[i.length-1]&&l){o();return}const P=i.findIndex(E=>E===s);if(P===-1)return;const M=i[P+1];c(M)}function w(){g.current=window.setTimeout(()=>{y.current=!0},_K)}function x(){g.current&&window.clearTimeout(g.current),y.current=!1}return C.createElement("div",{onClick:v,onPointerCancel:x,onPointerDown:S=>{d&&f(S),w()},onPointerMove:S=>{d&&m(S)},ref:r,"data-vaul-drawer-visible":u?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},C.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});OK.displayName="Drawer.Handle";function kK(e){const t=Wi(),{container:n=t.container,...r}=e;return C.createElement(li,{container:n,...r})}const Mr={Root:MK,Content:eP,Overlay:JE,Trigger:Tc,Portal:kK,Close:Xo,Title:Oc,Description:kc};function AK({...e}){return p.jsx(Mr.Root,{"data-slot":"drawer",...e})}function NK({...e}){return p.jsx(Mr.Trigger,{"data-slot":"drawer-trigger",...e})}function DK({...e}){return p.jsx(Mr.Portal,{"data-slot":"drawer-portal",...e})}function RK({...e}){return p.jsx(Mr.Close,{"data-slot":"drawer-close",...e})}function IK({className:e,...t}){return p.jsx(Mr.Overlay,{"data-slot":"drawer-overlay",className:O("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/50",e),...t})}function jK({className:e,children:t,...n}){return p.jsxs(DK,{"data-slot":"drawer-portal",children:[p.jsx(IK,{}),p.jsxs(Mr.Content,{"data-slot":"drawer-content",className:O("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",e),...n,children:[p.jsx("div",{className:"bg-accent mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),t]})]})}function $K({className:e,...t}){return p.jsx("div",{"data-slot":"drawer-header",className:O("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",e),...t})}function LK({className:e,...t}){return p.jsx("div",{"data-slot":"drawer-footer",className:O("mt-auto flex flex-col gap-2 p-4",e),...t})}function FK({className:e,...t}){return p.jsx(Mr.Title,{"data-slot":"drawer-title",className:O("text-foreground font-semibold",e),...t})}function zK({className:e,...t}){return p.jsx(Mr.Description,{"data-slot":"drawer-description",className:O("text-muted-foreground text-sm",e),...t})}var ml="DropdownMenu",[BK,$Q]=Be(ml,[Fi]),Tt=Fi(),[WK,tP]=BK(ml),nP=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Tt(t),l=h.useRef(null),[d,u]=Qe({prop:o,defaultProp:a??!1,onChange:i,caller:ml});return p.jsx(WK,{scope:t,triggerId:Le(),triggerRef:l,contentId:Le(),open:d,onOpenChange:u,onOpenToggle:h.useCallback(()=>u(f=>!f),[u]),modal:s,children:p.jsx(Xm,{...c,open:d,onOpenChange:u,dir:r,modal:s,children:n})})};nP.displayName=ml;var rP="DropdownMenuTrigger",oP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=tP(rP,n),i=Tt(n);return p.jsx(Zm,{asChild:!0,...i,children:p.jsx(ee.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:_n(t,a.triggerRef),onPointerDown:q(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:q(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});oP.displayName=rP;var HK="DropdownMenuPortal",aP=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Tt(t);return p.jsx(Qm,{...r,...n})};aP.displayName=HK;var iP="DropdownMenuContent",sP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tP(iP,n),a=Tt(n),i=h.useRef(!1);return p.jsx(Jm,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,s=>{i.current||o.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:q(e.onInteractOutside,s=>{const c=s.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,d=c.button===2||l;(!o.modal||d)&&(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)"}})});sP.displayName=iP;var UK="DropdownMenuGroup",VK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(eh,{...o,...r,ref:t})});VK.displayName=UK;var qK="DropdownMenuLabel",cP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(th,{...o,...r,ref:t})});cP.displayName=qK;var KK="DropdownMenuItem",lP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(nh,{...o,...r,ref:t})});lP.displayName=KK;var GK="DropdownMenuCheckboxItem",YK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(rh,{...o,...r,ref:t})});YK.displayName=GK;var XK="DropdownMenuRadioGroup",ZK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(oh,{...o,...r,ref:t})});ZK.displayName=XK;var QK="DropdownMenuRadioItem",JK=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ah,{...o,...r,ref:t})});JK.displayName=QK;var eG="DropdownMenuItemIndicator",tG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ih,{...o,...r,ref:t})});tG.displayName=eG;var nG="DropdownMenuSeparator",uP=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(sh,{...o,...r,ref:t})});uP.displayName=nG;var rG="DropdownMenuArrow",oG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(ch,{...o,...r,ref:t})});oG.displayName=rG;var aG="DropdownMenuSubTrigger",iG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(lh,{...o,...r,ref:t})});iG.displayName=aG;var sG="DropdownMenuSubContent",cG=h.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Tt(n);return p.jsx(uh,{...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)"}})});cG.displayName=sG;var lG=nP,uG=oP,dG=aP,fG=sP,pG=cP,mG=lP,hG=uP;function dP({...e}){return p.jsx(lG,{"data-slot":"dropdown-menu",...e})}function fP({...e}){return p.jsx(uG,{"data-slot":"dropdown-menu-trigger",...e})}function pP({className:e,sideOffset:t=4,...n}){return p.jsx(dG,{children:p.jsx(fG,{"data-slot":"dropdown-menu-content",sideOffset:t,className:O("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] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md",e),...n})})}function Ps({className:e,inset:t,variant:n="default",...r}){return p.jsx(mG,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:O("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-base 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 gG({className:e,inset:t,...n}){return p.jsx(pG,{"data-slot":"dropdown-menu-label","data-inset":t,className:O("px-2 py-1.5 text-base font-medium data-[inset]:pl-8",e),...n})}function vG({className:e,...t}){return p.jsx(hG,{"data-slot":"dropdown-menu-separator",className:O("bg-border -mx-1 my-1 h-px",e),...t})}const yG=xt("bg-blue-100 rounded-xl dark:bg-blue-950",{variants:{variant:{default:""}}}),ph=C.createContext(void 0);function bG({className:e,variant:t,children:n,...r}){const[o,a]=C.useState(!1),i=()=>a(s=>!s);return p.jsx(ph.Provider,{value:{expanded:o,toggle:i},children:p.jsx("div",{"data-slot":"fact-box",className:O("fact-box",yG({variant:t}),e),...r,children:n})})}function xG({className:e,...t}){return p.jsx("h3",{"data-slot":"fact-box-title",className:O("text-2xl font-bold mt-0 mb-4",e),...t})}function wG({className:e,...t}){return p.jsx("div",{"data-slot":"fact-box-content",className:O("p-8",e),...t})}function SG({className:e,...t}){const r=C.useContext(ph)?.expanded;return p.jsx("div",{"data-slot":"fact-box-content",className:O("relative ",r?"h-auto":"h-[80px] overflow-hidden [mask-image:linear-gradient(to_bottom,black,transparent)]",e),...t})}function CG({className:e,expandText:t,contractText:n,...r}){const o=C.useContext(ph);if(!o)return null;const{expanded:a,toggle:i}=o;return p.jsx("div",{"data-slot":"fact-box-footer",className:O("flex justify-center mt-4 relative",e),...r,children:p.jsxs(An,{onClick:i,className:O("transition-all duration-200 w-10 h-10 absolute bottom-0 translate-y-1/2",a?"rotate-180":""),children:[p.jsx(JT,{}),p.jsx("span",{className:"sr-only",children:a?t:n})]})})}const EG={theme:"system",setTheme:()=>null},mP=C.createContext(EG);function PG({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,a]=C.useState(()=>localStorage.getItem(n)||t);C.useEffect(()=>{const s=window.document.documentElement;if(s.classList.remove("light","dark"),o==="system"){const c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";s.classList.add(c);return}s.classList.add(o)},[o]);const i={theme:o,setTheme:s=>{localStorage.setItem(n,s),a(s)}};return p.jsx(mP.Provider,{...r,value:i,children:e})}const mh=()=>{const e=C.useContext(mP);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function hP({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",className:O("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border border-border flex h-11 w-full min-w-0 rounded-md bg-input dark:bg-input/10 px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-md","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function hh({...e}){return p.jsx(ci,{"data-slot":"sheet",...e})}function gP({...e}){return p.jsx(Tc,{"data-slot":"sheet-trigger",...e})}function MG({...e}){return p.jsx(Xo,{"data-slot":"sheet-close",...e})}function _G({...e}){return p.jsx(li,{"data-slot":"sheet-portal",...e})}function TG({className:e,...t}){return p.jsx(ui,{"data-slot":"sheet-overlay",className:O("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/50",e),...t})}function gh({className:e,children:t,side:n="right",...r}){return p.jsxs(_G,{children:[p.jsx(TG,{}),p.jsxs(di,{"data-slot":"sheet-content",className:O("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,p.jsx(Xo,{asChild:!0,children:p.jsxs(An,{variant:"ghost",className:"absolute top-4 right-4",children:[p.jsx(g0,{className:"size-6"}),p.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function vh({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-header",className:O("flex flex-col gap-1.5 p-4",e),...t})}function vP({className:e,...t}){return p.jsx("div",{"data-slot":"sheet-footer",className:O("mt-auto flex flex-col gap-2 p-4",e),...t})}function yh({className:e,...t}){return p.jsx(Oc,{"data-slot":"sheet-title",className:O("text-foreground font-semibold",e),...t})}function bh({className:e,...t}){return p.jsx(kc,{"data-slot":"sheet-description",className:O("text-muted-foreground text-sm",e),...t})}const OG=xt("flex flex-row flex-stretch gap-2 items-center my-4 container mx-auto px-6",{variants:{variant:{default:"",destructive:""}},defaultVariants:{variant:"default"}});function kG({className:e,variant:t,...n}){return p.jsx("header",{"data-slot":"header",className:O(OG({variant:t}),e),...n})}function AG({className:e,src:t,darkSrc:n,href:r,...o}){const{theme:a}=mh();if(!t)return null;const i=n&&a==="dark"?n:t,s=p.jsx("img",{className:O("w-auto max-h-[100px] min-w-[150px]",e),src:i,...o});return p.jsx("div",{"data-slot":"header-logo",className:"grow",children:r?p.jsx("a",{href:r,tabIndex:0,"aria-label":"Logo",children:s}):s})}function NG({className:e,href:t,...n}){const r=p.jsx("span",{className:O("text-xl",e),...n});return p.jsx("div",{"data-slot":"header-title",className:"grow",children:t?p.jsx("a",{href:t,tabIndex:0,"aria-label":"Title",className:"hover:underline dark:hover:text-blue-200 hover:text-blue-600",children:r}):r})}function DG({className:e,...t}){return p.jsx("main",{"data-slot":"header-navigation",className:O("flex flex-row gap-4 p-4 sm:grow",e),...t})}function RG({...e}){return p.jsx(p.Fragment,{children:p.jsx("div",{className:"py-2",children:p.jsxs("div",{className:"relative w-full max-w-sm",children:[p.jsx(h0,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400",size:18}),p.jsx(hP,{placeholder:"Søk",className:"pl-10",...e})]})})})}function IG({href:e,children:t,className:n,variant:r="default"}){return t?p.jsx("a",{href:e,className:n,children:p.jsx(An,{variant:r,"data-slot":"header-button",className:"flex items-center gap-2",children:t})}):null}function jG({children:e}){return p.jsx(hh,{children:e})}function $G({children:e}){return e?p.jsx(gP,{asChild:!0,children:e}):null}function LG({children:e}){return p.jsx(p.Fragment,{children:p.jsxs(gh,{className:"w-[400px] sm:w-[540px] pt-14 flex flex-col gap-4 px-8 text-xl pb-2 bg-grey-900 text-grey-50 border-none shadow-2xl",children:[p.jsxs(vh,{className:"sr-only",children:[p.jsx(yh,{children:"Menu"}),p.jsx(bh,{children:"Menu."})]}),e]})})}function FG({className:e,children:t}){return p.jsx(vP,{className:O("flex flex-row justify-between",e),children:t})}function zG({children:e}){return p.jsx("ul",{className:"flex flex-col gap-2 py-2",children:e})}function BG({children:e,href:t,...n}){return p.jsx("li",{children:p.jsx("a",{href:t,className:"flex items-center gap-2 hover:underline hover:text-blue-400",...n,children:e})})}var WG="Separator",qb="horizontal",HG=["horizontal","vertical"],yP=h.forwardRef((e,t)=>{const{decorative:n,orientation:r=qb,...o}=e,a=UG(r)?r:qb,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return p.jsx(ee.div,{"data-orientation":a,...s,...o,ref:t})});yP.displayName=WG;function UG(e){return HG.includes(e)}var VG=yP;function bP({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return p.jsx(VG,{"data-slot":"separator",decorative:n,orientation:t,className:O("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const qG=xt("mt-4 px-6 bg-grey-800 py-10",{variants:{variant:{default:"",destructive:""}},defaultVariants:{variant:"default"}});function KG({className:e,variant:t,children:n,...r}){return p.jsx("footer",{"data-slot":"footer",className:O(qG({variant:t}),e),...r,children:n})}function GG({children:e}){return p.jsx("div",{className:"flex flex-row gap-2 container mx-auto",children:e})}function YG({children:e}){return p.jsx("div",{className:"flex flex-row gap-2 items-center container mx-auto",children:e})}function XG({children:e}){return p.jsx("ul",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 items-center container mx-auto py-10",children:e})}function ZG({children:e}){return p.jsx("li",{className:"flex flex-row gap-2 items-center ",children:e})}function QG({children:e,href:t}){return p.jsxs("a",{href:t,className:" dark:text-blue-200 dark:hover:text-blue-100 text-blue-800 hover:text-blue-900 hover:underline flex flex-row items-center",children:[p.jsx(oi,{className:"w-4 h-4"}),e]})}function JG({children:e}){return p.jsx("div",{className:"flex flex-col md:flex-row gap-4 md:gap-10 md:items-center py-10 container mx-auto",children:e})}function e8({children:e,href:t}){return p.jsx("a",{href:t,className:"dark:text-blue-200 dark:hover:text-blue-100 text-blue-800 hover:text-blue-900 hover:underline flex flex-row gap-2 items-center",children:e})}function t8({children:e}){return p.jsxs("div",{className:"container mx-auto text-grey-800 dark:text-grey-200 text-sm [&>a]:text-blue-800 [&>a]:dark:text-blue-200 [&>a]:hover:text-blue-900 [&>a]:dark:hover:text-blue-100 [&>a]:hover:underline",children:[p.jsx(bP,{className:"my-10"}),e]})}function n8({variant:e="outline",align:t="end",children:n,size:r="icon"}){const{setTheme:o}=mh();return p.jsxs(dP,{children:[p.jsx(fP,{asChild:!0,children:p.jsxs(An,{variant:e,shape:"square",size:r,className:"flex flex-row gap-2 items-center justify-center text-base group",children:[p.jsxs("div",{className:"relative w-[1.2rem] h-[1.2rem] flex items-center justify-center",children:[p.jsx(_O,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90 text-blue-700 group-hover:text-current dark:text-blue-300 dark:group-hover:text-current dark:group-focus:text-current group-focus:text-current dark:group-focus-visible:text-current"}),p.jsx(SO,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0 text-blue-700 group dark:text-blue-300 dark:group-hover:text-current group-hover:text-current group-focus:text-current dark:group-focus:text-current dark:group-focus-visible:text-current"}),r==="icon"&&p.jsx("span",{className:"sr-only",children:"Toggle theme"})]}),n||!n&&r!=="icon"&&p.jsx("span",{children:"Toggle theme"})]})}),p.jsxs(pP,{align:t,children:[p.jsx(Ps,{onClick:()=>o("light"),children:"Light"}),p.jsx(Ps,{onClick:()=>o("dark"),children:"Dark"}),p.jsx(Ps,{onClick:()=>o("system"),children:"System"})]})]})}var Md,hl="HoverCard",[xP,LQ]=Be(hl,[Rn]),gl=Rn(),[r8,vl]=xP(hl),wP=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,c=gl(t),l=h.useRef(0),d=h.useRef(0),u=h.useRef(!1),f=h.useRef(!1),[m,g]=Qe({prop:r,defaultProp:o??!1,onChange:a,caller:hl}),y=h.useCallback(()=>{clearTimeout(d.current),l.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=h.useCallback(()=>{clearTimeout(l.current),!u.current&&!f.current&&(d.current=window.setTimeout(()=>g(!1),s))},[s,g]),b=h.useCallback(()=>g(!1),[g]);return h.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(d.current)},[]),p.jsx(r8,{scope:t,open:m,onOpenChange:g,onOpen:y,onClose:v,onDismiss:b,hasSelectionRef:u,isPointerDownOnContentRef:f,children:p.jsx(la,{...c,children:n})})};wP.displayName=hl;var SP="HoverCardTrigger",CP=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=vl(SP,n),a=gl(n);return p.jsx(ua,{asChild:!0,...a,children:p.jsx(ee.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:q(e.onPointerEnter,uc(o.onOpen)),onPointerLeave:q(e.onPointerLeave,uc(o.onClose)),onFocus:q(e.onFocus,o.onOpen),onBlur:q(e.onBlur,o.onClose),onTouchStart:q(e.onTouchStart,i=>i.preventDefault())})})});CP.displayName=SP;var xh="HoverCardPortal",[o8,a8]=xP(xh,{forceMount:void 0}),EP=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:o}=e,a=vl(xh,t);return p.jsx(o8,{scope:t,forceMount:n,children:p.jsx(We,{present:n||a.open,children:p.jsx(ao,{asChild:!0,container:o,children:r})})})};EP.displayName=xh;var lc="HoverCardContent",PP=h.forwardRef((e,t)=>{const n=a8(lc,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=vl(lc,e.__scopeHoverCard);return p.jsx(We,{present:r||a.open,children:p.jsx(i8,{"data-state":a.open?"open":"closed",...o,onPointerEnter:q(e.onPointerEnter,uc(a.onOpen)),onPointerLeave:q(e.onPointerLeave,uc(a.onClose)),ref:t})})});PP.displayName=lc;var i8=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,c=vl(lc,n),l=gl(n),d=h.useRef(null),u=de(t,d),[f,m]=h.useState(!1);return h.useEffect(()=>{if(f){const g=document.body;return Md=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Md,g.style.webkitUserSelect=Md}}},[f]),h.useEffect(()=>{if(d.current){const g=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),h.useEffect(()=>{d.current&&l8(d.current).forEach(y=>y.setAttribute("tabindex","-1"))}),p.jsx(yr,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:q(a,g=>{g.preventDefault()}),onDismiss:c.onDismiss,children:p.jsx(Di,{...l,...s,onPointerDown:q(s.onPointerDown,g=>{g.currentTarget.contains(g.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:u,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),s8="HoverCardArrow",c8=h.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=gl(n);return p.jsx(Ri,{...o,...r,ref:t})});c8.displayName=s8;function uc(e){return t=>t.pointerType==="touch"?void 0:e()}function l8(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var u8=wP,d8=CP,f8=EP,p8=PP;function m8({...e}){return p.jsx(u8,{"data-slot":"hover-card",...e})}function h8({...e}){return p.jsx(d8,{"data-slot":"hover-card-trigger",...e})}function g8({className:e,align:t="center",sideOffset:n=4,...r}){return p.jsx(f8,{"data-slot":"hover-card-portal",children:p.jsx(p8,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:O("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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}const v8=xt("",{variants:{variant:{default:"grid-cols-1 md:grid-cols-2",list:"grid-cols-1"}},defaultVariants:{variant:"default"}});function y8({className:e,variant:t,...n}){return p.jsx("div",{"data-slot":"infographic",className:O("grid gap-8",v8({variant:t}),e),...n})}function b8({className:e,...t}){return p.jsx("article",{"data-slot":"infographic-item",className:O("p-10 bg-grey-100 dark:bg-grey-800 rounded-xl",e),...t})}function x8({...e}){return p.jsx("div",{"data-slot":"infographic-item-icon",...e})}function w8({className:e,...t}){return p.jsx("h3",{"data-slot":"infographic-item-title",className:O("text-lg font-bold",e),...t})}function S8({className:e,...t}){return p.jsx("span",{"data-slot":"infographic-item-title-number",className:O("text-2xl font-bold mt-4 mb-2block",e),...t})}function C8({className:e,...t}){return p.jsx("span",{"data-slot":"infographic-item-title-text",className:O("text-lg font-bold block",e),...t})}function E8({className:e,...t}){return p.jsx("p",{"data-slot":"infographic-item-description",className:O("text-base",e),...t})}var P8=Object.defineProperty,M8=Object.defineProperties,_8=Object.getOwnPropertyDescriptors,dc=Object.getOwnPropertySymbols,MP=Object.prototype.hasOwnProperty,_P=Object.prototype.propertyIsEnumerable,Kb=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T8=(e,t)=>{for(var n in t||(t={}))MP.call(t,n)&&Kb(e,n,t[n]);if(dc)for(var n of dc(t))_P.call(t,n)&&Kb(e,n,t[n]);return e},O8=(e,t)=>M8(e,_8(t)),k8=(e,t)=>{var n={};for(var r in e)MP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dc)for(var r of dc(e))t.indexOf(r)<0&&_P.call(e,r)&&(n[r]=e[r]);return n};function A8(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function N8(e){let t=h.useRef();return h.useEffect(()=>{t.current=e}),t.current}var D8=18,TP=40,R8=`${TP}px`,I8=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function j8({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,a]=h.useState(!1),[i,s]=h.useState(!1),[c,l]=h.useState(!1),d=h.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&i,[o,i,n]),u=h.useCallback(()=>{let f=e.current,m=t.current;if(!f||!m||c||n==="none")return;let g=f,y=g.getBoundingClientRect().left+g.offsetWidth,v=g.getBoundingClientRect().top+g.offsetHeight/2,b=y-D8,w=v;document.querySelectorAll(I8).length===0&&document.elementFromPoint(b,w)===f||(a(!0),l(!0))},[e,t,c,n]);return h.useEffect(()=>{let f=e.current;if(!f||n==="none")return;function m(){let y=window.innerWidth-f.getBoundingClientRect().right;s(y>=TP)}m();let g=setInterval(m,1e3);return()=>{clearInterval(g)}},[e,n]),h.useEffect(()=>{let f=r||document.activeElement===t.current;if(n==="none"||!f)return;let m=setTimeout(u,0),g=setTimeout(u,2e3),y=setTimeout(u,5e3),v=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(g),clearTimeout(y),clearTimeout(v)}},[t,r,n,u]),{hasPWMBadge:o,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:R8}}var OP=h.createContext({}),kP=h.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:a,textAlign:i="left",pattern:s,placeholder:c,inputMode:l="numeric",onComplete:d,pushPasswordManagerStrategy:u="increase-width",pasteTransformer:f,containerClassName:m,noScriptCSSFallback:g=$8,render:y,children:v}=n,b=k8(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),w,x,S,P,M;let[E,_]=h.useState(typeof b.defaultValue=="string"?b.defaultValue:""),T=r??E,I=N8(T),A=h.useCallback(k=>{o?.(k),_(k)},[o]),L=h.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),$=h.useRef(null),K=h.useRef(null),Y=h.useRef({value:T,onChange:A,isIOS:typeof window<"u"&&((x=(w=window?.CSS)==null?void 0:w.supports)==null?void 0:x.call(w,"-webkit-touch-callout","none"))}),W=h.useRef({prev:[(S=$.current)==null?void 0:S.selectionStart,(P=$.current)==null?void 0:P.selectionEnd,(M=$.current)==null?void 0:M.selectionDirection]});h.useImperativeHandle(t,()=>$.current,[]),h.useEffect(()=>{let k=$.current,te=K.current;if(!k||!te)return;Y.current.value!==k.value&&Y.current.onChange(k.value),W.current.prev=[k.selectionStart,k.selectionEnd,k.selectionDirection];function ue(){if(document.activeElement!==k){H(null),z(null);return}let ye=k.selectionStart,Pe=k.selectionEnd,Ke=k.selectionDirection,Ee=k.maxLength,Te=k.value,tt=W.current.prev,ht=-1,st=-1,wt;if(Te.length!==0&&ye!==null&&Pe!==null){let qt=ye===Pe,rt=ye===Te.length&&Te.length<Ee;if(qt&&!rt){let ct=ye;if(ct===0)ht=0,st=1,wt="forward";else if(ct===Ee)ht=ct-1,st=ct,wt="backward";else if(Ee>1&&Te.length>1){let nn=0;if(tt[0]!==null&&tt[1]!==null){wt=ct<tt[1]?"backward":"forward";let yn=tt[0]===tt[1]&&tt[0]<Ee;wt==="backward"&&!yn&&(nn=-1)}ht=nn+ct,st=nn+ct+1}}ht!==-1&&st!==-1&&ht!==st&&$.current.setSelectionRange(ht,st,wt)}let Ot=ht!==-1?ht:ye,kt=st!==-1?st:Pe,nt=wt??Ke;H(Ot),z(kt),W.current.prev=[Ot,kt,nt]}if(document.addEventListener("selectionchange",ue,{capture:!0}),ue(),document.activeElement===k&&oe(!0),!document.getElementById("input-otp-style")){let ye=document.createElement("style");if(ye.id="input-otp-style",document.head.appendChild(ye),ye.sheet){let Pe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ma(ye.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ma(ye.sheet,`[data-input-otp]:autofill { ${Pe} }`),Ma(ye.sheet,`[data-input-otp]:-webkit-autofill { ${Pe} }`),Ma(ye.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ma(ye.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ge=()=>{te&&te.style.setProperty("--root-height",`${k.clientHeight}px`)};ge();let be=new ResizeObserver(ge);return be.observe(k),()=>{document.removeEventListener("selectionchange",ue,{capture:!0}),be.disconnect()}},[]);let[G,j]=h.useState(!1),[U,oe]=h.useState(!1),[ie,H]=h.useState(null),[R,z]=h.useState(null);h.useEffect(()=>{A8(()=>{var k,te,ue,ge;(k=$.current)==null||k.dispatchEvent(new Event("input"));let be=(te=$.current)==null?void 0:te.selectionStart,ye=(ue=$.current)==null?void 0:ue.selectionEnd,Pe=(ge=$.current)==null?void 0:ge.selectionDirection;be!==null&&ye!==null&&(H(be),z(ye),W.current.prev=[be,ye,Pe])})},[T,U]),h.useEffect(()=>{I!==void 0&&T!==I&&I.length<a&&T.length===a&&d?.(T)},[a,d,I,T]);let F=j8({containerRef:K,inputRef:$,pushPasswordManagerStrategy:u,isFocused:U}),X=h.useCallback(k=>{let te=k.currentTarget.value.slice(0,a);if(te.length>0&&L&&!L.test(te)){k.preventDefault();return}typeof I=="string"&&te.length<I.length&&document.dispatchEvent(new Event("selectionchange")),A(te)},[a,A,I,L]),D=h.useCallback(()=>{var k;if($.current){let te=Math.min($.current.value.length,a-1),ue=$.current.value.length;(k=$.current)==null||k.setSelectionRange(te,ue),H(te),z(ue)}oe(!0)},[a]),V=h.useCallback(k=>{var te,ue;let ge=$.current;if(!f&&(!Y.current.isIOS||!k.clipboardData||!ge))return;let be=k.clipboardData.getData("text/plain"),ye=f?f(be):be;k.preventDefault();let Pe=(te=$.current)==null?void 0:te.selectionStart,Ke=(ue=$.current)==null?void 0:ue.selectionEnd,Ee=(Pe!==Ke?T.slice(0,Pe)+ye+T.slice(Ke):T.slice(0,Pe)+ye+T.slice(Pe)).slice(0,a);if(Ee.length>0&&L&&!L.test(Ee))return;ge.value=Ee,A(Ee);let Te=Math.min(Ee.length,a-1),tt=Ee.length;ge.setSelectionRange(Te,tt),H(Te),z(tt)},[a,A,L,T]),B=h.useMemo(()=>({position:"relative",cursor:b.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[b.disabled]),Z=h.useMemo(()=>({position:"absolute",inset:0,width:F.willPushPWMBadge?`calc(100% + ${F.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:F.willPushPWMBadge?`inset(0 ${F.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[F.PWM_BADGE_SPACE_WIDTH,F.willPushPWMBadge,i]),J=h.useMemo(()=>h.createElement("input",O8(T8({autoComplete:b.autoComplete||"one-time-code"},b),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":ie,"data-input-otp-mse":R,inputMode:l,pattern:L?.source,"aria-placeholder":c,style:Z,maxLength:a,value:T,ref:$,onPaste:k=>{var te;V(k),(te=b.onPaste)==null||te.call(b,k)},onChange:X,onMouseOver:k=>{var te;j(!0),(te=b.onMouseOver)==null||te.call(b,k)},onMouseLeave:k=>{var te;j(!1),(te=b.onMouseLeave)==null||te.call(b,k)},onFocus:k=>{var te;D(),(te=b.onFocus)==null||te.call(b,k)},onBlur:k=>{var te;oe(!1),(te=b.onBlur)==null||te.call(b,k)}})),[X,D,V,l,Z,a,R,ie,b,L?.source,T]),N=h.useMemo(()=>({slots:Array.from({length:a}).map((k,te)=>{var ue;let ge=U&&ie!==null&&R!==null&&(ie===R&&te===ie||te>=ie&&te<R),be=T[te]!==void 0?T[te]:null,ye=T[0]!==void 0?null:(ue=c?.[te])!=null?ue:null;return{char:be,placeholderChar:ye,isActive:ge,hasFakeCaret:ge&&be===null}}),isFocused:U,isHovering:!b.disabled&&G}),[U,G,a,R,ie,b.disabled,T]),ne=h.useMemo(()=>y?y(N):h.createElement(OP.Provider,{value:N},v),[v,N,y]);return h.createElement(h.Fragment,null,g!==null&&h.createElement("noscript",null,h.createElement("style",null,g)),h.createElement("div",{ref:K,"data-input-otp-container":!0,style:B,className:m},ne,h.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},J)))});kP.displayName="Input";function Ma(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var $8=`
|
264
264
|
[data-input-otp] {
|
265
265
|
--nojs-bg: white !important;
|
266
266
|
--nojs-fg: black !important;
|
package/dist/main.es.js
CHANGED
@@ -25625,7 +25625,7 @@ function pP({
|
|
25625
25625
|
...r,
|
25626
25626
|
children: [
|
25627
25627
|
t,
|
25628
|
-
/* @__PURE__ */ h(ia, { children: /* @__PURE__ */ ae(cr, { variant: "ghost", className: "absolute top-4 right-4", children: [
|
25628
|
+
/* @__PURE__ */ h(ia, { asChild: !0, children: /* @__PURE__ */ ae(cr, { variant: "ghost", className: "absolute top-4 right-4", children: [
|
25629
25629
|
/* @__PURE__ */ h(M0, { className: "size-6" }),
|
25630
25630
|
/* @__PURE__ */ h("span", { className: "sr-only", children: "Close" })
|
25631
25631
|
] }) })
|
@@ -25794,7 +25794,7 @@ function tZ({ children: e }) {
|
|
25794
25794
|
function nZ({ children: e }) {
|
25795
25795
|
return /* @__PURE__ */ h(zt, { children: /* @__PURE__ */ ae(pP, { className: "w-[400px] sm:w-[540px] pt-14 flex flex-col gap-4 px-8 text-xl pb-2 bg-grey-900 text-grey-50 border-none shadow-2xl", children: [
|
25796
25796
|
/* @__PURE__ */ ae(mP, { className: "sr-only", children: [
|
25797
|
-
/* @__PURE__ */ h(hP, { children:
|
25797
|
+
/* @__PURE__ */ h(hP, { children: "Menu" }),
|
25798
25798
|
/* @__PURE__ */ h(gP, { children: "Menu." })
|
25799
25799
|
] }),
|
25800
25800
|
e
|