@agents-shire/cli-linux-arm64 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/shire +0 -0
- package/frontend/chunk-080ent60.js +0 -2
- package/frontend/chunk-08yrv2nn.js +0 -2
- package/frontend/chunk-0sevb013.js +0 -2
- package/frontend/chunk-0v5erpy0.js +0 -2
- package/frontend/chunk-19284fra.js +0 -2
- package/frontend/chunk-2kh30qex.js +0 -2
- package/frontend/chunk-4ny2qr6s.js +0 -2
- package/frontend/chunk-62c2ejc6.js +0 -2
- package/frontend/chunk-6zekv36x.js +0 -28
- package/frontend/chunk-9c81zaw2.js +0 -2
- package/frontend/chunk-9eadacms.js +0 -2
- package/frontend/chunk-9g67pqq7.js +0 -42
- package/frontend/chunk-abx95kyf.js +0 -2
- package/frontend/chunk-bdx9vjnz.js +0 -1
- package/frontend/chunk-bkfyhghz.js +0 -1
- package/frontend/chunk-bs8nhy4h.js +0 -2
- package/frontend/chunk-dpy2bnvw.js +0 -2
- package/frontend/chunk-gxhame5n.js +0 -2
- package/frontend/chunk-j7zegcep.js +0 -1
- package/frontend/chunk-jenng4z6.js +0 -12
- package/frontend/chunk-kwqbxj7m.js +0 -1
- package/frontend/chunk-p8qycd26.js +0 -30
- package/frontend/chunk-q1tqw02v.js +0 -1
- package/frontend/chunk-r19vjw47.js +0 -2
- package/frontend/chunk-sxzad3y5.js +0 -2
- package/frontend/chunk-vp3by99k.js +0 -2
- package/frontend/chunk-w24pb2qv.js +0 -2
- package/frontend/chunk-z92gr3sp.js +0 -3
- package/frontend/chunk-zkc6t7cc.js +0 -1
- package/frontend/index.html +0 -16
- package/frontend/main.js +0 -214
package/package.json
CHANGED
package/shire
CHANGED
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{C as Ri,D as Gy,E as zy,F as ky,G as qy}from"/chunk-19284fra.js";import{ea as yy,fa as By,ga as by,ha as Jy,ia as Ky,ja as Qy}from"/chunk-9g67pqq7.js";import{la as D,na as oi,oa as t,pa as fi,qa as f,sa as ri,ta as ei,ua as iy,va as Wi}from"/chunk-08yrv2nn.js";import{$a as ly,Aa as R,Ea as Ki,Fa as G1,Na as Si,Qa as dy,Ra as di,Sa as u,Va as d,ab as ti,db as sy}from"/chunk-p8qycd26.js";var e=R(Ki(),1);var G=R(Ki(),1),Vi=R(G1(),1);function Hi(y,[B,i]){return Math.min(i,Math.max(B,y))}var A=R(Ki(),1);var $i=R(Si(),1);function li(y){let B=oy(y),i=A.forwardRef((z,b)=>{let{children:K,...k}=z,J=A.Children.toArray(K),q=J.find(ey);if(q){let Q=q.props.children,W=J.map((P)=>{if(P===q){if(A.Children.count(Q)>1)return A.Children.only(null);return A.isValidElement(Q)?Q.props.children:null}else return P});return $i.jsx(B,{...k,ref:b,children:A.isValidElement(Q)?A.cloneElement(Q,void 0,W):null})}return $i.jsx(B,{...k,ref:b,children:K})});return i.displayName=`${y}.Slot`,i}function oy(y){let B=A.forwardRef((i,z)=>{let{children:b,...K}=i;if(A.isValidElement(b)){let k=y1(b),J=i1(K,b.props);if(b.type!==A.Fragment)J.ref=z?di(z,k):k;return A.cloneElement(b,J)}return A.Children.count(b)>1?A.Children.only(null):null});return B.displayName=`${y}.SlotClone`,B}var ry=Symbol("radix.slottable");function ey(y){return A.isValidElement(y)&&typeof y.type==="function"&&"__radixId"in y.type&&y.type.__radixId===ry}function i1(y,B){let i={...B};for(let z in B){let b=y[z],K=B[z];if(/^on[A-Z]/.test(z)){if(b&&K)i[z]=(...J)=>{let q=K(...J);return b(...J),q};else if(b)i[z]=b}else if(z==="style")i[z]={...b,...K};else if(z==="className")i[z]=[b,K].filter(Boolean).join(" ")}return{...y,...i}}function y1(y){let B=Object.getOwnPropertyDescriptor(y.props,"ref")?.get,i=B&&"isReactWarning"in B&&B.isReactWarning;if(i)return y.ref;if(B=Object.getOwnPropertyDescriptor(y,"ref")?.get,i=B&&"isReactWarning"in B&&B.isReactWarning,i)return y.props.ref;return y.props.ref||y.ref}var mi=R(Ki(),1);function si(y){let B=mi.useRef({value:y,previous:y});return mi.useMemo(()=>{if(B.current.value!==y)B.current.previous=B.current.value,B.current.value=y;return B.current.previous},[y])}var ni=R(Ki(),1);var pi=R(Si(),1),Di=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),B1="VisuallyHidden",b1=ni.forwardRef((y,B)=>{return pi.jsx(f.span,{...y,ref:B,style:{...Di,...y.style}})});b1.displayName=B1;var X=R(Si(),1),z1=[" ","Enter","ArrowUp","ArrowDown"],k1=[" ","Enter"],bi="Select",[Ni,Pi,q1]=ri(bi),[ki,k5]=oi(bi,[q1,Ri]),Yi=Ri(),[J1,o]=ki(bi),[K1,Q1]=ki(bi),Xy=(y)=>{let{__scopeSelect:B,children:i,open:z,defaultOpen:b,onOpenChange:K,value:k,defaultValue:J,onValueChange:q,dir:Q,name:W,autoComplete:P,disabled:j,required:H,form:g}=y,Z=Yi(B),[U,Y]=G.useState(null),[m,N]=G.useState(null),[l,I]=G.useState(!1),qi=ei(Q),[T,w]=fi({prop:z,defaultProp:b??!1,onChange:K,caller:bi}),[s,ii]=fi({prop:k,defaultProp:J,onChange:q,caller:bi}),v=G.useRef(null),h=U?g||!!U.closest("form"):!0,[n,x]=G.useState(new Set),c=Array.from(n).map((E)=>E.props.value).join(";");return X.jsx(Gy,{...Z,children:X.jsxs(J1,{required:H,scope:B,trigger:U,onTriggerChange:Y,valueNode:m,onValueNodeChange:N,valueNodeHasChildren:l,onValueNodeHasChildrenChange:I,contentId:Wi(),value:s,onValueChange:ii,open:T,onOpenChange:w,dir:qi,triggerPointerDownPosRef:v,disabled:j,children:[X.jsx(Ni.Provider,{scope:B,children:X.jsx(K1,{scope:y.__scopeSelect,onNativeOptionAdd:G.useCallback((E)=>{x((_)=>new Set(_).add(E))},[]),onNativeOptionRemove:G.useCallback((E)=>{x((_)=>{let a=new Set(_);return a.delete(E),a})},[]),children:i})}),h?X.jsxs(Ry,{"aria-hidden":!0,required:H,tabIndex:-1,name:W,autoComplete:P,value:s,onChange:(E)=>ii(E.target.value),disabled:j,form:g,children:[s===void 0?X.jsx("option",{value:""}):null,Array.from(n)]},c):null]})})};Xy.displayName=bi;var Zy="SelectTrigger",$y=G.forwardRef((y,B)=>{let{__scopeSelect:i,disabled:z=!1,...b}=y,K=Yi(i),k=o(Zy,i),J=k.disabled||z,q=u(B,k.onTriggerChange),Q=Pi(i),W=G.useRef("touch"),[P,j,H]=uy((Z)=>{let U=Q().filter((N)=>!N.disabled),Y=U.find((N)=>N.value===k.value),m=wy(U,Z,Y);if(m!==void 0)k.onValueChange(m.value)}),g=(Z)=>{if(!J)k.onOpenChange(!0),H();if(Z)k.triggerPointerDownPosRef.current={x:Math.round(Z.pageX),y:Math.round(Z.pageY)}};return X.jsx(zy,{asChild:!0,...K,children:X.jsx(f.button,{type:"button",role:"combobox","aria-controls":k.contentId,"aria-expanded":k.open,"aria-required":k.required,"aria-autocomplete":"none",dir:k.dir,"data-state":k.open?"open":"closed",disabled:J,"data-disabled":J?"":void 0,"data-placeholder":Vy(k.value)?"":void 0,...b,ref:q,onClick:D(b.onClick,(Z)=>{if(Z.currentTarget.focus(),W.current!=="mouse")g(Z)}),onPointerDown:D(b.onPointerDown,(Z)=>{W.current=Z.pointerType;let U=Z.target;if(U.hasPointerCapture(Z.pointerId))U.releasePointerCapture(Z.pointerId);if(Z.button===0&&Z.ctrlKey===!1&&Z.pointerType==="mouse")g(Z),Z.preventDefault()}),onKeyDown:D(b.onKeyDown,(Z)=>{let U=P.current!=="";if(!(Z.ctrlKey||Z.altKey||Z.metaKey)&&Z.key.length===1)j(Z.key);if(U&&Z.key===" ")return;if(z1.includes(Z.key))g(),Z.preventDefault()})})})});$y.displayName=Zy;var my="SelectValue",Uy=G.forwardRef((y,B)=>{let{__scopeSelect:i,className:z,style:b,children:K,placeholder:k="",...J}=y,q=o(my,i),{onValueNodeHasChildrenChange:Q}=q,W=K!==void 0,P=u(B,q.onValueNodeChange);return t(()=>{Q(W)},[Q,W]),X.jsx(f.span,{...J,ref:P,style:{pointerEvents:"none"},children:Vy(q.value)?X.jsx(X.Fragment,{children:k}):K})});Uy.displayName=my;var X1="SelectIcon",Wy=G.forwardRef((y,B)=>{let{__scopeSelect:i,children:z,...b}=y;return X.jsx(f.span,{"aria-hidden":!0,...b,ref:B,children:z||"▼"})});Wy.displayName=X1;var Z1="SelectPortal",Ny=(y)=>{return X.jsx(Jy,{asChild:!0,...y})};Ny.displayName=Z1;var Gi="SelectContent",Py=G.forwardRef((y,B)=>{let i=o(Gi,y.__scopeSelect),[z,b]=G.useState();if(t(()=>{b(new DocumentFragment)},[]),!i.open){let K=z;return K?Vi.createPortal(X.jsx(Yy,{scope:y.__scopeSelect,children:X.jsx(Ni.Slot,{scope:y.__scopeSelect,children:X.jsx("div",{children:y.children})})}),K):null}return X.jsx(My,{...y,ref:B})});Py.displayName=Gi;var V=10,[Yy,r]=ki(Gi),$1="SelectContentImpl",m1=li("SelectContent.RemoveScroll"),My=G.forwardRef((y,B)=>{let{__scopeSelect:i,position:z="item-aligned",onCloseAutoFocus:b,onEscapeKeyDown:K,onPointerDownOutside:k,side:J,sideOffset:q,align:Q,alignOffset:W,arrowPadding:P,collisionBoundary:j,collisionPadding:H,sticky:g,hideWhenDetached:Z,avoidCollisions:U,...Y}=y,m=o(Gi,i),[N,l]=G.useState(null),[I,qi]=G.useState(null),T=u(B,($)=>l($)),[w,s]=G.useState(null),[ii,v]=G.useState(null),h=Pi(i),[n,x]=G.useState(!1),c=G.useRef(!1);G.useEffect(()=>{if(N)return Ky(N)},[N]),By();let E=G.useCallback(($)=>{let[O,...C]=h().map((S)=>S.ref.current),[M]=C.slice(-1),F=document.activeElement;for(let S of $){if(S===F)return;if(S?.scrollIntoView({block:"nearest"}),S===O&&I)I.scrollTop=0;if(S===M&&I)I.scrollTop=I.scrollHeight;if(S?.focus(),document.activeElement!==F)return}},[h,I]),_=G.useCallback(()=>E([w,N]),[E,w,N]);G.useEffect(()=>{if(n)_()},[n,_]);let{onOpenChange:a,triggerPointerDownPosRef:p}=m;G.useEffect(()=>{if(N){let $={x:0,y:0},O=(M)=>{$={x:Math.abs(Math.round(M.pageX)-(p.current?.x??0)),y:Math.abs(Math.round(M.pageY)-(p.current?.y??0))}},C=(M)=>{if($.x<=10&&$.y<=10)M.preventDefault();else if(!N.contains(M.target))a(!1);document.removeEventListener("pointermove",O),p.current=null};if(p.current!==null)document.addEventListener("pointermove",O),document.addEventListener("pointerup",C,{capture:!0,once:!0});return()=>{document.removeEventListener("pointermove",O),document.removeEventListener("pointerup",C,{capture:!0})}}},[N,a,p]),G.useEffect(()=>{let $=()=>a(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[a]);let[Mi,Xi]=uy(($)=>{let O=h().filter((F)=>!F.disabled),C=O.find((F)=>F.ref.current===document.activeElement),M=wy(O,$,C);if(M)setTimeout(()=>M.ref.current.focus())}),Fi=G.useCallback(($,O,C)=>{let M=!c.current&&!C;if(m.value!==void 0&&m.value===O||M){if(s($),M)c.current=!0}},[m.value]),gi=G.useCallback(()=>N?.focus(),[N]),zi=G.useCallback(($,O,C)=>{let M=!c.current&&!C;if(m.value!==void 0&&m.value===O||M)v($)},[m.value]),Zi=z==="popper"?ji:Fy,Ji=Zi===ji?{side:J,sideOffset:q,align:Q,alignOffset:W,arrowPadding:P,collisionBoundary:j,collisionPadding:H,sticky:g,hideWhenDetached:Z,avoidCollisions:U}:{};return X.jsx(Yy,{scope:i,content:N,viewport:I,onViewportChange:qi,itemRefCallback:Fi,selectedItem:w,onItemLeave:gi,itemTextRefCallback:zi,focusSelectedItem:_,selectedItemText:ii,position:z,isPositioned:n,searchRef:Mi,children:X.jsx(Qy,{as:m1,allowPinchZoom:!0,children:X.jsx(by,{asChild:!0,trapped:m.open,onMountAutoFocus:($)=>{$.preventDefault()},onUnmountAutoFocus:D(b,($)=>{m.trigger?.focus({preventScroll:!0}),$.preventDefault()}),children:X.jsx(yy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:K,onPointerDownOutside:k,onFocusOutside:($)=>$.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:X.jsx(Zi,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:($)=>$.preventDefault(),...Y,...Ji,onPlaced:()=>x(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...Y.style},onKeyDown:D(Y.onKeyDown,($)=>{let O=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab")$.preventDefault();if(!O&&$.key.length===1)Xi($.key);if(["ArrowUp","ArrowDown","Home","End"].includes($.key)){let M=h().filter((F)=>!F.disabled).map((F)=>F.ref.current);if(["ArrowUp","End"].includes($.key))M=M.slice().reverse();if(["ArrowUp","ArrowDown"].includes($.key)){let F=$.target,S=M.indexOf(F);M=M.slice(S+1)}setTimeout(()=>E(M)),$.preventDefault()}})})})})})})});My.displayName=$1;var U1="SelectItemAlignedPosition",Fy=G.forwardRef((y,B)=>{let{__scopeSelect:i,onPlaced:z,...b}=y,K=o(Gi,i),k=r(Gi,i),[J,q]=G.useState(null),[Q,W]=G.useState(null),P=u(B,(T)=>W(T)),j=Pi(i),H=G.useRef(!1),g=G.useRef(!0),{viewport:Z,selectedItem:U,selectedItemText:Y,focusSelectedItem:m}=k,N=G.useCallback(()=>{if(K.trigger&&K.valueNode&&J&&Q&&Z&&U&&Y){let T=K.trigger.getBoundingClientRect(),w=Q.getBoundingClientRect(),s=K.valueNode.getBoundingClientRect(),ii=Y.getBoundingClientRect();if(K.dir!=="rtl"){let F=ii.left-w.left,S=s.left-F,yi=T.left-S,Bi=T.width+yi,Li=Math.max(Bi,w.width),Oi=window.innerWidth-V,Ai=Hi(S,[V,Math.max(V,Oi-Li)]);J.style.minWidth=Bi+"px",J.style.left=Ai+"px"}else{let F=w.right-ii.right,S=window.innerWidth-s.right-F,yi=window.innerWidth-T.right-S,Bi=T.width+yi,Li=Math.max(Bi,w.width),Oi=window.innerWidth-V,Ai=Hi(S,[V,Math.max(V,Oi-Li)]);J.style.minWidth=Bi+"px",J.style.right=Ai+"px"}let v=j(),h=window.innerHeight-V*2,n=Z.scrollHeight,x=window.getComputedStyle(Q),c=parseInt(x.borderTopWidth,10),E=parseInt(x.paddingTop,10),_=parseInt(x.borderBottomWidth,10),a=parseInt(x.paddingBottom,10),p=c+E+n+a+_,Mi=Math.min(U.offsetHeight*5,p),Xi=window.getComputedStyle(Z),Fi=parseInt(Xi.paddingTop,10),gi=parseInt(Xi.paddingBottom,10),zi=T.top+T.height/2-V,Zi=h-zi,Ji=U.offsetHeight/2,$=U.offsetTop+Ji,O=c+E+$,C=p-O;if(O<=zi){let F=v.length>0&&U===v[v.length-1].ref.current;J.style.bottom="0px";let S=Q.clientHeight-Z.offsetTop-Z.offsetHeight,yi=Math.max(Zi,Ji+(F?gi:0)+S+_),Bi=O+yi;J.style.height=Bi+"px"}else{let F=v.length>0&&U===v[0].ref.current;J.style.top="0px";let yi=Math.max(zi,c+Z.offsetTop+(F?Fi:0)+Ji)+C;J.style.height=yi+"px",Z.scrollTop=O-zi+Z.offsetTop}J.style.margin=`${V}px 0`,J.style.minHeight=Mi+"px",J.style.maxHeight=h+"px",z?.(),requestAnimationFrame(()=>H.current=!0)}},[j,K.trigger,K.valueNode,J,Q,Z,U,Y,K.dir,z]);t(()=>N(),[N]);let[l,I]=G.useState();t(()=>{if(Q)I(window.getComputedStyle(Q).zIndex)},[Q]);let qi=G.useCallback((T)=>{if(T&&g.current===!0)N(),m?.(),g.current=!1},[N,m]);return X.jsx(N1,{scope:i,contentWrapper:J,shouldExpandOnScrollRef:H,onScrollButtonChange:qi,children:X.jsx("div",{ref:q,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:l},children:X.jsx(f.div,{...b,ref:P,style:{boxSizing:"border-box",maxHeight:"100%",...b.style}})})})});Fy.displayName=U1;var W1="SelectPopperPosition",ji=G.forwardRef((y,B)=>{let{__scopeSelect:i,align:z="start",collisionPadding:b=V,...K}=y,k=Yi(i);return X.jsx(ky,{...k,...K,ref:B,align:z,collisionPadding:b,style:{boxSizing:"border-box",...K.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)"}}})});ji.displayName=W1;var[N1,ui]=ki(Gi,{}),Ti="SelectViewport",gy=G.forwardRef((y,B)=>{let{__scopeSelect:i,nonce:z,...b}=y,K=r(Ti,i),k=ui(Ti,i),J=u(B,K.onViewportChange),q=G.useRef(0);return X.jsxs(X.Fragment,{children:[X.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:z}),X.jsx(Ni.Slot,{scope:i,children:X.jsx(f.div,{"data-radix-select-viewport":"",role:"presentation",...b,ref:J,style:{position:"relative",flex:1,overflow:"hidden auto",...b.style},onScroll:D(b.onScroll,(Q)=>{let W=Q.currentTarget,{contentWrapper:P,shouldExpandOnScrollRef:j}=k;if(j?.current&&P){let H=Math.abs(q.current-W.scrollTop);if(H>0){let g=window.innerHeight-V*2,Z=parseFloat(P.style.minHeight),U=parseFloat(P.style.height),Y=Math.max(Z,U);if(Y<g){let m=Y+H,N=Math.min(g,m),l=m-N;if(P.style.height=N+"px",P.style.bottom==="0px")W.scrollTop=l>0?l:0,P.style.justifyContent="flex-end"}}}q.current=W.scrollTop})})})]})});gy.displayName=Ti;var Ly="SelectGroup",[P1,Y1]=ki(Ly),M1=G.forwardRef((y,B)=>{let{__scopeSelect:i,...z}=y,b=Wi();return X.jsx(P1,{scope:i,id:b,children:X.jsx(f.div,{role:"group","aria-labelledby":b,...z,ref:B})})});M1.displayName=Ly;var Oy="SelectLabel",Ay=G.forwardRef((y,B)=>{let{__scopeSelect:i,...z}=y,b=Y1(Oy,i);return X.jsx(f.div,{id:b.id,...z,ref:B})});Ay.displayName=Oy;var Ui="SelectItem",[F1,Hy]=ki(Ui),Sy=G.forwardRef((y,B)=>{let{__scopeSelect:i,value:z,disabled:b=!1,textValue:K,...k}=y,J=o(Ui,i),q=r(Ui,i),Q=J.value===z,[W,P]=G.useState(K??""),[j,H]=G.useState(!1),g=u(B,(m)=>q.itemRefCallback?.(m,z,b)),Z=Wi(),U=G.useRef("touch"),Y=()=>{if(!b)J.onValueChange(z),J.onOpenChange(!1)};if(z==="")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 X.jsx(F1,{scope:i,value:z,disabled:b,textId:Z,isSelected:Q,onItemTextChange:G.useCallback((m)=>{P((N)=>N||(m?.textContent??"").trim())},[]),children:X.jsx(Ni.ItemSlot,{scope:i,value:z,disabled:b,textValue:W,children:X.jsx(f.div,{role:"option","aria-labelledby":Z,"data-highlighted":j?"":void 0,"aria-selected":Q&&j,"data-state":Q?"checked":"unchecked","aria-disabled":b||void 0,"data-disabled":b?"":void 0,tabIndex:b?void 0:-1,...k,ref:g,onFocus:D(k.onFocus,()=>H(!0)),onBlur:D(k.onBlur,()=>H(!1)),onClick:D(k.onClick,()=>{if(U.current!=="mouse")Y()}),onPointerUp:D(k.onPointerUp,()=>{if(U.current==="mouse")Y()}),onPointerDown:D(k.onPointerDown,(m)=>{U.current=m.pointerType}),onPointerMove:D(k.onPointerMove,(m)=>{if(U.current=m.pointerType,b)q.onItemLeave?.();else if(U.current==="mouse")m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:D(k.onPointerLeave,(m)=>{if(m.currentTarget===document.activeElement)q.onItemLeave?.()}),onKeyDown:D(k.onKeyDown,(m)=>{if(q.searchRef?.current!==""&&m.key===" ")return;if(k1.includes(m.key))Y();if(m.key===" ")m.preventDefault()})})})})});Sy.displayName=Ui;var Qi="SelectItemText",Dy=G.forwardRef((y,B)=>{let{__scopeSelect:i,className:z,style:b,...K}=y,k=o(Qi,i),J=r(Qi,i),q=Hy(Qi,i),Q=Q1(Qi,i),[W,P]=G.useState(null),j=u(B,(Y)=>P(Y),q.onItemTextChange,(Y)=>J.itemTextRefCallback?.(Y,q.value,q.disabled)),H=W?.textContent,g=G.useMemo(()=>X.jsx("option",{value:q.value,disabled:q.disabled,children:H},q.value),[q.disabled,q.value,H]),{onNativeOptionAdd:Z,onNativeOptionRemove:U}=Q;return t(()=>{return Z(g),()=>U(g)},[Z,U,g]),X.jsxs(X.Fragment,{children:[X.jsx(f.span,{id:q.textId,...K,ref:j}),q.isSelected&&k.valueNode&&!k.valueNodeHasChildren?Vi.createPortal(K.children,k.valueNode):null]})});Dy.displayName=Qi;var fy="SelectItemIndicator",jy=G.forwardRef((y,B)=>{let{__scopeSelect:i,...z}=y;return Hy(fy,i).isSelected?X.jsx(f.span,{"aria-hidden":!0,...z,ref:B}):null});jy.displayName=fy;var Ei="SelectScrollUpButton",Ty=G.forwardRef((y,B)=>{let i=r(Ei,y.__scopeSelect),z=ui(Ei,y.__scopeSelect),[b,K]=G.useState(!1),k=u(B,z.onScrollButtonChange);return t(()=>{if(i.viewport&&i.isPositioned){let q=function(){let W=Q.scrollTop>0;K(W)};var J=q;let Q=i.viewport;return q(),Q.addEventListener("scroll",q),()=>Q.removeEventListener("scroll",q)}},[i.viewport,i.isPositioned]),b?X.jsx(Cy,{...y,ref:k,onAutoScroll:()=>{let{viewport:J,selectedItem:q}=i;if(J&&q)J.scrollTop=J.scrollTop-q.offsetHeight}}):null});Ty.displayName=Ei;var Ci="SelectScrollDownButton",Ey=G.forwardRef((y,B)=>{let i=r(Ci,y.__scopeSelect),z=ui(Ci,y.__scopeSelect),[b,K]=G.useState(!1),k=u(B,z.onScrollButtonChange);return t(()=>{if(i.viewport&&i.isPositioned){let q=function(){let W=Q.scrollHeight-Q.clientHeight,P=Math.ceil(Q.scrollTop)<W;K(P)};var J=q;let Q=i.viewport;return q(),Q.addEventListener("scroll",q),()=>Q.removeEventListener("scroll",q)}},[i.viewport,i.isPositioned]),b?X.jsx(Cy,{...y,ref:k,onAutoScroll:()=>{let{viewport:J,selectedItem:q}=i;if(J&&q)J.scrollTop=J.scrollTop+q.offsetHeight}}):null});Ey.displayName=Ci;var Cy=G.forwardRef((y,B)=>{let{__scopeSelect:i,onAutoScroll:z,...b}=y,K=r("SelectScrollButton",i),k=G.useRef(null),J=Pi(i),q=G.useCallback(()=>{if(k.current!==null)window.clearInterval(k.current),k.current=null},[]);return G.useEffect(()=>{return()=>q()},[q]),t(()=>{J().find((W)=>W.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[J]),X.jsx(f.div,{"aria-hidden":!0,...b,ref:B,style:{flexShrink:0,...b.style},onPointerDown:D(b.onPointerDown,()=>{if(k.current===null)k.current=window.setInterval(z,50)}),onPointerMove:D(b.onPointerMove,()=>{if(K.onItemLeave?.(),k.current===null)k.current=window.setInterval(z,50)}),onPointerLeave:D(b.onPointerLeave,()=>{q()})})}),g1="SelectSeparator",Iy=G.forwardRef((y,B)=>{let{__scopeSelect:i,...z}=y;return X.jsx(f.div,{"aria-hidden":!0,...z,ref:B})});Iy.displayName=g1;var Ii="SelectArrow",L1=G.forwardRef((y,B)=>{let{__scopeSelect:i,...z}=y,b=Yi(i),K=o(Ii,i),k=r(Ii,i);return K.open&&k.position==="popper"?X.jsx(qy,{...b,...z,ref:B}):null});L1.displayName=Ii;var O1="SelectBubbleInput",Ry=G.forwardRef(({__scopeSelect:y,value:B,...i},z)=>{let b=G.useRef(null),K=u(z,b),k=si(B);return G.useEffect(()=>{let J=b.current;if(!J)return;let q=window.HTMLSelectElement.prototype,W=Object.getOwnPropertyDescriptor(q,"value").set;if(k!==B&&W){let P=new Event("change",{bubbles:!0});W.call(J,B),J.dispatchEvent(P)}},[k,B]),X.jsx(f.select,{...i,style:{...Di,...i.style},ref:K,defaultValue:B})});Ry.displayName=O1;function Vy(y){return y===""||y===void 0}function uy(y){let B=iy(y),i=G.useRef(""),z=G.useRef(0),b=G.useCallback((k)=>{let J=i.current+k;B(J),function q(Q){if(i.current=Q,window.clearTimeout(z.current),Q!=="")z.current=window.setTimeout(()=>q(""),1000)}(J)},[B]),K=G.useCallback(()=>{i.current="",window.clearTimeout(z.current)},[]);return G.useEffect(()=>{return()=>window.clearTimeout(z.current)},[]),[i,b,K]}function wy(y,B,i){let b=B.length>1&&Array.from(B).every((Q)=>Q===B[0])?B[0]:B,K=i?y.indexOf(i):-1,k=A1(y,Math.max(K,0));if(b.length===1)k=k.filter((Q)=>Q!==i);let q=k.find((Q)=>Q.textValue.toLowerCase().startsWith(b.toLowerCase()));return q!==i?q:void 0}function A1(y,B){return y.map((i,z)=>y[(B+z)%y.length])}var _y=Xy,wi=$y,vy=Uy,hy=Wy,xy=Ny,_i=Py,cy=gy;var vi=Ay,hi=Sy,ay=Dy,ty=jy,xi=Ty,ci=Ey,ai=Iy;var L=R(dy(),1),Q5=_y;var X5=vy,S1=e.forwardRef(({className:y,children:B,...i},z)=>L.jsxDEV(wi,{ref:z,className:d("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 data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",y),...i,children:[B,L.jsxDEV(hy,{asChild:!0,children:L.jsxDEV(ti,{className:"h-4 w-4 opacity-50"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this));S1.displayName=wi.displayName;var ny=e.forwardRef(({className:y,...B},i)=>L.jsxDEV(xi,{ref:i,className:d("flex cursor-default items-center justify-center py-1",y),...B,children:L.jsxDEV(sy,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this));ny.displayName=xi.displayName;var py=e.forwardRef(({className:y,...B},i)=>L.jsxDEV(ci,{ref:i,className:d("flex cursor-default items-center justify-center py-1",y),...B,children:L.jsxDEV(ti,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this));py.displayName=ci.displayName;var D1=e.forwardRef(({className:y,children:B,position:i="popper",...z},b)=>L.jsxDEV(xy,{children:L.jsxDEV(_i,{ref:b,className:d("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-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 origin-[--radix-select-content-transform-origin]",i==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",y),position:i,...z,children:[L.jsxDEV(ny,{},void 0,!1,void 0,this),L.jsxDEV(cy,{className:d("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:B},void 0,!1,void 0,this),L.jsxDEV(py,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this));D1.displayName=_i.displayName;var f1=e.forwardRef(({className:y,...B},i)=>L.jsxDEV(vi,{ref:i,className:d("px-2 py-1.5 text-sm font-semibold",y),...B},void 0,!1,void 0,this));f1.displayName=vi.displayName;var j1=e.forwardRef(({className:y,children:B,...i},z)=>L.jsxDEV(hi,{ref:z,className:d("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",y),...i,children:[L.jsxDEV("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:L.jsxDEV(ty,{children:L.jsxDEV(ly,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),L.jsxDEV(ay,{children:B},void 0,!1,void 0,this)]},void 0,!0,void 0,this));j1.displayName=hi.displayName;var T1=e.forwardRef(({className:y,...B},i)=>L.jsxDEV(ai,{ref:i,className:d("-mx-1 my-1 h-px bg-muted",y),...B},void 0,!1,void 0,this));T1.displayName=ai.displayName;
|
|
2
|
-
export{Q5 as x,X5 as y,S1 as z,D1 as A,j1 as B};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Aa as F,Ea as T,Fa as KG,Na as E,Ra as h,Sa as v}from"/chunk-p8qycd26.js";var PG=!!(typeof window<"u"&&window.document&&window.document.createElement);function NG(Q,G,{checkForDefaultPrevented:J=!0}={}){return function(X){if(Q?.(X),J===!1||!X.defaultPrevented)return G?.(X)}}var D=F(T(),1),m=F(E(),1);function vG(Q,G){let J=D.createContext(G),Z=($)=>{let{children:Y,...q}=$,z=D.useMemo(()=>q,Object.values(q));return m.jsx(J.Provider,{value:z,children:Y})};Z.displayName=Q+"Provider";function X($){let Y=D.useContext(J);if(Y)return Y;if(G!==void 0)return G;throw Error(`\`${$}\` must be used within \`${Q}\``)}return[Z,X]}function s(Q,G=[]){let J=[];function Z($,Y){let q=D.createContext(Y),z=J.length;J=[...J,Y];let H=(K)=>{let{scope:M,children:W,...L}=K,_=M?.[Q]?.[z]||q,V=D.useMemo(()=>L,Object.values(L));return m.jsx(_.Provider,{value:V,children:W})};H.displayName=$+"Provider";function B(K,M){let W=M?.[Q]?.[z]||q,L=D.useContext(W);if(L)return L;if(Y!==void 0)return Y;throw Error(`\`${K}\` must be used within \`${$}\``)}return[H,B]}let X=()=>{let $=J.map((Y)=>{return D.createContext(Y)});return function(q){let z=q?.[Q]||$;return D.useMemo(()=>({[`__scope${Q}`]:{...q,[Q]:z}}),[q,z])}};return X.scopeName=Q,[Z,QG(X,...G)]}function QG(...Q){let G=Q[0];if(Q.length===1)return G;let J=()=>{let Z=Q.map((X)=>({useScope:X(),scopeName:X.scopeName}));return function($){let Y=Z.reduce((q,{useScope:z,scopeName:H})=>{let K=z($)[`__scope${H}`];return{...q,...K}},{});return D.useMemo(()=>({[`__scope${G.scopeName}`]:Y}),[Y])}};return J.scopeName=G.scopeName,J}var l=F(T(),1),P=globalThis?.document?l.useLayoutEffect:()=>{};var b=F(T(),1);var S=F(T(),1);var XG=b[" useInsertionEffect ".trim().toString()]||P;function hG({prop:Q,defaultProp:G,onChange:J=()=>{},caller:Z}){let[X,$,Y]=ZG({defaultProp:G,onChange:J}),q=Q!==void 0,z=q?Q:X;{let B=b.useRef(Q!==void 0);b.useEffect(()=>{let K=B.current;if(K!==q)console.warn(`${Z} is changing from ${K?"controlled":"uncontrolled"} to ${q?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);B.current=q},[q,Z])}let H=b.useCallback((B)=>{if(q){let K=$G(B)?B(Q):B;if(K!==Q)Y.current?.(K)}else $(B)},[q,Q,$,Y]);return[z,H]}function ZG({defaultProp:Q,onChange:G}){let[J,Z]=b.useState(Q),X=b.useRef(J),$=b.useRef(G);return XG(()=>{$.current=G},[G]),b.useEffect(()=>{if(X.current!==J)$.current?.(J),X.current=J},[J,X]),[J,Z,$]}function $G(Q){return typeof Q==="function"}var CG=Symbol("RADIX:SYNC_STATE");var r=F(T(),1),n=F(KG(),1);var U=F(T(),1);var y=F(E(),1);function a(Q){let G=qG(Q),J=U.forwardRef((Z,X)=>{let{children:$,...Y}=Z,q=U.Children.toArray($),z=q.find(zG);if(z){let H=z.props.children,B=q.map((K)=>{if(K===z){if(U.Children.count(H)>1)return U.Children.only(null);return U.isValidElement(H)?H.props.children:null}else return K});return y.jsx(G,{...Y,ref:X,children:U.isValidElement(H)?U.cloneElement(H,void 0,B):null})}return y.jsx(G,{...Y,ref:X,children:$})});return J.displayName=`${Q}.Slot`,J}function qG(Q){let G=U.forwardRef((J,Z)=>{let{children:X,...$}=J;if(U.isValidElement(X)){let Y=BG(X),q=HG($,X.props);if(X.type!==U.Fragment)q.ref=Z?h(Z,Y):Y;return U.cloneElement(X,q)}return U.Children.count(X)>1?U.Children.only(null):null});return G.displayName=`${Q}.SlotClone`,G}var YG=Symbol("radix.slottable");function zG(Q){return U.isValidElement(Q)&&typeof Q.type==="function"&&"__radixId"in Q.type&&Q.type.__radixId===YG}function HG(Q,G){let J={...G};for(let Z in G){let X=Q[Z],$=G[Z];if(/^on[A-Z]/.test(Z)){if(X&&$)J[Z]=(...q)=>{let z=$(...q);return X(...q),z};else if(X)J[Z]=X}else if(Z==="style")J[Z]={...X,...$};else if(Z==="className")J[Z]=[X,$].filter(Boolean).join(" ")}return{...Q,...J}}function BG(Q){let G=Object.getOwnPropertyDescriptor(Q.props,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning;if(J)return Q.ref;if(G=Object.getOwnPropertyDescriptor(Q,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning,J)return Q.props.ref;return Q.props.ref||Q.ref}var o=F(E(),1),WG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pG=WG.reduce((Q,G)=>{let J=a(`Primitive.${G}`),Z=r.forwardRef((X,$)=>{let{asChild:Y,...q}=X,z=Y?J:G;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return o.jsx(z,{...q,ref:$})});return Z.displayName=`Primitive.${G}`,{...Q,[G]:Z}},{});function dG(Q,G){if(Q)n.flushSync(()=>Q.dispatchEvent(G))}var I=F(T(),1);var j=F(T(),1);var C=F(E(),1);function p(Q){let G=FG(Q),J=j.forwardRef((Z,X)=>{let{children:$,...Y}=Z,q=j.Children.toArray($),z=q.find(jG);if(z){let H=z.props.children,B=q.map((K)=>{if(K===z){if(j.Children.count(H)>1)return j.Children.only(null);return j.isValidElement(H)?H.props.children:null}else return K});return C.jsx(G,{...Y,ref:X,children:j.isValidElement(H)?j.cloneElement(H,void 0,B):null})}return C.jsx(G,{...Y,ref:X,children:$})});return J.displayName=`${Q}.Slot`,J}function FG(Q){let G=j.forwardRef((J,Z)=>{let{children:X,...$}=J;if(j.isValidElement(X)){let Y=MG(X),q=LG($,X.props);if(X.type!==j.Fragment)q.ref=Z?h(Z,Y):Y;return j.cloneElement(X,q)}return j.Children.count(X)>1?j.Children.only(null):null});return G.displayName=`${Q}.SlotClone`,G}var UG=Symbol("radix.slottable");function jG(Q){return j.isValidElement(Q)&&typeof Q.type==="function"&&"__radixId"in Q.type&&Q.type.__radixId===UG}function LG(Q,G){let J={...G};for(let Z in G){let X=Q[Z],$=G[Z];if(/^on[A-Z]/.test(Z)){if(X&&$)J[Z]=(...q)=>{let z=$(...q);return X(...q),z};else if(X)J[Z]=X}else if(Z==="style")J[Z]={...X,...$};else if(Z==="className")J[Z]=[X,$].filter(Boolean).join(" ")}return{...Q,...J}}function MG(Q){let G=Object.getOwnPropertyDescriptor(Q.props,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning;if(J)return Q.ref;if(G=Object.getOwnPropertyDescriptor(Q,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning,J)return Q.props.ref;return Q.props.ref||Q.ref}var f=F(E(),1),VG=F(T(),1);var OG=F(E(),1);function nG(Q){let G=Q+"CollectionProvider",[J,Z]=s(G),[X,$]=J(G,{collectionRef:{current:null},itemMap:new Map}),Y=(_)=>{let{scope:V,children:N}=_,w=I.default.useRef(null),A=I.default.useRef(new Map).current;return f.jsx(X,{scope:V,itemMap:A,collectionRef:w,children:N})};Y.displayName=G;let q=Q+"CollectionSlot",z=p(q),H=I.default.forwardRef((_,V)=>{let{scope:N,children:w}=_,A=$(q,N),k=v(V,A.collectionRef);return f.jsx(z,{ref:k,children:w})});H.displayName=q;let B=Q+"CollectionItemSlot",K="data-radix-collection-item",M=p(B),W=I.default.forwardRef((_,V)=>{let{scope:N,children:w,...A}=_,k=I.default.useRef(null),i=v(V,k),R=$(B,N);return I.default.useEffect(()=>{return R.itemMap.set(k,{ref:k,...A}),()=>void R.itemMap.delete(k)}),f.jsx(M,{...{[K]:""},ref:i,children:w})});W.displayName=B;function L(_){let V=$(Q+"CollectionConsumer",_);return I.default.useCallback(()=>{let w=V.collectionRef.current;if(!w)return[];let A=Array.from(w.querySelectorAll(`[${K}]`));return Array.from(V.itemMap.values()).sort((R,JG)=>A.indexOf(R.ref.current)-A.indexOf(JG.ref.current))},[V.collectionRef,V.itemMap])}return[{Provider:Y,Slot:H,ItemSlot:W},L,Z]}var t=new WeakMap,oG=class Q extends Map{#G;constructor(G){super(G);this.#G=[...super.keys()],t.set(this,!0)}set(G,J){if(t.get(this))if(this.has(G))this.#G[this.#G.indexOf(G)]=G;else this.#G.push(G);return super.set(G,J),this}insert(G,J,Z){let X=this.has(J),$=this.#G.length,Y=e(G),q=Y>=0?Y:$+Y,z=q<0||q>=$?-1:q;if(z===this.size||X&&z===this.size-1||z===-1)return this.set(J,Z),this;let H=this.size+(X?0:1);if(Y<0)q++;let B=[...this.#G],K,M=!1;for(let W=q;W<H;W++)if(q===W){let L=B[W];if(B[W]===J)L=B[W+1];if(X)this.delete(J);K=this.get(L),this.set(J,Z)}else{if(!M&&B[W-1]===J)M=!0;let L=B[M?W:W-1],_=K;K=this.get(L),this.delete(L),this.set(L,_)}return this}with(G,J,Z){let X=new Q(this);return X.insert(G,J,Z),X}before(G){let J=this.#G.indexOf(G)-1;if(J<0)return;return this.entryAt(J)}setBefore(G,J,Z){let X=this.#G.indexOf(G);if(X===-1)return this;return this.insert(X,J,Z)}after(G){let J=this.#G.indexOf(G);if(J=J===-1||J===this.size-1?-1:J+1,J===-1)return;return this.entryAt(J)}setAfter(G,J,Z){let X=this.#G.indexOf(G);if(X===-1)return this;return this.insert(X+1,J,Z)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#G=[],super.clear()}delete(G){let J=super.delete(G);if(J)this.#G.splice(this.#G.indexOf(G),1);return J}deleteAt(G){let J=this.keyAt(G);if(J!==void 0)return this.delete(J);return!1}at(G){let J=d(this.#G,G);if(J!==void 0)return this.get(J)}entryAt(G){let J=d(this.#G,G);if(J!==void 0)return[J,this.get(J)]}indexOf(G){return this.#G.indexOf(G)}keyAt(G){return d(this.#G,G)}from(G,J){let Z=this.indexOf(G);if(Z===-1)return;let X=Z+J;if(X<0)X=0;if(X>=this.size)X=this.size-1;return this.at(X)}keyFrom(G,J){let Z=this.indexOf(G);if(Z===-1)return;let X=Z+J;if(X<0)X=0;if(X>=this.size)X=this.size-1;return this.keyAt(X)}find(G,J){let Z=0;for(let X of this){if(Reflect.apply(G,J,[X,Z,this]))return X;Z++}return}findIndex(G,J){let Z=0;for(let X of this){if(Reflect.apply(G,J,[X,Z,this]))return Z;Z++}return-1}filter(G,J){let Z=[],X=0;for(let $ of this){if(Reflect.apply(G,J,[$,X,this]))Z.push($);X++}return new Q(Z)}map(G,J){let Z=[],X=0;for(let $ of this)Z.push([$[0],Reflect.apply(G,J,[$,X,this])]),X++;return new Q(Z)}reduce(...G){let[J,Z]=G,X=0,$=Z??this.at(0);for(let Y of this){if(X===0&&G.length===1)$=Y;else $=Reflect.apply(J,this,[$,Y,X,this]);X++}return $}reduceRight(...G){let[J,Z]=G,X=Z??this.at(-1);for(let $=this.size-1;$>=0;$--){let Y=this.at($);if($===this.size-1&&G.length===1)X=Y;else X=Reflect.apply(J,this,[X,Y,$,this])}return X}toSorted(G){let J=[...this.entries()].sort(G);return new Q(J)}toReversed(){let G=new Q;for(let J=this.size-1;J>=0;J--){let Z=this.keyAt(J),X=this.get(Z);G.set(Z,X)}return G}toSpliced(...G){let J=[...this.entries()];return J.splice(...G),new Q(J)}slice(G,J){let Z=new Q,X=this.size-1;if(G===void 0)return Z;if(G<0)G=G+this.size;if(J!==void 0&&J>0)X=J-1;for(let $=G;$<=X;$++){let Y=this.keyAt($),q=this.get(Y);Z.set(Y,q)}return Z}every(G,J){let Z=0;for(let X of this){if(!Reflect.apply(G,J,[X,Z,this]))return!1;Z++}return!0}some(G,J){let Z=0;for(let X of this){if(Reflect.apply(G,J,[X,Z,this]))return!0;Z++}return!1}};function d(Q,G){if("at"in Array.prototype)return Array.prototype.at.call(Q,G);let J=TG(Q,G);return J===-1?void 0:Q[J]}function TG(Q,G){let J=Q.length,Z=e(G),X=Z>=0?Z:J+Z;return X<0||X>=J?-1:X}function e(Q){return Q!==Q||Q===0?0:Math.trunc(Q)}var x=F(T(),1),_G=F(E(),1),DG=x.createContext(void 0);function eG(Q){let G=x.useContext(DG);return Q||G||"ltr"}var g=F(T(),1);function JJ(Q){let G=g.useRef(Q);return g.useEffect(()=>{G.current=Q}),g.useMemo(()=>(...J)=>G.current?.(...J),[])}var c=F(T(),1);var bG=c[" useId ".trim().toString()]||(()=>{return}),wG=0;function ZJ(Q){let[G,J]=c.useState(bG());return P(()=>{if(!Q)J((Z)=>Z??String(wG++))},[Q]),Q||(G?`radix-${G}`:"")}var O=F(T(),1);var GG=F(T(),1);function AG(Q,G){return GG.useReducer((J,Z)=>{return G[J][Z]??J},Q)}var IG=(Q)=>{let{present:G,children:J}=Q,Z=kG(G),X=typeof J==="function"?J({present:Z.isPresent}):O.Children.only(J),$=v(Z.ref,EG(X));return typeof J==="function"||Z.isPresent?O.cloneElement(X,{ref:$}):null};IG.displayName="Presence";function kG(Q){let[G,J]=O.useState(),Z=O.useRef(null),X=O.useRef(Q),$=O.useRef("none"),Y=Q?"mounted":"unmounted",[q,z]=AG(Y,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{let H=u(Z.current);$.current=q==="mounted"?H:"none"},[q]),P(()=>{let H=Z.current,B=X.current;if(B!==Q){let M=$.current,W=u(H);if(Q)z("MOUNT");else if(W==="none"||H?.display==="none")z("UNMOUNT");else if(B&&M!==W)z("ANIMATION_OUT");else z("UNMOUNT");X.current=Q}},[Q,z]),P(()=>{if(G){let H,B=G.ownerDocument.defaultView??window,K=(W)=>{let _=u(Z.current).includes(CSS.escape(W.animationName));if(W.target===G&&_){if(z("ANIMATION_END"),!X.current){let V=G.style.animationFillMode;G.style.animationFillMode="forwards",H=B.setTimeout(()=>{if(G.style.animationFillMode==="forwards")G.style.animationFillMode=V})}}},M=(W)=>{if(W.target===G)$.current=u(Z.current)};return G.addEventListener("animationstart",M),G.addEventListener("animationcancel",K),G.addEventListener("animationend",K),()=>{B.clearTimeout(H),G.removeEventListener("animationstart",M),G.removeEventListener("animationcancel",K),G.removeEventListener("animationend",K)}}else z("ANIMATION_END")},[G,z]),{isPresent:["mounted","unmountSuspended"].includes(q),ref:O.useCallback((H)=>{Z.current=H?getComputedStyle(H):null,J(H)},[])}}function u(Q){return Q?.animationName||"none"}function EG(Q){let G=Object.getOwnPropertyDescriptor(Q.props,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning;if(J)return Q.ref;if(G=Object.getOwnPropertyDescriptor(Q,"ref")?.get,J=G&&"isReactWarning"in G&&G.isReactWarning,J)return Q.props.ref;return Q.props.ref||Q.ref}
|
|
2
|
-
export{NG as la,vG as ma,s as na,P as oa,hG as pa,pG as qa,dG as ra,nG as sa,eG as ta,JJ as ua,ZJ as va,IG as wa};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as V2,v as o2,w as e2}from"/chunk-abx95kyf.js";import{C as k2,D as L2,E as t2,F as p2,G as r2}from"/chunk-19284fra.js";import{ea as u2,fa as c2,ga as s2,ha as n2,ia as y5,ja as z5}from"/chunk-9g67pqq7.js";import{la as V,na as J2,pa as _5,qa as T,ra as E2,sa as d2,ta as M2,ua as Q2,va as l,wa as c}from"/chunk-08yrv2nn.js";import{$a as Z0,Aa as w,Ea as y2,Na as H2,Qa as W2,Ra as C,Sa as x,Ua as X0,Va as j,cb as $0,eb as W0}from"/chunk-p8qycd26.js";var O=w(y2(),1);var g=w(y2(),1);var $=w(y2(),1);var U=w(y2(),1);var e=w(H2(),1);function _2(y){let q=U0(y),z=U.forwardRef((J,Q)=>{let{children:Z,...Y}=J,X=U.Children.toArray(Z),F=X.find(m0);if(F){let k=F.props.children,K=X.map((W)=>{if(W===F){if(U.Children.count(k)>1)return U.Children.only(null);return U.isValidElement(k)?k.props.children:null}else return W});return e.jsx(q,{...Y,ref:Q,children:U.isValidElement(k)?U.cloneElement(k,void 0,K):null})}return e.jsx(q,{...Y,ref:Q,children:Z})});return z.displayName=`${y}.Slot`,z}function U0(y){let q=U.forwardRef((z,J)=>{let{children:Q,...Z}=z;if(U.isValidElement(Q)){let Y=i0(Q),X=G0(Z,Q.props);if(Q.type!==U.Fragment)X.ref=J?C(J,Y):Y;return U.cloneElement(Q,X)}return U.Children.count(Q)>1?U.Children.only(null):null});return q.displayName=`${y}.SlotClone`,q}var g0=Symbol("radix.slottable");function m0(y){return U.isValidElement(y)&&typeof y.type==="function"&&"__radixId"in y.type&&y.type.__radixId===g0}function G0(y,q){let z={...q};for(let J in q){let Q=y[J],Z=q[J];if(/^on[A-Z]/.test(J)){if(Q&&Z)z[J]=(...X)=>{let F=Z(...X);return Q(...X),F};else if(Q)z[J]=Q}else if(J==="style")z[J]={...Q,...Z};else if(J==="className")z[J]=[Q,Z].filter(Boolean).join(" ")}return{...y,...z}}function i0(y){let q=Object.getOwnPropertyDescriptor(y.props,"ref")?.get,z=q&&"isReactWarning"in q&&q.isReactWarning;if(z)return y.ref;if(q=Object.getOwnPropertyDescriptor(y,"ref")?.get,z=q&&"isReactWarning"in q&&q.isReactWarning,z)return y.props.ref;return y.props.ref||y.ref}var B=w(H2(),1),F2=["Enter"," "],D0=["ArrowDown","PageUp","Home"],q5=["ArrowUp","PageDown","End"],P0=[...D0,...q5],f0={ltr:[...F2,"ArrowRight"],rtl:[...F2,"ArrowLeft"]},j0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},s="Menu",[M,w0,O0]=d2(s),[h,b2]=J2(s,[O0,k2,V2]),t=k2(),J5=V2(),[Q5,A]=h(s),[T0,p]=h(s),Z5=(y)=>{let{__scopeMenu:q,open:z=!1,children:J,dir:Q,onOpenChange:Z,modal:Y=!0}=y,X=t(q),[F,k]=$.useState(null),K=$.useRef(!1),W=Q2(Z),L=M2(Q);return $.useEffect(()=>{let P=()=>{K.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>K.current=!1;return document.addEventListener("keydown",P,{capture:!0}),()=>{document.removeEventListener("keydown",P,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),B.jsx(L2,{...X,children:B.jsx(Q5,{scope:q,open:z,onOpenChange:W,content:F,onContentChange:k,children:B.jsx(T0,{scope:q,onClose:$.useCallback(()=>W(!1),[W]),isUsingKeyboardRef:K,dir:L,modal:Y,children:J})})})};Z5.displayName=s;var A0="MenuAnchor",U2=$.forwardRef((y,q)=>{let{__scopeMenu:z,...J}=y,Q=t(z);return B.jsx(t2,{...Q,...J,ref:q})});U2.displayName=A0;var g2="MenuPortal",[N0,$5]=h(g2,{forceMount:void 0}),W5=(y)=>{let{__scopeMenu:q,forceMount:z,children:J,container:Q}=y,Z=A(g2,q);return B.jsx(N0,{scope:q,forceMount:z,children:B.jsx(c,{present:z||Z.open,children:B.jsx(n2,{asChild:!0,container:Q,children:J})})})};W5.displayName=g2;var f="MenuContent",[h0,m2]=h(f),X5=$.forwardRef((y,q)=>{let z=$5(f,y.__scopeMenu),{forceMount:J=z.forceMount,...Q}=y,Z=A(f,y.__scopeMenu),Y=p(f,y.__scopeMenu);return B.jsx(M.Provider,{scope:y.__scopeMenu,children:B.jsx(c,{present:J||Z.open,children:B.jsx(M.Slot,{scope:y.__scopeMenu,children:Y.modal?B.jsx(I0,{...Q,ref:q}):B.jsx(v0,{...Q,ref:q})})})})}),I0=$.forwardRef((y,q)=>{let z=A(f,y.__scopeMenu),J=$.useRef(null),Q=x(q,J);return $.useEffect(()=>{let Z=J.current;if(Z)return y5(Z)},[]),B.jsx(G2,{...y,ref:Q,trapFocus:z.open,disableOutsidePointerEvents:z.open,disableOutsideScroll:!0,onFocusOutside:V(y.onFocusOutside,(Z)=>Z.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>z.onOpenChange(!1)})}),v0=$.forwardRef((y,q)=>{let z=A(f,y.__scopeMenu);return B.jsx(G2,{...y,ref:q,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>z.onOpenChange(!1)})}),S0=_2("MenuContent.ScrollLock"),G2=$.forwardRef((y,q)=>{let{__scopeMenu:z,loop:J=!1,trapFocus:Q,onOpenAutoFocus:Z,onCloseAutoFocus:Y,disableOutsidePointerEvents:X,onEntryFocus:F,onEscapeKeyDown:k,onPointerDownOutside:K,onFocusOutside:W,onInteractOutside:L,onDismiss:P,disableOutsideScroll:b,...I}=y,_=A(f,z),v=p(f,z),B0=t(z),K0=J5(z),S2=w0(z),[H0,R2]=$.useState(null),r=$.useRef(null),F0=x(q,r,_.onContentChange),n=$.useRef(0),o=$.useRef(""),k0=$.useRef(0),X2=$.useRef(null),C2=$.useRef("right"),Y2=$.useRef(0),L0=b?z5:$.Fragment,V0=b?{as:S0,allowPinchZoom:!0}:void 0,b0=(H)=>{let R=o.current+H,N=S2().filter((D)=>!D.disabled),a=document.activeElement,B2=N.find((D)=>D.ref.current===a)?.textValue,K2=N.map((D)=>D.textValue),l2=t0(K2,R,B2),E=N.find((D)=>D.textValue===l2)?.ref.current;if(function D(x2){if(o.current=x2,window.clearTimeout(n.current),x2!=="")n.current=window.setTimeout(()=>D(""),1000)}(R),E)setTimeout(()=>E.focus())};$.useEffect(()=>{return()=>window.clearTimeout(n.current)},[]),c2();let S=$.useCallback((H)=>{return C2.current===X2.current?.side&&r0(H,X2.current?.area)},[]);return B.jsx(h0,{scope:z,searchRef:o,onItemEnter:$.useCallback((H)=>{if(S(H))H.preventDefault()},[S]),onItemLeave:$.useCallback((H)=>{if(S(H))return;r.current?.focus(),R2(null)},[S]),onTriggerLeave:$.useCallback((H)=>{if(S(H))H.preventDefault()},[S]),pointerGraceTimerRef:k0,onPointerGraceIntentChange:$.useCallback((H)=>{X2.current=H},[]),children:B.jsx(L0,{...V0,children:B.jsx(s2,{asChild:!0,trapped:Q,onMountAutoFocus:V(Z,(H)=>{H.preventDefault(),r.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:Y,children:B.jsx(u2,{asChild:!0,disableOutsidePointerEvents:X,onEscapeKeyDown:k,onPointerDownOutside:K,onFocusOutside:W,onInteractOutside:L,onDismiss:P,children:B.jsx(o2,{asChild:!0,...K0,dir:v.dir,orientation:"vertical",loop:J,currentTabStopId:H0,onCurrentTabStopIdChange:R2,onEntryFocus:V(F,(H)=>{if(!v.isUsingKeyboardRef.current)H.preventDefault()}),preventScrollOnEntryFocus:!0,children:B.jsx(p2,{role:"menu","aria-orientation":"vertical","data-state":P5(_.open),"data-radix-menu-content":"",dir:v.dir,...B0,...I,ref:F0,style:{outline:"none",...I.style},onKeyDown:V(I.onKeyDown,(H)=>{let N=H.target.closest("[data-radix-menu-content]")===H.currentTarget,a=H.ctrlKey||H.altKey||H.metaKey,B2=H.key.length===1;if(N){if(H.key==="Tab")H.preventDefault();if(!a&&B2)b0(H.key)}let K2=r.current;if(H.target!==K2)return;if(!P0.includes(H.key))return;H.preventDefault();let E=S2().filter((D)=>!D.disabled).map((D)=>D.ref.current);if(q5.includes(H.key))E.reverse();c0(E)}),onBlur:V(y.onBlur,(H)=>{if(!H.currentTarget.contains(H.target))window.clearTimeout(n.current),o.current=""}),onPointerMove:V(y.onPointerMove,u((H)=>{let R=H.target,N=Y2.current!==H.clientX;if(H.currentTarget.contains(R)&&N){let a=H.clientX>Y2.current?"right":"left";C2.current=a,Y2.current=H.clientX}}))})})})})})})});X5.displayName=f;var R0="MenuGroup",i2=$.forwardRef((y,q)=>{let{__scopeMenu:z,...J}=y;return B.jsx(T.div,{role:"group",...J,ref:q})});i2.displayName=R0;var C0="MenuLabel",Y5=$.forwardRef((y,q)=>{let{__scopeMenu:z,...J}=y;return B.jsx(T.div,{...J,ref:q})});Y5.displayName=C0;var z2="MenuItem",a2="menu.itemSelect",Z2=$.forwardRef((y,q)=>{let{disabled:z=!1,onSelect:J,...Q}=y,Z=$.useRef(null),Y=p(z2,y.__scopeMenu),X=m2(z2,y.__scopeMenu),F=x(q,Z),k=$.useRef(!1),K=()=>{let W=Z.current;if(!z&&W){let L=new CustomEvent(a2,{bubbles:!0,cancelable:!0});if(W.addEventListener(a2,(P)=>J?.(P),{once:!0}),E2(W,L),L.defaultPrevented)k.current=!1;else Y.onClose()}};return B.jsx(B5,{...Q,ref:F,disabled:z,onClick:V(y.onClick,K),onPointerDown:(W)=>{y.onPointerDown?.(W),k.current=!0},onPointerUp:V(y.onPointerUp,(W)=>{if(!k.current)W.currentTarget?.click()}),onKeyDown:V(y.onKeyDown,(W)=>{let L=X.searchRef.current!=="";if(z||L&&W.key===" ")return;if(F2.includes(W.key))W.currentTarget.click(),W.preventDefault()})})});Z2.displayName=z2;var B5=$.forwardRef((y,q)=>{let{__scopeMenu:z,disabled:J=!1,textValue:Q,...Z}=y,Y=m2(z2,z),X=J5(z),F=$.useRef(null),k=x(q,F),[K,W]=$.useState(!1),[L,P]=$.useState("");return $.useEffect(()=>{let b=F.current;if(b)P((b.textContent??"").trim())},[Z.children]),B.jsx(M.ItemSlot,{scope:z,disabled:J,textValue:Q??L,children:B.jsx(e2,{asChild:!0,...X,focusable:!J,children:B.jsx(T.div,{role:"menuitem","data-highlighted":K?"":void 0,"aria-disabled":J||void 0,"data-disabled":J?"":void 0,...Z,ref:k,onPointerMove:V(y.onPointerMove,u((b)=>{if(J)Y.onItemLeave(b);else if(Y.onItemEnter(b),!b.defaultPrevented)b.currentTarget.focus({preventScroll:!0})})),onPointerLeave:V(y.onPointerLeave,u((b)=>Y.onItemLeave(b))),onFocus:V(y.onFocus,()=>W(!0)),onBlur:V(y.onBlur,()=>W(!1))})})})}),l0="MenuCheckboxItem",K5=$.forwardRef((y,q)=>{let{checked:z=!1,onCheckedChange:J,...Q}=y;return B.jsx(V5,{scope:y.__scopeMenu,checked:z,children:B.jsx(Z2,{role:"menuitemcheckbox","aria-checked":q2(z)?"mixed":z,...Q,ref:q,"data-state":f2(z),onSelect:V(Q.onSelect,()=>J?.(q2(z)?!0:!z),{checkForDefaultPrevented:!1})})})});K5.displayName=l0;var H5="MenuRadioGroup",[x0,_0]=h(H5,{value:void 0,onValueChange:()=>{}}),F5=$.forwardRef((y,q)=>{let{value:z,onValueChange:J,...Q}=y,Z=Q2(J);return B.jsx(x0,{scope:y.__scopeMenu,value:z,onValueChange:Z,children:B.jsx(i2,{...Q,ref:q})})});F5.displayName=H5;var k5="MenuRadioItem",L5=$.forwardRef((y,q)=>{let{value:z,...J}=y,Q=_0(k5,y.__scopeMenu),Z=z===Q.value;return B.jsx(V5,{scope:y.__scopeMenu,checked:Z,children:B.jsx(Z2,{role:"menuitemradio","aria-checked":Z,...J,ref:q,"data-state":f2(Z),onSelect:V(J.onSelect,()=>Q.onValueChange?.(z),{checkForDefaultPrevented:!1})})})});L5.displayName=k5;var D2="MenuItemIndicator",[V5,a0]=h(D2,{checked:!1}),b5=$.forwardRef((y,q)=>{let{__scopeMenu:z,forceMount:J,...Q}=y,Z=a0(D2,z);return B.jsx(c,{present:J||q2(Z.checked)||Z.checked===!0,children:B.jsx(T.span,{...Q,ref:q,"data-state":f2(Z.checked)})})});b5.displayName=D2;var E0="MenuSeparator",U5=$.forwardRef((y,q)=>{let{__scopeMenu:z,...J}=y;return B.jsx(T.div,{role:"separator","aria-orientation":"horizontal",...J,ref:q})});U5.displayName=E0;var d0="MenuArrow",g5=$.forwardRef((y,q)=>{let{__scopeMenu:z,...J}=y,Q=t(z);return B.jsx(r2,{...Q,...J,ref:q})});g5.displayName=d0;var P2="MenuSub",[M0,m5]=h(P2),u0=(y)=>{let{__scopeMenu:q,children:z,open:J=!1,onOpenChange:Q}=y,Z=A(P2,q),Y=t(q),[X,F]=$.useState(null),[k,K]=$.useState(null),W=Q2(Q);return $.useEffect(()=>{if(Z.open===!1)W(!1);return()=>W(!1)},[Z.open,W]),B.jsx(L2,{...Y,children:B.jsx(Q5,{scope:q,open:J,onOpenChange:W,content:k,onContentChange:K,children:B.jsx(M0,{scope:q,contentId:l(),triggerId:l(),trigger:X,onTriggerChange:F,children:z})})})};u0.displayName=P2;var d="MenuSubTrigger",G5=$.forwardRef((y,q)=>{let z=A(d,y.__scopeMenu),J=p(d,y.__scopeMenu),Q=m5(d,y.__scopeMenu),Z=m2(d,y.__scopeMenu),Y=$.useRef(null),{pointerGraceTimerRef:X,onPointerGraceIntentChange:F}=Z,k={__scopeMenu:y.__scopeMenu},K=$.useCallback(()=>{if(Y.current)window.clearTimeout(Y.current);Y.current=null},[]);return $.useEffect(()=>K,[K]),$.useEffect(()=>{let W=X.current;return()=>{window.clearTimeout(W),F(null)}},[X,F]),B.jsx(U2,{asChild:!0,...k,children:B.jsx(B5,{id:Q.triggerId,"aria-haspopup":"menu","aria-expanded":z.open,"aria-controls":Q.contentId,"data-state":P5(z.open),...y,ref:C(q,Q.onTriggerChange),onClick:(W)=>{if(y.onClick?.(W),y.disabled||W.defaultPrevented)return;if(W.currentTarget.focus(),!z.open)z.onOpenChange(!0)},onPointerMove:V(y.onPointerMove,u((W)=>{if(Z.onItemEnter(W),W.defaultPrevented)return;if(!y.disabled&&!z.open&&!Y.current)Z.onPointerGraceIntentChange(null),Y.current=window.setTimeout(()=>{z.onOpenChange(!0),K()},100)})),onPointerLeave:V(y.onPointerLeave,u((W)=>{K();let L=z.content?.getBoundingClientRect();if(L){let P=z.content?.dataset.side,b=P==="right",I=b?-5:5,_=L[b?"left":"right"],v=L[b?"right":"left"];Z.onPointerGraceIntentChange({area:[{x:W.clientX+I,y:W.clientY},{x:_,y:L.top},{x:v,y:L.top},{x:v,y:L.bottom},{x:_,y:L.bottom}],side:P}),window.clearTimeout(X.current),X.current=window.setTimeout(()=>Z.onPointerGraceIntentChange(null),300)}else{if(Z.onTriggerLeave(W),W.defaultPrevented)return;Z.onPointerGraceIntentChange(null)}})),onKeyDown:V(y.onKeyDown,(W)=>{let L=Z.searchRef.current!=="";if(y.disabled||L&&W.key===" ")return;if(f0[J.dir].includes(W.key))z.onOpenChange(!0),z.content?.focus(),W.preventDefault()})})})});G5.displayName=d;var i5="MenuSubContent",D5=$.forwardRef((y,q)=>{let z=$5(f,y.__scopeMenu),{forceMount:J=z.forceMount,...Q}=y,Z=A(f,y.__scopeMenu),Y=p(f,y.__scopeMenu),X=m5(i5,y.__scopeMenu),F=$.useRef(null),k=x(q,F);return B.jsx(M.Provider,{scope:y.__scopeMenu,children:B.jsx(c,{present:J||Z.open,children:B.jsx(M.Slot,{scope:y.__scopeMenu,children:B.jsx(G2,{id:X.contentId,"aria-labelledby":X.triggerId,...Q,ref:k,align:"start",side:Y.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:(K)=>{if(Y.isUsingKeyboardRef.current)F.current?.focus();K.preventDefault()},onCloseAutoFocus:(K)=>K.preventDefault(),onFocusOutside:V(y.onFocusOutside,(K)=>{if(K.target!==X.trigger)Z.onOpenChange(!1)}),onEscapeKeyDown:V(y.onEscapeKeyDown,(K)=>{Y.onClose(),K.preventDefault()}),onKeyDown:V(y.onKeyDown,(K)=>{let W=K.currentTarget.contains(K.target),L=j0[Y.dir].includes(K.key);if(W&&L)Z.onOpenChange(!1),X.trigger?.focus(),K.preventDefault()})})})})})});D5.displayName=i5;function P5(y){return y?"open":"closed"}function q2(y){return y==="indeterminate"}function f2(y){return q2(y)?"indeterminate":y?"checked":"unchecked"}function c0(y){let q=document.activeElement;for(let z of y){if(z===q)return;if(z.focus(),document.activeElement!==q)return}}function s0(y,q){return y.map((z,J)=>y[(q+J)%y.length])}function t0(y,q,z){let Q=q.length>1&&Array.from(q).every((k)=>k===q[0])?q[0]:q,Z=z?y.indexOf(z):-1,Y=s0(y,Math.max(Z,0));if(Q.length===1)Y=Y.filter((k)=>k!==z);let F=Y.find((k)=>k.toLowerCase().startsWith(Q.toLowerCase()));return F!==z?F:void 0}function p0(y,q){let{x:z,y:J}=y,Q=!1;for(let Z=0,Y=q.length-1;Z<q.length;Y=Z++){let X=q[Z],F=q[Y],k=X.x,K=X.y,W=F.x,L=F.y;if(K>J!==L>J&&z<(W-k)*(J-K)/(L-K)+k)Q=!Q}return Q}function r0(y,q){if(!q)return!1;let z={x:y.clientX,y:y.clientY};return p0(z,q)}function u(y){return(q)=>q.pointerType==="mouse"?y(q):void 0}var f5=Z5,j5=U2,w5=W5,O5=X5,T5=i2,A5=Y5,N5=Z2,h5=K5,I5=F5,v5=L5,S5=b5,R5=U5,C5=g5;var l5=G5,x5=D5;var m=w(H2(),1),$2="DropdownMenu",[o0,qy]=J2($2,[b2]),i=b2(),[e0,a5]=o0($2),E5=(y)=>{let{__scopeDropdownMenu:q,children:z,dir:J,open:Q,defaultOpen:Z,onOpenChange:Y,modal:X=!0}=y,F=i(q),k=g.useRef(null),[K,W]=_5({prop:Q,defaultProp:Z??!1,onChange:Y,caller:$2});return m.jsx(e0,{scope:q,triggerId:l(),triggerRef:k,contentId:l(),open:K,onOpenChange:W,onOpenToggle:g.useCallback(()=>W((L)=>!L),[W]),modal:X,children:m.jsx(f5,{...F,open:K,onOpenChange:W,dir:J,modal:X,children:z})})};E5.displayName=$2;var d5="DropdownMenuTrigger",M5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,disabled:J=!1,...Q}=y,Z=a5(d5,z),Y=i(z);return m.jsx(j5,{asChild:!0,...Y,children:m.jsx(T.button,{type:"button",id:Z.triggerId,"aria-haspopup":"menu","aria-expanded":Z.open,"aria-controls":Z.open?Z.contentId:void 0,"data-state":Z.open?"open":"closed","data-disabled":J?"":void 0,disabled:J,...Q,ref:C(q,Z.triggerRef),onPointerDown:V(y.onPointerDown,(X)=>{if(!J&&X.button===0&&X.ctrlKey===!1){if(Z.onOpenToggle(),!Z.open)X.preventDefault()}}),onKeyDown:V(y.onKeyDown,(X)=>{if(J)return;if(["Enter"," "].includes(X.key))Z.onOpenToggle();if(X.key==="ArrowDown")Z.onOpenChange(!0);if(["Enter"," ","ArrowDown"].includes(X.key))X.preventDefault()})})})});M5.displayName=d5;var y8="DropdownMenuPortal",u5=(y)=>{let{__scopeDropdownMenu:q,...z}=y,J=i(q);return m.jsx(w5,{...J,...z})};u5.displayName=y8;var c5="DropdownMenuContent",s5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=a5(c5,z),Z=i(z),Y=g.useRef(!1);return m.jsx(O5,{id:Q.contentId,"aria-labelledby":Q.triggerId,...Z,...J,ref:q,onCloseAutoFocus:V(y.onCloseAutoFocus,(X)=>{if(!Y.current)Q.triggerRef.current?.focus();Y.current=!1,X.preventDefault()}),onInteractOutside:V(y.onInteractOutside,(X)=>{let F=X.detail.originalEvent,k=F.button===0&&F.ctrlKey===!0,K=F.button===2||k;if(!Q.modal||K)Y.current=!0}),style:{...y.style,...{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})});s5.displayName=c5;var z8="DropdownMenuGroup",q8=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(T5,{...Q,...J,ref:q})});q8.displayName=z8;var J8="DropdownMenuLabel",t5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(A5,{...Q,...J,ref:q})});t5.displayName=J8;var Q8="DropdownMenuItem",p5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(N5,{...Q,...J,ref:q})});p5.displayName=Q8;var Z8="DropdownMenuCheckboxItem",r5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(h5,{...Q,...J,ref:q})});r5.displayName=Z8;var $8="DropdownMenuRadioGroup",W8=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(I5,{...Q,...J,ref:q})});W8.displayName=$8;var X8="DropdownMenuRadioItem",n5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(v5,{...Q,...J,ref:q})});n5.displayName=X8;var Y8="DropdownMenuItemIndicator",o5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(S5,{...Q,...J,ref:q})});o5.displayName=Y8;var B8="DropdownMenuSeparator",e5=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(R5,{...Q,...J,ref:q})});e5.displayName=B8;var K8="DropdownMenuArrow",H8=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(C5,{...Q,...J,ref:q})});H8.displayName=K8;var F8="DropdownMenuSubTrigger",y0=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(l5,{...Q,...J,ref:q})});y0.displayName=F8;var k8="DropdownMenuSubContent",z0=g.forwardRef((y,q)=>{let{__scopeDropdownMenu:z,...J}=y,Q=i(z);return m.jsx(x5,{...Q,...J,ref:q,style:{...y.style,...{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})});z0.displayName=k8;var q0=E5,J0=M5,Q0=u5,j2=s5;var w2=t5,O2=p5,T2=r5;var A2=n5,N2=o5,h2=e5;var I2=y0,v2=z0;var G=w(W2(),1),Xy=q0,Yy=J0;var V8=O.forwardRef(({className:y,inset:q,children:z,...J},Q)=>G.jsxDEV(I2,{ref:Q,className:j("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",q&&"pl-8",y),...J,children:[z,G.jsxDEV($0,{className:"ml-auto"},void 0,!1,void 0,this)]},void 0,!0,void 0,this));V8.displayName=I2.displayName;var b8=O.forwardRef(({className:y,...q},z)=>G.jsxDEV(v2,{ref:z,className:j("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",y),...q},void 0,!1,void 0,this));b8.displayName=v2.displayName;var U8=O.forwardRef(({className:y,sideOffset:q=4,...z},J)=>G.jsxDEV(Q0,{children:G.jsxDEV(j2,{ref:J,sideOffset:q,className:j("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]",y),...z},void 0,!1,void 0,this)},void 0,!1,void 0,this));U8.displayName=j2.displayName;var g8=O.forwardRef(({className:y,inset:q,...z},J)=>G.jsxDEV(O2,{ref:J,className:j("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",q&&"pl-8",y),...z},void 0,!1,void 0,this));g8.displayName=O2.displayName;var m8=O.forwardRef(({className:y,children:q,checked:z,...J},Q)=>G.jsxDEV(T2,{ref:Q,className:j("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",y),checked:z,...J,children:[G.jsxDEV("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.jsxDEV(N2,{children:G.jsxDEV(Z0,{className:"h-4 w-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q]},void 0,!0,void 0,this));m8.displayName=T2.displayName;var G8=O.forwardRef(({className:y,children:q,...z},J)=>G.jsxDEV(A2,{ref:J,className:j("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",y),...z,children:[G.jsxDEV("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:G.jsxDEV(N2,{children:G.jsxDEV(W0,{className:"h-2 w-2 fill-current"},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),q]},void 0,!0,void 0,this));G8.displayName=A2.displayName;var i8=O.forwardRef(({className:y,inset:q,...z},J)=>G.jsxDEV(w2,{ref:J,className:j("px-2 py-1.5 text-sm font-semibold",q&&"pl-8",y),...z},void 0,!1,void 0,this));i8.displayName=w2.displayName;var D8=O.forwardRef(({className:y,...q},z)=>G.jsxDEV(h2,{ref:z,className:j("-mx-1 my-1 h-px bg-muted",y),...q},void 0,!1,void 0,this));D8.displayName=h2.displayName;var P8=({className:y,...q})=>{return G.jsxDEV("span",{className:j("ml-auto text-xs tracking-widest opacity-60",y),...q},void 0,!1,void 0,this)};P8.displayName="DropdownMenuShortcut";var Y0=w(W2(),1),f8=X0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Fy({className:y,variant:q,...z}){return Y0.jsxDEV("div",{className:j(f8({variant:q}),y),...z},void 0,!1,void 0,this)}
|
|
2
|
-
export{Xy as k,Yy as l,U8 as m,g8 as n,Fy as o};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{na as i1,oa as W0,qa as T0,ua as a1}from"/chunk-08yrv2nn.js";import{Aa as o,Ea as I0,Fa as uJ,Na as m1,Sa as g0}from"/chunk-p8qycd26.js";var w=o(I0(),1);var r0=["top","right","bottom","left"];var{min:r,max:v,round:j0,floor:B0}=Math,m=(J)=>({x:J,y:J}),IJ={left:"right",right:"left",bottom:"top",top:"bottom"};function k0(J,Q,G){return v(J,r(Q,G))}function s(J,Q){return typeof J==="function"?J(Q):J}function i(J){return J.split("-")[0]}function e(J){return J.split("-")[1]}function M0(J){return J==="x"?"y":"x"}function $0(J){return J==="y"?"height":"width"}function c(J){let Q=J[0];return Q==="t"||Q==="b"?"y":"x"}function N0(J){return M0(c(J))}function s0(J,Q,G){if(G===void 0)G=!1;let Z=e(J),q=N0(J),K=$0(q),U=q==="x"?Z===(G?"end":"start")?"right":"left":Z==="start"?"bottom":"top";if(Q.reference[K]>Q.floating[K])U=Y0(U);return[U,Y0(U)]}function i0(J){let Q=Y0(J);return[z0(J),Q,z0(Q)]}function z0(J){return J.includes("start")?J.replace("start","end"):J.replace("end","start")}var d0=["left","right"],l0=["right","left"],TJ=["top","bottom"],WJ=["bottom","top"];function FJ(J,Q,G){switch(J){case"top":case"bottom":if(G)return Q?l0:d0;return Q?d0:l0;case"left":case"right":return Q?TJ:WJ;default:return[]}}function a0(J,Q,G,Z){let q=e(J),K=FJ(i(J),G==="start",Z);if(q){if(K=K.map((U)=>U+"-"+q),Q)K=K.concat(K.map(z0))}return K}function Y0(J){let Q=i(J);return IJ[Q]+J.slice(Q.length)}function zJ(J){return{top:0,right:0,bottom:0,left:0,...J}}function O0(J){return typeof J!=="number"?zJ(J):{top:J,right:J,bottom:J,left:J}}function J0(J){let{x:Q,y:G,width:Z,height:q}=J;return{width:Z,height:q,top:G,left:Q,right:Q+Z,bottom:G+q,x:Q,y:G}}function n0(J,Q,G){let{reference:Z,floating:q}=J,K=c(Q),U=N0(Q),X=$0(U),V=i(Q),j=K==="y",Y=Z.x+Z.width/2-q.width/2,H=Z.y+Z.height/2-q.height/2,L=Z[X]/2-q[X]/2,B;switch(V){case"top":B={x:Y,y:Z.y-q.height};break;case"bottom":B={x:Y,y:Z.y+Z.height};break;case"right":B={x:Z.x+Z.width,y:H};break;case"left":B={x:Z.x-q.width,y:H};break;default:B={x:Z.x,y:Z.y}}switch(e(Q)){case"start":B[U]-=L*(G&&j?-1:1);break;case"end":B[U]+=L*(G&&j?-1:1);break}return B}async function e0(J,Q){var G;if(Q===void 0)Q={};let{x:Z,y:q,platform:K,rects:U,elements:X,strategy:V}=J,{boundary:j="clippingAncestors",rootBoundary:Y="viewport",elementContext:H="floating",altBoundary:L=!1,padding:B=0}=s(Q,J),I=O0(B),z=X[L?H==="floating"?"reference":"floating":H],W=J0(await K.getClippingRect({element:((G=await(K.isElement==null?void 0:K.isElement(z)))!=null?G:!0)?z:z.contextElement||await(K.getDocumentElement==null?void 0:K.getDocumentElement(X.floating)),boundary:j,rootBoundary:Y,strategy:V})),M=H==="floating"?{x:Z,y:q,width:U.floating.width,height:U.floating.height}:U.reference,k=await(K.getOffsetParent==null?void 0:K.getOffsetParent(X.floating)),F=await(K.isElement==null?void 0:K.isElement(k))?await(K.getScale==null?void 0:K.getScale(k))||{x:1,y:1}:{x:1,y:1},N=J0(K.convertOffsetParentRelativeRectToViewportRelativeRect?await K.convertOffsetParentRelativeRectToViewportRelativeRect({elements:X,rect:M,offsetParent:k,strategy:V}):M);return{top:(W.top-N.top+I.top)/F.y,bottom:(N.bottom-W.bottom+I.bottom)/F.y,left:(W.left-N.left+I.left)/F.x,right:(N.right-W.right+I.right)/F.x}}var kJ=50,J1=async(J,Q,G)=>{let{placement:Z="bottom",strategy:q="absolute",middleware:K=[],platform:U}=G,X=U.detectOverflow?U:{...U,detectOverflow:e0},V=await(U.isRTL==null?void 0:U.isRTL(Q)),j=await U.getElementRects({reference:J,floating:Q,strategy:q}),{x:Y,y:H}=n0(j,Z,V),L=Z,B=0,I={};for(let T=0;T<K.length;T++){let z=K[T];if(!z)continue;let{name:W,fn:M}=z,{x:k,y:F,data:N,reset:_}=await M({x:Y,y:H,initialPlacement:Z,placement:L,strategy:q,middlewareData:I,rects:j,platform:X,elements:{reference:J,floating:Q}});if(Y=k!=null?k:Y,H=F!=null?F:H,I[W]={...I[W],...N},_&&B<kJ){if(B++,typeof _==="object"){if(_.placement)L=_.placement;if(_.rects)j=_.rects===!0?await U.getElementRects({reference:J,floating:Q,strategy:q}):_.rects;({x:Y,y:H}=n0(j,L,V))}T=-1}}return{x:Y,y:H,placement:L,strategy:q,middlewareData:I}},Q1=(J)=>({name:"arrow",options:J,async fn(Q){let{x:G,y:Z,placement:q,rects:K,platform:U,elements:X,middlewareData:V}=Q,{element:j,padding:Y=0}=s(J,Q)||{};if(j==null)return{};let H=O0(Y),L={x:G,y:Z},B=N0(q),I=$0(B),T=await U.getDimensions(j),z=B==="y",W=z?"top":"left",M=z?"bottom":"right",k=z?"clientHeight":"clientWidth",F=K.reference[I]+K.reference[B]-L[B]-K.floating[I],N=L[B]-K.reference[B],_=await(U.getOffsetParent==null?void 0:U.getOffsetParent(j)),E=_?_[k]:0;if(!E||!await(U.isElement==null?void 0:U.isElement(_)))E=X.floating[k]||K.floating[I];let R=F/2-N/2,x=E/2-T[I]/2-1,O=r(H[W],x),P=r(H[M],x),h=O,y=E-T[I]-P,D=E/2-T[I]/2+R,g=k0(h,D,y),C=!V.arrow&&e(q)!=null&&D!==g&&K.reference[I]/2-(D<h?O:P)-T[I]/2<0,S=C?D<h?D-h:D-y:0;return{[B]:L[B]+S,data:{[B]:g,centerOffset:D-g-S,...C&&{alignmentOffset:S}},reset:C}}});var G1=function(J){if(J===void 0)J={};return{name:"flip",options:J,async fn(Q){var G,Z;let{placement:q,middlewareData:K,rects:U,initialPlacement:X,platform:V,elements:j}=Q,{mainAxis:Y=!0,crossAxis:H=!0,fallbackPlacements:L,fallbackStrategy:B="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:T=!0,...z}=s(J,Q);if((G=K.arrow)!=null&&G.alignmentOffset)return{};let W=i(q),M=c(X),k=i(X)===X,F=await(V.isRTL==null?void 0:V.isRTL(j.floating)),N=L||(k||!T?[Y0(X)]:i0(X)),_=I!=="none";if(!L&&_)N.push(...a0(X,T,I,F));let E=[X,...N],R=await V.detectOverflow(Q,z),x=[],O=((Z=K.flip)==null?void 0:Z.overflows)||[];if(Y)x.push(R[W]);if(H){let D=s0(q,U,F);x.push(R[D[0]],R[D[1]])}if(O=[...O,{placement:q,overflows:x}],!x.every((D)=>D<=0)){var P,h;let D=(((P=K.flip)==null?void 0:P.index)||0)+1,g=E[D];if(g){if(!(H==="alignment"?M!==c(g):!1)||O.every(($)=>c($.placement)===M?$.overflows[0]>0:!0))return{data:{index:D,overflows:O},reset:{placement:g}}}let C=(h=O.filter((S)=>S.overflows[0]<=0).sort((S,$)=>S.overflows[1]-$.overflows[1])[0])==null?void 0:h.placement;if(!C)switch(B){case"bestFit":{var y;let S=(y=O.filter(($)=>{if(_){let A=c($.placement);return A===M||A==="y"}return!0}).map(($)=>[$.placement,$.overflows.filter((A)=>A>0).reduce((A,l)=>A+l,0)]).sort(($,A)=>$[1]-A[1])[0])==null?void 0:y[0];if(S)C=S;break}case"initialPlacement":C=X;break}if(q!==C)return{reset:{placement:C}}}return{}}}};function o0(J,Q){return{top:J.top-Q.height,right:J.right-Q.width,bottom:J.bottom-Q.height,left:J.left-Q.width}}function t0(J){return r0.some((Q)=>J[Q]>=0)}var Z1=function(J){if(J===void 0)J={};return{name:"hide",options:J,async fn(Q){let{rects:G,platform:Z}=Q,{strategy:q="referenceHidden",...K}=s(J,Q);switch(q){case"referenceHidden":{let U=await Z.detectOverflow(Q,{...K,elementContext:"reference"}),X=o0(U,G.reference);return{data:{referenceHiddenOffsets:X,referenceHidden:t0(X)}}}case"escaped":{let U=await Z.detectOverflow(Q,{...K,altBoundary:!0}),X=o0(U,G.floating);return{data:{escapedOffsets:X,escaped:t0(X)}}}default:return{}}}}};var q1=new Set(["left","top"]);async function MJ(J,Q){let{placement:G,platform:Z,elements:q}=J,K=await(Z.isRTL==null?void 0:Z.isRTL(q.floating)),U=i(G),X=e(G),V=c(G)==="y",j=q1.has(U)?-1:1,Y=K&&V?-1:1,H=s(Q,J),{mainAxis:L,crossAxis:B,alignmentAxis:I}=typeof H==="number"?{mainAxis:H,crossAxis:0,alignmentAxis:null}:{mainAxis:H.mainAxis||0,crossAxis:H.crossAxis||0,alignmentAxis:H.alignmentAxis};if(X&&typeof I==="number")B=X==="end"?I*-1:I;return V?{x:B*Y,y:L*j}:{x:L*j,y:B*Y}}var K1=function(J){if(J===void 0)J=0;return{name:"offset",options:J,async fn(Q){var G,Z;let{x:q,y:K,placement:U,middlewareData:X}=Q,V=await MJ(Q,J);if(U===((G=X.offset)==null?void 0:G.placement)&&(Z=X.arrow)!=null&&Z.alignmentOffset)return{};return{x:q+V.x,y:K+V.y,data:{...V,placement:U}}}}},U1=function(J){if(J===void 0)J={};return{name:"shift",options:J,async fn(Q){let{x:G,y:Z,placement:q,platform:K}=Q,{mainAxis:U=!0,crossAxis:X=!1,limiter:V={fn:(W)=>{let{x:M,y:k}=W;return{x:M,y:k}}},...j}=s(J,Q),Y={x:G,y:Z},H=await K.detectOverflow(Q,j),L=c(i(q)),B=M0(L),I=Y[B],T=Y[L];if(U){let W=B==="y"?"top":"left",M=B==="y"?"bottom":"right",k=I+H[W],F=I-H[M];I=k0(k,I,F)}if(X){let W=L==="y"?"top":"left",M=L==="y"?"bottom":"right",k=T+H[W],F=T-H[M];T=k0(k,T,F)}let z=V.fn({...Q,[B]:I,[L]:T});return{...z,data:{x:z.x-G,y:z.y-Z,enabled:{[B]:U,[L]:X}}}}}},X1=function(J){if(J===void 0)J={};return{options:J,fn(Q){let{x:G,y:Z,placement:q,rects:K,middlewareData:U}=Q,{offset:X=0,mainAxis:V=!0,crossAxis:j=!0}=s(J,Q),Y={x:G,y:Z},H=c(q),L=M0(H),B=Y[L],I=Y[H],T=s(X,Q),z=typeof T==="number"?{mainAxis:T,crossAxis:0}:{mainAxis:0,crossAxis:0,...T};if(V){let k=L==="y"?"height":"width",F=K.reference[L]-K.floating[k]+z.mainAxis,N=K.reference[L]+K.reference[k]-z.mainAxis;if(B<F)B=F;else if(B>N)B=N}if(j){var W,M;let k=L==="y"?"width":"height",F=q1.has(i(q)),N=K.reference[H]-K.floating[k]+(F?((W=U.offset)==null?void 0:W[H])||0:0)+(F?0:z.crossAxis),_=K.reference[H]+K.reference[k]+(F?0:((M=U.offset)==null?void 0:M[H])||0)-(F?z.crossAxis:0);if(I<N)I=N;else if(I>_)I=_}return{[L]:B,[H]:I}}}},V1=function(J){if(J===void 0)J={};return{name:"size",options:J,async fn(Q){var G,Z;let{placement:q,rects:K,platform:U,elements:X}=Q,{apply:V=()=>{},...j}=s(J,Q),Y=await U.detectOverflow(Q,j),H=i(q),L=e(q),B=c(q)==="y",{width:I,height:T}=K.floating,z,W;if(H==="top"||H==="bottom")z=H,W=L===(await(U.isRTL==null?void 0:U.isRTL(X.floating))?"start":"end")?"left":"right";else W=H,z=L==="end"?"top":"bottom";let M=T-Y.top-Y.bottom,k=I-Y.left-Y.right,F=r(T-Y[z],M),N=r(I-Y[W],k),_=!Q.middlewareData.shift,E=F,R=N;if((G=Q.middlewareData.shift)!=null&&G.enabled.x)R=k;if((Z=Q.middlewareData.shift)!=null&&Z.enabled.y)E=M;if(_&&!L){let O=v(Y.left,0),P=v(Y.right,0),h=v(Y.top,0),y=v(Y.bottom,0);if(B)R=I-2*(O!==0||P!==0?O+P:v(Y.left,Y.right));else E=T-2*(h!==0||y!==0?h+y:v(Y.top,Y.bottom))}await V({...Q,availableWidth:R,availableHeight:E});let x=await U.getDimensions(X.floating);if(I!==x.width||T!==x.height)return{reset:{rects:!0}};return{}}}};function _0(){return typeof window<"u"}function Z0(J){if(j1(J))return(J.nodeName||"").toLowerCase();return"#document"}function u(J){var Q;return(J==null||(Q=J.ownerDocument)==null?void 0:Q.defaultView)||window}function d(J){var Q;return(Q=(j1(J)?J.ownerDocument:J.document)||window.document)==null?void 0:Q.documentElement}function j1(J){if(!_0())return!1;return J instanceof Node||J instanceof u(J).Node}function p(J){if(!_0())return!1;return J instanceof Element||J instanceof u(J).Element}function a(J){if(!_0())return!1;return J instanceof HTMLElement||J instanceof u(J).HTMLElement}function Y1(J){if(!_0()||typeof ShadowRoot>"u")return!1;return J instanceof ShadowRoot||J instanceof u(J).ShadowRoot}function U0(J){let{overflow:Q,overflowX:G,overflowY:Z,display:q}=f(J);return/auto|scroll|overlay|hidden|clip/.test(Q+Z+G)&&q!=="inline"&&q!=="contents"}function B1(J){return/^(table|td|th)$/.test(Z0(J))}function H0(J){try{if(J.matches(":popover-open"))return!0}catch(Q){}try{return J.matches(":modal")}catch(Q){return!1}}var $J=/transform|translate|scale|rotate|perspective|filter/,NJ=/paint|layout|strict|content/,Q0=(J)=>!!J&&J!=="none",R0;function E0(J){let Q=p(J)?f(J):J;return Q0(Q.transform)||Q0(Q.translate)||Q0(Q.scale)||Q0(Q.rotate)||Q0(Q.perspective)||!D0()&&(Q0(Q.backdropFilter)||Q0(Q.filter))||$J.test(Q.willChange||"")||NJ.test(Q.contain||"")}function H1(J){let Q=n(J);while(a(Q)&&!q0(Q)){if(E0(Q))return Q;else if(H0(Q))return null;Q=n(Q)}return null}function D0(){if(R0==null)R0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return R0}function q0(J){return/^(html|body|#document)$/.test(Z0(J))}function f(J){return u(J).getComputedStyle(J)}function L0(J){if(p(J))return{scrollLeft:J.scrollLeft,scrollTop:J.scrollTop};return{scrollLeft:J.scrollX,scrollTop:J.scrollY}}function n(J){if(Z0(J)==="html")return J;let Q=J.assignedSlot||J.parentNode||Y1(J)&&J.host||d(J);return Y1(Q)?Q.host:Q}function L1(J){let Q=n(J);if(q0(Q))return J.ownerDocument?J.ownerDocument.body:J.body;if(a(Q)&&U0(Q))return Q;return L1(Q)}function G0(J,Q,G){var Z;if(Q===void 0)Q=[];if(G===void 0)G=!0;let q=L1(J),K=q===((Z=J.ownerDocument)==null?void 0:Z.body),U=u(q);if(K){let X=b0(U);return Q.concat(U,U.visualViewport||[],U0(q)?q:[],X&&G?G0(X):[])}else return Q.concat(q,G0(q,[],G))}function b0(J){return J.parent&&Object.getPrototypeOf(J.parent)?J.frameElement:null}function F1(J){let Q=f(J),G=parseFloat(Q.width)||0,Z=parseFloat(Q.height)||0,q=a(J),K=q?J.offsetWidth:G,U=q?J.offsetHeight:Z,X=j0(G)!==K||j0(Z)!==U;if(X)G=K,Z=U;return{width:G,height:Z,$:X}}function P0(J){return!p(J)?J.contextElement:J}function X0(J){let Q=P0(J);if(!a(Q))return m(1);let G=Q.getBoundingClientRect(),{width:Z,height:q,$:K}=F1(Q),U=(K?j0(G.width):G.width)/Z,X=(K?j0(G.height):G.height)/q;if(!U||!Number.isFinite(U))U=1;if(!X||!Number.isFinite(X))X=1;return{x:U,y:X}}var _J=m(0);function z1(J){let Q=u(J);if(!D0()||!Q.visualViewport)return _J;return{x:Q.visualViewport.offsetLeft,y:Q.visualViewport.offsetTop}}function EJ(J,Q,G){if(Q===void 0)Q=!1;if(!G||Q&&G!==u(J))return!1;return Q}function K0(J,Q,G,Z){if(Q===void 0)Q=!1;if(G===void 0)G=!1;let q=J.getBoundingClientRect(),K=P0(J),U=m(1);if(Q)if(Z){if(p(Z))U=X0(Z)}else U=X0(J);let X=EJ(K,G,Z)?z1(K):m(0),V=(q.left+X.x)/U.x,j=(q.top+X.y)/U.y,Y=q.width/U.x,H=q.height/U.y;if(K){let L=u(K),B=Z&&p(Z)?u(Z):Z,I=L,T=b0(I);while(T&&Z&&B!==I){let z=X0(T),W=T.getBoundingClientRect(),M=f(T),k=W.left+(T.clientLeft+parseFloat(M.paddingLeft))*z.x,F=W.top+(T.clientTop+parseFloat(M.paddingTop))*z.y;V*=z.x,j*=z.y,Y*=z.x,H*=z.y,V+=k,j+=F,I=u(T),T=b0(I)}}return J0({width:Y,height:H,x:V,y:j})}function y0(J,Q){let G=L0(J).scrollLeft;if(!Q)return K0(d(J)).left+G;return Q.left+G}function k1(J,Q){let G=J.getBoundingClientRect(),Z=G.left+Q.scrollLeft-y0(J,G),q=G.top+Q.scrollTop;return{x:Z,y:q}}function DJ(J){let{elements:Q,rect:G,offsetParent:Z,strategy:q}=J,K=q==="fixed",U=d(Z),X=Q?H0(Q.floating):!1;if(Z===U||X&&K)return G;let V={scrollLeft:0,scrollTop:0},j=m(1),Y=m(0),H=a(Z);if(H||!H&&!K){if(Z0(Z)!=="body"||U0(U))V=L0(Z);if(H){let B=K0(Z);j=X0(Z),Y.x=B.x+Z.clientLeft,Y.y=B.y+Z.clientTop}}let L=U&&!H&&!K?k1(U,V):m(0);return{width:G.width*j.x,height:G.height*j.y,x:G.x*j.x-V.scrollLeft*j.x+Y.x+L.x,y:G.y*j.y-V.scrollTop*j.y+Y.y+L.y}}function bJ(J){return Array.from(J.getClientRects())}function yJ(J){let Q=d(J),G=L0(J),Z=J.ownerDocument.body,q=v(Q.scrollWidth,Q.clientWidth,Z.scrollWidth,Z.clientWidth),K=v(Q.scrollHeight,Q.clientHeight,Z.scrollHeight,Z.clientHeight),U=-G.scrollLeft+y0(J),X=-G.scrollTop;if(f(Z).direction==="rtl")U+=v(Q.clientWidth,Z.clientWidth)-q;return{width:q,height:K,x:U,y:X}}var I1=25;function CJ(J,Q){let G=u(J),Z=d(J),q=G.visualViewport,K=Z.clientWidth,U=Z.clientHeight,X=0,V=0;if(q){K=q.width,U=q.height;let Y=D0();if(!Y||Y&&Q==="fixed")X=q.offsetLeft,V=q.offsetTop}let j=y0(Z);if(j<=0){let Y=Z.ownerDocument,H=Y.body,L=getComputedStyle(H),B=Y.compatMode==="CSS1Compat"?parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0:0,I=Math.abs(Z.clientWidth-H.clientWidth-B);if(I<=I1)K-=I}else if(j<=I1)K+=j;return{width:K,height:U,x:X,y:V}}function SJ(J,Q){let G=K0(J,!0,Q==="fixed"),Z=G.top+J.clientTop,q=G.left+J.clientLeft,K=a(J)?X0(J):m(1),U=J.clientWidth*K.x,X=J.clientHeight*K.y,V=q*K.x,j=Z*K.y;return{width:U,height:X,x:V,y:j}}function T1(J,Q,G){let Z;if(Q==="viewport")Z=CJ(J,G);else if(Q==="document")Z=yJ(d(J));else if(p(Q))Z=SJ(Q,G);else{let q=z1(J);Z={x:Q.x-q.x,y:Q.y-q.y,width:Q.width,height:Q.height}}return J0(Z)}function M1(J,Q){let G=n(J);if(G===Q||!p(G)||q0(G))return!1;return f(G).position==="fixed"||M1(G,Q)}function OJ(J,Q){let G=Q.get(J);if(G)return G;let Z=G0(J,[],!1).filter((X)=>p(X)&&Z0(X)!=="body"),q=null,K=f(J).position==="fixed",U=K?n(J):J;while(p(U)&&!q0(U)){let X=f(U),V=E0(U);if(!V&&X.position==="fixed")q=null;if(K?!V&&!q:!V&&X.position==="static"&&!!q&&(q.position==="absolute"||q.position==="fixed")||U0(U)&&!V&&M1(J,U))Z=Z.filter((Y)=>Y!==U);else q=X;U=n(U)}return Q.set(J,Z),Z}function RJ(J){let{element:Q,boundary:G,rootBoundary:Z,strategy:q}=J,U=[...G==="clippingAncestors"?H0(Q)?[]:OJ(Q,this._c):[].concat(G),Z],X=T1(Q,U[0],q),V=X.top,j=X.right,Y=X.bottom,H=X.left;for(let L=1;L<U.length;L++){let B=T1(Q,U[L],q);V=v(B.top,V),j=r(B.right,j),Y=r(B.bottom,Y),H=v(B.left,H)}return{width:j-H,height:Y-V,x:H,y:V}}function AJ(J){let{width:Q,height:G}=F1(J);return{width:Q,height:G}}function PJ(J,Q,G){let Z=a(Q),q=d(Q),K=G==="fixed",U=K0(J,!0,K,Q),X={scrollLeft:0,scrollTop:0},V=m(0);function j(){V.x=y0(q)}if(Z||!Z&&!K){if(Z0(Q)!=="body"||U0(q))X=L0(Q);if(Z){let B=K0(Q,!0,K,Q);V.x=B.x+Q.clientLeft,V.y=B.y+Q.clientTop}else if(q)j()}if(K&&!Z&&q)j();let Y=q&&!Z&&!K?k1(q,X):m(0),H=U.left+X.scrollLeft-V.x-Y.x,L=U.top+X.scrollTop-V.y-Y.y;return{x:H,y:L,width:U.width,height:U.height}}function A0(J){return f(J).position==="static"}function W1(J,Q){if(!a(J)||f(J).position==="fixed")return null;if(Q)return Q(J);let G=J.offsetParent;if(d(J)===G)G=G.ownerDocument.body;return G}function $1(J,Q){let G=u(J);if(H0(J))return G;if(!a(J)){let q=n(J);while(q&&!q0(q)){if(p(q)&&!A0(q))return q;q=n(q)}return G}let Z=W1(J,Q);while(Z&&B1(Z)&&A0(Z))Z=W1(Z,Q);if(Z&&q0(Z)&&A0(Z)&&!E0(Z))return G;return Z||H1(J)||G}var hJ=async function(J){let Q=this.getOffsetParent||$1,G=this.getDimensions,Z=await G(J.floating);return{reference:PJ(J.reference,await Q(J.floating),J.strategy),floating:{x:0,y:0,width:Z.width,height:Z.height}}};function vJ(J){return f(J).direction==="rtl"}var N1={convertOffsetParentRelativeRectToViewportRelativeRect:DJ,getDocumentElement:d,getClippingRect:RJ,getOffsetParent:$1,getElementRects:hJ,getClientRects:bJ,getDimensions:AJ,getScale:X0,isElement:p,isRTL:vJ};function _1(J,Q){return J.x===Q.x&&J.y===Q.y&&J.width===Q.width&&J.height===Q.height}function xJ(J,Q){let G=null,Z,q=d(J);function K(){var X;clearTimeout(Z),(X=G)==null||X.disconnect(),G=null}function U(X,V){if(X===void 0)X=!1;if(V===void 0)V=1;K();let j=J.getBoundingClientRect(),{left:Y,top:H,width:L,height:B}=j;if(!X)Q();if(!L||!B)return;let I=B0(H),T=B0(q.clientWidth-(Y+L)),z=B0(q.clientHeight-(H+B)),W=B0(Y),k={rootMargin:-I+"px "+-T+"px "+-z+"px "+-W+"px",threshold:v(0,r(1,V))||1},F=!0;function N(_){let E=_[0].intersectionRatio;if(E!==V){if(!F)return U();if(!E)Z=setTimeout(()=>{U(!1,0.0000001)},1000);else U(!1,E)}if(E===1&&!_1(j,J.getBoundingClientRect()))U();F=!1}try{G=new IntersectionObserver(N,{...k,root:q.ownerDocument})}catch(_){G=new IntersectionObserver(N,k)}G.observe(J)}return U(!0),K}function h0(J,Q,G,Z){if(Z===void 0)Z={};let{ancestorScroll:q=!0,ancestorResize:K=!0,elementResize:U=typeof ResizeObserver==="function",layoutShift:X=typeof IntersectionObserver==="function",animationFrame:V=!1}=Z,j=P0(J),Y=q||K?[...j?G0(j):[],...Q?G0(Q):[]]:[];Y.forEach((W)=>{q&&W.addEventListener("scroll",G,{passive:!0}),K&&W.addEventListener("resize",G)});let H=j&&X?xJ(j,G):null,L=-1,B=null;if(U){if(B=new ResizeObserver((W)=>{let[M]=W;if(M&&M.target===j&&B&&Q)B.unobserve(Q),cancelAnimationFrame(L),L=requestAnimationFrame(()=>{var k;(k=B)==null||k.observe(Q)});G()}),j&&!V)B.observe(j);if(Q)B.observe(Q)}let I,T=V?K0(J):null;if(V)z();function z(){let W=K0(J);if(T&&!_1(T,W))G();T=W,I=requestAnimationFrame(z)}return G(),()=>{var W;if(Y.forEach((M)=>{q&&M.removeEventListener("scroll",G),K&&M.removeEventListener("resize",G)}),H==null||H(),(W=B)==null||W.disconnect(),B=null,V)cancelAnimationFrame(I)}}var E1=K1;var D1=U1,b1=G1,y1=V1,C1=Z1,v0=Q1;var S1=X1,x0=(J,Q,G)=>{let Z=new Map,q={platform:N1,...G},K={...q.platform,_c:Z};return J1(J,Q,{...q,platform:K})};var b=o(I0(),1),R1=o(I0(),1),A1=o(uJ(),1),wJ=typeof document<"u",gJ=function(){},C0=wJ?R1.useLayoutEffect:gJ;function S0(J,Q){if(J===Q)return!0;if(typeof J!==typeof Q)return!1;if(typeof J==="function"&&J.toString()===Q.toString())return!0;let G,Z,q;if(J&&Q&&typeof J==="object"){if(Array.isArray(J)){if(G=J.length,G!==Q.length)return!1;for(Z=G;Z--!==0;)if(!S0(J[Z],Q[Z]))return!1;return!0}if(q=Object.keys(J),G=q.length,G!==Object.keys(Q).length)return!1;for(Z=G;Z--!==0;)if(!{}.hasOwnProperty.call(Q,q[Z]))return!1;for(Z=G;Z--!==0;){let K=q[Z];if(K==="_owner"&&J.$$typeof)continue;if(!S0(J[K],Q[K]))return!1}return!0}return J!==J&&Q!==Q}function P1(J){if(typeof window>"u")return 1;return(J.ownerDocument.defaultView||window).devicePixelRatio||1}function O1(J,Q){let G=P1(J);return Math.round(Q*G)/G}function u0(J){let Q=b.useRef(J);return C0(()=>{Q.current=J}),Q}function h1(J){if(J===void 0)J={};let{placement:Q="bottom",strategy:G="absolute",middleware:Z=[],platform:q,elements:{reference:K,floating:U}={},transform:X=!0,whileElementsMounted:V,open:j}=J,[Y,H]=b.useState({x:0,y:0,strategy:G,placement:Q,middlewareData:{},isPositioned:!1}),[L,B]=b.useState(Z);if(!S0(L,Z))B(Z);let[I,T]=b.useState(null),[z,W]=b.useState(null),M=b.useCallback(($)=>{if($!==_.current)_.current=$,T($)},[]),k=b.useCallback(($)=>{if($!==E.current)E.current=$,W($)},[]),F=K||I,N=U||z,_=b.useRef(null),E=b.useRef(null),R=b.useRef(Y),x=V!=null,O=u0(V),P=u0(q),h=u0(j),y=b.useCallback(()=>{if(!_.current||!E.current)return;let $={placement:Q,strategy:G,middleware:L};if(P.current)$.platform=P.current;x0(_.current,E.current,$).then((A)=>{let l={...A,isPositioned:h.current!==!1};if(D.current&&!S0(R.current,l))R.current=l,A1.flushSync(()=>{H(l)})})},[L,Q,G,P,h]);C0(()=>{if(j===!1&&R.current.isPositioned)R.current.isPositioned=!1,H(($)=>({...$,isPositioned:!1}))},[j]);let D=b.useRef(!1);C0(()=>{return D.current=!0,()=>{D.current=!1}},[]),C0(()=>{if(F)_.current=F;if(N)E.current=N;if(F&&N){if(O.current)return O.current(F,N,y);y()}},[F,N,y,O,x]);let g=b.useMemo(()=>({reference:_,floating:E,setReference:M,setFloating:k}),[M,k]),C=b.useMemo(()=>({reference:F,floating:N}),[F,N]),S=b.useMemo(()=>{let $={position:G,left:0,top:0};if(!C.floating)return $;let A=O1(C.floating,Y.x),l=O1(C.floating,Y.y);if(X)return{...$,transform:"translate("+A+"px, "+l+"px)",...P1(C.floating)>=1.5&&{willChange:"transform"}};return{position:G,left:A,top:l}},[G,X,C.floating,Y.x,Y.y]);return b.useMemo(()=>({...Y,update:y,refs:g,elements:C,floatingStyles:S}),[Y,y,g,C,S])}var pJ=(J)=>{function Q(G){return{}.hasOwnProperty.call(G,"current")}return{name:"arrow",options:J,fn(G){let{element:Z,padding:q}=typeof J==="function"?J(G):J;if(Z&&Q(Z)){if(Z.current!=null)return v0({element:Z.current,padding:q}).fn(G);return{}}if(Z)return v0({element:Z,padding:q}).fn(G);return{}}}},v1=(J,Q)=>{let G=E1(J);return{name:G.name,fn:G.fn,options:[J,Q]}},x1=(J,Q)=>{let G=D1(J);return{name:G.name,fn:G.fn,options:[J,Q]}},u1=(J,Q)=>{return{fn:S1(J).fn,options:[J,Q]}},w1=(J,Q)=>{let G=b1(J);return{name:G.name,fn:G.fn,options:[J,Q]}},g1=(J,Q)=>{let G=y1(J);return{name:G.name,fn:G.fn,options:[J,Q]}};var p1=(J,Q)=>{let G=C1(J);return{name:G.name,fn:G.fn,options:[J,Q]}};var f1=(J,Q)=>{let G=pJ(J);return{name:G.name,fn:G.fn,options:[J,Q]}};var c1=o(I0(),1);var w0=o(m1(),1),fJ="Arrow",d1=c1.forwardRef((J,Q)=>{let{children:G,width:Z=10,height:q=5,...K}=J;return w0.jsx(T0.svg,{...K,ref:Q,width:Z,height:q,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:J.asChild?G:w0.jsx("polygon",{points:"0,0 30,0 15,10"})})});d1.displayName=fJ;var l1=d1;var r1=o(I0(),1);function s1(J){let[Q,G]=r1.useState(void 0);return W0(()=>{if(J){G({width:J.offsetWidth,height:J.offsetHeight});let Z=new ResizeObserver((q)=>{if(!Array.isArray(q))return;if(!q.length)return;let K=q[0],U,X;if("borderBoxSize"in K){let V=K.borderBoxSize,j=Array.isArray(V)?V[0]:V;U=j.inlineSize,X=j.blockSize}else U=J.offsetWidth,X=J.offsetHeight;G({width:U,height:X})});return Z.observe(J,{box:"border-box"}),()=>Z.unobserve(J)}else G(void 0)},[J]),Q}var t=o(m1(),1);var p0="Popper",[n1,_Q]=i1(p0),[cJ,o1]=n1(p0),t1=(J)=>{let{__scopePopper:Q,children:G}=J,[Z,q]=w.useState(null);return t.jsx(cJ,{scope:Q,anchor:Z,onAnchorChange:q,children:G})};t1.displayName=p0;var e1="PopperAnchor",JJ=w.forwardRef((J,Q)=>{let{__scopePopper:G,virtualRef:Z,...q}=J,K=o1(e1,G),U=w.useRef(null),X=g0(Q,U),V=w.useRef(null);return w.useEffect(()=>{let j=V.current;if(V.current=Z?.current||U.current,j!==V.current)K.onAnchorChange(V.current)}),Z?null:t.jsx(T0.div,{...q,ref:X})});JJ.displayName=e1;var f0="PopperContent",[dJ,lJ]=n1(f0),QJ=w.forwardRef((J,Q)=>{let{__scopePopper:G,side:Z="bottom",sideOffset:q=0,align:K="center",alignOffset:U=0,arrowPadding:X=0,avoidCollisions:V=!0,collisionBoundary:j=[],collisionPadding:Y=0,sticky:H="partial",hideWhenDetached:L=!1,updatePositionStrategy:B="optimized",onPlaced:I,...T}=J,z=o1(f0,G),[W,M]=w.useState(null),k=g0(Q,(V0)=>M(V0)),[F,N]=w.useState(null),_=s1(F),E=_?.width??0,R=_?.height??0,x=Z+(K!=="center"?"-"+K:""),O=typeof Y==="number"?Y:{top:0,right:0,bottom:0,left:0,...Y},P=Array.isArray(j)?j:[j],h=P.length>0,y={padding:O,boundary:P.filter(sJ),altBoundary:h},{refs:D,floatingStyles:g,placement:C,isPositioned:S,middlewareData:$}=h1({strategy:"fixed",placement:x,whileElementsMounted:(...V0)=>{return h0(...V0,{animationFrame:B==="always"})},elements:{reference:z.anchor},middleware:[v1({mainAxis:q+R,alignmentAxis:U}),V&&x1({mainAxis:!0,crossAxis:!1,limiter:H==="partial"?u1():void 0,...y}),V&&w1({...y}),g1({...y,apply:({elements:V0,rects:c0,availableWidth:jJ,availableHeight:BJ})=>{let{width:HJ,height:LJ}=c0.reference,F0=V0.floating.style;F0.setProperty("--radix-popper-available-width",`${jJ}px`),F0.setProperty("--radix-popper-available-height",`${BJ}px`),F0.setProperty("--radix-popper-anchor-width",`${HJ}px`),F0.setProperty("--radix-popper-anchor-height",`${LJ}px`)}}),F&&f1({element:F,padding:X}),iJ({arrowWidth:E,arrowHeight:R}),L&&p1({strategy:"referenceHidden",...y})]}),[A,l]=qJ(C),m0=a1(I);W0(()=>{if(S)m0?.()},[S,m0]);let KJ=$.arrow?.x,UJ=$.arrow?.y,XJ=$.arrow?.centerOffset!==0,[VJ,YJ]=w.useState();return W0(()=>{if(W)YJ(window.getComputedStyle(W).zIndex)},[W]),t.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...g,transform:S?g.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:VJ,["--radix-popper-transform-origin"]:[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:J.dir,children:t.jsx(dJ,{scope:G,placedSide:A,onArrowChange:N,arrowX:KJ,arrowY:UJ,shouldHideArrow:XJ,children:t.jsx(T0.div,{"data-side":A,"data-align":l,...T,ref:k,style:{...T.style,animation:!S?"none":void 0}})})})});QJ.displayName=f0;var GJ="PopperArrow",rJ={top:"bottom",right:"left",bottom:"top",left:"right"},ZJ=w.forwardRef(function(Q,G){let{__scopePopper:Z,...q}=Q,K=lJ(GJ,Z),U=rJ[K.placedSide];return t.jsx("span",{ref:K.onArrowChange,style:{position:"absolute",left:K.arrowX,top:K.arrowY,[U]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[K.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[K.placedSide],visibility:K.shouldHideArrow?"hidden":void 0},children:t.jsx(l1,{...q,ref:G,style:{...q.style,display:"block"}})})});ZJ.displayName=GJ;function sJ(J){return J!==null}var iJ=(J)=>({name:"transformOrigin",options:J,fn(Q){let{placement:G,rects:Z,middlewareData:q}=Q,U=q.arrow?.centerOffset!==0,X=U?0:J.arrowWidth,V=U?0:J.arrowHeight,[j,Y]=qJ(G),H={start:"0%",center:"50%",end:"100%"}[Y],L=(q.arrow?.x??0)+X/2,B=(q.arrow?.y??0)+V/2,I="",T="";if(j==="bottom")I=U?H:`${L}px`,T=`${-V}px`;else if(j==="top")I=U?H:`${L}px`,T=`${Z.floating.height+V}px`;else if(j==="right")I=`${-V}px`,T=U?H:`${B}px`;else if(j==="left")I=`${Z.floating.width+V}px`,T=U?H:`${B}px`;return{data:{x:I,y:T}}}});function qJ(J){let[Q,G="center"]=J.split("-");return[Q,G]}var EQ=t1,DQ=JJ,bQ=QJ,yQ=ZJ;
|
|
2
|
-
export{_Q as C,EQ as D,DQ as E,bQ as F,yQ as G};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as T,B as c,x as R,y as w,z as L}from"/chunk-080ent60.js";import{H}from"/chunk-vp3by99k.js";import{K as r}from"/chunk-sxzad3y5.js";import{$ as I,_,aa as B,ba as U,ca as z,da as M}from"/chunk-jenng4z6.js";import{ka as i}from"/chunk-4ny2qr6s.js";import{Aa as d,Ea as W,Qa as N,Xa as m}from"/chunk-p8qycd26.js";var n=d(W(),1);var e=d(N(),1),A=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;function X({open:G,title:p,agent:a,onSave:k,onClose:l}){let[o,u]=n.useState(""),[g,v]=n.useState(""),[y,h]=n.useState(""),[f,S]=n.useState(""),[b,C]=n.useState("claude_code"),s=o===""||A.test(o);return n.useEffect(()=>{u(a?.name||""),v(a?.description||""),h(a?.model||""),S(a?.systemPrompt||""),C(a?.harness||"claude_code")},[a]),e.jsxDEV(_,{open:G,onOpenChange:(t)=>{if(!t)l()},children:e.jsxDEV(I,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxDEV(B,{children:[e.jsxDEV(z,{children:p},void 0,!1,void 0,this),e.jsxDEV(M,{children:p==="New Agent"?"Create a new agent to get started.":"Update the agent details."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("form",{onSubmit:(t)=>{if(t.preventDefault(),!A.test(o))return;let F=Boolean(a?.id),O=F?"update-agent":"create-agent",P={name:o,description:g||void 0,harness:b,model:y||void 0,systemPrompt:f||void 0};if(F)P.id=a.id;k(O,P),l()},className:"space-y-4",children:[e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(r,{htmlFor:"name",children:"Name"},void 0,!1,void 0,this),e.jsxDEV(i,{id:"name",value:o,onChange:(t)=>u(t.target.value.toLowerCase()),placeholder:"my-agent","aria-describedby":o&&!s?"name-error":void 0,"aria-invalid":o!==""&&!s},void 0,!1,void 0,this),o&&!s&&e.jsxDEV("p",{id:"name-error",className:"text-sm text-destructive",children:"Use lowercase letters, numbers, and hyphens only. Must start and end with a letter or number."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(r,{htmlFor:"description",children:"Description"},void 0,!1,void 0,this),e.jsxDEV(i,{id:"description",value:g,onChange:(t)=>v(t.target.value),placeholder:"What does this agent do?"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(r,{htmlFor:"harness",children:"Harness"},void 0,!1,void 0,this),e.jsxDEV(R,{value:b,onValueChange:(t)=>{if(t==="claude_code"||t==="pi")C(t)},children:[e.jsxDEV(L,{children:e.jsxDEV(w,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),e.jsxDEV(T,{children:[e.jsxDEV(c,{value:"claude_code",children:"Claude Code"},void 0,!1,void 0,this),e.jsxDEV(c,{value:"pi",children:"Pi"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(r,{htmlFor:"model",children:"Model"},void 0,!1,void 0,this),e.jsxDEV(i,{id:"model",value:y,onChange:(t)=>h(t.target.value),placeholder:"e.g. claude-sonnet-4-6"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV(r,{htmlFor:"system_prompt",children:"System Prompt"},void 0,!1,void 0,this),e.jsxDEV(H,{id:"system_prompt",value:f,onChange:(t)=>S(t.target.value),placeholder:"Instructions for the agent...",rows:4},void 0,!1,void 0,this)]},void 0,!0,void 0,this),e.jsxDEV(U,{children:[e.jsxDEV(m,{type:"button",variant:"outline",onClick:l,children:"Cancel"},void 0,!1,void 0,this),e.jsxDEV(m,{type:"submit",children:"Save Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}
|
|
2
|
-
export{X as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Aa as e,Ea as d,Qa as t,Va as o}from"/chunk-p8qycd26.js";var r=e(d(),1);var n=e(t(),1),p=r.forwardRef(({className:i,type:l,...s},a)=>{return n.jsxDEV("input",{type:l,className:o("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",i),ref:a,...s},void 0,!1,void 0,this)});p.displayName="Input";
|
|
2
|
-
export{p as ka};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Aa as P,Ea as Q}from"/chunk-p8qycd26.js";var z=P(Q(),1),F=1000,U=30000;class G{ws=null;handlers=new Map;pendingSubscriptions=new Set;reconnectTimer=null;url;retryMs=F;_connectionState="disconnected";stateListeners=new Set;intentionalClose=!1;constructor(){let j=window.location.protocol==="https:"?"wss:":"ws:";this.url=`${j}//${window.location.host}/ws`}get connectionState(){return this._connectionState}setConnectionState(j){if(this._connectionState===j)return;this._connectionState=j;for(let m of this.stateListeners)m()}onStateChange(j){return this.stateListeners.add(j),()=>{this.stateListeners.delete(j)}}connect(){if(this.ws?.readyState===WebSocket.OPEN)return;this.setConnectionState("connecting"),this.ws=new WebSocket(this.url),this.ws.onopen=()=>{this.retryMs=F,this.setConnectionState("connected");for(let j of this.handlers.keys())this.send({type:"subscribe",topic:j});for(let j of this.pendingSubscriptions)this.send({type:"subscribe",topic:j}),this.pendingSubscriptions.delete(j)},this.ws.onmessage=(j)=>{let m;try{m=JSON.parse(j.data)}catch{return}let q=this.handlers.get(m.topic);if(q)for(let D of q)D(m)},this.ws.onclose=()=>{if(this.intentionalClose){this.intentionalClose=!1;return}this.setConnectionState("disconnected"),this.reconnectTimer=setTimeout(()=>this.connect(),this.retryMs),this.retryMs=Math.min(this.retryMs*2,U)}}subscribe(j,m){let q=this.handlers.get(j);if(!q)if(q=new Set,this.handlers.set(j,q),this.ws?.readyState===WebSocket.OPEN)this.send({type:"subscribe",topic:j});else this.pendingSubscriptions.add(j);return q.add(m),()=>{if(q.delete(m),q.size===0){if(this.handlers.delete(j),this.ws?.readyState===WebSocket.OPEN)this.send({type:"unsubscribe",topic:j})}}}send(j){if(this.ws?.readyState===WebSocket.OPEN)this.ws.send(JSON.stringify(j))}disconnect(){if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.intentionalClose=!0,this.ws?.close(),this.ws=null,this.setConnectionState("disconnected")}}var B=null;function J(){if(!B)B=new G,B.connect();return B}function Z(j,m){let q=z.useRef(m);z.useEffect(()=>{q.current=m}),z.useEffect(()=>{if(!j)return;return J().subscribe(j,(O)=>{q.current(O)})},[j])}function $(){let j=J();return z.useSyncExternalStore((m)=>j.onStateChange(m),()=>j.connectionState)}
|
|
2
|
-
export{Z as I,$ as J};
|