vendor: 28,797 bytes, line 1
1import{r as n,T as Qe,j as S,bY as E,X as Te,$ as pe,bp as Bt,bq as Rt,bZ as wt,af as mt,b_ as ht,bz as ut,b$ as kt,bs as zt,c0 as _t,c1 as c,aD as dt,bu as Wt,c2 as qt,c3 as Yt,aA as et,c4 as $t,c5 as Xt,c6 as Gt,c7 as Kt,c8 as Zt,c9 as Jt,bv as It,bw as Qt,ca as en,am as Tt,bx as tn,by as nn,ag as Ce,ah as ft,br as on,aq as Mt,W as He,cb as sn,Y as ve,bo as rn,cc as ln,cd as it,Z as st,ce as an,cf as cn,cg as un,ch as dn,ci as fn,cj as pn,ck as gn,cl as At,cm as Ct,ai as mn,cn as hn,co as xn,bL as bn,cp as vn,cq as xt,a0 as Sn,bk as yn,aj as Et,cr as Rn,cs as wn,ct as In,al as Tn,cu as Mn,cv as rt,c as je,a7 as An,aC as Cn}from"./main-BRoHUnkC.js";import{I as En}from"./IconSelector-GhFqcJro.js";import{I as Pn}from"./IconChevronUp-DziuRCMp.js";import{u as Vn,c as lt,s as at}from"./CSPContext-DNGQAA69.js";const Pt=n.createContext(null),Vt=n.createContext(null);function Me(){const e=n.useContext(Pt);if(e===null)throw new Error(Qe(60));return e}function Ht(){const e=n.useContext(Vt);if(e===null)throw new Error(Qe(61));return e}const Hn=(e,t)=>Object.is(e,t);function ke(e,t,o){return e==null||t==null?Object.is(e,t):o(e,t)}function jn(e,t,o){return!e||e.length===0?!1:e.some(l=>l===void 0?!1:ke(t,l,o))}function qe(e,t,o){return!e||e.length===0?-1:e.findIndex(l=>l===void 0?!1:ke(l,t,o))}function Ln(e,t,o){return e.filter(l=>!ke(t,l,o))}function ct(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function jt(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function Un(e){if(!Array.isArray(e))return e!=null&&!("null"in e);if(jt(e)){for(const t of e)for(const o of t.items)if(o&&o.value==null&&o.label!=null)return!0;return!1}for(const t of e)if(t&&t.value==null&&t.label!=null)return!0;return!1}function Dn(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return ct(e)}function Be(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?ct(e.value):ct(e)}function Lt(e,t,o){function l(){return Dn(e,o)}if(o&&e!=null)return o(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??l();if(Array.isArray(t)){const R=jt(t)?t.flatMap(s=>s.items):t;if(e==null||typeof e!="object"){const s=R.find(f=>f.value===e);return s&&s.label!=null?s.label:l()}if("value"in e){const s=R.find(f=>f&&f.value===e.value);if(s&&s.label!=null)return s.label}}return l()}function Nn(e,t,o){return e.reduce((l,R,s)=>(s>0&&l.push(", "),l.push(S.jsx(n.Fragment,{children:Lt(R,t,o)},s)),l),[])}const a={id:E(e=>e.id),modal:E(e=>e.modal),multiple:E(e=>e.multiple),items:E(e=>e.items),itemToStringLabel:E(e=>e.itemToStringLabel),itemToStringValue:E(e=>e.itemToStringValue),isItemEqualToValue:E(e=>e.isItemEqualToValue),value:E(e=>e.value),hasSelectedValue:E(e=>{const{value:t,multiple:o,itemToStringValue:l}=e;return t==null?!1:o&&Array.isArray(t)?t.length>0:Be(t,l)!==""}),hasNullItemLabel:E((e,t)=>t?Un(e.items):!1),open:E(e=>e.open),mounted:E(e=>e.mounted),forceMount:E(e=>e.forceMount),transitionStatus:E(e=>e.transitionStatus),openMethod:E(e=>e.openMethod),activeIndex:E(e=>e.activeIndex),selectedIndex:E(e=>e.selectedIndex),isActive:E((e,t)=>e.activeIndex===t),isSelected:E((e,t,o)=>{const l=e.isItemEqualToValue,R=e.value;return e.multiple?Array.isArray(R)&&R.some(s=>ke(o,s,l)):e.selectedIndex===t&&e.selectedIndex!==null?!0:ke(o,R,l)}),isSelectedByFocus:E((e,t)=>e.selectedIndex===t),popupProps:E(e=>e.popupProps),triggerProps:E(e=>e.triggerProps),triggerElement:E(e=>e.triggerElement),positionerElement:E(e=>e.positionerElement),listElement:E(e=>e.listElement),scrollUpArrowVisible:E(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:E(e=>e.scrollDownArrowVisible),hasScrollArrows:E(e=>e.hasScrollArrows)};function Fn(e,t){const o=n.useRef(e),l=Te(t);pe(()=>{o.current!==e&&l(o.current)},[e,l]),pe(()=>{o.current=e},[e])}function On(e){const{id:t,value:o,defaultValue:l=null,onValueChange:R,open:s,defaultOpen:f=!1,onOpenChange:p,name:u,autoComplete:B,disabled:C=!1,readOnly:A=!1,required:x=!1,modal:O=!0,actionsRef:Q,inputRef:M,onOpenChangeComplete:Y,items:H,multiple:w=!1,itemToStringLabel:m,itemToStringValue:b,isItemEqualToValue:W=Hn,highlightItemOnHover:ge=!0,children:te}=e,{clearErrors:k}=Bt(),{setDirty:X,setTouched:ce,setFocused:z,shouldValidateOnChange:q,validityData:G,setFilled:g,name:oe,disabled:K,validation:U,validationMode:j}=Rt(),r=wt({id:t}),y=K||C,D=oe??u,[i,V]=mt({controlled:o,default:w?l??ht:l,name:"Select",state:"value"}),[I,se]=mt({controlled:s,default:f,name:"Select",state:"open"}),d=n.useRef([]),P=n.useRef([]),ee=n.useRef(null),Se=n.useRef(null),Ee=n.useRef(0),T=n.useRef(null),L=n.useRef([]),le=n.useRef(!1),re=n.useRef(!1),ie=n.useRef(null),me=n.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),N=n.useRef(!1),{mounted:ne,setMounted:Ae,transitionStatus:$}=ut(I),{openMethod:F,triggerProps:ae,reset:ue}=kt(I),v=zt(()=>new _t({id:r,modal:O,multiple:w,itemToStringLabel:m,itemToStringValue:b,isItemEqualToValue:W,value:i,open:I,mounted:ne,transitionStatus:$,items:H,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,be=c(v,a.activeIndex),ye=c(v,a.selectedIndex),Le=c(v,a.triggerElement),Ue=c(v,a.positionerElement),Z=n.useMemo(()=>w&&Array.isArray(i)&&i.length===0?"":Be(i,b),[w,i,b]),de=n.useMemo(()=>w&&Array.isArray(i)?i.map(h=>Be(h,b)):Be(i,b),[w,i,b]),J=dt(v.state.triggerElement);Wt({id:r,commit:U.commit,value:i,controlRef:J,name:D,getValue:()=>de});const De=n.useRef(i);pe(()=>{i!==De.current&&v.set("forceMount",!0)},[v,i]),pe(()=>{g(w?Array.isArray(i)&&i.length>0:i!=null)},[w,i,g]),pe(function(){if(I)return;const _=L.current;if(w){const xe=Array.isArray(i)?i:[];if(xe.length===0){v.set("selectedIndex",null);return}const fe=xe[xe.length-1],Ke=qe(_,fe,W);v.set("selectedIndex",Ke===-1?null:Ke);return}const he=qe(_,i,W);v.set("selectedIndex",he===-1?null:he)},[w,I,i,L,W,v]),Fn(i,()=>{k(D),X(i!==G.initialValue),q()?U.commit(i):U.commit(i,!0)});const ze=Te((h,_)=>{if(p?.(h,_),!_.isCanceled&&(se(h),!h&&(_.reason===qt||_.reason===Yt)&&(ce(!0),z(!1),j==="onBlur"&&U.commit(i)),!h&&v.state.activeIndex!==null)){const he=d.current[v.state.activeIndex];queueMicrotask(()=>{he?.setAttribute("tabindex","-1")})}}),Ne=Te(()=>{Ae(!1),v.set("activeIndex",null),ue(),Y?.(!1)});et({enabled:!Q,open:I,ref:ee,onComplete(){I||Ne()}}),n.useImperativeHandle(Q,()=>({unmount:Ne}),[Ne]);const Pe=Te((h,_)=>{R?.(h,_),!_.isCanceled&&V(h)}),Re=Te(()=>{const h=v.state.listElement||ee.current;if(!h)return;const _=h.scrollTop,he=h.scrollTop+h.clientHeight,xe=_>1,fe=he<h.scrollHeight-1;v.state.scrollUpArrowVisible!==xe&&v.set("scrollUpArrowVisible",xe),v.state.scrollDownArrowVisible!==fe&&v.set("scrollDownArrowVisible",fe)}),we=$t({open:I,onOpenChange:ze,elements:{reference:Le,floating:Ue}}),Ye=Xt(we,{enabled:!A&&!y,event:"mousedown"}),_e=Gt(we,{bubbles:!1}),Ie=Kt(we,{enabled:!A&&!y,listRef:d,activeIndex:be,selectedIndex:ye,disabledIndices:ht,onNavigate(h){h===null&&!I||v.set("activeIndex",h)},focusItemOnHover:!1}),tt=Zt(we,{enabled:!A&&!y&&(I||!w),listRef:P,activeIndex:be,selectedIndex:ye,onMatch(h){I?v.set("activeIndex",h):Pe(L.current[h],Ce("none"))},onTypingChange(h){le.current=h}}),{getReferenceProps:Fe,getFloatingProps:Oe,getItemProps:$e}=Jt([Ye,_e,Ie,tt]),We=n.useMemo(()=>It(Fe(),ae,r?{id:r}:Qt),[Fe,ae,r]);en(()=>{v.update({popupProps:Oe(),triggerProps:We})}),pe(()=>{v.update({id:r,modal:O,multiple:w,value:i,open:I,mounted:ne,transitionStatus:$,popupProps:Oe(),triggerProps:We,items:H,itemToStringLabel:m,itemToStringValue:b,isItemEqualToValue:W,openMethod:F})},[v,r,O,w,i,I,ne,$,Oe,We,H,m,b,W,F]);const Xe=n.useMemo(()=>({store:v,name:D,required:x,disabled:y,readOnly:A,multiple:w,itemToStringLabel:m,itemToStringValue:b,highlightItemOnHover:ge,setValue:Pe,setOpen:ze,listRef:d,popupRef:ee,scrollHandlerRef:Se,handleScrollArrowVisibility:Re,scrollArrowsMountedCountRef:Ee,getItemProps:$e,events:we.context.events,valueRef:T,valuesRef:L,labelsRef:P,typingRef:le,selectionRef:me,selectedItemTextRef:ie,validation:U,onOpenChangeComplete:Y,keyboardActiveRef:re,alignItemWithTriggerActiveRef:N,initialValueRef:De}),[v,D,x,y,A,w,m,b,ge,Pe,ze,$e,we.context.events,U,Y,Re]),Ge=Tt(M,U.inputRef),nt=w&&Array.isArray(i)&&i.length>0,ot=n.useMemo(()=>!w||!Array.isArray(i)||!D?null:i.map(h=>{const _=Be(h,b);return S.jsx("input",{type:"hidden",name:D,value:_},_)}),[w,i,D,b]);return S.jsx(Pt.Provider,{value:Xe,children:S.jsxs(Vt.Provider,{value:we,children:[te,S.jsx("input",{...U.getInputValidationProps({onFocus(){v.state.triggerElement?.focus({focusVisible:!0})},onChange(h){if(h.nativeEvent.defaultPrevented)return;const _=h.target.value,he=Ce(ft,h.nativeEvent);function xe(){if(w)return;const fe=L.current.find(Ke=>Be(Ke,b).toLowerCase()===_.toLowerCase());fe!=null&&(X(fe!==G.initialValue),Pe(fe,he),q()&&U.commit(fe))}v.set("forceMount",!0),queueMicrotask(xe)}}),name:w?void 0:D,autoComplete:B,value:Z,disabled:y,required:x&&!nt,readOnly:A,ref:Ge,style:D?tn:nn,tabIndex:-1,"aria-hidden":!0}),ot]})})}const Ze=2,Bn=400,bt=200,kn={...ln,...rn,value:()=>null},zn=n.forwardRef(function(t,o){const{render:l,className:R,id:s,disabled:f=!1,nativeButton:p=!0,...u}=t,{setTouched:B,setFocused:C,validationMode:A,state:x,disabled:O}=Rt(),{labelId:Q}=on(),{store:M,setOpen:Y,selectionRef:H,validation:w,readOnly:m,required:b,alignItemWithTriggerActiveRef:W,disabled:ge,keyboardActiveRef:te}=Me(),k=O||ge||f,X=c(M,a.open),ce=c(M,a.value),z=c(M,a.triggerProps),q=c(M,a.positionerElement),G=c(M,a.listElement),g=c(M,a.id),oe=c(M,a.hasSelectedValue),K=!oe&&X,U=c(M,a.hasNullItemLabel,K),j=s??g;wt({id:j});const r=dt(q),y=n.useRef(null),{getButtonProps:D,buttonRef:i}=Mt({disabled:k,native:p}),V=Te(L=>{M.set("triggerElement",L)}),I=Tt(o,y,i,V),se=He(),d=He(),P=He(),ee=He();n.useEffect(()=>{if(X)return!(oe||U)?P.start(Bn,()=>{H.current.allowUnselectedMouseUp=!0,H.current.allowSelectedMouseUp=!0}):ee.start(bt,()=>{H.current.allowUnselectedMouseUp=!0,P.start(bt,()=>{H.current.allowSelectedMouseUp=!0})}),()=>{P.clear(),ee.clear()};H.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1},d.clear()},[X,oe,U,H,d,P,ee]);const Se=n.useMemo(()=>G?.id??sn(q)?.id,[G,q]),Ee=It(z,{id:j,role:"combobox","aria-expanded":X?"true":"false","aria-haspopup":"listbox","aria-controls":X?Se:void 0,"aria-labelledby":Q,"aria-readonly":m||void 0,"aria-required":b||void 0,tabIndex:k?-1:0,ref:I,onFocus(L){C(!0),X&&W.current&&Y(!1,Ce(ft,L.nativeEvent)),se.start(0,()=>{M.set("forceMount",!0)})},onBlur(L){st(q,L.relatedTarget)||(B(!0),C(!1),A==="onBlur"&&w.commit(ce))},onPointerMove(){te.current=!1},onKeyDown(){te.current=!0},onMouseDown(L){if(X)return;const le=it(L.currentTarget);function re(ie){if(!y.current)return;const me=ie.target;if(st(y.current,me)||st(r.current,me)||me===y.current)return;const N=an(y.current);ie.clientX>=N.left-Ze&&ie.clientX<=N.right+Ze&&ie.clientY>=N.top-Ze&&ie.clientY<=N.bottom+Ze||Y(!1,Ce(cn,ie))}d.start(0,()=>{le.addEventListener("mouseup",re,{once:!0})})}},w.getValidationProps,u,D);Ee.role="combobox";const T={...x,open:X,disabled:k,value:ce,readOnly:m,placeholder:!oe};return ve("button",t,{ref:[o,y],state:T,stateAttributesMapping:kn,props:Ee})}),_n={value:()=>null},Wn=n.forwardRef(function(t,o){const{className:l,render:R,children:s,placeholder:f,...p}=t,{store:u,valueRef:B}=Me(),C=c(u,a.value),A=c(u,a.items),x=c(u,a.itemToStringLabel),O=c(u,a.hasSelectedValue),Q=!O&&f!=null&&s==null,M=c(u,a.hasNullItemLabel,Q),Y={value:C,placeholder:!O};let H=null;return typeof s=="function"?H=s(C):s!=null?H=s:!O&&f!=null&&!M?H=f:Array.isArray(C)?H=Nn(C,A,x):H=Lt(C,A,x),ve("span",t,{state:Y,ref:[o,B],props:[{children:H},p],stateAttributesMapping:_n})}),qn=n.forwardRef(function(t,o){const{className:l,render:R,...s}=t,{store:f}=Me(),u={open:c(f,a.open)};return ve("span",t,{state:u,ref:o,props:[{"aria-hidden":!0,children:"â¼"},s],stateAttributesMapping:un})}),Yn=n.createContext(void 0),$n=n.forwardRef(function(t,o){const{store:l}=Me(),R=c(l,a.mounted),s=c(l,a.forceMount);return R||s?S.jsx(Yn.Provider,{value:!0,children:S.jsx(dn,{ref:o,...t})}):null}),Ut=n.createContext(void 0);function pt(){const e=n.useContext(Ut);if(!e)throw new Error(Qe(59));return e}function Je(e,t){e&&Object.assign(e.style,t)}const Dt={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Xn={position:"fixed"},Gn=n.forwardRef(function(t,o){const{anchor:l,positionMethod:R="absolute",className:s,render:f,side:p="bottom",align:u="center",sideOffset:B=0,alignOffset:C=0,collisionBoundary:A="clipping-ancestors",collisionPadding:x,arrowPadding:O=5,sticky:Q=!1,disableAnchorTracking:M,alignItemWithTrigger:Y=!0,collisionAvoidance:H=fn,...w}=t,{store:m,listRef:b,labelsRef:W,alignItemWithTriggerActiveRef:ge,selectedItemTextRef:te,valuesRef:k,initialValueRef:X,popupRef:ce,setValue:z}=Me(),q=Ht(),G=c(m,a.open),g=c(m,a.mounted),oe=c(m,a.modal),K=c(m,a.value),U=c(m,a.openMethod),j=c(m,a.positionerElement),r=c(m,a.triggerElement),y=c(m,a.isItemEqualToValue),D=c(m,a.transitionStatus),i=n.useRef(null),V=n.useRef(null),[I,se]=n.useState(Y),d=g&&I&&U!=="touch";!g&&I!==Y&&se(Y),pe(()=>{g||(a.scrollUpArrowVisible(m.state)&&m.set("scrollUpArrowVisible",!1),a.scrollDownArrowVisible(m.state)&&m.set("scrollDownArrowVisible",!1))},[m,g]),n.useImperativeHandle(ge,()=>d),pn((d||oe)&&G&&U!=="touch",r);const P=gn({anchor:l,floatingRootContext:q,positionMethod:R,mounted:g,side:p,sideOffset:B,align:u,alignOffset:C,arrowPadding:O,collisionBoundary:A,collisionPadding:x,sticky:Q,disableAnchorTracking:M??d,collisionAvoidance:H,keepMounted:!0}),ee=d?"none":P.side,Se=d?Xn:P.positionerStyles,Ee=n.useMemo(()=>{const N={};return G||(N.pointerEvents="none"),{role:"presentation",hidden:!g,style:{...Se,...N}}},[G,g,Se]),T={open:G,side:ee,align:P.align,anchorHidden:P.anchorHidden},L=Te(N=>{m.set("positionerElement",N)}),le=ve("div",t,{ref:[o,L],state:T,stateAttributesMapping:At,props:[Ee,Ct(D),w]}),re=n.useRef(0),ie=Te(N=>{if(N.size===0&&re.current===0||k.current.length===0)return;const ne=re.current;if(re.current=N.size,N.size===ne)return;const Ae=Ce(ft);if(ne!==0&&!m.state.multiple&&K!==null&&qe(k.current,K,y)===-1){const F=X.current,ue=F!=null&&qe(k.current,F,y)!==-1?F:null;z(ue,Ae),ue===null&&(m.set("selectedIndex",null),te.current=null)}if(ne!==0&&m.state.multiple&&Array.isArray(K)){const $=ae=>qe(k.current,ae,y)!==-1,F=K.filter(ae=>$(ae));(F.length!==K.length||F.some(ae=>!jn(K,ae,y)))&&(z(F,Ae),F.length===0&&(m.set("selectedIndex",null),te.current=null))}if(G&&d){m.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const $={height:""};Je(j,$),Je(ce.current,$)}}),me=n.useMemo(()=>({...P,side:ee,alignItemWithTriggerActive:d,setControlledAlignItemWithTrigger:se,scrollUpArrowRef:i,scrollDownArrowRef:V}),[P,ee,d,se]);return S.jsx(mn,{elementsRef:b,labelsRef:W,onMapChange:ie,children:S.jsxs(Ut.Provider,{value:me,children:[g&&oe&&S.jsx(hn,{inert:xn(!G),cutout:r}),le]})})});function Nt(e){const t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}const Ve=1,Kn={...At,...Et},Zn=n.forwardRef(function(t,o){const{render:l,className:R,finalFocus:s,...f}=t,{store:p,popupRef:u,onOpenChangeComplete:B,setOpen:C,valueRef:A,selectedItemTextRef:x,keyboardActiveRef:O,multiple:Q,handleScrollArrowVisibility:M,scrollHandlerRef:Y,highlightItemOnHover:H}=Me(),{side:w,align:m,alignItemWithTriggerActive:b,setControlledAlignItemWithTrigger:W,scrollDownArrowRef:ge,scrollUpArrowRef:te}=pt(),k=bn()!=null,X=Ht(),{nonce:ce,disableStyleElements:z}=Vn(),q=He(),G=c(p,a.id),g=c(p,a.open),oe=c(p,a.mounted),K=c(p,a.popupProps),U=c(p,a.transitionStatus),j=c(p,a.triggerElement),r=c(p,a.positionerElement),y=c(p,a.listElement),D=n.useRef(0),i=n.useRef(!1),V=n.useRef(0),I=n.useRef(!1),se=n.useRef({}),d=vn(),P=Te(T=>{if(!r||!u.current||!I.current)return;if(i.current||!b){M();return}const L=r.style.top==="0px",le=r.style.bottom==="0px",re=r.getBoundingClientRect().height,ie=it(r),me=getComputedStyle(r),N=parseFloat(me.marginTop),ne=parseFloat(me.marginBottom),Ae=vt(getComputedStyle(u.current)),$=Math.min(ie.documentElement.clientHeight-N-ne,Ae),F=T.scrollTop,ae=St(T);let ue=0,v=null,be=!1,ye=!1;const Le=Z=>{r.style.height=`${Z}px`},Ue=(Z,de)=>{const J=lt(Z,0,$-re);J>0&&Le(re+J),T.scrollTop=de,$-(re+J)<=Ve&&(i.current=!0),M()};if(L){const Z=ae-F,de=re+Z,J=Math.min(de,$);if(ue=J,Z<=Ve){Ue(Z,ae);return}$-J>Ve?ye=!0:be=!0}else if(le){const Z=F,de=re+Z,J=Math.min(de,$),De=de-$;if(ue=J,Z<=Ve){Ue(Z,0);return}$-J>Ve?v=0:(be=!0,F<ae&&(v=F-(Z-De)))}if(ue=Math.ceil(ue),ue!==0&&Le(ue),ye||v!=null){const Z=St(T),de=ye?Z:lt(v,0,Z);Math.abs(T.scrollTop-de)>Ve&&(T.scrollTop=de)}(be||ue>=$-Ve)&&(i.current=!0),M()});n.useImperativeHandle(Y,()=>P,[P]),et({open:g,ref:u,onComplete(){g&&B?.(!0)}});const ee={open:g,transitionStatus:U,side:w,align:m};pe(()=>{!r||!u.current||Object.keys(se.current).length||(se.current={top:r.style.top||"0",left:r.style.left||"0",right:r.style.right,height:r.style.height,bottom:r.style.bottom,minHeight:r.style.minHeight,maxHeight:r.style.maxHeight,marginTop:r.style.marginTop,marginBottom:r.style.marginBottom})},[u,r]),pe(()=>{g||b||(I.current=!1,i.current=!1,D.current=0,V.current=0,Je(r,se.current))},[g,b,r,u]),pe(()=>{const T=u.current;if(!(!g||!j||!r||!T||p.state.transitionStatus==="ending")){if(!b){I.current=!0,d.request(M),T.style.removeProperty("--transform-origin");return}queueMicrotask(()=>{const L=Jn(T);T.style.removeProperty("--transform-origin");try{const le=getComputedStyle(r),re=getComputedStyle(T),ie=it(j),me=xt(r),N=j.getBoundingClientRect(),ne=r.getBoundingClientRect(),Ae=N.left,$=N.height,F=y||T,ae=F.scrollHeight,ue=parseFloat(re.borderBottomWidth),v=parseFloat(le.marginTop)||10,be=parseFloat(le.marginBottom)||10,ye=parseFloat(le.minHeight)||100,Le=vt(re),Ue=5,Z=5,de=20,J=ie.documentElement.clientHeight-v-be,De=ie.documentElement.clientWidth,ze=J-N.bottom+$,Ne=x.current,Pe=A.current;let Re,we=0,Ye=0;if(Ne&&Pe){const h=Pe.getBoundingClientRect();Re=Ne.getBoundingClientRect();const _=h.left-Ae,he=Re.left-ne.left,xe=h.top-N.top+h.height/2,fe=Re.top-ne.top+Re.height/2;we=_-he,Ye=fe-xe}const _e=ze+Ye+be+ue;let Ie=Math.min(J,_e);const tt=J-v-be,Fe=_e-Ie,Oe=Math.max(Ue,Ae+we),$e=De-Z,We=Math.max(0,Oe+ne.width-$e);r.style.left=`${Oe-We}px`,r.style.height=`${Ie}px`,r.style.maxHeight="auto",r.style.marginTop=`${v}px`,r.style.marginBottom=`${be}px`,T.style.height="100%";const Xe=F.scrollHeight-F.clientHeight,Ge=Fe>=Xe;Ge&&(Ie=Math.min(J,ne.height)-(Fe-Xe));const nt=N.top<de||N.bottom>J-de||Ie<Math.min(ae,ye),ot=(me.visualViewport?.scale??1)!==1&&Sn;if(nt||ot){I.current=!0,Je(r,se.current),yn.flushSync(()=>W(!1));return}if(Ge){const h=Math.max(0,J-_e);r.style.top=ne.height>=tt?"0":`${h}px`,r.style.height=`${Ie}px`,F.scrollTop=F.scrollHeight-F.clientHeight,D.current=Math.max(ye,Ie)}else r.style.bottom="0",D.current=Math.max(ye,Ie),F.scrollTop=Fe;if(Re){const h=ne.top,_=ne.height,he=Re.top+Re.height/2,xe=_>0?(he-h)/_*100:50,fe=lt(xe,0,100);T.style.setProperty("--transform-origin",`50% ${fe}%`)}(D.current===J||Ie>=Le)&&(i.current=!0),M(),setTimeout(()=>{I.current=!0})}finally{L()}})}},[p,g,r,j,A,x,u,M,b,W,d,ge,te,y]),n.useEffect(()=>{if(!b||!r||!g)return;const T=xt(r);function L(le){C(!1,Ce(wn,le))}return T.addEventListener("resize",L),()=>{T.removeEventListener("resize",L)}},[C,b,r,g]);const Se={...y?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":Q||void 0,id:`${G}-list`},onKeyDown(T){O.current=!0,k&&In.has(T.key)&&T.stopPropagation()},onMouseMove(){O.current=!1},onPointerLeave(T){if(!H||Nt(T)||T.pointerType==="touch")return;const L=T.currentTarget;q.start(0,()=>{p.set("activeIndex",null),L.focus({preventScroll:!0})})},onScroll(T){y||P(T.currentTarget)},...b&&{style:y?{height:"100%"}:Dt}},Ee=ve("div",t,{ref:[o,u],state:ee,stateAttributesMapping:Kn,props:[K,Se,Ct(U),{className:!y&&b?at.className:void 0},f]});return S.jsxs(n.Fragment,{children:[!z&&at.getElement(ce),S.jsx(Rn,{context:X,modal:!1,disabled:!oe,returnFocus:s,restoreFocus:!0,children:Ee})]})});function vt(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function St(e){return Math.max(0,e.scrollHeight-e.clientHeight)}const yt=[["transform","none"],["scale","1"],["translate","0 0"]];function Jn(e){const{style:t}=e,o={};for(const[l,R]of yt)o[l]=t.getPropertyValue(l),t.setProperty(l,R,"important");return()=>{for(const[l]of yt){const R=o[l];R?t.setProperty(l,R):t.removeProperty(l)}}}const Qn=n.forwardRef(function(t,o){const{className:l,render:R,...s}=t,{store:f,scrollHandlerRef:p}=Me(),{alignItemWithTriggerActive:u}=pt(),B=c(f,a.hasScrollArrows),C=c(f,a.openMethod),A=c(f,a.multiple),O={id:`${c(f,a.id)}-list`,role:"listbox","aria-multiselectable":A||void 0,onScroll(M){p.current?.(M.currentTarget)},...u&&{style:Dt},className:B&&C!=="touch"?at.className:void 0},Q=Te(M=>{f.set("listElement",M)});return ve("div",t,{ref:[o,Q],props:[O,s]})}),Ft=n.createContext(void 0);function gt(){const e=n.useContext(Ft);if(!e)throw new Error(Qe(57));return e}const eo=n.memo(n.forwardRef(function(t,o){const{render:l,className:R,value:s=null,label:f,disabled:p=!1,nativeButton:u=!1,...B}=t,C=n.useRef(null),A=Tn({label:f,textRef:C,indexGuessBehavior:Mn.GuessFromOrder}),{store:x,getItemProps:O,setOpen:Q,setValue:M,selectionRef:Y,typingRef:H,valuesRef:w,keyboardActiveRef:m,multiple:b,highlightItemOnHover:W}=Me(),ge=He(),te=c(x,a.isActive,A.index),k=c(x,a.isSelected,A.index,s),X=c(x,a.isSelectedByFocus,A.index),ce=c(x,a.isItemEqualToValue),z=A.index,q=z!==-1,G=n.useRef(null),g=dt(z);pe(()=>{if(!q)return;const d=w.current;return d[z]=s,()=>{delete d[z]}},[q,z,s,w]),pe(()=>{if(!q)return;const d=x.state.value;let P=d;b&&Array.isArray(d)&&d.length>0&&(P=d[d.length-1]),P!==void 0&&ke(s,P,ce)&&x.set("selectedIndex",z)},[q,z,b,ce,x,s]);const oe={disabled:p,selected:k,highlighted:te},K=O({active:te,selected:k});K.onFocus=void 0,K.id=void 0;const U=n.useRef(null),j=n.useRef("mouse"),r=n.useRef(!1),{getButtonProps:y,buttonRef:D}=Mt({disabled:p,focusableWhenDisabled:!0,native:u});function i(d){const P=x.state.value;if(b){const ee=Array.isArray(P)?P:[],Se=k?Ln(ee,s,ce):[...ee,s];M(Se,Ce(rt,d))}else M(s,Ce(rt,d)),Q(!1,Ce(rt,d))}const V={role:"option","aria-selected":k,tabIndex:te?0:-1,onFocus(){x.set("activeIndex",z)},onMouseEnter(){!m.current&&x.state.selectedIndex===null&&W&&x.set("activeIndex",z)},onMouseMove(){W&&x.set("activeIndex",z)},onMouseLeave(d){!W||m.current||Nt(d)||ge.start(0,()=>{x.state.activeIndex===z&&x.set("activeIndex",null)})},onTouchStart(){Y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(d){U.current=d.key,x.set("activeIndex",z)},onClick(d){r.current=!1,!(d.type==="keydown"&&U.current===null)&&(p||U.current===" "&&H.current||j.current!=="touch"&&!te||(U.current=null,i(d.nativeEvent)))},onPointerEnter(d){j.current=d.pointerType},onPointerDown(d){j.current=d.pointerType,r.current=!0},onMouseUp(d){if(p)return;if(r.current){r.current=!1;return}const P=!Y.current.allowSelectedMouseUp&&k,ee=!Y.current.allowUnselectedMouseUp&&!k;P||ee||j.current!=="touch"&&!te||i(d.nativeEvent)}},I=ve("div",t,{ref:[D,o,A.ref,G],state:oe,props:[K,V,B,y]}),se=n.useMemo(()=>({selected:k,indexRef:g,textRef:C,selectedByFocus:X,hasRegistered:q}),[k,g,C,X,q]);return S.jsx(Ft.Provider,{value:se,children:I})})),to=n.forwardRef(function(t,o){const l=t.keepMounted??!1,{selected:R}=gt();return l||R?S.jsx(no,{...t,ref:o}):null}),no=n.memo(n.forwardRef((e,t)=>{const{render:o,className:l,keepMounted:R,...s}=e,{selected:f}=gt(),p=n.useRef(null),{transitionStatus:u,setMounted:B}=ut(f),A=ve("span",e,{ref:[t,p],state:{selected:f,transitionStatus:u},props:[{"aria-hidden":!0,children:"âï¸"},s],stateAttributesMapping:Et});return et({open:f,ref:p,onComplete(){f||B(!1)}}),A})),oo=n.memo(n.forwardRef(function(t,o){const{indexRef:l,textRef:R,selectedByFocus:s,hasRegistered:f}=gt(),{selectedItemTextRef:p}=Me(),{className:u,render:B,...C}=t,A=n.useCallback(O=>{if(!O||!f)return;const Q=p.current===null||!p.current.isConnected;(s||Q&&l.current===0)&&(p.current=O)},[p,l,s,f]);return ve("div",t,{ref:[A,o,R],props:C})})),Ot=n.forwardRef(function(t,o){const{render:l,className:R,direction:s,keepMounted:f=!1,...p}=t,{store:u,popupRef:B,listRef:C,handleScrollArrowVisibility:A,scrollArrowsMountedCountRef:x}=Me(),{side:O,scrollDownArrowRef:Q,scrollUpArrowRef:M}=pt(),Y=s==="up"?a.scrollUpArrowVisible:a.scrollDownArrowVisible,H=c(u,Y),w=c(u,a.openMethod),m=H&&w!=="touch",b=He(),W=s==="up"?M:Q,{transitionStatus:ge,setMounted:te}=ut(m);pe(()=>(x.current+=1,u.state.hasScrollArrows||u.set("hasScrollArrows",!0),()=>{x.current=Math.max(0,x.current-1),x.current===0&&u.state.hasScrollArrows&&u.set("hasScrollArrows",!1)}),[u,x]),et({open:m,ref:W,onComplete(){m||te(!1)}});const ce=ve("div",t,{ref:[o,W],state:{direction:s,visible:m,side:O,transitionStatus:ge},props:[{"aria-hidden":!0,children:s==="up"?"â²":"â¼",style:{position:"absolute"},onMouseMove(q){if(q.movementX===0&&q.movementY===0||b.isStarted())return;u.set("activeIndex",null);function G(){const g=u.state.listElement??B.current;if(!g)return;u.set("activeIndex",null),A();const oe=g.scrollTop===0,K=Math.round(g.scrollTop+g.clientHeight)>=g.scrollHeight;if(C.current.length===0&&(s==="up"?u.set("scrollUpArrowVisible",!oe):u.set("scrollDownArrowVisible",!K)),s==="up"&&oe||s==="down"&&K){b.clear();return}if((u.state.listElement||B.current)&&C.current&&C.current.length>0){const j=C.current,r=W.current?.offsetHeight||0;if(s==="up"){let y=0;const D=g.scrollTop+r;for(let V=0;V<j.length;V+=1){const I=j[V];if(I&&I.offsetTop>=D){y=V;break}}const i=Math.max(0,y-1);if(i<y){const V=j[i];V&&(g.scrollTop=Math.max(0,V.offsetTop-r))}else g.scrollTop=0}else{let y=j.length-1;const D=g.scrollTop+g.clientHeight-r;for(let V=0;V<j.length;V+=1){const I=j[V];if(I&&I.offsetTop+I.offsetHeight>D){y=Math.max(0,V-1);break}}const i=Math.min(j.length-1,y+1);if(i>y){const V=j[i];V&&(g.scrollTop=V.offsetTop+V.offsetHeight-g.clientHeight+r)}else g.scrollTop=g.scrollHeight-g.clientHeight}}b.start(40,G)}b.start(40,G)},onMouseLeave(){b.clear()}},p]});return m||f?ce:null}),so=n.forwardRef(function(t,o){return S.jsx(Ot,{...t,ref:o,direction:"down"})}),ro=n.forwardRef(function(t,o){return S.jsx(Ot,{...t,ref:o,direction:"up"})}),lo=n.createContext(void 0),io=n.forwardRef(function(t,o){const{className:l,render:R,...s}=t,[f,p]=n.useState(),u=n.useMemo(()=>({labelId:f,setLabelId:p}),[f,p]),B=ve("div",t,{ref:o,props:[{role:"group","aria-labelledby":f},s]});return S.jsx(lo.Provider,{value:u,children:B})}),ho=On;function xo({className:e,...t}){return S.jsx(io,{"data-slot":"select-group",className:je("scroll-my-1 p-1",e),...t})}function bo({className:e,...t}){return S.jsx(Wn,{"data-slot":"select-value",className:je("flex flex-1 text-left",e),...t})}function vo({className:e,size:t="default",children:o,...l}){return S.jsxs(zn,{"data-slot":"select-trigger","data-size":t,className:je("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l,children:[o,S.jsx(qn,{render:S.jsx(En,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function So({className:e,children:t,side:o="bottom",sideOffset:l=4,align:R="center",alignOffset:s=0,alignItemWithTrigger:f=!0,...p}){return S.jsx($n,{children:S.jsx(Gn,{side:o,sideOffset:l,align:R,alignOffset:s,alignItemWithTrigger:f,className:"isolate z-50",children:S.jsxs(Zn,{"data-slot":"select-content","data-align-trigger":f,className:je("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground
1/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...p,children:[S.jsx(ao,{}),S.jsx(Qn,{children:t}),S.jsx(co,{})]})})})}function yo({className:e,children:t,...o}){return S.jsxs(eo,{"data-slot":"select-item",className:je("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[S.jsx(oo,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),S.jsx(to,{render:S.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:S.jsx(An,{className:"pointer-events-none"})})]})}function ao({className:e,...t}){return S.jsx(ro,{"data-slot":"select-scroll-up-button",className:je("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:S.jsx(Pn,{})})}function co({className:e,...t}){return S.jsx(so,{"data-slot":"select-scroll-down-button",className:je("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:S.jsx(Cn,{})})}export{ho as S,vo as a,bo as b,So as c,yo as d,xo as e,Fn as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.