import{a0 as g,a1 as C,g as P,j as b,a2 as q,r as y,s as k,a3 as T,S as x,v as R,a4 as A,a5 as N,a6 as w,a7 as B,a8 as E}from"./entry.eb978f24.js";const m=globalThis.requestIdleCallback||(t=>{const a=Date.now(),o={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-a))};return setTimeout(()=>{t(o)},1)}),L=globalThis.cancelIdleCallback||(t=>{clearTimeout(t)}),I=t=>{const a=g();a.isHydrating?a.hooks.hookOnce("app:suspense:resolve",()=>{m(t)}):m(t)};async function _(t,a=C()){const{path:o,matched:e}=a.resolve(t);if(!e.length||(a._routePreloaded||(a._routePreloaded=new Set),a._routePreloaded.has(o)))return;const n=a._preloadPromises=a._preloadPromises||[];if(n.length>4)return Promise.all(n).then(()=>_(t,a));a._routePreloaded.add(o);const l=e.map(r=>r.components?.default).filter(r=>typeof r=="function");for(const r of l){const u=Promise.resolve(r()).catch(()=>{}).finally(()=>n.splice(n.indexOf(u)));n.push(u)}await Promise.all(n)}const O=(...t)=>t.find(a=>a!==void 0),j="noopener noreferrer";/*! @__NO_SIDE_EFFECTS__ */function D(t){const a=t.componentName||"NuxtLink",o=(e,n)=>{if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;const l=t.trailingSlash==="append"?w:B;if(typeof e=="string")return l(e,!0);const r="path"in e?e.path:n(e).path;return{...e,name:void 0,path:l(r,!0)}};return P({name:a,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(e,{slots:n}){const l=C(),r=b(()=>{const s=e.to||e.href||"";return o(s,l.resolve)}),u=b(()=>e.external||e.target&&e.target!=="_self"?!0:typeof r.value=="object"?!1:r.value===""||q(r.value,{acceptRelative:!0})),d=y(!1),c=y(null),p=s=>{c.value=e.custom?s?.$el?.nextElementSibling:s?.$el};if(e.prefetch!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!V()){const h=g();let v,f=null;k(()=>{const i=U();I(()=>{v=m(()=>{c?.value?.tagName&&(f=i.observe(c.value,async()=>{f?.(),f=null;const S=typeof r.value=="string"?r.value:l.resolve(r.value).fullPath;await Promise.all([h.hooks.callHook("link:prefetch",S).catch(()=>{}),!u.value&&_(r.value,l).catch(()=>{})]),d.value=!0}))})})}),T(()=>{v&&L(v),f?.(),f=null})}return()=>{if(!u.value){const i={ref:p,to:r.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(d.value&&(i.class=e.prefetchedClass||t.prefetchedClass),i.rel=e.rel),x(R("RouterLink"),i,n.default)}const s=typeof r.value=="object"?l.resolve(r.value)?.href??null:r.value||null,h=e.target||null,v=e.noRel?null:O(e.rel,t.externalRelAttribute,s?j:"")||null,f=()=>E(s,{replace:e.replace});return e.custom?n.default?n.default({href:s,navigate:f,get route(){if(!s)return;const i=A(s);return{path:i.pathname,fullPath:i.pathname,get query(){return N(i.search)},hash:i.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:s}},rel:v,target:h,isExternal:u.value,isActive:!1,isExactActive:!1}):null:x("a",{ref:c,href:s,rel:v,target:h},n.default?.())}}})}const z=D({componentName:"NuxtLink"});function U(){const t=g();if(t._observer)return t._observer;let a=null;const o=new Map,e=(l,r)=>(a||(a=new IntersectionObserver(u=>{for(const d of u){const c=o.get(d.target);(d.isIntersecting||d.intersectionRatio>0)&&c&&c()}})),o.set(l,r),a.observe(l),()=>{o.delete(l),a.unobserve(l),o.size===0&&(a.disconnect(),a=null)});return t._observer={observe:e}}function V(){const t=navigator.connection;return!!(t&&(t.saveData||/2g/.test(t.effectiveType)))}export{z as _};
