import{d as O,r as x,s as mt,W as ct,o as i,a as n,F as y,h as I,E as R,t as N,g as p,H as V,f as m,e as o,J as tt,Q as gt,b as e,l as K,n as Q,k as B,G as xt,m as T,R as ft,u as _t,w as W,c as X,j as Z}from"./DGtjvSSZ.js";import{_ as bt,c as et}from"./BOR032B-.js";import{_ as ht,a as yt,b as kt}from"./CO0XGa2a.js";import{d as vt,a as q,_ as wt}from"./edtG_Qsv.js";import{_ as Ct}from"./BaaIXSMQ.js";import{_ as Mt}from"./BeHZiKA6.js";import{_ as $t}from"./BxmJ02Bh.js";import{a as st,b as zt,_ as Vt}from"./BKllfwOC.js";import{_ as It}from"./lFOt37Pk.js";import{u as St,a as jt,c as Tt}from"./Ddgf_VTc.js";import{v as Nt}from"./lioykcFe.js";import{u as Bt}from"./IoecnJiL.js";import{u as ot,a as Pt}from"./JLBoTV-x.js";import{g as At}from"./DSLks4Oy.js";const Et={class:"flex flex-col text-2.5 leading-12px uppercase items-center"},Lt={key:0},Dt={key:1},qt={key:0,class:"font-semibold tracking-1px"},Ht=O({__name:"Author",props:{authorsGroups:{},post:{type:Boolean},postPublishedAt:{}},setup(P){const a=P,c=x("");return mt(()=>{a.postPublishedAt&&(c.value=ct(new Date(a.postPublishedAt),"DD MMMM YYYY | HH:mm"))}),(v,r)=>{const S=tt;return i(),n("div",Et,[(i(!0),n(y,null,I(v.authorsGroups,(u,k)=>(i(),n("div",{key:k,class:"flex flex-wrap font-medium mb-8px justify-center text-[#5C6981]"},[u!=null&&u.authors.length?(i(),n(y,{key:0},[R(N(u==null?void 0:u.text)+" ",1),(i(!0),n(y,null,I(u.authors,(f,_)=>(i(),n(y,{key:f.id},[p(S,{to:"/autores/"+f.slug,class:"text-pinkVina"},{default:V(()=>[R(N(f.name),1)]),_:2},1032,["to"]),_<u.authors.length-2?(i(),n("span",Lt,", ")):_<u.authors.length-1&&u.authors.length>1?(i(),n("span",Dt," y ")):m("",!0)],64))),128))],64)):m("",!0)]))),128)),v.postPublishedAt?(i(),n("p",qt,N(o(c)),1)):m("",!0)])}}}),Ut=et(yt),Ft=et(kt),Gt={class:"mb-64px"},Rt={class:"flex flex-wrap lg:flex-nowrap"},Ot={class:"w-full lg:pr-32px"},Yt={class:"md:pl-82px"},Jt={class:"mb-18px mt-16px text-center text-2.75 font-medium leading-11px tracking-1px uppercase md:mb-24px md:mt-16px"},Kt=["innerHTML"],Qt={class:"flex flex-col md:mx-0 md:flex-row"},Wt={class:"hidden md:sticky md:top-184px md:mr-32px md:flex md:flex-col md:self-start md:justify-start"},Xt={key:0},Zt={class:"max-w-769px w-full"},te={key:0,class:"mb-24px w-full"},ee=["srcset"],se=["srcset"],oe=["src","alt","width","height"],ie=["href"],ae={key:1},ne={key:1},le={class:"relative w-full"},pe=["src","alt","height","width"],re={class:"mb-24px flex justify-between border-b border-b-neutral-300 py-16px font-montserrat text-2.75 font-semibold leading-11px tracking-widest uppercase"},de={class:"mb-24px flex items-center justify-center md:hidden"},ue={key:0},me={class:"content lg:w-728px"},ce={key:2,class:"fixed bottom-0 left-0 right-0 top-0 z-20 flex items-center justify-center bg-dark-900/90"},ge={class:"m-auto px-16px"},xe={class:"max-w-700px bg-white pb-24px pt-22px"},fe={class:"grid mb-14px gap-x-20px md:grid-cols-2"},_e={class:"flex"},be={class:"lg:mt-32px lg:box-border lg:w-332px lg:flex lg:flex-shrink-0 lg:basis-332px lg:flex-col"},he={key:0,class:"pb-24px lg:pt-24px"},ye=O({__name:"NotaTemplate",props:{post:{},sponsorBoxs:{}},setup(P){const a=P,{copy:c,copied:v}=St({legacy:!0}),r={categoryPrimary:a.post.mainCategory.slug,categorySecondary:a.post.mainCategory.slug,postId:a.post.id,postUrl:a.post.url,postKeywords:a.post.tags.map(t=>t.slug)};gt("articleContext",r);const{share:S,isSupported:u}=jt(),k=x([{url:`https://www.facebook.com/sharer.php?u=${a.post.url}`,icon:"i-fa6-brands-facebook-f block"},{url:`https://twitter.com/intent/tweet?via=pagina7&text=${a.post.title}&url=${a.post.url}`,icon:"i-fa6-brands-x-twitter block"}]);function f(){S({title:`${a.post.title}`,url:`${a.post.url}`})}const _=x(!1);function j(){_.value=!_.value}const w=Tt(),C=x(),M=x(),$=x(),l=x(),g=x();async function H(){console.log(await $fetch("/api/post/send-correction",{method:"post"}))}const{setTargetType:U,setTargetCategory:F,setTargetPostId:A,setTargetKeywords:E,targeting:b}=Bt();U("articulo"),F(a.post.mainCategory.slug),A(a.post.id.toString()),E(a.post.tags.map(t=>t.slug));const h=x("");function it(t){t&&(window.history.replaceState({},"",`${a.post.url}`),h.value=window.location.href,ot({title:()=>{var s,L;return((s=a.post)==null?void 0:s.seo.title)??((L=a.post)==null?void 0:L.title)??""}}))}return(t,s)=>{const L=Ht,Y=tt,J=bt,at=Ut,z=wt,nt=Ct,lt=Mt,pt=Ft,D=ht,rt=$t,dt=st,ut=zt;return i(),n("div",Gt,[s[17]||(s[17]=e("div",{id:"fb-root"},null,-1)),e("div",Rt,[K((i(),n("div",Ot,[e("div",Yt,[e("p",Jt,N(t.post.mainCategory.name),1),e("h1",{class:"mx-auto mb-24px max-w-722px text-center text-6 font-bold leading-28px md:text-9 md:leading-40px",innerHTML:t.post.title},null,8,Kt),p(L,{"authors-groups":t.post.authorsGroups,"post-published-at":t.post.publishedAt,class:"mb-24px text-center"},null,8,["authors-groups","post-published-at"])]),e("div",Qt,[e("ul",Wt,[(i(!0),n(y,null,I(o(k),(d,G)=>(i(),n("li",{key:G,class:"mx-6px md:my-6px"},[p(Y,{to:d.url,target:"_blank",class:"social-icon p-13px text-4.5"},{default:V(()=>[e("i",{class:Q(d.icon)},null,2)]),_:2},1032,["to"])]))),128)),e("button",{class:"items mx-6px social-icon h-44px w-44px flex items-center justify-center text-4.5 md:my-6px",type:"button",onClick:s[0]||(s[0]=d=>o(c)(t.post.url))},s[7]||(s[7]=[e("i",{class:"i-mdi-link-variant block"},null,-1)])),p(J,null,{default:V(()=>[o(u)?(i(),n("li",Xt,[e("button",{type:"button",class:"items mx-6px social-icon h-44px w-44px flex items-center justify-center text-4.5 md:my-6px",onClick:f},s[8]||(s[8]=[e("i",{class:"i-carbon:share block"},null,-1)]))])):m("",!0)]),_:1})]),e("div",Zt,[t.post.associatedMedium?(i(),n("div",te,[p(o(w).define,null,{default:V(()=>[e("picture",null,[e("source",{media:"(max-width: 499px)",srcset:t.post.associatedMedium.mobileImg.sizes.medium.url},null,8,ee),e("source",{media:"(min-width: 500px)",srcset:t.post.associatedMedium.desktopImg.sizes.medium.url},null,8,se),e("img",{src:t.post.associatedMedium.desktopImg.sizes.medium.url,alt:t.post.associatedMedium.desktopImg.alt,width:t.post.associatedMedium.desktopImg.sizes.medium.width,height:t.post.associatedMedium.desktopImg.sizes.medium.height,class:"w-full object-cover"},null,8,oe)])]),_:1}),t.post.associatedMedium.url?(i(),n("a",{key:0,href:t.post.associatedMedium.url,target:"_blank",rel:"noopener noreferrer"},[p(o(w).reuse)],8,ie)):(i(),n("div",ae,[p(o(w).reuse)]))])):m("",!0),t.post.featuredImage?(i(),n("div",ne,[e("div",le,[e("img",{src:t.post.featuredImage.sizes.original.url,alt:t.post.featuredImage.alt,height:t.post.featuredImage.sizes.original.height,width:t.post.featuredImage.sizes.original.width,class:"h-full w-full rounded-8px object-cover"},null,8,pe)]),e("div",re,[e("p",null,N(t.post.featuredImage.caption),1),p(at,{"post-id":`${t.post.id}`},null,8,["post-id"])])])):m("",!0),e("ul",de,[(i(!0),n(y,null,I(o(k),(d,G)=>(i(),n("li",{key:`social-${G}`,class:"mx-6px md:my-6px"},[p(Y,{to:d.url,class:"social-icon p-13px text-4.5"},{default:V(()=>[e("i",{class:Q(d.icon)},null,2)]),_:2},1032,["to"])]))),128)),e("button",{class:"items mx-6px social-icon h-44px w-44px flex items-center justify-center text-4.5 md:my-6px",type:"button",onClick:s[1]||(s[1]=d=>o(c)(t.post.url))},s[9]||(s[9]=[e("i",{class:"i-mdi-link-variant block"},null,-1)])),p(J,null,{default:V(()=>[o(u)?(i(),n("li",ue,[e("button",{type:"button",class:"items mx-6px social-icon h-44px w-44px flex items-center justify-center text-4.5 md:my-6px",onClick:f},s[10]||(s[10]=[e("i",{class:"i-carbon:share block"},null,-1)]))])):m("",!0)]),_:1})]),e("div",me,[p(z,{id:"ad_intext-"+t.post.id,path:"/1098385/pagina7cl/ad_intext",dimensions:[1,1],targeting:o(b),class:"!m-0 !p-0"},null,8,["id","targeting"]),t.post.contentBlocks?(i(),B(nt,{key:0,"post-id":t.post.id,"post-url":t.post.url,"post-featured-image":t.post.featuredImage.sizes.mediumLarge.url,"block-type":"vina","post-blocks":t.post.contentBlocks},null,8,["post-id","post-url","post-featured-image","post-blocks"])):(i(),B(lt,{key:1,content:t.post.content},null,8,["content"])),p(z,{id:"desk_ad_middle2-"+t.post.id,path:"/1098385/pagina7cl/ad_middle2",dimensions:[728,90],"size-mapping":"desktopSizeMapping"in t?t.desktopSizeMapping:o(vt),targeting:o(b)},null,8,["id","size-mapping","targeting"]),e("p",{class:"mb-32px hidden text-center font-montserrat text-2.75 font-semibold leading-11px tracking-widest uppercase"},[s[11]||(s[11]=R(" ¿Encontraste algún error? ")),e("button",{class:"font-montserrat font-bold tracking-widest uppercase underline",type:"button",onClick:j}," Avísanos ")]),p(pt,{href:o(h),class:"mb-32px"},null,8,["href"])]),o(_)?(i(),n("div",ce,[e("div",ge,[e("div",xe,[e("div",{class:"grid grid-cols-3 mb-24px border-b border-b-neutral-300 pb-22px"},[s[13]||(s[13]=e("img",{src:It,alt:"logo página 7",width:"115",height:"36",class:"col-start-2 mx-auto"},null,-1)),e("button",{class:"ml-auto mr-16px",type:"button",onClick:j},s[12]||(s[12]=[e("i",{class:"i-carbon-close block text-8.5"},null,-1)]))]),e("form",{class:"px-16px font-montserrat md:px-50px",onSubmit:xt(H,["prevent"])},[s[15]||(s[15]=e("p",{class:"mb-20px text-center text-4 font-semibold leading-16px"},"¡Gracias por ayudarnos a mejorar!",-1)),e("div",fe,[p(D,{modelValue:o(C),"onUpdate:modelValue":s[2]||(s[2]=d=>T(C)?C.value=d:null),"label-text":"Nombre Completo","input-type":"text",required:"","element-id":"txtNombre",class:"md:col-span-2"},null,8,["modelValue"]),p(D,{modelValue:o(M),"onUpdate:modelValue":s[3]||(s[3]=d=>T(M)?M.value=d:null),"label-text":"Ciudad","input-type":"text",required:"","element-id":"txtCiudad"},null,8,["modelValue"]),p(D,{modelValue:o($),"onUpdate:modelValue":s[4]||(s[4]=d=>T($)?$.value=d:null),"label-text":"Correo Electrónico",required:"","input-type":"email","element-id":"txtCorreo"},null,8,["modelValue"]),p(D,{modelValue:o(l),"onUpdate:modelValue":s[5]||(s[5]=d=>T(l)?l.value=d:null),"label-text":"Deja tu comentario","input-type":"textarea","element-id":"txtComentario",class:"h-100px md:col-span-2"},null,8,["modelValue"])]),e("div",_e,[K(e("input",{"onUpdate:modelValue":s[6]||(s[6]=d=>T(g)?g.value=d:null),required:"",type:"checkbox",class:"mr-12px cursor-pointer"},null,512),[[ft,o(g)]]),s[14]||(s[14]=e("label",{class:"text-13px font-medium leading-17px text-gray-600"}," Certifico que mis datos son reales y autorizo a Página 7 para contactarme vía mail para agradecerme del error ",-1))]),s[16]||(s[16]=e("button",{class:"mx-auto mt-35px max-w-300px w-full flex items-center justify-center rounded-8px bg-orange-600 p-16px text-2.75 font-bold leading-11px tracking-widest uppercase color-white md:mt-24px",type:"submit"}," enviar ",-1))],32)])])])):m("",!0)])])])),[[o(Nt),it]]),e("aside",be,[t.sponsorBoxs?(i(),n("div",he,[(i(!0),n(y,null,I(t.sponsorBoxs,d=>(i(),n(y,{key:d.queryBox.id},[d.posts.length>0?(i(),B(rt,{key:0,posts:d.posts,sponsor:d.queryBox},null,8,["posts","sponsor"])):m("",!0)],64))),128))])):m("",!0),p(z,{id:"desk_ad-box1-"+t.post.id,path:"/1098385/pagina7cl/ad_box1",width:300,dimensions:[300,250],"size-mapping":"asideSizeMapping"in t?t.asideSizeMapping:o(q),targeting:o(b)},null,8,["id","size-mapping","targeting"]),p(z,{id:"desk_ad_box2-"+t.post.id,path:"/1098385/pagina7cl/ad_box2",width:300,dimensions:[300,250],"size-mapping":"asideSizeMapping"in t?t.asideSizeMapping:o(q),targeting:o(b)},null,8,["id","size-mapping","targeting"]),p(dt,{title:"+ Leídos",black:""}),p(ut),p(z,{id:"desk_ad_box3-"+t.post.id,path:"/1098385/pagina7cl/ad_box3",width:300,dimensions:[300,250],"size-mapping":"asideSizeMapping"in t?t.asideSizeMapping:o(q),targeting:o(b)},null,8,["id","size-mapping","targeting"]),p(z,{id:"desk_ad_box4-"+t.post.id,path:"/1098385/pagina7cl/ad_box4",width:300,dimensions:[300,250],"size-mapping":"asideSizeMapping"in t?t.asideSizeMapping:o(q),targeting:o(b)},null,8,["id","size-mapping","targeting"])])])])}}}),ke={class:"bg-white"},ve={class:"container"},we={key:1},Ce={class:"grid pb-64px md:grid-cols-3 md:mb-34px md:gap-7.5"},De=O({__name:"[...slug]",async setup(P){var f,_,j,w,C,M,$;let a,c;const v=_t(),{data:r,error:S}=([a,c]=W(()=>Z(`/api/post/${v.params.slug[v.params.slug.length-1]}`,"$dgxh1bnDR3")),a=await a,c(),a),u=x({});if(((f=S.value)==null?void 0:f.statusCode)===404)throw X({message:"La nota no existe",statusCode:404});if(!r.value)throw X({message:"Nota no encontrada",statusCode:404});const{data:k}=([a,c]=W(()=>Z(`/api/categories/festival-de-vina?limit=3&excluded=${r.value.post.id}`,"$6pe5QWds84")),a=await a,c(),a);return r.value.post.contentBlocks&&(u.value={rel:"amphtml",href:`/noticias/amp/${v.params.slug.join("/")}`}),Pt({link:[u.value,{rel:"canonical",href:(_=r.value)==null?void 0:_.post.url}],script:[{tagPosition:"bodyOpen",async:!0,defer:!0,crossorigin:"anonymous",src:"https://connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v5.0&appId=448496728510945"},{tagPosition:"head",type:"application/ld+json",innerHTML:At((j=r.value)==null?void 0:j.post)}],meta:[{name:"identrada",content:(w=r.value)==null?void 0:w.post.id}]}),ot({title:()=>{var l,g;return((l=r.value)==null?void 0:l.post.seo.title)??((g=r.value)==null?void 0:g.post.title)??""},description:()=>{var l;return(l=r.value)==null?void 0:l.post.seo.meta_description},ogType:"article",ogUrl:()=>{var l;return(l=r.value)==null?void 0:l.post.seo.open_graph_url},ogTitle:()=>{var l;return(l=r.value)==null?void 0:l.post.seo.open_graph_title},ogDescription:(C=r.value)==null?void 0:C.post.seo.open_graph_description,ogImage:()=>{var l,g;return(g=(l=r.value)==null?void 0:l.post.featuredImage)==null?void 0:g.sizes.mediumLarge.url},twitterCard:()=>{var l;return((l=r.value)==null?void 0:l.post.seo.twitter_card)??"summary_large_image"},twitterTitle:()=>{var l;return(l=r.value)==null?void 0:l.post.seo.twitter_title},twitterDescription:(M=r.value)==null?void 0:M.post.seo.twitter_description,twitterImage:($=r.value)==null?void 0:$.post.seo.twitter_image}),(l,g)=>{var A,E,b;const H=ye,U=st,F=Vt;return i(),n("div",ke,[e("div",ve,[(A=o(r))!=null&&A.post?(i(),B(H,{key:0,post:o(r).post,"sponsor-boxs":o(r).sponsorBox},null,8,["post","sponsor-boxs"])):m("",!0),(E=o(k))!=null&&E.posts&&o(k).posts.length?(i(),n("div",we,[p(U,{title:"+ Noticias",black:""}),e("div",Ce,[(i(!0),n(y,null,I((b=o(k))==null?void 0:b.posts,h=>(i(),B(F,{key:h.id,url:h.url,title:h.title,"featured-image":h.featuredImage,"authors-groups":h.authorsGroups,"published-at":h.publishedAt},null,8,["url","title","featured-image","authors-groups","published-at"]))),128))])])):m("",!0)])])}}});export{De as default};