1import{d as l,Y as v,v as g,w as m,u as p,o as s,c as n,e as c,t as f,m as h,z as d,Z as _}from"./eFdCCj3t.js";import"./Bfd5Thr0.js";import"./C_YC4gad.js";const x={class:"flex min-h-[100dvh] items-center justify-center bg-[#0A1E1D] px-6 text-white"},w={key:0,class:"font-national2 text-sm text-white/80"},R={key:1,class:"font-national2 text-sm text-white/80"},E=l({__name:"[slug]",setup(y){const u=v(),a=h(()=>{const e=u.params.slug;return String(Array.isArray(e)?e[0]:e||"").trim()}),t=d("loading"),o=d("");async function i(){if(!a.value){t.value="error",o.value="Código QR no encontrado o sin redirección";return}t.value="loading";try{const{redirect:e}=await $fetch(`/api/v1/qr/resolve/${encodeURIComponent(a.value)}`);t.value="redirecting",await _(e,{external:!e.startsWith("/"),replace:!0})}catch(e){t.value="error";const r=e;if(r.statusCode===404){o.value="Código QR no encontrado o sin redirección";return}if(r.statusCode===400){o.value=r.data?.statusMessage||r.data?.message||"URL de destino no permitida";return}o.value="Error al verificar el código QR"}}return g(()=>{i()}),m(a,()=>{i()}),p({title:"Redirigiendoâ¦",robots:"noindex, nofollow"}),(e,r)=>(s(),n("div",x,[c(t)==="error"?(s(),n("p",w,f(c(o)),1)):(s(),n("p",R,"Redirigiendoâ¦"))]))}});export{E as default};
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.