import{r as i,j as f}from"./app-BiexncSX.js";import{c as y}from"./button-Cwvd_D5X.js";function v(e){const r=E(e),o=i.forwardRef((n,t)=>{const{children:l,...a}=n,s=i.Children.toArray(l),c=s.find(g);if(c){const p=c.props.children,m=s.map(u=>u===c?i.Children.count(p)>1?i.Children.only(null):i.isValidElement(p)?p.props.children:null:u);return f.jsx(r,{...a,ref:t,children:i.isValidElement(p)?i.cloneElement(p,void 0,m):null})}return f.jsx(r,{...a,ref:t,children:l})});return o.displayName=`${e}.Slot`,o}function E(e){const r=i.forwardRef((o,n)=>{const{children:t,...l}=o;if(i.isValidElement(t)){const a=w(t),s=h(l,t.props);return t.type!==i.Fragment&&(s.ref=n?y(n,a):a),i.cloneElement(t,s)}return i.Children.count(t)>1?i.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var S=Symbol("radix.slottable");function g(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S}function h(e,r){const o={...r};for(const n in r){const t=e[n],l=r[n];/^on[A-Z]/.test(n)?t&&l?o[n]=(...s)=>{const c=l(...s);return t(...s),c}:t&&(o[n]=t):n==="style"?o[n]={...t,...l}:n==="className"&&(o[n]=[t,l].filter(Boolean).join(" "))}return{...e,...o}}function w(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var R=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],b=R.reduce((e,r)=>{const o=v(`Primitive.${r}`),n=i.forwardRef((t,l)=>{const{asChild:a,...s}=t,c=a?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:l})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{}),x=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C="VisuallyHidden",d=i.forwardRef((e,r)=>f.jsx(b.span,{...e,ref:r,style:{...x,...e.style}}));d.displayName=C;var V=d;export{V as R,x as V};
