Files
appco_dist/.output/public/_nuxt/Cdyj-9Ot.js
T

2 lines
8.9 KiB
JavaScript
Raw Normal View History

2025-07-24 21:23:30 +03:30
import{d as E,u as q,s as O,r as T,a as R,o as B,b as H,c as I,e as U,f as M,h as A,g as z,p as V,i as P,j as D,k as y,l as j,m as F,n as $,q as W,w as G,t as K,v as Q,x as J,y as X,z as Y,A as C,B as N,C as Z,D as ee,E as te}from"./B565zvD7.js";import{_ as ne}from"./DlAUqK2U.js";const ae=(...t)=>t.find(n=>n!==void 0);function re(t){const n=t.componentName||"NuxtLink";function v(e){return typeof e=="string"&&e.startsWith("#")}function x(e,i,g){const a=g??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return _(e,a);const s="path"in e&&e.path!==void 0?e.path:i(e).path;return{...e,name:void 0,path:_(s,a)}}function w(e){const i=q(),g=$(),a=y(()=>!!e.target&&e.target!=="_self"),s=y(()=>{const f=e.to||e.href||"";return typeof f=="string"&&j(f,{acceptRelative:!0})}),k=z("RouterLink"),p=k&&typeof k!="string"?k.useLink:void 0,h=y(()=>{if(e.external)return!0;const f=e.to||e.href||"";return typeof f=="object"?!1:f===""||s.value}),o=y(()=>{const f=e.to||e.href||"";return h.value?f:x(f,i.resolve,e.trailingSlash)}),c=h.value||p==null?void 0:p({...e,to:o}),m=y(()=>{var S;const f=e.trailingSlash??t.trailingSlash;if(!o.value||s.value||v(o.value))return o.value;if(h.value){const b=typeof o.value=="object"&&"path"in o.value?P(o.value):o.value,r=typeof b=="object"?i.resolve(b).href:b;return _(r,f)}return typeof o.value=="object"?((S=i.resolve(o.value))==null?void 0:S.href)??null:_(F(g.app.baseURL,o.value),f)});return{to:o,hasTarget:a,isAbsoluteUrl:s,isExternal:h,href:m,isActive:(c==null?void 0:c.isActive)??y(()=>o.value===i.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??y(()=>o.value===i.currentRoute.value.path),route:(c==null?void 0:c.route)??y(()=>i.resolve(o.value)),async navigate(f){await W(m.value,{replace:e.replace,external:h.value||a.value})}}}return E({name:n,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:w,setup(e,{slots:i}){const g=q(),{to:a,href:s,navigate:k,isExternal:p,hasTarget:h,isAbsoluteUrl:o}=w(e),c=O(!1),m=T(null),f=r=>{var u;m.value=e.custom?(u=r==null?void 0:r.$el)==null?void 0:u.nextElementSibling:r==null?void 0:r.$el};function S(r){var u,l;return!c.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===r:((u=e.prefetchOn)==null?void 0:u[r])??((l=t.prefetchOn)==null?void 0:l[r]))&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function b(r=R()){if(c.value)return;c.value=!0;const u=typeof a.value=="string"?a.value:p.value?P(a.value):g.resolve(a.value).fullPath,l=p.value?new URL(u,window.location.href).href:u;await Promise.all([r.hooks.callHook("link:prefetch",l).catch(()=>{}),!p.value&&!h.value&&D(a.value,g).catch(()=>{})])}if(S("visibility")){const r=R();let u,l=null;B(()=>{const d=oe();H(()=>{u=I(()=>{var L;(L=m==null?void 0:m.value)!=null&&L.tagName&&(l=d.observe(m.value,async()=>{l==null||l(),l=null,await b(r)}))})})}),U(()=>{u&&M(u),l==null||l(),l=null})}return()=>{var l;if(!p.value&&!h.value&&!v(a.value)){const d={ref:f,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||(S("interaction")&&(d.onPointerenter=b.bind(null,void 0),d.onFocus=b.bind(null,void 0)),c.value&&(d.class=e.pref