rently-components 0.1.36 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +6 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8292,7 +8292,7 @@ const Yd = ({
|
|
|
8292
8292
|
{
|
|
8293
8293
|
sideOffset: 8,
|
|
8294
8294
|
className: X(
|
|
8295
|
-
"animate-popover-in text-sm p-5 bg-bg-1 border border-border-2 rounded-lg",
|
|
8295
|
+
"animate-popover-in text-sm p-5 bg-bg-1 border border-border-2 rounded-lg z-999",
|
|
8296
8296
|
n
|
|
8297
8297
|
),
|
|
8298
8298
|
...s,
|
|
@@ -8346,14 +8346,16 @@ const Yd = ({
|
|
|
8346
8346
|
n(`${c.code} ${f}`), i(!1);
|
|
8347
8347
|
},
|
|
8348
8348
|
className: X(
|
|
8349
|
-
"px-2 py-2 bg-bg-1 rounded-lg hover:bg-bg-2 justify-between items-center text-sm cursor-pointer flex",
|
|
8349
|
+
"px-2 text-text-1 py-2 bg-bg-1 rounded-lg hover:bg-bg-2 justify-between items-center text-sm cursor-pointer flex",
|
|
8350
8350
|
l && "bg-bg-2"
|
|
8351
8351
|
),
|
|
8352
8352
|
children: [
|
|
8353
|
-
/* @__PURE__ */ p.jsxs("
|
|
8353
|
+
/* @__PURE__ */ p.jsxs("p", { children: [
|
|
8354
8354
|
c.flag,
|
|
8355
8355
|
" ",
|
|
8356
|
-
c.name
|
|
8356
|
+
c.name,
|
|
8357
|
+
" ",
|
|
8358
|
+
c.code
|
|
8357
8359
|
] }),
|
|
8358
8360
|
l && /* @__PURE__ */ p.jsx(zs, { className: "w-3 h-3 text-text-2" })
|
|
8359
8361
|
]
|
package/dist/index.umd.js
CHANGED
|
@@ -47,4 +47,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
47
47
|
|
|
48
48
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
49
49
|
|
|
50
|
-
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},wc="DialogDescriptionWarning",Sc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${no(wc).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Cc=zr,Ec=Vr,Pc=Ur,Rc=Gr,_c=Kr,Ac=Xr,kc=Zr,Oc=eo;function ro(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function oo(e){const[t,n]=u.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Nc=["top","right","bottom","left"],_e=Math.min,le=Math.max,Tt=Math.round,Mt=Math.floor,ve=e=>({x:e,y:e}),Tc={left:"right",right:"left",bottom:"top",top:"bottom"},Mc={start:"end",end:"start"};function bn(e,t,n){return le(e,_e(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function yn(e){return e==="x"?"y":"x"}function wn(e){return e==="y"?"height":"width"}const Dc=new Set(["top","bottom"]);function xe(e){return Dc.has(Ce(e))?"y":"x"}function Sn(e){return yn(xe(e))}function jc(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Sn(e),s=wn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Dt(i)),[i,Dt(i)]}function Ic(e){const t=Dt(e);return[Cn(e),t,Cn(t)]}function Cn(e){return e.replace(/start|end/g,t=>Mc[t])}const so=["left","right"],io=["right","left"],$c=["top","bottom"],Lc=["bottom","top"];function Fc(e,t,n){switch(e){case"top":case"bottom":return n?t?io:so:t?so:io;case"left":case"right":return t?$c:Lc;default:return[]}}function Wc(e,t,n,r){const o=Je(e);let s=Fc(Ce(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Cn)))),s}function Dt(e){return e.replace(/left|right|bottom|top/g,t=>Tc[t])}function Bc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ao(e){return typeof e!="number"?Bc(e):{top:e,right:e,bottom:e,left:e}}function jt(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 co(e,t,n){let{reference:r,floating:o}=e;const s=xe(t),i=Sn(t),a=wn(i),c=Ce(t),l=s==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,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(Je(t)){case"start":g[i]-=h*(n&&l?-1:1);break;case"end":g[i]+=h*(n&&l?-1:1);break}return g}const zc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=co(l,r,c),h=r,g={},b=0;for(let d=0;d<a.length;d++){const{name:v,fn:S}=a[d],{x:w,y:C,data:R,reset:k}=await S({x:p,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});p=w??p,m=C??m,g={...g,[v]:{...g[v],...R}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(l=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:p,y:m}=co(l,h,c)),d=-1)}return{x:p,y:m,placement:h,strategy:o,middlewareData:g}};async function at(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:h=!1,padding:g=0}=Se(t,e),b=ao(g),v=a[h?m==="floating"?"reference":"floating":m],S=jt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),w=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),R=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:c}):w);return{top:(S.top-k.top+b.top)/R.y,bottom:(k.bottom-S.bottom+b.bottom)/R.y,left:(S.left-k.left+b.left)/R.x,right:(k.right-S.right+b.right)/R.x}}const Hc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:p=0}=Se(e,t)||{};if(l==null)return{};const m=ao(p),h={x:n,y:r},g=Sn(o),b=wn(g),d=await i.getDimensions(l),v=g==="y",S=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",R=s.reference[b]+s.reference[g]-h[g]-s.floating[b],k=h[g]-s.reference[g],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let N=j?j[C]:0;(!N||!await(i.isElement==null?void 0:i.isElement(j)))&&(N=a.floating[C]||s.floating[b]);const O=R/2-k/2,H=N/2-d[b]/2-1,z=_e(m[S],H),L=_e(m[w],H),Y=z,K=N-d[b]-L,T=N/2-d[b]/2+O,P=bn(Y,T,K),E=!c.arrow&&Je(o)!=null&&T!==P&&s.reference[b]/2-(T<Y?z:L)-d[b]/2<0,_=E?T<Y?T-Y:T-K:0;return{[g]:h[g]+_,data:{[g]:P,centerOffset:T-P-_,...E&&{alignmentOffset:_}},reset:E}}}),Vc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:d=!0,...v}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=Ce(o),w=xe(a),C=Ce(a)===a,R=await(c.isRTL==null?void 0:c.isRTL(l.floating)),k=h||(C||!d?[Dt(a)]:Ic(a)),j=b!=="none";!h&&j&&k.push(...Wc(a,d,b,R));const N=[a,...k],O=await at(t,v),H=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&H.push(O[S]),m){const T=jc(o,i,R);H.push(O[T[0]],O[T[1]])}if(z=[...z,{placement:o,overflows:H}],!H.every(T=>T<=0)){var L,Y;const T=(((L=s.flip)==null?void 0:L.index)||0)+1,P=N[T];if(P&&(!(m==="alignment"?w!==xe(P):!1)||z.every(x=>xe(x.placement)===w?x.overflows[0]>0:!0)))return{data:{index:T,overflows:z},reset:{placement:P}};let E=(Y=z.filter(_=>_.overflows[0]<=0).sort((_,x)=>_.overflows[1]-x.overflows[1])[0])==null?void 0:Y.placement;if(!E)switch(g){case"bestFit":{var K;const _=(K=z.filter(x=>{if(j){const M=xe(x.placement);return M===w||M==="y"}return!0}).map(x=>[x.placement,x.overflows.filter(M=>M>0).reduce((M,W)=>M+W,0)]).sort((x,M)=>x[1]-M[1])[0])==null?void 0:K[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function lo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uo(e){return Nc.some(t=>e[t]>=0)}const Yc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Se(e,t);switch(r){case"referenceHidden":{const s=await at(t,{...o,elementContext:"reference"}),i=lo(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:uo(i)}}}case"escaped":{const s=await at(t,{...o,altBoundary:!0}),i=lo(s,n.floating);return{data:{escapedOffsets:i,escaped:uo(i)}}}default:return{}}}}},fo=new Set(["left","top"]);async function Uc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ce(n),a=Je(n),c=xe(n)==="y",l=fo.has(i)?-1:1,p=s&&c?-1:1,m=Se(t,e);let{mainAxis:h,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 a&&typeof b=="number"&&(g=a==="end"?b*-1:b),c?{x:g*p,y:h*l}:{x:h*l,y:g*p}}const Gc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Uc(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Kc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:S,y:w}=v;return{x:S,y:w}}},...c}=Se(e,t),l={x:n,y:r},p=await at(t,c),m=xe(Ce(o)),h=yn(m);let g=l[h],b=l[m];if(s){const v=h==="y"?"top":"left",S=h==="y"?"bottom":"right",w=g+p[v],C=g-p[S];g=bn(w,g,C)}if(i){const v=m==="y"?"top":"left",S=m==="y"?"bottom":"right",w=b+p[v],C=b-p[S];b=bn(w,b,C)}const d=a.fn({...t,[h]:g,[m]:b});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[h]:s,[m]:i}}}}}},qc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Se(e,t),p={x:n,y:r},m=xe(o),h=yn(m);let g=p[h],b=p[m];const d=Se(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(c){const C=h==="y"?"height":"width",R=s.reference[h]-s.floating[C]+v.mainAxis,k=s.reference[h]+s.reference[C]-v.mainAxis;g<R?g=R:g>k&&(g=k)}if(l){var S,w;const C=h==="y"?"width":"height",R=fo.has(Ce(o)),k=s.reference[m]-s.floating[C]+(R&&((S=i.offset)==null?void 0:S[m])||0)+(R?0:v.crossAxis),j=s.reference[m]+s.reference[C]+(R?0:((w=i.offset)==null?void 0:w[m])||0)-(R?v.crossAxis:0);b<k?b=k:b>j&&(b=j)}return{[h]:g,[m]:b}}}},Xc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Se(e,t),p=await at(t,l),m=Ce(o),h=Je(o),g=xe(o)==="y",{width:b,height:d}=s.floating;let v,S;m==="top"||m==="bottom"?(v=m,S=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(S=m,v=h==="end"?"top":"bottom");const w=d-p.top-p.bottom,C=b-p.left-p.right,R=_e(d-p[v],w),k=_e(b-p[S],C),j=!t.middlewareData.shift;let N=R,O=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=w),j&&!h){const z=le(p.left,0),L=le(p.right,0),Y=le(p.top,0),K=le(p.bottom,0);g?O=b-2*(z!==0||L!==0?z+L:le(p.left,p.right)):N=d-2*(Y!==0||K!==0?Y+K:le(p.top,p.bottom))}await c({...t,availableWidth:O,availableHeight:N});const H=await i.getDimensions(a.floating);return b!==H.width||d!==H.height?{reset:{rects:!0}}:{}}}};function It(){return typeof window<"u"}function Ze(e){return po(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){var t;return(t=(po(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function po(e){return It()?e instanceof Node||e instanceof ue(e).Node:!1}function fe(e){return It()?e instanceof Element||e instanceof ue(e).Element:!1}function ye(e){return It()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function mo(e){return!It()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}const Jc=new Set(["inline","contents"]);function ct(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jc.has(o)}const Zc=new Set(["table","td","th"]);function Qc(e){return Zc.has(Ze(e))}const el=[":popover-open",":modal"];function $t(e){return el.some(t=>{try{return e.matches(t)}catch{return!1}})}const tl=["transform","translate","scale","rotate","perspective"],nl=["transform","translate","scale","rotate","perspective","filter"],rl=["paint","layout","strict","content"];function En(e){const t=Pn(),n=fe(e)?pe(e):e;return tl.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)||nl.some(r=>(n.willChange||"").includes(r))||rl.some(r=>(n.contain||"").includes(r))}function ol(e){let t=Ae(e);for(;ye(t)&&!Qe(t);){if(En(t))return t;if($t(t))return null;t=Ae(t)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sl=new Set(["html","body","#document"]);function Qe(e){return sl.has(Ze(e))}function pe(e){return ue(e).getComputedStyle(e)}function Lt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(Ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mo(e)&&e.host||be(e);return mo(t)?t.host:t}function ho(e){const t=Ae(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&ct(t)?t:ho(t)}function lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ho(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ue(o);if(s){const a=Rn(i);return t.concat(i,i.visualViewport||[],ct(o)?o:[],a&&n?lt(a):[])}return t.concat(o,lt(o,[],n))}function Rn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function go(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Tt(n)!==s||Tt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function _n(e){return fe(e)?e:e.contextElement}function et(e){const t=_n(e);if(!ye(t))return ve(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=go(t);let i=(s?Tt(n.width):n.width)/r,a=(s?Tt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const il=ve(0);function vo(e){const t=ue(e);return!Pn()||!t.visualViewport?il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function al(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ue(e)?!1:t}function Ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=_n(e);let i=ve(1);t&&(r?fe(r)&&(i=et(r)):i=et(e));const a=al(s,n,r)?vo(s):ve(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,p=o.width/i.x,m=o.height/i.y;if(s){const h=ue(s),g=r&&fe(r)?ue(r):r;let b=h,d=Rn(b);for(;d&&r&&g!==b;){const v=et(d),S=d.getBoundingClientRect(),w=pe(d),C=S.left+(d.clientLeft+parseFloat(w.paddingLeft))*v.x,R=S.top+(d.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,l*=v.y,p*=v.x,m*=v.y,c+=C,l+=R,b=ue(d),d=Rn(b)}}return jt({width:p,height:m,x:c,y:l})}function Ft(e,t){const n=Lt(e).scrollLeft;return t?t.left+n:Ie(be(e)).left+n}function xo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ft(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function cl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=be(r),a=t?$t(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=ve(1);const p=ve(0),m=ye(r);if((m||!m&&!s)&&((Ze(r)!=="body"||ct(i))&&(c=Lt(r)),ye(r))){const g=Ie(r);l=et(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=i&&!m&&!s?xo(i,c):ve(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+h.x,y:n.y*l.y-c.scrollTop*l.y+p.y+h.y}}function ll(e){return Array.from(e.getClientRects())}function ul(e){const t=be(e),n=Lt(e),r=e.ownerDocument.body,o=le(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=le(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ft(e);const a=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=le(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const bo=25;function dl(e,t){const n=ue(e),r=be(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const p=Pn();(!p||p&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Ft(r);if(l<=0){const p=r.ownerDocument,m=p.body,h=getComputedStyle(m),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-g);b<=bo&&(s-=b)}else l<=bo&&(s+=l);return{width:s,height:i,x:a,y:c}}const fl=new Set(["absolute","fixed"]);function pl(e,t){const n=Ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ye(e)?et(e):ve(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function yo(e,t,n){let r;if(t==="viewport")r=dl(e,n);else if(t==="document")r=ul(be(e));else if(fe(t))r=pl(t,n);else{const o=vo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jt(r)}function wo(e,t){const n=Ae(e);return n===t||!fe(n)||Qe(n)?!1:pe(n).position==="fixed"||wo(n,t)}function ml(e,t){const n=t.get(e);if(n)return n;let r=lt(e,[],!1).filter(a=>fe(a)&&Ze(a)!=="body"),o=null;const s=pe(e).position==="fixed";let i=s?Ae(e):e;for(;fe(i)&&!Qe(i);){const a=pe(i),c=En(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&fl.has(o.position)||ct(i)&&!c&&wo(e,i))?r=r.filter(p=>p!==i):o=a,i=Ae(i)}return t.set(e,r),r}function hl(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?$t(t)?[]:ml(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,p)=>{const m=yo(t,p,o);return l.top=le(m.top,l.top),l.right=_e(m.right,l.right),l.bottom=_e(m.bottom,l.bottom),l.left=le(m.left,l.left),l},yo(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gl(e){const{width:t,height:n}=go(e);return{width:t,height:n}}function vl(e,t,n){const r=ye(t),o=be(t),s=n==="fixed",i=Ie(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=ve(0);function l(){c.x=Ft(o)}if(r||!r&&!s)if((Ze(t)!=="body"||ct(o))&&(a=Lt(t)),r){const g=Ie(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&l();s&&!r&&o&&l();const p=o&&!r&&!s?xo(o,a):ve(0),m=i.left+a.scrollLeft-c.x-p.x,h=i.top+a.scrollTop-c.y-p.y;return{x:m,y:h,width:i.width,height:i.height}}function An(e){return pe(e).position==="static"}function So(e,t){if(!ye(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Co(e,t){const n=ue(e);if($t(e))return n;if(!ye(e)){let o=Ae(e);for(;o&&!Qe(o);){if(fe(o)&&!An(o))return o;o=Ae(o)}return n}let r=So(e,t);for(;r&&Qc(r)&&An(r);)r=So(r,t);return r&&Qe(r)&&An(r)&&!En(r)?n:r||ol(e)||n}const xl=async function(e){const t=this.getOffsetParent||Co,n=this.getDimensions,r=await n(e.floating);return{reference:vl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bl(e){return pe(e).direction==="rtl"}const yl={convertOffsetParentRelativeRectToViewportRelativeRect:cl,getDocumentElement:be,getClippingRect:hl,getOffsetParent:Co,getElementRects:xl,getClientRects:ll,getDimensions:gl,getScale:et,isElement:fe,isRTL:bl};function Eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wl(e,t){let n=null,r;const o=be(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=l;if(a||t(),!h||!g)return;const b=Mt(m),d=Mt(o.clientWidth-(p+h)),v=Mt(o.clientHeight-(m+g)),S=Mt(p),C={rootMargin:-b+"px "+-d+"px "+-v+"px "+-S+"px",threshold:le(0,_e(1,c))||1};let R=!0;function k(j){const N=j[0].intersectionRatio;if(N!==c){if(!R)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Eo(l,e.getBoundingClientRect())&&i(),R=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(e)}return i(!0),s}function Sl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=_n(e),p=o||s?[...l?lt(l):[],...lt(t)]:[];p.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const m=l&&a?wl(l,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(S=>{let[w]=S;w&&w.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let b,d=c?Ie(e):null;c&&v();function v(){const S=Ie(e);d&&!Eo(d,S)&&n(),d=S,b=requestAnimationFrame(v)}return n(),()=>{var S;p.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),m?.(),(S=g)==null||S.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const Cl=Gc,El=Kc,Pl=Vc,Rl=Xc,_l=Yc,Po=Hc,Al=qc,kl=(e,t,n)=>{const r=new Map,o={platform:yl,...n},s={...o.platform,_c:r};return zc(e,t,{...o,platform:s})};var Ol=typeof document<"u",Nl=function(){},Wt=Ol?ne.useLayoutEffect:Nl;function Bt(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(!Bt(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Bt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ro(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _o(e,t){const n=Ro(e);return Math.round(t*n)/n}function kn(e){const t=u.useRef(e);return Wt(()=>{t.current=e}),t}function Tl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[p,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=u.useState(r);Bt(h,r)||g(r);const[b,d]=u.useState(null),[v,S]=u.useState(null),w=u.useCallback(x=>{x!==j.current&&(j.current=x,d(x))},[]),C=u.useCallback(x=>{x!==N.current&&(N.current=x,S(x))},[]),R=s||b,k=i||v,j=u.useRef(null),N=u.useRef(null),O=u.useRef(p),H=c!=null,z=kn(c),L=kn(o),Y=kn(l),K=u.useCallback(()=>{if(!j.current||!N.current)return;const x={placement:t,strategy:n,middleware:h};L.current&&(x.platform=L.current),kl(j.current,N.current,x).then(M=>{const W={...M,isPositioned:Y.current!==!1};T.current&&!Bt(O.current,W)&&(O.current=W,pt.flushSync(()=>{m(W)}))})},[h,t,n,L,Y]);Wt(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(x=>({...x,isPositioned:!1})))},[l]);const T=u.useRef(!1);Wt(()=>(T.current=!0,()=>{T.current=!1}),[]),Wt(()=>{if(R&&(j.current=R),k&&(N.current=k),R&&k){if(z.current)return z.current(R,k,K);K()}},[R,k,K,z,H]);const P=u.useMemo(()=>({reference:j,floating:N,setReference:w,setFloating:C}),[w,C]),E=u.useMemo(()=>({reference:R,floating:k}),[R,k]),_=u.useMemo(()=>{const x={position:n,left:0,top:0};if(!E.floating)return x;const M=_o(E.floating,p.x),W=_o(E.floating,p.y);return a?{...x,transform:"translate("+M+"px, "+W+"px)",...Ro(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:W}},[n,a,E.floating,p.x,p.y]);return u.useMemo(()=>({...p,update:K,refs:P,elements:E,floatingStyles:_}),[p,K,P,E,_])}const Ml=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?Po({element:r.current,padding:o}).fn(n):{}:r?Po({element:r,padding:o}).fn(n):{}}}},Dl=(e,t)=>({...Cl(e),options:[e,t]}),jl=(e,t)=>({...El(e),options:[e,t]}),Il=(e,t)=>({...Al(e),options:[e,t]}),$l=(e,t)=>({...Pl(e),options:[e,t]}),Ll=(e,t)=>({...Rl(e),options:[e,t]}),Fl=(e,t)=>({..._l(e),options:[e,t]}),Wl=(e,t)=>({...Ml(e),options:[e,t]});var Bl="Arrow",Ao=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return f.jsx(ee.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ao.displayName=Bl;var zl=Ao,On="Popper",[ko,zt]=Ye(On),[Hl,Oo]=ko(On),No=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return f.jsx(Hl,{scope:t,anchor:r,onAnchorChange:o,children:n})};No.displayName=On;var To="PopperAnchor",Mo=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Oo(To,n),i=u.useRef(null),a=re(t,i),c=u.useRef(null);return u.useEffect(()=>{const l=c.current;c.current=r?.current||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:f.jsx(ee.div,{...o,ref:a})});Mo.displayName=To;var Nn="PopperContent",[Vl,Yl]=ko(Nn),Do=u.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...d}=e,v=Oo(Nn,n),[S,w]=u.useState(null),C=re(t,A=>w(A)),[R,k]=u.useState(null),j=oo(R),N=j?.width??0,O=j?.height??0,H=r+(s!=="center"?"-"+s:""),z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},L=Array.isArray(l)?l:[l],Y=L.length>0,K={padding:z,boundary:L.filter(Gl),altBoundary:Y},{refs:T,floatingStyles:P,placement:E,isPositioned:_,middlewareData:x}=Tl({strategy:"fixed",placement:H,whileElementsMounted:(...A)=>Sl(...A,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Dl({mainAxis:o+O,alignmentAxis:i}),c&&jl({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Il():void 0,...K}),c&&$l({...K}),Ll({...K,apply:({elements:A,rects:G,availableWidth:J,availableHeight:V})=>{const{width:q,height:Q}=G.reference,ae=A.floating.style;ae.setProperty("--radix-popper-available-width",`${J}px`),ae.setProperty("--radix-popper-available-height",`${V}px`),ae.setProperty("--radix-popper-anchor-width",`${q}px`),ae.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),R&&Wl({element:R,padding:a}),Kl({arrowWidth:N,arrowHeight:O}),h&&Fl({strategy:"referenceHidden",...K})]}),[M,W]=$o(E),y=De(b);ce(()=>{_&&y?.()},[_,y]);const D=x.arrow?.x,F=x.arrow?.y,B=x.arrow?.centerOffset!==0,[te,oe]=u.useState();return ce(()=>{S&&oe(window.getComputedStyle(S).zIndex)},[S]),f.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:_?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[x.transformOrigin?.x,x.transformOrigin?.y].join(" "),...x.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Vl,{scope:n,placedSide:M,onArrowChange:k,arrowX:D,arrowY:F,shouldHideArrow:B,children:f.jsx(ee.div,{"data-side":M,"data-align":W,...d,ref:C,style:{...d.style,animation:_?void 0:"none"}})})})});Do.displayName=Nn;var jo="PopperArrow",Ul={top:"bottom",right:"left",bottom:"top",left:"right"},Io=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Yl(jo,r),i=Ul[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(zl,{...o,ref:n,style:{...o.style,display:"block"}})})});Io.displayName=jo;function Gl(e){return e!==null}var Kl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,p]=$o(n),m={start:"0%",center:"50%",end:"100%"}[p],h=(o.arrow?.x??0)+a/2,g=(o.arrow?.y??0)+c/2;let b="",d="";return l==="bottom"?(b=i?m:`${h}px`,d=`${-c}px`):l==="top"?(b=i?m:`${h}px`,d=`${r.floating.height+c}px`):l==="right"?(b=`${-c}px`,d=i?m:`${g}px`):l==="left"&&(b=`${r.floating.width+c}px`,d=i?m:`${g}px`),{data:{x:b,y:d}}}});function $o(e){const[t,n="center"]=e.split("-");return[t,n]}var Lo=No,Tn=Mo,Fo=Do,Wo=Io;function Bo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ht="Popover",[zo]=Ye(Ht,[zt]),ut=zt(),[ql,ke]=zo(Ht),Ho=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=ut(t),c=u.useRef(null),[l,p]=u.useState(!1),[m,h]=it({prop:r,defaultProp:o??!1,onChange:s,caller:Ht});return f.jsx(Lo,{...a,children:f.jsx(ql,{scope:t,contentId:Me(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:l,onCustomAnchorAdd:u.useCallback(()=>p(!0),[]),onCustomAnchorRemove:u.useCallback(()=>p(!1),[]),modal:i,children:n})})};Ho.displayName=Ht;var Vo="PopoverAnchor",Xl=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Vo,n),s=ut(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return u.useEffect(()=>(i(),()=>a()),[i,a]),f.jsx(Tn,{...s,...r,ref:t})});Xl.displayName=Vo;var Yo="PopoverTrigger",Uo=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Yo,n),s=ut(n),i=re(t,o.triggerRef),a=f.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jo(o.open),...r,ref:i,onClick:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:f.jsx(Tn,{asChild:!0,...s,children:a})});Uo.displayName=Yo;var Mn="PopoverPortal",[Jl,Zl]=zo(Mn,{forceMount:void 0}),Go=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=ke(Mn,t);return f.jsx(Jl,{scope:t,forceMount:n,children:f.jsx(Ue,{present:n||s.open,children:f.jsx(wt,{asChild:!0,container:o,children:r})})})};Go.displayName=Mn;var tt="PopoverContent",Ko=u.forwardRef((e,t)=>{const n=Zl(tt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=ke(tt,e.__scopePopover);return f.jsx(Ue,{present:r||s.open,children:s.modal?f.jsx(eu,{...o,ref:t}):f.jsx(tu,{...o,ref:t})})});Ko.displayName=tt;var Ql=Ve("PopoverContent.RemoveScroll"),eu=u.forwardRef((e,t)=>{const n=ke(tt,e.__scopePopover),r=u.useRef(null),o=re(t,r),s=u.useRef(!1);return u.useEffect(()=>{const i=r.current;if(i)return hn(i)},[]),f.jsx(_t,{as:Ql,allowPinchZoom:!0,children:f.jsx(qo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),tu=u.forwardRef((e,t)=>{const n=ke(tt,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return f.jsx(qo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),qo=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:p,...m}=e,h=ke(tt,n),g=ut(n);return ln(),f.jsx(yt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:f.jsx(bt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(Fo,{"data-state":Jo(h.open),role:"dialog",id:h.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)"}})})})}),Xo="PopoverClose",nu=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Xo,n);return f.jsx(ee.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});nu.displayName=Xo;var ru="PopoverArrow",ou=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ut(n);return f.jsx(Wo,{...o,...r,ref:t})});ou.displayName=ru;function Jo(e){return e?"open":"closed"}var Zo=Ho,Qo=Uo,es=Go,ts=Ko,su=[" ","Enter","ArrowUp","ArrowDown"],iu=[" ","Enter"],$e="Select",[Vt,Yt,au]=na($e),[nt]=Ye($e,[au,zt]),Ut=zt(),[cu,Oe]=nt($e),[lu,uu]=nt($e),ns=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:p,autoComplete:m,disabled:h,required:g,form:b}=e,d=Ut(t),[v,S]=u.useState(null),[w,C]=u.useState(null),[R,k]=u.useState(!1),j=fa(l),[N,O]=it({prop:r,defaultProp:o??!1,onChange:s,caller:$e}),[H,z]=it({prop:i,defaultProp:a,onChange:c,caller:$e}),L=u.useRef(null),Y=v?b||!!v.closest("form"):!0,[K,T]=u.useState(new Set),P=Array.from(K).map(E=>E.props.value).join(";");return f.jsx(Lo,{...d,children:f.jsxs(cu,{required:g,scope:t,trigger:v,onTriggerChange:S,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:Me(),value:H,onValueChange:z,open:N,onOpenChange:O,dir:j,triggerPointerDownPosRef:L,disabled:h,children:[f.jsx(Vt.Provider,{scope:t,children:f.jsx(lu,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(E=>{T(_=>new Set(_).add(E))},[]),onNativeOptionRemove:u.useCallback(E=>{T(_=>{const x=new Set(_);return x.delete(E),x})},[]),children:n})}),Y?f.jsxs(Es,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:m,value:H,onChange:E=>z(E.target.value),disabled:h,form:b,children:[H===void 0?f.jsx("option",{value:""}):null,Array.from(K)]},P):null]})})};ns.displayName=$e;var rs="SelectTrigger",os=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ut(n),i=Oe(rs,n),a=i.disabled||r,c=re(t,i.onTriggerChange),l=Yt(n),p=u.useRef("touch"),[m,h,g]=Rs(d=>{const v=l().filter(C=>!C.disabled),S=v.find(C=>C.value===i.value),w=_s(v,d,S);w!==void 0&&i.onValueChange(w.value)}),b=d=>{a||(i.onOpenChange(!0),g()),d&&(i.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return f.jsx(Tn,{asChild:!0,...s,children:f.jsx(ee.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ps(i.value)?"":void 0,...o,ref:c,onClick:Z(o.onClick,d=>{d.currentTarget.focus(),p.current!=="mouse"&&b(d)}),onPointerDown:Z(o.onPointerDown,d=>{p.current=d.pointerType;const v=d.target;v.hasPointerCapture(d.pointerId)&&v.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:Z(o.onKeyDown,d=>{const v=m.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&h(d.key),!(v&&d.key===" ")&&su.includes(d.key)&&(b(),d.preventDefault())})})})});os.displayName=rs;var ss="SelectValue",is=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=Oe(ss,n),{onValueNodeHasChildrenChange:l}=c,p=s!==void 0,m=re(t,c.onValueNodeChange);return ce(()=>{l(p)},[l,p]),f.jsx(ee.span,{...a,ref:m,style:{pointerEvents:"none"},children:Ps(c.value)?f.jsx(f.Fragment,{children:i}):s})});is.displayName=ss;var du="SelectIcon",as=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});as.displayName=du;var fu="SelectPortal",cs=e=>f.jsx(wt,{asChild:!0,...e});cs.displayName=fu;var Le="SelectContent",ls=u.forwardRef((e,t)=>{const n=Oe(Le,e.__scopeSelect),[r,o]=u.useState();if(ce(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?pt.createPortal(f.jsx(us,{scope:e.__scopeSelect,children:f.jsx(Vt.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(ds,{...e,ref:t})});ls.displayName=Le;var me=10,[us,Ne]=nt(Le),pu="SelectContentImpl",mu=Ve("SelectContent.RemoveScroll"),ds=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:d,avoidCollisions:v,...S}=e,w=Oe(Le,n),[C,R]=u.useState(null),[k,j]=u.useState(null),N=re(t,A=>R(A)),[O,H]=u.useState(null),[z,L]=u.useState(null),Y=Yt(n),[K,T]=u.useState(!1),P=u.useRef(!1);u.useEffect(()=>{if(C)return hn(C)},[C]),ln();const E=u.useCallback(A=>{const[G,...J]=Y().map(Q=>Q.ref.current),[V]=J.slice(-1),q=document.activeElement;for(const Q of A)if(Q===q||(Q?.scrollIntoView({block:"nearest"}),Q===G&&k&&(k.scrollTop=0),Q===V&&k&&(k.scrollTop=k.scrollHeight),Q?.focus(),document.activeElement!==q))return},[Y,k]),_=u.useCallback(()=>E([O,C]),[E,O,C]);u.useEffect(()=>{K&&_()},[K,_]);const{onOpenChange:x,triggerPointerDownPosRef:M}=w;u.useEffect(()=>{if(C){let A={x:0,y:0};const G=V=>{A={x:Math.abs(Math.round(V.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(V.pageY)-(M.current?.y??0))}},J=V=>{A.x<=10&&A.y<=10?V.preventDefault():C.contains(V.target)||x(!1),document.removeEventListener("pointermove",G),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,x,M]),u.useEffect(()=>{const A=()=>x(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[x]);const[W,y]=Rs(A=>{const G=Y().filter(q=>!q.disabled),J=G.find(q=>q.ref.current===document.activeElement),V=_s(G,A,J);V&&setTimeout(()=>V.ref.current.focus())}),D=u.useCallback((A,G,J)=>{const V=!P.current&&!J;(w.value!==void 0&&w.value===G||V)&&(H(A),V&&(P.current=!0))},[w.value]),F=u.useCallback(()=>C?.focus(),[C]),B=u.useCallback((A,G,J)=>{const V=!P.current&&!J;(w.value!==void 0&&w.value===G||V)&&L(A)},[w.value]),te=r==="popper"?Dn:fs,oe=te===Dn?{side:a,sideOffset:c,align:l,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:d,avoidCollisions:v}:{};return f.jsx(us,{scope:n,content:C,viewport:k,onViewportChange:j,itemRefCallback:D,selectedItem:O,onItemLeave:F,itemTextRefCallback:B,focusSelectedItem:_,selectedItemText:z,position:r,isPositioned:K,searchRef:W,children:f.jsx(_t,{as:mu,allowPinchZoom:!0,children:f.jsx(yt,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:Z(o,A=>{w.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:f.jsx(bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:f.jsx(te,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...S,...oe,onPlaced:()=>T(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Z(S.onKeyDown,A=>{const G=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!G&&A.key.length===1&&y(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let V=Y().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(A.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const q=A.target,Q=V.indexOf(q);V=V.slice(Q+1)}setTimeout(()=>E(V)),A.preventDefault()}})})})})})})});ds.displayName=pu;var hu="SelectItemAlignedPosition",fs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Oe(Le,n),i=Ne(Le,n),[a,c]=u.useState(null),[l,p]=u.useState(null),m=re(t,N=>p(N)),h=Yt(n),g=u.useRef(!1),b=u.useRef(!0),{viewport:d,selectedItem:v,selectedItemText:S,focusSelectedItem:w}=i,C=u.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&d&&v&&S){const N=s.trigger.getBoundingClientRect(),O=l.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),z=S.getBoundingClientRect();if(s.dir!=="rtl"){const q=z.left-O.left,Q=H.left-q,ae=N.left-Q,We=N.width+ae,Wn=Math.max(We,O.width),Bn=window.innerWidth-me,zn=Bo(Q,[me,Math.max(me,Bn-Wn)]);a.style.minWidth=We+"px",a.style.left=zn+"px"}else{const q=O.right-z.right,Q=window.innerWidth-H.right-q,ae=window.innerWidth-N.right-Q,We=N.width+ae,Wn=Math.max(We,O.width),Bn=window.innerWidth-me,zn=Bo(Q,[me,Math.max(me,Bn-Wn)]);a.style.minWidth=We+"px",a.style.right=zn+"px"}const L=h(),Y=window.innerHeight-me*2,K=d.scrollHeight,T=window.getComputedStyle(l),P=parseInt(T.borderTopWidth,10),E=parseInt(T.paddingTop,10),_=parseInt(T.borderBottomWidth,10),x=parseInt(T.paddingBottom,10),M=P+E+K+x+_,W=Math.min(v.offsetHeight*5,M),y=window.getComputedStyle(d),D=parseInt(y.paddingTop,10),F=parseInt(y.paddingBottom,10),B=N.top+N.height/2-me,te=Y-B,oe=v.offsetHeight/2,A=v.offsetTop+oe,G=P+E+A,J=M-G;if(G<=B){const q=L.length>0&&v===L[L.length-1].ref.current;a.style.bottom="0px";const Q=l.clientHeight-d.offsetTop-d.offsetHeight,ae=Math.max(te,oe+(q?F:0)+Q+_),We=G+ae;a.style.height=We+"px"}else{const q=L.length>0&&v===L[0].ref.current;a.style.top="0px";const ae=Math.max(B,P+d.offsetTop+(q?D:0)+oe)+J;a.style.height=ae+"px",d.scrollTop=G-B+d.offsetTop}a.style.margin=`${me}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=Y+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,a,l,d,v,S,s.dir,r]);ce(()=>C(),[C]);const[R,k]=u.useState();ce(()=>{l&&k(window.getComputedStyle(l).zIndex)},[l]);const j=u.useCallback(N=>{N&&b.current===!0&&(C(),w?.(),b.current=!1)},[C,w]);return f.jsx(vu,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:f.jsx(ee.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fs.displayName=hu;var gu="SelectPopperPosition",Dn=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=me,...s}=e,i=Ut(n);return f.jsx(Fo,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});Dn.displayName=gu;var[vu,jn]=nt(Le,{}),In="SelectViewport",ps=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ne(In,n),i=jn(In,n),a=re(t,s.onViewportChange),c=u.useRef(0);return f.jsxs(f.Fragment,{children:[f.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}),f.jsx(Vt.Slot,{scope:n,children:f.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Z(o.onScroll,l=>{const p=l.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=i;if(h?.current&&m){const g=Math.abs(c.current-p.scrollTop);if(g>0){const b=window.innerHeight-me*2,d=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),S=Math.max(d,v);if(S<b){const w=S+g,C=Math.min(b,w),R=w-C;m.style.height=C+"px",m.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}c.current=p.scrollTop})})})]})});ps.displayName=In;var ms="SelectGroup",[xu,bu]=nt(ms),yu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Me();return f.jsx(xu,{scope:n,id:o,children:f.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});yu.displayName=ms;var hs="SelectLabel",wu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bu(hs,n);return f.jsx(ee.div,{id:o.id,...r,ref:t})});wu.displayName=hs;var Gt="SelectItem",[Su,gs]=nt(Gt),vs=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Oe(Gt,n),c=Ne(Gt,n),l=a.value===r,[p,m]=u.useState(s??""),[h,g]=u.useState(!1),b=re(t,w=>c.itemRefCallback?.(w,r,o)),d=Me(),v=u.useRef("touch"),S=()=>{o||(a.onValueChange(r),a.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 f.jsx(Su,{scope:n,value:r,disabled:o,textId:d,isSelected:l,onItemTextChange:u.useCallback(w=>{m(C=>C||(w?.textContent??"").trim())},[]),children:f.jsx(Vt.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:f.jsx(ee.div,{role:"option","aria-labelledby":d,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:Z(i.onFocus,()=>g(!0)),onBlur:Z(i.onBlur,()=>g(!1)),onClick:Z(i.onClick,()=>{v.current!=="mouse"&&S()}),onPointerUp:Z(i.onPointerUp,()=>{v.current==="mouse"&&S()}),onPointerDown:Z(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:Z(i.onPointerMove,w=>{v.current=w.pointerType,o?c.onItemLeave?.():v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Z(i.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(iu.includes(w.key)&&S(),w.key===" "&&w.preventDefault())})})})})});vs.displayName=Gt;var dt="SelectItemText",xs=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Oe(dt,n),a=Ne(dt,n),c=gs(dt,n),l=uu(dt,n),[p,m]=u.useState(null),h=re(t,S=>m(S),c.onItemTextChange,S=>a.itemTextRefCallback?.(S,c.value,c.disabled)),g=p?.textContent,b=u.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:d,onNativeOptionRemove:v}=l;return ce(()=>(d(b),()=>v(b)),[d,v,b]),f.jsxs(f.Fragment,{children:[f.jsx(ee.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(s.children,i.valueNode):null]})});xs.displayName=dt;var bs="SelectItemIndicator",ys=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gs(bs,n).isSelected?f.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});ys.displayName=bs;var $n="SelectScrollUpButton",ws=u.forwardRef((e,t)=>{const n=Ne($n,e.__scopeSelect),r=jn($n,e.__scopeSelect),[o,s]=u.useState(!1),i=re(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Cs,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});ws.displayName=$n;var Ln="SelectScrollDownButton",Ss=u.forwardRef((e,t)=>{const n=Ne(Ln,e.__scopeSelect),r=jn(Ln,e.__scopeSelect),[o,s]=u.useState(!1),i=re(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,p=Math.ceil(c.scrollTop)<l;s(p)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Cs,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Ss.displayName=Ln;var Cs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ne("SelectScrollButton",n),i=u.useRef(null),a=Yt(n),c=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),ce(()=>{a().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),f.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{c()})})}),Cu="SelectSeparator",Eu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});Eu.displayName=Cu;var Fn="SelectArrow",Pu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ut(n),s=Oe(Fn,n),i=Ne(Fn,n);return s.open&&i.position==="popper"?f.jsx(Wo,{...o,...r,ref:t}):null});Pu.displayName=Fn;var Ru="SelectBubbleInput",Es=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),s=re(r,o),i=ro(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&p){const m=new Event("change",{bubbles:!0});p.call(a,t),a.dispatchEvent(m)}},[i,t]),f.jsx(ee.select,{...n,style:{...vr,...n.style},ref:s,defaultValue:t})});Es.displayName=Ru;function Ps(e){return e===""||e===void 0}function Rs(e){const t=De(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(i=>{const a=n.current+i;t(a),(function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function _s(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=_u(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function _u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Au=ns,ku=os,Ou=is,Nu=as,Tu=cs,Mu=ls,Du=ps,ju=vs,Iu=xs,$u=ys,Kt="Switch",[Lu]=Ye(Kt),[Fu,Wu]=Lu(Kt),As=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c="on",onCheckedChange:l,form:p,...m}=e,[h,g]=u.useState(null),b=re(t,C=>g(C)),d=u.useRef(!1),v=h?p||!!h.closest("form"):!0,[S,w]=it({prop:o,defaultProp:s??!1,onChange:l,caller:Kt});return f.jsxs(Fu,{scope:n,checked:S,disabled:a,children:[f.jsx(ee.button,{type:"button",role:"switch","aria-checked":S,"aria-required":i,"data-state":Ts(S),"data-disabled":a?"":void 0,disabled:a,value:c,...m,ref:b,onClick:Z(e.onClick,C=>{w(R=>!R),v&&(d.current=C.isPropagationStopped(),d.current||C.stopPropagation())})}),v&&f.jsx(Ns,{control:h,bubbles:!d.current,name:r,value:c,checked:S,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});As.displayName=Kt;var ks="SwitchThumb",Os=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Wu(ks,n);return f.jsx(ee.span,{"data-state":Ts(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Os.displayName=ks;var Bu="SwitchBubbleInput",Ns=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=re(i,s),c=ro(n),l=oo(t);return u.useEffect(()=>{const p=i.current;if(!p)return;const m=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&g){const b=new Event("click",{bubbles:r});g.call(p,n),p.dispatchEvent(b)}},[c,n,r]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ns.displayName=Bu;function Ts(e){return e?"checked":"unchecked"}var zu=As,Hu=Os;const Vu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ms=e=>{const t=Yu(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ds=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Uu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Gu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ku=ne.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>ne.createElement("svg",{ref:c,...Gu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ds("lucide",o),...!s&&!Uu(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,p])=>ne.createElement(l,p)),...Array.isArray(s)?s:[s]]));const Fe=(e,t)=>{const n=ne.forwardRef(({className:r,...o},s)=>ne.createElement(Ku,{ref:s,iconNode:t,className:Ds(`lucide-${Vu(Ms(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ms(e),n};const qu=Fe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const js=Fe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const ft=Fe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Xu=Fe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Ju=Fe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Zu=Fe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Qu=Fe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ed=e=>f.jsx(Au,{...e}),td=({children:e,className:t,...n})=>f.jsxs(ju,{className:X("text-sm px-3 py-2 rounded-lg bg-bg-1 text-text-1 cursor-pointer hover:bg-bg-2 outline-none",t),...n,children:[f.jsx(Iu,{className:"text-text-1 text-sm",children:e}),f.jsx("span",{className:"absolute right-2 items-center justify-center",children:f.jsx($u,{children:f.jsx(js,{className:"w-4 h-4 text-text-2"})})})]}),nd=({className:e,error:t,children:n,...r})=>f.jsxs(ku,{className:X("bg-bg-1 *:data-[slot=select-value]:overflow-hidden whitespace-nowrap justify-between data-placeholder:text-text-2 text-text-1 flex items-center gap-3 rounded-lg text-sm cursor-pointer px-3 h-10 border border-border-1 outline-none","data-[state=open]:ring-2 data-[state=open]:ring-border-1/80",e,t&&"border-danger text-danger data-[slot=select-value]:text-danger data-placeholder:text-danger"),"aria-label":"select-trigger",...r,children:[n,f.jsx(Nu,{asChild:!0,children:f.jsx(ft,{className:X("w-5 h-5 text-text-2",t&&"text-danger/80")})})]}),rd=({className:e,...t})=>f.jsx(Ou,{"data-slot":"select-value",className:e,...t}),od=({children:e,className:t,position:n="popper",...r})=>f.jsx(Tu,{children:f.jsxs(Mu,{"data-slot":"select-content",className:X("rounded-lg z-999 overflow-y-auto min-w-[var(--radix-select-trigger-width)] bg-bg-1 border border-border-2 data-[state=open]:animate-popover-in shadow-sm","p-px",n==="popper"&&"max-h-82 w-full min-w-(--radix-select-trigger-width) scroll-my-1",t),sideOffset:8,position:n,...r,children:[f.jsx(ws,{className:"flex justify-center items-center",children:f.jsx(Zu,{className:"w-5 h-5 text-text-2 "})}),f.jsx(Du,{children:e}),f.jsx(Ss,{className:"flex justify-center items-center",children:f.jsx(ft,{className:"w-5 h-5 text-text-2 "})})]})}),sd=({options:e,placeholder:t,onChange:n,defaultValue:r,className:o,contentClassName:s,value:i,error:a})=>f.jsxs(ed,{onValueChange:n,value:i,defaultValue:r,children:[f.jsx(nd,{error:a,className:o,children:f.jsx(rd,{placeholder:t})}),f.jsx(od,{className:s,children:e.map((c,l)=>f.jsx(td,{value:c.value,children:c.label},l))})]}),id=({sections:e,containerClassName:t,pathname:n,open:r,textHeader:o,IconHeader:s,setOpen:i})=>f.jsxs("div",{className:X("fixed top-0 left-0 inset-0 shrink-0 overflow-y-auto overflow-x-hidden z-999 transition-all",r?"pointer-events-auto lg:w-72":"pointer-events-none lg:pointer-events-auto lg:w-21",t),children:[f.jsx("div",{className:X("bg-overlay w-full h-full transition-opacity lg:hidden backdrop-blur-xs",r?"opacity-100":"opacity-0"),onClick:()=>i(!1)}),f.jsxs("nav",{className:X("absolute px-5 w-72 py-5 top-0 shrink-0 transition-all left-0 h-full bg-bg-1 lg:border-r lg:border-r-border-2",r?"translate-x-0":"-translate-x-full lg:translate-x-0 lg:w-21"),children:[f.jsxs("div",{className:"flex gap-3 items-center mb-7",children:[f.jsx("div",{className:"w-11 h-10 rounded-lg bg-primary-500 shrink-0 flex items-center justify-center",children:f.jsx(s,{className:"w-5 h-5 text-text-3"})}),f.jsx("span",{className:X("text-text-1 transition-opacity font-bold text-2xl",r?"opacity-100":"opacity-0"),children:o})]}),f.jsx("div",{className:"flex flex-col gap-8",children:e.map(({options:a,title:c,id:l})=>f.jsxs("section",{children:[f.jsx("p",{className:X("mb-2 text-text-2 text-sm transition-opacity",r?"opacity-100":"opacity-0"),children:c}),a.map(({label:p,href:m,Icon:h,onClick:g},b)=>{const d=n.startsWith(m);return f.jsxs("button",{onClick:g,className:X("h-10 w-full group transition-[width] rounded-lg overflow-hidden text-sm text-text-2 px-3 cursor-pointer flex items-center gap-3","hover:text-text-1 transition-[color]",d&&"bg-primary-500 text-text-3 hover:text-text-3",r?"w-full":"w-11"),children:[f.jsx(h,{className:X("w-5 h-5 text-text-2 group-hover:text-text-1 transition-colors shrink-0",d&&"text-text-3 group-hover:text-text-3")}),f.jsx("p",{className:X("transition-opacity",r?"opacity-100":"opacity-0"),children:p})]},b)})]},l))})]})]}),ad=({steps:e,currentStep:t=0,className:n,labelClassName:r})=>f.jsx("div",{className:X("flex items-center gap-4",n),children:e.map((o,s)=>{const i=t>=s;return f.jsxs(ne.Fragment,{children:[f.jsx("div",{className:"flex flex-col items-center",children:f.jsxs("button",{className:X("relative w-10 h-10 rounded-lg cursor-pointer bg-bg-1 text-text-2 border border-border-2 font-bold",i&&"bg-primary-500 border-none text-text-3"),children:[s+1,f.jsx("p",{className:X("absolute left-1/2 -translate-x-1/2 top-full text-center w-fit text-sm font-normal translate-y-px",i&&"text-text-1",r),children:o.label})]},s)},s),s+1<e.length&&f.jsx("div",{className:"h-px w-full bg-border-2"})]},s)})}),Is=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$s=Xn,cd=((e,t)=>n=>{var r;if(t?.variants==null)return $s(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const p=n?.[l],m=s?.[l];if(p===null)return null;const h=Is(p)||Is(m);return o[l][h]}),a=n&&Object.entries(n).reduce((l,p)=>{let[m,h]=p;return h===void 0||(l[m]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,p)=>{let{class:m,className:h,...g}=p;return Object.entries(g).every(b=>{let[d,v]=b;return Array.isArray(v)?v.includes({...s,...a}[d]):{...s,...a}[d]===v})?[...l,m,h]:l},[]);return $s(e,i,c,n?.class,n?.className)})("h-10 px-3 text-sm flex items-center gap-3 rounded-lg cursor-pointer transition-[background-color] w-fit",{variants:{variant:{filled:"bg-primary-500 text-text-3 font-medium hover:bg-primary-400",outlined:"border border-border-1 bg-bg-1 text-text-1 hover:bg-bg-2",ghost:"bg-bg-1 text-text-1 font-medium hover:bg-bg-2",icon:"h-10 w-10 bg-bg-2 justify-center hover:bg-bg-1 text-text-1"}}}),ld=({variant:e="filled",className:t,children:n,...r})=>f.jsx("button",{className:X(cd({variant:e,className:t})),...r,children:n}),qt=ne.memo(ld),ud=e=>f.jsx(zu,{className:"h-6 w-10 bg-bg-1 rounded-full relative cursor-pointer data-[state=checked]:bg-primary-500 border-border-2 border",...e,children:f.jsx(Hu,{className:"transition-transform will-change-transform block w-5 h-5 bg-text-2 rounded-full translate-x-0.5 data-[state=checked]:translate-x-4 data-[state=checked]:bg-text-3"})}),dd=({text:e="Badge",type:t="success"})=>{const n={success:"bg-bg-success text-success border-success",error:"bg-bg-danger text-danger border-danger",warning:"bg-bg-warning text-warning border-warning"};return f.jsx("div",{className:X("text-sm px-3 w-fit py-1 rounded-lg border outline-none",n[t]),children:e})};var Xt={exports:{}},fd=Xt.exports,Ls;function Fs(){return Ls||(Ls=1,(function(e,t){(function(n,r){e.exports=r()})(fd,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",p="week",m="month",h="quarter",g="year",b="date",d="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var P=["th","st","nd","rd"],E=T%100;return"["+T+(P[(E-20)%10]||P[E]||P[0])+"]"}},C=function(T,P,E){var _=String(T);return!_||_.length>=P?T:""+Array(P+1-_.length).join(E)+T},R={s:C,z:function(T){var P=-T.utcOffset(),E=Math.abs(P),_=Math.floor(E/60),x=E%60;return(P<=0?"+":"-")+C(_,2,"0")+":"+C(x,2,"0")},m:function T(P,E){if(P.date()<E.date())return-T(E,P);var _=12*(E.year()-P.year())+(E.month()-P.month()),x=P.clone().add(_,m),M=E-x<0,W=P.clone().add(_+(M?-1:1),m);return+(-(_+(E-x)/(M?x-W:W-x))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:m,y:g,w:p,d:l,D:b,h:c,m:a,s:i,ms:s,Q:h}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},k="en",j={};j[k]=w;var N="$isDayjsObject",O=function(T){return T instanceof Y||!(!T||!T[N])},H=function T(P,E,_){var x;if(!P)return k;if(typeof P=="string"){var M=P.toLowerCase();j[M]&&(x=M),E&&(j[M]=E,x=M);var W=P.split("-");if(!x&&W.length>1)return T(W[0])}else{var y=P.name;j[y]=P,x=y}return!_&&x&&(k=x),x||!_&&k},z=function(T,P){if(O(T))return T.clone();var E=typeof P=="object"?P:{};return E.date=T,E.args=arguments,new Y(E)},L=R;L.l=H,L.i=O,L.w=function(T,P){return z(T,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var Y=(function(){function T(E){this.$L=H(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[N]=!0}var P=T.prototype;return P.parse=function(E){this.$d=(function(_){var x=_.date,M=_.utc;if(x===null)return new Date(NaN);if(L.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var W=x.match(v);if(W){var y=W[2]-1||0,D=(W[7]||"0").substring(0,3);return M?new Date(Date.UTC(W[1],y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,D)):new Date(W[1],y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,D)}}return new Date(x)})(E),this.init()},P.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},P.$utils=function(){return L},P.isValid=function(){return this.$d.toString()!==d},P.isSame=function(E,_){var x=z(E);return this.startOf(_)<=x&&x<=this.endOf(_)},P.isAfter=function(E,_){return z(E)<this.startOf(_)},P.isBefore=function(E,_){return this.endOf(_)<z(E)},P.$g=function(E,_,x){return L.u(E)?this[_]:this.set(x,E)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(E,_){var x=this,M=!!L.u(_)||_,W=L.p(E),y=function(J,V){var q=L.w(x.$u?Date.UTC(x.$y,V,J):new Date(x.$y,V,J),x);return M?q:q.endOf(l)},D=function(J,V){return L.w(x.toDate()[J].apply(x.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(V)),x)},F=this.$W,B=this.$M,te=this.$D,oe="set"+(this.$u?"UTC":"");switch(W){case g:return M?y(1,0):y(31,11);case m:return M?y(1,B):y(0,B+1);case p:var A=this.$locale().weekStart||0,G=(F<A?F+7:F)-A;return y(M?te-G:te+(6-G),B);case l:case b:return D(oe+"Hours",0);case c:return D(oe+"Minutes",1);case a:return D(oe+"Seconds",2);case i:return D(oe+"Milliseconds",3);default:return this.clone()}},P.endOf=function(E){return this.startOf(E,!1)},P.$set=function(E,_){var x,M=L.p(E),W="set"+(this.$u?"UTC":""),y=(x={},x[l]=W+"Date",x[b]=W+"Date",x[m]=W+"Month",x[g]=W+"FullYear",x[c]=W+"Hours",x[a]=W+"Minutes",x[i]=W+"Seconds",x[s]=W+"Milliseconds",x)[M],D=M===l?this.$D+(_-this.$W):_;if(M===m||M===g){var F=this.clone().set(b,1);F.$d[y](D),F.init(),this.$d=F.set(b,Math.min(this.$D,F.daysInMonth())).$d}else y&&this.$d[y](D);return this.init(),this},P.set=function(E,_){return this.clone().$set(E,_)},P.get=function(E){return this[L.p(E)]()},P.add=function(E,_){var x,M=this;E=Number(E);var W=L.p(_),y=function(B){var te=z(M);return L.w(te.date(te.date()+Math.round(B*E)),M)};if(W===m)return this.set(m,this.$M+E);if(W===g)return this.set(g,this.$y+E);if(W===l)return y(1);if(W===p)return y(7);var D=(x={},x[a]=r,x[c]=o,x[i]=n,x)[W]||1,F=this.$d.getTime()+E*D;return L.w(F,this)},P.subtract=function(E,_){return this.add(-1*E,_)},P.format=function(E){var _=this,x=this.$locale();if(!this.isValid())return x.invalidDate||d;var M=E||"YYYY-MM-DDTHH:mm:ssZ",W=L.z(this),y=this.$H,D=this.$m,F=this.$M,B=x.weekdays,te=x.months,oe=x.meridiem,A=function(V,q,Q,ae){return V&&(V[q]||V(_,M))||Q[q].slice(0,ae)},G=function(V){return L.s(y%12||12,V,"0")},J=oe||function(V,q,Q){var ae=V<12?"AM":"PM";return Q?ae.toLowerCase():ae};return M.replace(S,(function(V,q){return q||(function(Q){switch(Q){case"YY":return String(_.$y).slice(-2);case"YYYY":return L.s(_.$y,4,"0");case"M":return F+1;case"MM":return L.s(F+1,2,"0");case"MMM":return A(x.monthsShort,F,te,3);case"MMMM":return A(te,F);case"D":return _.$D;case"DD":return L.s(_.$D,2,"0");case"d":return String(_.$W);case"dd":return A(x.weekdaysMin,_.$W,B,2);case"ddd":return A(x.weekdaysShort,_.$W,B,3);case"dddd":return B[_.$W];case"H":return String(y);case"HH":return L.s(y,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return J(y,D,!0);case"A":return J(y,D,!1);case"m":return String(D);case"mm":return L.s(D,2,"0");case"s":return String(_.$s);case"ss":return L.s(_.$s,2,"0");case"SSS":return L.s(_.$ms,3,"0");case"Z":return W}return null})(V)||W.replace(":","")}))},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(E,_,x){var M,W=this,y=L.p(_),D=z(E),F=(D.utcOffset()-this.utcOffset())*r,B=this-D,te=function(){return L.m(W,D)};switch(y){case g:M=te()/12;break;case m:M=te();break;case h:M=te()/3;break;case p:M=(B-F)/6048e5;break;case l:M=(B-F)/864e5;break;case c:M=B/o;break;case a:M=B/r;break;case i:M=B/n;break;default:M=B}return x?M:L.a(M)},P.daysInMonth=function(){return this.endOf(m).$D},P.$locale=function(){return j[this.$L]},P.locale=function(E,_){if(!E)return this.$L;var x=this.clone(),M=H(E,_,!0);return M&&(x.$L=M),x},P.clone=function(){return L.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},T})(),K=Y.prototype;return z.prototype=K,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",m],["$y",g],["$D",b]].forEach((function(T){K[T[1]]=function(P){return this.$g(P,T[0],T[1])}})),z.extend=function(T,P){return T.$i||(T(P,Y,z),T.$i=!0),z},z.locale=H,z.isDayjs=O,z.unix=function(T){return z(1e3*T)},z.en=j[k],z.Ls=j,z.p={},z}))})(Xt)),Xt.exports}var pd=Fs();const Ee=Yn(pd);var Jt={exports:{}},md=Jt.exports,Ws;function hd(){return Ws||(Ws=1,(function(e,t){(function(n,r){e.exports=r()})(md,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,i,a){var c=i.prototype;a.utc=function(d){var v={date:d,utc:!0,args:arguments};return new i(v)},c.utc=function(d){var v=a(this.toDate(),{locale:this.$L,utc:!0});return d?v.add(this.utcOffset(),n):v},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=c.parse;c.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),l.call(this,d)};var p=c.init;c.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else p.call(this)};var m=c.utcOffset;c.utcOffset=function(d,v){var S=this.$utils().u;if(S(d))return this.$u?0:S(this.$offset)?m.call(this):this.$offset;if(typeof d=="string"&&(d=(function(k){k===void 0&&(k="");var j=k.match(r);if(!j)return null;var N=(""+j[0]).match(o)||["-",0,0],O=N[0],H=60*+N[1]+ +N[2];return H===0?0:O==="+"?H:-H})(d),d===null))return this;var w=Math.abs(d)<=16?60*d:d;if(w===0)return this.utc(v);var C=this.clone();if(v)return C.$offset=w,C.$u=!1,C;var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(w+R,n)).$offset=w,C.$x.$localOffset=R,C};var h=c.format;c.format=function(d){var v=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},c.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var g=c.toDate;c.toDate=function(d){return d==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var b=c.diff;c.diff=function(d,v,S){if(d&&this.$u===d.$u)return b.call(this,d,v,S);var w=this.local(),C=a(d).local();return b.call(w,C,v,S)}}}))})(Jt)),Jt.exports}var gd=hd();const vd=Yn(gd);Ee.extend(vd);const xd=(e,t)=>{const n=Ee.utc().year(t).month(e).startOf("month"),r=Ee.utc().year(t).month(e).endOf("month"),o=n.day(),s=[];for(let c=0;c<o;c++)s.push({date:n.subtract(o-c,"day").startOf("day"),currentMonth:!1});for(let c=1;c<=r.date();c++)s.push({date:Ee.utc().year(t).month(e).date(c).startOf("day"),currentMonth:!0});const a=42-s.length;for(let c=1;c<=a;c++)s.push({date:r.add(c,"day").startOf("day"),currentMonth:!1});return s},bd=Ee().year(),yd=Array.from({length:120},(e,t)=>Ee().year(bd-60+t).year()),wd=[{en:"Jan",es:"Ene"},{en:"Feb",es:"Feb"},{en:"Mar",es:"Mar"},{en:"Apr",es:"Abr"},{en:"May",es:"May"},{en:"Jun",es:"Jun"},{en:"Jul",es:"Jul"},{en:"Aug",es:"Ago"},{en:"Sep",es:"Sep"},{en:"Oct",es:"Oct"},{en:"Nov",es:"Nov"},{en:"Dec",es:"Dic"}],Sd=[{en:"Su",es:"Do"},{en:"Mo",es:"Lu"},{en:"Tu",es:"Ma"},{en:"We",es:"Mi"},{en:"Th",es:"Ju"},{en:"Fr",es:"Vi"},{en:"Sa",es:"Sa"}],Bs=({locale:e="en",date:t,setDate:n,rootClassName:r,buttonDayClassName:o,containerMonthDaysClassName:s})=>{const i=ne.useMemo(()=>Ee(),[]),[a,c]=ne.useState(i.month()),[l,p]=ne.useState(i.year()),m=ne.useMemo(()=>xd(a,l),[a,l]);return f.jsxs("div",{className:X("border-border-2 border py-3 px-4 bg-bg-1 rounded-lg w-fit",r),children:[f.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[f.jsx(qt,{variant:"ghost",className:"w-fit px-2 h-9 outline-none",onClick:()=>c(h=>h===0?(p(g=>g-1),11):h-1),children:f.jsx(Xu,{className:"w-5 h-5 text-text-2"})}),f.jsxs("div",{"data-slot":"container",className:"border focus-within:ring-2 focus-within:ring-border-1/80 border-border-1 rounded-lg bg-bg-1 h-9 w-20 overflow-hidden flex gap-2 items-center relative",children:[f.jsx("select",{className:"text-sm h-full w-full appearance-none px-2 outline-none border-none text-text-1 placeholder:text-text-2",value:a,onChange:h=>c(parseInt(h.target.value)),children:wd.map((h,g)=>f.jsx("option",{value:g,className:"bg-bg-2",children:h[e]},g))}),f.jsx(ft,{className:"w-5 h-5 text-text-2 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]}),f.jsxs("div",{"data-slot":"container",className:"border focus-within:ring-2 focus-within:ring-border-1/80 border-border-1 rounded-lg bg-bg-1 h-9 w-20 overflow-hidden flex gap-2 items-center relative",children:[f.jsx("select",{className:"text-sm h-full w-full appearance-none px-2 outline-none border-none text-text-1 placeholder:text-text-2",value:l,onChange:h=>p(parseInt(h.target.value)),children:yd.map(h=>f.jsx("option",{value:h,className:"bg-bg-2",children:h},h))}),f.jsx(ft,{className:"w-5 h-5 text-text-2 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]}),f.jsx(qt,{variant:"ghost",className:"w-fit px-2 h-9 outline-none",onClick:()=>{c(h=>h===11?(p(g=>g+1),0):h+1)},children:f.jsx(Ju,{className:"w-5 h-5 text-text-2"})})]}),f.jsxs("div",{className:X("grid grid-cols-7 gap-y-2",s),children:[Sd.map(h=>f.jsx("p",{className:"text-center text-text-2 text-sm p-2 font-normal",children:h[e]},h[e])),m.map(({date:h,currentMonth:g})=>{const b=h.isSame(i,"day"),d=t&&h.isSame(Ee(t),"day");return f.jsx(qt,{variant:"ghost",onClick:()=>n(h.toDate()),className:X("text-center outline-none text-text-1 justify-self-center text-sm w-full justify-center w-8 h-8 font-normal",!g&&"text-text-2",b&&"bg-bg-2 text-text-1 font-medium",d&&"bg-primary-500 text-text-3 hover:bg-primary-400",o),children:h.date()},h.format("YYYY-MM-DD"))})]})]})},zs=e=>f.jsx(Cc,{...e}),Hs=({className:e,...t})=>f.jsx(Ec,{className:e,...t}),Vs=e=>f.jsx(Pc,{...e}),Ys=({className:e,...t})=>f.jsx(Rc,{className:X("fixed inset-0 z-50 bg-overlay","data-[state=open]:animate-overlay-in data-[state=closed]:animate-overlay-out",e),...t}),Us=({className:e,children:t,...n})=>f.jsxs(Vs,{children:[f.jsx(Ys,{}),f.jsx(_c,{className:X("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","bg-bg-1 border border-border-2 rounded-xl p-6 shadow-lg","data-[state=open]:animate-dialog-in data-[state=closed]:animate-dialog-out","focus:outline-none",e),...n,children:t})]}),Gs=({className:e,...t})=>f.jsx("div",{className:X("flex flex-col gap-1.5 mb-4",e),...t}),Ks=({className:e,...t})=>f.jsx("div",{className:X("flex justify-end gap-3 mt-6",e),...t}),qs=({className:e,...t})=>f.jsx(Ac,{className:X("text-lg font-semibold text-text-1",e),...t}),Xs=({className:e,...t})=>f.jsx(kc,{className:X("text-sm text-text-2",e),...t}),Js=({className:e,children:t,...n})=>f.jsx(Oc,{className:X("absolute right-4 top-4 rounded-md p-1 text-text-2 hover:text-text-1 hover:bg-bg-2 transition-colors","focus:outline-none focus:ring-2 focus:ring-border-1/80",e),...n,children:t??f.jsx(Qu,{className:"h-4 w-4"})}),he=({open:e,onOpenChange:t,trigger:n,title:r,description:o,children:s,className:i,showClose:a=!0,footer:c})=>f.jsxs(zs,{open:e,onOpenChange:t,children:[n&&f.jsx(Hs,{asChild:!0,children:n}),f.jsxs(Us,{className:i,children:[a&&f.jsx(Js,{}),(r||o)&&f.jsxs(Gs,{children:[r&&f.jsx(qs,{children:r}),o&&f.jsx(Xs,{children:o})]}),s,c&&f.jsx(Ks,{children:c})]})]});he.Root=zs,he.Trigger=Hs,he.Portal=Vs,he.Overlay=Ys,he.Content=Us,he.Header=Gs,he.Footer=Ks,he.Title=qs,he.Description=Xs,he.Close=Js;var Zt={exports:{}},Cd=Zt.exports,Zs;function Ed(){return Zs||(Zs=1,(function(e,t){(function(n,r){e.exports=r(Fs())})(Cd,(function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var o=r(n),s={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(i){return i+"º"}};return o.default.locale(s,null,!0),s}))})(Zt)),Zt.exports}Ed();var Qt={exports:{}},Pd=Qt.exports,Qs;function Rd(){return Qs||(Qs=1,(function(e,t){(function(n,r){e.exports=r()})(Pd,(function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}}))})(Qt)),Qt.exports}Rd();const _d=({placeholder:e,locale:t="es",className:n,Icon:r,date:o,setDate:s,error:i,...a})=>{const c=Ee(o).utc().locale(t).format("DD-MM-YYYY");return f.jsxs(Zo,{children:[f.jsx(Qo,{asChild:!0,children:f.jsxs("button",{className:X("h-10 px-3 flex items-center bg-bg-1 gap-3 rounded-lg border border-border-1 text-sm text-text-2 min-w-sm justify-between cursor-pointer",o&&"text-text-1",i&&"border-danger text-danger",n),...a,children:[o?c:e,r?f.jsx(r,{className:"text-text-2 w-5 h-5"}):f.jsx(qu,{className:X("text-text-2 w-5 h-5",i&&"text-danger")})]})}),f.jsx(es,{children:f.jsx(ts,{sideOffset:8,align:"start",className:X("p-2 z-999 border-border-2 rounded-lg border bg-bg-1 data-[state=open]:animate-popover-in"),children:f.jsx(Bs,{date:o,setDate:s,locale:t,rootClassName:"border-none p-0"})})})]})},ei=[{code:"+61",flag:"🇦🇺",name:"Australia"},{code:"+32",flag:"🇧🇪",name:"Belgium"},{code:"+591",flag:"🇧🇴",name:"Bolivia"},{code:"+55",flag:"🇧🇷",name:"Brazil"},{code:"+56",flag:"🇨🇱",name:"Chile"},{code:"+86",flag:"🇨🇳",name:"China"},{code:"+57",flag:"🇨🇴",name:"Colombia"},{code:"+506",flag:"🇨🇷",name:"Costa Rica"},{code:"+593",flag:"🇪🇨",name:"Ecuador"},{code:"+503",flag:"🇸🇻",name:"El Salvador"},{code:"+34",flag:"🇪🇸",name:"Spain"},{code:"+63",flag:"🇵🇭",name:"Philippines"},{code:"+33",flag:"🇫🇷",name:"France"},{code:"+358",flag:"🇫🇮",name:"Finland"},{code:"+49",flag:"🇩🇪",name:"Germany"},{code:"+502",flag:"🇬🇹",name:"Guatemala"},{code:"+44",flag:"🇬🇧",name:"United Kingdom"},{code:"+504",flag:"🇭🇳",name:"Honduras"},{code:"+91",flag:"🇮🇳",name:"India"},{code:"+39",flag:"🇮🇹",name:"Italy"},{code:"+81",flag:"🇯🇵",name:"Japan"},{code:"+82",flag:"🇰🇷",name:"South Korea"},{code:"+505",flag:"🇳🇮",name:"Nicaragua"},{code:"+47",flag:"🇳🇴",name:"Norway"},{code:"+64",flag:"🇳🇿",name:"New Zealand"},{code:"+507",flag:"🇵🇦",name:"Panama"},{code:"+595",flag:"🇵🇾",name:"Paraguay"},{code:"+51",flag:"🇵🇪",name:"Peru"},{code:"+52",flag:"🇲🇽",name:"Mexico"},{code:"+351",flag:"🇵🇹",name:"Portugal"},{code:"+1",flag:"🇺🇸",name:"United States"},{code:"+598",flag:"🇺🇾",name:"Uruguay"},{code:"+58",flag:"🇻🇪",name:"Venezuela"},{code:"+41",flag:"🇨🇭",name:"Switzerland"},{code:"+46",flag:"🇸🇪",name:"Sweden"}],Ad=({Trigger:e,children:t,className:n,open:r,setOpen:o,...s})=>f.jsxs(Zo,{open:r,onOpenChange:o,children:[f.jsx(Qo,{asChild:!0,children:e}),f.jsx(es,{children:f.jsx(ts,{sideOffset:8,className:X("animate-popover-in text-sm p-5 bg-bg-1 border border-border-2 rounded-lg",n),...s,children:t})})]}),kd=({placeholder:e,phone:t,setPhone:n,error:r,className:o})=>{const[s,i]=ne.useState(!1),a=ei.find(c=>c.code===t.split(" ")[0])?.flag;return f.jsxs("div",{className:X("border border-border-1 rounded-lg bg-bg-1 h-10 flex overflow-hidden",r&&"border-danger",o),children:[f.jsx(Ad,{open:s,setOpen:i,className:"p-0 h-62 overflow-y-auto custom-scrollbar",align:"start",Trigger:f.jsxs("button",{onClick:()=>i(!0),className:"h-full px-3 cursor-pointer flex gap-3 items-center outline-none hover:bg-bg-2",children:[a,f.jsx(ft,{className:"w-5 h-5 text-text-2"})]}),children:ei.map(c=>{const l=c.code===t.split(" ")[0];return f.jsxs("div",{onClick:()=>{const p=t.split(" ")[1];n(`${c.code} ${p}`),i(!1)},className:X("px-2 py-2 bg-bg-1 rounded-lg hover:bg-bg-2 justify-between items-center text-sm cursor-pointer flex",l&&"bg-bg-2"),children:[f.jsxs("span",{children:[c.flag," ",c.name]}),l&&f.jsx(js,{className:"w-3 h-3 text-text-2"})]},c.code)})}),f.jsx(mr,{placeholder:e,value:t.split(" ")[1],error:r,onChange:c=>{const l=t.split(" ")[0];n(`${l} ${c.target.value}`)},className:"w-full border-none h-full focus-within:ring-0",type:"number"})]})};ie.Badge=dd,ie.Button=qt,ie.Calendar=Bs,ie.DatePicker=_d,ie.Dialog=he,ie.Input=mr,ie.PhoneInput=kd,ie.Select=sd,ie.SideNavigation=id,ie.Stepper=ad,ie.Switch=ud,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|
|
50
|
+
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},wc="DialogDescriptionWarning",Sc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${no(wc).contentName}}.`;return u.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Cc=zr,Ec=Vr,Pc=Ur,Rc=Gr,_c=Kr,Ac=Xr,kc=Zr,Oc=eo;function ro(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function oo(e){const[t,n]=u.useState(void 0);return ce(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Nc=["top","right","bottom","left"],_e=Math.min,le=Math.max,Tt=Math.round,Mt=Math.floor,ve=e=>({x:e,y:e}),Tc={left:"right",right:"left",bottom:"top",top:"bottom"},Mc={start:"end",end:"start"};function bn(e,t,n){return le(e,_e(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function Je(e){return e.split("-")[1]}function yn(e){return e==="x"?"y":"x"}function wn(e){return e==="y"?"height":"width"}const Dc=new Set(["top","bottom"]);function xe(e){return Dc.has(Ce(e))?"y":"x"}function Sn(e){return yn(xe(e))}function jc(e,t,n){n===void 0&&(n=!1);const r=Je(e),o=Sn(e),s=wn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Dt(i)),[i,Dt(i)]}function Ic(e){const t=Dt(e);return[Cn(e),t,Cn(t)]}function Cn(e){return e.replace(/start|end/g,t=>Mc[t])}const so=["left","right"],io=["right","left"],$c=["top","bottom"],Lc=["bottom","top"];function Fc(e,t,n){switch(e){case"top":case"bottom":return n?t?io:so:t?so:io;case"left":case"right":return t?$c:Lc;default:return[]}}function Wc(e,t,n,r){const o=Je(e);let s=Fc(Ce(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Cn)))),s}function Dt(e){return e.replace(/left|right|bottom|top/g,t=>Tc[t])}function Bc(e){return{top:0,right:0,bottom:0,left:0,...e}}function ao(e){return typeof e!="number"?Bc(e):{top:e,right:e,bottom:e,left:e}}function jt(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 co(e,t,n){let{reference:r,floating:o}=e;const s=xe(t),i=Sn(t),a=wn(i),c=Ce(t),l=s==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let g;switch(c){case"top":g={x:p,y:r.y-o.height};break;case"bottom":g={x:p,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(Je(t)){case"start":g[i]-=h*(n&&l?-1:1);break;case"end":g[i]+=h*(n&&l?-1:1);break}return g}const zc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=co(l,r,c),h=r,g={},b=0;for(let d=0;d<a.length;d++){const{name:v,fn:S}=a[d],{x:w,y:C,data:R,reset:k}=await S({x:p,y:m,initialPlacement:r,placement:h,strategy:o,middlewareData:g,rects:l,platform:i,elements:{reference:e,floating:t}});p=w??p,m=C??m,g={...g,[v]:{...g[v],...R}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(l=k.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:p,y:m}=co(l,h,c)),d=-1)}return{x:p,y:m,placement:h,strategy:o,middlewareData:g}};async function at(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:h=!1,padding:g=0}=Se(t,e),b=ao(g),v=a[h?m==="floating"?"reference":"floating":m],S=jt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),w=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),R=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},k=jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:C,strategy:c}):w);return{top:(S.top-k.top+b.top)/R.y,bottom:(k.bottom-S.bottom+b.bottom)/R.y,left:(S.left-k.left+b.left)/R.x,right:(k.right-S.right+b.right)/R.x}}const Hc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:p=0}=Se(e,t)||{};if(l==null)return{};const m=ao(p),h={x:n,y:r},g=Sn(o),b=wn(g),d=await i.getDimensions(l),v=g==="y",S=v?"top":"left",w=v?"bottom":"right",C=v?"clientHeight":"clientWidth",R=s.reference[b]+s.reference[g]-h[g]-s.floating[b],k=h[g]-s.reference[g],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let N=j?j[C]:0;(!N||!await(i.isElement==null?void 0:i.isElement(j)))&&(N=a.floating[C]||s.floating[b]);const O=R/2-k/2,H=N/2-d[b]/2-1,z=_e(m[S],H),L=_e(m[w],H),Y=z,K=N-d[b]-L,T=N/2-d[b]/2+O,P=bn(Y,T,K),E=!c.arrow&&Je(o)!=null&&T!==P&&s.reference[b]/2-(T<Y?z:L)-d[b]/2<0,_=E?T<Y?T-Y:T-K:0;return{[g]:h[g]+_,data:{[g]:P,centerOffset:T-P-_,...E&&{alignmentOffset:_}},reset:E}}}),Vc=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:d=!0,...v}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const S=Ce(o),w=xe(a),C=Ce(a)===a,R=await(c.isRTL==null?void 0:c.isRTL(l.floating)),k=h||(C||!d?[Dt(a)]:Ic(a)),j=b!=="none";!h&&j&&k.push(...Wc(a,d,b,R));const N=[a,...k],O=await at(t,v),H=[];let z=((r=s.flip)==null?void 0:r.overflows)||[];if(p&&H.push(O[S]),m){const T=jc(o,i,R);H.push(O[T[0]],O[T[1]])}if(z=[...z,{placement:o,overflows:H}],!H.every(T=>T<=0)){var L,Y;const T=(((L=s.flip)==null?void 0:L.index)||0)+1,P=N[T];if(P&&(!(m==="alignment"?w!==xe(P):!1)||z.every(x=>xe(x.placement)===w?x.overflows[0]>0:!0)))return{data:{index:T,overflows:z},reset:{placement:P}};let E=(Y=z.filter(_=>_.overflows[0]<=0).sort((_,x)=>_.overflows[1]-x.overflows[1])[0])==null?void 0:Y.placement;if(!E)switch(g){case"bestFit":{var K;const _=(K=z.filter(x=>{if(j){const M=xe(x.placement);return M===w||M==="y"}return!0}).map(x=>[x.placement,x.overflows.filter(M=>M>0).reduce((M,W)=>M+W,0)]).sort((x,M)=>x[1]-M[1])[0])==null?void 0:K[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function lo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uo(e){return Nc.some(t=>e[t]>=0)}const Yc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Se(e,t);switch(r){case"referenceHidden":{const s=await at(t,{...o,elementContext:"reference"}),i=lo(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:uo(i)}}}case"escaped":{const s=await at(t,{...o,altBoundary:!0}),i=lo(s,n.floating);return{data:{escapedOffsets:i,escaped:uo(i)}}}default:return{}}}}},fo=new Set(["left","top"]);async function Uc(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ce(n),a=Je(n),c=xe(n)==="y",l=fo.has(i)?-1:1,p=s&&c?-1:1,m=Se(t,e);let{mainAxis:h,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 a&&typeof b=="number"&&(g=a==="end"?b*-1:b),c?{x:g*p,y:h*l}:{x:h*l,y:g*p}}const Gc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Uc(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Kc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x:S,y:w}=v;return{x:S,y:w}}},...c}=Se(e,t),l={x:n,y:r},p=await at(t,c),m=xe(Ce(o)),h=yn(m);let g=l[h],b=l[m];if(s){const v=h==="y"?"top":"left",S=h==="y"?"bottom":"right",w=g+p[v],C=g-p[S];g=bn(w,g,C)}if(i){const v=m==="y"?"top":"left",S=m==="y"?"bottom":"right",w=b+p[v],C=b-p[S];b=bn(w,b,C)}const d=a.fn({...t,[h]:g,[m]:b});return{...d,data:{x:d.x-n,y:d.y-r,enabled:{[h]:s,[m]:i}}}}}},qc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Se(e,t),p={x:n,y:r},m=xe(o),h=yn(m);let g=p[h],b=p[m];const d=Se(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(c){const C=h==="y"?"height":"width",R=s.reference[h]-s.floating[C]+v.mainAxis,k=s.reference[h]+s.reference[C]-v.mainAxis;g<R?g=R:g>k&&(g=k)}if(l){var S,w;const C=h==="y"?"width":"height",R=fo.has(Ce(o)),k=s.reference[m]-s.floating[C]+(R&&((S=i.offset)==null?void 0:S[m])||0)+(R?0:v.crossAxis),j=s.reference[m]+s.reference[C]+(R?0:((w=i.offset)==null?void 0:w[m])||0)-(R?v.crossAxis:0);b<k?b=k:b>j&&(b=j)}return{[h]:g,[m]:b}}}},Xc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Se(e,t),p=await at(t,l),m=Ce(o),h=Je(o),g=xe(o)==="y",{width:b,height:d}=s.floating;let v,S;m==="top"||m==="bottom"?(v=m,S=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(S=m,v=h==="end"?"top":"bottom");const w=d-p.top-p.bottom,C=b-p.left-p.right,R=_e(d-p[v],w),k=_e(b-p[S],C),j=!t.middlewareData.shift;let N=R,O=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=w),j&&!h){const z=le(p.left,0),L=le(p.right,0),Y=le(p.top,0),K=le(p.bottom,0);g?O=b-2*(z!==0||L!==0?z+L:le(p.left,p.right)):N=d-2*(Y!==0||K!==0?Y+K:le(p.top,p.bottom))}await c({...t,availableWidth:O,availableHeight:N});const H=await i.getDimensions(a.floating);return b!==H.width||d!==H.height?{reset:{rects:!0}}:{}}}};function It(){return typeof window<"u"}function Ze(e){return po(e)?(e.nodeName||"").toLowerCase():"#document"}function ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function be(e){var t;return(t=(po(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function po(e){return It()?e instanceof Node||e instanceof ue(e).Node:!1}function fe(e){return It()?e instanceof Element||e instanceof ue(e).Element:!1}function ye(e){return It()?e instanceof HTMLElement||e instanceof ue(e).HTMLElement:!1}function mo(e){return!It()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ue(e).ShadowRoot}const Jc=new Set(["inline","contents"]);function ct(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jc.has(o)}const Zc=new Set(["table","td","th"]);function Qc(e){return Zc.has(Ze(e))}const el=[":popover-open",":modal"];function $t(e){return el.some(t=>{try{return e.matches(t)}catch{return!1}})}const tl=["transform","translate","scale","rotate","perspective"],nl=["transform","translate","scale","rotate","perspective","filter"],rl=["paint","layout","strict","content"];function En(e){const t=Pn(),n=fe(e)?pe(e):e;return tl.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)||nl.some(r=>(n.willChange||"").includes(r))||rl.some(r=>(n.contain||"").includes(r))}function ol(e){let t=Ae(e);for(;ye(t)&&!Qe(t);){if(En(t))return t;if($t(t))return null;t=Ae(t)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sl=new Set(["html","body","#document"]);function Qe(e){return sl.has(Ze(e))}function pe(e){return ue(e).getComputedStyle(e)}function Lt(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(Ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mo(e)&&e.host||be(e);return mo(t)?t.host:t}function ho(e){const t=Ae(e);return Qe(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&ct(t)?t:ho(t)}function lt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ho(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ue(o);if(s){const a=Rn(i);return t.concat(i,i.visualViewport||[],ct(o)?o:[],a&&n?lt(a):[])}return t.concat(o,lt(o,[],n))}function Rn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function go(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Tt(n)!==s||Tt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function _n(e){return fe(e)?e:e.contextElement}function et(e){const t=_n(e);if(!ye(t))return ve(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=go(t);let i=(s?Tt(n.width):n.width)/r,a=(s?Tt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const il=ve(0);function vo(e){const t=ue(e);return!Pn()||!t.visualViewport?il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function al(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ue(e)?!1:t}function Ie(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=_n(e);let i=ve(1);t&&(r?fe(r)&&(i=et(r)):i=et(e));const a=al(s,n,r)?vo(s):ve(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,p=o.width/i.x,m=o.height/i.y;if(s){const h=ue(s),g=r&&fe(r)?ue(r):r;let b=h,d=Rn(b);for(;d&&r&&g!==b;){const v=et(d),S=d.getBoundingClientRect(),w=pe(d),C=S.left+(d.clientLeft+parseFloat(w.paddingLeft))*v.x,R=S.top+(d.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,l*=v.y,p*=v.x,m*=v.y,c+=C,l+=R,b=ue(d),d=Rn(b)}}return jt({width:p,height:m,x:c,y:l})}function Ft(e,t){const n=Lt(e).scrollLeft;return t?t.left+n:Ie(be(e)).left+n}function xo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ft(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function cl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=be(r),a=t?$t(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=ve(1);const p=ve(0),m=ye(r);if((m||!m&&!s)&&((Ze(r)!=="body"||ct(i))&&(c=Lt(r)),ye(r))){const g=Ie(r);l=et(r),p.x=g.x+r.clientLeft,p.y=g.y+r.clientTop}const h=i&&!m&&!s?xo(i,c):ve(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+h.x,y:n.y*l.y-c.scrollTop*l.y+p.y+h.y}}function ll(e){return Array.from(e.getClientRects())}function ul(e){const t=be(e),n=Lt(e),r=e.ownerDocument.body,o=le(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=le(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ft(e);const a=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=le(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const bo=25;function dl(e,t){const n=ue(e),r=be(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const p=Pn();(!p||p&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}const l=Ft(r);if(l<=0){const p=r.ownerDocument,m=p.body,h=getComputedStyle(m),g=p.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,b=Math.abs(r.clientWidth-m.clientWidth-g);b<=bo&&(s-=b)}else l<=bo&&(s+=l);return{width:s,height:i,x:a,y:c}}const fl=new Set(["absolute","fixed"]);function pl(e,t){const n=Ie(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ye(e)?et(e):ve(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function yo(e,t,n){let r;if(t==="viewport")r=dl(e,n);else if(t==="document")r=ul(be(e));else if(fe(t))r=pl(t,n);else{const o=vo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jt(r)}function wo(e,t){const n=Ae(e);return n===t||!fe(n)||Qe(n)?!1:pe(n).position==="fixed"||wo(n,t)}function ml(e,t){const n=t.get(e);if(n)return n;let r=lt(e,[],!1).filter(a=>fe(a)&&Ze(a)!=="body"),o=null;const s=pe(e).position==="fixed";let i=s?Ae(e):e;for(;fe(i)&&!Qe(i);){const a=pe(i),c=En(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&fl.has(o.position)||ct(i)&&!c&&wo(e,i))?r=r.filter(p=>p!==i):o=a,i=Ae(i)}return t.set(e,r),r}function hl(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?$t(t)?[]:ml(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,p)=>{const m=yo(t,p,o);return l.top=le(m.top,l.top),l.right=_e(m.right,l.right),l.bottom=_e(m.bottom,l.bottom),l.left=le(m.left,l.left),l},yo(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gl(e){const{width:t,height:n}=go(e);return{width:t,height:n}}function vl(e,t,n){const r=ye(t),o=be(t),s=n==="fixed",i=Ie(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=ve(0);function l(){c.x=Ft(o)}if(r||!r&&!s)if((Ze(t)!=="body"||ct(o))&&(a=Lt(t)),r){const g=Ie(t,!0,s,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&l();s&&!r&&o&&l();const p=o&&!r&&!s?xo(o,a):ve(0),m=i.left+a.scrollLeft-c.x-p.x,h=i.top+a.scrollTop-c.y-p.y;return{x:m,y:h,width:i.width,height:i.height}}function An(e){return pe(e).position==="static"}function So(e,t){if(!ye(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return be(e)===n&&(n=n.ownerDocument.body),n}function Co(e,t){const n=ue(e);if($t(e))return n;if(!ye(e)){let o=Ae(e);for(;o&&!Qe(o);){if(fe(o)&&!An(o))return o;o=Ae(o)}return n}let r=So(e,t);for(;r&&Qc(r)&&An(r);)r=So(r,t);return r&&Qe(r)&&An(r)&&!En(r)?n:r||ol(e)||n}const xl=async function(e){const t=this.getOffsetParent||Co,n=this.getDimensions,r=await n(e.floating);return{reference:vl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bl(e){return pe(e).direction==="rtl"}const yl={convertOffsetParentRelativeRectToViewportRelativeRect:cl,getDocumentElement:be,getClippingRect:hl,getOffsetParent:Co,getElementRects:xl,getClientRects:ll,getDimensions:gl,getScale:et,isElement:fe,isRTL:bl};function Eo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wl(e,t){let n=null,r;const o=be(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=l;if(a||t(),!h||!g)return;const b=Mt(m),d=Mt(o.clientWidth-(p+h)),v=Mt(o.clientHeight-(m+g)),S=Mt(p),C={rootMargin:-b+"px "+-d+"px "+-v+"px "+-S+"px",threshold:le(0,_e(1,c))||1};let R=!0;function k(j){const N=j[0].intersectionRatio;if(N!==c){if(!R)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Eo(l,e.getBoundingClientRect())&&i(),R=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(e)}return i(!0),s}function Sl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=_n(e),p=o||s?[...l?lt(l):[],...lt(t)]:[];p.forEach(S=>{o&&S.addEventListener("scroll",n,{passive:!0}),s&&S.addEventListener("resize",n)});const m=l&&a?wl(l,n):null;let h=-1,g=null;i&&(g=new ResizeObserver(S=>{let[w]=S;w&&w.target===l&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=g)==null||C.observe(t)})),n()}),l&&!c&&g.observe(l),g.observe(t));let b,d=c?Ie(e):null;c&&v();function v(){const S=Ie(e);d&&!Eo(d,S)&&n(),d=S,b=requestAnimationFrame(v)}return n(),()=>{var S;p.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),m?.(),(S=g)==null||S.disconnect(),g=null,c&&cancelAnimationFrame(b)}}const Cl=Gc,El=Kc,Pl=Vc,Rl=Xc,_l=Yc,Po=Hc,Al=qc,kl=(e,t,n)=>{const r=new Map,o={platform:yl,...n},s={...o.platform,_c:r};return zc(e,t,{...o,platform:s})};var Ol=typeof document<"u",Nl=function(){},Wt=Ol?ne.useLayoutEffect:Nl;function Bt(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(!Bt(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Bt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ro(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _o(e,t){const n=Ro(e);return Math.round(t*n)/n}function kn(e){const t=u.useRef(e);return Wt(()=>{t.current=e}),t}function Tl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[p,m]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,g]=u.useState(r);Bt(h,r)||g(r);const[b,d]=u.useState(null),[v,S]=u.useState(null),w=u.useCallback(x=>{x!==j.current&&(j.current=x,d(x))},[]),C=u.useCallback(x=>{x!==N.current&&(N.current=x,S(x))},[]),R=s||b,k=i||v,j=u.useRef(null),N=u.useRef(null),O=u.useRef(p),H=c!=null,z=kn(c),L=kn(o),Y=kn(l),K=u.useCallback(()=>{if(!j.current||!N.current)return;const x={placement:t,strategy:n,middleware:h};L.current&&(x.platform=L.current),kl(j.current,N.current,x).then(M=>{const W={...M,isPositioned:Y.current!==!1};T.current&&!Bt(O.current,W)&&(O.current=W,pt.flushSync(()=>{m(W)}))})},[h,t,n,L,Y]);Wt(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(x=>({...x,isPositioned:!1})))},[l]);const T=u.useRef(!1);Wt(()=>(T.current=!0,()=>{T.current=!1}),[]),Wt(()=>{if(R&&(j.current=R),k&&(N.current=k),R&&k){if(z.current)return z.current(R,k,K);K()}},[R,k,K,z,H]);const P=u.useMemo(()=>({reference:j,floating:N,setReference:w,setFloating:C}),[w,C]),E=u.useMemo(()=>({reference:R,floating:k}),[R,k]),_=u.useMemo(()=>{const x={position:n,left:0,top:0};if(!E.floating)return x;const M=_o(E.floating,p.x),W=_o(E.floating,p.y);return a?{...x,transform:"translate("+M+"px, "+W+"px)",...Ro(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:W}},[n,a,E.floating,p.x,p.y]);return u.useMemo(()=>({...p,update:K,refs:P,elements:E,floatingStyles:_}),[p,K,P,E,_])}const Ml=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?Po({element:r.current,padding:o}).fn(n):{}:r?Po({element:r,padding:o}).fn(n):{}}}},Dl=(e,t)=>({...Cl(e),options:[e,t]}),jl=(e,t)=>({...El(e),options:[e,t]}),Il=(e,t)=>({...Al(e),options:[e,t]}),$l=(e,t)=>({...Pl(e),options:[e,t]}),Ll=(e,t)=>({...Rl(e),options:[e,t]}),Fl=(e,t)=>({..._l(e),options:[e,t]}),Wl=(e,t)=>({...Ml(e),options:[e,t]});var Bl="Arrow",Ao=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return f.jsx(ee.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ao.displayName=Bl;var zl=Ao,On="Popper",[ko,zt]=Ye(On),[Hl,Oo]=ko(On),No=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return f.jsx(Hl,{scope:t,anchor:r,onAnchorChange:o,children:n})};No.displayName=On;var To="PopperAnchor",Mo=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Oo(To,n),i=u.useRef(null),a=re(t,i),c=u.useRef(null);return u.useEffect(()=>{const l=c.current;c.current=r?.current||i.current,l!==c.current&&s.onAnchorChange(c.current)}),r?null:f.jsx(ee.div,{...o,ref:a})});Mo.displayName=To;var Nn="PopperContent",[Vl,Yl]=ko(Nn),Do=u.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:g="optimized",onPlaced:b,...d}=e,v=Oo(Nn,n),[S,w]=u.useState(null),C=re(t,A=>w(A)),[R,k]=u.useState(null),j=oo(R),N=j?.width??0,O=j?.height??0,H=r+(s!=="center"?"-"+s:""),z=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},L=Array.isArray(l)?l:[l],Y=L.length>0,K={padding:z,boundary:L.filter(Gl),altBoundary:Y},{refs:T,floatingStyles:P,placement:E,isPositioned:_,middlewareData:x}=Tl({strategy:"fixed",placement:H,whileElementsMounted:(...A)=>Sl(...A,{animationFrame:g==="always"}),elements:{reference:v.anchor},middleware:[Dl({mainAxis:o+O,alignmentAxis:i}),c&&jl({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Il():void 0,...K}),c&&$l({...K}),Ll({...K,apply:({elements:A,rects:G,availableWidth:J,availableHeight:V})=>{const{width:q,height:Q}=G.reference,ae=A.floating.style;ae.setProperty("--radix-popper-available-width",`${J}px`),ae.setProperty("--radix-popper-available-height",`${V}px`),ae.setProperty("--radix-popper-anchor-width",`${q}px`),ae.setProperty("--radix-popper-anchor-height",`${Q}px`)}}),R&&Wl({element:R,padding:a}),Kl({arrowWidth:N,arrowHeight:O}),h&&Fl({strategy:"referenceHidden",...K})]}),[M,W]=$o(E),y=De(b);ce(()=>{_&&y?.()},[_,y]);const D=x.arrow?.x,F=x.arrow?.y,B=x.arrow?.centerOffset!==0,[te,oe]=u.useState();return ce(()=>{S&&oe(window.getComputedStyle(S).zIndex)},[S]),f.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...P,transform:_?P.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[x.transformOrigin?.x,x.transformOrigin?.y].join(" "),...x.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Vl,{scope:n,placedSide:M,onArrowChange:k,arrowX:D,arrowY:F,shouldHideArrow:B,children:f.jsx(ee.div,{"data-side":M,"data-align":W,...d,ref:C,style:{...d.style,animation:_?void 0:"none"}})})})});Do.displayName=Nn;var jo="PopperArrow",Ul={top:"bottom",right:"left",bottom:"top",left:"right"},Io=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Yl(jo,r),i=Ul[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(zl,{...o,ref:n,style:{...o.style,display:"block"}})})});Io.displayName=jo;function Gl(e){return e!==null}var Kl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,p]=$o(n),m={start:"0%",center:"50%",end:"100%"}[p],h=(o.arrow?.x??0)+a/2,g=(o.arrow?.y??0)+c/2;let b="",d="";return l==="bottom"?(b=i?m:`${h}px`,d=`${-c}px`):l==="top"?(b=i?m:`${h}px`,d=`${r.floating.height+c}px`):l==="right"?(b=`${-c}px`,d=i?m:`${g}px`):l==="left"&&(b=`${r.floating.width+c}px`,d=i?m:`${g}px`),{data:{x:b,y:d}}}});function $o(e){const[t,n="center"]=e.split("-");return[t,n]}var Lo=No,Tn=Mo,Fo=Do,Wo=Io;function Bo(e,[t,n]){return Math.min(n,Math.max(t,e))}var Ht="Popover",[zo]=Ye(Ht,[zt]),ut=zt(),[ql,ke]=zo(Ht),Ho=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=ut(t),c=u.useRef(null),[l,p]=u.useState(!1),[m,h]=it({prop:r,defaultProp:o??!1,onChange:s,caller:Ht});return f.jsx(Lo,{...a,children:f.jsx(ql,{scope:t,contentId:Me(),triggerRef:c,open:m,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(g=>!g),[h]),hasCustomAnchor:l,onCustomAnchorAdd:u.useCallback(()=>p(!0),[]),onCustomAnchorRemove:u.useCallback(()=>p(!1),[]),modal:i,children:n})})};Ho.displayName=Ht;var Vo="PopoverAnchor",Xl=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Vo,n),s=ut(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return u.useEffect(()=>(i(),()=>a()),[i,a]),f.jsx(Tn,{...s,...r,ref:t})});Xl.displayName=Vo;var Yo="PopoverTrigger",Uo=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Yo,n),s=ut(n),i=re(t,o.triggerRef),a=f.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jo(o.open),...r,ref:i,onClick:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:f.jsx(Tn,{asChild:!0,...s,children:a})});Uo.displayName=Yo;var Mn="PopoverPortal",[Jl,Zl]=zo(Mn,{forceMount:void 0}),Go=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=ke(Mn,t);return f.jsx(Jl,{scope:t,forceMount:n,children:f.jsx(Ue,{present:n||s.open,children:f.jsx(wt,{asChild:!0,container:o,children:r})})})};Go.displayName=Mn;var tt="PopoverContent",Ko=u.forwardRef((e,t)=>{const n=Zl(tt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=ke(tt,e.__scopePopover);return f.jsx(Ue,{present:r||s.open,children:s.modal?f.jsx(eu,{...o,ref:t}):f.jsx(tu,{...o,ref:t})})});Ko.displayName=tt;var Ql=Ve("PopoverContent.RemoveScroll"),eu=u.forwardRef((e,t)=>{const n=ke(tt,e.__scopePopover),r=u.useRef(null),o=re(t,r),s=u.useRef(!1);return u.useEffect(()=>{const i=r.current;if(i)return hn(i)},[]),f.jsx(_t,{as:Ql,allowPinchZoom:!0,children:f.jsx(qo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),tu=u.forwardRef((e,t)=>{const n=ke(tt,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return f.jsx(qo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),qo=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:p,...m}=e,h=ke(tt,n),g=ut(n);return ln(),f.jsx(yt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:f.jsx(bt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(Fo,{"data-state":Jo(h.open),role:"dialog",id:h.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)"}})})})}),Xo="PopoverClose",nu=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ke(Xo,n);return f.jsx(ee.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});nu.displayName=Xo;var ru="PopoverArrow",ou=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ut(n);return f.jsx(Wo,{...o,...r,ref:t})});ou.displayName=ru;function Jo(e){return e?"open":"closed"}var Zo=Ho,Qo=Uo,es=Go,ts=Ko,su=[" ","Enter","ArrowUp","ArrowDown"],iu=[" ","Enter"],$e="Select",[Vt,Yt,au]=na($e),[nt]=Ye($e,[au,zt]),Ut=zt(),[cu,Oe]=nt($e),[lu,uu]=nt($e),ns=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:p,autoComplete:m,disabled:h,required:g,form:b}=e,d=Ut(t),[v,S]=u.useState(null),[w,C]=u.useState(null),[R,k]=u.useState(!1),j=fa(l),[N,O]=it({prop:r,defaultProp:o??!1,onChange:s,caller:$e}),[H,z]=it({prop:i,defaultProp:a,onChange:c,caller:$e}),L=u.useRef(null),Y=v?b||!!v.closest("form"):!0,[K,T]=u.useState(new Set),P=Array.from(K).map(E=>E.props.value).join(";");return f.jsx(Lo,{...d,children:f.jsxs(cu,{required:g,scope:t,trigger:v,onTriggerChange:S,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:Me(),value:H,onValueChange:z,open:N,onOpenChange:O,dir:j,triggerPointerDownPosRef:L,disabled:h,children:[f.jsx(Vt.Provider,{scope:t,children:f.jsx(lu,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(E=>{T(_=>new Set(_).add(E))},[]),onNativeOptionRemove:u.useCallback(E=>{T(_=>{const x=new Set(_);return x.delete(E),x})},[]),children:n})}),Y?f.jsxs(Es,{"aria-hidden":!0,required:g,tabIndex:-1,name:p,autoComplete:m,value:H,onChange:E=>z(E.target.value),disabled:h,form:b,children:[H===void 0?f.jsx("option",{value:""}):null,Array.from(K)]},P):null]})})};ns.displayName=$e;var rs="SelectTrigger",os=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ut(n),i=Oe(rs,n),a=i.disabled||r,c=re(t,i.onTriggerChange),l=Yt(n),p=u.useRef("touch"),[m,h,g]=Rs(d=>{const v=l().filter(C=>!C.disabled),S=v.find(C=>C.value===i.value),w=_s(v,d,S);w!==void 0&&i.onValueChange(w.value)}),b=d=>{a||(i.onOpenChange(!0),g()),d&&(i.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return f.jsx(Tn,{asChild:!0,...s,children:f.jsx(ee.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Ps(i.value)?"":void 0,...o,ref:c,onClick:Z(o.onClick,d=>{d.currentTarget.focus(),p.current!=="mouse"&&b(d)}),onPointerDown:Z(o.onPointerDown,d=>{p.current=d.pointerType;const v=d.target;v.hasPointerCapture(d.pointerId)&&v.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(b(d),d.preventDefault())}),onKeyDown:Z(o.onKeyDown,d=>{const v=m.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&h(d.key),!(v&&d.key===" ")&&su.includes(d.key)&&(b(),d.preventDefault())})})})});os.displayName=rs;var ss="SelectValue",is=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=Oe(ss,n),{onValueNodeHasChildrenChange:l}=c,p=s!==void 0,m=re(t,c.onValueNodeChange);return ce(()=>{l(p)},[l,p]),f.jsx(ee.span,{...a,ref:m,style:{pointerEvents:"none"},children:Ps(c.value)?f.jsx(f.Fragment,{children:i}):s})});is.displayName=ss;var du="SelectIcon",as=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});as.displayName=du;var fu="SelectPortal",cs=e=>f.jsx(wt,{asChild:!0,...e});cs.displayName=fu;var Le="SelectContent",ls=u.forwardRef((e,t)=>{const n=Oe(Le,e.__scopeSelect),[r,o]=u.useState();if(ce(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?pt.createPortal(f.jsx(us,{scope:e.__scopeSelect,children:f.jsx(Vt.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(ds,{...e,ref:t})});ls.displayName=Le;var me=10,[us,Ne]=nt(Le),pu="SelectContentImpl",mu=Ve("SelectContent.RemoveScroll"),ds=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:d,avoidCollisions:v,...S}=e,w=Oe(Le,n),[C,R]=u.useState(null),[k,j]=u.useState(null),N=re(t,A=>R(A)),[O,H]=u.useState(null),[z,L]=u.useState(null),Y=Yt(n),[K,T]=u.useState(!1),P=u.useRef(!1);u.useEffect(()=>{if(C)return hn(C)},[C]),ln();const E=u.useCallback(A=>{const[G,...J]=Y().map(Q=>Q.ref.current),[V]=J.slice(-1),q=document.activeElement;for(const Q of A)if(Q===q||(Q?.scrollIntoView({block:"nearest"}),Q===G&&k&&(k.scrollTop=0),Q===V&&k&&(k.scrollTop=k.scrollHeight),Q?.focus(),document.activeElement!==q))return},[Y,k]),_=u.useCallback(()=>E([O,C]),[E,O,C]);u.useEffect(()=>{K&&_()},[K,_]);const{onOpenChange:x,triggerPointerDownPosRef:M}=w;u.useEffect(()=>{if(C){let A={x:0,y:0};const G=V=>{A={x:Math.abs(Math.round(V.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(V.pageY)-(M.current?.y??0))}},J=V=>{A.x<=10&&A.y<=10?V.preventDefault():C.contains(V.target)||x(!1),document.removeEventListener("pointermove",G),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",J,{capture:!0})}}},[C,x,M]),u.useEffect(()=>{const A=()=>x(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[x]);const[W,y]=Rs(A=>{const G=Y().filter(q=>!q.disabled),J=G.find(q=>q.ref.current===document.activeElement),V=_s(G,A,J);V&&setTimeout(()=>V.ref.current.focus())}),D=u.useCallback((A,G,J)=>{const V=!P.current&&!J;(w.value!==void 0&&w.value===G||V)&&(H(A),V&&(P.current=!0))},[w.value]),F=u.useCallback(()=>C?.focus(),[C]),B=u.useCallback((A,G,J)=>{const V=!P.current&&!J;(w.value!==void 0&&w.value===G||V)&&L(A)},[w.value]),te=r==="popper"?Dn:fs,oe=te===Dn?{side:a,sideOffset:c,align:l,alignOffset:p,arrowPadding:m,collisionBoundary:h,collisionPadding:g,sticky:b,hideWhenDetached:d,avoidCollisions:v}:{};return f.jsx(us,{scope:n,content:C,viewport:k,onViewportChange:j,itemRefCallback:D,selectedItem:O,onItemLeave:F,itemTextRefCallback:B,focusSelectedItem:_,selectedItemText:z,position:r,isPositioned:K,searchRef:W,children:f.jsx(_t,{as:mu,allowPinchZoom:!0,children:f.jsx(yt,{asChild:!0,trapped:w.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:Z(o,A=>{w.trigger?.focus({preventScroll:!0}),A.preventDefault()}),children:f.jsx(bt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:f.jsx(te,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:A=>A.preventDefault(),...S,...oe,onPlaced:()=>T(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Z(S.onKeyDown,A=>{const G=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!G&&A.key.length===1&&y(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let V=Y().filter(q=>!q.disabled).map(q=>q.ref.current);if(["ArrowUp","End"].includes(A.key)&&(V=V.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const q=A.target,Q=V.indexOf(q);V=V.slice(Q+1)}setTimeout(()=>E(V)),A.preventDefault()}})})})})})})});ds.displayName=pu;var hu="SelectItemAlignedPosition",fs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Oe(Le,n),i=Ne(Le,n),[a,c]=u.useState(null),[l,p]=u.useState(null),m=re(t,N=>p(N)),h=Yt(n),g=u.useRef(!1),b=u.useRef(!0),{viewport:d,selectedItem:v,selectedItemText:S,focusSelectedItem:w}=i,C=u.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&d&&v&&S){const N=s.trigger.getBoundingClientRect(),O=l.getBoundingClientRect(),H=s.valueNode.getBoundingClientRect(),z=S.getBoundingClientRect();if(s.dir!=="rtl"){const q=z.left-O.left,Q=H.left-q,ae=N.left-Q,We=N.width+ae,Wn=Math.max(We,O.width),Bn=window.innerWidth-me,zn=Bo(Q,[me,Math.max(me,Bn-Wn)]);a.style.minWidth=We+"px",a.style.left=zn+"px"}else{const q=O.right-z.right,Q=window.innerWidth-H.right-q,ae=window.innerWidth-N.right-Q,We=N.width+ae,Wn=Math.max(We,O.width),Bn=window.innerWidth-me,zn=Bo(Q,[me,Math.max(me,Bn-Wn)]);a.style.minWidth=We+"px",a.style.right=zn+"px"}const L=h(),Y=window.innerHeight-me*2,K=d.scrollHeight,T=window.getComputedStyle(l),P=parseInt(T.borderTopWidth,10),E=parseInt(T.paddingTop,10),_=parseInt(T.borderBottomWidth,10),x=parseInt(T.paddingBottom,10),M=P+E+K+x+_,W=Math.min(v.offsetHeight*5,M),y=window.getComputedStyle(d),D=parseInt(y.paddingTop,10),F=parseInt(y.paddingBottom,10),B=N.top+N.height/2-me,te=Y-B,oe=v.offsetHeight/2,A=v.offsetTop+oe,G=P+E+A,J=M-G;if(G<=B){const q=L.length>0&&v===L[L.length-1].ref.current;a.style.bottom="0px";const Q=l.clientHeight-d.offsetTop-d.offsetHeight,ae=Math.max(te,oe+(q?F:0)+Q+_),We=G+ae;a.style.height=We+"px"}else{const q=L.length>0&&v===L[0].ref.current;a.style.top="0px";const ae=Math.max(B,P+d.offsetTop+(q?D:0)+oe)+J;a.style.height=ae+"px",d.scrollTop=G-B+d.offsetTop}a.style.margin=`${me}px 0`,a.style.minHeight=W+"px",a.style.maxHeight=Y+"px",r?.(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,a,l,d,v,S,s.dir,r]);ce(()=>C(),[C]);const[R,k]=u.useState();ce(()=>{l&&k(window.getComputedStyle(l).zIndex)},[l]);const j=u.useCallback(N=>{N&&b.current===!0&&(C(),w?.(),b.current=!1)},[C,w]);return f.jsx(vu,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:j,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:f.jsx(ee.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fs.displayName=hu;var gu="SelectPopperPosition",Dn=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=me,...s}=e,i=Ut(n);return f.jsx(Fo,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});Dn.displayName=gu;var[vu,jn]=nt(Le,{}),In="SelectViewport",ps=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ne(In,n),i=jn(In,n),a=re(t,s.onViewportChange),c=u.useRef(0);return f.jsxs(f.Fragment,{children:[f.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}),f.jsx(Vt.Slot,{scope:n,children:f.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Z(o.onScroll,l=>{const p=l.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=i;if(h?.current&&m){const g=Math.abs(c.current-p.scrollTop);if(g>0){const b=window.innerHeight-me*2,d=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),S=Math.max(d,v);if(S<b){const w=S+g,C=Math.min(b,w),R=w-C;m.style.height=C+"px",m.style.bottom==="0px"&&(p.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}c.current=p.scrollTop})})})]})});ps.displayName=In;var ms="SelectGroup",[xu,bu]=nt(ms),yu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Me();return f.jsx(xu,{scope:n,id:o,children:f.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});yu.displayName=ms;var hs="SelectLabel",wu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bu(hs,n);return f.jsx(ee.div,{id:o.id,...r,ref:t})});wu.displayName=hs;var Gt="SelectItem",[Su,gs]=nt(Gt),vs=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Oe(Gt,n),c=Ne(Gt,n),l=a.value===r,[p,m]=u.useState(s??""),[h,g]=u.useState(!1),b=re(t,w=>c.itemRefCallback?.(w,r,o)),d=Me(),v=u.useRef("touch"),S=()=>{o||(a.onValueChange(r),a.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 f.jsx(Su,{scope:n,value:r,disabled:o,textId:d,isSelected:l,onItemTextChange:u.useCallback(w=>{m(C=>C||(w?.textContent??"").trim())},[]),children:f.jsx(Vt.ItemSlot,{scope:n,value:r,disabled:o,textValue:p,children:f.jsx(ee.div,{role:"option","aria-labelledby":d,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:b,onFocus:Z(i.onFocus,()=>g(!0)),onBlur:Z(i.onBlur,()=>g(!1)),onClick:Z(i.onClick,()=>{v.current!=="mouse"&&S()}),onPointerUp:Z(i.onPointerUp,()=>{v.current==="mouse"&&S()}),onPointerDown:Z(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:Z(i.onPointerMove,w=>{v.current=w.pointerType,o?c.onItemLeave?.():v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Z(i.onKeyDown,w=>{c.searchRef?.current!==""&&w.key===" "||(iu.includes(w.key)&&S(),w.key===" "&&w.preventDefault())})})})})});vs.displayName=Gt;var dt="SelectItemText",xs=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Oe(dt,n),a=Ne(dt,n),c=gs(dt,n),l=uu(dt,n),[p,m]=u.useState(null),h=re(t,S=>m(S),c.onItemTextChange,S=>a.itemTextRefCallback?.(S,c.value,c.disabled)),g=p?.textContent,b=u.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:d,onNativeOptionRemove:v}=l;return ce(()=>(d(b),()=>v(b)),[d,v,b]),f.jsxs(f.Fragment,{children:[f.jsx(ee.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(s.children,i.valueNode):null]})});xs.displayName=dt;var bs="SelectItemIndicator",ys=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gs(bs,n).isSelected?f.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});ys.displayName=bs;var $n="SelectScrollUpButton",ws=u.forwardRef((e,t)=>{const n=Ne($n,e.__scopeSelect),r=jn($n,e.__scopeSelect),[o,s]=u.useState(!1),i=re(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Cs,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});ws.displayName=$n;var Ln="SelectScrollDownButton",Ss=u.forwardRef((e,t)=>{const n=Ne(Ln,e.__scopeSelect),r=jn(Ln,e.__scopeSelect),[o,s]=u.useState(!1),i=re(t,r.onScrollButtonChange);return ce(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,p=Math.ceil(c.scrollTop)<l;s(p)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsx(Cs,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Ss.displayName=Ln;var Cs=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ne("SelectScrollButton",n),i=u.useRef(null),a=Yt(n),c=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>c(),[c]),ce(()=>{a().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),f.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{c()})})}),Cu="SelectSeparator",Eu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});Eu.displayName=Cu;var Fn="SelectArrow",Pu=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ut(n),s=Oe(Fn,n),i=Ne(Fn,n);return s.open&&i.position==="popper"?f.jsx(Wo,{...o,...r,ref:t}):null});Pu.displayName=Fn;var Ru="SelectBubbleInput",Es=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),s=re(r,o),i=ro(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&p){const m=new Event("change",{bubbles:!0});p.call(a,t),a.dispatchEvent(m)}},[i,t]),f.jsx(ee.select,{...n,style:{...vr,...n.style},ref:s,defaultValue:t})});Es.displayName=Ru;function Ps(e){return e===""||e===void 0}function Rs(e){const t=De(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(i=>{const a=n.current+i;t(a),(function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function _s(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=_u(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function _u(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Au=ns,ku=os,Ou=is,Nu=as,Tu=cs,Mu=ls,Du=ps,ju=vs,Iu=xs,$u=ys,Kt="Switch",[Lu]=Ye(Kt),[Fu,Wu]=Lu(Kt),As=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c="on",onCheckedChange:l,form:p,...m}=e,[h,g]=u.useState(null),b=re(t,C=>g(C)),d=u.useRef(!1),v=h?p||!!h.closest("form"):!0,[S,w]=it({prop:o,defaultProp:s??!1,onChange:l,caller:Kt});return f.jsxs(Fu,{scope:n,checked:S,disabled:a,children:[f.jsx(ee.button,{type:"button",role:"switch","aria-checked":S,"aria-required":i,"data-state":Ts(S),"data-disabled":a?"":void 0,disabled:a,value:c,...m,ref:b,onClick:Z(e.onClick,C=>{w(R=>!R),v&&(d.current=C.isPropagationStopped(),d.current||C.stopPropagation())})}),v&&f.jsx(Ns,{control:h,bubbles:!d.current,name:r,value:c,checked:S,required:i,disabled:a,form:p,style:{transform:"translateX(-100%)"}})]})});As.displayName=Kt;var ks="SwitchThumb",Os=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Wu(ks,n);return f.jsx(ee.span,{"data-state":Ts(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Os.displayName=ks;var Bu="SwitchBubbleInput",Ns=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=re(i,s),c=ro(n),l=oo(t);return u.useEffect(()=>{const p=i.current;if(!p)return;const m=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&g){const b=new Event("click",{bubbles:r});g.call(p,n),p.dispatchEvent(b)}},[c,n,r]),f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ns.displayName=Bu;function Ts(e){return e?"checked":"unchecked"}var zu=As,Hu=Os;const Vu=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yu=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ms=e=>{const t=Yu(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ds=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Uu=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Gu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ku=ne.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>ne.createElement("svg",{ref:c,...Gu,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ds("lucide",o),...!s&&!Uu(a)&&{"aria-hidden":"true"},...a},[...i.map(([l,p])=>ne.createElement(l,p)),...Array.isArray(s)?s:[s]]));const Fe=(e,t)=>{const n=ne.forwardRef(({className:r,...o},s)=>ne.createElement(Ku,{ref:s,iconNode:t,className:Ds(`lucide-${Vu(Ms(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Ms(e),n};const qu=Fe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const js=Fe("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const ft=Fe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Xu=Fe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Ju=Fe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Zu=Fe("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Qu=Fe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ed=e=>f.jsx(Au,{...e}),td=({children:e,className:t,...n})=>f.jsxs(ju,{className:X("text-sm px-3 py-2 rounded-lg bg-bg-1 text-text-1 cursor-pointer hover:bg-bg-2 outline-none",t),...n,children:[f.jsx(Iu,{className:"text-text-1 text-sm",children:e}),f.jsx("span",{className:"absolute right-2 items-center justify-center",children:f.jsx($u,{children:f.jsx(js,{className:"w-4 h-4 text-text-2"})})})]}),nd=({className:e,error:t,children:n,...r})=>f.jsxs(ku,{className:X("bg-bg-1 *:data-[slot=select-value]:overflow-hidden whitespace-nowrap justify-between data-placeholder:text-text-2 text-text-1 flex items-center gap-3 rounded-lg text-sm cursor-pointer px-3 h-10 border border-border-1 outline-none","data-[state=open]:ring-2 data-[state=open]:ring-border-1/80",e,t&&"border-danger text-danger data-[slot=select-value]:text-danger data-placeholder:text-danger"),"aria-label":"select-trigger",...r,children:[n,f.jsx(Nu,{asChild:!0,children:f.jsx(ft,{className:X("w-5 h-5 text-text-2",t&&"text-danger/80")})})]}),rd=({className:e,...t})=>f.jsx(Ou,{"data-slot":"select-value",className:e,...t}),od=({children:e,className:t,position:n="popper",...r})=>f.jsx(Tu,{children:f.jsxs(Mu,{"data-slot":"select-content",className:X("rounded-lg z-999 overflow-y-auto min-w-[var(--radix-select-trigger-width)] bg-bg-1 border border-border-2 data-[state=open]:animate-popover-in shadow-sm","p-px",n==="popper"&&"max-h-82 w-full min-w-(--radix-select-trigger-width) scroll-my-1",t),sideOffset:8,position:n,...r,children:[f.jsx(ws,{className:"flex justify-center items-center",children:f.jsx(Zu,{className:"w-5 h-5 text-text-2 "})}),f.jsx(Du,{children:e}),f.jsx(Ss,{className:"flex justify-center items-center",children:f.jsx(ft,{className:"w-5 h-5 text-text-2 "})})]})}),sd=({options:e,placeholder:t,onChange:n,defaultValue:r,className:o,contentClassName:s,value:i,error:a})=>f.jsxs(ed,{onValueChange:n,value:i,defaultValue:r,children:[f.jsx(nd,{error:a,className:o,children:f.jsx(rd,{placeholder:t})}),f.jsx(od,{className:s,children:e.map((c,l)=>f.jsx(td,{value:c.value,children:c.label},l))})]}),id=({sections:e,containerClassName:t,pathname:n,open:r,textHeader:o,IconHeader:s,setOpen:i})=>f.jsxs("div",{className:X("fixed top-0 left-0 inset-0 shrink-0 overflow-y-auto overflow-x-hidden z-999 transition-all",r?"pointer-events-auto lg:w-72":"pointer-events-none lg:pointer-events-auto lg:w-21",t),children:[f.jsx("div",{className:X("bg-overlay w-full h-full transition-opacity lg:hidden backdrop-blur-xs",r?"opacity-100":"opacity-0"),onClick:()=>i(!1)}),f.jsxs("nav",{className:X("absolute px-5 w-72 py-5 top-0 shrink-0 transition-all left-0 h-full bg-bg-1 lg:border-r lg:border-r-border-2",r?"translate-x-0":"-translate-x-full lg:translate-x-0 lg:w-21"),children:[f.jsxs("div",{className:"flex gap-3 items-center mb-7",children:[f.jsx("div",{className:"w-11 h-10 rounded-lg bg-primary-500 shrink-0 flex items-center justify-center",children:f.jsx(s,{className:"w-5 h-5 text-text-3"})}),f.jsx("span",{className:X("text-text-1 transition-opacity font-bold text-2xl",r?"opacity-100":"opacity-0"),children:o})]}),f.jsx("div",{className:"flex flex-col gap-8",children:e.map(({options:a,title:c,id:l})=>f.jsxs("section",{children:[f.jsx("p",{className:X("mb-2 text-text-2 text-sm transition-opacity",r?"opacity-100":"opacity-0"),children:c}),a.map(({label:p,href:m,Icon:h,onClick:g},b)=>{const d=n.startsWith(m);return f.jsxs("button",{onClick:g,className:X("h-10 w-full group transition-[width] rounded-lg overflow-hidden text-sm text-text-2 px-3 cursor-pointer flex items-center gap-3","hover:text-text-1 transition-[color]",d&&"bg-primary-500 text-text-3 hover:text-text-3",r?"w-full":"w-11"),children:[f.jsx(h,{className:X("w-5 h-5 text-text-2 group-hover:text-text-1 transition-colors shrink-0",d&&"text-text-3 group-hover:text-text-3")}),f.jsx("p",{className:X("transition-opacity",r?"opacity-100":"opacity-0"),children:p})]},b)})]},l))})]})]}),ad=({steps:e,currentStep:t=0,className:n,labelClassName:r})=>f.jsx("div",{className:X("flex items-center gap-4",n),children:e.map((o,s)=>{const i=t>=s;return f.jsxs(ne.Fragment,{children:[f.jsx("div",{className:"flex flex-col items-center",children:f.jsxs("button",{className:X("relative w-10 h-10 rounded-lg cursor-pointer bg-bg-1 text-text-2 border border-border-2 font-bold",i&&"bg-primary-500 border-none text-text-3"),children:[s+1,f.jsx("p",{className:X("absolute left-1/2 -translate-x-1/2 top-full text-center w-fit text-sm font-normal translate-y-px",i&&"text-text-1",r),children:o.label})]},s)},s),s+1<e.length&&f.jsx("div",{className:"h-px w-full bg-border-2"})]},s)})}),Is=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$s=Xn,cd=((e,t)=>n=>{var r;if(t?.variants==null)return $s(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const p=n?.[l],m=s?.[l];if(p===null)return null;const h=Is(p)||Is(m);return o[l][h]}),a=n&&Object.entries(n).reduce((l,p)=>{let[m,h]=p;return h===void 0||(l[m]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,p)=>{let{class:m,className:h,...g}=p;return Object.entries(g).every(b=>{let[d,v]=b;return Array.isArray(v)?v.includes({...s,...a}[d]):{...s,...a}[d]===v})?[...l,m,h]:l},[]);return $s(e,i,c,n?.class,n?.className)})("h-10 px-3 text-sm flex items-center gap-3 rounded-lg cursor-pointer transition-[background-color] w-fit",{variants:{variant:{filled:"bg-primary-500 text-text-3 font-medium hover:bg-primary-400",outlined:"border border-border-1 bg-bg-1 text-text-1 hover:bg-bg-2",ghost:"bg-bg-1 text-text-1 font-medium hover:bg-bg-2",icon:"h-10 w-10 bg-bg-2 justify-center hover:bg-bg-1 text-text-1"}}}),ld=({variant:e="filled",className:t,children:n,...r})=>f.jsx("button",{className:X(cd({variant:e,className:t})),...r,children:n}),qt=ne.memo(ld),ud=e=>f.jsx(zu,{className:"h-6 w-10 bg-bg-1 rounded-full relative cursor-pointer data-[state=checked]:bg-primary-500 border-border-2 border",...e,children:f.jsx(Hu,{className:"transition-transform will-change-transform block w-5 h-5 bg-text-2 rounded-full translate-x-0.5 data-[state=checked]:translate-x-4 data-[state=checked]:bg-text-3"})}),dd=({text:e="Badge",type:t="success"})=>{const n={success:"bg-bg-success text-success border-success",error:"bg-bg-danger text-danger border-danger",warning:"bg-bg-warning text-warning border-warning"};return f.jsx("div",{className:X("text-sm px-3 w-fit py-1 rounded-lg border outline-none",n[t]),children:e})};var Xt={exports:{}},fd=Xt.exports,Ls;function Fs(){return Ls||(Ls=1,(function(e,t){(function(n,r){e.exports=r()})(fd,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",i="second",a="minute",c="hour",l="day",p="week",m="month",h="quarter",g="year",b="date",d="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var P=["th","st","nd","rd"],E=T%100;return"["+T+(P[(E-20)%10]||P[E]||P[0])+"]"}},C=function(T,P,E){var _=String(T);return!_||_.length>=P?T:""+Array(P+1-_.length).join(E)+T},R={s:C,z:function(T){var P=-T.utcOffset(),E=Math.abs(P),_=Math.floor(E/60),x=E%60;return(P<=0?"+":"-")+C(_,2,"0")+":"+C(x,2,"0")},m:function T(P,E){if(P.date()<E.date())return-T(E,P);var _=12*(E.year()-P.year())+(E.month()-P.month()),x=P.clone().add(_,m),M=E-x<0,W=P.clone().add(_+(M?-1:1),m);return+(-(_+(E-x)/(M?x-W:W-x))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:m,y:g,w:p,d:l,D:b,h:c,m:a,s:i,ms:s,Q:h}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},k="en",j={};j[k]=w;var N="$isDayjsObject",O=function(T){return T instanceof Y||!(!T||!T[N])},H=function T(P,E,_){var x;if(!P)return k;if(typeof P=="string"){var M=P.toLowerCase();j[M]&&(x=M),E&&(j[M]=E,x=M);var W=P.split("-");if(!x&&W.length>1)return T(W[0])}else{var y=P.name;j[y]=P,x=y}return!_&&x&&(k=x),x||!_&&k},z=function(T,P){if(O(T))return T.clone();var E=typeof P=="object"?P:{};return E.date=T,E.args=arguments,new Y(E)},L=R;L.l=H,L.i=O,L.w=function(T,P){return z(T,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var Y=(function(){function T(E){this.$L=H(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[N]=!0}var P=T.prototype;return P.parse=function(E){this.$d=(function(_){var x=_.date,M=_.utc;if(x===null)return new Date(NaN);if(L.u(x))return new Date;if(x instanceof Date)return new Date(x);if(typeof x=="string"&&!/Z$/i.test(x)){var W=x.match(v);if(W){var y=W[2]-1||0,D=(W[7]||"0").substring(0,3);return M?new Date(Date.UTC(W[1],y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,D)):new Date(W[1],y,W[3]||1,W[4]||0,W[5]||0,W[6]||0,D)}}return new Date(x)})(E),this.init()},P.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},P.$utils=function(){return L},P.isValid=function(){return this.$d.toString()!==d},P.isSame=function(E,_){var x=z(E);return this.startOf(_)<=x&&x<=this.endOf(_)},P.isAfter=function(E,_){return z(E)<this.startOf(_)},P.isBefore=function(E,_){return this.endOf(_)<z(E)},P.$g=function(E,_,x){return L.u(E)?this[_]:this.set(x,E)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(E,_){var x=this,M=!!L.u(_)||_,W=L.p(E),y=function(J,V){var q=L.w(x.$u?Date.UTC(x.$y,V,J):new Date(x.$y,V,J),x);return M?q:q.endOf(l)},D=function(J,V){return L.w(x.toDate()[J].apply(x.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(V)),x)},F=this.$W,B=this.$M,te=this.$D,oe="set"+(this.$u?"UTC":"");switch(W){case g:return M?y(1,0):y(31,11);case m:return M?y(1,B):y(0,B+1);case p:var A=this.$locale().weekStart||0,G=(F<A?F+7:F)-A;return y(M?te-G:te+(6-G),B);case l:case b:return D(oe+"Hours",0);case c:return D(oe+"Minutes",1);case a:return D(oe+"Seconds",2);case i:return D(oe+"Milliseconds",3);default:return this.clone()}},P.endOf=function(E){return this.startOf(E,!1)},P.$set=function(E,_){var x,M=L.p(E),W="set"+(this.$u?"UTC":""),y=(x={},x[l]=W+"Date",x[b]=W+"Date",x[m]=W+"Month",x[g]=W+"FullYear",x[c]=W+"Hours",x[a]=W+"Minutes",x[i]=W+"Seconds",x[s]=W+"Milliseconds",x)[M],D=M===l?this.$D+(_-this.$W):_;if(M===m||M===g){var F=this.clone().set(b,1);F.$d[y](D),F.init(),this.$d=F.set(b,Math.min(this.$D,F.daysInMonth())).$d}else y&&this.$d[y](D);return this.init(),this},P.set=function(E,_){return this.clone().$set(E,_)},P.get=function(E){return this[L.p(E)]()},P.add=function(E,_){var x,M=this;E=Number(E);var W=L.p(_),y=function(B){var te=z(M);return L.w(te.date(te.date()+Math.round(B*E)),M)};if(W===m)return this.set(m,this.$M+E);if(W===g)return this.set(g,this.$y+E);if(W===l)return y(1);if(W===p)return y(7);var D=(x={},x[a]=r,x[c]=o,x[i]=n,x)[W]||1,F=this.$d.getTime()+E*D;return L.w(F,this)},P.subtract=function(E,_){return this.add(-1*E,_)},P.format=function(E){var _=this,x=this.$locale();if(!this.isValid())return x.invalidDate||d;var M=E||"YYYY-MM-DDTHH:mm:ssZ",W=L.z(this),y=this.$H,D=this.$m,F=this.$M,B=x.weekdays,te=x.months,oe=x.meridiem,A=function(V,q,Q,ae){return V&&(V[q]||V(_,M))||Q[q].slice(0,ae)},G=function(V){return L.s(y%12||12,V,"0")},J=oe||function(V,q,Q){var ae=V<12?"AM":"PM";return Q?ae.toLowerCase():ae};return M.replace(S,(function(V,q){return q||(function(Q){switch(Q){case"YY":return String(_.$y).slice(-2);case"YYYY":return L.s(_.$y,4,"0");case"M":return F+1;case"MM":return L.s(F+1,2,"0");case"MMM":return A(x.monthsShort,F,te,3);case"MMMM":return A(te,F);case"D":return _.$D;case"DD":return L.s(_.$D,2,"0");case"d":return String(_.$W);case"dd":return A(x.weekdaysMin,_.$W,B,2);case"ddd":return A(x.weekdaysShort,_.$W,B,3);case"dddd":return B[_.$W];case"H":return String(y);case"HH":return L.s(y,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return J(y,D,!0);case"A":return J(y,D,!1);case"m":return String(D);case"mm":return L.s(D,2,"0");case"s":return String(_.$s);case"ss":return L.s(_.$s,2,"0");case"SSS":return L.s(_.$ms,3,"0");case"Z":return W}return null})(V)||W.replace(":","")}))},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(E,_,x){var M,W=this,y=L.p(_),D=z(E),F=(D.utcOffset()-this.utcOffset())*r,B=this-D,te=function(){return L.m(W,D)};switch(y){case g:M=te()/12;break;case m:M=te();break;case h:M=te()/3;break;case p:M=(B-F)/6048e5;break;case l:M=(B-F)/864e5;break;case c:M=B/o;break;case a:M=B/r;break;case i:M=B/n;break;default:M=B}return x?M:L.a(M)},P.daysInMonth=function(){return this.endOf(m).$D},P.$locale=function(){return j[this.$L]},P.locale=function(E,_){if(!E)return this.$L;var x=this.clone(),M=H(E,_,!0);return M&&(x.$L=M),x},P.clone=function(){return L.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},T})(),K=Y.prototype;return z.prototype=K,[["$ms",s],["$s",i],["$m",a],["$H",c],["$W",l],["$M",m],["$y",g],["$D",b]].forEach((function(T){K[T[1]]=function(P){return this.$g(P,T[0],T[1])}})),z.extend=function(T,P){return T.$i||(T(P,Y,z),T.$i=!0),z},z.locale=H,z.isDayjs=O,z.unix=function(T){return z(1e3*T)},z.en=j[k],z.Ls=j,z.p={},z}))})(Xt)),Xt.exports}var pd=Fs();const Ee=Yn(pd);var Jt={exports:{}},md=Jt.exports,Ws;function hd(){return Ws||(Ws=1,(function(e,t){(function(n,r){e.exports=r()})(md,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,o=/([+-]|\d\d)/g;return function(s,i,a){var c=i.prototype;a.utc=function(d){var v={date:d,utc:!0,args:arguments};return new i(v)},c.utc=function(d){var v=a(this.toDate(),{locale:this.$L,utc:!0});return d?v.add(this.utcOffset(),n):v},c.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var l=c.parse;c.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),l.call(this,d)};var p=c.init;c.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else p.call(this)};var m=c.utcOffset;c.utcOffset=function(d,v){var S=this.$utils().u;if(S(d))return this.$u?0:S(this.$offset)?m.call(this):this.$offset;if(typeof d=="string"&&(d=(function(k){k===void 0&&(k="");var j=k.match(r);if(!j)return null;var N=(""+j[0]).match(o)||["-",0,0],O=N[0],H=60*+N[1]+ +N[2];return H===0?0:O==="+"?H:-H})(d),d===null))return this;var w=Math.abs(d)<=16?60*d:d;if(w===0)return this.utc(v);var C=this.clone();if(v)return C.$offset=w,C.$u=!1,C;var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(C=this.local().add(w+R,n)).$offset=w,C.$x.$localOffset=R,C};var h=c.format;c.format=function(d){var v=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,v)},c.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var g=c.toDate;c.toDate=function(d){return d==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():g.call(this)};var b=c.diff;c.diff=function(d,v,S){if(d&&this.$u===d.$u)return b.call(this,d,v,S);var w=this.local(),C=a(d).local();return b.call(w,C,v,S)}}}))})(Jt)),Jt.exports}var gd=hd();const vd=Yn(gd);Ee.extend(vd);const xd=(e,t)=>{const n=Ee.utc().year(t).month(e).startOf("month"),r=Ee.utc().year(t).month(e).endOf("month"),o=n.day(),s=[];for(let c=0;c<o;c++)s.push({date:n.subtract(o-c,"day").startOf("day"),currentMonth:!1});for(let c=1;c<=r.date();c++)s.push({date:Ee.utc().year(t).month(e).date(c).startOf("day"),currentMonth:!0});const a=42-s.length;for(let c=1;c<=a;c++)s.push({date:r.add(c,"day").startOf("day"),currentMonth:!1});return s},bd=Ee().year(),yd=Array.from({length:120},(e,t)=>Ee().year(bd-60+t).year()),wd=[{en:"Jan",es:"Ene"},{en:"Feb",es:"Feb"},{en:"Mar",es:"Mar"},{en:"Apr",es:"Abr"},{en:"May",es:"May"},{en:"Jun",es:"Jun"},{en:"Jul",es:"Jul"},{en:"Aug",es:"Ago"},{en:"Sep",es:"Sep"},{en:"Oct",es:"Oct"},{en:"Nov",es:"Nov"},{en:"Dec",es:"Dic"}],Sd=[{en:"Su",es:"Do"},{en:"Mo",es:"Lu"},{en:"Tu",es:"Ma"},{en:"We",es:"Mi"},{en:"Th",es:"Ju"},{en:"Fr",es:"Vi"},{en:"Sa",es:"Sa"}],Bs=({locale:e="en",date:t,setDate:n,rootClassName:r,buttonDayClassName:o,containerMonthDaysClassName:s})=>{const i=ne.useMemo(()=>Ee(),[]),[a,c]=ne.useState(i.month()),[l,p]=ne.useState(i.year()),m=ne.useMemo(()=>xd(a,l),[a,l]);return f.jsxs("div",{className:X("border-border-2 border py-3 px-4 bg-bg-1 rounded-lg w-fit",r),children:[f.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[f.jsx(qt,{variant:"ghost",className:"w-fit px-2 h-9 outline-none",onClick:()=>c(h=>h===0?(p(g=>g-1),11):h-1),children:f.jsx(Xu,{className:"w-5 h-5 text-text-2"})}),f.jsxs("div",{"data-slot":"container",className:"border focus-within:ring-2 focus-within:ring-border-1/80 border-border-1 rounded-lg bg-bg-1 h-9 w-20 overflow-hidden flex gap-2 items-center relative",children:[f.jsx("select",{className:"text-sm h-full w-full appearance-none px-2 outline-none border-none text-text-1 placeholder:text-text-2",value:a,onChange:h=>c(parseInt(h.target.value)),children:wd.map((h,g)=>f.jsx("option",{value:g,className:"bg-bg-2",children:h[e]},g))}),f.jsx(ft,{className:"w-5 h-5 text-text-2 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]}),f.jsxs("div",{"data-slot":"container",className:"border focus-within:ring-2 focus-within:ring-border-1/80 border-border-1 rounded-lg bg-bg-1 h-9 w-20 overflow-hidden flex gap-2 items-center relative",children:[f.jsx("select",{className:"text-sm h-full w-full appearance-none px-2 outline-none border-none text-text-1 placeholder:text-text-2",value:l,onChange:h=>p(parseInt(h.target.value)),children:yd.map(h=>f.jsx("option",{value:h,className:"bg-bg-2",children:h},h))}),f.jsx(ft,{className:"w-5 h-5 text-text-2 absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"})]}),f.jsx(qt,{variant:"ghost",className:"w-fit px-2 h-9 outline-none",onClick:()=>{c(h=>h===11?(p(g=>g+1),0):h+1)},children:f.jsx(Ju,{className:"w-5 h-5 text-text-2"})})]}),f.jsxs("div",{className:X("grid grid-cols-7 gap-y-2",s),children:[Sd.map(h=>f.jsx("p",{className:"text-center text-text-2 text-sm p-2 font-normal",children:h[e]},h[e])),m.map(({date:h,currentMonth:g})=>{const b=h.isSame(i,"day"),d=t&&h.isSame(Ee(t),"day");return f.jsx(qt,{variant:"ghost",onClick:()=>n(h.toDate()),className:X("text-center outline-none text-text-1 justify-self-center text-sm w-full justify-center w-8 h-8 font-normal",!g&&"text-text-2",b&&"bg-bg-2 text-text-1 font-medium",d&&"bg-primary-500 text-text-3 hover:bg-primary-400",o),children:h.date()},h.format("YYYY-MM-DD"))})]})]})},zs=e=>f.jsx(Cc,{...e}),Hs=({className:e,...t})=>f.jsx(Ec,{className:e,...t}),Vs=e=>f.jsx(Pc,{...e}),Ys=({className:e,...t})=>f.jsx(Rc,{className:X("fixed inset-0 z-50 bg-overlay","data-[state=open]:animate-overlay-in data-[state=closed]:animate-overlay-out",e),...t}),Us=({className:e,children:t,...n})=>f.jsxs(Vs,{children:[f.jsx(Ys,{}),f.jsx(_c,{className:X("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","bg-bg-1 border border-border-2 rounded-xl p-6 shadow-lg","data-[state=open]:animate-dialog-in data-[state=closed]:animate-dialog-out","focus:outline-none",e),...n,children:t})]}),Gs=({className:e,...t})=>f.jsx("div",{className:X("flex flex-col gap-1.5 mb-4",e),...t}),Ks=({className:e,...t})=>f.jsx("div",{className:X("flex justify-end gap-3 mt-6",e),...t}),qs=({className:e,...t})=>f.jsx(Ac,{className:X("text-lg font-semibold text-text-1",e),...t}),Xs=({className:e,...t})=>f.jsx(kc,{className:X("text-sm text-text-2",e),...t}),Js=({className:e,children:t,...n})=>f.jsx(Oc,{className:X("absolute right-4 top-4 rounded-md p-1 text-text-2 hover:text-text-1 hover:bg-bg-2 transition-colors","focus:outline-none focus:ring-2 focus:ring-border-1/80",e),...n,children:t??f.jsx(Qu,{className:"h-4 w-4"})}),he=({open:e,onOpenChange:t,trigger:n,title:r,description:o,children:s,className:i,showClose:a=!0,footer:c})=>f.jsxs(zs,{open:e,onOpenChange:t,children:[n&&f.jsx(Hs,{asChild:!0,children:n}),f.jsxs(Us,{className:i,children:[a&&f.jsx(Js,{}),(r||o)&&f.jsxs(Gs,{children:[r&&f.jsx(qs,{children:r}),o&&f.jsx(Xs,{children:o})]}),s,c&&f.jsx(Ks,{children:c})]})]});he.Root=zs,he.Trigger=Hs,he.Portal=Vs,he.Overlay=Ys,he.Content=Us,he.Header=Gs,he.Footer=Ks,he.Title=qs,he.Description=Xs,he.Close=Js;var Zt={exports:{}},Cd=Zt.exports,Zs;function Ed(){return Zs||(Zs=1,(function(e,t){(function(n,r){e.exports=r(Fs())})(Cd,(function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var o=r(n),s={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(i){return i+"º"}};return o.default.locale(s,null,!0),s}))})(Zt)),Zt.exports}Ed();var Qt={exports:{}},Pd=Qt.exports,Qs;function Rd(){return Qs||(Qs=1,(function(e,t){(function(n,r){e.exports=r()})(Pd,(function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}}))})(Qt)),Qt.exports}Rd();const _d=({placeholder:e,locale:t="es",className:n,Icon:r,date:o,setDate:s,error:i,...a})=>{const c=Ee(o).utc().locale(t).format("DD-MM-YYYY");return f.jsxs(Zo,{children:[f.jsx(Qo,{asChild:!0,children:f.jsxs("button",{className:X("h-10 px-3 flex items-center bg-bg-1 gap-3 rounded-lg border border-border-1 text-sm text-text-2 min-w-sm justify-between cursor-pointer",o&&"text-text-1",i&&"border-danger text-danger",n),...a,children:[o?c:e,r?f.jsx(r,{className:"text-text-2 w-5 h-5"}):f.jsx(qu,{className:X("text-text-2 w-5 h-5",i&&"text-danger")})]})}),f.jsx(es,{children:f.jsx(ts,{sideOffset:8,align:"start",className:X("p-2 z-999 border-border-2 rounded-lg border bg-bg-1 data-[state=open]:animate-popover-in"),children:f.jsx(Bs,{date:o,setDate:s,locale:t,rootClassName:"border-none p-0"})})})]})},ei=[{code:"+61",flag:"🇦🇺",name:"Australia"},{code:"+32",flag:"🇧🇪",name:"Belgium"},{code:"+591",flag:"🇧🇴",name:"Bolivia"},{code:"+55",flag:"🇧🇷",name:"Brazil"},{code:"+56",flag:"🇨🇱",name:"Chile"},{code:"+86",flag:"🇨🇳",name:"China"},{code:"+57",flag:"🇨🇴",name:"Colombia"},{code:"+506",flag:"🇨🇷",name:"Costa Rica"},{code:"+593",flag:"🇪🇨",name:"Ecuador"},{code:"+503",flag:"🇸🇻",name:"El Salvador"},{code:"+34",flag:"🇪🇸",name:"Spain"},{code:"+63",flag:"🇵🇭",name:"Philippines"},{code:"+33",flag:"🇫🇷",name:"France"},{code:"+358",flag:"🇫🇮",name:"Finland"},{code:"+49",flag:"🇩🇪",name:"Germany"},{code:"+502",flag:"🇬🇹",name:"Guatemala"},{code:"+44",flag:"🇬🇧",name:"United Kingdom"},{code:"+504",flag:"🇭🇳",name:"Honduras"},{code:"+91",flag:"🇮🇳",name:"India"},{code:"+39",flag:"🇮🇹",name:"Italy"},{code:"+81",flag:"🇯🇵",name:"Japan"},{code:"+82",flag:"🇰🇷",name:"South Korea"},{code:"+505",flag:"🇳🇮",name:"Nicaragua"},{code:"+47",flag:"🇳🇴",name:"Norway"},{code:"+64",flag:"🇳🇿",name:"New Zealand"},{code:"+507",flag:"🇵🇦",name:"Panama"},{code:"+595",flag:"🇵🇾",name:"Paraguay"},{code:"+51",flag:"🇵🇪",name:"Peru"},{code:"+52",flag:"🇲🇽",name:"Mexico"},{code:"+351",flag:"🇵🇹",name:"Portugal"},{code:"+1",flag:"🇺🇸",name:"United States"},{code:"+598",flag:"🇺🇾",name:"Uruguay"},{code:"+58",flag:"🇻🇪",name:"Venezuela"},{code:"+41",flag:"🇨🇭",name:"Switzerland"},{code:"+46",flag:"🇸🇪",name:"Sweden"}],Ad=({Trigger:e,children:t,className:n,open:r,setOpen:o,...s})=>f.jsxs(Zo,{open:r,onOpenChange:o,children:[f.jsx(Qo,{asChild:!0,children:e}),f.jsx(es,{children:f.jsx(ts,{sideOffset:8,className:X("animate-popover-in text-sm p-5 bg-bg-1 border border-border-2 rounded-lg z-999",n),...s,children:t})})]}),kd=({placeholder:e,phone:t,setPhone:n,error:r,className:o})=>{const[s,i]=ne.useState(!1),a=ei.find(c=>c.code===t.split(" ")[0])?.flag;return f.jsxs("div",{className:X("border border-border-1 rounded-lg bg-bg-1 h-10 flex overflow-hidden",r&&"border-danger",o),children:[f.jsx(Ad,{open:s,setOpen:i,className:"p-0 h-62 overflow-y-auto custom-scrollbar",align:"start",Trigger:f.jsxs("button",{onClick:()=>i(!0),className:"h-full px-3 cursor-pointer flex gap-3 items-center outline-none hover:bg-bg-2",children:[a,f.jsx(ft,{className:"w-5 h-5 text-text-2"})]}),children:ei.map(c=>{const l=c.code===t.split(" ")[0];return f.jsxs("div",{onClick:()=>{const p=t.split(" ")[1];n(`${c.code} ${p}`),i(!1)},className:X("px-2 text-text-1 py-2 bg-bg-1 rounded-lg hover:bg-bg-2 justify-between items-center text-sm cursor-pointer flex",l&&"bg-bg-2"),children:[f.jsxs("p",{children:[c.flag," ",c.name," ",c.code]}),l&&f.jsx(js,{className:"w-3 h-3 text-text-2"})]},c.code)})}),f.jsx(mr,{placeholder:e,value:t.split(" ")[1],error:r,onChange:c=>{const l=t.split(" ")[0];n(`${l} ${c.target.value}`)},className:"w-full border-none h-full focus-within:ring-0",type:"number"})]})};ie.Badge=dd,ie.Button=qt,ie.Calendar=Bs,ie.DatePicker=_d,ie.Dialog=he,ie.Input=mr,ie.PhoneInput=kd,ie.Select=sd,ie.SideNavigation=id,ie.Stepper=ad,ie.Switch=ud,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})}));
|