import{r as n,j as a,a as Re}from"./react-DnK_pEU5.js";import{V as gt,Y as vt,y as _,q as Ee,v as be,w as xt,p as St,r as Ie,x as L,Z as z,A as wt,z as N,_ as yt,W as Ct,$ as It,a0 as Tt,a1 as bt,a2 as Nt,F as Rt,G as Et,H as Pt,c as G,a3 as _t}from"./index-LUV-rsLw.js";import{u as jt,c as Mt,a as At,C as Pe}from"./index-CLGWHFf2.js";const Ot=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Dt=gt("chevron-up",Ot);function Ne(t,[o,e]){return Math.min(e,Math.max(o,t))}function Lt(t){const o=Vt(t),e=n.forwardRef((s,r)=>{const{children:d,...l}=s,c=n.Children.toArray(d),i=c.find(Bt);if(i){const p=i.props.children,g=c.map(x=>x===i?n.Children.count(p)>1?n.Children.only(null):n.isValidElement(p)?p.props.children:null:x);return a.jsx(o,{...l,ref:r,children:n.isValidElement(p)?n.cloneElement(p,void 0,g):null})}return a.jsx(o,{...l,ref:r,children:d})});return e.displayName=`${t}.Slot`,e}function Vt(t){const o=n.forwardRef((e,s)=>{const{children:r,...d}=e;if(n.isValidElement(r)){const l=Wt(r),c=Ht(d,r.props);return r.type!==n.Fragment&&(c.ref=s?vt(s,l):l),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return o.displayName=`${t}.SlotClone`,o}var kt=Symbol("radix.slottable");function Bt(t){return n.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===kt}function Ht(t,o){const e={...o};for(const s in o){const r=t[s],d=o[s];/^on[A-Z]/.test(s)?r&&d?e[s]=(...c)=>{const i=d(...c);return r(...c),i}:r&&(e[s]=r):s==="style"?e[s]={...r,...d}:s==="className"&&(e[s]=[r,d].filter(Boolean).join(" "))}return{...t,...e}}function Wt(t){let o=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning;return e?t.ref:(o=Object.getOwnPropertyDescriptor(t,"ref")?.get,e=o&&"isReactWarning"in o&&o.isReactWarning,e?t.props.ref:t.props.ref||t.ref)}var _e=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ft="VisuallyHidden",je=n.forwardRef((t,o)=>a.jsx(_.span,{...t,ref:o,style:{..._e,...t.style}}));je.displayName=Ft;var No=je,Ut=[" ","Enter","ArrowUp","ArrowDown"],Kt=[" ","Enter"],Q="Select",[ie,de,$t]=Mt(Q),[oe]=St(Q,[$t,Ee]),ue=Ee(),[zt,Y]=oe(Q),[Gt,Yt]=oe(Q),Me=t=>{const{__scopeSelect:o,children:e,open:s,defaultOpen:r,onOpenChange:d,value:l,defaultValue:c,onValueChange:i,dir:p,name:g,autoComplete:x,disabled:R,required:T,form:C}=t,u=ue(o),[h,S]=n.useState(null),[m,v]=n.useState(null),[F,M]=n.useState(!1),ne=jt(p),[E,O]=be({prop:s,defaultProp:r??!1,onChange:d,caller:Q}),[U,Z]=be({prop:l,defaultProp:c,onChange:i,caller:Q}),V=n.useRef(null),k=h?C||!!h.closest("form"):!0,[K,B]=n.useState(new Set),H=Array.from(K).map(P=>P.props.value).join(";");return a.jsx(xt,{...u,children:a.jsxs(zt,{required:T,scope:o,trigger:h,onTriggerChange:S,valueNode:m,onValueNodeChange:v,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:Z,open:E,onOpenChange:O,dir:ne,triggerPointerDownPosRef:V,disabled:R,children:[a.jsx(ie.Provider,{scope:o,children:a.jsx(Gt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(P=>{B(D=>new Set(D).add(P))},[]),onNativeOptionRemove:n.useCallback(P=>{B(D=>{const W=new Set(D);return W.delete(P),W})},[]),children:e})}),k?a.jsxs(nt,{"aria-hidden":!0,required:T,tabIndex:-1,name:g,autoComplete:x,value:U,onChange:P=>Z(P.target.value),disabled:R,form:C,children:[U===void 0?a.jsx("option",{value:""}):null,Array.from(K)]},H):null]})})};Me.displayName=Q;var Ae="SelectTrigger",Oe=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:s=!1,...r}=t,d=ue(e),l=Y(Ae,e),c=l.disabled||s,i=L(o,l.onTriggerChange),p=de(e),g=n.useRef("touch"),[x,R,T]=st(u=>{const h=p().filter(v=>!v.disabled),S=h.find(v=>v.value===l.value),m=at(h,u,S);m!==void 0&&l.onValueChange(m.value)}),C=u=>{c||(l.onOpenChange(!0),T()),u&&(l.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return a.jsx(wt,{asChild:!0,...d,children:a.jsx(_.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":rt(l.value)?"":void 0,...r,ref:i,onClick:N(r.onClick,u=>{u.currentTarget.focus(),g.current!=="mouse"&&C(u)}),onPointerDown:N(r.onPointerDown,u=>{g.current=u.pointerType;const h=u.target;h.hasPointerCapture(u.pointerId)&&h.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(C(u),u.preventDefault())}),onKeyDown:N(r.onKeyDown,u=>{const h=x.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&R(u.key),!(h&&u.key===" ")&&Ut.includes(u.key)&&(C(),u.preventDefault())})})})});Oe.displayName=Ae;var De="SelectValue",Le=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:r,children:d,placeholder:l="",...c}=t,i=Y(De,e),{onValueNodeHasChildrenChange:p}=i,g=d!==void 0,x=L(o,i.onValueNodeChange);return z(()=>{p(g)},[p,g]),a.jsx(_.span,{...c,ref:x,style:{pointerEvents:"none"},children:rt(i.value)?a.jsx(a.Fragment,{children:l}):d})});Le.displayName=De;var qt="SelectIcon",Ve=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:s,...r}=t;return a.jsx(_.span,{"aria-hidden":!0,...r,ref:o,children:s||"▼"})});Ve.displayName=qt;var Zt="SelectPortal",ke=t=>a.jsx(yt,{asChild:!0,...t});ke.displayName=Zt;var ee="SelectContent",Be=n.forwardRef((t,o)=>{const e=Y(ee,t.__scopeSelect),[s,r]=n.useState();if(z(()=>{r(new DocumentFragment)},[]),!e.open){const d=s;return d?Re.createPortal(a.jsx(He,{scope:t.__scopeSelect,children:a.jsx(ie.Slot,{scope:t.__scopeSelect,children:a.jsx("div",{children:t.children})})}),d):null}return a.jsx(We,{...t,ref:o})});Be.displayName=ee;var A=10,[He,q]=oe(ee),Xt="SelectContentImpl",Jt=Lt("SelectContent.RemoveScroll"),We=n.forwardRef((t,o)=>{const{__scopeSelect:e,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:d,onPointerDownOutside:l,side:c,sideOffset:i,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:R,collisionPadding:T,sticky:C,hideWhenDetached:u,avoidCollisions:h,...S}=t,m=Y(ee,e),[v,F]=n.useState(null),[M,ne]=n.useState(null),E=L(o,f=>F(f)),[O,U]=n.useState(null),[Z,V]=n.useState(null),k=de(e),[K,B]=n.useState(!1),H=n.useRef(!1);n.useEffect(()=>{if(v)return It(v)},[v]),Tt();const P=n.useCallback(f=>{const[I,...j]=k().map(b=>b.ref.current),[w]=j.slice(-1),y=document.activeElement;for(const b of f)if(b===y||(b?.scrollIntoView({block:"nearest"}),b===I&&M&&(M.scrollTop=0),b===w&&M&&(M.scrollTop=M.scrollHeight),b?.focus(),document.activeElement!==y))return},[k,M]),D=n.useCallback(()=>P([O,v]),[P,O,v]);n.useEffect(()=>{K&&D()},[K,D]);const{onOpenChange:W,triggerPointerDownPosRef:$}=m;n.useEffect(()=>{if(v){let f={x:0,y:0};const I=w=>{f={x:Math.abs(Math.round(w.pageX)-($.current?.x??0)),y:Math.abs(Math.round(w.pageY)-($.current?.y??0))}},j=w=>{f.x<=10&&f.y<=10?w.preventDefault():v.contains(w.target)||W(!1),document.removeEventListener("pointermove",I),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",j,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",j,{capture:!0})}}},[v,W,$]),n.useEffect(()=>{const f=()=>W(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[W]);const[pe,ae]=st(f=>{const I=k().filter(y=>!y.disabled),j=I.find(y=>y.ref.current===document.activeElement),w=at(I,f,j);w&&setTimeout(()=>w.ref.current.focus())}),fe=n.useCallback((f,I,j)=>{const w=!H.current&&!j;(m.value!==void 0&&m.value===I||w)&&(U(f),w&&(H.current=!0))},[m.value]),me=n.useCallback(()=>v?.focus(),[v]),te=n.useCallback((f,I,j)=>{const w=!H.current&&!j;(m.value!==void 0&&m.value===I||w)&&V(f)},[m.value]),le=s==="popper"?xe:Fe,re=le===xe?{side:c,sideOffset:i,align:p,alignOffset:g,arrowPadding:x,collisionBoundary:R,collisionPadding:T,sticky:C,hideWhenDetached:u,avoidCollisions:h}:{};return a.jsx(He,{scope:e,content:v,viewport:M,onViewportChange:ne,itemRefCallback:fe,selectedItem:O,onItemLeave:me,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:Z,position:s,isPositioned:K,searchRef:pe,children:a.jsx(bt,{as:Jt,allowPinchZoom:!0,children:a.jsx(Nt,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:N(r,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:a.jsx(Rt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:a.jsx(le,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...S,...re,onPlaced:()=>B(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:N(S.onKeyDown,f=>{const I=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!I&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let w=k().filter(y=>!y.disabled).map(y=>y.ref.current);if(["ArrowUp","End"].includes(f.key)&&(w=w.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const y=f.target,b=w.indexOf(y);w=w.slice(b+1)}setTimeout(()=>P(w)),f.preventDefault()}})})})})})})});We.displayName=Xt;var Qt="SelectItemAlignedPosition",Fe=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:s,...r}=t,d=Y(ee,e),l=q(ee,e),[c,i]=n.useState(null),[p,g]=n.useState(null),x=L(o,E=>g(E)),R=de(e),T=n.useRef(!1),C=n.useRef(!0),{viewport:u,selectedItem:h,selectedItemText:S,focusSelectedItem:m}=l,v=n.useCallback(()=>{if(d.trigger&&d.valueNode&&c&&p&&u&&h&&S){const E=d.trigger.getBoundingClientRect(),O=p.getBoundingClientRect(),U=d.valueNode.getBoundingClientRect(),Z=S.getBoundingClientRect();if(d.dir!=="rtl"){const y=Z.left-O.left,b=U.left-y,X=E.left-b,J=E.width+X,he=Math.max(J,O.width),ge=window.innerWidth-A,ve=Ne(b,[A,Math.max(A,ge-he)]);c.style.minWidth=J+"px",c.style.left=ve+"px"}else{const y=O.right-Z.right,b=window.innerWidth-U.right-y,X=window.innerWidth-E.right-b,J=E.width+X,he=Math.max(J,O.width),ge=window.innerWidth-A,ve=Ne(b,[A,Math.max(A,ge-he)]);c.style.minWidth=J+"px",c.style.right=ve+"px"}const V=R(),k=window.innerHeight-A*2,K=u.scrollHeight,B=window.getComputedStyle(p),H=parseInt(B.borderTopWidth,10),P=parseInt(B.paddingTop,10),D=parseInt(B.borderBottomWidth,10),W=parseInt(B.paddingBottom,10),$=H+P+K+W+D,pe=Math.min(h.offsetHeight*5,$),ae=window.getComputedStyle(u),fe=parseInt(ae.paddingTop,10),me=parseInt(ae.paddingBottom,10),te=E.top+E.height/2-A,le=k-te,re=h.offsetHeight/2,f=h.offsetTop+re,I=H+P+f,j=$-I;if(I<=te){const y=V.length>0&&h===V[V.length-1].ref.current;c.style.bottom="0px";const b=p.clientHeight-u.offsetTop-u.offsetHeight,X=Math.max(le,re+(y?me:0)+b+D),J=I+X;c.style.height=J+"px"}else{const y=V.length>0&&h===V[0].ref.current;c.style.top="0px";const X=Math.max(te,H+u.offsetTop+(y?fe:0)+re)+j;c.style.height=X+"px",u.scrollTop=I-te+u.offsetTop}c.style.margin=`${A}px 0`,c.style.minHeight=pe+"px",c.style.maxHeight=k+"px",s?.(),requestAnimationFrame(()=>T.current=!0)}},[R,d.trigger,d.valueNode,c,p,u,h,S,d.dir,s]);z(()=>v(),[v]);const[F,M]=n.useState();z(()=>{p&&M(window.getComputedStyle(p).zIndex)},[p]);const ne=n.useCallback(E=>{E&&C.current===!0&&(v(),m?.(),C.current=!1)},[v,m]);return a.jsx(to,{scope:e,contentWrapper:c,shouldExpandOnScrollRef:T,onScrollButtonChange:ne,children:a.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:a.jsx(_.div,{...r,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Fe.displayName=Qt;var eo="SelectPopperPosition",xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:s="start",collisionPadding:r=A,...d}=t,l=ue(e);return a.jsx(Et,{...l,...d,ref:o,align:s,collisionPadding:r,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xe.displayName=eo;var[to,Te]=oe(ee,{}),Se="SelectViewport",Ue=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:s,...r}=t,d=q(Se,e),l=Te(Se,e),c=L(o,d.onViewportChange),i=n.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),a.jsx(ie.Slot,{scope:e,children:a.jsx(_.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:N(r.onScroll,p=>{const g=p.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:R}=l;if(R?.current&&x){const T=Math.abs(i.current-g.scrollTop);if(T>0){const C=window.innerHeight-A*2,u=parseFloat(x.style.minHeight),h=parseFloat(x.style.height),S=Math.max(u,h);if(S0?F:0,x.style.justifyContent="flex-end")}}}i.current=g.scrollTop})})})]})});Ue.displayName=Se;var Ke="SelectGroup",[oo,no]=oe(Ke),$e=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=Ie();return a.jsx(oo,{scope:e,id:r,children:a.jsx(_.div,{role:"group","aria-labelledby":r,...s,ref:o})})});$e.displayName=Ke;var ze="SelectLabel",Ge=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=no(ze,e);return a.jsx(_.div,{id:r.id,...s,ref:o})});Ge.displayName=ze;var ce="SelectItem",[ro,Ye]=oe(ce),qe=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:s,disabled:r=!1,textValue:d,...l}=t,c=Y(ce,e),i=q(ce,e),p=c.value===s,[g,x]=n.useState(d??""),[R,T]=n.useState(!1),C=L(o,m=>i.itemRefCallback?.(m,s,r)),u=Ie(),h=n.useRef("touch"),S=()=>{r||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(ro,{scope:e,value:s,disabled:r,textId:u,isSelected:p,onItemTextChange:n.useCallback(m=>{x(v=>v||(m?.textContent??"").trim())},[]),children:a.jsx(ie.ItemSlot,{scope:e,value:s,disabled:r,textValue:g,children:a.jsx(_.div,{role:"option","aria-labelledby":u,"data-highlighted":R?"":void 0,"aria-selected":p&&R,"data-state":p?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...l,ref:C,onFocus:N(l.onFocus,()=>T(!0)),onBlur:N(l.onBlur,()=>T(!1)),onClick:N(l.onClick,()=>{h.current!=="mouse"&&S()}),onPointerUp:N(l.onPointerUp,()=>{h.current==="mouse"&&S()}),onPointerDown:N(l.onPointerDown,m=>{h.current=m.pointerType}),onPointerMove:N(l.onPointerMove,m=>{h.current=m.pointerType,r?i.onItemLeave?.():h.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(l.onPointerLeave,m=>{m.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:N(l.onKeyDown,m=>{i.searchRef?.current!==""&&m.key===" "||(Kt.includes(m.key)&&S(),m.key===" "&&m.preventDefault())})})})})});qe.displayName=ce;var se="SelectItemText",Ze=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:s,style:r,...d}=t,l=Y(se,e),c=q(se,e),i=Ye(se,e),p=Yt(se,e),[g,x]=n.useState(null),R=L(o,S=>x(S),i.onItemTextChange,S=>c.itemTextRefCallback?.(S,i.value,i.disabled)),T=g?.textContent,C=n.useMemo(()=>a.jsx("option",{value:i.value,disabled:i.disabled,children:T},i.value),[i.disabled,i.value,T]),{onNativeOptionAdd:u,onNativeOptionRemove:h}=p;return z(()=>(u(C),()=>h(C)),[u,h,C]),a.jsxs(a.Fragment,{children:[a.jsx(_.span,{id:i.textId,...d,ref:R}),i.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Re.createPortal(d.children,l.valueNode):null]})});Ze.displayName=se;var Xe="SelectItemIndicator",Je=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return Ye(Xe,e).isSelected?a.jsx(_.span,{"aria-hidden":!0,...s,ref:o}):null});Je.displayName=Xe;var we="SelectScrollUpButton",Qe=n.forwardRef((t,o)=>{const e=q(we,t.__scopeSelect),s=Te(we,t.__scopeSelect),[r,d]=n.useState(!1),l=L(o,s.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let c=function(){const p=i.scrollTop>0;d(p)};const i=e.viewport;return c(),i.addEventListener("scroll",c),()=>i.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),r?a.jsx(tt,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=e;c&&i&&(c.scrollTop=c.scrollTop-i.offsetHeight)}}):null});Qe.displayName=we;var ye="SelectScrollDownButton",et=n.forwardRef((t,o)=>{const e=q(ye,t.__scopeSelect),s=Te(ye,t.__scopeSelect),[r,d]=n.useState(!1),l=L(o,s.onScrollButtonChange);return z(()=>{if(e.viewport&&e.isPositioned){let c=function(){const p=i.scrollHeight-i.clientHeight,g=Math.ceil(i.scrollTop)i.removeEventListener("scroll",c)}},[e.viewport,e.isPositioned]),r?a.jsx(tt,{...t,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:i}=e;c&&i&&(c.scrollTop=c.scrollTop+i.offsetHeight)}}):null});et.displayName=ye;var tt=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:s,...r}=t,d=q("SelectScrollButton",e),l=n.useRef(null),c=de(e),i=n.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return n.useEffect(()=>()=>i(),[i]),z(()=>{c().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),a.jsx(_.div,{"aria-hidden":!0,...r,ref:o,style:{flexShrink:0,...r.style},onPointerDown:N(r.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:N(r.onPointerMove,()=>{d.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:N(r.onPointerLeave,()=>{i()})})}),so="SelectSeparator",ot=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t;return a.jsx(_.div,{"aria-hidden":!0,...s,ref:o})});ot.displayName=so;var Ce="SelectArrow",ao=n.forwardRef((t,o)=>{const{__scopeSelect:e,...s}=t,r=ue(e),d=Y(Ce,e),l=q(Ce,e);return d.open&&l.position==="popper"?a.jsx(Pt,{...r,...s,ref:o}):null});ao.displayName=Ce;var lo="SelectBubbleInput",nt=n.forwardRef(({__scopeSelect:t,value:o,...e},s)=>{const r=n.useRef(null),d=L(s,r),l=At(o);return n.useEffect(()=>{const c=r.current;if(!c)return;const i=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(i,"value").set;if(l!==o&&g){const x=new Event("change",{bubbles:!0});g.call(c,o),c.dispatchEvent(x)}},[l,o]),a.jsx(_.select,{...e,style:{..._e,...e.style},ref:d,defaultValue:o})});nt.displayName=lo;function rt(t){return t===""||t===void 0}function st(t){const o=Ct(t),e=n.useRef(""),s=n.useRef(0),r=n.useCallback(l=>{const c=e.current+l;o(c),(function i(p){e.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>i(""),1e3))})(c)},[o]),d=n.useCallback(()=>{e.current="",window.clearTimeout(s.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(s.current),[]),[e,r,d]}function at(t,o,e){const r=o.length>1&&Array.from(o).every(p=>p===o[0])?o[0]:o,d=e?t.indexOf(e):-1;let l=co(t,Math.max(d,0));r.length===1&&(l=l.filter(p=>p!==e));const i=l.find(p=>p.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==e?i:void 0}function co(t,o){return t.map((e,s)=>t[(o+s)%t.length])}var io=Me,lt=Oe,uo=Le,po=Ve,fo=ke,ct=Be,mo=Ue,ho=$e,it=Ge,dt=qe,go=Ze,vo=Je,ut=Qe,pt=et,ft=ot;const Ro=io,Eo=ho,Po=uo,xo=n.forwardRef(({className:t,children:o,...e},s)=>a.jsxs(lt,{ref:s,className:G("flex h-10 w-full items-center justify-between rounded-full border border-input bg-background px-4 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...e,children:[o,a.jsx(po,{asChild:!0,children:a.jsx(Pe,{className:"h-4 w-4 opacity-50"})})]}));xo.displayName=lt.displayName;const mt=n.forwardRef(({className:t,...o},e)=>a.jsx(ut,{ref:e,className:G("flex cursor-default items-center justify-center py-1",t),...o,children:a.jsx(Dt,{className:"h-4 w-4"})}));mt.displayName=ut.displayName;const ht=n.forwardRef(({className:t,...o},e)=>a.jsx(pt,{ref:e,className:G("flex cursor-default items-center justify-center py-1",t),...o,children:a.jsx(Pe,{className:"h-4 w-4"})}));ht.displayName=pt.displayName;const So=n.forwardRef(({className:t,children:o,position:e="popper",...s},r)=>a.jsx(fo,{children:a.jsxs(ct,{ref:r,className:G("relative z-[9999] max-h-[min(var(--radix-select-content-available-height,256px),256px)] min-w-[8rem] overflow-hidden rounded-2xl border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",e==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:e,...s,children:[a.jsx(mt,{}),a.jsx(mo,{className:G("p-1 max-h-[inherit] overflow-y-auto",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o}),a.jsx(ht,{})]})}));So.displayName=ct.displayName;const wo=n.forwardRef(({className:t,...o},e)=>a.jsx(it,{ref:e,className:G("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...o}));wo.displayName=it.displayName;const yo=n.forwardRef(({className:t,children:o,...e},s)=>a.jsxs(dt,{ref:s,className:G("relative flex w-full cursor-default select-none items-center rounded-xl py-1.5 pl-8 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(vo,{children:a.jsx(_t,{className:"h-4 w-4"})})}),a.jsx(go,{children:o})]}));yo.displayName=dt.displayName;const Co=n.forwardRef(({className:t,...o},e)=>a.jsx(ft,{ref:e,className:G("-mx-1 my-1 h-px bg-muted",t),...o}));Co.displayName=ft.displayName;export{No as R,Ro as S,xo as a,Po as b,So as c,yo as d,Ne as e,Eo as f,wo as g};