import{c as Te,r as n,X as Ee,ad as mt,s as Ne,j as a,Y as ht,t as gt,Z as Ie,ae as vt,q as k,af as G,P as j,x as St,ag as xt,a0 as wt,v as P,a1 as yt,G as Re,ah as Ct,W as Tt,a4 as It,a2 as bt,a3 as Nt,a5 as Pt,a6 as Et,a7 as Rt,a8 as _t,a as q}from"./main-C5rJoLCl.js";/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jt=Te("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _e=Te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mt=Te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function Pe(o,[t,e]){return Math.min(e,Math.max(t,o))}var At=[" ","Enter","ArrowUp","ArrowDown"],Dt=[" ","Enter"],Q="Select",[ie,de,Ot]=vt(Q),[oe,mo]=gt(Q,[Ot,Ee]),ue=Ee(),[Lt,z]=oe(Q),[kt,Bt]=oe(Q),je=o=>{const{__scopeSelect:t,children:e,open:r,defaultOpen:c,onOpenChange:d,value:s,defaultValue:i,onValueChange:l,dir:f,name:v,autoComplete:w,disabled:b,required:N,form:I}=o,u=ue(t),[g,y]=n.useState(null),[p,h]=n.useState(null),[M,A]=n.useState(!1),ne=mt(f),[E,O]=Ne({prop:r,defaultProp:c??!1,onChange:d,caller:Q}),[W,X]=Ne({prop:s,defaultProp:i,onChange:l,caller:Q}),B=n.useRef(null),V=g?I||!!g.closest("form"):!0,[K,H]=n.useState(new Set),U=Array.from(K).map(R=>R.props.value).join(";");return a.jsx(ht,{...u,children:a.jsxs(Lt,{required:N,scope:t,trigger:g,onTriggerChange:y,valueNode:p,onValueNodeChange:h,valueNodeHasChildren:M,onValueNodeHasChildrenChange:A,contentId:Ie(),value:W,onValueChange:X,open:E,onOpenChange:O,dir:ne,triggerPointerDownPosRef:B,disabled:b,children:[a.jsx(ie.Provider,{scope:t,children:a.jsx(kt,{scope:o.__scopeSelect,onNativeOptionAdd:n.useCallback(R=>{H(L=>new Set(L).add(R))},[]),onNativeOptionRemove:n.useCallback(R=>{H(L=>{const F=new Set(L);return F.delete(R),F})},[]),children:e})}),V?a.jsxs(tt,{"aria-hidden":!0,required:N,tabIndex:-1,name:v,autoComplete:w,value:W,onChange:R=>X(R.target.value),disabled:b,form:I,children:[W===void 0?a.jsx("option",{value:""}):null,Array.from(K)]},U):null]})})};je.displayName=Q;var Me="SelectTrigger",Ae=n.forwardRef((o,t)=>{const{__scopeSelect:e,disabled:r=!1,...c}=o,d=ue(e),s=z(Me,e),i=s.disabled||r,l=k(t,s.onTriggerChange),f=de(e),v=n.useRef("touch"),[w,b,N]=nt(u=>{const g=f().filter(h=>!h.disabled),y=g.find(h=>h.value===s.value),p=rt(g,u,y);p!==void 0&&s.onValueChange(p.value)}),I=u=>{i||(s.onOpenChange(!0),N()),u&&(s.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return a.jsx(wt,{asChild:!0,...d,children:a.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":ot(s.value)?"":void 0,...c,ref:l,onClick:P(c.onClick,u=>{u.currentTarget.focus(),v.current!=="mouse"&&I(u)}),onPointerDown:P(c.onPointerDown,u=>{v.current=u.pointerType;const g=u.target;g.hasPointerCapture(u.pointerId)&&g.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(I(u),u.preventDefault())}),onKeyDown:P(c.onKeyDown,u=>{const g=w.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&b(u.key),!(g&&u.key===" ")&&At.includes(u.key)&&(I(),u.preventDefault())})})})});Ae.displayName=Me;var De="SelectValue",Oe=n.forwardRef((o,t)=>{const{__scopeSelect:e,className:r,style:c,children:d,placeholder:s="",...i}=o,l=z(De,e),{onValueNodeHasChildrenChange:f}=l,v=d!==void 0,w=k(t,l.onValueNodeChange);return G(()=>{f(v)},[f,v]),a.jsx(j.span,{...i,ref:w,style:{pointerEvents:"none"},children:ot(l.value)?a.jsx(a.Fragment,{children:s}):d})});Oe.displayName=De;var Vt="SelectIcon",Le=n.forwardRef((o,t)=>{const{__scopeSelect:e,children:r,...c}=o;return a.jsx(j.span,{"aria-hidden":!0,...c,ref:t,children:r||"▼"})});Le.displayName=Vt;var Ht="SelectPortal",ke=o=>a.jsx(yt,{asChild:!0,...o});ke.displayName=Ht;var ee="SelectContent",Be=n.forwardRef((o,t)=>{const e=z(ee,o.__scopeSelect),[r,c]=n.useState();if(G(()=>{c(new DocumentFragment)},[]),!e.open){const d=r;return d?Re.createPortal(a.jsx(Ve,{scope:o.__scopeSelect,children:a.jsx(ie.Slot,{scope:o.__scopeSelect,children:a.jsx("div",{children:o.children})})}),d):null}return a.jsx(He,{...o,ref:t})});Be.displayName=ee;var D=10,[Ve,Y]=oe(ee),Ut="SelectContentImpl",Ft=Nt("SelectContent.RemoveScroll"),He=n.forwardRef((o,t)=>{const{__scopeSelect:e,position:r="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:s,side:i,sideOffset:l,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:b,collisionPadding:N,sticky:I,hideWhenDetached:u,avoidCollisions:g,...y}=o,p=z(ee,e),[h,M]=n.useState(null),[A,ne]=n.useState(null),E=k(t,m=>M(m)),[O,W]=n.useState(null),[X,B]=n.useState(null),V=de(e),[K,H]=n.useState(!1),U=n.useRef(!1);n.useEffect(()=>{if(h)return Tt(h)},[h]),It();const R=n.useCallback(m=>{const[T,..._]=V().map(x=>x.ref.current),[C]=_.slice(-1),S=document.activeElement;for(const x of m)if(x===S||(x==null||x.scrollIntoView({block:"nearest"}),x===T&&A&&(A.scrollTop=0),x===C&&A&&(A.scrollTop=A.scrollHeight),x==null||x.focus(),document.activeElement!==S))return},[V,A]),L=n.useCallback(()=>R([O,h]),[R,O,h]);n.useEffect(()=>{K&&L()},[K,L]);const{onOpenChange:F,triggerPointerDownPosRef:$}=p;n.useEffect(()=>{if(h){let m={x:0,y:0};const T=C=>{var S,x;m={x:Math.abs(Math.round(C.pageX)-(((S=$.current)==null?void 0:S.x)??0)),y:Math.abs(Math.round(C.pageY)-(((x=$.current)==null?void 0:x.y)??0))}},_=C=>{m.x<=10&&m.y<=10?C.preventDefault():h.contains(C.target)||F(!1),document.removeEventListener("pointermove",T),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",_,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",_,{capture:!0})}}},[h,F,$]),n.useEffect(()=>{const m=()=>F(!1);return window.addEventListener("blur",m),window.addEventListener("resize",m),()=>{window.removeEventListener("blur",m),window.removeEventListener("resize",m)}},[F]);const[pe,ae]=nt(m=>{const T=V().filter(S=>!S.disabled),_=T.find(S=>S.ref.current===document.activeElement),C=rt(T,m,_);C&&setTimeout(()=>C.ref.current.focus())}),fe=n.useCallback((m,T,_)=>{const C=!U.current&&!_;(p.value!==void 0&&p.value===T||C)&&(W(m),C&&(U.current=!0))},[p.value]),me=n.useCallback(()=>h==null?void 0:h.focus(),[h]),te=n.useCallback((m,T,_)=>{const C=!U.current&&!_;(p.value!==void 0&&p.value===T||C)&&B(m)},[p.value]),le=r==="popper"?Se:Ue,re=le===Se?{side:i,sideOffset:l,align:f,alignOffset:v,arrowPadding:w,collisionBoundary:b,collisionPadding:N,sticky:I,hideWhenDetached:u,avoidCollisions:g}:{};return a.jsx(Ve,{scope:e,content:h,viewport:A,onViewportChange:ne,itemRefCallback:fe,selectedItem:O,onItemLeave:me,itemTextRefCallback:te,focusSelectedItem:L,selectedItemText:X,position:r,isPositioned:K,searchRef:pe,children:a.jsx(bt,{as:Ft,allowPinchZoom:!0,children:a.jsx(Pt,{asChild:!0,trapped:p.open,onMountAutoFocus:m=>{m.preventDefault()},onUnmountAutoFocus:P(c,m=>{var T;(T=p.trigger)==null||T.focus({preventScroll:!0}),m.preventDefault()}),children:a.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:()=>p.onOpenChange(!1),children:a.jsx(le,{role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:m=>m.preventDefault(),...y,...re,onPlaced:()=>H(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:P(y.onKeyDown,m=>{const T=m.ctrlKey||m.altKey||m.metaKey;if(m.key==="Tab"&&m.preventDefault(),!T&&m.key.length===1&&ae(m.key),["ArrowUp","ArrowDown","Home","End"].includes(m.key)){let C=V().filter(S=>!S.disabled).map(S=>S.ref.current);if(["ArrowUp","End"].includes(m.key)&&(C=C.slice().reverse()),["ArrowUp","ArrowDown"].includes(m.key)){const S=m.target,x=C.indexOf(S);C=C.slice(x+1)}setTimeout(()=>R(C)),m.preventDefault()}})})})})})})});He.displayName=Ut;var Wt="SelectItemAlignedPosition",Ue=n.forwardRef((o,t)=>{const{__scopeSelect:e,onPlaced:r,...c}=o,d=z(ee,e),s=Y(ee,e),[i,l]=n.useState(null),[f,v]=n.useState(null),w=k(t,E=>v(E)),b=de(e),N=n.useRef(!1),I=n.useRef(!0),{viewport:u,selectedItem:g,selectedItemText:y,focusSelectedItem:p}=s,h=n.useCallback(()=>{if(d.trigger&&d.valueNode&&i&&f&&u&&g&&y){const E=d.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),W=d.valueNode.getBoundingClientRect(),X=y.getBoundingClientRect();if(d.dir!=="rtl"){const S=X.left-O.left,x=W.left-S,Z=E.left-x,J=E.width+Z,he=Math.max(J,O.width),ge=window.innerWidth-D,ve=Pe(x,[D,Math.max(D,ge-he)]);i.style.minWidth=J+"px",i.style.left=ve+"px"}else{const S=O.right-X.right,x=window.innerWidth-W.right-S,Z=window.innerWidth-E.right-x,J=E.width+Z,he=Math.max(J,O.width),ge=window.innerWidth-D,ve=Pe(x,[D,Math.max(D,ge-he)]);i.style.minWidth=J+"px",i.style.right=ve+"px"}const B=b(),V=window.innerHeight-D*2,K=u.scrollHeight,H=window.getComputedStyle(f),U=parseInt(H.borderTopWidth,10),R=parseInt(H.paddingTop,10),L=parseInt(H.borderBottomWidth,10),F=parseInt(H.paddingBottom,10),$=U+R+K+F+L,pe=Math.min(g.offsetHeight*5,$),ae=window.getComputedStyle(u),fe=parseInt(ae.paddingTop,10),me=parseInt(ae.paddingBottom,10),te=E.top+E.height/2-D,le=V-te,re=g.offsetHeight/2,m=g.offsetTop+re,T=U+R+m,_=$-T;if(T<=te){const S=B.length>0&&g===B[B.length-1].ref.current;i.style.bottom="0px";const x=f.clientHeight-u.offsetTop-u.offsetHeight,Z=Math.max(le,re+(S?me:0)+x+L),J=T+Z;i.style.height=J+"px"}else{const S=B.length>0&&g===B[0].ref.current;i.style.top="0px";const Z=Math.max(te,U+u.offsetTop+(S?fe:0)+re)+_;i.style.height=Z+"px",u.scrollTop=T-te+u.offsetTop}i.style.margin=`${D}px 0`,i.style.minHeight=pe+"px",i.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>N.current=!0)}},[b,d.trigger,d.valueNode,i,f,u,g,y,d.dir,r]);G(()=>h(),[h]);const[M,A]=n.useState();G(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);const ne=n.useCallback(E=>{E&&I.current===!0&&(h(),p==null||p(),I.current=!1)},[h,p]);return a.jsx($t,{scope:e,contentWrapper:i,shouldExpandOnScrollRef:N,onScrollButtonChange:ne,children:a.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:a.jsx(j.div,{...c,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});Ue.displayName=Wt;var Kt="SelectPopperPosition",Se=n.forwardRef((o,t)=>{const{__scopeSelect:e,align:r="start",collisionPadding:c=D,...d}=o,s=ue(e);return a.jsx(Rt,{...s,...d,ref:t,align:r,collisionPadding:c,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)"}})});Se.displayName=Kt;var[$t,be]=oe(ee,{}),xe="SelectViewport",Fe=n.forwardRef((o,t)=>{const{__scopeSelect:e,nonce:r,...c}=o,d=Y(xe,e),s=be(xe,e),i=k(t,d.onViewportChange),l=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:r}),a.jsx(ie.Slot,{scope:e,children:a.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:P(c.onScroll,f=>{const v=f.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:b}=s;if(b!=null&&b.current&&w){const N=Math.abs(l.current-v.scrollTop);if(N>0){const I=window.innerHeight-D*2,u=parseFloat(w.style.minHeight),g=parseFloat(w.style.height),y=Math.max(u,g);if(y<I){const p=y+N,h=Math.min(I,p),M=p-h;w.style.height=h+"px",w.style.bottom==="0px"&&(v.scrollTop=M>0?M:0,w.style.justifyContent="flex-end")}}}l.current=v.scrollTop})})})]})});Fe.displayName=xe;var We="SelectGroup",[Gt,qt]=oe(We),zt=n.forwardRef((o,t)=>{const{__scopeSelect:e,...r}=o,c=Ie();return a.jsx(Gt,{scope:e,id:c,children:a.jsx(j.div,{role:"group","aria-labelledby":c,...r,ref:t})})});zt.displayName=We;var Ke="SelectLabel",$e=n.forwardRef((o,t)=>{const{__scopeSelect:e,...r}=o,c=qt(Ke,e);return a.jsx(j.div,{id:c.id,...r,ref:t})});$e.displayName=Ke;var ce="SelectItem",[Yt,Ge]=oe(ce),qe=n.forwardRef((o,t)=>{const{__scopeSelect:e,value:r,disabled:c=!1,textValue:d,...s}=o,i=z(ce,e),l=Y(ce,e),f=i.value===r,[v,w]=n.useState(d??""),[b,N]=n.useState(!1),I=k(t,p=>{var h;return(h=l.itemRefCallback)==null?void 0:h.call(l,p,r,c)}),u=Ie(),g=n.useRef("touch"),y=()=>{c||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> 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(Yt,{scope:e,value:r,disabled:c,textId:u,isSelected:f,onItemTextChange:n.useCallback(p=>{w(h=>h||((p==null?void 0:p.textContent)??"").trim())},[]),children:a.jsx(ie.ItemSlot,{scope:e,value:r,disabled:c,textValue:v,children:a.jsx(j.div,{role:"option","aria-labelledby":u,"data-highlighted":b?"":void 0,"aria-selected":f&&b,"data-state":f?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...s,ref:I,onFocus:P(s.onFocus,()=>N(!0)),onBlur:P(s.onBlur,()=>N(!1)),onClick:P(s.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:P(s.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:P(s.onPointerDown,p=>{g.current=p.pointerType}),onPointerMove:P(s.onPointerMove,p=>{var h;g.current=p.pointerType,c?(h=l.onItemLeave)==null||h.call(l):g.current==="mouse"&&p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,p=>{var h;p.currentTarget===document.activeElement&&((h=l.onItemLeave)==null||h.call(l))}),onKeyDown:P(s.onKeyDown,p=>{var M;((M=l.searchRef)==null?void 0:M.current)!==""&&p.key===" "||(Dt.includes(p.key)&&y(),p.key===" "&&p.preventDefault())})})})})});qe.displayName=ce;var se="SelectItemText",ze=n.forwardRef((o,t)=>{const{__scopeSelect:e,className:r,style:c,...d}=o,s=z(se,e),i=Y(se,e),l=Ge(se,e),f=Bt(se,e),[v,w]=n.useState(null),b=k(t,y=>w(y),l.onItemTextChange,y=>{var p;return(p=i.itemTextRefCallback)==null?void 0:p.call(i,y,l.value,l.disabled)}),N=v==null?void 0:v.textContent,I=n.useMemo(()=>a.jsx("option",{value:l.value,disabled:l.disabled,children:N},l.value),[l.disabled,l.value,N]),{onNativeOptionAdd:u,onNativeOptionRemove:g}=f;return G(()=>(u(I),()=>g(I)),[u,g,I]),a.jsxs(a.Fragment,{children:[a.jsx(j.span,{id:l.textId,...d,ref:b}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Re.createPortal(d.children,s.valueNode):null]})});ze.displayName=se;var Ye="SelectItemIndicator",Xe=n.forwardRef((o,t)=>{const{__scopeSelect:e,...r}=o;return Ge(Ye,e).isSelected?a.jsx(j.span,{"aria-hidden":!0,...r,ref:t}):null});Xe.displayName=Ye;var we="SelectScrollUpButton",Ze=n.forwardRef((o,t)=>{const e=Y(we,o.__scopeSelect),r=be(we,o.__scopeSelect),[c,d]=n.useState(!1),s=k(t,r.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let i=function(){const f=l.scrollTop>0;d(f)};const l=e.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),c?a.jsx(Qe,{...o,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=e;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});Ze.displayName=we;var ye="SelectScrollDownButton",Je=n.forwardRef((o,t)=>{const e=Y(ye,o.__scopeSelect),r=be(ye,o.__scopeSelect),[c,d]=n.useState(!1),s=k(t,r.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let i=function(){const f=l.scrollHeight-l.clientHeight,v=Math.ceil(l.scrollTop)<f;d(v)};const l=e.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[e.viewport,e.isPositioned]),c?a.jsx(Qe,{...o,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=e;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});Je.displayName=ye;var Qe=n.forwardRef((o,t)=>{const{__scopeSelect:e,onAutoScroll:r,...c}=o,d=Y("SelectScrollButton",e),s=n.useRef(null),i=de(e),l=n.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>l(),[l]),G(()=>{var v;const f=i().find(w=>w.ref.current===document.activeElement);(v=f==null?void 0:f.ref.current)==null||v.scrollIntoView({block:"nearest"})},[i]),a.jsx(j.div,{"aria-hidden":!0,...c,ref:t,style:{flexShrink:0,...c.style},onPointerDown:P(c.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:P(c.onPointerMove,()=>{var f;(f=d.onItemLeave)==null||f.call(d),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:P(c.onPointerLeave,()=>{l()})})}),Xt="SelectSeparator",et=n.forwardRef((o,t)=>{const{__scopeSelect:e,...r}=o;return a.jsx(j.div,{"aria-hidden":!0,...r,ref:t})});et.displayName=Xt;var Ce="SelectArrow",Zt=n.forwardRef((o,t)=>{const{__scopeSelect:e,...r}=o,c=ue(e),d=z(Ce,e),s=Y(Ce,e);return d.open&&s.position==="popper"?a.jsx(_t,{...c,...r,ref:t}):null});Zt.displayName=Ce;var Jt="SelectBubbleInput",tt=n.forwardRef(({__scopeSelect:o,value:t,...e},r)=>{const c=n.useRef(null),d=k(r,c),s=St(t);return n.useEffect(()=>{const i=c.current;if(!i)return;const l=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&v){const w=new Event("change",{bubbles:!0});v.call(i,t),i.dispatchEvent(w)}},[s,t]),a.jsx(j.select,{...e,style:{...xt,...e.style},ref:d,defaultValue:t})});tt.displayName=Jt;function ot(o){return o===""||o===void 0}function nt(o){const t=Ct(o),e=n.useRef(""),r=n.useRef(0),c=n.useCallback(s=>{const i=e.current+s;t(i),function l(f){e.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),d=n.useCallback(()=>{e.current="",window.clearTimeout(r.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(r.current),[]),[e,c,d]}function rt(o,t,e){const c=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,d=e?o.indexOf(e):-1;let s=Qt(o,Math.max(d,0));c.length===1&&(s=s.filter(f=>f!==e));const l=s.find(f=>f.textValue.toLowerCase().startsWith(c.toLowerCase()));return l!==e?l:void 0}function Qt(o,t){return o.map((e,r)=>o[(t+r)%o.length])}var eo=je,st=Ae,to=Oe,oo=Le,no=ke,at=Be,ro=Fe,lt=$e,ct=qe,so=ze,ao=Xe,it=Ze,dt=Je,ut=et;const ho=eo,go=to,lo=n.forwardRef(({className:o,children:t,...e},r)=>a.jsxs(st,{ref:r,className:q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",o),...e,children:[t,a.jsx(oo,{asChild:!0,children:a.jsx(_e,{className:"h-4 w-4 opacity-50"})})]}));lo.displayName=st.displayName;const pt=n.forwardRef(({className:o,...t},e)=>a.jsx(it,{ref:e,className:q("flex cursor-default items-center justify-center py-1",o),...t,children:a.jsx(Mt,{className:"h-4 w-4"})}));pt.displayName=it.displayName;const ft=n.forwardRef(({className:o,...t},e)=>a.jsx(dt,{ref:e,className:q("flex cursor-default items-center justify-center py-1",o),...t,children:a.jsx(_e,{className:"h-4 w-4"})}));ft.displayName=dt.displayName;const co=n.forwardRef(({className:o,children:t,position:e="popper",...r},c)=>a.jsx(no,{children:a.jsxs(at,{ref:c,className:q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md 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",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",o),position:e,...r,children:[a.jsx(pt,{}),a.jsx(ro,{className:q("p-1",e==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(ft,{})]})}));co.displayName=at.displayName;const io=n.forwardRef(({className:o,...t},e)=>a.jsx(lt,{ref:e,className:q("py-1.5 pl-8 pr-2 text-sm font-semibold",o),...t}));io.displayName=lt.displayName;const uo=n.forwardRef(({className:o,children:t,...e},r)=>a.jsxs(ct,{ref:r,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),...e,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ao,{children:a.jsx(jt,{className:"h-4 w-4"})})}),a.jsx(so,{children:t})]}));uo.displayName=ct.displayName;const po=n.forwardRef(({className:o,...t},e)=>a.jsx(ut,{ref:e,className:q("-mx-1 my-1 h-px bg-muted",o),...t}));po.displayName=ut.displayName;class vo{constructor(t,e){this.baseUrl=t,this.nonce=e}async request(t,e="GET",r=null,c={}){var i;const d={method:e,credentials:"include",headers:{"Content-Type":c["Content-Type"]||"application/json","X-WP-Nonce":this.nonce},...c};r&&(d.body=(i=c["Content-Type"])!=null&&i.includes("json")?JSON.stringify(r):r);const s=await fetch(`${this.baseUrl}${t}`,d);if(!s.ok){const l=await s.json().catch(()=>({}));throw{status:s.status,data:l,message:l.message||`HTTP error! Status: ${s.status}`}}return s.json()}get(t,e={}){return this.request(t,"GET",null,e)}post(t,e,r={}){return this.request(t,"POST",e,r)}put(t,e,r={}){return this.request(t,"PUT",e,r)}delete(t,e={}){return this.request(t,"DELETE",null,e)}}export{jt as C,vo as F,ho as S,lo as a,go as b,co as c,uo as d};
//# sourceMappingURL=FetchWrapper-DZ79aYT8.js.map
