@datawire-ai/busyfile-design-library 1.29.3 → 1.29.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.
@@ -178,7 +178,7 @@ React keys must be passed directly to JSX without using spread:
178
178
 
179
179
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
180
180
 
181
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lm="DialogDescriptionWarning",cm=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$s(lm).contentName}}.`;return u.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Bs=Es,dm=Ms,zs=Ts,Vs=Ps,Ys=Ds,um=As,fm=Is,Hs=Fs;function mm({...e}){return c.jsx(Bs,{"data-slot":"dialog",...e})}function hm({...e}){return c.jsx(dm,{"data-slot":"dialog-trigger",...e})}function Gs({...e}){return c.jsx(zs,{"data-slot":"dialog-portal",...e})}function pm({...e}){return c.jsx(Hs,{"data-slot":"dialog-close",...e})}function Us({className:e,...t}){return c.jsx(Vs,{"data-slot":"dialog-overlay",className:N("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function gm({className:e,children:t,showCloseButton:n=!0,...r}){return c.jsxs(Gs,{"data-slot":"dialog-portal",children:[c.jsx(Us,{}),c.jsxs(Ys,{"data-slot":"dialog-content",className:N("bg-background bg-white 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-none p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&c.jsxs(Hs,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[c.jsx(es,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function bm({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-header",className:N("flex flex-col gap-2 text-center sm:text-left",e),...t})}function vm({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-footer",className:N("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function xm({className:e,...t}){return c.jsx(um,{"data-slot":"dialog-title",className:N("text-lg leading-none font-semibold ",e),...t})}function ym({className:e,...t}){return c.jsx(fm,{"data-slot":"dialog-description",className:N("text-muted-foreground text-sm",e),...t})}const wm=ge("inline-flex items-center justify-center rounded-full font-medium w-fit whitespace-nowrap shrink-0 gap-1 text-sm",{variants:{variant:{primary:"bg-tag-light-blue text-tag-dark-blue border-tag-light-blue",neutral:"bg-tag-light-gray text-tag-dark-gray border-tag-light-gray",warning:"bg-tag-light-brown text-tag-dark-brown border-tag-stroke-warning-border",success:"bg-tag-light-green text-tag-dark-green border-tag-stroke-success-border",error:"bg-tag-light-red-light text-tag-dark-red-dark border-tag-stroke-error-border",secondary:"bg-tag-light-ice-blue text-tag-dark-ice-blue border-tag-stroke-dark-border"},type:{filled:"border-0",outline:"border bg-transparent"},size:{md:"px-3 py-0.5 text-sm"}},defaultVariants:{variant:"primary",type:"filled",size:"md"}}),Rr=u.forwardRef(({className:e,variant:t,type:n="filled",asChild:r=!1,children:o,...a},s)=>{const i=r?Ge:"span";return c.jsx(i,{ref:s,"data-slot":"badge",className:N(wm({variant:t,type:n}),n==="outline"?"bg-transparent":"",e),...a,children:o})});Rr.displayName="Badge";const km=["top","right","bottom","left"],nt=Math.min,Ne=Math.max,Ln=Math.round,$n=Math.floor,Le=e=>({x:e,y:e}),Sm={left:"right",right:"left",bottom:"top",top:"bottom"},Cm={start:"end",end:"start"};function Ir(e,t,n){return Ne(e,nt(t,n))}function Ke(e,t){return typeof e=="function"?e(t):e}function Xe(e){return e.split("-")[0]}function Tt(e){return e.split("-")[1]}function Wr(e){return e==="x"?"y":"x"}function Fr(e){return e==="y"?"height":"width"}const Nm=new Set(["top","bottom"]);function $e(e){return Nm.has(Xe(e))?"y":"x"}function Lr(e){return Wr($e(e))}function Em(e,t,n){n===void 0&&(n=!1);const r=Tt(e),o=Lr(e),a=Fr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function _m(e){const t=Bn(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>Cm[t])}const qs=["left","right"],Ks=["right","left"],Mm=["top","bottom"],Om=["bottom","top"];function Tm(e,t,n){switch(e){case"top":case"bottom":return n?t?Ks:qs:t?qs:Ks;case"left":case"right":return t?Mm:Om;default:return[]}}function Pm(e,t,n,r){const o=Tt(e);let a=Tm(Xe(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map($r)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Sm[t])}function Dm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xs(e){return typeof e!="number"?Dm(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zs(e,t,n){let{reference:r,floating:o}=e;const a=$e(t),s=Lr(t),i=Fr(s),l=Xe(t),d=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(Tt(t)){case"start":g[s]-=p*(n&&d?-1:1);break;case"end":g[s]+=p*(n&&d?-1:1);break}return g}const jm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Zs(d,r,l),p=r,g={},b=0;for(let h=0;h<i.length;h++){const{name:v,fn:x}=i[h],{x:y,y:w,data:S,reset:k}=await x({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=y??f,m=w??m,g={...g,[v]:{...g[v],...S}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:m}=Zs(d,p,l)),h=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:g}};async function Xt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:p=!1,padding:g=0}=Ke(t,e),b=Xs(g),v=i[p?m==="floating"?"reference":"floating":m],x=zn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:l})),y=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},k=zn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:l}):y);return{top:(x.top-k.top+b.top)/S.y,bottom:(k.bottom-x.bottom+b.bottom)/S.y,left:(x.left-k.left+b.left)/S.x,right:(k.right-x.right+b.right)/S.x}}const Am=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:d,padding:f=0}=Ke(e,t)||{};if(d==null)return{};const m=Xs(f),p={x:n,y:r},g=Lr(o),b=Fr(g),h=await s.getDimensions(d),v=g==="y",x=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[g]-p[g]-a.floating[b],k=p[g]-a.reference[g],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let C=_?_[w]:0;(!C||!await(s.isElement==null?void 0:s.isElement(_)))&&(C=i.floating[w]||a.floating[b]);const E=S/2-k/2,F=C/2-h[b]/2-1,Y=nt(m[x],F),R=nt(m[y],F),z=Y,K=C-h[b]-R,H=C/2-h[b]/2+E,Z=Ir(z,H,K),B=!l.arrow&&Tt(o)!=null&&H!==Z&&a.reference[b]/2-(H<z?Y:R)-h[b]/2<0,Q=B?H<z?H-z:H-K:0;return{[g]:p[g]+Q,data:{[g]:Z,centerOffset:H-Z-Q,...B&&{alignmentOffset:Q}},reset:B}}}),Rm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...v}=Ke(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Xe(o),y=$e(i),w=Xe(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),k=p||(w||!h?[Bn(i)]:_m(i)),_=b!=="none";!p&&_&&k.push(...Pm(i,h,b,S));const C=[i,...k],E=await Xt(t,v),F=[];let Y=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&F.push(E[x]),m){const H=Em(o,s,S);F.push(E[H[0]],E[H[1]])}if(Y=[...Y,{placement:o,overflows:F}],!F.every(H=>H<=0)){var R,z;const H=(((R=a.flip)==null?void 0:R.index)||0)+1,Z=C[H];if(Z&&(!(m==="alignment"?y!==$e(Z):!1)||Y.every(P=>$e(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:H,overflows:Y},reset:{placement:Z}};let B=(z=Y.filter(Q=>Q.overflows[0]<=0).sort((Q,P)=>Q.overflows[1]-P.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(g){case"bestFit":{var K;const Q=(K=Y.filter(P=>{if(_){const te=$e(P.placement);return te===y||te==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(te=>te>0).reduce((te,T)=>te+T,0)]).sort((P,te)=>P[1]-te[1])[0])==null?void 0:K[0];Q&&(B=Q);break}case"initialPlacement":B=i;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Js(e){return km.some(t=>e[t]>=0)}const Im=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ke(e,t);switch(r){case"referenceHidden":{const a=await Xt(t,{...o,elementContext:"reference"}),s=Qs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Js(s)}}}case"escaped":{const a=await Xt(t,{...o,altBoundary:!0}),s=Qs(a,n.floating);return{data:{escapedOffsets:s,escaped:Js(s)}}}default:return{}}}}},ei=new Set(["left","top"]);async function Wm(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xe(n),i=Tt(n),l=$e(n)==="y",d=ei.has(s)?-1:1,f=a&&l?-1:1,m=Ke(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const Fm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Wm(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Lm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:v=>{let{x,y}=v;return{x,y}}},...l}=Ke(e,t),d={x:n,y:r},f=await Xt(t,l),m=$e(Xe(o)),p=Wr(m);let g=d[p],b=d[m];if(a){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",y=g+f[v],w=g-f[x];g=Ir(y,g,w)}if(s){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=b+f[v],w=b-f[x];b=Ir(y,b,w)}const h=i.fn({...t,[p]:g,[m]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:a,[m]:s}}}}}},$m=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Ke(e,t),f={x:n,y:r},m=$e(o),p=Wr(m);let g=f[p],b=f[m];const h=Ke(i,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,k=a.reference[p]+a.reference[w]-v.mainAxis;g<S?g=S:g>k&&(g=k)}if(d){var x,y;const w=p==="y"?"width":"height",S=ei.has(Xe(o)),k=a.reference[m]-a.floating[w]+(S&&((x=s.offset)==null?void 0:x[m])||0)+(S?0:v.crossAxis),_=a.reference[m]+a.reference[w]+(S?0:((y=s.offset)==null?void 0:y[m])||0)-(S?v.crossAxis:0);b<k?b=k:b>_&&(b=_)}return{[p]:g,[m]:b}}}},Bm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...d}=Ke(e,t),f=await Xt(t,d),m=Xe(o),p=Tt(o),g=$e(o)==="y",{width:b,height:h}=a.floating;let v,x;m==="top"||m==="bottom"?(v=m,x=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=m,v=p==="end"?"top":"bottom");const y=h-f.top-f.bottom,w=b-f.left-f.right,S=nt(h-f[v],y),k=nt(b-f[x],w),_=!t.middlewareData.shift;let C=S,E=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),_&&!p){const Y=Ne(f.left,0),R=Ne(f.right,0),z=Ne(f.top,0),K=Ne(f.bottom,0);g?E=b-2*(Y!==0||R!==0?Y+R:Ne(f.left,f.right)):C=h-2*(z!==0||K!==0?z+K:Ne(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:C});const F=await s.getDimensions(i.floating);return b!==F.width||h!==F.height?{reset:{rects:!0}}:{}}}};function Vn(){return typeof window<"u"}function Pt(e){return ti(e)?(e.nodeName||"").toLowerCase():"#document"}function Ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(ti(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ti(e){return Vn()?e instanceof Node||e instanceof Ee(e).Node:!1}function je(e){return Vn()?e instanceof Element||e instanceof Ee(e).Element:!1}function ze(e){return Vn()?e instanceof HTMLElement||e instanceof Ee(e).HTMLElement:!1}function ni(e){return!Vn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ee(e).ShadowRoot}const zm=new Set(["inline","contents"]);function Zt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zm.has(o)}const Vm=new Set(["table","td","th"]);function Ym(e){return Vm.has(Pt(e))}const Hm=[":popover-open",":modal"];function Yn(e){return Hm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gm=["transform","translate","scale","rotate","perspective"],Um=["transform","translate","scale","rotate","perspective","filter"],qm=["paint","layout","strict","content"];function Br(e){const t=zr(),n=je(e)?Ae(e):e;return Gm.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Um.some(r=>(n.willChange||"").includes(r))||qm.some(r=>(n.contain||"").includes(r))}function Km(e){let t=rt(e);for(;ze(t)&&!Dt(t);){if(Br(t))return t;if(Yn(t))return null;t=rt(t)}return null}function zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xm=new Set(["html","body","#document"]);function Dt(e){return Xm.has(Pt(e))}function Ae(e){return Ee(e).getComputedStyle(e)}function Hn(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rt(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ni(e)&&e.host||Be(e);return ni(t)?t.host:t}function ri(e){const t=rt(e);return Dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&Zt(t)?t:ri(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ri(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ee(o);if(a){const i=Vr(s);return t.concat(s,s.visualViewport||[],Zt(o)?o:[],i&&n?Qt(i):[])}return t.concat(o,Qt(o,[],n))}function Vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oi(e){const t=Ae(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Ln(n)!==a||Ln(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Yr(e){return je(e)?e:e.contextElement}function jt(e){const t=Yr(e);if(!ze(t))return Le(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=oi(t);let s=(a?Ln(n.width):n.width)/r,i=(a?Ln(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Zm=Le(0);function ai(e){const t=Ee(e);return!zr()||!t.visualViewport?Zm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ee(e)?!1:t}function mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Yr(e);let s=Le(1);t&&(r?je(r)&&(s=jt(r)):s=jt(e));const i=Qm(a,n,r)?ai(a):Le(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const p=Ee(a),g=r&&je(r)?Ee(r):r;let b=p,h=Vr(b);for(;h&&r&&g!==b;){const v=jt(h),x=h.getBoundingClientRect(),y=Ae(h),w=x.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,S=x.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,d*=v.y,f*=v.x,m*=v.y,l+=w,d+=S,b=Ee(h),h=Vr(b)}}return zn({width:f,height:m,x:l,y:d})}function Gn(e,t){const n=Hn(e).scrollLeft;return t?t.left+n:mt(Be(e)).left+n}function si(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Gn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Jm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Be(r),i=t?Yn(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=Le(1);const f=Le(0),m=ze(r);if((m||!m&&!a)&&((Pt(r)!=="body"||Zt(s))&&(l=Hn(r)),ze(r))){const g=mt(r);d=jt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const p=s&&!m&&!a?si(s,l):Le(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-l.scrollTop*d.y+f.y+p.y}}function eh(e){return Array.from(e.getClientRects())}function th(e){const t=Be(e),n=Hn(e),r=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Gn(e);const i=-n.scrollTop;return Ae(r).direction==="rtl"&&(s+=Ne(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const ii=25;function nh(e,t){const n=Ee(e),r=Be(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=zr();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=Gn(r);if(d<=0){const f=r.ownerDocument,m=f.body,p=getComputedStyle(m),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-g);b<=ii&&(a-=b)}else d<=ii&&(a+=d);return{width:a,height:s,x:i,y:l}}const rh=new Set(["absolute","fixed"]);function oh(e,t){const n=mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ze(e)?jt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function li(e,t,n){let r;if(t==="viewport")r=nh(e,n);else if(t==="document")r=th(Be(e));else if(je(t))r=oh(t,n);else{const o=ai(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zn(r)}function ci(e,t){const n=rt(e);return n===t||!je(n)||Dt(n)?!1:Ae(n).position==="fixed"||ci(n,t)}function ah(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(i=>je(i)&&Pt(i)!=="body"),o=null;const a=Ae(e).position==="fixed";let s=a?rt(e):e;for(;je(s)&&!Dt(s);){const i=Ae(s),l=Br(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&rh.has(o.position)||Zt(s)&&!l&&ci(e,s))?r=r.filter(f=>f!==s):o=i,s=rt(s)}return t.set(e,r),r}function sh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Yn(t)?[]:ah(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((d,f)=>{const m=li(t,f,o);return d.top=Ne(m.top,d.top),d.right=nt(m.right,d.right),d.bottom=nt(m.bottom,d.bottom),d.left=Ne(m.left,d.left),d},li(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ih(e){const{width:t,height:n}=oi(e);return{width:t,height:n}}function lh(e,t,n){const r=ze(t),o=Be(t),a=n==="fixed",s=mt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function d(){l.x=Gn(o)}if(r||!r&&!a)if((Pt(t)!=="body"||Zt(o))&&(i=Hn(t)),r){const g=mt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?si(o,i):Le(0),m=s.left+i.scrollLeft-l.x-f.x,p=s.top+i.scrollTop-l.y-f.y;return{x:m,y:p,width:s.width,height:s.height}}function Hr(e){return Ae(e).position==="static"}function di(e,t){if(!ze(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function ui(e,t){const n=Ee(e);if(Yn(e))return n;if(!ze(e)){let o=rt(e);for(;o&&!Dt(o);){if(je(o)&&!Hr(o))return o;o=rt(o)}return n}let r=di(e,t);for(;r&&Ym(r)&&Hr(r);)r=di(r,t);return r&&Dt(r)&&Hr(r)&&!Br(r)?n:r||Km(e)||n}const ch=async function(e){const t=this.getOffsetParent||ui,n=this.getDimensions,r=await n(e.floating);return{reference:lh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dh(e){return Ae(e).direction==="rtl"}const uh={convertOffsetParentRelativeRectToViewportRelativeRect:Jm,getDocumentElement:Be,getClippingRect:sh,getOffsetParent:ui,getElementRects:ch,getClientRects:eh,getDimensions:ih,getScale:jt,isElement:je,isRTL:dh};function fi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fh(e,t){let n=null,r;const o=Be(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:f,top:m,width:p,height:g}=d;if(i||t(),!p||!g)return;const b=$n(m),h=$n(o.clientWidth-(f+p)),v=$n(o.clientHeight-(m+g)),x=$n(f),w={rootMargin:-b+"px "+-h+"px "+-v+"px "+-x+"px",threshold:Ne(0,nt(1,l))||1};let S=!0;function k(_){const C=_[0].intersectionRatio;if(C!==l){if(!S)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!fi(d,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return s(!0),a}function mh(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Yr(e),f=o||a?[...d?Qt(d):[],...Qt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=d&&i?fh(d,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(x=>{let[y]=x;y&&y.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),d&&!l&&g.observe(d),g.observe(t));let b,h=l?mt(e):null;l&&v();function v(){const x=mt(e);h&&!fi(h,x)&&n(),h=x,b=requestAnimationFrame(v)}return n(),()=>{var x;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),m==null||m(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const hh=Fm,ph=Lm,gh=Rm,bh=Bm,vh=Im,mi=Am,xh=$m,yh=(e,t,n)=>{const r=new Map,o={platform:uh,...n},a={...o.platform,_c:r};return jm(e,t,{...o,platform:a})};var wh=typeof document<"u",kh=function(){},Un=wh?M.useLayoutEffect:kh;function qn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!qn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pi(e,t){const n=hi(e);return Math.round(t*n)/n}function Gr(e){const t=u.useRef(e);return Un(()=>{t.current=e}),t}function Sh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=u.useState(r);qn(p,r)||g(r);const[b,h]=u.useState(null),[v,x]=u.useState(null),y=u.useCallback(P=>{P!==_.current&&(_.current=P,h(P))},[]),w=u.useCallback(P=>{P!==C.current&&(C.current=P,x(P))},[]),S=a||b,k=s||v,_=u.useRef(null),C=u.useRef(null),E=u.useRef(f),F=l!=null,Y=Gr(l),R=Gr(o),z=Gr(d),K=u.useCallback(()=>{if(!_.current||!C.current)return;const P={placement:t,strategy:n,middleware:p};R.current&&(P.platform=R.current),yh(_.current,C.current,P).then(te=>{const T={...te,isPositioned:z.current!==!1};H.current&&!qn(E.current,T)&&(E.current=T,gn.flushSync(()=>{m(T)}))})},[p,t,n,R,z]);Un(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[d]);const H=u.useRef(!1);Un(()=>(H.current=!0,()=>{H.current=!1}),[]),Un(()=>{if(S&&(_.current=S),k&&(C.current=k),S&&k){if(Y.current)return Y.current(S,k,K);K()}},[S,k,K,Y,F]);const Z=u.useMemo(()=>({reference:_,floating:C,setReference:y,setFloating:w}),[y,w]),B=u.useMemo(()=>({reference:S,floating:k}),[S,k]),Q=u.useMemo(()=>{const P={position:n,left:0,top:0};if(!B.floating)return P;const te=pi(B.floating,f.x),T=pi(B.floating,f.y);return i?{...P,transform:"translate("+te+"px, "+T+"px)",...hi(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:T}},[n,i,B.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:K,refs:Z,elements:B,floatingStyles:Q}),[f,K,Z,B,Q])}const Ch=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mi({element:r.current,padding:o}).fn(n):{}:r?mi({element:r,padding:o}).fn(n):{}}}},Nh=(e,t)=>({...hh(e),options:[e,t]}),Eh=(e,t)=>({...ph(e),options:[e,t]}),_h=(e,t)=>({...xh(e),options:[e,t]}),Mh=(e,t)=>({...gh(e),options:[e,t]}),Oh=(e,t)=>({...bh(e),options:[e,t]}),Th=(e,t)=>({...vh(e),options:[e,t]}),Ph=(e,t)=>({...Ch(e),options:[e,t]});var Dh="Arrow",gi=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return c.jsx(U.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});gi.displayName=Dh;var jh=gi,Ur="Popper",[bi,At]=Ce(Ur),[Ah,vi]=bi(Ur),xi=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return c.jsx(Ah,{scope:t,anchor:r,onAnchorChange:o,children:n})};xi.displayName=Ur;var yi="PopperAnchor",wi=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=vi(yi,n),s=u.useRef(null),i=le(t,s),l=u.useRef(null);return u.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:c.jsx(U.div,{...o,ref:i})});wi.displayName=yi;var qr="PopperContent",[Rh,Ih]=bi(qr),ki=u.forwardRef((e,t)=>{var j,V,J,ne,se,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:b,...h}=e,v=vi(qr,n),[x,y]=u.useState(null),w=le(t,ke=>y(ke)),[S,k]=u.useState(null),_=yn(S),C=(_==null?void 0:_.width)??0,E=(_==null?void 0:_.height)??0,F=r+(a!=="center"?"-"+a:""),Y=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},R=Array.isArray(d)?d:[d],z=R.length>0,K={padding:Y,boundary:R.filter(Fh),altBoundary:z},{refs:H,floatingStyles:Z,placement:B,isPositioned:Q,middlewareData:P}=Sh({strategy:"fixed",placement:F,whileElementsMounted:(...ke)=>mh(...ke,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Nh({mainAxis:o+E,alignmentAxis:s}),l&&Eh({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?_h():void 0,...K}),l&&Mh({...K}),Oh({...K,apply:({elements:ke,rects:Oe,availableWidth:xt,availableHeight:yt})=>{const{width:wt,height:Wo}=Oe.reference,Vt=ke.floating.style;Vt.setProperty("--radix-popper-available-width",`${xt}px`),Vt.setProperty("--radix-popper-available-height",`${yt}px`),Vt.setProperty("--radix-popper-anchor-width",`${wt}px`),Vt.setProperty("--radix-popper-anchor-height",`${Wo}px`)}}),S&&Ph({element:S,padding:i}),Lh({arrowWidth:C,arrowHeight:E}),p&&Th({strategy:"referenceHidden",...K})]}),[te,T]=Ni(B),G=qe(b);be(()=>{Q&&(G==null||G())},[Q,G]);const O=(j=P.arrow)==null?void 0:j.x,A=(V=P.arrow)==null?void 0:V.y,W=((J=P.arrow)==null?void 0:J.centerOffset)!==0,[I,ee]=u.useState();return be(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),c.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:Q?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:I,"--radix-popper-transform-origin":[(ne=P.transformOrigin)==null?void 0:ne.x,(se=P.transformOrigin)==null?void 0:se.y].join(" "),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Rh,{scope:n,placedSide:te,onArrowChange:k,arrowX:O,arrowY:A,shouldHideArrow:W,children:c.jsx(U.div,{"data-side":te,"data-align":T,...h,ref:w,style:{...h.style,animation:Q?void 0:"none"}})})})});ki.displayName=qr;var Si="PopperArrow",Wh={top:"bottom",right:"left",bottom:"top",left:"right"},Ci=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ih(Si,r),s=Wh[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(jh,{...o,ref:n,style:{...o.style,display:"block"}})})});Ci.displayName=Si;function Fh(e){return e!==null}var Lh=e=>({name:"transformOrigin",options:e,fn(t){var v,x,y;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=Ni(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let b="",h="";return d==="bottom"?(b=s?m:`${p}px`,h=`${-l}px`):d==="top"?(b=s?m:`${p}px`,h=`${r.floating.height+l}px`):d==="right"?(b=`${-l}px`,h=s?m:`${g}px`):d==="left"&&(b=`${r.floating.width+l}px`,h=s?m:`${g}px`),{data:{x:b,y:h}}}});function Ni(e){const[t,n="center"]=e.split("-");return[t,n]}var Kr=xi,Kn=wi,Xr=ki,Zr=Ci,Ei=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"}),$h="VisuallyHidden",_i=u.forwardRef((e,t)=>c.jsx(U.span,{...e,ref:t,style:{...Ei,...e.style}}));_i.displayName=$h;var Bh=_i,[Xn,C0]=Ce("Tooltip",[At]),Zn=At(),Mi="TooltipProvider",zh=700,Qr="tooltip.open",[Vh,Jr]=Xn(Mi),Oi=e=>{const{__scopeTooltip:t,delayDuration:n=zh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=u.useRef(!0),i=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(Vh,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:u.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Oi.displayName=Mi;var Jt="Tooltip",[Yh,en]=Xn(Jt),eo=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Jr(Jt,e.__scopeTooltip),d=Zn(t),[f,m]=u.useState(null),p=ye(),g=u.useRef(0),b=s??l.disableHoverableContent,h=i??l.delayDuration,v=u.useRef(!1),[x,y]=We({prop:r,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qr))):l.onClose(),a==null||a(C)},caller:Jt}),w=u.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),k=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),_=u.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},h)},[h,y]);return u.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),c.jsx(Kr,{...d,children:c.jsx(Yh,{scope:t,contentId:p,open:x,stateAttribute:w,trigger:f,onTriggerChange:m,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayedRef.current?_():S()},[l.isOpenDelayedRef,_,S]),onTriggerLeave:u.useCallback(()=>{b?k():(window.clearTimeout(g.current),g.current=0)},[k,b]),onOpen:S,onClose:k,disableHoverableContent:b,children:n})})};eo.displayName=Jt;var to="TooltipTrigger",no=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=en(to,n),a=Jr(to,n),s=Zn(n),i=u.useRef(null),l=le(t,i,o.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),m=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(Kn,{asChild:!0,...s,children:c.jsx(U.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:X(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});no.displayName=to;var ro="TooltipPortal",[Hh,Gh]=Xn(ro,{forceMount:void 0}),Ti=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=en(ro,t);return c.jsx(Hh,{scope:t,forceMount:n,children:c.jsx(Pe,{present:n||a.open,children:c.jsx(Kt,{asChild:!0,container:o,children:r})})})};Ti.displayName=ro;var Rt="TooltipContent",oo=u.forwardRef((e,t)=>{const n=Gh(Rt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=en(Rt,e.__scopeTooltip);return c.jsx(Pe,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Pi,{side:o,...a,ref:t}):c.jsx(Uh,{side:o,...a,ref:t})})}),Uh=u.forwardRef((e,t)=>{const n=en(Rt,e.__scopeTooltip),r=Jr(Rt,e.__scopeTooltip),o=u.useRef(null),a=le(t,o),[s,i]=u.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,p=u.useCallback(()=>{i(null),m(!1)},[m]),g=u.useCallback((b,h)=>{const v=b.currentTarget,x={x:b.clientX,y:b.clientY},y=Zh(x,v.getBoundingClientRect()),w=Qh(x,y),S=Jh(h.getBoundingClientRect()),k=tp([...w,...S]);i(k),m(!0)},[m]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(l&&f){const b=v=>g(v,f),h=v=>g(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",h)}}},[l,f,g,p]),u.useEffect(()=>{if(s){const b=h=>{const v=h.target,x={x:h.clientX,y:h.clientY},y=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),w=!ep(x,s);y?p():w&&(p(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,d,p]),c.jsx(Pi,{...e,ref:a})}),[qh,Kh]=Xn(Jt,{isInside:!1}),Xh=ad("TooltipContent"),Pi=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=en(Rt,n),d=Zn(n),{onClose:f}=l;return u.useEffect(()=>(document.addEventListener(Qr,f),()=>document.removeEventListener(Qr,f)),[f]),u.useEffect(()=>{if(l.trigger){const m=p=>{const g=p.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[l.trigger,f]),c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:c.jsxs(Xr,{"data-state":l.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Xh,{children:r}),c.jsx(qh,{scope:n,isInside:!0,children:c.jsx(Bh,{id:l.contentId,role:"tooltip",children:o||r})})]})})});oo.displayName=Rt;var Di="TooltipArrow",ji=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zn(n);return Kh(Di,n).isInside?null:c.jsx(Zr,{...o,...r,ref:t})});ji.displayName=Di;function Zh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Jh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ep(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,m=l.x,p=l.y;f>r!=p>r&&n<(m-d)*(r-f)/(p-f)+d&&(o=!o)}return o}function tp(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),np(t)}function np(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var rp=Oi,op=eo,ap=no,sp=Ti,ip=oo,lp=ji;function Ai({delayDuration:e=0,...t}){return c.jsx(rp,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cp({...e}){return c.jsx(Ai,{children:c.jsx(op,{"data-slot":"tooltip",...e})})}function dp({...e}){return c.jsx(ap,{"data-slot":"tooltip-trigger",...e})}function up({className:e,sideOffset:t=0,children:n,...r}){return c.jsx(sp,{children:c.jsxs(ip,{"data-slot":"tooltip-content",sideOffset:t,className:N("bg-neutral-black-1 text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 max-w-[362px]! origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs",e),...r,children:[n,c.jsx(lp,{className:"bg-neutral-black-1 fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Ri=({className:e,type:t,...n})=>c.jsx("input",{type:t,className:N("flex-1 h-10 bg-transparent outline-none placeholder:text-neutral-black-2 disabled:cursor-not-allowed disabled:opacity-50","text-black-1 text-sm","placeholder:text-neutral-black-2 placeholder:text-sm",e),...n}),fp=ge("flex items-center rounded-lg border transition-colors p-2",{variants:{size:{small:"h-6 w-80 text-sm px-2",medium:"h-10 w-92 text-base px-3"},status:{default:"border-neutral-black-4 text-foreground focus-within:ring-4 focus-within:ring-neutral-black-4",error:"border-error-1 text-primary-1 focus-within:ring-4 focus-within:ring-error-1",disabled:"border-neutral-black-4 bg-neutral-black-4 text-neutral-black-2 cursor-not-allowed"}},defaultVariants:{size:"medium",status:"default"}}),Ii=({size:e,status:t,startSlot:n,endSlot:r,className:o,disabled:a,...s})=>c.jsxs("div",{className:N(fp({size:e,status:t}),o),children:[n&&c.jsx("span",{className:"mr-2 flex-shrink-0",children:n}),c.jsx(Ri,{disabled:a,...s}),r&&c.jsx("span",{className:"ml-2 flex-shrink-0",children:r})]}),Wi=({children:e,className:t,...n})=>e==null?null:c.jsx("label",{className:N("text-sm font-normal text-neutral-black-1",t),...n,children:e}),Qn=({label:e,helperText:t,errorText:n,startSlot:r,endSlot:o,size:a="medium",className:s,disabled:i=!1,labelClassName:l,...d})=>c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(Wi,{className:l,children:e}),c.jsx(Ii,{size:a,status:n?"error":i?"disabled":"default",startSlot:r,endSlot:o,disabled:i,className:s,...d}),(t||n)&&c.jsx("p",{className:N("text-sm mt-1",n?"text-primary-1":"text-neutral-black-2"),children:n||t})]}),mp=({label:e="Password",showForgot:t=!1,onValidityChange:n,customValidator:r,showPasswordValidation:o=!0,labelClassName:a="",...s})=>{const[i,l]=M.useState(!1),[d,f]=M.useState(""),[m,p]=M.useState(!1),g=v=>[{label:"minimum 8 characters",isValid:v.length>=8},{label:"one uppercase character",isValid:/[A-Z]/.test(v)},{label:"one lowercase character",isValid:/[a-z]/.test(v)},{label:"one special character",isValid:/[^A-Za-z0-9]/.test(v)},{label:"one number",isValid:/\d/.test(v)}],b=M.useMemo(()=>o?r?r(d):g(d):[],[o,r,d]),h=b.every(v=>v.isValid);return M.useEffect(()=>{o&&n&&n(h,b)},[d,h,b,n,o]),c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("label",{className:N("text-sm font-medium text-neutral-0",a),children:e}),t&&c.jsx(Se,{className:"text-xs text-neutral-0 hover:underline bg-transparent p-0 hover:bg-transparent",variant:"primary",children:"Forgot Password?"})]}),c.jsx(Qn,{labelClassName:a,type:i?"text":"password",value:d,onChange:v=>f(v.target.value),onFocus:()=>p(!0),...s,endSlot:c.jsx(Se,{className:"text-xs text-neutral-0 hover:underline bg-transparent p-0 hover:bg-transparent",variant:"primary",onClick:()=>l(!i),children:i?c.jsx(Gu,{size:24,className:"text-neutral-black-2"}):c.jsx(Uu,{size:24,className:"text-neutral-black-2"})})}),o&&c.jsx("div",{className:"grid grid-cols-2 gap-y-1 text-xs mt-3",children:b.map((v,x)=>c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:N("w-1.5 h-1.5 rounded-full transition-colors",v.isValid?"bg-success-1":m?"bg-primary-1":"bg-neutral-black-2")}),c.jsx("span",{className:N("transition-colors",v.isValid?"text-success-1":m?"text-primary-1":"text-neutral-black-2"),children:v.label})]},x))})]})})},hp=e=>c.jsx(Qn,{type:"search",startSlot:c.jsx(Qa,{"data-testid":"search-icon",className:"w-4 h-4 text-input-placeholder text-neutral-black-2"}),placeholder:"Search...",...e});function Fi(e,[t,n]){return Math.min(n,Math.max(t,e))}var pp=[" ","Enter","ArrowUp","ArrowDown"],gp=[" ","Enter"],ht="Select",[Jn,er,bp]=ba(ht),[It,N0]=Ce(ht,[bp,At]),tr=At(),[vp,ot]=It(ht),[xp,yp]=It(ht),Li=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:f,autoComplete:m,disabled:p,required:g,form:b}=e,h=tr(t),[v,x]=u.useState(null),[y,w]=u.useState(null),[S,k]=u.useState(!1),_=kn(d),[C,E]=We({prop:r,defaultProp:o??!1,onChange:a,caller:ht}),[F,Y]=We({prop:s,defaultProp:i,onChange:l,caller:ht}),R=u.useRef(null),z=v?b||!!v.closest("form"):!0,[K,H]=u.useState(new Set),Z=Array.from(K).map(B=>B.props.value).join(";");return c.jsx(Kr,{...h,children:c.jsxs(vp,{required:g,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:ye(),value:F,onValueChange:Y,open:C,onOpenChange:E,dir:_,triggerPointerDownPosRef:R,disabled:p,children:[c.jsx(Jn.Provider,{scope:t,children:c.jsx(xp,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(B=>{H(Q=>new Set(Q).add(B))},[]),onNativeOptionRemove:u.useCallback(B=>{H(Q=>{const P=new Set(Q);return P.delete(B),P})},[]),children:n})}),z?c.jsxs(cl,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:m,value:F,onChange:B=>Y(B.target.value),disabled:p,form:b,children:[F===void 0?c.jsx("option",{value:""}):null,Array.from(K)]},Z):null]})})};Li.displayName=ht;var $i="SelectTrigger",Bi=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=tr(n),s=ot($i,n),i=s.disabled||r,l=le(t,s.onTriggerChange),d=er(n),f=u.useRef("touch"),[m,p,g]=ul(h=>{const v=d().filter(w=>!w.disabled),x=v.find(w=>w.value===s.value),y=fl(v,h,x);y!==void 0&&s.onValueChange(y.value)}),b=h=>{i||(s.onOpenChange(!0),g()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return c.jsx(Kn,{asChild:!0,...a,children:c.jsx(U.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":dl(s.value)?"":void 0,...o,ref:l,onClick:X(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&b(h)}),onPointerDown:X(o.onPointerDown,h=>{f.current=h.pointerType;const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(b(h),h.preventDefault())}),onKeyDown:X(o.onKeyDown,h=>{const v=m.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(v&&h.key===" ")&&pp.includes(h.key)&&(b(),h.preventDefault())})})})});Bi.displayName=$i;var zi="SelectValue",Vi=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=ot(zi,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,m=le(t,l.onValueNodeChange);return be(()=>{d(f)},[d,f]),c.jsx(U.span,{...i,ref:m,style:{pointerEvents:"none"},children:dl(l.value)?c.jsx(c.Fragment,{children:s}):a})});Vi.displayName=zi;var wp="SelectIcon",Yi=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(U.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Yi.displayName=wp;var kp="SelectPortal",Hi=e=>c.jsx(Kt,{asChild:!0,...e});Hi.displayName=kp;var pt="SelectContent",Gi=u.forwardRef((e,t)=>{const n=ot(pt,e.__scopeSelect),[r,o]=u.useState();if(be(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?gn.createPortal(c.jsx(Ui,{scope:e.__scopeSelect,children:c.jsx(Jn.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(qi,{...e,ref:t})});Gi.displayName=pt;var Re=10,[Ui,at]=It(pt),Sp="SelectContentImpl",Cp=dt("SelectContent.RemoveScroll"),qi=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:v,...x}=e,y=ot(pt,n),[w,S]=u.useState(null),[k,_]=u.useState(null),C=le(t,j=>S(j)),[E,F]=u.useState(null),[Y,R]=u.useState(null),z=er(n),[K,H]=u.useState(!1),Z=u.useRef(!1);u.useEffect(()=>{if(w)return Pr(w)},[w]),Nr();const B=u.useCallback(j=>{const[V,...J]=z().map(ie=>ie.ref.current),[ne]=J.slice(-1),se=document.activeElement;for(const ie of j)if(ie===se||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===V&&k&&(k.scrollTop=0),ie===ne&&k&&(k.scrollTop=k.scrollHeight),ie==null||ie.focus(),document.activeElement!==se))return},[z,k]),Q=u.useCallback(()=>B([E,w]),[B,E,w]);u.useEffect(()=>{K&&Q()},[K,Q]);const{onOpenChange:P,triggerPointerDownPosRef:te}=y;u.useEffect(()=>{if(w){let j={x:0,y:0};const V=ne=>{var se,ie;j={x:Math.abs(Math.round(ne.pageX)-(((se=te.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ie=te.current)==null?void 0:ie.y)??0))}},J=ne=>{j.x<=10&&j.y<=10?ne.preventDefault():w.contains(ne.target)||P(!1),document.removeEventListener("pointermove",V),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,P,te]),u.useEffect(()=>{const j=()=>P(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[P]);const[T,G]=ul(j=>{const V=z().filter(se=>!se.disabled),J=V.find(se=>se.ref.current===document.activeElement),ne=fl(V,j,J);ne&&setTimeout(()=>ne.ref.current.focus())}),O=u.useCallback((j,V,J)=>{const ne=!Z.current&&!J;(y.value!==void 0&&y.value===V||ne)&&(F(j),ne&&(Z.current=!0))},[y.value]),A=u.useCallback(()=>w==null?void 0:w.focus(),[w]),W=u.useCallback((j,V,J)=>{const ne=!Z.current&&!J;(y.value!==void 0&&y.value===V||ne)&&R(j)},[y.value]),I=r==="popper"?ao:Ki,ee=I===ao?{side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:v}:{};return c.jsx(Ui,{scope:n,content:w,viewport:k,onViewportChange:_,itemRefCallback:O,selectedItem:E,onItemLeave:A,itemTextRefCallback:W,focusSelectedItem:Q,selectedItemText:Y,position:r,isPositioned:K,searchRef:T,children:c.jsx(An,{as:Cp,allowPinchZoom:!0,children:c.jsx(Mn,{asChild:!0,trapped:y.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:X(o,j=>{var V;(V=y.trigger)==null||V.focus({preventScroll:!0}),j.preventDefault()}),children:c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx(I,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:j=>j.preventDefault(),...x,...ee,onPlaced:()=>H(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:X(x.onKeyDown,j=>{const V=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!V&&j.key.length===1&&G(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let ne=z().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(j.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const se=j.target,ie=ne.indexOf(se);ne=ne.slice(ie+1)}setTimeout(()=>B(ne)),j.preventDefault()}})})})})})})});qi.displayName=Sp;var Np="SelectItemAlignedPosition",Ki=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=ot(pt,n),s=at(pt,n),[i,l]=u.useState(null),[d,f]=u.useState(null),m=le(t,C=>f(C)),p=er(n),g=u.useRef(!1),b=u.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=s,w=u.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&h&&v&&x){const C=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),Y=x.getBoundingClientRect();if(a.dir!=="rtl"){const se=Y.left-E.left,ie=F.left-se,ke=C.left-ie,Oe=C.width+ke,xt=Math.max(Oe,E.width),yt=window.innerWidth-Re,wt=Fi(ie,[Re,Math.max(Re,yt-xt)]);i.style.minWidth=Oe+"px",i.style.left=wt+"px"}else{const se=E.right-Y.right,ie=window.innerWidth-F.right-se,ke=window.innerWidth-C.right-ie,Oe=C.width+ke,xt=Math.max(Oe,E.width),yt=window.innerWidth-Re,wt=Fi(ie,[Re,Math.max(Re,yt-xt)]);i.style.minWidth=Oe+"px",i.style.right=wt+"px"}const R=p(),z=window.innerHeight-Re*2,K=h.scrollHeight,H=window.getComputedStyle(d),Z=parseInt(H.borderTopWidth,10),B=parseInt(H.paddingTop,10),Q=parseInt(H.borderBottomWidth,10),P=parseInt(H.paddingBottom,10),te=Z+B+K+P+Q,T=Math.min(v.offsetHeight*5,te),G=window.getComputedStyle(h),O=parseInt(G.paddingTop,10),A=parseInt(G.paddingBottom,10),W=C.top+C.height/2-Re,I=z-W,ee=v.offsetHeight/2,j=v.offsetTop+ee,V=Z+B+j,J=te-V;if(V<=W){const se=R.length>0&&v===R[R.length-1].ref.current;i.style.bottom="0px";const ie=d.clientHeight-h.offsetTop-h.offsetHeight,ke=Math.max(I,ee+(se?A:0)+ie+Q),Oe=V+ke;i.style.height=Oe+"px"}else{const se=R.length>0&&v===R[0].ref.current;i.style.top="0px";const ke=Math.max(W,Z+h.offsetTop+(se?O:0)+ee)+J;i.style.height=ke+"px",h.scrollTop=V-W+h.offsetTop}i.style.margin=`${Re}px 0`,i.style.minHeight=T+"px",i.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,a.trigger,a.valueNode,i,d,h,v,x,a.dir,r]);be(()=>w(),[w]);const[S,k]=u.useState();be(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const _=u.useCallback(C=>{C&&b.current===!0&&(w(),y==null||y(),b.current=!1)},[w,y]);return c.jsx(_p,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:_,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(U.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ki.displayName=Np;var Ep="SelectPopperPosition",ao=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...a}=e,s=tr(n);return c.jsx(Xr,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});ao.displayName=Ep;var[_p,so]=It(pt,{}),io="SelectViewport",Xi=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=at(io,n),s=so(io,n),i=le(t,a.onViewportChange),l=u.useRef(0);return c.jsxs(c.Fragment,{children:[c.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:r}),c.jsx(Jn.Slot,{scope:n,children:c.jsx(U.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:X(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&m){const g=Math.abs(l.current-f.scrollTop);if(g>0){const b=window.innerHeight-Re*2,h=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),x=Math.max(h,v);if(x<b){const y=x+g,w=Math.min(b,y),S=y-w;m.style.height=w+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Xi.displayName=io;var Zi="SelectGroup",[Mp,Op]=It(Zi),Qi=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ye();return c.jsx(Mp,{scope:n,id:o,children:c.jsx(U.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Qi.displayName=Zi;var Ji="SelectLabel",el=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Op(Ji,n);return c.jsx(U.div,{id:o.id,...r,ref:t})});el.displayName=Ji;var nr="SelectItem",[Tp,tl]=It(nr),nl=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=ot(nr,n),l=at(nr,n),d=i.value===r,[f,m]=u.useState(a??""),[p,g]=u.useState(!1),b=le(t,y=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,y,r,o)}),h=ye(),v=u.useRef("touch"),x=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new 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 c.jsx(Tp,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:u.useCallback(y=>{m(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Jn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:c.jsx(U.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:b,onFocus:X(s.onFocus,()=>g(!0)),onBlur:X(s.onBlur,()=>g(!1)),onClick:X(s.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:X(s.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:X(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:X(s.onPointerMove,y=>{var w;v.current=y.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:X(s.onKeyDown,y=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(gp.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});nl.displayName=nr;var tn="SelectItemText",rl=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=ot(tn,n),i=at(tn,n),l=tl(tn,n),d=yp(tn,n),[f,m]=u.useState(null),p=le(t,x=>m(x),l.onItemTextChange,x=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,x,l.value,l.disabled)}),g=f==null?void 0:f.textContent,b=u.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=d;return be(()=>(h(b),()=>v(b)),[h,v,b]),c.jsxs(c.Fragment,{children:[c.jsx(U.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?gn.createPortal(a.children,s.valueNode):null]})});rl.displayName=tn;var ol="SelectItemIndicator",al=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tl(ol,n).isSelected?c.jsx(U.span,{"aria-hidden":!0,...r,ref:t}):null});al.displayName=ol;var lo="SelectScrollUpButton",sl=u.forwardRef((e,t)=>{const n=at(lo,e.__scopeSelect),r=so(lo,e.__scopeSelect),[o,a]=u.useState(!1),s=le(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});sl.displayName=lo;var co="SelectScrollDownButton",il=u.forwardRef((e,t)=>{const n=at(co,e.__scopeSelect),r=so(co,e.__scopeSelect),[o,a]=u.useState(!1),s=le(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});il.displayName=co;var ll=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=at("SelectScrollButton",n),s=u.useRef(null),i=er(n),l=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>l(),[l]),be(()=>{var f;const d=i().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),c.jsx(U.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{l()})})}),Pp="SelectSeparator",Dp=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(U.div,{"aria-hidden":!0,...r,ref:t})});Dp.displayName=Pp;var uo="SelectArrow",jp=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tr(n),a=ot(uo,n),s=at(uo,n);return a.open&&s.position==="popper"?c.jsx(Zr,{...o,...r,ref:t}):null});jp.displayName=uo;var Ap="SelectBubbleInput",cl=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),a=le(r,o),s=xn(t);return u.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const m=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(m)}},[s,t]),c.jsx(U.select,{...n,style:{...Ei,...n.style},ref:a,defaultValue:t})});cl.displayName=Ap;function dl(e){return e===""||e===void 0}function ul(e){const t=qe(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(s=>{const i=n.current+s;t(i),function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function fl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Rp(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Rp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ip=Li,Wp=Bi,Fp=Vi,Lp=Yi,$p=Hi,Bp=Gi,zp=Xi,Vp=Qi,Yp=el,Hp=nl,Gp=rl,Up=al,qp=sl,Kp=il;function ml({...e}){return c.jsx(Ip,{"data-slot":"select",...e})}function Xp({...e}){return c.jsx(Vp,{"data-slot":"select-group",...e})}function Zp({...e}){return c.jsx(Fp,{"data-slot":"select-value",...e})}function hl({className:e,size:t="default",children:n,...r}){return c.jsxs(Wp,{"data-slot":"select-trigger","data-size":t,className:N("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,c.jsx(Lp,{asChild:!0,children:c.jsx(Nt,{className:"size-4 opacity-50"})})]})}function pl({className:e,children:t,position:n="popper",...r}){return c.jsx($p,{children:c.jsxs(Bp,{"data-slot":"select-content",className:N("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="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",e),position:n,...r,children:[c.jsx(Jp,{}),c.jsx(zp,{className:N("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(eg,{})]})})}function Qp({className:e,...t}){return c.jsx(Yp,{"data-slot":"select-label",className:N("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function fo({className:e,children:t,...n}){return c.jsxs(Hp,{"data-slot":"select-item",className:N("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(Up,{children:c.jsx(Za,{className:"size-4"})})}),c.jsx(Gp,{children:t})]})}function Jp({className:e,...t}){return c.jsx(qp,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Vu,{className:"size-4"})})}function eg({className:e,...t}){return c.jsx(Kp,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Nt,{className:"size-4"})})}const tg=({label:e="Phone number",helperText:t,errorText:n,size:r="medium",disabled:o,labelClassName:a,country:s,onCountryChange:i,countryOptions:l,showDialCode:d=!0,className:f,onValidityChange:m,includeDialCodeInValue:p=!0,...g})=>{const[b,h]=M.useState(!1),v=s||"US",x=M.useMemo(()=>l.find(R=>R.value===v)??{value:"US",label:"US",dialCode:"+1"},[l,v]),y=R=>{const K=(typeof R=="string"?R:Array.isArray(R)?R.join(""):String(R??"")).replace(/\D/g,"");return K.length===11&&K.startsWith("1")?!0:K.length===10},w=R=>{const z=(x==null?void 0:x.dialCode)??"";if(!z)return R;const K=R.replace(/\D/g,""),H=z.replace(/\D/g,"");return K.startsWith(H)?`+${K}`:`${z}${K}`.replace(/^\+?/,"+")},S=g.value??"";M.useEffect(()=>{if(!m)return;const R=v==="US"?y(S):!0;m(R)},[v,S,m]);const k=c.jsxs(ml,{value:v,onValueChange:i,disabled:!0,children:[c.jsx(hl,{className:N("border-0 bg-transparent px-0 py-0 h-auto shadow-none focus-visible:ring-0 focus-visible:border-0 text-neutral-black-1","min-w-14"),children:c.jsxs("div",{className:"flex items-center gap-2",children:[(x==null?void 0:x.flag)&&c.jsx("span",{className:"flex-shrink-0",children:x.flag}),c.jsx("span",{className:"text-sm text-neutral-black-1",children:(x==null?void 0:x.label)??v})]})}),c.jsx(pl,{className:"bg-white border border-neutral-black-4",children:l.map(R=>c.jsx(fo,{value:R.value,disabled:R.disabled,children:c.jsxs("span",{className:"flex items-center gap-2",children:[R.flag,c.jsx("span",{children:R.label}),d&&c.jsx("span",{className:"text-neutral-black-3 ml-1",children:R.dialCode})]})},R.value))})]}),_=d&&(x!=null&&x.dialCode)?`${x.dialCode} `:"",C=g.value,F=v==="US"&&b&&!!C&&!y(C)?"Enter a valid number":n,Y=p&&typeof C=="string"?w(C):C;return c.jsx(Qn,{label:e,helperText:t,errorText:F,size:r,disabled:o,labelClassName:a,startSlot:k,className:f,inputMode:"tel",type:"tel",placeholder:g.placeholder??`${_}(234) 567 8900`,value:Y,onBlur:R=>{var z;h(!0),(z=g.onBlur)==null||z.call(g,R)},onChange:R=>{var z,K;if(b||h(!0),p){const H=w(R.target.value),Z={...R,target:{...R.target,value:H},currentTarget:{...R.currentTarget,value:H}};(z=g.onChange)==null||z.call(g,Z)}else(K=g.onChange)==null||K.call(g,R)},...g})};var rr="Popover",[gl,E0]=Ce(rr,[At]),nn=At(),[ng,st]=gl(rr),bl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=nn(t),l=u.useRef(null),[d,f]=u.useState(!1),[m,p]=We({prop:r,defaultProp:o??!1,onChange:a,caller:rr});return c.jsx(Kr,{...i,children:c.jsx(ng,{scope:t,contentId:ye(),triggerRef:l,open:m,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:s,children:n})})};bl.displayName=rr;var vl="PopoverAnchor",rg=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(vl,n),a=nn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(Kn,{...a,...r,ref:t})});rg.displayName=vl;var xl="PopoverTrigger",yl=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(xl,n),a=nn(n),s=le(t,o.triggerRef),i=c.jsx(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nl(o.open),...r,ref:s,onClick:X(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(Kn,{asChild:!0,...a,children:i})});yl.displayName=xl;var mo="PopoverPortal",[og,ag]=gl(mo,{forceMount:void 0}),wl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=st(mo,t);return c.jsx(og,{scope:t,forceMount:n,children:c.jsx(Pe,{present:n||a.open,children:c.jsx(Kt,{asChild:!0,container:o,children:r})})})};wl.displayName=mo;var Wt="PopoverContent",kl=u.forwardRef((e,t)=>{const n=ag(Wt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=st(Wt,e.__scopePopover);return c.jsx(Pe,{present:r||a.open,children:a.modal?c.jsx(ig,{...o,ref:t}):c.jsx(lg,{...o,ref:t})})});kl.displayName=Wt;var sg=dt("PopoverContent.RemoveScroll"),ig=u.forwardRef((e,t)=>{const n=st(Wt,e.__scopePopover),r=u.useRef(null),o=le(t,r),a=u.useRef(!1);return u.useEffect(()=>{const s=r.current;if(s)return Pr(s)},[]),c.jsx(An,{as:sg,allowPinchZoom:!0,children:c.jsx(Sl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,d=i.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),lg=u.forwardRef((e,t)=>{const n=st(Wt,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return c.jsx(Sl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Sl=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,...m}=e,p=st(Wt,n),g=nn(n);return Nr(),c.jsx(Mn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(Xr,{"data-state":Nl(p.open),role:"dialog",id:p.contentId,...g,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Cl="PopoverClose",cg=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(Cl,n);return c.jsx(U.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});cg.displayName=Cl;var dg="PopoverArrow",ug=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nn(n);return c.jsx(Zr,{...o,...r,ref:t})});ug.displayName=dg;function Nl(e){return e?"open":"closed"}var fg=bl,mg=yl,hg=wl,pg=kl;function El({...e}){return c.jsx(fg,{"data-slot":"popover",...e})}function _l({...e}){return c.jsx(mg,{"data-slot":"popover-trigger",...e})}function ho({className:e,align:t="center",sideOffset:n=4,...r}){return c.jsx(hg,{children:c.jsx(pg,{"data-slot":"popover-content",align:t,sideOffset:n,className:N("bg-white text-black 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}var Ml=1,gg=.9,bg=.8,vg=.17,po=.1,go=.999,xg=.9999,yg=.99,wg=/[\\\/_+.#"@\[\(\{&]/,kg=/[\\\/_+.#"@\[\(\{&]/g,Sg=/[\s-]/,Ol=/[\s-]/g;function bo(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Ml:yg;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),f=0,m,p,g,b;d>=0;)m=bo(e,t,n,r,d+1,a+1,s),m>f&&(d===o?m*=Ml:wg.test(e.charAt(d-1))?(m*=bg,g=e.slice(o,d-1).match(kg),g&&o>0&&(m*=Math.pow(go,g.length))):Sg.test(e.charAt(d-1))?(m*=gg,b=e.slice(o,d-1).match(Ol),b&&o>0&&(m*=Math.pow(go,b.length))):(m*=vg,o>0&&(m*=Math.pow(go,d-o))),e.charAt(d)!==t.charAt(a)&&(m*=xg)),(m<po&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(p=bo(e,t,n,r,d+1,a+2,s),p*po>m&&(m=p*po)),m>f&&(f=m),d=n.indexOf(l,d+1);return s[i]=f,f}function Tl(e){return e.toLowerCase().replace(Ol," ")}function Cg(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,bo(e,t,Tl(e),Tl(t),0,0,{})}var rn='[cmdk-group=""]',vo='[cmdk-group-items=""]',Ng='[cmdk-group-heading=""]',Pl='[cmdk-item=""]',Dl=`${Pl}:not([aria-disabled="true"])`,xo="cmdk-item-select",Ft="data-value",Eg=(e,t,n)=>Cg(e,t,n),jl=u.createContext(void 0),on=()=>u.useContext(jl),Al=u.createContext(void 0),yo=()=>u.useContext(Al),Rl=u.createContext(void 0),Il=u.forwardRef((e,t)=>{let n=Lt(()=>{var O,A;return{search:"",value:(A=(O=e.value)!=null?O:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Lt(()=>new Set),o=Lt(()=>new Map),a=Lt(()=>new Map),s=Lt(()=>new Set),i=Wl(e),{label:l,children:d,value:f,onValueChange:m,filter:p,shouldFilter:g,loop:b,disablePointerSelection:h=!1,vimBindings:v=!0,...x}=e,y=ye(),w=ye(),S=ye(),k=u.useRef(null),_=Wg();gt(()=>{if(f!==void 0){let O=f.trim();n.current.value=O,C.emit()}},[f]),gt(()=>{_(6,K)},[]);let C=u.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,A,W)=>{var I,ee,j,V;if(!Object.is(n.current[O],A)){if(n.current[O]=A,O==="search")z(),Y(),_(1,R);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(S);J?J.focus():(I=document.getElementById(y))==null||I.focus()}if(_(7,()=>{var J;n.current.selectedItemId=(J=H())==null?void 0:J.id,C.emit()}),W||_(5,K),((ee=i.current)==null?void 0:ee.value)!==void 0){let J=A??"";(V=(j=i.current).onValueChange)==null||V.call(j,J);return}}C.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=u.useMemo(()=>({value:(O,A,W)=>{var I;A!==((I=a.current.get(O))==null?void 0:I.value)&&(a.current.set(O,{value:A,keywords:W}),n.current.filtered.items.set(O,F(A,W)),_(2,()=>{Y(),C.emit()}))},item:(O,A)=>(r.current.add(O),A&&(o.current.has(A)?o.current.get(A).add(O):o.current.set(A,new Set([O]))),_(3,()=>{z(),Y(),n.current.value||R(),C.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let W=H();_(4,()=>{z(),(W==null?void 0:W.getAttribute("id"))===O&&R(),C.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:S,labelId:w,listInnerRef:k}),[]);function F(O,A){var W,I;let ee=(I=(W=i.current)==null?void 0:W.filter)!=null?I:Eg;return O?ee(O,n.current.search,A):0}function Y(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(I=>{let ee=o.current.get(I),j=0;ee.forEach(V=>{let J=O.get(V);j=Math.max(J,j)}),A.push([I,j])});let W=k.current;Z().sort((I,ee)=>{var j,V;let J=I.getAttribute("id"),ne=ee.getAttribute("id");return((j=O.get(ne))!=null?j:0)-((V=O.get(J))!=null?V:0)}).forEach(I=>{let ee=I.closest(vo);ee?ee.appendChild(I.parentElement===ee?I:I.closest(`${vo} > *`)):W.appendChild(I.parentElement===W?I:I.closest(`${vo} > *`))}),A.sort((I,ee)=>ee[1]-I[1]).forEach(I=>{var ee;let j=(ee=k.current)==null?void 0:ee.querySelector(`${rn}[${Ft}="${encodeURIComponent(I[0])}"]`);j==null||j.parentElement.appendChild(j)})}function R(){let O=Z().find(W=>W.getAttribute("aria-disabled")!=="true"),A=O==null?void 0:O.getAttribute(Ft);C.setState("value",A||void 0)}function z(){var O,A,W,I;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let j of r.current){let V=(A=(O=a.current.get(j))==null?void 0:O.value)!=null?A:"",J=(I=(W=a.current.get(j))==null?void 0:W.keywords)!=null?I:[],ne=F(V,J);n.current.filtered.items.set(j,ne),ne>0&&ee++}for(let[j,V]of o.current)for(let J of V)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(j);break}n.current.filtered.count=ee}function K(){var O,A,W;let I=H();I&&(((O=I.parentElement)==null?void 0:O.firstChild)===I&&((W=(A=I.closest(rn))==null?void 0:A.querySelector(Ng))==null||W.scrollIntoView({block:"nearest"})),I.scrollIntoView({block:"nearest"}))}function H(){var O;return(O=k.current)==null?void 0:O.querySelector(`${Pl}[aria-selected="true"]`)}function Z(){var O;return Array.from(((O=k.current)==null?void 0:O.querySelectorAll(Dl))||[])}function B(O){let A=Z()[O];A&&C.setState("value",A.getAttribute(Ft))}function Q(O){var A;let W=H(),I=Z(),ee=I.findIndex(V=>V===W),j=I[ee+O];(A=i.current)!=null&&A.loop&&(j=ee+O<0?I[I.length-1]:ee+O===I.length?I[0]:I[ee+O]),j&&C.setState("value",j.getAttribute(Ft))}function P(O){let A=H(),W=A==null?void 0:A.closest(rn),I;for(;W&&!I;)W=O>0?Rg(W,rn):Ig(W,rn),I=W==null?void 0:W.querySelector(Dl);I?C.setState("value",I.getAttribute(Ft)):Q(O)}let te=()=>B(Z().length-1),T=O=>{O.preventDefault(),O.metaKey?te():O.altKey?P(1):Q(1)},G=O=>{O.preventDefault(),O.metaKey?B(0):O.altKey?P(-1):Q(-1)};return u.createElement(U.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:O=>{var A;(A=x.onKeyDown)==null||A.call(x,O);let W=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||W))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&T(O);break}case"ArrowDown":{T(O);break}case"p":case"k":{v&&O.ctrlKey&&G(O);break}case"ArrowUp":{G(O);break}case"Home":{O.preventDefault(),B(0);break}case"End":{O.preventDefault(),te();break}case"Enter":{O.preventDefault();let I=H();if(I){let ee=new Event(xo);I.dispatchEvent(ee)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Lg},l),or(e,O=>u.createElement(Al.Provider,{value:C},u.createElement(jl.Provider,{value:E},O))))}),_g=u.forwardRef((e,t)=>{var n,r;let o=ye(),a=u.useRef(null),s=u.useContext(Rl),i=on(),l=Wl(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;gt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Fl(o,a,[e.value,e.children,a],e.keywords),m=yo(),p=it(_=>_.value&&_.value===f.current),g=it(_=>d||i.filter()===!1?!0:_.search?_.filtered.items.get(o)>0:!0);u.useEffect(()=>{let _=a.current;if(!(!_||e.disabled))return _.addEventListener(xo,b),()=>_.removeEventListener(xo,b)},[g,e.onSelect,e.disabled]);function b(){var _,C;h(),(C=(_=l.current).onSelect)==null||C.call(_,f.current)}function h(){m.setState("value",f.current,!0)}if(!g)return null;let{disabled:v,value:x,onSelect:y,forceMount:w,keywords:S,...k}=e;return u.createElement(U.div,{ref:ct(a,t),...k,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||i.getDisablePointerSelection()?void 0:h,onClick:v?void 0:b},e.children)}),Mg=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ye(),i=u.useRef(null),l=u.useRef(null),d=ye(),f=on(),m=it(g=>o||f.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);gt(()=>f.group(s),[]),Fl(s,i,[e.value,e.heading,l]);let p=u.useMemo(()=>({id:s,forceMount:o}),[o]);return u.createElement(U.div,{ref:ct(i,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&u.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),or(e,g=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},u.createElement(Rl.Provider,{value:p},g))))}),Og=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),a=it(s=>!s.search);return!n&&!a?null:u.createElement(U.div,{ref:ct(o,t),...r,"cmdk-separator":"",role:"separator"})}),Tg=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=yo(),s=it(d=>d.search),i=it(d=>d.selectedItemId),l=on();return u.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),u.createElement(U.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),Pg=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=u.useRef(null),s=u.useRef(null),i=it(d=>d.selectedItemId),l=on();return u.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let g=d.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(d),()=>{cancelAnimationFrame(m),p.unobserve(d)}}},[]),u.createElement(U.div,{ref:ct(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},or(e,d=>u.createElement("div",{ref:ct(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),Dg=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return u.createElement(Bs,{open:n,onOpenChange:r},u.createElement(zs,{container:s},u.createElement(Vs,{"cmdk-overlay":"",className:o}),u.createElement(Ys,{"aria-label":e.label,"cmdk-dialog":"",className:a},u.createElement(Il,{ref:t,...i}))))}),jg=u.forwardRef((e,t)=>it(n=>n.filtered.count===0)?u.createElement(U.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ag=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return u.createElement(U.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},or(e,s=>u.createElement("div",{"aria-hidden":!0},s)))}),an=Object.assign(Il,{List:Pg,Item:_g,Input:Tg,Group:Mg,Separator:Og,Dialog:Dg,Empty:jg,Loading:Ag});function Rg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ig(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Wl(e){let t=u.useRef(e);return gt(()=>{t.current=e}),t}var gt=typeof window>"u"?u.useEffect:u.useLayoutEffect;function Lt(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function it(e){let t=yo(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function Fl(e,t,n,r=[]){let o=u.useRef(),a=on();return gt(()=>{var s;let i=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Ft,i),o.current=i}),o}var Wg=()=>{let[e,t]=u.useState(),n=Lt(()=>new Map);return gt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Fg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function or({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(Fg(t),{ref:t.ref},n(t.props.children)):n(t)}var Lg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function $g({className:e,...t}){return c.jsx(an,{"data-slot":"command",className:N("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Bg({className:e,...t}){return c.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[c.jsx(Qa,{className:"size-4 shrink-0 opacity-50"}),c.jsx(an.Input,{"data-slot":"command-input",className:N("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function zg({...e}){return c.jsx(an.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Ll({className:e,...t}){return c.jsx(an.Group,{"data-slot":"command-group",className:N("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function $l({className:e,...t}){return c.jsx(an.Item,{"data-slot":"command-item",className:N("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function wo(e){return e.length>0&&e[0].kind==="group"}function Vg(e){return e.multiple?c.jsx(zl,{...e}):c.jsx(Bl,{...e})}const Bl=({options:e,placeholder:t="Select...",disabled:n,error:r,helperText:o,value:a,onChange:s})=>{const[i,l]=M.useState(""),d=a??i,f=m=>{l(m),s==null||s(m)};return c.jsxs("div",{children:[c.jsxs(ml,{value:d,onValueChange:f,disabled:n,children:[c.jsx(hl,{"aria-invalid":!!r,className:N("flex w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm",n&&"cursor-not-allowed bg-neutral-black-4 border border-neutral-black-4 rounded",r?"border-primary-1":"border-neutral-black-4"),children:c.jsx(Zp,{placeholder:t})}),c.jsx(pl,{className:"w-full bg-white border border-neutral-black-4",children:wo(e)?e.map(m=>c.jsxs(Xp,{className:"p-2",children:[c.jsx(Qp,{children:m.label}),m.options.map(p=>c.jsx(fo,{value:p.value,disabled:p.disabled,children:p.label},p.value))]},m.label)):e.map(m=>c.jsx(fo,{value:m.value,disabled:m.disabled,className:"hover:cursor-pointer hover:bg-neutral-black-5",children:m.label},m.value))})]}),r&&c.jsx("p",{className:"mt-1 text-xs text-primary-1",children:r}),o&&c.jsx("p",{className:"mt-1 text-xs text-neutral-black-3",children:o})]})},zl=({options:e,placeholder:t="Select...",disabled:n,error:r,helperText:o,value:a,onChange:s})=>{const[i,l]=M.useState(!1),[d,f]=M.useState([]),m=a??d,p=M.useMemo(()=>wo(e)?e.flatMap(b=>b.options):e,[e]),g=b=>{const h=m.includes(b)?m.filter(v=>v!==b):[...m,b];f(h),s==null||s(h)};return c.jsxs("div",{className:"w-94",children:[c.jsxs(El,{open:i,onOpenChange:l,children:[c.jsx(_l,{asChild:!0,children:c.jsxs("button",{type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":i,className:N("flex w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm",n&&"cursor-not-allowed bg-neutral-black-4 border border-neutral-black-4 rounded",r?"border-primary-1":"border-neutral-black-4"),children:[c.jsx("div",{className:"flex flex-wrap gap-1",children:m.length>0?m.map(b=>c.jsxs(Rr,{type:"outline",onClick:h=>{h.stopPropagation(),g(b)},className:"cursor-pointer border-neutral-black-4 bg-transparent hover:bg-neutral-black-4",children:[c.jsx("span",{className:"text-neutral-black-1",children:b}),c.jsx("div",{className:"flex items-center justify-center rounded-full border border-neutral-black-2 h-5 w-5 ml-1",children:c.jsx(es,{className:"h-3 w-3 text-neutral-black-1",strokeWidth:2})})]},b)):c.jsx("span",{className:"truncate text-xs text-neutral-black-1",children:t})}),c.jsx(Nt,{className:"h-4 w-4 text-neutral-black-1"})]})}),c.jsx(ho,{className:"p-0 w-full bg-white border border-neutral-black-4",children:c.jsxs($g,{className:"w-full",children:[c.jsx(Bg,{placeholder:"Search..."}),c.jsx(zg,{children:"No results found."}),wo(e)?e.map(b=>c.jsx(Ll,{heading:b.label,children:b.options.map(h=>c.jsxs($l,{value:h.label,onSelect:()=>!h.disabled&&g(h.value),disabled:h.disabled,children:[c.jsx("input",{type:"checkbox",readOnly:!0,checked:m.includes(h.value),className:"mr-2"}),h.label]},h.value))},b.label)):c.jsx(Ll,{children:p.map(b=>c.jsxs($l,{value:b.label,onSelect:()=>!b.disabled&&g(b.value),disabled:b.disabled,children:[c.jsx("input",{type:"checkbox",readOnly:!0,checked:m.includes(b.value),className:"mr-2"}),b.label]},b.value))})]})})]}),r&&c.jsx("p",{className:"mt-1 text-xs text-primary-1",children:r}),o&&c.jsx("p",{className:"mt-1 text-xs text-neutral-black-3",children:o})]})},Yg=ge("w-full",{variants:{variant:{"widget-1":"bg-white rounded-lg p-6 flex flex-col items-start gap-4 shadow-[0_0_8px_0_rgba(0,0,0,0.08),6px_0_0_0_var(--color-primary-1)_inset]","widget-2":"bg-white rounded-lg p-6 flex flex-col items-start gap-4 border border-neutral-black-4 shadow-[0_0_8px_0_rgba(0,0,0,0.08)]"}},defaultVariants:{variant:"widget-1"}});function Hg({className:e,variant:t,asChild:n=!1,children:r,...o}){const a=n?Ge:"div";return c.jsx(a,{"data-slot":"card",className:N(Yg({variant:t}),e),...o,children:r})}var ko={exports:{}},So={};/**
181
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lm="DialogDescriptionWarning",cm=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$s(lm).contentName}}.`;return u.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Bs=Es,dm=Ms,zs=Ts,Vs=Ps,Ys=Ds,um=As,fm=Is,Hs=Fs;function mm({...e}){return c.jsx(Bs,{"data-slot":"dialog",...e})}function hm({...e}){return c.jsx(dm,{"data-slot":"dialog-trigger",...e})}function Gs({...e}){return c.jsx(zs,{"data-slot":"dialog-portal",...e})}function pm({...e}){return c.jsx(Hs,{"data-slot":"dialog-close",...e})}function Us({className:e,...t}){return c.jsx(Vs,{"data-slot":"dialog-overlay",className:N("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function gm({className:e,children:t,showCloseButton:n=!0,...r}){return c.jsxs(Gs,{"data-slot":"dialog-portal",children:[c.jsx(Us,{}),c.jsxs(Ys,{"data-slot":"dialog-content",className:N("bg-background bg-white 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-none p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&c.jsxs(Hs,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[c.jsx(es,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function bm({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-header",className:N("flex flex-col gap-2 text-center sm:text-left",e),...t})}function vm({className:e,...t}){return c.jsx("div",{"data-slot":"dialog-footer",className:N("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function xm({className:e,...t}){return c.jsx(um,{"data-slot":"dialog-title",className:N("text-lg leading-none font-semibold ",e),...t})}function ym({className:e,...t}){return c.jsx(fm,{"data-slot":"dialog-description",className:N("text-muted-foreground text-sm",e),...t})}const wm=ge("inline-flex items-center justify-center rounded-full font-medium w-fit whitespace-nowrap shrink-0 gap-1 text-sm",{variants:{variant:{primary:"bg-tag-light-blue text-tag-dark-blue border-tag-light-blue",neutral:"bg-tag-light-gray text-tag-dark-gray border-tag-light-gray",warning:"bg-tag-light-brown text-tag-dark-brown border-tag-stroke-warning-border",success:"bg-tag-light-green text-tag-dark-green border-tag-stroke-success-border",error:"bg-tag-light-red-light text-tag-dark-red-dark border-tag-stroke-error-border",secondary:"bg-tag-light-ice-blue text-tag-dark-ice-blue border-tag-stroke-dark-border"},type:{filled:"border-0",outline:"border bg-transparent"},size:{md:"px-3 py-0.5 text-sm"}},defaultVariants:{variant:"primary",type:"filled",size:"md"}}),Rr=u.forwardRef(({className:e,variant:t,type:n="filled",asChild:r=!1,children:o,...a},s)=>{const i=r?Ge:"span";return c.jsx(i,{ref:s,"data-slot":"badge",className:N(wm({variant:t,type:n}),n==="outline"?"bg-transparent":"",e),...a,children:o})});Rr.displayName="Badge";const km=["top","right","bottom","left"],nt=Math.min,Ne=Math.max,Ln=Math.round,$n=Math.floor,Le=e=>({x:e,y:e}),Sm={left:"right",right:"left",bottom:"top",top:"bottom"},Cm={start:"end",end:"start"};function Ir(e,t,n){return Ne(e,nt(t,n))}function Ke(e,t){return typeof e=="function"?e(t):e}function Xe(e){return e.split("-")[0]}function Tt(e){return e.split("-")[1]}function Wr(e){return e==="x"?"y":"x"}function Fr(e){return e==="y"?"height":"width"}const Nm=new Set(["top","bottom"]);function $e(e){return Nm.has(Xe(e))?"y":"x"}function Lr(e){return Wr($e(e))}function Em(e,t,n){n===void 0&&(n=!1);const r=Tt(e),o=Lr(e),a=Fr(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function _m(e){const t=Bn(e);return[$r(e),t,$r(t)]}function $r(e){return e.replace(/start|end/g,t=>Cm[t])}const qs=["left","right"],Ks=["right","left"],Mm=["top","bottom"],Om=["bottom","top"];function Tm(e,t,n){switch(e){case"top":case"bottom":return n?t?Ks:qs:t?qs:Ks;case"left":case"right":return t?Mm:Om;default:return[]}}function Pm(e,t,n,r){const o=Tt(e);let a=Tm(Xe(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map($r)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Sm[t])}function Dm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xs(e){return typeof e!="number"?Dm(e):{top:e,right:e,bottom:e,left:e}}function zn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Zs(e,t,n){let{reference:r,floating:o}=e;const a=$e(t),s=Lr(t),i=Fr(s),l=Xe(t),d=a==="y",f=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let g;switch(l){case"top":g={x:f,y:r.y-o.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:m};break;case"left":g={x:r.x-o.width,y:m};break;default:g={x:r.x,y:r.y}}switch(Tt(t)){case"start":g[s]-=p*(n&&d?-1:1);break;case"end":g[s]+=p*(n&&d?-1:1);break}return g}const jm=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:m}=Zs(d,r,l),p=r,g={},b=0;for(let h=0;h<i.length;h++){const{name:v,fn:x}=i[h],{x:y,y:w,data:S,reset:k}=await x({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:d,platform:s,elements:{reference:e,floating:t}});f=y??f,m=w??m,g={...g,[v]:{...g[v],...S}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:m}=Zs(d,p,l)),h=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:g}};async function Xt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:m="floating",altBoundary:p=!1,padding:g=0}=Ke(t,e),b=Xs(g),v=i[p?m==="floating"?"reference":"floating":m],x=zn(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:l})),y=m==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},k=zn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:l}):y);return{top:(x.top-k.top+b.top)/S.y,bottom:(k.bottom-x.bottom+b.bottom)/S.y,left:(x.left-k.left+b.left)/S.x,right:(k.right-x.right+b.right)/S.x}}const Am=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:d,padding:f=0}=Ke(e,t)||{};if(d==null)return{};const m=Xs(f),p={x:n,y:r},g=Lr(o),b=Fr(g),h=await s.getDimensions(d),v=g==="y",x=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[g]-p[g]-a.floating[b],k=p[g]-a.reference[g],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let C=_?_[w]:0;(!C||!await(s.isElement==null?void 0:s.isElement(_)))&&(C=i.floating[w]||a.floating[b]);const E=S/2-k/2,F=C/2-h[b]/2-1,Y=nt(m[x],F),R=nt(m[y],F),z=Y,K=C-h[b]-R,H=C/2-h[b]/2+E,Z=Ir(z,H,K),B=!l.arrow&&Tt(o)!=null&&H!==Z&&a.reference[b]/2-(H<z?Y:R)-h[b]/2<0,Q=B?H<z?H-z:H-K:0;return{[g]:p[g]+Q,data:{[g]:Z,centerOffset:H-Z-Q,...B&&{alignmentOffset:Q}},reset:B}}}),Rm=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:f=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...v}=Ke(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Xe(o),y=$e(i),w=Xe(i)===i,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),k=p||(w||!h?[Bn(i)]:_m(i)),_=b!=="none";!p&&_&&k.push(...Pm(i,h,b,S));const C=[i,...k],E=await Xt(t,v),F=[];let Y=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&F.push(E[x]),m){const H=Em(o,s,S);F.push(E[H[0]],E[H[1]])}if(Y=[...Y,{placement:o,overflows:F}],!F.every(H=>H<=0)){var R,z;const H=(((R=a.flip)==null?void 0:R.index)||0)+1,Z=C[H];if(Z&&(!(m==="alignment"?y!==$e(Z):!1)||Y.every(P=>$e(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:H,overflows:Y},reset:{placement:Z}};let B=(z=Y.filter(Q=>Q.overflows[0]<=0).sort((Q,P)=>Q.overflows[1]-P.overflows[1])[0])==null?void 0:z.placement;if(!B)switch(g){case"bestFit":{var K;const Q=(K=Y.filter(P=>{if(_){const te=$e(P.placement);return te===y||te==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(te=>te>0).reduce((te,T)=>te+T,0)]).sort((P,te)=>P[1]-te[1])[0])==null?void 0:K[0];Q&&(B=Q);break}case"initialPlacement":B=i;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Qs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Js(e){return km.some(t=>e[t]>=0)}const Im=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Ke(e,t);switch(r){case"referenceHidden":{const a=await Xt(t,{...o,elementContext:"reference"}),s=Qs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Js(s)}}}case"escaped":{const a=await Xt(t,{...o,altBoundary:!0}),s=Qs(a,n.floating);return{data:{escapedOffsets:s,escaped:Js(s)}}}default:return{}}}}},ei=new Set(["left","top"]);async function Wm(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xe(n),i=Tt(n),l=$e(n)==="y",d=ei.has(s)?-1:1,f=a&&l?-1:1,m=Ke(t,e);let{mainAxis:p,crossAxis:g,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return i&&typeof b=="number"&&(g=i==="end"?b*-1:b),l?{x:g*f,y:p*d}:{x:p*d,y:g*f}}const Fm=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Wm(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Lm=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:v=>{let{x,y}=v;return{x,y}}},...l}=Ke(e,t),d={x:n,y:r},f=await Xt(t,l),m=$e(Xe(o)),p=Wr(m);let g=d[p],b=d[m];if(a){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",y=g+f[v],w=g-f[x];g=Ir(y,g,w)}if(s){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=b+f[v],w=b-f[x];b=Ir(y,b,w)}const h=i.fn({...t,[p]:g,[m]:b});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:a,[m]:s}}}}}},$m=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Ke(e,t),f={x:n,y:r},m=$e(o),p=Wr(m);let g=f[p],b=f[m];const h=Ke(i,t),v=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,k=a.reference[p]+a.reference[w]-v.mainAxis;g<S?g=S:g>k&&(g=k)}if(d){var x,y;const w=p==="y"?"width":"height",S=ei.has(Xe(o)),k=a.reference[m]-a.floating[w]+(S&&((x=s.offset)==null?void 0:x[m])||0)+(S?0:v.crossAxis),_=a.reference[m]+a.reference[w]+(S?0:((y=s.offset)==null?void 0:y[m])||0)-(S?v.crossAxis:0);b<k?b=k:b>_&&(b=_)}return{[p]:g,[m]:b}}}},Bm=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...d}=Ke(e,t),f=await Xt(t,d),m=Xe(o),p=Tt(o),g=$e(o)==="y",{width:b,height:h}=a.floating;let v,x;m==="top"||m==="bottom"?(v=m,x=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(x=m,v=p==="end"?"top":"bottom");const y=h-f.top-f.bottom,w=b-f.left-f.right,S=nt(h-f[v],y),k=nt(b-f[x],w),_=!t.middlewareData.shift;let C=S,E=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),_&&!p){const Y=Ne(f.left,0),R=Ne(f.right,0),z=Ne(f.top,0),K=Ne(f.bottom,0);g?E=b-2*(Y!==0||R!==0?Y+R:Ne(f.left,f.right)):C=h-2*(z!==0||K!==0?z+K:Ne(f.top,f.bottom))}await l({...t,availableWidth:E,availableHeight:C});const F=await s.getDimensions(i.floating);return b!==F.width||h!==F.height?{reset:{rects:!0}}:{}}}};function Vn(){return typeof window<"u"}function Pt(e){return ti(e)?(e.nodeName||"").toLowerCase():"#document"}function Ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Be(e){var t;return(t=(ti(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ti(e){return Vn()?e instanceof Node||e instanceof Ee(e).Node:!1}function je(e){return Vn()?e instanceof Element||e instanceof Ee(e).Element:!1}function ze(e){return Vn()?e instanceof HTMLElement||e instanceof Ee(e).HTMLElement:!1}function ni(e){return!Vn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ee(e).ShadowRoot}const zm=new Set(["inline","contents"]);function Zt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zm.has(o)}const Vm=new Set(["table","td","th"]);function Ym(e){return Vm.has(Pt(e))}const Hm=[":popover-open",":modal"];function Yn(e){return Hm.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gm=["transform","translate","scale","rotate","perspective"],Um=["transform","translate","scale","rotate","perspective","filter"],qm=["paint","layout","strict","content"];function Br(e){const t=zr(),n=je(e)?Ae(e):e;return Gm.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Um.some(r=>(n.willChange||"").includes(r))||qm.some(r=>(n.contain||"").includes(r))}function Km(e){let t=rt(e);for(;ze(t)&&!Dt(t);){if(Br(t))return t;if(Yn(t))return null;t=rt(t)}return null}function zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xm=new Set(["html","body","#document"]);function Dt(e){return Xm.has(Pt(e))}function Ae(e){return Ee(e).getComputedStyle(e)}function Hn(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rt(e){if(Pt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ni(e)&&e.host||Be(e);return ni(t)?t.host:t}function ri(e){const t=rt(e);return Dt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&Zt(t)?t:ri(t)}function Qt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ri(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ee(o);if(a){const i=Vr(s);return t.concat(s,s.visualViewport||[],Zt(o)?o:[],i&&n?Qt(i):[])}return t.concat(o,Qt(o,[],n))}function Vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oi(e){const t=Ae(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Ln(n)!==a||Ln(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Yr(e){return je(e)?e:e.contextElement}function jt(e){const t=Yr(e);if(!ze(t))return Le(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=oi(t);let s=(a?Ln(n.width):n.width)/r,i=(a?Ln(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const Zm=Le(0);function ai(e){const t=Ee(e);return!zr()||!t.visualViewport?Zm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ee(e)?!1:t}function mt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Yr(e);let s=Le(1);t&&(r?je(r)&&(s=jt(r)):s=jt(e));const i=Qm(a,n,r)?ai(a):Le(0);let l=(o.left+i.x)/s.x,d=(o.top+i.y)/s.y,f=o.width/s.x,m=o.height/s.y;if(a){const p=Ee(a),g=r&&je(r)?Ee(r):r;let b=p,h=Vr(b);for(;h&&r&&g!==b;){const v=jt(h),x=h.getBoundingClientRect(),y=Ae(h),w=x.left+(h.clientLeft+parseFloat(y.paddingLeft))*v.x,S=x.top+(h.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,d*=v.y,f*=v.x,m*=v.y,l+=w,d+=S,b=Ee(h),h=Vr(b)}}return zn({width:f,height:m,x:l,y:d})}function Gn(e,t){const n=Hn(e).scrollLeft;return t?t.left+n:mt(Be(e)).left+n}function si(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Gn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Jm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=Be(r),i=t?Yn(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},d=Le(1);const f=Le(0),m=ze(r);if((m||!m&&!a)&&((Pt(r)!=="body"||Zt(s))&&(l=Hn(r)),ze(r))){const g=mt(r);d=jt(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const p=s&&!m&&!a?si(s,l):Le(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+f.x+p.x,y:n.y*d.y-l.scrollTop*d.y+f.y+p.y}}function eh(e){return Array.from(e.getClientRects())}function th(e){const t=Be(e),n=Hn(e),r=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Gn(e);const i=-n.scrollTop;return Ae(r).direction==="rtl"&&(s+=Ne(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}const ii=25;function nh(e,t){const n=Ee(e),r=Be(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const f=zr();(!f||f&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}const d=Gn(r);if(d<=0){const f=r.ownerDocument,m=f.body,p=getComputedStyle(m),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-g);b<=ii&&(a-=b)}else d<=ii&&(a+=d);return{width:a,height:s,x:i,y:l}}const rh=new Set(["absolute","fixed"]);function oh(e,t){const n=mt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ze(e)?jt(e):Le(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,d=r*a.y;return{width:s,height:i,x:l,y:d}}function li(e,t,n){let r;if(t==="viewport")r=nh(e,n);else if(t==="document")r=th(Be(e));else if(je(t))r=oh(t,n);else{const o=ai(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zn(r)}function ci(e,t){const n=rt(e);return n===t||!je(n)||Dt(n)?!1:Ae(n).position==="fixed"||ci(n,t)}function ah(e,t){const n=t.get(e);if(n)return n;let r=Qt(e,[],!1).filter(i=>je(i)&&Pt(i)!=="body"),o=null;const a=Ae(e).position==="fixed";let s=a?rt(e):e;for(;je(s)&&!Dt(s);){const i=Ae(s),l=Br(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&rh.has(o.position)||Zt(s)&&!l&&ci(e,s))?r=r.filter(f=>f!==s):o=i,s=rt(s)}return t.set(e,r),r}function sh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Yn(t)?[]:ah(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((d,f)=>{const m=li(t,f,o);return d.top=Ne(m.top,d.top),d.right=nt(m.right,d.right),d.bottom=nt(m.bottom,d.bottom),d.left=Ne(m.left,d.left),d},li(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ih(e){const{width:t,height:n}=oi(e);return{width:t,height:n}}function lh(e,t,n){const r=ze(t),o=Be(t),a=n==="fixed",s=mt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Le(0);function d(){l.x=Gn(o)}if(r||!r&&!a)if((Pt(t)!=="body"||Zt(o))&&(i=Hn(t)),r){const g=mt(t,!0,a,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else o&&d();a&&!r&&o&&d();const f=o&&!r&&!a?si(o,i):Le(0),m=s.left+i.scrollLeft-l.x-f.x,p=s.top+i.scrollTop-l.y-f.y;return{x:m,y:p,width:s.width,height:s.height}}function Hr(e){return Ae(e).position==="static"}function di(e,t){if(!ze(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Be(e)===n&&(n=n.ownerDocument.body),n}function ui(e,t){const n=Ee(e);if(Yn(e))return n;if(!ze(e)){let o=rt(e);for(;o&&!Dt(o);){if(je(o)&&!Hr(o))return o;o=rt(o)}return n}let r=di(e,t);for(;r&&Ym(r)&&Hr(r);)r=di(r,t);return r&&Dt(r)&&Hr(r)&&!Br(r)?n:r||Km(e)||n}const ch=async function(e){const t=this.getOffsetParent||ui,n=this.getDimensions,r=await n(e.floating);return{reference:lh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dh(e){return Ae(e).direction==="rtl"}const uh={convertOffsetParentRelativeRectToViewportRelativeRect:Jm,getDocumentElement:Be,getClippingRect:sh,getOffsetParent:ui,getElementRects:ch,getClientRects:eh,getDimensions:ih,getScale:jt,isElement:je,isRTL:dh};function fi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fh(e,t){let n=null,r;const o=Be(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const d=e.getBoundingClientRect(),{left:f,top:m,width:p,height:g}=d;if(i||t(),!p||!g)return;const b=$n(m),h=$n(o.clientWidth-(f+p)),v=$n(o.clientHeight-(m+g)),x=$n(f),w={rootMargin:-b+"px "+-h+"px "+-v+"px "+-x+"px",threshold:Ne(0,nt(1,l))||1};let S=!0;function k(_){const C=_[0].intersectionRatio;if(C!==l){if(!S)return s();C?s(!1,C):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!fi(d,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(k,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,w)}n.observe(e)}return s(!0),a}function mh(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=Yr(e),f=o||a?[...d?Qt(d):[],...Qt(t)]:[];f.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=d&&i?fh(d,n):null;let p=-1,g=null;s&&(g=new ResizeObserver(x=>{let[y]=x;y&&y.target===d&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),n()}),d&&!l&&g.observe(d),g.observe(t));let b,h=l?mt(e):null;l&&v();function v(){const x=mt(e);h&&!fi(h,x)&&n(),h=x,b=requestAnimationFrame(v)}return n(),()=>{var x;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),m==null||m(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const hh=Fm,ph=Lm,gh=Rm,bh=Bm,vh=Im,mi=Am,xh=$m,yh=(e,t,n)=>{const r=new Map,o={platform:uh,...n},a={...o.platform,_c:r};return jm(e,t,{...o,platform:a})};var wh=typeof document<"u",kh=function(){},Un=wh?M.useLayoutEffect:kh;function qn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!qn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function hi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pi(e,t){const n=hi(e);return Math.round(t*n)/n}function Gr(e){const t=u.useRef(e);return Un(()=>{t.current=e}),t}function Sh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=u.useState(r);qn(p,r)||g(r);const[b,h]=u.useState(null),[v,x]=u.useState(null),y=u.useCallback(P=>{P!==_.current&&(_.current=P,h(P))},[]),w=u.useCallback(P=>{P!==C.current&&(C.current=P,x(P))},[]),S=a||b,k=s||v,_=u.useRef(null),C=u.useRef(null),E=u.useRef(f),F=l!=null,Y=Gr(l),R=Gr(o),z=Gr(d),K=u.useCallback(()=>{if(!_.current||!C.current)return;const P={placement:t,strategy:n,middleware:p};R.current&&(P.platform=R.current),yh(_.current,C.current,P).then(te=>{const T={...te,isPositioned:z.current!==!1};H.current&&!qn(E.current,T)&&(E.current=T,gn.flushSync(()=>{m(T)}))})},[p,t,n,R,z]);Un(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,m(P=>({...P,isPositioned:!1})))},[d]);const H=u.useRef(!1);Un(()=>(H.current=!0,()=>{H.current=!1}),[]),Un(()=>{if(S&&(_.current=S),k&&(C.current=k),S&&k){if(Y.current)return Y.current(S,k,K);K()}},[S,k,K,Y,F]);const Z=u.useMemo(()=>({reference:_,floating:C,setReference:y,setFloating:w}),[y,w]),B=u.useMemo(()=>({reference:S,floating:k}),[S,k]),Q=u.useMemo(()=>{const P={position:n,left:0,top:0};if(!B.floating)return P;const te=pi(B.floating,f.x),T=pi(B.floating,f.y);return i?{...P,transform:"translate("+te+"px, "+T+"px)",...hi(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:T}},[n,i,B.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:K,refs:Z,elements:B,floatingStyles:Q}),[f,K,Z,B,Q])}const Ch=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mi({element:r.current,padding:o}).fn(n):{}:r?mi({element:r,padding:o}).fn(n):{}}}},Nh=(e,t)=>({...hh(e),options:[e,t]}),Eh=(e,t)=>({...ph(e),options:[e,t]}),_h=(e,t)=>({...xh(e),options:[e,t]}),Mh=(e,t)=>({...gh(e),options:[e,t]}),Oh=(e,t)=>({...bh(e),options:[e,t]}),Th=(e,t)=>({...vh(e),options:[e,t]}),Ph=(e,t)=>({...Ch(e),options:[e,t]});var Dh="Arrow",gi=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return c.jsx(U.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});gi.displayName=Dh;var jh=gi,Ur="Popper",[bi,At]=Ce(Ur),[Ah,vi]=bi(Ur),xi=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return c.jsx(Ah,{scope:t,anchor:r,onAnchorChange:o,children:n})};xi.displayName=Ur;var yi="PopperAnchor",wi=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=vi(yi,n),s=u.useRef(null),i=le(t,s),l=u.useRef(null);return u.useEffect(()=>{const d=l.current;l.current=(r==null?void 0:r.current)||s.current,d!==l.current&&a.onAnchorChange(l.current)}),r?null:c.jsx(U.div,{...o,ref:i})});wi.displayName=yi;var qr="PopperContent",[Rh,Ih]=bi(qr),ki=u.forwardRef((e,t)=>{var j,V,J,ne,se,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:b,...h}=e,v=vi(qr,n),[x,y]=u.useState(null),w=le(t,ke=>y(ke)),[S,k]=u.useState(null),_=yn(S),C=(_==null?void 0:_.width)??0,E=(_==null?void 0:_.height)??0,F=r+(a!=="center"?"-"+a:""),Y=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},R=Array.isArray(d)?d:[d],z=R.length>0,K={padding:Y,boundary:R.filter(Fh),altBoundary:z},{refs:H,floatingStyles:Z,placement:B,isPositioned:Q,middlewareData:P}=Sh({strategy:"fixed",placement:F,whileElementsMounted:(...ke)=>mh(...ke,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Nh({mainAxis:o+E,alignmentAxis:s}),l&&Eh({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?_h():void 0,...K}),l&&Mh({...K}),Oh({...K,apply:({elements:ke,rects:Oe,availableWidth:xt,availableHeight:yt})=>{const{width:wt,height:Wo}=Oe.reference,Vt=ke.floating.style;Vt.setProperty("--radix-popper-available-width",`${xt}px`),Vt.setProperty("--radix-popper-available-height",`${yt}px`),Vt.setProperty("--radix-popper-anchor-width",`${wt}px`),Vt.setProperty("--radix-popper-anchor-height",`${Wo}px`)}}),S&&Ph({element:S,padding:i}),Lh({arrowWidth:C,arrowHeight:E}),p&&Th({strategy:"referenceHidden",...K})]}),[te,T]=Ni(B),G=qe(b);be(()=>{Q&&(G==null||G())},[Q,G]);const O=(j=P.arrow)==null?void 0:j.x,A=(V=P.arrow)==null?void 0:V.y,W=((J=P.arrow)==null?void 0:J.centerOffset)!==0,[I,ee]=u.useState();return be(()=>{x&&ee(window.getComputedStyle(x).zIndex)},[x]),c.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:Q?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:I,"--radix-popper-transform-origin":[(ne=P.transformOrigin)==null?void 0:ne.x,(se=P.transformOrigin)==null?void 0:se.y].join(" "),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Rh,{scope:n,placedSide:te,onArrowChange:k,arrowX:O,arrowY:A,shouldHideArrow:W,children:c.jsx(U.div,{"data-side":te,"data-align":T,...h,ref:w,style:{...h.style,animation:Q?void 0:"none"}})})})});ki.displayName=qr;var Si="PopperArrow",Wh={top:"bottom",right:"left",bottom:"top",left:"right"},Ci=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Ih(Si,r),s=Wh[a.placedSide];return c.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:c.jsx(jh,{...o,ref:n,style:{...o.style,display:"block"}})})});Ci.displayName=Si;function Fh(e){return e!==null}var Lh=e=>({name:"transformOrigin",options:e,fn(t){var v,x,y;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,f]=Ni(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((x=o.arrow)==null?void 0:x.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let b="",h="";return d==="bottom"?(b=s?m:`${p}px`,h=`${-l}px`):d==="top"?(b=s?m:`${p}px`,h=`${r.floating.height+l}px`):d==="right"?(b=`${-l}px`,h=s?m:`${g}px`):d==="left"&&(b=`${r.floating.width+l}px`,h=s?m:`${g}px`),{data:{x:b,y:h}}}});function Ni(e){const[t,n="center"]=e.split("-");return[t,n]}var Kr=xi,Kn=wi,Xr=ki,Zr=Ci,Ei=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"}),$h="VisuallyHidden",_i=u.forwardRef((e,t)=>c.jsx(U.span,{...e,ref:t,style:{...Ei,...e.style}}));_i.displayName=$h;var Bh=_i,[Xn,C0]=Ce("Tooltip",[At]),Zn=At(),Mi="TooltipProvider",zh=700,Qr="tooltip.open",[Vh,Jr]=Xn(Mi),Oi=e=>{const{__scopeTooltip:t,delayDuration:n=zh,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=u.useRef(!0),i=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(Vh,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:u.useCallback(d=>{i.current=d},[]),disableHoverableContent:o,children:a})};Oi.displayName=Mi;var Jt="Tooltip",[Yh,en]=Xn(Jt),eo=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Jr(Jt,e.__scopeTooltip),d=Zn(t),[f,m]=u.useState(null),p=ye(),g=u.useRef(0),b=s??l.disableHoverableContent,h=i??l.delayDuration,v=u.useRef(!1),[x,y]=We({prop:r,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qr))):l.onClose(),a==null||a(C)},caller:Jt}),w=u.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,v.current=!1,y(!0)},[y]),k=u.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),_=u.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{v.current=!0,y(!0),g.current=0},h)},[h,y]);return u.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),c.jsx(Kr,{...d,children:c.jsx(Yh,{scope:t,contentId:p,open:x,stateAttribute:w,trigger:f,onTriggerChange:m,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayedRef.current?_():S()},[l.isOpenDelayedRef,_,S]),onTriggerLeave:u.useCallback(()=>{b?k():(window.clearTimeout(g.current),g.current=0)},[k,b]),onOpen:S,onClose:k,disableHoverableContent:b,children:n})})};eo.displayName=Jt;var to="TooltipTrigger",no=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=en(to,n),a=Jr(to,n),s=Zn(n),i=u.useRef(null),l=le(t,i,o.onTriggerChange),d=u.useRef(!1),f=u.useRef(!1),m=u.useCallback(()=>d.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),c.jsx(Kn,{asChild:!0,...s,children:c.jsx(U.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:X(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});no.displayName=to;var ro="TooltipPortal",[Hh,Gh]=Xn(ro,{forceMount:void 0}),Ti=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=en(ro,t);return c.jsx(Hh,{scope:t,forceMount:n,children:c.jsx(Pe,{present:n||a.open,children:c.jsx(Kt,{asChild:!0,container:o,children:r})})})};Ti.displayName=ro;var Rt="TooltipContent",oo=u.forwardRef((e,t)=>{const n=Gh(Rt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=en(Rt,e.__scopeTooltip);return c.jsx(Pe,{present:r||s.open,children:s.disableHoverableContent?c.jsx(Pi,{side:o,...a,ref:t}):c.jsx(Uh,{side:o,...a,ref:t})})}),Uh=u.forwardRef((e,t)=>{const n=en(Rt,e.__scopeTooltip),r=Jr(Rt,e.__scopeTooltip),o=u.useRef(null),a=le(t,o),[s,i]=u.useState(null),{trigger:l,onClose:d}=n,f=o.current,{onPointerInTransitChange:m}=r,p=u.useCallback(()=>{i(null),m(!1)},[m]),g=u.useCallback((b,h)=>{const v=b.currentTarget,x={x:b.clientX,y:b.clientY},y=Zh(x,v.getBoundingClientRect()),w=Qh(x,y),S=Jh(h.getBoundingClientRect()),k=tp([...w,...S]);i(k),m(!0)},[m]);return u.useEffect(()=>()=>p(),[p]),u.useEffect(()=>{if(l&&f){const b=v=>g(v,f),h=v=>g(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",h)}}},[l,f,g,p]),u.useEffect(()=>{if(s){const b=h=>{const v=h.target,x={x:h.clientX,y:h.clientY},y=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),w=!ep(x,s);y?p():w&&(p(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,s,d,p]),c.jsx(Pi,{...e,ref:a})}),[qh,Kh]=Xn(Jt,{isInside:!1}),Xh=ad("TooltipContent"),Pi=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=en(Rt,n),d=Zn(n),{onClose:f}=l;return u.useEffect(()=>(document.addEventListener(Qr,f),()=>document.removeEventListener(Qr,f)),[f]),u.useEffect(()=>{if(l.trigger){const m=p=>{const g=p.target;g!=null&&g.contains(l.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[l.trigger,f]),c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:c.jsxs(Xr,{"data-state":l.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Xh,{children:r}),c.jsx(qh,{scope:n,isInside:!0,children:c.jsx(Bh,{id:l.contentId,role:"tooltip",children:o||r})})]})})});oo.displayName=Rt;var Di="TooltipArrow",ji=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Zn(n);return Kh(Di,n).isInside?null:c.jsx(Zr,{...o,...r,ref:t})});ji.displayName=Di;function Zh(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qh(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Jh(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function ep(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],d=i.x,f=i.y,m=l.x,p=l.y;f>r!=p>r&&n<(m-d)*(r-f)/(p-f)+d&&(o=!o)}return o}function tp(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),np(t)}function np(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var rp=Oi,op=eo,ap=no,sp=Ti,ip=oo,lp=ji;function Ai({delayDuration:e=0,...t}){return c.jsx(rp,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cp({...e}){return c.jsx(Ai,{children:c.jsx(op,{"data-slot":"tooltip",...e})})}function dp({...e}){return c.jsx(ap,{"data-slot":"tooltip-trigger",...e})}function up({className:e,sideOffset:t=0,children:n,...r}){return c.jsx(sp,{children:c.jsxs(ip,{"data-slot":"tooltip-content",sideOffset:t,className:N("bg-neutral-black-1 text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 max-w-[362px]! origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs",e),...r,children:[n,c.jsx(lp,{className:"bg-neutral-black-1 fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Ri=({className:e,type:t,...n})=>c.jsx("input",{type:t,className:N("flex-1 h-10 bg-transparent outline-none placeholder:text-neutral-black-2 disabled:cursor-not-allowed disabled:opacity-50","text-black-1 text-sm","placeholder:text-neutral-black-2 placeholder:text-sm",e),...n}),fp=ge("flex items-center rounded-lg border transition-colors p-2",{variants:{size:{small:"h-6 w-80 text-sm px-2",medium:"h-10 w-92 text-base px-3"},status:{default:"border-neutral-black-4 text-foreground focus-within:ring-4 focus-within:ring-neutral-black-4",error:"border-error-1 text-primary-1 focus-within:ring-4 focus-within:ring-error-1",disabled:"border-neutral-black-4 bg-neutral-black-4 text-neutral-black-2 cursor-not-allowed"}},defaultVariants:{size:"medium",status:"default"}}),Ii=({size:e,status:t,startSlot:n,endSlot:r,className:o,disabled:a,...s})=>c.jsxs("div",{className:N(fp({size:e,status:t}),o),children:[n&&c.jsx("span",{className:"mr-2 flex-shrink-0",children:n}),c.jsx(Ri,{disabled:a,...s}),r&&c.jsx("span",{className:"ml-2 flex-shrink-0",children:r})]}),Wi=({children:e,className:t,...n})=>e==null?null:c.jsx("label",{className:N("text-sm font-normal text-neutral-black-1",t),...n,children:e}),Qn=({label:e,helperText:t,errorText:n,startSlot:r,endSlot:o,size:a="medium",className:s,disabled:i=!1,labelClassName:l,...d})=>c.jsxs("div",{className:"flex flex-col gap-1",children:[c.jsx(Wi,{className:l,children:e}),c.jsx(Ii,{size:a,status:n?"error":i?"disabled":"default",startSlot:r,endSlot:o,disabled:i,className:s,...d}),(t||n)&&c.jsx("p",{className:N("text-sm mt-1",n?"text-primary-1":"text-neutral-black-2"),children:n||t})]}),mp=({label:e="Password",showForgot:t=!1,forgotPasswordUrl:n="/forgot-password",onValidityChange:r,customValidator:o,showPasswordValidation:a=!0,labelClassName:s="",...i})=>{const[l,d]=M.useState(!1),[f,m]=M.useState(""),[p,g]=M.useState(!1),b=x=>[{label:"minimum 8 characters",isValid:x.length>=8},{label:"one uppercase character",isValid:/[A-Z]/.test(x)},{label:"one lowercase character",isValid:/[a-z]/.test(x)},{label:"one special character",isValid:/[^A-Za-z0-9]/.test(x)},{label:"one number",isValid:/\d/.test(x)}],h=M.useMemo(()=>a?o?o(f):b(f):[],[a,o,f]),v=h.every(x=>x.isValid);return M.useEffect(()=>{a&&r&&r(v,h)},[f,v,h,r,a]),c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[c.jsxs("div",{className:"flex justify-between items-center",children:[c.jsx("label",{className:N("text-sm font-medium text-neutral-0",s),children:e}),t&&c.jsx(Se,{className:"text-xs text-neutral-0 hover:underline bg-transparent p-0 hover:bg-transparent",variant:"primary",onClick:()=>{window.location.href=n},children:"Forgot Password?"})]}),c.jsx(Qn,{labelClassName:s,type:l?"text":"password",value:f,onChange:x=>m(x.target.value),onFocus:()=>g(!0),...i,endSlot:c.jsx(Se,{type:"button",className:"text-xs text-neutral-0 hover:underline bg-transparent p-0 hover:bg-transparent",variant:"primary",onClick:()=>d(!l),children:l?c.jsx(Gu,{size:24,className:"text-neutral-black-2"}):c.jsx(Uu,{size:24,className:"text-neutral-black-2"})})}),a&&c.jsx("div",{className:"grid grid-cols-2 gap-y-1 text-xs mt-3",children:h.map((x,y)=>c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:N("w-1.5 h-1.5 rounded-full transition-colors",x.isValid?"bg-success-1":p?"bg-primary-1":"bg-neutral-black-2")}),c.jsx("span",{className:N("transition-colors",x.isValid?"text-success-1":p?"text-primary-1":"text-neutral-black-2"),children:x.label})]},y))})]})})},hp=e=>c.jsx(Qn,{type:"search",startSlot:c.jsx(Qa,{"data-testid":"search-icon",className:"w-4 h-4 text-input-placeholder text-neutral-black-2"}),placeholder:"Search...",...e});function Fi(e,[t,n]){return Math.min(n,Math.max(t,e))}var pp=[" ","Enter","ArrowUp","ArrowDown"],gp=[" ","Enter"],ht="Select",[Jn,er,bp]=ba(ht),[It,N0]=Ce(ht,[bp,At]),tr=At(),[vp,ot]=It(ht),[xp,yp]=It(ht),Li=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:d,name:f,autoComplete:m,disabled:p,required:g,form:b}=e,h=tr(t),[v,x]=u.useState(null),[y,w]=u.useState(null),[S,k]=u.useState(!1),_=kn(d),[C,E]=We({prop:r,defaultProp:o??!1,onChange:a,caller:ht}),[F,Y]=We({prop:s,defaultProp:i,onChange:l,caller:ht}),R=u.useRef(null),z=v?b||!!v.closest("form"):!0,[K,H]=u.useState(new Set),Z=Array.from(K).map(B=>B.props.value).join(";");return c.jsx(Kr,{...h,children:c.jsxs(vp,{required:g,scope:t,trigger:v,onTriggerChange:x,valueNode:y,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:k,contentId:ye(),value:F,onValueChange:Y,open:C,onOpenChange:E,dir:_,triggerPointerDownPosRef:R,disabled:p,children:[c.jsx(Jn.Provider,{scope:t,children:c.jsx(xp,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(B=>{H(Q=>new Set(Q).add(B))},[]),onNativeOptionRemove:u.useCallback(B=>{H(Q=>{const P=new Set(Q);return P.delete(B),P})},[]),children:n})}),z?c.jsxs(cl,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:m,value:F,onChange:B=>Y(B.target.value),disabled:p,form:b,children:[F===void 0?c.jsx("option",{value:""}):null,Array.from(K)]},Z):null]})})};Li.displayName=ht;var $i="SelectTrigger",Bi=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=tr(n),s=ot($i,n),i=s.disabled||r,l=le(t,s.onTriggerChange),d=er(n),f=u.useRef("touch"),[m,p,g]=ul(h=>{const v=d().filter(w=>!w.disabled),x=v.find(w=>w.value===s.value),y=fl(v,h,x);y!==void 0&&s.onValueChange(y.value)}),b=h=>{i||(s.onOpenChange(!0),g()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return c.jsx(Kn,{asChild:!0,...a,children:c.jsx(U.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":dl(s.value)?"":void 0,...o,ref:l,onClick:X(o.onClick,h=>{h.currentTarget.focus(),f.current!=="mouse"&&b(h)}),onPointerDown:X(o.onPointerDown,h=>{f.current=h.pointerType;const v=h.target;v.hasPointerCapture(h.pointerId)&&v.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(b(h),h.preventDefault())}),onKeyDown:X(o.onKeyDown,h=>{const v=m.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&p(h.key),!(v&&h.key===" ")&&pp.includes(h.key)&&(b(),h.preventDefault())})})})});Bi.displayName=$i;var zi="SelectValue",Vi=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=ot(zi,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,m=le(t,l.onValueNodeChange);return be(()=>{d(f)},[d,f]),c.jsx(U.span,{...i,ref:m,style:{pointerEvents:"none"},children:dl(l.value)?c.jsx(c.Fragment,{children:s}):a})});Vi.displayName=zi;var wp="SelectIcon",Yi=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return c.jsx(U.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Yi.displayName=wp;var kp="SelectPortal",Hi=e=>c.jsx(Kt,{asChild:!0,...e});Hi.displayName=kp;var pt="SelectContent",Gi=u.forwardRef((e,t)=>{const n=ot(pt,e.__scopeSelect),[r,o]=u.useState();if(be(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?gn.createPortal(c.jsx(Ui,{scope:e.__scopeSelect,children:c.jsx(Jn.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),a):null}return c.jsx(qi,{...e,ref:t})});Gi.displayName=pt;var Re=10,[Ui,at]=It(pt),Sp="SelectContentImpl",Cp=dt("SelectContent.RemoveScroll"),qi=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:v,...x}=e,y=ot(pt,n),[w,S]=u.useState(null),[k,_]=u.useState(null),C=le(t,j=>S(j)),[E,F]=u.useState(null),[Y,R]=u.useState(null),z=er(n),[K,H]=u.useState(!1),Z=u.useRef(!1);u.useEffect(()=>{if(w)return Pr(w)},[w]),Nr();const B=u.useCallback(j=>{const[V,...J]=z().map(ie=>ie.ref.current),[ne]=J.slice(-1),se=document.activeElement;for(const ie of j)if(ie===se||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===V&&k&&(k.scrollTop=0),ie===ne&&k&&(k.scrollTop=k.scrollHeight),ie==null||ie.focus(),document.activeElement!==se))return},[z,k]),Q=u.useCallback(()=>B([E,w]),[B,E,w]);u.useEffect(()=>{K&&Q()},[K,Q]);const{onOpenChange:P,triggerPointerDownPosRef:te}=y;u.useEffect(()=>{if(w){let j={x:0,y:0};const V=ne=>{var se,ie;j={x:Math.abs(Math.round(ne.pageX)-(((se=te.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((ie=te.current)==null?void 0:ie.y)??0))}},J=ne=>{j.x<=10&&j.y<=10?ne.preventDefault():w.contains(ne.target)||P(!1),document.removeEventListener("pointermove",V),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,P,te]),u.useEffect(()=>{const j=()=>P(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[P]);const[T,G]=ul(j=>{const V=z().filter(se=>!se.disabled),J=V.find(se=>se.ref.current===document.activeElement),ne=fl(V,j,J);ne&&setTimeout(()=>ne.ref.current.focus())}),O=u.useCallback((j,V,J)=>{const ne=!Z.current&&!J;(y.value!==void 0&&y.value===V||ne)&&(F(j),ne&&(Z.current=!0))},[y.value]),A=u.useCallback(()=>w==null?void 0:w.focus(),[w]),W=u.useCallback((j,V,J)=>{const ne=!Z.current&&!J;(y.value!==void 0&&y.value===V||ne)&&R(j)},[y.value]),I=r==="popper"?ao:Ki,ee=I===ao?{side:i,sideOffset:l,align:d,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:g,sticky:b,hideWhenDetached:h,avoidCollisions:v}:{};return c.jsx(Ui,{scope:n,content:w,viewport:k,onViewportChange:_,itemRefCallback:O,selectedItem:E,onItemLeave:A,itemTextRefCallback:W,focusSelectedItem:Q,selectedItemText:Y,position:r,isPositioned:K,searchRef:T,children:c.jsx(An,{as:Cp,allowPinchZoom:!0,children:c.jsx(Mn,{asChild:!0,trapped:y.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:X(o,j=>{var V;(V=y.trigger)==null||V.focus({preventScroll:!0}),j.preventDefault()}),children:c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:c.jsx(I,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:j=>j.preventDefault(),...x,...ee,onPlaced:()=>H(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:X(x.onKeyDown,j=>{const V=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!V&&j.key.length===1&&G(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let ne=z().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(j.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const se=j.target,ie=ne.indexOf(se);ne=ne.slice(ie+1)}setTimeout(()=>B(ne)),j.preventDefault()}})})})})})})});qi.displayName=Sp;var Np="SelectItemAlignedPosition",Ki=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=ot(pt,n),s=at(pt,n),[i,l]=u.useState(null),[d,f]=u.useState(null),m=le(t,C=>f(C)),p=er(n),g=u.useRef(!1),b=u.useRef(!0),{viewport:h,selectedItem:v,selectedItemText:x,focusSelectedItem:y}=s,w=u.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&d&&h&&v&&x){const C=a.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),Y=x.getBoundingClientRect();if(a.dir!=="rtl"){const se=Y.left-E.left,ie=F.left-se,ke=C.left-ie,Oe=C.width+ke,xt=Math.max(Oe,E.width),yt=window.innerWidth-Re,wt=Fi(ie,[Re,Math.max(Re,yt-xt)]);i.style.minWidth=Oe+"px",i.style.left=wt+"px"}else{const se=E.right-Y.right,ie=window.innerWidth-F.right-se,ke=window.innerWidth-C.right-ie,Oe=C.width+ke,xt=Math.max(Oe,E.width),yt=window.innerWidth-Re,wt=Fi(ie,[Re,Math.max(Re,yt-xt)]);i.style.minWidth=Oe+"px",i.style.right=wt+"px"}const R=p(),z=window.innerHeight-Re*2,K=h.scrollHeight,H=window.getComputedStyle(d),Z=parseInt(H.borderTopWidth,10),B=parseInt(H.paddingTop,10),Q=parseInt(H.borderBottomWidth,10),P=parseInt(H.paddingBottom,10),te=Z+B+K+P+Q,T=Math.min(v.offsetHeight*5,te),G=window.getComputedStyle(h),O=parseInt(G.paddingTop,10),A=parseInt(G.paddingBottom,10),W=C.top+C.height/2-Re,I=z-W,ee=v.offsetHeight/2,j=v.offsetTop+ee,V=Z+B+j,J=te-V;if(V<=W){const se=R.length>0&&v===R[R.length-1].ref.current;i.style.bottom="0px";const ie=d.clientHeight-h.offsetTop-h.offsetHeight,ke=Math.max(I,ee+(se?A:0)+ie+Q),Oe=V+ke;i.style.height=Oe+"px"}else{const se=R.length>0&&v===R[0].ref.current;i.style.top="0px";const ke=Math.max(W,Z+h.offsetTop+(se?O:0)+ee)+J;i.style.height=ke+"px",h.scrollTop=V-W+h.offsetTop}i.style.margin=`${Re}px 0`,i.style.minHeight=T+"px",i.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,a.trigger,a.valueNode,i,d,h,v,x,a.dir,r]);be(()=>w(),[w]);const[S,k]=u.useState();be(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const _=u.useCallback(C=>{C&&b.current===!0&&(w(),y==null||y(),b.current=!1)},[w,y]);return c.jsx(_p,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:g,onScrollButtonChange:_,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(U.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ki.displayName=Np;var Ep="SelectPopperPosition",ao=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Re,...a}=e,s=tr(n);return c.jsx(Xr,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});ao.displayName=Ep;var[_p,so]=It(pt,{}),io="SelectViewport",Xi=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=at(io,n),s=so(io,n),i=le(t,a.onViewportChange),l=u.useRef(0);return c.jsxs(c.Fragment,{children:[c.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:r}),c.jsx(Jn.Slot,{scope:n,children:c.jsx(U.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:X(o.onScroll,d=>{const f=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&m){const g=Math.abs(l.current-f.scrollTop);if(g>0){const b=window.innerHeight-Re*2,h=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),x=Math.max(h,v);if(x<b){const y=x+g,w=Math.min(b,y),S=y-w;m.style.height=w+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Xi.displayName=io;var Zi="SelectGroup",[Mp,Op]=It(Zi),Qi=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ye();return c.jsx(Mp,{scope:n,id:o,children:c.jsx(U.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Qi.displayName=Zi;var Ji="SelectLabel",el=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Op(Ji,n);return c.jsx(U.div,{id:o.id,...r,ref:t})});el.displayName=Ji;var nr="SelectItem",[Tp,tl]=It(nr),nl=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=ot(nr,n),l=at(nr,n),d=i.value===r,[f,m]=u.useState(a??""),[p,g]=u.useState(!1),b=le(t,y=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,y,r,o)}),h=ye(),v=u.useRef("touch"),x=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new 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 c.jsx(Tp,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:u.useCallback(y=>{m(w=>w||((y==null?void 0:y.textContent)??"").trim())},[]),children:c.jsx(Jn.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:c.jsx(U.div,{role:"option","aria-labelledby":h,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:b,onFocus:X(s.onFocus,()=>g(!0)),onBlur:X(s.onBlur,()=>g(!1)),onClick:X(s.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:X(s.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:X(s.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:X(s.onPointerMove,y=>{var w;v.current=y.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(s.onPointerLeave,y=>{var w;y.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:X(s.onKeyDown,y=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&y.key===" "||(gp.includes(y.key)&&x(),y.key===" "&&y.preventDefault())})})})})});nl.displayName=nr;var tn="SelectItemText",rl=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=ot(tn,n),i=at(tn,n),l=tl(tn,n),d=yp(tn,n),[f,m]=u.useState(null),p=le(t,x=>m(x),l.onItemTextChange,x=>{var y;return(y=i.itemTextRefCallback)==null?void 0:y.call(i,x,l.value,l.disabled)}),g=f==null?void 0:f.textContent,b=u.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:h,onNativeOptionRemove:v}=d;return be(()=>(h(b),()=>v(b)),[h,v,b]),c.jsxs(c.Fragment,{children:[c.jsx(U.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?gn.createPortal(a.children,s.valueNode):null]})});rl.displayName=tn;var ol="SelectItemIndicator",al=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return tl(ol,n).isSelected?c.jsx(U.span,{"aria-hidden":!0,...r,ref:t}):null});al.displayName=ol;var lo="SelectScrollUpButton",sl=u.forwardRef((e,t)=>{const n=at(lo,e.__scopeSelect),r=so(lo,e.__scopeSelect),[o,a]=u.useState(!1),s=le(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollTop>0;a(d)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});sl.displayName=lo;var co="SelectScrollDownButton",il=u.forwardRef((e,t)=>{const n=at(co,e.__scopeSelect),r=so(co,e.__scopeSelect),[o,a]=u.useState(!1),s=le(t,r.onScrollButtonChange);return be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const d=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<d;a(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?c.jsx(ll,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});il.displayName=co;var ll=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=at("SelectScrollButton",n),s=u.useRef(null),i=er(n),l=u.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return u.useEffect(()=>()=>l(),[l]),be(()=>{var f;const d=i().find(m=>m.ref.current===document.activeElement);(f=d==null?void 0:d.ref.current)==null||f.scrollIntoView({block:"nearest"})},[i]),c.jsx(U.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:X(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var d;(d=a.onItemLeave)==null||d.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{l()})})}),Pp="SelectSeparator",Dp=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(U.div,{"aria-hidden":!0,...r,ref:t})});Dp.displayName=Pp;var uo="SelectArrow",jp=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=tr(n),a=ot(uo,n),s=at(uo,n);return a.open&&s.position==="popper"?c.jsx(Zr,{...o,...r,ref:t}):null});jp.displayName=uo;var Ap="SelectBubbleInput",cl=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),a=le(r,o),s=xn(t);return u.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&f){const m=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(m)}},[s,t]),c.jsx(U.select,{...n,style:{...Ei,...n.style},ref:a,defaultValue:t})});cl.displayName=Ap;function dl(e){return e===""||e===void 0}function ul(e){const t=qe(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(s=>{const i=n.current+s;t(i),function l(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function fl(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Rp(e,Math.max(a,0));o.length===1&&(s=s.filter(d=>d!==n));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Rp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ip=Li,Wp=Bi,Fp=Vi,Lp=Yi,$p=Hi,Bp=Gi,zp=Xi,Vp=Qi,Yp=el,Hp=nl,Gp=rl,Up=al,qp=sl,Kp=il;function ml({...e}){return c.jsx(Ip,{"data-slot":"select",...e})}function Xp({...e}){return c.jsx(Vp,{"data-slot":"select-group",...e})}function Zp({...e}){return c.jsx(Fp,{"data-slot":"select-value",...e})}function hl({className:e,size:t="default",children:n,...r}){return c.jsxs(Wp,{"data-slot":"select-trigger","data-size":t,className:N("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,c.jsx(Lp,{asChild:!0,children:c.jsx(Nt,{className:"size-4 opacity-50"})})]})}function pl({className:e,children:t,position:n="popper",...r}){return c.jsx($p,{children:c.jsxs(Bp,{"data-slot":"select-content",className:N("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="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",e),position:n,...r,children:[c.jsx(Jp,{}),c.jsx(zp,{className:N("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(eg,{})]})})}function Qp({className:e,...t}){return c.jsx(Yp,{"data-slot":"select-label",className:N("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function fo({className:e,children:t,...n}){return c.jsxs(Hp,{"data-slot":"select-item",className:N("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(Up,{children:c.jsx(Za,{className:"size-4"})})}),c.jsx(Gp,{children:t})]})}function Jp({className:e,...t}){return c.jsx(qp,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Vu,{className:"size-4"})})}function eg({className:e,...t}){return c.jsx(Kp,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(Nt,{className:"size-4"})})}const tg=({label:e="Phone number",helperText:t,errorText:n,size:r="medium",disabled:o,labelClassName:a,country:s,onCountryChange:i,countryOptions:l,showDialCode:d=!0,className:f,onValidityChange:m,includeDialCodeInValue:p=!0,...g})=>{const[b,h]=M.useState(!1),v=s||"US",x=M.useMemo(()=>l.find(R=>R.value===v)??{value:"US",label:"US",dialCode:"+1"},[l,v]),y=R=>{const K=(typeof R=="string"?R:Array.isArray(R)?R.join(""):String(R??"")).replace(/\D/g,"");return K.length===11&&K.startsWith("1")?!0:K.length===10},w=R=>{const z=(x==null?void 0:x.dialCode)??"";if(!z)return R;const K=R.replace(/\D/g,""),H=z.replace(/\D/g,"");return K.startsWith(H)?`+${K}`:`${z}${K}`.replace(/^\+?/,"+")},S=g.value??"";M.useEffect(()=>{if(!m)return;const R=v==="US"?y(S):!0;m(R)},[v,S,m]);const k=c.jsxs(ml,{value:v,onValueChange:i,disabled:!0,children:[c.jsx(hl,{className:N("border-0 bg-transparent px-0 py-0 h-auto shadow-none focus-visible:ring-0 focus-visible:border-0 text-neutral-black-1","min-w-14"),children:c.jsxs("div",{className:"flex items-center gap-2",children:[(x==null?void 0:x.flag)&&c.jsx("span",{className:"flex-shrink-0",children:x.flag}),c.jsx("span",{className:"text-sm text-neutral-black-1",children:(x==null?void 0:x.label)??v})]})}),c.jsx(pl,{className:"bg-white border border-neutral-black-4",children:l.map(R=>c.jsx(fo,{value:R.value,disabled:R.disabled,children:c.jsxs("span",{className:"flex items-center gap-2",children:[R.flag,c.jsx("span",{children:R.label}),d&&c.jsx("span",{className:"text-neutral-black-3 ml-1",children:R.dialCode})]})},R.value))})]}),_=d&&(x!=null&&x.dialCode)?`${x.dialCode} `:"",C=g.value,F=v==="US"&&b&&!!C&&!y(C)?"Enter a valid number":n,Y=p&&typeof C=="string"?w(C):C;return c.jsx(Qn,{label:e,helperText:t,errorText:F,size:r,disabled:o,labelClassName:a,startSlot:k,className:f,inputMode:"tel",type:"tel",placeholder:g.placeholder??`${_}(234) 567 8900`,value:Y,onBlur:R=>{var z;h(!0),(z=g.onBlur)==null||z.call(g,R)},onChange:R=>{var z,K;if(b||h(!0),p){const H=w(R.target.value),Z={...R,target:{...R.target,value:H},currentTarget:{...R.currentTarget,value:H}};(z=g.onChange)==null||z.call(g,Z)}else(K=g.onChange)==null||K.call(g,R)},...g})};var rr="Popover",[gl,E0]=Ce(rr,[At]),nn=At(),[ng,st]=gl(rr),bl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=nn(t),l=u.useRef(null),[d,f]=u.useState(!1),[m,p]=We({prop:r,defaultProp:o??!1,onChange:a,caller:rr});return c.jsx(Kr,{...i,children:c.jsx(ng,{scope:t,contentId:ye(),triggerRef:l,open:m,onOpenChange:p,onOpenToggle:u.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:d,onCustomAnchorAdd:u.useCallback(()=>f(!0),[]),onCustomAnchorRemove:u.useCallback(()=>f(!1),[]),modal:s,children:n})})};bl.displayName=rr;var vl="PopoverAnchor",rg=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(vl,n),a=nn(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return u.useEffect(()=>(s(),()=>i()),[s,i]),c.jsx(Kn,{...a,...r,ref:t})});rg.displayName=vl;var xl="PopoverTrigger",yl=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(xl,n),a=nn(n),s=le(t,o.triggerRef),i=c.jsx(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Nl(o.open),...r,ref:s,onClick:X(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(Kn,{asChild:!0,...a,children:i})});yl.displayName=xl;var mo="PopoverPortal",[og,ag]=gl(mo,{forceMount:void 0}),wl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=st(mo,t);return c.jsx(og,{scope:t,forceMount:n,children:c.jsx(Pe,{present:n||a.open,children:c.jsx(Kt,{asChild:!0,container:o,children:r})})})};wl.displayName=mo;var Wt="PopoverContent",kl=u.forwardRef((e,t)=>{const n=ag(Wt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=st(Wt,e.__scopePopover);return c.jsx(Pe,{present:r||a.open,children:a.modal?c.jsx(ig,{...o,ref:t}):c.jsx(lg,{...o,ref:t})})});kl.displayName=Wt;var sg=dt("PopoverContent.RemoveScroll"),ig=u.forwardRef((e,t)=>{const n=st(Wt,e.__scopePopover),r=u.useRef(null),o=le(t,r),a=u.useRef(!1);return u.useEffect(()=>{const s=r.current;if(s)return Pr(s)},[]),c.jsx(An,{as:sg,allowPinchZoom:!0,children:c.jsx(Sl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,d=i.button===2||l;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),lg=u.forwardRef((e,t)=>{const n=st(Wt,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return c.jsx(Sl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Sl=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,...m}=e,p=st(Wt,n),g=nn(n);return Nr(),c.jsx(Mn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:c.jsx(qt,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>p.onOpenChange(!1),children:c.jsx(Xr,{"data-state":Nl(p.open),role:"dialog",id:p.contentId,...g,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Cl="PopoverClose",cg=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=st(Cl,n);return c.jsx(U.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});cg.displayName=Cl;var dg="PopoverArrow",ug=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=nn(n);return c.jsx(Zr,{...o,...r,ref:t})});ug.displayName=dg;function Nl(e){return e?"open":"closed"}var fg=bl,mg=yl,hg=wl,pg=kl;function El({...e}){return c.jsx(fg,{"data-slot":"popover",...e})}function _l({...e}){return c.jsx(mg,{"data-slot":"popover-trigger",...e})}function ho({className:e,align:t="center",sideOffset:n=4,...r}){return c.jsx(hg,{children:c.jsx(pg,{"data-slot":"popover-content",align:t,sideOffset:n,className:N("bg-white text-black 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}var Ml=1,gg=.9,bg=.8,vg=.17,po=.1,go=.999,xg=.9999,yg=.99,wg=/[\\\/_+.#"@\[\(\{&]/,kg=/[\\\/_+.#"@\[\(\{&]/g,Sg=/[\s-]/,Ol=/[\s-]/g;function bo(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?Ml:yg;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),d=n.indexOf(l,o),f=0,m,p,g,b;d>=0;)m=bo(e,t,n,r,d+1,a+1,s),m>f&&(d===o?m*=Ml:wg.test(e.charAt(d-1))?(m*=bg,g=e.slice(o,d-1).match(kg),g&&o>0&&(m*=Math.pow(go,g.length))):Sg.test(e.charAt(d-1))?(m*=gg,b=e.slice(o,d-1).match(Ol),b&&o>0&&(m*=Math.pow(go,b.length))):(m*=vg,o>0&&(m*=Math.pow(go,d-o))),e.charAt(d)!==t.charAt(a)&&(m*=xg)),(m<po&&n.charAt(d-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(d-1)!==r.charAt(a))&&(p=bo(e,t,n,r,d+1,a+2,s),p*po>m&&(m=p*po)),m>f&&(f=m),d=n.indexOf(l,d+1);return s[i]=f,f}function Tl(e){return e.toLowerCase().replace(Ol," ")}function Cg(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,bo(e,t,Tl(e),Tl(t),0,0,{})}var rn='[cmdk-group=""]',vo='[cmdk-group-items=""]',Ng='[cmdk-group-heading=""]',Pl='[cmdk-item=""]',Dl=`${Pl}:not([aria-disabled="true"])`,xo="cmdk-item-select",Ft="data-value",Eg=(e,t,n)=>Cg(e,t,n),jl=u.createContext(void 0),on=()=>u.useContext(jl),Al=u.createContext(void 0),yo=()=>u.useContext(Al),Rl=u.createContext(void 0),Il=u.forwardRef((e,t)=>{let n=Lt(()=>{var O,A;return{search:"",value:(A=(O=e.value)!=null?O:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Lt(()=>new Set),o=Lt(()=>new Map),a=Lt(()=>new Map),s=Lt(()=>new Set),i=Wl(e),{label:l,children:d,value:f,onValueChange:m,filter:p,shouldFilter:g,loop:b,disablePointerSelection:h=!1,vimBindings:v=!0,...x}=e,y=ye(),w=ye(),S=ye(),k=u.useRef(null),_=Wg();gt(()=>{if(f!==void 0){let O=f.trim();n.current.value=O,C.emit()}},[f]),gt(()=>{_(6,K)},[]);let C=u.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,A,W)=>{var I,ee,j,V;if(!Object.is(n.current[O],A)){if(n.current[O]=A,O==="search")z(),Y(),_(1,R);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(S);J?J.focus():(I=document.getElementById(y))==null||I.focus()}if(_(7,()=>{var J;n.current.selectedItemId=(J=H())==null?void 0:J.id,C.emit()}),W||_(5,K),((ee=i.current)==null?void 0:ee.value)!==void 0){let J=A??"";(V=(j=i.current).onValueChange)==null||V.call(j,J);return}}C.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=u.useMemo(()=>({value:(O,A,W)=>{var I;A!==((I=a.current.get(O))==null?void 0:I.value)&&(a.current.set(O,{value:A,keywords:W}),n.current.filtered.items.set(O,F(A,W)),_(2,()=>{Y(),C.emit()}))},item:(O,A)=>(r.current.add(O),A&&(o.current.has(A)?o.current.get(A).add(O):o.current.set(A,new Set([O]))),_(3,()=>{z(),Y(),n.current.value||R(),C.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let W=H();_(4,()=>{z(),(W==null?void 0:W.getAttribute("id"))===O&&R(),C.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:S,labelId:w,listInnerRef:k}),[]);function F(O,A){var W,I;let ee=(I=(W=i.current)==null?void 0:W.filter)!=null?I:Eg;return O?ee(O,n.current.search,A):0}function Y(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(I=>{let ee=o.current.get(I),j=0;ee.forEach(V=>{let J=O.get(V);j=Math.max(J,j)}),A.push([I,j])});let W=k.current;Z().sort((I,ee)=>{var j,V;let J=I.getAttribute("id"),ne=ee.getAttribute("id");return((j=O.get(ne))!=null?j:0)-((V=O.get(J))!=null?V:0)}).forEach(I=>{let ee=I.closest(vo);ee?ee.appendChild(I.parentElement===ee?I:I.closest(`${vo} > *`)):W.appendChild(I.parentElement===W?I:I.closest(`${vo} > *`))}),A.sort((I,ee)=>ee[1]-I[1]).forEach(I=>{var ee;let j=(ee=k.current)==null?void 0:ee.querySelector(`${rn}[${Ft}="${encodeURIComponent(I[0])}"]`);j==null||j.parentElement.appendChild(j)})}function R(){let O=Z().find(W=>W.getAttribute("aria-disabled")!=="true"),A=O==null?void 0:O.getAttribute(Ft);C.setState("value",A||void 0)}function z(){var O,A,W,I;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let ee=0;for(let j of r.current){let V=(A=(O=a.current.get(j))==null?void 0:O.value)!=null?A:"",J=(I=(W=a.current.get(j))==null?void 0:W.keywords)!=null?I:[],ne=F(V,J);n.current.filtered.items.set(j,ne),ne>0&&ee++}for(let[j,V]of o.current)for(let J of V)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(j);break}n.current.filtered.count=ee}function K(){var O,A,W;let I=H();I&&(((O=I.parentElement)==null?void 0:O.firstChild)===I&&((W=(A=I.closest(rn))==null?void 0:A.querySelector(Ng))==null||W.scrollIntoView({block:"nearest"})),I.scrollIntoView({block:"nearest"}))}function H(){var O;return(O=k.current)==null?void 0:O.querySelector(`${Pl}[aria-selected="true"]`)}function Z(){var O;return Array.from(((O=k.current)==null?void 0:O.querySelectorAll(Dl))||[])}function B(O){let A=Z()[O];A&&C.setState("value",A.getAttribute(Ft))}function Q(O){var A;let W=H(),I=Z(),ee=I.findIndex(V=>V===W),j=I[ee+O];(A=i.current)!=null&&A.loop&&(j=ee+O<0?I[I.length-1]:ee+O===I.length?I[0]:I[ee+O]),j&&C.setState("value",j.getAttribute(Ft))}function P(O){let A=H(),W=A==null?void 0:A.closest(rn),I;for(;W&&!I;)W=O>0?Rg(W,rn):Ig(W,rn),I=W==null?void 0:W.querySelector(Dl);I?C.setState("value",I.getAttribute(Ft)):Q(O)}let te=()=>B(Z().length-1),T=O=>{O.preventDefault(),O.metaKey?te():O.altKey?P(1):Q(1)},G=O=>{O.preventDefault(),O.metaKey?B(0):O.altKey?P(-1):Q(-1)};return u.createElement(U.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:O=>{var A;(A=x.onKeyDown)==null||A.call(x,O);let W=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||W))switch(O.key){case"n":case"j":{v&&O.ctrlKey&&T(O);break}case"ArrowDown":{T(O);break}case"p":case"k":{v&&O.ctrlKey&&G(O);break}case"ArrowUp":{G(O);break}case"Home":{O.preventDefault(),B(0);break}case"End":{O.preventDefault(),te();break}case"Enter":{O.preventDefault();let I=H();if(I){let ee=new Event(xo);I.dispatchEvent(ee)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Lg},l),or(e,O=>u.createElement(Al.Provider,{value:C},u.createElement(jl.Provider,{value:E},O))))}),_g=u.forwardRef((e,t)=>{var n,r;let o=ye(),a=u.useRef(null),s=u.useContext(Rl),i=on(),l=Wl(e),d=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;gt(()=>{if(!d)return i.item(o,s==null?void 0:s.id)},[d]);let f=Fl(o,a,[e.value,e.children,a],e.keywords),m=yo(),p=it(_=>_.value&&_.value===f.current),g=it(_=>d||i.filter()===!1?!0:_.search?_.filtered.items.get(o)>0:!0);u.useEffect(()=>{let _=a.current;if(!(!_||e.disabled))return _.addEventListener(xo,b),()=>_.removeEventListener(xo,b)},[g,e.onSelect,e.disabled]);function b(){var _,C;h(),(C=(_=l.current).onSelect)==null||C.call(_,f.current)}function h(){m.setState("value",f.current,!0)}if(!g)return null;let{disabled:v,value:x,onSelect:y,forceMount:w,keywords:S,...k}=e;return u.createElement(U.div,{ref:ct(a,t),...k,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||i.getDisablePointerSelection()?void 0:h,onClick:v?void 0:b},e.children)}),Mg=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ye(),i=u.useRef(null),l=u.useRef(null),d=ye(),f=on(),m=it(g=>o||f.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);gt(()=>f.group(s),[]),Fl(s,i,[e.value,e.heading,l]);let p=u.useMemo(()=>({id:s,forceMount:o}),[o]);return u.createElement(U.div,{ref:ct(i,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&u.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),or(e,g=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},u.createElement(Rl.Provider,{value:p},g))))}),Og=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),a=it(s=>!s.search);return!n&&!a?null:u.createElement(U.div,{ref:ct(o,t),...r,"cmdk-separator":"",role:"separator"})}),Tg=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=yo(),s=it(d=>d.search),i=it(d=>d.selectedItemId),l=on();return u.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),u.createElement(U.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:d=>{o||a.setState("search",d.target.value),n==null||n(d.target.value)}})}),Pg=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=u.useRef(null),s=u.useRef(null),i=it(d=>d.selectedItemId),l=on();return u.useEffect(()=>{if(s.current&&a.current){let d=s.current,f=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let g=d.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(d),()=>{cancelAnimationFrame(m),p.unobserve(d)}}},[]),u.createElement(U.div,{ref:ct(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},or(e,d=>u.createElement("div",{ref:ct(s,l.listInnerRef),"cmdk-list-sizer":""},d)))}),Dg=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return u.createElement(Bs,{open:n,onOpenChange:r},u.createElement(zs,{container:s},u.createElement(Vs,{"cmdk-overlay":"",className:o}),u.createElement(Ys,{"aria-label":e.label,"cmdk-dialog":"",className:a},u.createElement(Il,{ref:t,...i}))))}),jg=u.forwardRef((e,t)=>it(n=>n.filtered.count===0)?u.createElement(U.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ag=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return u.createElement(U.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},or(e,s=>u.createElement("div",{"aria-hidden":!0},s)))}),an=Object.assign(Il,{List:Pg,Item:_g,Input:Tg,Group:Mg,Separator:Og,Dialog:Dg,Empty:jg,Loading:Ag});function Rg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ig(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Wl(e){let t=u.useRef(e);return gt(()=>{t.current=e}),t}var gt=typeof window>"u"?u.useEffect:u.useLayoutEffect;function Lt(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function it(e){let t=yo(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function Fl(e,t,n,r=[]){let o=u.useRef(),a=on();return gt(()=>{var s;let i=(()=>{var d;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(d=f.current.textContent)==null?void 0:d.trim():o.current}})(),l=r.map(d=>d.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(Ft,i),o.current=i}),o}var Wg=()=>{let[e,t]=u.useState(),n=Lt(()=>new Map);return gt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Fg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function or({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(Fg(t),{ref:t.ref},n(t.props.children)):n(t)}var Lg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function $g({className:e,...t}){return c.jsx(an,{"data-slot":"command",className:N("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Bg({className:e,...t}){return c.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[c.jsx(Qa,{className:"size-4 shrink-0 opacity-50"}),c.jsx(an.Input,{"data-slot":"command-input",className:N("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function zg({...e}){return c.jsx(an.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Ll({className:e,...t}){return c.jsx(an.Group,{"data-slot":"command-group",className:N("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function $l({className:e,...t}){return c.jsx(an.Item,{"data-slot":"command-item",className:N("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function wo(e){return e.length>0&&e[0].kind==="group"}function Vg(e){return e.multiple?c.jsx(zl,{...e}):c.jsx(Bl,{...e})}const Bl=({options:e,placeholder:t="Select...",disabled:n,error:r,helperText:o,value:a,onChange:s})=>{const[i,l]=M.useState(""),d=a??i,f=m=>{l(m),s==null||s(m)};return c.jsxs("div",{children:[c.jsxs(ml,{value:d,onValueChange:f,disabled:n,children:[c.jsx(hl,{"aria-invalid":!!r,className:N("flex w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm",n&&"cursor-not-allowed bg-neutral-black-4 border border-neutral-black-4 rounded",r?"border-primary-1":"border-neutral-black-4"),children:c.jsx(Zp,{placeholder:t})}),c.jsx(pl,{className:"w-full bg-white border border-neutral-black-4",children:wo(e)?e.map(m=>c.jsxs(Xp,{className:"p-2",children:[c.jsx(Qp,{children:m.label}),m.options.map(p=>c.jsx(fo,{value:p.value,disabled:p.disabled,children:p.label},p.value))]},m.label)):e.map(m=>c.jsx(fo,{value:m.value,disabled:m.disabled,className:"hover:cursor-pointer hover:bg-neutral-black-5",children:m.label},m.value))})]}),r&&c.jsx("p",{className:"mt-1 text-xs text-primary-1",children:r}),o&&c.jsx("p",{className:"mt-1 text-xs text-neutral-black-3",children:o})]})},zl=({options:e,placeholder:t="Select...",disabled:n,error:r,helperText:o,value:a,onChange:s})=>{const[i,l]=M.useState(!1),[d,f]=M.useState([]),m=a??d,p=M.useMemo(()=>wo(e)?e.flatMap(b=>b.options):e,[e]),g=b=>{const h=m.includes(b)?m.filter(v=>v!==b):[...m,b];f(h),s==null||s(h)};return c.jsxs("div",{className:"w-94",children:[c.jsxs(El,{open:i,onOpenChange:l,children:[c.jsx(_l,{asChild:!0,children:c.jsxs("button",{type:"button",disabled:n,"aria-haspopup":"listbox","aria-expanded":i,className:N("flex w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm",n&&"cursor-not-allowed bg-neutral-black-4 border border-neutral-black-4 rounded",r?"border-primary-1":"border-neutral-black-4"),children:[c.jsx("div",{className:"flex flex-wrap gap-1",children:m.length>0?m.map(b=>c.jsxs(Rr,{type:"outline",onClick:h=>{h.stopPropagation(),g(b)},className:"cursor-pointer border-neutral-black-4 bg-transparent hover:bg-neutral-black-4",children:[c.jsx("span",{className:"text-neutral-black-1",children:b}),c.jsx("div",{className:"flex items-center justify-center rounded-full border border-neutral-black-2 h-5 w-5 ml-1",children:c.jsx(es,{className:"h-3 w-3 text-neutral-black-1",strokeWidth:2})})]},b)):c.jsx("span",{className:"truncate text-xs text-neutral-black-1",children:t})}),c.jsx(Nt,{className:"h-4 w-4 text-neutral-black-1"})]})}),c.jsx(ho,{className:"p-0 w-full bg-white border border-neutral-black-4",children:c.jsxs($g,{className:"w-full",children:[c.jsx(Bg,{placeholder:"Search..."}),c.jsx(zg,{children:"No results found."}),wo(e)?e.map(b=>c.jsx(Ll,{heading:b.label,children:b.options.map(h=>c.jsxs($l,{value:h.label,onSelect:()=>!h.disabled&&g(h.value),disabled:h.disabled,children:[c.jsx("input",{type:"checkbox",readOnly:!0,checked:m.includes(h.value),className:"mr-2"}),h.label]},h.value))},b.label)):c.jsx(Ll,{children:p.map(b=>c.jsxs($l,{value:b.label,onSelect:()=>!b.disabled&&g(b.value),disabled:b.disabled,children:[c.jsx("input",{type:"checkbox",readOnly:!0,checked:m.includes(b.value),className:"mr-2"}),b.label]},b.value))})]})})]}),r&&c.jsx("p",{className:"mt-1 text-xs text-primary-1",children:r}),o&&c.jsx("p",{className:"mt-1 text-xs text-neutral-black-3",children:o})]})},Yg=ge("w-full",{variants:{variant:{"widget-1":"bg-white rounded-lg p-6 flex flex-col items-start gap-4 shadow-[0_0_8px_0_rgba(0,0,0,0.08),6px_0_0_0_var(--card-shadow-color,var(--color-primary-1))_inset]","widget-2":"bg-white rounded-lg p-6 flex flex-col items-start gap-4 border border-neutral-black-4 shadow-[0_0_8px_0_rgba(0,0,0,0.08)]"}},defaultVariants:{variant:"widget-1"}});function Hg({className:e,variant:t,asChild:n=!1,children:r,shadowColor:o,...a}){const s=n?Ge:"div",i=o?{"--card-shadow-color":o.startsWith("--")?`var(${o})`:o}:void 0;return c.jsx(s,{"data-slot":"card",className:N(Yg({variant:t}),e),style:i,...a,children:r})}var ko={exports:{}},So={};/**
182
182
  * @license React
183
183
  * use-sync-external-store-shim.production.js
184
184
  *