"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[370],{853:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(7401).A)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},905:(e,t,n)=>{n.d(t,{Mz:()=>eY,i3:()=>eZ,UC:()=>eX,bL:()=>eq,Bk:()=>eL});var r=n(2115);let o=["top","right","bottom","left"],i=Math.min,l=Math.max,a=Math.round,s=Math.floor,u=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},d={start:"end",end:"start"};function f(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function h(e){return e.split("-")[1]}function m(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}function g(e){return["top","bottom"].includes(p(e))?"y":"x"}function w(e){return e.replace(/start|end/g,e=>d[e])}function y(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function x(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function b(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function S(e,t,n){let r,{reference:o,floating:i}=e,l=g(t),a=m(g(t)),s=v(a),u=p(t),c="y"===l,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,w=o[s]/2-i[s]/2;switch(u){case"top":r={x:d,y:o.y-i.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-i.width,y:f};break;default:r={x:o.x,y:o.y}}switch(h(t)){case"start":r[a]-=w*(n&&c?-1:1);break;case"end":r[a]+=w*(n&&c?-1:1)}return r}let C=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=S(u,r,s),f=r,p={},h=0;for(let n=0;ne[t]>=0)}async function E(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=p(n),a=h(n),s="y"===g(n),u=["left","top"].includes(l)?-1:1,c=i&&s?-1:1,d=f(t,e),{mainAxis:m,crossAxis:v,alignmentAxis:w}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof w&&(v="end"===a?-1*w:w),s?{x:v*c,y:m*u}:{x:m*u,y:v*c}}function P(){return"undefined"!=typeof window}function k(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!P()&&(e instanceof Node||e instanceof j(e).Node)}function D(e){return!!P()&&(e instanceof Element||e instanceof j(e).Element)}function M(e){return!!P()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function H(e){return!!P()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}function O(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function I(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function B(e){let t=F(),n=D(e)?W(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function F(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function V(e){return["html","body","#document"].includes(k(e))}function W(e){return j(e).getComputedStyle(e)}function _(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if("html"===k(e))return e;let t=e.assignedSlot||e.parentNode||H(e)&&e.host||L(e);return H(t)?t.host:t}function G(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=z(t);return V(n)?t.ownerDocument?t.ownerDocument.body:t.body:M(n)&&O(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=j(o);if(i){let e=K(l);return t.concat(l,l.visualViewport||[],O(o)?o:[],e&&n?G(e):[])}return t.concat(o,G(o,[],n))}function K(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function U(e){let t=W(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=M(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=a(n)!==i||a(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function q(e){return D(e)?e:e.contextElement}function Y(e){let t=q(e);if(!M(t))return u(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=U(t),l=(i?a(n.width):n.width)/r,s=(i?a(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}let X=u(0);function Z(e){let t=j(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:X}function $(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=q(e),a=u(1);t&&(r?D(r)&&(a=Y(r)):a=Y(e));let s=(void 0===(o=n)&&(o=!1),r&&(!o||r===j(l))&&o)?Z(l):u(0),c=(i.left+s.x)/a.x,d=(i.top+s.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(l){let e=j(l),t=r&&D(r)?j(r):r,n=e,o=K(n);for(;o&&r&&t!==n;){let e=Y(o),t=o.getBoundingClientRect(),r=W(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,p*=e.y,c+=i,d+=l,o=K(n=j(o))}}return b({width:f,height:p,x:c,y:d})}function J(e,t){let n=_(e).scrollLeft;return t?t.left+n:$(L(e)).left+n}function Q(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:J(e,r)),y:r.top+t.scrollTop}}function ee(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=j(e),r=L(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;let e=F();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){let t=L(e),n=_(e),r=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+J(e),s=-n.scrollTop;return"rtl"===W(r).direction&&(a+=l(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(L(e));else if(D(t))r=function(e,t){let n=$(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=M(e)?Y(e):u(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=Z(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return b(r)}function et(e){return"static"===W(e).position}function en(e,t){if(!M(e)||"fixed"===W(e).position)return null;if(t)return t(e);let n=e.offsetParent;return L(e)===n&&(n=n.ownerDocument.body),n}function er(e,t){let n=j(e);if(I(e))return n;if(!M(e)){let t=z(e);for(;t&&!V(t);){if(D(t)&&!et(t))return t;t=z(t)}return n}let r=en(e,t);for(;r&&["table","td","th"].includes(k(r))&&et(r);)r=en(r,t);return r&&V(r)&&et(r)&&!B(r)?n:r||function(e){let t=z(e);for(;M(t)&&!V(t);){if(B(t))return t;if(I(t))break;t=z(t)}return null}(e)||n}let eo=async function(e){let t=this.getOffsetParent||er,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=M(t),o=L(t),i="fixed"===n,l=$(e,!0,i,t),a={scrollLeft:0,scrollTop:0},s=u(0);if(r||!r&&!i){if(("body"!==k(t)||O(o))&&(a=_(t)),r){let e=$(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=J(o))}let c=!o||r||i?u(0):Q(o,a);return{x:l.left+a.scrollLeft-s.x-c.x,y:l.top+a.scrollTop-s.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ei={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=L(r),a=!!t&&I(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),f=M(r);if((f||!f&&!i)&&(("body"!==k(r)||O(l))&&(s=_(r)),M(r))){let e=$(r);c=Y(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=!l||f||i?u(0):Q(l,s,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-s.scrollTop*c.y+d.y+p.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?I(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=G(e,[],!1).filter(e=>D(e)&&"body"!==k(e)),o=null,i="fixed"===W(e).position,l=i?z(e):e;for(;D(l)&&!V(l);){let t=W(l),n=B(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||O(l)&&!n&&function e(t,n){let r=z(t);return!(r===n||!D(r)||V(r))&&("fixed"===W(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=z(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((e,n)=>{let r=ee(t,n,o);return e.top=l(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=l(r.left,e.left),e},ee(t,s,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},getOffsetParent:er,getElementRects:eo,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=U(e);return{width:t,height:n}},getScale:Y,isElement:D,isRTL:function(e){return"rtl"===W(e).direction}},el=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:s,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=f(e,t)||{};if(null==d)return{};let w=x(p),y={x:n,y:r},b=m(g(o)),S=v(b),C=await s.getDimensions(d),R="y"===b,T=R?"clientHeight":"clientWidth",A=a.reference[S]+a.reference[b]-y[b]-a.floating[S],E=y[b]-a.reference[b],P=await (null==s.getOffsetParent?void 0:s.getOffsetParent(d)),k=P?P[T]:0;k&&await (null==s.isElement?void 0:s.isElement(P))||(k=u.floating[T]||a.floating[S]);let j=k/2-C[S]/2-1,L=i(w[R?"top":"left"],j),N=i(w[R?"bottom":"right"],j),D=k-C[S]-N,M=k/2-C[S]/2+(A/2-E/2),H=l(L,i(M,D)),O=!c.arrow&&null!=h(o)&&M!==H&&a.reference[S]/2-(M{let r=new Map,o={platform:ei,...n},i={...o.platform,_c:r};return C(e,t,{...o,platform:i})};var es=n(7650),eu="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ec(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!ec(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ec(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ed(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ef(e,t){let n=ed(e);return Math.round(t*n)/n}function ep(e){let t=r.useRef(e);return eu(()=>{t.current=e}),t}let eh=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?el({element:n.current,padding:r}).fn(t):{}:n?el({element:n,padding:r}).fn(t):{}}}),em=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,s=await E(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}}(e),options:[e,t]}),ev=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=f(e,t),d={x:n,y:r},h=await R(t,c),v=g(p(o)),w=m(v),y=d[w],x=d[v];if(a){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=y+h[e],r=y-h[t];y=l(n,i(y,r))}if(s){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",n=x+h[e],r=x-h[t];x=l(n,i(x,r))}let b=u.fn({...t,[w]:y,[v]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[w]:a,[v]:s}}}}}}(e),options:[e,t]}),eg=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=f(e,t),c={x:n,y:r},d=g(o),h=m(d),v=c[h],w=c[d],y=f(a,t),x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(s){let e="y"===h?"height":"width",t=i.reference[h]-i.floating[e]+x.mainAxis,n=i.reference[h]+i.reference[e]-x.mainAxis;vn&&(v=n)}if(u){var b,S;let e="y"===h?"width":"height",t=["top","left"].includes(p(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(b=l.offset)?void 0:b[d])||0)+(t?0:x.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(S=l.offset)?void 0:S[d])||0)-(t?x.crossAxis:0);wr&&(w=r)}return{[h]:v,[d]:w}}}}(e),options:[e,t]}),ew=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:a,middlewareData:s,rects:u,initialPlacement:c,platform:d,elements:x}=t,{mainAxis:b=!0,crossAxis:S=!0,fallbackPlacements:C,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:E=!0,...P}=f(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};let k=p(a),j=g(c),L=p(c)===c,N=await (null==d.isRTL?void 0:d.isRTL(x.floating)),D=C||(L||!E?[y(c)]:function(e){let t=y(e);return[w(e),t,w(t)]}(c)),M="none"!==A;!C&&M&&D.push(...function(e,t,n,r){let o=h(e),i=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(p(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(w)))),i}(c,E,A,N));let H=[c,...D],O=await R(t,P),I=[],B=(null==(r=s.flip)?void 0:r.overflows)||[];if(b&&I.push(O[k]),S){let e=function(e,t,n){void 0===n&&(n=!1);let r=h(e),o=m(g(e)),i=v(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=y(l)),[l,y(l)]}(a,u,N);I.push(O[e[0]],O[e[1]])}if(B=[...B,{placement:a,overflows:I}],!I.every(e=>e<=0)){let e=((null==(o=s.flip)?void 0:o.index)||0)+1,t=H[e];if(t)return{data:{index:e,overflows:B},reset:{placement:t}};let n=null==(i=B.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(T){case"bestFit":{let e=null==(l=B.filter(e=>{if(M){let t=g(e.placement);return t===j||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}),ey=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,a;let{placement:s,rects:u,platform:c,elements:d}=t,{apply:m=()=>{},...v}=f(e,t),w=await R(t,v),y=p(s),x=h(s),b="y"===g(s),{width:S,height:C}=u.floating;"top"===y||"bottom"===y?(o=y,a=x===(await (null==c.isRTL?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(a=y,o="end"===x?"top":"bottom");let T=C-w.top-w.bottom,A=S-w.left-w.right,E=i(C-w[o],T),P=i(S-w[a],A),k=!t.middlewareData.shift,j=E,L=P;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(L=A),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(j=T),k&&!x){let e=l(w.left,0),t=l(w.right,0),n=l(w.top,0),r=l(w.bottom,0);b?L=S-2*(0!==e||0!==t?e+t:l(w.left,w.right)):j=C-2*(0!==n||0!==r?n+r:l(w.top,w.bottom))}await m({...t,availableWidth:L,availableHeight:j});let N=await c.getDimensions(d.floating);return S!==N.width||C!==N.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),ex=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=f(e,t);switch(r){case"referenceHidden":{let e=T(await R(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{let e=T(await R(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}}(e),options:[e,t]}),eb=(e,t)=>({...eh(e),options:[e,t]});var eS=n(3360),eC=n(5155),eR=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eC.jsx)(eS.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eC.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eR.displayName="Arrow";var eT=n(8068),eA=n(8166),eE=n(1524),eP=n(6611),ek="Popper",[ej,eL]=(0,eA.A)(ek),[eN,eD]=ej(ek),eM=e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return(0,eC.jsx)(eN,{scope:t,anchor:o,onAnchorChange:i,children:n})};eM.displayName=ek;var eH="PopperAnchor",eO=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:o,...i}=e,l=eD(eH,n),a=r.useRef(null),s=(0,eT.s)(t,a);return r.useEffect(()=>{l.onAnchorChange((null==o?void 0:o.current)||a.current)}),o?null:(0,eC.jsx)(eS.sG.div,{...i,ref:s})});eO.displayName=eH;var eI="PopperContent",[eB,eF]=ej(eI),eV=r.forwardRef((e,t)=>{var n,o,a,u,c,d,f,p;let{__scopePopper:h,side:m="bottom",sideOffset:v=0,align:g="center",alignOffset:w=0,arrowPadding:y=0,avoidCollisions:x=!0,collisionBoundary:b=[],collisionPadding:S=0,sticky:C="partial",hideWhenDetached:R=!1,updatePositionStrategy:T="optimized",onPlaced:A,...E}=e,P=eD(eI,h),[k,j]=r.useState(null),N=(0,eT.s)(t,e=>j(e)),[D,M]=r.useState(null),H=function(e){let[t,n]=r.useState(void 0);return(0,eP.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(D),O=null!==(f=null==H?void 0:H.width)&&void 0!==f?f:0,I=null!==(p=null==H?void 0:H.height)&&void 0!==p?p:0,B="number"==typeof S?S:{top:0,right:0,bottom:0,left:0,...S},F=Array.isArray(b)?b:[b],V=F.length>0,W={padding:B,boundary:F.filter(eG),altBoundary:V},{refs:_,floatingStyles:z,placement:K,isPositioned:U,middlewareData:Y}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);ec(p,o)||h(o);let[m,v]=r.useState(null),[g,w]=r.useState(null),y=r.useCallback(e=>{e!==C.current&&(C.current=e,v(e))},[]),x=r.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),b=l||m,S=a||g,C=r.useRef(null),R=r.useRef(null),T=r.useRef(d),A=null!=u,E=ep(u),P=ep(i),k=ep(c),j=r.useCallback(()=>{if(!C.current||!R.current)return;let e={placement:t,strategy:n,middleware:p};P.current&&(e.platform=P.current),ea(C.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==k.current};L.current&&!ec(T.current,t)&&(T.current=t,es.flushSync(()=>{f(t)}))})},[p,t,n,P,k]);eu(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);let L=r.useRef(!1);eu(()=>(L.current=!0,()=>{L.current=!1}),[]),eu(()=>{if(b&&(C.current=b),S&&(R.current=S),b&&S){if(E.current)return E.current(b,S,j);j()}},[b,S,j,E,A]);let N=r.useMemo(()=>({reference:C,floating:R,setReference:y,setFloating:x}),[y,x]),D=r.useMemo(()=>({reference:b,floating:S}),[b,S]),M=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=ef(D.floating,d.x),r=ef(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ed(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,D.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:j,refs:N,elements:D,floatingStyles:M}),[d,j,N,D,M])}({strategy:"fixed",placement:m+("center"!==g?"-"+g:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n{a&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let m=p&&d?function(e,t){let n,r=null,o=L(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function u(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),a();let{left:f,top:p,width:h,height:m}=e.getBoundingClientRect();if(c||t(),!h||!m)return;let v=s(p),g=s(o.clientWidth-(f+h)),w={rootMargin:-v+"px "+-g+"px "+-s(o.clientHeight-(p+m))+"px "+-s(f)+"px",threshold:l(0,i(1,d))||1},y=!0;function x(e){let t=e[0].intersectionRatio;if(t!==d){if(!y)return u();t?u(!1,t):n=setTimeout(()=>{u(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(x,w)}r.observe(e)}(!0),a}(p,n):null,v=-1,g=null;c&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&g&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),p&&!f&&g.observe(p),g.observe(t));let w=f?$(e):null;return f&&function t(){let r=$(e);w&&(r.x!==w.x||r.y!==w.y||r.width!==w.width||r.height!==w.height)&&n(),w=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{a&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=g)||e.disconnect(),g=null,f&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===T})},elements:{reference:P.anchor},middleware:[em({mainAxis:v+I,alignmentAxis:w}),x&&ev({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?eg():void 0,...W}),x&&ew({...W}),ey({...W,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),D&&eb({element:D,padding:y}),eK({arrowWidth:O,arrowHeight:I}),R&&ex({strategy:"referenceHidden",...W})]}),[X,Z]=eU(K),J=(0,eE.c)(A);(0,eP.N)(()=>{U&&(null==J||J())},[U,J]);let Q=null===(n=Y.arrow)||void 0===n?void 0:n.x,ee=null===(o=Y.arrow)||void 0===o?void 0:o.y,et=(null===(a=Y.arrow)||void 0===a?void 0:a.centerOffset)!==0,[en,er]=r.useState();return(0,eP.N)(()=>{k&&er(window.getComputedStyle(k).zIndex)},[k]),(0,eC.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:U?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[null===(u=Y.transformOrigin)||void 0===u?void 0:u.x,null===(c=Y.transformOrigin)||void 0===c?void 0:c.y].join(" "),...(null===(d=Y.hide)||void 0===d?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eC.jsx)(eB,{scope:h,placedSide:X,onArrowChange:M,arrowX:Q,arrowY:ee,shouldHideArrow:et,children:(0,eC.jsx)(eS.sG.div,{"data-side":X,"data-align":Z,...E,ref:N,style:{...E.style,animation:U?void 0:"none"}})})})});eV.displayName=eI;var eW="PopperArrow",e_={top:"bottom",right:"left",bottom:"top",left:"right"},ez=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=eF(eW,n),i=e_[o.placedSide];return(0,eC.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eC.jsx)(eR,{...r,ref:t,style:{...r.style,display:"block"}})})});function eG(e){return null!==e}ez.displayName=eW;var eK=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:s,middlewareData:u}=t,c=(null===(n=u.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,h]=eU(a),m={start:"0%",center:"50%",end:"100%"}[h],v=(null!==(i=null===(r=u.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(l=null===(o=u.arrow)||void 0===o?void 0:o.y)&&void 0!==l?l:0)+f/2,w="",y="";return"bottom"===p?(w=c?m:"".concat(v,"px"),y="".concat(-f,"px")):"top"===p?(w=c?m:"".concat(v,"px"),y="".concat(s.floating.height+f,"px")):"right"===p?(w="".concat(-f,"px"),y=c?m:"".concat(g,"px")):"left"===p&&(w="".concat(s.floating.width+f,"px"),y=c?m:"".concat(g,"px")),{data:{x:w,y}}}});function eU(e){let[t,n="center"]=e.split("-");return[t,n]}var eq=eM,eY=eO,eX=eV,eZ=ez},1014:(e,t,n)=>{n.d(t,{UC:()=>eM,YJ:()=>eO,In:()=>eN,q7:()=>eB,VF:()=>eV,p4:()=>eF,JU:()=>eI,ZL:()=>eD,bL:()=>ek,wn:()=>e_,PP:()=>eW,wv:()=>ez,l9:()=>ej,WT:()=>eL,LM:()=>eH});var r=n(2115),o=n(7650);function i(e,[t,n]){return Math.min(n,Math.max(t,e))}var l=n(3610),a=n(9741),s=n(8068),u=n(8166),c=n(4256),d=n(9674),f=n(2292),p=n(196),h=n(7668),m=n(905),v=n(7323),g=n(3360),w=n(2317),y=n(1524),x=n(1488),b=n(6611),S=n(858),C=n(3543),R=n(5587),T=n(4065),A=n(5155),E=[" ","Enter","ArrowUp","ArrowDown"],P=[" ","Enter"],k="Select",[j,L,N]=(0,a.N)(k),[D,M]=(0,u.A)(k,[N,m.Bk]),H=(0,m.Bk)(),[O,I]=D(k),[B,F]=D(k),V=e=>{let{__scopeSelect:t,children:n,open:o,defaultOpen:i,onOpenChange:l,value:a,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:v,required:g,form:w}=e,y=H(t),[b,S]=r.useState(null),[C,R]=r.useState(null),[T,E]=r.useState(!1),P=(0,c.jH)(d),[k=!1,L]=(0,x.i)({prop:o,defaultProp:i,onChange:l}),[N,D]=(0,x.i)({prop:a,defaultProp:s,onChange:u}),M=r.useRef(null),I=!b||w||!!b.closest("form"),[F,V]=r.useState(new Set),W=Array.from(F).map(e=>e.props.value).join(";");return(0,A.jsx)(m.bL,{...y,children:(0,A.jsxs)(O,{required:g,scope:t,trigger:b,onTriggerChange:S,valueNode:C,onValueNodeChange:R,valueNodeHasChildren:T,onValueNodeHasChildrenChange:E,contentId:(0,h.B)(),value:N,onValueChange:D,open:k,onOpenChange:L,dir:P,triggerPointerDownPosRef:M,disabled:v,children:[(0,A.jsx)(j.Provider,{scope:t,children:(0,A.jsx)(B,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{V(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{V(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),I?(0,A.jsxs)(eA,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:N,onChange:e=>D(e.target.value),disabled:v,form:w,children:[void 0===N?(0,A.jsx)("option",{value:""}):null,Array.from(F)]},W):null]})})};V.displayName=k;var W="SelectTrigger",_=r.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:o=!1,...i}=e,a=H(n),u=I(W,n),c=u.disabled||o,d=(0,s.s)(t,u.onTriggerChange),f=L(n),p=r.useRef("touch"),[h,v,w]=eE(e=>{let t=f().filter(e=>!e.disabled),n=t.find(e=>e.value===u.value),r=eP(t,e,n);void 0!==r&&u.onValueChange(r.value)}),y=e=>{c||(u.onOpenChange(!0),w()),e&&(u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,A.jsx)(m.Mz,{asChild:!0,...a,children:(0,A.jsx)(g.sG.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":eT(u.value)?"":void 0,...i,ref:d,onClick:(0,l.m)(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==p.current&&y(e)}),onPointerDown:(0,l.m)(i.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,l.m)(i.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&E.includes(e.key)&&(y(),e.preventDefault())})})})});_.displayName=W;var z="SelectValue",G=r.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...a}=e,u=I(z,n),{onValueNodeHasChildrenChange:c}=u,d=void 0!==i,f=(0,s.s)(t,u.onValueNodeChange);return(0,b.N)(()=>{c(d)},[c,d]),(0,A.jsx)(g.sG.span,{...a,ref:f,style:{pointerEvents:"none"},children:eT(u.value)?(0,A.jsx)(A.Fragment,{children:l}):i})});G.displayName=z;var K=r.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,A.jsx)(g.sG.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});K.displayName="SelectIcon";var U=e=>(0,A.jsx)(v.Z,{asChild:!0,...e});U.displayName="SelectPortal";var q="SelectContent",Y=r.forwardRef((e,t)=>{let n=I(q,e.__scopeSelect),[i,l]=r.useState();return((0,b.N)(()=>{l(new DocumentFragment)},[]),n.open)?(0,A.jsx)($,{...e,ref:t}):i?o.createPortal((0,A.jsx)(X,{scope:e.__scopeSelect,children:(0,A.jsx)(j.Slot,{scope:e.__scopeSelect,children:(0,A.jsx)("div",{children:e.children})})}),i):null});Y.displayName=q;var[X,Z]=D(q),$=r.forwardRef((e,t)=>{let{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:u,side:c,sideOffset:h,align:m,alignOffset:v,arrowPadding:g,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:S,avoidCollisions:C,...E}=e,P=I(q,n),[k,j]=r.useState(null),[N,D]=r.useState(null),M=(0,s.s)(t,e=>j(e)),[H,O]=r.useState(null),[B,F]=r.useState(null),V=L(n),[W,_]=r.useState(!1),z=r.useRef(!1);r.useEffect(()=>{if(k)return(0,R.Eq)(k)},[k]),(0,f.Oh)();let G=r.useCallback(e=>{let[t,...n]=V().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&N&&(N.scrollTop=0),n===r&&N&&(N.scrollTop=N.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[V,N]),K=r.useCallback(()=>G([H,k]),[G,H,k]);r.useEffect(()=>{W&&K()},[W,K]);let{onOpenChange:U,triggerPointerDownPosRef:Y}=P;r.useEffect(()=>{if(k){let e={x:0,y:0},t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(o=null===(n=Y.current)||void 0===n?void 0:n.x)&&void 0!==o?o:0)),y:Math.abs(Math.round(t.pageY)-(null!==(i=null===(r=Y.current)||void 0===r?void 0:r.y)&&void 0!==i?i:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():k.contains(n.target)||U(!1),document.removeEventListener("pointermove",t),Y.current=null};return null!==Y.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[k,U,Y]),r.useEffect(()=>{let e=()=>U(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[U]);let[Z,$]=eE(e=>{let t=V().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=eP(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),ee=r.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==P.value&&P.value===t||r)&&(O(e),r&&(z.current=!0))},[P.value]),et=r.useCallback(()=>null==k?void 0:k.focus(),[k]),en=r.useCallback((e,t,n)=>{let r=!z.current&&!n;(void 0!==P.value&&P.value===t||r)&&F(e)},[P.value]),er="popper"===o?Q:J,eo=er===Q?{side:c,sideOffset:h,align:m,alignOffset:v,arrowPadding:g,collisionBoundary:y,collisionPadding:x,sticky:b,hideWhenDetached:S,avoidCollisions:C}:{};return(0,A.jsx)(X,{scope:n,content:k,viewport:N,onViewportChange:D,itemRefCallback:ee,selectedItem:H,onItemLeave:et,itemTextRefCallback:en,focusSelectedItem:K,selectedItemText:B,position:o,isPositioned:W,searchRef:Z,children:(0,A.jsx)(T.A,{as:w.DX,allowPinchZoom:!0,children:(0,A.jsx)(p.n,{asChild:!0,trapped:P.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.m)(i,e=>{var t;null===(t=P.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,A.jsx)(d.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:(0,A.jsx)(er,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:e=>e.preventDefault(),...E,...eo,onPlaced:()=>_(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:(0,l.m)(E.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||$(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=V().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>G(t)),e.preventDefault()}})})})})})})});$.displayName="SelectContentImpl";var J=r.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:o,...l}=e,a=I(q,n),u=Z(q,n),[c,d]=r.useState(null),[f,p]=r.useState(null),h=(0,s.s)(t,e=>p(e)),m=L(n),v=r.useRef(!1),w=r.useRef(!0),{viewport:y,selectedItem:x,selectedItemText:S,focusSelectedItem:C}=u,R=r.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&f&&y&&x&&S){let e=a.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=S.getBoundingClientRect();if("rtl"!==a.dir){let o=r.left-t.left,l=n.left-o,a=e.left-l,s=e.width+a,u=Math.max(s,t.width),d=i(l,[10,Math.max(10,window.innerWidth-10-u)]);c.style.minWidth=s+"px",c.style.left=d+"px"}else{let o=t.right-r.right,l=window.innerWidth-n.right-o,a=window.innerWidth-e.right-l,s=e.width+a,u=Math.max(s,t.width),d=i(l,[10,Math.max(10,window.innerWidth-10-u)]);c.style.minWidth=s+"px",c.style.right=d+"px"}let l=m(),s=window.innerHeight-20,u=y.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),g=parseInt(d.borderBottomWidth,10),w=p+h+u+parseInt(d.paddingBottom,10)+g,b=Math.min(5*x.offsetHeight,w),C=window.getComputedStyle(y),R=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),A=e.top+e.height/2-10,E=x.offsetHeight/2,P=p+h+(x.offsetTop+E);if(P<=A){let e=l.length>0&&x===l[l.length-1].ref.current;c.style.bottom="0px";let t=Math.max(s-A,E+(e?T:0)+(f.clientHeight-y.offsetTop-y.offsetHeight)+g);c.style.height=P+t+"px"}else{let e=l.length>0&&x===l[0].ref.current;c.style.top="0px";let t=Math.max(A,p+y.offsetTop+(e?R:0)+E);c.style.height=t+(w-P)+"px",y.scrollTop=P-A+y.offsetTop}c.style.margin="".concat(10,"px 0"),c.style.minHeight=b+"px",c.style.maxHeight=s+"px",null==o||o(),requestAnimationFrame(()=>v.current=!0)}},[m,a.trigger,a.valueNode,c,f,y,x,S,a.dir,o]);(0,b.N)(()=>R(),[R]);let[T,E]=r.useState();(0,b.N)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let P=r.useCallback(e=>{e&&!0===w.current&&(R(),null==C||C(),w.current=!1)},[R,C]);return(0,A.jsx)(ee,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:P,children:(0,A.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:(0,A.jsx)(g.sG.div,{...l,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});J.displayName="SelectItemAlignedPosition";var Q=r.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...i}=e,l=H(n);return(0,A.jsx)(m.UC,{...l,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});Q.displayName="SelectPopperPosition";var[ee,et]=D(q,{}),en="SelectViewport",er=r.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:o,...i}=e,a=Z(en,n),u=et(en,n),c=(0,s.s)(t,a.onViewportChange),d=r.useRef(0);return(0,A.jsxs)(A.Fragment,{children:[(0,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:o}),(0,A.jsx)(j.Slot,{scope:n,children:(0,A.jsx)(g.sG.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:(0,l.m)(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if((null==r?void 0:r.current)&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});er.displayName=en;var eo="SelectGroup",[ei,el]=D(eo),ea=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=(0,h.B)();return(0,A.jsx)(ei,{scope:n,id:o,children:(0,A.jsx)(g.sG.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ea.displayName=eo;var es="SelectLabel",eu=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=el(es,n);return(0,A.jsx)(g.sG.div,{id:o.id,...r,ref:t})});eu.displayName=es;var ec="SelectItem",[ed,ef]=D(ec),ep=r.forwardRef((e,t)=>{let{__scopeSelect:n,value:o,disabled:i=!1,textValue:a,...u}=e,c=I(ec,n),d=Z(ec,n),f=c.value===o,[p,m]=r.useState(null!=a?a:""),[v,w]=r.useState(!1),y=(0,s.s)(t,e=>{var t;return null===(t=d.itemRefCallback)||void 0===t?void 0:t.call(d,e,o,i)}),x=(0,h.B)(),b=r.useRef("touch"),S=()=>{i||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw 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(0,A.jsx)(ed,{scope:n,value:o,disabled:i,textId:x,isSelected:f,onItemTextChange:r.useCallback(e=>{m(t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[]),children:(0,A.jsx)(j.ItemSlot,{scope:n,value:o,disabled:i,textValue:p,children:(0,A.jsx)(g.sG.div,{role:"option","aria-labelledby":x,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:y,onFocus:(0,l.m)(u.onFocus,()=>w(!0)),onBlur:(0,l.m)(u.onBlur,()=>w(!1)),onClick:(0,l.m)(u.onClick,()=>{"mouse"!==b.current&&S()}),onPointerUp:(0,l.m)(u.onPointerUp,()=>{"mouse"===b.current&&S()}),onPointerDown:(0,l.m)(u.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,l.m)(u.onPointerMove,e=>{if(b.current=e.pointerType,i){var t;null===(t=d.onItemLeave)||void 0===t||t.call(d)}else"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.m)(u.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=d.onItemLeave)||void 0===t||t.call(d)}}),onKeyDown:(0,l.m)(u.onKeyDown,e=>{var t;(null===(t=d.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(P.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})});ep.displayName=ec;var eh="SelectItemText",em=r.forwardRef((e,t)=>{let{__scopeSelect:n,className:i,style:l,...a}=e,u=I(eh,n),c=Z(eh,n),d=ef(eh,n),f=F(eh,n),[p,h]=r.useState(null),m=(0,s.s)(t,e=>h(e),d.onItemTextChange,e=>{var t;return null===(t=c.itemTextRefCallback)||void 0===t?void 0:t.call(c,e,d.value,d.disabled)}),v=null==p?void 0:p.textContent,w=r.useMemo(()=>(0,A.jsx)("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=f;return(0,b.N)(()=>(y(w),()=>x(w)),[y,x,w]),(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(g.sG.span,{id:d.textId,...a,ref:m}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?o.createPortal(a.children,u.valueNode):null]})});em.displayName=eh;var ev="SelectItemIndicator",eg=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return ef(ev,n).isSelected?(0,A.jsx)(g.sG.span,{"aria-hidden":!0,...r,ref:t}):null});eg.displayName=ev;var ew="SelectScrollUpButton",ey=r.forwardRef((e,t)=>{let n=Z(ew,e.__scopeSelect),o=et(ew,e.__scopeSelect),[i,l]=r.useState(!1),a=(0,s.s)(t,o.onScrollButtonChange);return(0,b.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,A.jsx)(eS,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ey.displayName=ew;var ex="SelectScrollDownButton",eb=r.forwardRef((e,t)=>{let n=Z(ex,e.__scopeSelect),o=et(ex,e.__scopeSelect),[i,l]=r.useState(!1),a=(0,s.s)(t,o.onScrollButtonChange);return(0,b.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,A.jsx)(eS,{...e,ref:a,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eb.displayName=ex;var eS=r.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:o,...i}=e,a=Z("SelectScrollButton",n),s=r.useRef(null),u=L(n),c=r.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return r.useEffect(()=>()=>c(),[c]),(0,b.N)(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[u]),(0,A.jsx)(g.sG.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,l.m)(i.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:(0,l.m)(i.onPointerMove,()=>{var e;null===(e=a.onItemLeave)||void 0===e||e.call(a),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:(0,l.m)(i.onPointerLeave,()=>{c()})})}),eC=r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,A.jsx)(g.sG.div,{"aria-hidden":!0,...r,ref:t})});eC.displayName="SelectSeparator";var eR="SelectArrow";function eT(e){return""===e||void 0===e}r.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=H(n),i=I(eR,n),l=Z(eR,n);return i.open&&"popper"===l.position?(0,A.jsx)(m.i3,{...o,...r,ref:t}):null}).displayName=eR;var eA=r.forwardRef((e,t)=>{let{value:n,...o}=e,i=r.useRef(null),l=(0,s.s)(t,i),a=(0,S.Z)(n);return r.useEffect(()=>{let e=i.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(a!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[a,n]),(0,A.jsx)(C.s,{asChild:!0,children:(0,A.jsx)("select",{...o,ref:l,defaultValue:n})})});function eE(e){let t=(0,y.c)(e),n=r.useRef(""),o=r.useRef(0),i=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),l=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,l]}function eP(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(i=i.filter(e=>e!==n));let l=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}eA.displayName="BubbleSelect";var ek=V,ej=_,eL=G,eN=K,eD=U,eM=Y,eH=er,eO=ea,eI=eu,eB=ep,eF=em,eV=eg,eW=ey,e_=eb,ez=eC}}]);