1import{d as O,ai as w,S as T,r as B,a9 as _,o as U,aj as I,ak as D,I as F,al as H,am as q,an as A,ao as V,ap as N,aq as z,h as m,ar as k,as as M,E as W,at as $,au as G,av as Q,aw as J,ax as K}from"./B4wiIi5L.js";const X=(...t)=>t.find(l=>l!==void 0);function E(t){const l=t.componentName||"NuxtLink";function d(e){return typeof e=="string"&&e.startsWith("#")}function p(e,a,g){const n=g??t.trailingSlash;if(!e||n!=="append"&&n!=="remove")return e;if(typeof e=="string")return L(e,n);const o="path"in e&&e.path!==void 0?e.path:a(e).path;return{...e,name:void 0,path:L(o,n)}}function R(e){const a=w(),g=$(),n=m(()=>!!e.target&&e.target!=="_self"),o=m(()=>{const f=e.to||e.href||"";return typeof f=="string"&&k(f,{acceptRelative:!0})}),S=A("RouterLink"),y=typeof S!="string"?S.useLink:void 0,h=m(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||o.value}),u=m(()=>{const f=e.to||e.href||"";return h.value?f:p(f,a.resolve,e.trailingSlash)}),c=h.value||y==null?void 0:y({...e,to:u}),x=m(()=>{var C;const f=e.trailingSlash??t.trailingSlash;if(!u.value||o.value||d(u.value))return u.value;if(h.value){const b=typeof u.value=="object"&&"path"in u.value?N(u.value):u.value,r=typeof b=="object"?a.resolve(b).href:b;return L(r,f)}return typeof u.value=="object"?((C=a.resolve(u.value))==null?void 0:C.href)??null:L(M(g.app.baseURL,u.value),f)});return{to:u,hasTarget:n,isAbsoluteUrl:o,isExternal:h,href:x,isActive:(c==null?void 0:c.isActive)??m(()=>u.value===a.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??m(()=>u.value===a.currentRoute.value.path),route:(c==null?void 0:c.route)??m(()=>a.resolve(u.value)),async navigate(f){await W(x.value,{replace:e.replace,external:h.value||n.value})}}}return O({name:l,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},prefetchOn:{type:[String,Object],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},trailingSlash:{type:String,default:void 0,required:!1}},useLink:R,setup(e,{slots:a}){const g=w(),{to:n,href:o,navigate:S,isExternal:y,hasTarget:h,isAbsoluteUrl:u}=R(e),c=T(!1),x=B(null),f=r=>{var s;x.value=e.custom?(s=r==null?void 0:r.$el)==null?void 0:s.nextElementSibling:r==null?void 0:r.$el};function C(r){var s,i;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===r:((s=e.prefetchOn)==null?void 0:s[r])??((i=t.prefetchOn)==null?void 0:i[r]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!ee()}async function b(r=_()){if(c.value)return;c.value=!0;const s=typeof n.value=="string"?n.value:y.value?N(n.value):g.resolve(n.value).fullPath,i=y.value?new URL(s,window.location.href).href:s;await Promise.all([r.hooks.callHook("link:prefetch",i).catch(()=>{}),!y.value&&!h.value&&z(n.value,g).catch(()=>{})])}if(C("visibility")){const r=_();let s,i=null;U(()=>{const v=Y();I(()=>{s=D(()=>{var P;(P=x==null?void 0:x.value)!=null&&P.tagName&&(i=v.observe(x.value,async()=>{i==null||i(),i=null,await b(r)}))})})}),F(()=>{s&&H(s),i==null||i(),i=null})}return()=>{var i;if(!y.value&&!h.value&&!d(n.value)){const v={ref:f,to:n.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};
1return e.custom||(C("interaction")&&(v.onPointerenter=b.bind(null,void 0),v.onFocus=b.bind(null,void 0)),c.value&&(v.class=e.prefetchedClass||t.prefetchedClass),v.rel=e.rel||void 0),q(A("RouterLink"),v,a.default)}const r=e.target||null,s=X(e.noRel?"":e.rel,t.externalRelAttribute,u.value||h.value?"noopener noreferrer":"")||null;return e.custom?a.default?a.default({href:o.value,navigate:S,prefetch:b,get route(){if(!o.value)return;const v=new URL(o.value,window.location.href);return{path:v.pathname,fullPath:v.pathname,get query(){return V(v.search)},hash:v.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:o.value}},rel:s,target:r,isExternal:y.value||h.value,isActive:!1,isExactActive:!1}):null:q("a",{ref:x,href:o.value||null,rel:s,target:r,onClick:v=>{if(!(y.value||h.value))return v.preventDefault(),e.replace?g.replace(o.value):g.push(o.value)}},(i=a.default)==null?void 0:i.call(a))}}})}const ae=E(J);function L(t,l){const d=l==="append"?G:Q;return k(t)&&!t.startsWith("http")?t:d(t,!0)}function Y(){const t=_();if(t._observer)return t._observer;let l=null;const d=new Map,p=(e,a)=>(l||(l=new IntersectionObserver(g=>{for(const n of g){const o=d.get(n.target);(n.isIntersecting||n.intersectionRatio>0)&&o&&o()}})),d.set(e,a),l.observe(e),()=>{d.delete(e),l==null||l.unobserve(e),d.size===0&&(l==null||l.disconnect(),l=null)});return t._observer={observe:p}}const Z=/2g/;function ee(){const t=navigator.connection;return!!(t&&(t.saveData||Z.test(t.effectiveType)))}const j=E({componentName:"NuxtLinkLocale"}),ne=O({name:"NuxtLinkLocale",props:{...j.props,locale:{type:String,default:void 0,required:!1}},setup(t,{slots:l}){const d=K(),p=m(()=>{const a=t.to??t.href;return a!=null?d(a,t.locale):a}),R=m(()=>{if(t.external||t.target&&t.target!=="_self")return!0;const a=t.to??t.href;return typeof a=="object"?!1:a===""||a==null||k(a,{acceptRelative:!0})}),e=()=>{const a={...t};return R.value||(a.to=p.value),delete a.href,delete a.locale,a};return()=>q(j,e(),l.default)}});export{ae as _,ne as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.