import{a4 as E,_ as A,a5 as $,L as S,F as k,K as P}from"./app-DE5EohoY.js";var y;let H=Symbol("headlessui.useid"),N=0;const B=(y=E)!=null?y:function(){return A(H,()=>`${++N}`)()};function C(e){var t;if(e==null||e.value==null)return null;let r=(t=e.value.$el)!=null?t:e.value;return r instanceof Node?r:null}function w(e,t,...r){if(e in t){let n=t[e];return typeof n=="function"?n(...r):n}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,w),a}var T=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(T||{}),D=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(D||{});function U({visible:e=!0,features:t=0,ourProps:r,theirProps:a,...n}){var i;let l=v(a,r),u=Object.assign(n,{props:l});if(e||t&2&&l.static)return b(u);if(t&1){let p=(i=l.unmount)==null||i?0:1;return w(p,{0(){return null},1(){return b({...n,props:{...l,hidden:!0,style:{display:"none"}}})}})}return b(u)}function b({props:e,attrs:t,slots:r,slot:a,name:n}){var i,l;let{as:u,...p}=R(e,["unmount","static"]),s=(i=r.default)==null?void 0:i.call(r,a),m={};if(a){let f=!1,h=[];for(let[c,d]of Object.entries(a))typeof d=="boolean"&&(f=!0),d===!0&&h.push(c);f&&(m["data-headlessui-state"]=h.join(" "))}if(u==="template"){if(s=j(s??[]),Object.keys(p).length>0||Object.keys(t).length>0){let[f,...h]=s??[];if(!F(f)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${n} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(p).concat(Object.keys(t)).map(o=>o.trim()).filter((o,g,O)=>O.indexOf(o)===g).sort((o,g)=>o.localeCompare(g)).map(o=>`  - ${o}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(o=>`  - ${o}`).join(`
`)].join(`
`));let c=v((l=f.props)!=null?l:{},p,m),d=$(f,c,!0);for(let o in c)o.startsWith("on")&&(d.props||(d.props={}),d.props[o]=c[o]);return d}return Array.isArray(s)&&s.length===1?s[0]:s}return S(u,Object.assign({},p,m),{default:()=>s})}function j(e){return e.flatMap(t=>t.type===k?j(t.children):[t])}function v(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let a of e)for(let n in a)n.startsWith("on")&&typeof a[n]=="function"?(r[n]!=null||(r[n]=[]),r[n].push(a[n])):t[n]=a[n];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(a=>[a,void 0])));for(let a in r)Object.assign(t,{[a](n,...i){let l=r[a];for(let u of l){if(n instanceof Event&&n.defaultPrevented)return;u(n,...i)}}});return t}function I(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function R(e,t=[]){let r=Object.assign({},e);for(let a of t)a in r&&delete r[a];return r}function F(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var x=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(x||{});let K=P({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:r}){return()=>{var a;let{features:n,...i}=e,l={"aria-hidden":(n&2)===2?!0:(a=i["aria-hidden"])!=null?a:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return U({ourProps:l,theirProps:i,slot:{},attrs:r,slots:t,name:"Hidden"})}}});var L=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(L||{});export{U as A,I as E,T as N,D as S,R as T,w as a,L as b,K as f,B as i,C as o,x as u};
