import{a0 as y,g as P,j as g,a1 as S,r as p,s as q,a2 as R,a3 as k,a4 as A,a5 as N,R as b,v as T,a6 as B,a7 as E,a8 as L,a9 as w,aa as x,ab as I}from"./entry.9e31e8a4.js";async function _(t,r=y()){const{path:o,matched:e}=r.resolve(t);if(!e.length||(r._routePreloaded||(r._routePreloaded=new Set),r._routePreloaded.has(o)))return;const n=r._preloadPromises=r._preloadPromises||[];if(n.length>4)return Promise.all(n).then(()=>_(t,r));r._routePreloaded.add(o);const l=e.map(a=>a.components?.default).filter(a=>typeof a=="function");for(const a of l){const u=Promise.resolve(a()).catch(()=>{}).finally(()=>n.splice(n.indexOf(u)));n.push(u)}await Promise.all(n)}const j=(...t)=>t.find(r=>r!==void 0),O="noopener noreferrer";/*! @__NO_SIDE_EFFECTS__ */function U(t){const r=t.componentName||"NuxtLink",o=(e,n)=>{if(!e||t.trailingSlash!=="append"&&t.trailingSlash!=="remove")return e;const l=t.trailingSlash==="append"?L:w;if(typeof e=="string")return l(e,!0);const a="path"in e?e.path:n(e).path;return{...e,name:void 0,path:l(a,!0)}};return P({name:r,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=y(),a=g(()=>{const s=e.to||e.href||"";return o(s,l.resolve)}),u=g(()=>e.external||e.target&&e.target!=="_self"?!0:typeof a.value=="object"?!1:a.value===""||S(a.value,{acceptRelative:!0})),d=p(!1),c=p(null),m=s=>{c.value=e.custom?s?.$el?.nextElementSibling:s?.$el};if(e.prefetch!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!z()){const h=x();let v,f=null;q(()=>{const i=V();R(()=>{v=k(()=>{c?.value?.tagName&&(f=i.observe(c.value,async()=>{f?.(),f=null;const C=typeof a.value=="string"?a.value:l.resolve(a.value).fullPath;await Promise.all([h.hooks.callHook("link:prefetch",C).catch(()=>{}),!u.value&&_(a.value,l).catch(()=>{})]),d.value=!0}))})})}),A(()=>{v&&N(v),f?.(),f=null})}return()=>{if(!u.value){const i={ref:m,to:a.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),b(T("RouterLink"),i,n.default)}const s=typeof a.value=="object"?l.resolve(a.value)?.href??null:a.value||null,h=e.target||null,v=e.noRel?null:j(e.rel,t.externalRelAttribute,s?O:"")||null,f=()=>I(s,{replace:e.replace});return e.custom?n.default?n.default({href:s,navigate:f,get route(){if(!s)return;const i=B(s);return{path:i.pathname,fullPath:i.pathname,get query(){return E(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:b("a",{ref:c,href:s,rel:v,target:h},n.default?.())}}})}const F=U({componentName:"NuxtLink"});function V(){const t=x();if(t._observer)return t._observer;let r=null;const o=new Map,e=(l,a)=>(r||(r=new IntersectionObserver(u=>{for(const d of u){const c=o.get(d.target);(d.isIntersecting||d.intersectionRatio>0)&&c&&c()}})),o.set(l,a),r.observe(l),()=>{o.delete(l),r.unobserve(l),o.size===0&&(r.disconnect(),r=null)});return t._observer={observe:e}}function z(){const t=navigator.connection;return!!(t&&(t.saveData||/2g/.test(t.effectiveType)))}export{F as _};
