1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[317],{47751:(e,t,r)=>{r.d(t,{$:()=>f,r:()=>u});var n=r(95155),l=r(12317),a=r(4019),o=r(40652),i=r(11645),s=r(47010),d=r(10580),c=r(36756);let u=(0,o.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",plain:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9",plain:""}},defaultVariants:{variant:"default",size:"default"}}),p=(0,a.nF)(({className:e,variant:t,size:r,asChild:a=!1,...o},i)=>{let s=a?l.DX:"button";return(0,n.jsx)(s,{className:(0,d.cn)(u({variant:t,size:r,className:e})),ref:i,...o})});p.displayName="Button";let f=(0,a.nF)(({onClick:e,loading:t,children:r,size:l,...a},o)=>{let[u,f]=(0,i.V)(async t=>{await e?.(t)},[e]),m=t||f;return(0,n.jsxs)(p,{...a,ref:o,disabled:a.disabled||m,onClick:e=>(0,s.hc)(u(e)),size:l,className:(0,d.cn)("relative",m&&"[&>:not(.stack-button-do-not-hide-when-siblings-are)]:invisible",a.className),children:[(0,n.jsx)(c.y,{className:(0,d.cn)("absolute inset-0 flex items-center justify-center stack-button-do-not-hide-when-siblings-are",!m&&"invisible")}),"string"==typeof r?(0,n.jsx)("span",{children:r}):r]})});f.displayName="Button"},42220:(e,t,r)=>{r.r(t),r.d(t,{Select:()=>eP,SelectContent:()=>eB,SelectGroup:()=>eM,SelectItem:()=>eV,SelectLabel:()=>eO,SelectScrollDownButton:()=>eL,SelectScrollUpButton:()=>e_,SelectSeparator:()=>eG,SelectTrigger:()=>eF,SelectValue:()=>eA});var n=r(95155),l=r(4019),a=r(87365),o=r(12115),i=r(47650),s=r(61786),d=r(93610),c=r(49741),u=r(88068),p=r(18166),f=r(4256),m=r(59674),h=r(62292),v=r(20196),x=r(67668),g=r(19895),y=r(17323),w=r(23360),b=r(12317),j=r(41524),S=r(1488),N=r(46611),C=r(50858),T=r(63543),k=r(15587),D=r(64065),R=[" ","Enter","ArrowUp","ArrowDown"],I=[" ","Enter"],E="Select",[P,M,A]=(0,c.N)(E),[F,_]=(0,p.A)(E,[A,g.Bk]),L=(0,g.Bk)(),[B,O]=F(E),[V,G]=F(E),H=e=>{let{__scopeSelect:t,children:r,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:d,onValueChange:c,dir:u,name:p,autoComplete:m,disabled:h,required:v,form:y}=e,w=L(t),[b,j]=o.useState(null),[N,C]=o.useState(null),[T,k]=o.useState(!1),D=(0,f.jH)(u),[R=!1,I]=(0,S.i)({prop:l,defaultProp:a,onChange:i}),[E,M]=(0,S.i)({prop:s,defaultProp:d,onChange:c}),A=o.useRef(null),F=!b||y||!!b.closest("form"),[_,O]=o.useState(new Set),G=Array.from(_).map(e=>e.props.value).join(";");return(0,n.jsx)(g.bL,{...w,children:(0,n.jsxs)(B,{required:v,scope:t,trigger:b,onTriggerChange:j,valueNode:N,onValueNodeChange:C,valueNodeHasChildren:T,onValueNodeHasChildrenChange:k,contentId:(0,x.B)(),value:E,onValueChange:M,open:R,onOpenChange:I,dir:D,triggerPointerDownPosRef:A,disabled:h,children:[(0,n.jsx)(P.Provider,{scope:t,children:(0,n.jsx)(V,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback(e=>{O(t=>new Set(t).add(e))},[]),onNativeOptionRemove:o.useCallback(e=>{O(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),F?(0,n.jsxs)(eD,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:E,onChange:e=>M(e.target.value),disabled:h,form:y,children:[void 0===E?(0,n.jsx)("option",{value:""}):null,Array.from(_)]},G):null]})})};H.displayName=E;var z="SelectTrigger",U=o.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:l=!1,...a}=e,i=L(r),s=O(z,r),c=s.disabled||l,p=(0,u.s)(t,s.onTriggerChange),f=M(r),m=o.useRef("touch"),[h,v,x]=eR(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===s.value),n=eI(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,n.jsx)(g.Mz,{asChild:!0,...i,children:(0,n.jsx)(w.sG.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":ek(s.value)?"":void 0,...a,ref:p,onClick:(0,d.m)(a.onClick,e=>
1{e.currentTarget.focus(),"mouse"!==m.current&&y(e)}),onPointerDown:(0,d.m)(a.onPointerDown,e=>{m.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,d.m)(a.onKeyDown,e=>{let t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&R.includes(e.key)&&(y(),e.preventDefault())})})})});U.displayName=z;var W="SelectValue",K=o.forwardRef((e,t)=>{let{__scopeSelect:r,className:l,style:a,children:o,placeholder:i="",...s}=e,d=O(W,r),{onValueNodeHasChildrenChange:c}=d,p=void 0!==o,f=(0,u.s)(t,d.onValueNodeChange);return(0,N.N)(()=>{c(p)},[c,p]),(0,n.jsx)(w.sG.span,{...s,ref:f,style:{pointerEvents:"none"},children:ek(d.value)?(0,n.jsx)(n.Fragment,{children:i}):o})});K.displayName=W;var q=o.forwardRef((e,t)=>{let{__scopeSelect:r,children:l,...a}=e;return(0,n.jsx)(w.sG.span,{"aria-hidden":!0,...a,ref:t,children:l||"â¼"})});q.displayName="SelectIcon";var Z=e=>(0,n.jsx)(y.Z,{asChild:!0,...e});Z.displayName="SelectPortal";var X="SelectContent",Y=o.forwardRef((e,t)=>{let r=O(X,e.__scopeSelect),[l,a]=o.useState();return((0,N.N)(()=>{a(new DocumentFragment)},[]),r.open)?(0,n.jsx)(Q,{...e,ref:t}):l?i.createPortal((0,n.jsx)($,{scope:e.__scopeSelect,children:(0,n.jsx)(P.Slot,{scope:e.__scopeSelect,children:(0,n.jsx)("div",{children:e.children})})}),l):null});Y.displayName=X;var[$,J]=F(X),Q=o.forwardRef((e,t)=>{let{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:c,sideOffset:p,align:f,alignOffset:x,arrowPadding:g,collisionBoundary:y,collisionPadding:w,sticky:j,hideWhenDetached:S,avoidCollisions:N,...C}=e,T=O(X,r),[R,I]=o.useState(null),[E,P]=o.useState(null),A=(0,u.s)(t,e=>I(e)),[F,_]=o.useState(null),[L,B]=o.useState(null),V=M(r),[G,H]=o.useState(!1),z=o.useRef(!1);o.useEffect(()=>{if(R)return(0,k.Eq)(R)},[R]),(0,h.Oh)();let U=o.useCallback(e=>{let[t,...r]=V().map(e=>e.ref.current),[n]=r.slice(-1),l=document.activeElement;for(let r of e)if(r===l||(null==r||r.scrollIntoView({block:"nearest"}),r===t&&E&&(E.scrollTop=0),r===n&&E&&(E.scrollTop=E.scrollHeight),null==r||r.focus(),document.activeElement!==l))return},[V,E]),W=o.useCallback(()=>U([F,R]),[U,F,R]);o.useEffect(()=>{G&&W()},[G,W]);let{onOpenChange:K,triggerPointerDownPosRef:q}=T;o.useEffect(()=>{if(R){let e={x:0,y:0},t=t=>{var r,n,l,a;e={x:Math.abs(Math.round(t.pageX)-(null!==(l=null===(r=q.current)||void 0===r?void 0:r.x)&&void 0!==l?l:0)),y:Math.abs(Math.round(t.pageY)-(null!==(a=null===(n=q.current)||void 0===n?void 0:n.y)&&void 0!==a?a:0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():R.contains(r.target)||K(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[R,K,q]),o.useEffect(()=>{let e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[K]);let[Z,Y]=eR(e=>{let t=V().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eI(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),J=o.useCallback((e,t,r)=>{let n=!z.current&&!r;(void 0!==T.value&&T.value===t||n)&&(_(e),n&&(z.current=!0))},[T.value]),Q=o.useCallback(()=>null==R?void 0:R.focus(),[R]),er=o.useCallback((e,t,r)=>{let n=!z.current&&!r;(void 0!==T.value&&T.value===t||n)&&B(e)},[T.value]),en="popper"===l?et:ee,el=en===et?{side:c,sideOffset:p,align:f,alignOffset:x,arrowPadding:g,collisionBoundary:y,collisionPadding:w,sticky:j,hideWhenDetached:S,avoidCollisions:N}:{};return(0,n.jsx)($,{scope:r,content:R,viewport:E,onViewportChange:P,itemRefCallback:J,selectedItem:F,onItemLeave:Q,itemTextRefCallback:er,focusSelectedItem:W,selectedItemText:L,position:l,isPositioned:G,searchRef:Z,children:(0,n.jsx)(D.A,{as:b.DX,allowPinchZoom:!0,children:(0,n.jsx)(v.n,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,d.m)(a,e=>{var t;null===(t=T.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,n.jsx)(m.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,n.jsx)(en,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:e=>e.preventDefault(),...C,...el,onPlaced:()=>H(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,d.m)(C.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;
1if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Y(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 r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>U(t)),e.preventDefault()}})})})})})})});Q.displayName="SelectContentImpl";var ee=o.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:l,...a}=e,i=O(X,r),d=J(X,r),[c,p]=o.useState(null),[f,m]=o.useState(null),h=(0,u.s)(t,e=>m(e)),v=M(r),x=o.useRef(!1),g=o.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:j,focusSelectedItem:S}=d,C=o.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&y&&b&&j){let e=i.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=i.valueNode.getBoundingClientRect(),n=j.getBoundingClientRect();if("rtl"!==i.dir){let l=n.left-t.left,a=r.left-l,o=e.left-a,i=e.width+o,d=Math.max(i,t.width),u=window.innerWidth-10,p=(0,s.q)(a,[10,Math.max(10,u-d)]);c.style.minWidth=i+"px",c.style.left=p+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,o=window.innerWidth-e.right-a,i=e.width+o,d=Math.max(i,t.width),u=window.innerWidth-10,p=(0,s.q)(a,[10,Math.max(10,u-d)]);c.style.minWidth=i+"px",c.style.right=p+"px"}let a=v(),o=window.innerHeight-20,d=y.scrollHeight,u=window.getComputedStyle(f),p=parseInt(u.borderTopWidth,10),m=parseInt(u.paddingTop,10),h=parseInt(u.borderBottomWidth,10),g=p+m+d+parseInt(u.paddingBottom,10)+h,w=Math.min(5*b.offsetHeight,g),S=window.getComputedStyle(y),N=parseInt(S.paddingTop,10),C=parseInt(S.paddingBottom,10),T=e.top+e.height/2-10,k=b.offsetHeight/2,D=p+m+(b.offsetTop+k);if(D<=T){let e=a.length>0&&b===a[a.length-1].ref.current;c.style.bottom="0px";let t=Math.max(o-T,k+(e?C:0)+(f.clientHeight-y.offsetTop-y.offsetHeight)+h);c.style.height=D+t+"px"}else{let e=a.length>0&&b===a[0].ref.current;c.style.top="0px";let t=Math.max(T,p+y.offsetTop+(e?N:0)+k);c.style.height=t+(g-D)+"px",y.scrollTop=D-T+y.offsetTop}c.style.margin="".concat(10,"px 0"),c.style.minHeight=w+"px",c.style.maxHeight=o+"px",null==l||l(),requestAnimationFrame(()=>x.current=!0)}},[v,i.trigger,i.valueNode,c,f,y,b,j,i.dir,l]);(0,N.N)(()=>C(),[C]);let[T,k]=o.useState();(0,N.N)(()=>{f&&k(window.getComputedStyle(f).zIndex)},[f]);let D=o.useCallback(e=>{e&&!0===g.current&&(C(),null==S||S(),g.current=!1)},[C,S]);return(0,n.jsx)(er,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:x,onScrollButtonChange:D,children:(0,n.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T},children:(0,n.jsx)(w.sG.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});ee.displayName="SelectItemAlignedPosition";var et=o.forwardRef((e,t)=>{let{__scopeSelect:r,align:l="start",collisionPadding:a=10,...o}=e,i=L(r);return(0,n.jsx)(g.UC,{...i,...o,ref:t,align:l,collisionPadding:a,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)"}})});et.displayName="SelectPopperPosition";var[er,en]=F(X,{}),el="SelectViewport",ea=o.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:l,...a}=e,i=J(el,r),s=en(el,r),c=(0,u.s)(t,i.onViewportChange),p=o.useRef(0);return(0,n.jsxs)(n.Fragment,{children:[(0,n.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,n.jsx)(P.Slot,{scope:r,children:(0,n.jsx)(w.sG.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:(0,d.m)(a.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=s;if((null==n?void 0:n.current)&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,l=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(l<n){let a=l+e,o=Math.min(n,a),i=a-o;r.style.height=o+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});ea.displayName=el;var eo="SelectGroup",[ei,es]=F(eo),ed=o.forwardRef((e,t)=>
1{let{__scopeSelect:r,...l}=e,a=(0,x.B)();return(0,n.jsx)(ei,{scope:r,id:a,children:(0,n.jsx)(w.sG.div,{role:"group","aria-labelledby":a,...l,ref:t})})});ed.displayName=eo;var ec="SelectLabel",eu=o.forwardRef((e,t)=>{let{__scopeSelect:r,...l}=e,a=es(ec,r);return(0,n.jsx)(w.sG.div,{id:a.id,...l,ref:t})});eu.displayName=ec;var ep="SelectItem",[ef,em]=F(ep),eh=o.forwardRef((e,t)=>{let{__scopeSelect:r,value:l,disabled:a=!1,textValue:i,...s}=e,c=O(ep,r),p=J(ep,r),f=c.value===l,[m,h]=o.useState(null!=i?i:""),[v,g]=o.useState(!1),y=(0,u.s)(t,e=>{var t;return null===(t=p.itemRefCallback)||void 0===t?void 0:t.call(p,e,l,a)}),b=(0,x.B)(),j=o.useRef("touch"),S=()=>{a||(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,n.jsx)(ef,{scope:r,value:l,disabled:a,textId:b,isSelected:f,onItemTextChange:o.useCallback(e=>{h(t=>{var r;return t||(null!==(r=null==e?void 0:e.textContent)&&void 0!==r?r:"").trim()})},[]),children:(0,n.jsx)(P.ItemSlot,{scope:r,value:l,disabled:a,textValue:m,children:(0,n.jsx)(w.sG.div,{role:"option","aria-labelledby":b,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:y,onFocus:(0,d.m)(s.onFocus,()=>g(!0)),onBlur:(0,d.m)(s.onBlur,()=>g(!1)),onClick:(0,d.m)(s.onClick,()=>{"mouse"!==j.current&&S()}),onPointerUp:(0,d.m)(s.onPointerUp,()=>{"mouse"===j.current&&S()}),onPointerDown:(0,d.m)(s.onPointerDown,e=>{j.current=e.pointerType}),onPointerMove:(0,d.m)(s.onPointerMove,e=>{if(j.current=e.pointerType,a){var t;null===(t=p.onItemLeave)||void 0===t||t.call(p)}else"mouse"===j.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,d.m)(s.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=p.onItemLeave)||void 0===t||t.call(p)}}),onKeyDown:(0,d.m)(s.onKeyDown,e=>{var t;(null===(t=p.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(I.includes(e.key)&&S()," "===e.key&&e.preventDefault())})})})})});eh.displayName=ep;var ev="SelectItemText",ex=o.forwardRef((e,t)=>{let{__scopeSelect:r,className:l,style:a,...s}=e,d=O(ev,r),c=J(ev,r),p=em(ev,r),f=G(ev,r),[m,h]=o.useState(null),v=(0,u.s)(t,e=>h(e),p.onItemTextChange,e=>{var t;return null===(t=c.itemTextRefCallback)||void 0===t?void 0:t.call(c,e,p.value,p.disabled)}),x=null==m?void 0:m.textContent,g=o.useMemo(()=>(0,n.jsx)("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=f;return(0,N.N)(()=>(y(g),()=>b(g)),[y,b,g]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.sG.span,{id:p.textId,...s,ref:v}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?i.createPortal(s.children,d.valueNode):null]})});ex.displayName=ev;var eg="SelectItemIndicator",ey=o.forwardRef((e,t)=>{let{__scopeSelect:r,...l}=e;return em(eg,r).isSelected?(0,n.jsx)(w.sG.span,{"aria-hidden":!0,...l,ref:t}):null});ey.displayName=eg;var ew="SelectScrollUpButton",eb=o.forwardRef((e,t)=>{let r=J(ew,e.__scopeSelect),l=en(ew,e.__scopeSelect),[a,i]=o.useState(!1),s=(0,u.s)(t,l.onScrollButtonChange);return(0,N.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){i(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?(0,n.jsx)(eN,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});eb.displayName=ew;var ej="SelectScrollDownButton",eS=o.forwardRef((e,t)=>{let r=J(ej,e.__scopeSelect),l=en(ej,e.__scopeSelect),[a,i]=o.useState(!1),s=(0,u.s)(t,l.onScrollButtonChange);return(0,N.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;i(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?(0,n.jsx)(eN,{...e,ref:s,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});eS.displayName=ej;var eN=o.forwardRef((e,t)=>
1{let{__scopeSelect:r,onAutoScroll:l,...a}=e,i=J("SelectScrollButton",r),s=o.useRef(null),c=M(r),u=o.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return o.useEffect(()=>()=>u(),[u]),(0,N.N)(()=>{var e;let t=c().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[c]),(0,n.jsx)(w.sG.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:(0,d.m)(a.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(l,50))}),onPointerMove:(0,d.m)(a.onPointerMove,()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===s.current&&(s.current=window.setInterval(l,50))}),onPointerLeave:(0,d.m)(a.onPointerLeave,()=>{u()})})}),eC=o.forwardRef((e,t)=>{let{__scopeSelect:r,...l}=e;return(0,n.jsx)(w.sG.div,{"aria-hidden":!0,...l,ref:t})});eC.displayName="SelectSeparator";var eT="SelectArrow";function ek(e){return""===e||void 0===e}o.forwardRef((e,t)=>{let{__scopeSelect:r,...l}=e,a=L(r),o=O(eT,r),i=J(eT,r);return o.open&&"popper"===i.position?(0,n.jsx)(g.i3,{...a,...l,ref:t}):null}).displayName=eT;var eD=o.forwardRef((e,t)=>{let{value:r,...l}=e,a=o.useRef(null),i=(0,u.s)(t,a),s=(0,C.Z)(r);return o.useEffect(()=>{let e=a.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(s!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[s,r]),(0,n.jsx)(T.s,{asChild:!0,children:(0,n.jsx)("select",{...l,ref:i,defaultValue:r})})});function eR(e){let t=(0,j.c)(e),r=o.useRef(""),n=o.useRef(0),l=o.useCallback(e=>{let l=r.current+e;t(l),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(l)},[t]),a=o.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,l,a]}function eI(e,t,r){var n;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=(n=Math.max(r?e.indexOf(r):-1,0),e.map((t,r)=>e[(n+r)%e.length]));1===l.length&&(a=a.filter(e=>e!==r));let o=a.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return o!==r?o:void 0}eD.displayName="BubbleSelect";var eE=r(10580);let eP=H,eM=ed,eA=K,eF=(0,l.nF)((e,t)=>{let{className:r,children:l,...o}=e;return(0,n.jsxs)(U,{ref:t,className:(0,eE.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",r),...o,children:[l,(0,n.jsx)(q,{asChild:!0,children:(0,n.jsx)(a.TBE,{className:"h-4 w-4 opacity-50"})})]})});eF.displayName=U.displayName;let e_=(0,l.nF)((e,t)=>{let{className:r,...l}=e;return(0,n.jsx)(eb,{ref:t,className:(0,eE.cn)("flex cursor-default items-center justify-center py-1",r),...l,children:(0,n.jsx)(a.Mtm,{})})});e_.displayName=eb.displayName;let eL=(0,l.nF)((e,t)=>{let{className:r,...l}=e;return(0,n.jsx)(eS,{ref:t,className:(0,eE.cn)("flex cursor-default items-center justify-center py-1",r),...l,children:(0,n.jsx)(a.D3D,{})})});eL.displayName=eS.displayName;let eB=(0,l.nF)((e,t)=>{let{className:r,children:l,position:a="popper",...o}=e;return(0,n.jsx)(Z,{children:(0,n.jsxs)(Y,{ref:t,className:(0,eE.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:a,...o,children:[(0,n.jsx)(e_,{}),(0,n.jsx)(ea,{className:(0,eE.cn)("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:l}),(0,n.jsx)(eL,{})]})})});eB.displayName=Y.displayName;let eO=(0,l.nF)((e,t)=>{let{className:r,...l}=e;return(0,n.jsx)(eu,{ref:t,className:(0,eE.cn)("px-2 py-1.5 text-sm font-semibold",r),...l})});eO.displayName=eu.displayName;let eV=(0,l.nF)((e,t)=>{let{className:r,children:l,...o}=e;return(0,n.jsxs)(eh,{ref:t,className:(0,eE.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r),...o,children:[(0,n.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(ey,{children:(0,n.jsx)(a.Srz,{className:"h-4 w-4"})})}),(0,n.jsx)(ex,{children:l})]})});eV.displayName=eh.displayName;let eG=(0,l.nF)((e,t)=>{let{className:r,...l}=e;return(0,n.jsx)(eC,{ref:t,className:(0,eE.cn)("-mx-1 my-1 h-px bg-muted",r),...l})});eG.displayName=eC.displayName},24896:(e,t,r)=>{r.d(t,{SelectedTeamSwitcher:()=>v});var n=r(47010),l=r(87740),a=r(42220),o=r(47751),i=r(70414),s=r(61186),d=r(78070),c=r(76046),u=r(12115),p=r(39810),f=r(87286),m=r(4408),h=r(95155);function v(e){return(0,h.jsx)(u.Suspense,{fallback:(0,h.jsx)(x,{}),children:(0,h.jsx)(g,{...e})})}function x(){return(0,h.jsx)(l.Skeleton,{className:"h-9 w-full max-w-64 stack-scope"})}function g(e){let{t}=(0,f.B)(),r=(0,p.z)(),l=(0,p.J)(),v=r.useProject(),x=(0,c.useRouter)(),g=(null==l?void 0:l.selectedTeam)||e.selectedTeam,y=null==l?void 0:l.useTeams(),w=(0,u.useMemo)(()=>null==y?void 0:y.sort((e,t)=>
1t.id===(null==g?void 0:g.id)?1:-1),[y,g]);return(0,u.useEffect)(()=>{!e.noUpdateSelectedTeam&&e.selectedTeam&&(0,n.hc)(null==l?void 0:l.setSelectedTeam(e.selectedTeam))},[e.noUpdateSelectedTeam,e.selectedTeam]),(0,h.jsxs)(a.Select,{value:null==g?void 0:g.id,onValueChange:t=>{(0,n.hc)(async()=>{let r=null==w?void 0:w.find(e=>e.id===t);if(!r)throw Error("Team not found, this should not happen");e.noUpdateSelectedTeam||await (null==l?void 0:l.setSelectedTeam(r)),e.urlMap&&x.push(e.urlMap(r))})},children:[(0,h.jsx)(a.SelectTrigger,{className:"stack-scope max-w-64",children:(0,h.jsx)(a.SelectValue,{placeholder:"Select team"})}),(0,h.jsxs)(a.SelectContent,{className:"stack-scope",children:[(null==l?void 0:l.selectedTeam)?(0,h.jsxs)(a.SelectGroup,{children:[(0,h.jsx)(a.SelectLabel,{children:(0,h.jsxs)("div",{className:"flex items-center justify-between",children:[(0,h.jsx)("span",{children:t("Current team")}),(0,h.jsx)(o.$,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{var e;return x.push("".concat(r.urls.accountSettings,"#team-").concat(null===(e=l.selectedTeam)||void 0===e?void 0:e.id))},children:(0,h.jsx)(s.A,{className:"h-4 w-4"})})]})}),(0,h.jsx)(a.SelectItem,{value:l.selectedTeam.id,children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(m.P,{team:l.selectedTeam}),(0,h.jsx)(i.o,{className:"max-w-40 truncate",children:l.selectedTeam.displayName})]})})]}):void 0,(null==w?void 0:w.length)?(0,h.jsxs)(a.SelectGroup,{children:[(0,h.jsx)(a.SelectLabel,{children:t("Other teams")}),w.filter(e=>{var t;return e.id!==(null==l?void 0:null===(t=l.selectedTeam)||void 0===t?void 0:t.id)}).map(e=>(0,h.jsx)(a.SelectItem,{value:e.id,children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)(m.P,{team:e}),(0,h.jsx)(i.o,{className:"max-w-64 truncate",children:e.displayName})]})},e.id))]}):(0,h.jsx)(a.SelectGroup,{children:(0,h.jsx)(a.SelectLabel,{children:t("No teams yet")})}),v.config.clientTeamCreationEnabled&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(a.SelectSeparator,{}),(0,h.jsx)("div",{children:(0,h.jsxs)(o.$,{onClick:()=>x.push("".concat(r.urls.accountSettings,"#team-creation")),className:"w-full",variant:"ghost",children:[(0,h.jsx)(d.A,{className:"mr-2 h-4 w-4"})," ",t("Create a team")]})})]})]})]})}},4408:(e,t,r)=>{r.d(t,{P:()=>o});var n=r(41742),l=r(70414),a=r(95155);function o(e){return e.team.profileImageUrl?(0,a.jsx)(n.Avatar,{className:"min-w-6 min-h-6 max-w-6 max-h-6 rounded",children:(0,a.jsx)(n.AvatarImage,{src:e.team.profileImageUrl,alt:e.team.displayName})}):(0,a.jsx)("div",{className:"flex items-center justify-center min-w-6 min-h-6 max-w-6 max-h-6 rounded bg-zinc-200",children:(0,a.jsx)(l.o,{className:"text-zinc-800 dark:text-zinc-800",children:e.team.displayName.slice(0,1).toUpperCase()})})}},78070:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(20152).A)("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]])},61186:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(20152).A)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},61786:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,[t,r]){return Math.min(r,Math.max(t,e))}},66217:(e,t,r)=>{r.d(t,{UC:()=>et,VY:()=>en,ZL:()=>Q,bL:()=>$,bm:()=>el,hE:()=>er,hJ:()=>ee,l9:()=>J});var n=r(12115),l=r(93610),a=r(88068),o=r(18166),i=r(67668),s=r(1488),d=r(59674),c=r(20196),u=r(17323),p=r(17028),f=r(23360),m=r(62292),h=r(64065),v=r(15587),x=r(12317),g=r(95155),y="Dialog",[w,b]=(0,o.A)(y),[j,S]=w(y),N=e=>{let{__scopeDialog:t,children:r,open:l,defaultOpen:a,onOpenChange:o,modal:d=!0}=e,c=n.useRef(null),u=n.useRef(null),[p=!1,f]=(0,s.i)({prop:l,defaultProp:a,onChange:o});return(0,g.jsx)(j,{scope:t,triggerRef:c,contentRef:u,contentId:(0,i.B)(),titleId:(0,i.B)(),descriptionId:(0,i.B)(),open:p,onOpenChange:f,onOpenToggle:n.useCallback(()=>f(e=>!e),[f]),modal:d,children:r})};N.displayName=y;var C="DialogTrigger",T=n.forwardRef((e,t)=>
1{let{__scopeDialog:r,...n}=e,o=S(C,r),i=(0,a.s)(t,o.triggerRef);return(0,g.jsx)(f.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":W(o.open),...n,ref:i,onClick:(0,l.m)(e.onClick,o.onOpenToggle)})});T.displayName=C;var k="DialogPortal",[D,R]=w(k,{forceMount:void 0}),I=e=>{let{__scopeDialog:t,forceMount:r,children:l,container:a}=e,o=S(k,t);return(0,g.jsx)(D,{scope:t,forceMount:r,children:n.Children.map(l,e=>(0,g.jsx)(p.C,{present:r||o.open,children:(0,g.jsx)(u.Z,{asChild:!0,container:a,children:e})}))})};I.displayName=k;var E="DialogOverlay",P=n.forwardRef((e,t)=>{let r=R(E,e.__scopeDialog),{forceMount:n=r.forceMount,...l}=e,a=S(E,e.__scopeDialog);return a.modal?(0,g.jsx)(p.C,{present:n||a.open,children:(0,g.jsx)(M,{...l,ref:t})}):null});P.displayName=E;var M=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=S(E,r);return(0,g.jsx)(h.A,{as:x.DX,allowPinchZoom:!0,shards:[l.contentRef],children:(0,g.jsx)(f.sG.div,{"data-state":W(l.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),A="DialogContent",F=n.forwardRef((e,t)=>{let r=R(A,e.__scopeDialog),{forceMount:n=r.forceMount,...l}=e,a=S(A,e.__scopeDialog);return(0,g.jsx)(p.C,{present:n||a.open,children:a.modal?(0,g.jsx)(_,{...l,ref:t}):(0,g.jsx)(L,{...l,ref:t})})});F.displayName=A;var _=n.forwardRef((e,t)=>{let r=S(A,e.__scopeDialog),o=n.useRef(null),i=(0,a.s)(t,r.contentRef,o);return n.useEffect(()=>{let e=o.current;
1if(e)return(0,v.Eq)(e)},[]),(0,g.jsx)(B,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,l.m)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,l.m)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,l.m)(e.onFocusOutside,e=>e.preventDefault())})}),L=n.forwardRef((e,t)=>{let r=S(A,e.__scopeDialog),l=n.useRef(!1),a=n.useRef(!1);return(0,g.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,o;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(l.current||null===(o=r.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),l.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"!==t.detail.originalEvent.type||(a.current=!0));let i=t.target;(null===(o=r.triggerRef.current)||void 0===o?void 0:o.contains(i))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})}),B=n.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,u=S(A,r),p=n.useRef(null),f=(0,a.s)(t,p);return(0,m.Oh)(),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.n,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:i,children:(0,g.jsx)(d.qW,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":W(u.open),...s,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(X,{titleId:u.titleId}),(0,g.jsx)(Y,{contentRef:p,descriptionId:u.descriptionId})]})]})}),O="DialogTitle",V=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=S(O,r);return(0,g.jsx)(f.sG.h2,{id:l.titleId,...n,ref:t})});V.displayName=O;var G="DialogDescription",H=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=S(G,r);return(0,g.jsx)(f.sG.p,{id:l.descriptionId,...n,ref:t})});H.displayName=G;var z="DialogClose",U=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=S(z,r);return(0,g.jsx)(f.sG.button,{type:"button",...n,ref:t,onClick:(0,l.m)(e.onClick,()=>a.onOpenChange(!1))})});function W(e){return e?"open":"closed"}U.displayName=z;var K="DialogTitleWarning",[q,Z]=(0,o.q)(K,{contentName:A,titleName:O,docsSlug:"dialog"}),X=e=>{let{titleId:t}=e,r=Z(K),l="`".concat(r.contentName,"` requires a `").concat(r.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(r.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(r.docsSlug);return n.useEffect(()=>{t&&!document.getElementById(t)&&console.error(l)},[l,t]),null},Y=e=>{let{contentRef:t,descriptionId:r}=e,l=Z("DialogDescriptionWarning"),a="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(l.contentName,"}.");return n.useEffect(()=>{var e;let n=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");r&&n&&!document.getElementById(r)&&console.warn(a)},[a,t,r]),null},$=N,J=T,Q=I,ee=P,et=F,er=V,en=H,el=U},90434:(e,t,r)=>{r.d(t,{b:()=>d});var n=r(12115),l=r(23360),a=r(95155),o="horizontal",i=["horizontal","vertical"],s=n.forwardRef((e,t)=>{let{decorative:r,orientation:n=o,...s}=e,d=i.includes(n)?n:o;return(0,a.jsx)(l.sG.div,{"data-orientation":d,...r?{role:"none"}:{"aria-orientation":"vertical"===d?d:void 0,role:"separator"},...s,ref:t})});s.displayName="Separator";var d=s},50858:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(12115);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])}},63543:(e,t,r)=>{r.d(t,{b:()=>i,s:()=>o});var n=r(12115),l=r(23360),a=r(95155),o=n.forwardRef((e,t)=>(0,a.jsx)(l.sG.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}}));o.displayName="VisuallyHidden";var i=o}}]);
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.