"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1234],{62442:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,n.Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9224:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,n.Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},63715:function(e,t,r){r.d(t,{Z:function(){return l}});var n=r(65531);/**
 * @license lucide-react v0.446.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let l=(0,n.Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},80760:function(e,t,r){r.d(t,{u:function(){return n}});function n(e,[t,r]){return Math.min(r,Math.max(t,e))}},98259:function(e,t,r){r.d(t,{B:function(){return c}});var n=r(2265),l=r(57437),o=r(42210),i=n.forwardRef((e,t)=>{let{children:r,...o}=e,i=n.Children.toArray(r),u=i.find(s);if(u){let e=u.props.children,r=i.map(t=>t!==u?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,l.jsx)(a,{...o,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,l.jsx)(a,{...o,ref:t,children:r})});i.displayName="Slot";var a=n.forwardRef((e,t)=>{let{children:r,...l}=e;if(n.isValidElement(r)){let e,i;let a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return n.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let l=e[n],o=t[n],i=/^on[A-Z]/.test(n);i?l&&o?r[n]=(...e)=>{o(...e),l(...e)}:l&&(r[n]=l):"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}(l,r.props),ref:t?(0,o.F)(t,a):a})}return n.Children.count(r)>1?n.Children.only(null):null});a.displayName="SlotClone";var u=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});function s(e){return n.isValidElement(e)&&e.type===u}function c(e){let t=e+"CollectionProvider",[r,a]=function(e,t=[]){let r=[],o=()=>{let t=r.map(e=>n.createContext(e));return function(r){let l=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:l}}),[r,l])}};return o.scopeName=e,[function(t,o){let i=n.createContext(o),a=r.length;function u(t){let{scope:r,children:o,...u}=t,s=r?.[e][a]||i,c=n.useMemo(()=>u,Object.values(u));return(0,l.jsx)(s.Provider,{value:c,children:o})}return r=[...r,o],u.displayName=t+"Provider",[u,function(r,l){let u=l?.[e][a]||i,s=n.useContext(u);if(s)return s;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let l=r.reduce((t,{useScope:r,scopeName:n})=>{let l=r(e),o=l[`__scope${n}`];return{...t,...o}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}(o,...t)]}(t),[u,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:t,children:r}=e,o=n.useRef(null),i=n.useRef(new Map).current;return(0,l.jsx)(u,{scope:t,itemMap:i,collectionRef:o,children:r})};c.displayName=t;let d=e+"CollectionSlot",f=n.forwardRef((e,t)=>{let{scope:r,children:n}=e,a=s(d,r),u=(0,o.e)(t,a.collectionRef);return(0,l.jsx)(i,{ref:u,children:n})});f.displayName=d;let p=e+"CollectionItemSlot",h="data-radix-collection-item",v=n.forwardRef((e,t)=>{let{scope:r,children:a,...u}=e,c=n.useRef(null),d=(0,o.e)(t,c),f=s(p,r);return n.useEffect(()=>(f.itemMap.set(c,{ref:c,...u}),()=>void f.itemMap.delete(c))),(0,l.jsx)(i,{[h]:"",ref:d,children:a})});return v.displayName=p,[{Provider:c,Slot:f,ItemSlot:v},function(t){let r=s(e+"CollectionConsumer",t),l=n.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${h}]`)),n=Array.from(r.itemMap.values()),l=n.sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current));return l},[r.collectionRef,r.itemMap]);return l},a]}},65400:function(e,t,r){r.d(t,{gm:function(){return o}});var n=r(2265);r(57437);var l=n.createContext(void 0);function o(e){let t=n.useContext(l);return e||t||"ltr"}},36743:function(e,t,r){r.d(t,{f:function(){return a}});var n=r(2265),l=r(31033),o=r(57437),i=n.forwardRef((e,t)=>(0,o.jsx)(l.WV.label,{...e,ref:t,onMouseDown:t=>{let r=t.target;r.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label";var a=i},64574:function(e,t,r){r.d(t,{VY:function(){return eL},ZA:function(){return eO},JO:function(){return eW},ck:function(){return eH},wU:function(){return eK},eT:function(){return eF},__:function(){return eB},h_:function(){return e_},fC:function(){return eD},$G:function(){return eU},u_:function(){return eZ},Z0:function(){return ez},xz:function(){return eV},B4:function(){return eI},l_:function(){return eA}});var n=r(2265),l=r(54887),o=r(80760),i=r(85744),a=r(98259),u=r(42210),s=r(56989),c=r(65400),d=r(79249),f=r(31244),p=r(52759),h=r(20966),v=r(19906),m=r(52730),g=r(31033),w=r(57437),x=n.forwardRef((e,t)=>{let{children:r,...l}=e,o=n.Children.toArray(r),i=o.find(C);if(i){let e=i.props.children,r=o.map(t=>t!==i?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,w.jsx)(y,{...l,ref:t,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,w.jsx)(y,{...l,ref:t,children:r})});x.displayName="Slot";var y=n.forwardRef((e,t)=>{let{children:r,...l}=e;if(n.isValidElement(r)){let e,o;let i=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref;return n.cloneElement(r,{...function(e,t){let r={...t};for(let n in t){let l=e[n],o=t[n],i=/^on[A-Z]/.test(n);i?l&&o?r[n]=(...e)=>{o(...e),l(...e)}:l&&(r[n]=l):"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}(l,r.props),ref:t?(0,u.F)(t,i):i})}return n.Children.count(r)>1?n.Children.only(null):null});y.displayName="SlotClone";var b=({children:e})=>(0,w.jsx)(w.Fragment,{children:e});function C(e){return n.isValidElement(e)&&e.type===b}var S=r(16459),j=r(73763),M=r(51030),R=r(85184),E=n.forwardRef((e,t)=>(0,w.jsx)(g.WV.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));E.displayName="VisuallyHidden";var N=r(85859),k=r(73386),T=[" ","Enter","ArrowUp","ArrowDown"],P=[" ","Enter"],D="Select",[V,I,W]=(0,a.B)(D),[_,L]=(0,s.b)(D,[W,v.D7]),A=(0,v.D7)(),[O,B]=_(D),[H,F]=_(D),K=e=>{let{__scopeSelect:t,children:r,open:l,defaultOpen:o,onOpenChange:i,value:a,defaultValue:u,onValueChange:s,dir:d,name:f,autoComplete:p,disabled:m,required:g,form:x}=e,y=A(t),[b,C]=n.useState(null),[S,M]=n.useState(null),[R,E]=n.useState(!1),N=(0,c.gm)(d),[k=!1,T]=(0,j.T)({prop:l,defaultProp:o,onChange:i}),[P,D]=(0,j.T)({prop:a,defaultProp:u,onChange:s}),I=n.useRef(null),W=!b||x||!!b.closest("form"),[_,L]=n.useState(new Set),B=Array.from(_).map(e=>e.props.value).join(";");return(0,w.jsx)(v.fC,{...y,children:(0,w.jsxs)(O,{required:g,scope:t,trigger:b,onTriggerChange:C,valueNode:S,onValueNodeChange:M,valueNodeHasChildren:R,onValueNodeHasChildrenChange:E,contentId:(0,h.M)(),value:P,onValueChange:D,open:k,onOpenChange:T,dir:N,triggerPointerDownPosRef:I,disabled:m,children:[(0,w.jsx)(V.Provider,{scope:t,children:(0,w.jsx)(H,{scope:e.__scopeSelect,onNativeOptionAdd:n.useCallback(e=>{L(t=>new Set(t).add(e))},[]),onNativeOptionRemove:n.useCallback(e=>{L(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),W?(0,w.jsxs)(ek,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:P,onChange:e=>D(e.target.value),disabled:m,form:x,children:[void 0===P?(0,w.jsx)("option",{value:""}):null,Array.from(_)]},B):null]})})};K.displayName=D;var Z="SelectTrigger",U=n.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:l=!1,...o}=e,a=A(r),s=B(Z,r),c=s.disabled||l,d=(0,u.e)(t,s.onTriggerChange),f=I(r),p=n.useRef("touch"),[h,m,x]=eT(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===s.value),n=eP(t,e,r);void 0!==n&&s.onValueChange(n.value)}),y=e=>{c||(s.onOpenChange(!0),x()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,w.jsx)(v.ee,{asChild:!0,...a,children:(0,w.jsx)(g.WV.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:c,"data-disabled":c?"":void 0,"data-placeholder":eN(s.value)?"":void 0,...o,ref:d,onClick:(0,i.M)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)}),onPointerDown:(0,i.M)(o.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,i.M)(o.onKeyDown,e=>{let t=""!==h.current,r=e.ctrlKey||e.altKey||e.metaKey;r||1!==e.key.length||m(e.key),(!t||" "!==e.key)&&T.includes(e.key)&&(y(),e.preventDefault())})})})});U.displayName=Z;var z="SelectValue",$=n.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:l,children:o,placeholder:i="",...a}=e,s=B(z,r),{onValueNodeHasChildrenChange:c}=s,d=void 0!==o,f=(0,u.e)(t,s.onValueNodeChange);return(0,M.b)(()=>{c(d)},[c,d]),(0,w.jsx)(g.WV.span,{...a,ref:f,style:{pointerEvents:"none"},children:eN(s.value)?(0,w.jsx)(w.Fragment,{children:i}):o})});$.displayName=z;var q=n.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...l}=e;return(0,w.jsx)(g.WV.span,{"aria-hidden":!0,...l,ref:t,children:n||"▼"})});q.displayName="SelectIcon";var Y=e=>(0,w.jsx)(m.h,{asChild:!0,...e});Y.displayName="SelectPortal";var X="SelectContent",G=n.forwardRef((e,t)=>{let r=B(X,e.__scopeSelect),[o,i]=n.useState();return((0,M.b)(()=>{i(new DocumentFragment)},[]),r.open)?(0,w.jsx)(ee,{...e,ref:t}):o?l.createPortal((0,w.jsx)(J,{scope:e.__scopeSelect,children:(0,w.jsx)(V.Slot,{scope:e.__scopeSelect,children:(0,w.jsx)("div",{children:e.children})})}),o):null});G.displayName=X;var[J,Q]=_(X),ee=n.forwardRef((e,t)=>{let{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:h,align:v,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:C,hideWhenDetached:S,avoidCollisions:j,...M}=e,R=B(X,r),[E,T]=n.useState(null),[P,D]=n.useState(null),V=(0,u.e)(t,e=>T(e)),[W,_]=n.useState(null),[L,A]=n.useState(null),O=I(r),[H,F]=n.useState(!1),K=n.useRef(!1);n.useEffect(()=>{if(E)return(0,N.Ry)(E)},[E]),(0,f.EW)();let Z=n.useCallback(e=>{let[t,...r]=O().map(e=>e.ref.current),[n]=r.slice(-1),l=document.activeElement;for(let r of e)if(r===l||(r?.scrollIntoView({block:"nearest"}),r===t&&P&&(P.scrollTop=0),r===n&&P&&(P.scrollTop=P.scrollHeight),r?.focus(),document.activeElement!==l))return},[O,P]),U=n.useCallback(()=>Z([W,E]),[Z,W,E]);n.useEffect(()=>{H&&U()},[H,U]);let{onOpenChange:z,triggerPointerDownPosRef:$}=R;n.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-($.current?.x??0)),y:Math.abs(Math.round(t.pageY)-($.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():E.contains(r.target)||z(!1),document.removeEventListener("pointermove",t),$.current=null};return null!==$.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[E,z,$]),n.useEffect(()=>{let e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);let[q,Y]=eT(e=>{let t=O().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eP(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),G=n.useCallback((e,t,r)=>{let n=!K.current&&!r,l=void 0!==R.value&&R.value===t;(l||n)&&(_(e),n&&(K.current=!0))},[R.value]),Q=n.useCallback(()=>E?.focus(),[E]),ee=n.useCallback((e,t,r)=>{let n=!K.current&&!r,l=void 0!==R.value&&R.value===t;(l||n)&&A(e)},[R.value]),en="popper"===l?er:et,el=en===er?{side:c,sideOffset:h,align:v,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:b,sticky:C,hideWhenDetached:S,avoidCollisions:j}:{};return(0,w.jsx)(J,{scope:r,content:E,viewport:P,onViewportChange:D,itemRefCallback:G,selectedItem:W,onItemLeave:Q,itemTextRefCallback:ee,focusSelectedItem:U,selectedItemText:L,position:l,isPositioned:H,searchRef:q,children:(0,w.jsx)(k.Z,{as:x,allowPinchZoom:!0,children:(0,w.jsx)(p.M,{asChild:!0,trapped:R.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,i.M)(o,e=>{R.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,w.jsx)(d.XB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>R.onOpenChange(!1),children:(0,w.jsx)(en,{role:"listbox",id:R.contentId,"data-state":R.open?"open":"closed",dir:R.dir,onContextMenu:e=>e.preventDefault(),...M,...el,onPlaced:()=>F(!0),ref:V,style:{display:"flex",flexDirection:"column",outline:"none",...M.style},onKeyDown:(0,i.M)(M.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Y(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled),r=t.map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(r=r.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let t=e.target,n=r.indexOf(t);r=r.slice(n+1)}setTimeout(()=>Z(r)),e.preventDefault()}})})})})})})});ee.displayName="SelectContentImpl";var et=n.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:l,...i}=e,a=B(X,r),s=Q(X,r),[c,d]=n.useState(null),[f,p]=n.useState(null),h=(0,u.e)(t,e=>p(e)),v=I(r),m=n.useRef(!1),x=n.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:C,focusSelectedItem:S}=s,j=n.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&f&&y&&b&&C){let e=a.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=a.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==a.dir){let l=n.left-t.left,i=r.left-l,a=e.left-i,u=e.width+a,s=Math.max(u,t.width),d=window.innerWidth-10,f=(0,o.u)(i,[10,Math.max(10,d-s)]);c.style.minWidth=u+"px",c.style.left=f+"px"}else{let l=t.right-n.right,i=window.innerWidth-r.right-l,a=window.innerWidth-e.right-i,u=e.width+a,s=Math.max(u,t.width),d=window.innerWidth-10,f=(0,o.u)(i,[10,Math.max(10,d-s)]);c.style.minWidth=u+"px",c.style.right=f+"px"}let i=v(),u=window.innerHeight-20,s=y.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),w=parseInt(d.paddingBottom,10),x=p+h+s+w+g,S=Math.min(5*b.offsetHeight,x),j=window.getComputedStyle(y),M=parseInt(j.paddingTop,10),R=parseInt(j.paddingBottom,10),E=e.top+e.height/2-10,N=b.offsetHeight/2,k=b.offsetTop+N,T=p+h+k;if(T<=E){let e=i.length>0&&b===i[i.length-1].ref.current;c.style.bottom="0px";let t=f.clientHeight-y.offsetTop-y.offsetHeight;c.style.height=T+Math.max(u-E,N+(e?R:0)+t+g)+"px"}else{let e=i.length>0&&b===i[0].ref.current;c.style.top="0px";let t=Math.max(E,p+y.offsetTop+(e?M:0)+N);c.style.height=t+(x-T)+"px",y.scrollTop=T-E+y.offsetTop}c.style.margin="10px 0",c.style.minHeight=S+"px",c.style.maxHeight=u+"px",l?.(),requestAnimationFrame(()=>m.current=!0)}},[v,a.trigger,a.valueNode,c,f,y,b,C,a.dir,l]);(0,M.b)(()=>j(),[j]);let[R,E]=n.useState();(0,M.b)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let N=n.useCallback(e=>{e&&!0===x.current&&(j(),S?.(),x.current=!1)},[j,S]);return(0,w.jsx)(en,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:(0,w.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,w.jsx)(g.WV.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});et.displayName="SelectItemAlignedPosition";var er=n.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:l=10,...o}=e,i=A(r);return(0,w.jsx)(v.VY,{...i,...o,ref:t,align:n,collisionPadding:l,style:{boxSizing:"border-box",...o.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)"}})});er.displayName="SelectPopperPosition";var[en,el]=_(X,{}),eo="SelectViewport",ei=n.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:l,...o}=e,a=Q(eo,r),s=el(eo,r),c=(0,u.e)(t,a.onViewportChange),d=n.useRef(0);return(0,w.jsxs)(w.Fragment,{children:[(0,w.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:l}),(0,w.jsx)(V.Slot,{scope:r,children:(0,w.jsx)(g.WV.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,i.M)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if(n?.current&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,l=parseFloat(r.style.minHeight),o=parseFloat(r.style.height),i=Math.max(l,o);if(i<n){let l=i+e,o=Math.min(n,l),a=l-o;r.style.height=o+"px","0px"===r.style.bottom&&(t.scrollTop=a>0?a:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});ei.displayName=eo;var ea="SelectGroup",[eu,es]=_(ea),ec=n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=(0,h.M)();return(0,w.jsx)(eu,{scope:r,id:l,children:(0,w.jsx)(g.WV.div,{role:"group","aria-labelledby":l,...n,ref:t})})});ec.displayName=ea;var ed="SelectLabel",ef=n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=es(ed,r);return(0,w.jsx)(g.WV.div,{id:l.id,...n,ref:t})});ef.displayName=ed;var ep="SelectItem",[eh,ev]=_(ep),em=n.forwardRef((e,t)=>{let{__scopeSelect:r,value:l,disabled:o=!1,textValue:a,...s}=e,c=B(ep,r),d=Q(ep,r),f=c.value===l,[p,v]=n.useState(a??""),[m,x]=n.useState(!1),y=(0,u.e)(t,e=>d.itemRefCallback?.(e,l,o)),b=(0,h.M)(),C=n.useRef("touch"),S=()=>{o||(c.onValueChange(l),c.onOpenChange(!1))};if(""===l)throw 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(0,w.jsx)(eh,{scope:r,value:l,disabled:o,textId:b,isSelected:f,onItemTextChange:n.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:(0,w.jsx)(V.ItemSlot,{scope:r,value:l,disabled:o,textValue:p,children:(0,w.jsx)(g.WV.div,{role:"option","aria-labelledby":b,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:(0,i.M)(s.onFocus,()=>x(!0)),onBlur:(0,i.M)(s.onBlur,()=>x(!1)),onClick:(0,i.M)(s.onClick,()=>{"mouse"!==C.current&&S()}),onPointerUp:(0,i.M)(s.onPointerUp,()=>{"mouse"===C.current&&S()}),onPointerDown:(0,i.M)(s.onPointerDown,e=>{C.current=e.pointerType}),onPointerMove:(0,i.M)(s.onPointerMove,e=>{C.current=e.pointerType,o?d.onItemLeave?.():"mouse"===C.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,i.M)(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,i.M)(s.onKeyDown,e=>{let t=d.searchRef?.current!=="";t&&" "===e.key||(P.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})});em.displayName=ep;var eg="SelectItemText",ew=n.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:i,...a}=e,s=B(eg,r),c=Q(eg,r),d=ev(eg,r),f=F(eg,r),[p,h]=n.useState(null),v=(0,u.e)(t,e=>h(e),d.onItemTextChange,e=>c.itemTextRefCallback?.(e,d.value,d.disabled)),m=p?.textContent,x=n.useMemo(()=>(0,w.jsx)("option",{value:d.value,disabled:d.disabled,children:m},d.value),[d.disabled,d.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return(0,M.b)(()=>(y(x),()=>b(x)),[y,b,x]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g.WV.span,{id:d.textId,...a,ref:v}),d.isSelected&&s.valueNode&&!s.valueNodeHasChildren?l.createPortal(a.children,s.valueNode):null]})});ew.displayName=eg;var ex="SelectItemIndicator",ey=n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=ev(ex,r);return l.isSelected?(0,w.jsx)(g.WV.span,{"aria-hidden":!0,...n,ref:t}):null});ey.displayName=ex;var eb="SelectScrollUpButton",eC=n.forwardRef((e,t)=>{let r=Q(eb,e.__scopeSelect),l=el(eb,e.__scopeSelect),[o,i]=n.useState(!1),a=(0,u.e)(t,l.onScrollButtonChange);return(0,M.b)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollTop>0;i(e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,w.jsx)(eM,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eC.displayName=eb;var eS="SelectScrollDownButton",ej=n.forwardRef((e,t)=>{let r=Q(eS,e.__scopeSelect),l=el(eS,e.__scopeSelect),[o,i]=n.useState(!1),a=(0,u.e)(t,l.onScrollButtonChange);return(0,M.b)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)<e;i(r)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),o?(0,w.jsx)(eM,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ej.displayName=eS;var eM=n.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:l,...o}=e,a=Q("SelectScrollButton",r),u=n.useRef(null),s=I(r),c=n.useCallback(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return n.useEffect(()=>()=>c(),[c]),(0,M.b)(()=>{let e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,w.jsx)(g.WV.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,i.M)(o.onPointerDown,()=>{null===u.current&&(u.current=window.setInterval(l,50))}),onPointerMove:(0,i.M)(o.onPointerMove,()=>{a.onItemLeave?.(),null===u.current&&(u.current=window.setInterval(l,50))}),onPointerLeave:(0,i.M)(o.onPointerLeave,()=>{c()})})}),eR=n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,w.jsx)(g.WV.div,{"aria-hidden":!0,...n,ref:t})});eR.displayName="SelectSeparator";var eE="SelectArrow";function eN(e){return""===e||void 0===e}n.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,l=A(r),o=B(eE,r),i=Q(eE,r);return o.open&&"popper"===i.position?(0,w.jsx)(v.Eh,{...l,...n,ref:t}):null}).displayName=eE;var ek=n.forwardRef((e,t)=>{let{value:r,...l}=e,o=n.useRef(null),i=(0,u.e)(t,o),a=(0,R.D)(r);return n.useEffect(()=>{let e=o.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value"),l=n.set;if(a!==r&&l){let t=new Event("change",{bubbles:!0});l.call(e,r),e.dispatchEvent(t)}},[a,r]),(0,w.jsx)(E,{asChild:!0,children:(0,w.jsx)("select",{...l,ref:i,defaultValue:r})})});function eT(e){let t=(0,S.W)(e),r=n.useRef(""),l=n.useRef(0),o=n.useCallback(e=>{let n=r.current+e;t(n),function e(t){r.current=t,window.clearTimeout(l.current),""!==t&&(l.current=window.setTimeout(()=>e(""),1e3))}(n)},[t]),i=n.useCallback(()=>{r.current="",window.clearTimeout(l.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(l.current),[]),[r,o,i]}function eP(e,t,r){var n;let l=t.length>1&&Array.from(t).every(e=>e===t[0]),o=l?t[0]:t,i=r?e.indexOf(r):-1,a=(n=Math.max(i,0),e.map((t,r)=>e[(n+r)%e.length])),u=1===o.length;u&&(a=a.filter(e=>e!==r));let s=a.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==r?s:void 0}ek.displayName="BubbleSelect";var eD=K,eV=U,eI=$,eW=q,e_=Y,eL=G,eA=ei,eO=ec,eB=ef,eH=em,eF=ew,eK=ey,eZ=eC,eU=ej,ez=eR},85184:function(e,t,r){r.d(t,{D:function(){return l}});var n=r(2265);function l(e){let t=n.useRef({value:e,previous:e});return n.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}}}]);