import{P as D,r as Q,S as _}from"./AppLogoIcon.vue_vue_type_script_setup_true_lang-C7FVy0Gu.js";import{d as P,g as L,o as B,w as O,q as V,u as S,$ as K,a0 as G,A as v,c as C,a1 as x,k as F,s as W,p as X,O as z,a2 as R,a3 as $,a4 as Z,a5 as Y,a6 as ee,R as te,a7 as ne,e as oe}from"./app-DCwpEDbg.js";import{p as ae,i as re,u as q,b as se}from"./useForwardExpose-sC1iCvAF.js";const be=P({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(B(),L(S(D),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:O(()=>[V(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function H(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,o=Symbol(n);return[i=>{const u=K(o,i);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(G(o,i),i)]}const[J,Ce]=H("ConfigProvider");function ie(t){const e=J({dir:v("ltr")});return C(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}let ue=0;function Te(t,e="reka"){const n=J({useId:void 0});return x?`${e}-${x()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++ue}`}function le(t,e){const n=v(t);function o(d){return e[n.value][d]??n.value}return{state:n,dispatch:d=>{n.value=o(d)}}}function ce(t,e){var y;const n=v({}),o=v("none"),s=v(t),d=t.value?"mounted":"unmounted";let i;const u=((y=e.value)==null?void 0:y.ownerDocument.defaultView)??ae,{state:m,dispatch:f}=le(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=r=>{var l;if(re){const h=new CustomEvent(r,{bubbles:!1,cancelable:!1});(l=e.value)==null||l.dispatchEvent(h)}};F(t,async(r,l)=>{var I;const h=l!==r;if(await W(),h){const T=o.value,g=M(e.value);r?(f("MOUNT"),c("enter"),g==="none"&&c("after-enter")):g==="none"||g==="undefined"||((I=n.value)==null?void 0:I.display)==="none"?(f("UNMOUNT"),c("leave"),c("after-leave")):l&&T!==g?(f("ANIMATION_OUT"),c("leave")):(f("UNMOUNT"),c("after-leave"))}},{immediate:!0});const a=r=>{const l=M(e.value),h=l.includes(r.animationName),I=m.value==="mounted"?"enter":"leave";if(r.target===e.value&&h&&(c(`after-${I}`),f("ANIMATION_END"),!s.value)){const T=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",i=u==null?void 0:u.setTimeout(()=>{var g;((g=e.value)==null?void 0:g.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=T)})}r.target===e.value&&l==="none"&&f("ANIMATION_END")},p=r=>{r.target===e.value&&(o.value=M(e.value))},A=F(e,(r,l)=>{r?(n.value=getComputedStyle(r),r.addEventListener("animationstart",p),r.addEventListener("animationcancel",a),r.addEventListener("animationend",a)):(f("ANIMATION_END"),i!==void 0&&(u==null||u.clearTimeout(i)),l==null||l.removeEventListener("animationstart",p),l==null||l.removeEventListener("animationcancel",a),l==null||l.removeEventListener("animationend",a))},{immediate:!0}),E=F(m,()=>{const r=M(e.value);o.value=m.value==="mounted"?r:"none"});return X(()=>{A(),E()}),{isPresent:C(()=>["mounted","unmountSuspended"].includes(m.value))}}function M(t){return t&&getComputedStyle(t).animationName||"none"}const Se=P({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var f;const{present:o,forceMount:s}=z(t),d=v(),{isPresent:i}=ce(o,d);n({present:i});let u=e.default({present:i.value});u=Q(u||[]);const m=R();if(u&&(u==null?void 0:u.length)>1){const c=(f=m==null?void 0:m.parent)!=null&&f.type.name?`<${m.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${c}\` for  \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(a=>`  - ${a}`).join(`
`)].join(`
`))}return()=>s.value||o.value||i.value?$(e.default({present:i.value})[0],{ref:c=>{const a=q(c);return typeof(a==null?void 0:a.hasAttribute)>"u"||(a!=null&&a.hasAttribute("data-reka-popper-content-wrapper")?d.value=a.firstElementChild:d.value=a),a}}):null}});function de(t){const e=R(),n=e==null?void 0:e.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(s=>{o[Z(Y(s))]=(...d)=>t(s,...d)}),o}function fe(t){const e=R(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((s,d)=>{const i=(e==null?void 0:e.type.props[d]).default;return i!==void 0&&(s[d]=i),s},{}),o=ee(t);return C(()=>{const s={},d=(e==null?void 0:e.vnode.props)??{};return Object.keys(d).forEach(i=>{s[Y(i)]=d[i]}),Object.keys({...n,...s}).reduce((i,u)=>(o.value[u]!==void 0&&(i[u]=o.value[u]),i),{})})}function Pe(t,e){const n=fe(t),o=e?de(e):{};return C(()=>({...n.value,...o}))}function U(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function k(){const t=v(),e=C(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:q(t)});return{primitiveElement:t,currentElement:e}}const me="rovingFocusGroup.onEntryFocus",pe={bubbles:!1,cancelable:!0},ve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function he(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Me(t,e,n){const o=he(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return ve[o]}function Ae(t,e=!1){const n=U();for(const o of t)if(o===n||(o.focus({preventScroll:e}),U()!==n))return}function Fe(t,e){return t.map((n,o)=>t[(e+o)%t.length])}const j="data-reka-collection-item";function Ee(t={}){const{key:e="",isProvider:n=!1}=t,o=`${e}CollectionProvider`;let s;if(n){const c=v(new Map);s={collectionRef:v(),itemMap:c},G(o,s)}else s=K(o);const d=(c=!1)=>{const a=s.collectionRef.value;if(!a)return[];const p=Array.from(a.querySelectorAll(`[${j}]`)),E=Array.from(s.itemMap.value.values()).sort((w,y)=>p.indexOf(w.ref)-p.indexOf(y.ref));return c?E:E.filter(w=>w.ref.dataset.disabled!=="")},i=P({name:"CollectionSlot",setup(c,{slots:a}){const{primitiveElement:p,currentElement:A}=k();return F(A,()=>{s.collectionRef.value=A.value}),()=>$(_,{ref:p},a)}}),u=P({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(c,{slots:a,attrs:p}){const{primitiveElement:A,currentElement:E}=k();return te(w=>{if(E.value){const y=ne(E.value);s.itemMap.value.set(y,{ref:E.value,value:c.value}),w(()=>s.itemMap.value.delete(y))}}),()=>$(_,{...p,[j]:"",ref:A},a)}}),m=C(()=>Array.from(s.itemMap.value.values())),f=C(()=>s.itemMap.value.size);return{getItems:d,reactiveItems:m,itemMapSize:f,CollectionSlot:i,CollectionItem:u}}const[Oe,ye]=H("RovingFocusGroup"),$e=P({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const o=t,s=n,{loop:d,orientation:i,dir:u}=z(o),m=ie(u),f=se(o,"currentTabStopId",s,{defaultValue:o.defaultCurrentTabStopId,passive:o.currentTabStopId===void 0}),c=v(!1),a=v(!1),p=v(0),{getItems:A,CollectionSlot:E}=Ee({isProvider:!0});function w(r){const l=!a.value;if(r.currentTarget&&r.target===r.currentTarget&&l&&!c.value){const h=new CustomEvent(me,pe);if(r.currentTarget.dispatchEvent(h),s("entryFocus",h),!h.defaultPrevented){const I=A().map(b=>b.ref).filter(b=>b.dataset.disabled!==""),T=I.find(b=>b.getAttribute("data-active")===""),g=I.find(b=>b.id===f.value),N=[T,g,...I].filter(Boolean);Ae(N,o.preventScrollOnEntryFocus)}}a.value=!1}function y(){setTimeout(()=>{a.value=!1},1)}return e({getItems:A}),ye({loop:d,dir:m,orientation:i,currentTabStopId:f,onItemFocus:r=>{f.value=r},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(r,l)=>(B(),L(S(E),null,{default:O(()=>[oe(S(D),{tabindex:c.value||p.value===0?-1:0,"data-orientation":S(i),as:r.as,"as-child":r.asChild,dir:S(m),style:{outline:"none"},onMousedown:l[0]||(l[0]=h=>a.value=!0),onMouseup:y,onFocus:w,onBlur:l[1]||(l[1]=h=>c.value=!1)},{default:O(()=>[V(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}});export{Se as P,be as _,Te as a,Ee as b,H as c,Pe as d,fe as e,Ae as f,Me as g,U as h,Oe as i,de as j,J as k,ie as l,$e as m,k as u,Fe as w};
