1import{_ as L}from"./20260923_30-yMJMOM0Z.js";import{_ as D}from"./20260923_30-Cpm_f2Em.js";import{_ as O}from"./20260923_30-CfODBUhL.js";import{_ as H}from"./20260923_30-C1ED6gWA.js";import{_ as j}from"./20260923_30-CG_GW-ZZ.js";import{aj as U,au as T,c as d,aw as W,ay as F,a_ as z,b5 as V,a4 as G,al as Y,w as J,a6 as q,d as r,e as u,_ as n,g as P,i as m,j as x,k as C,p as g,y as K,F as R,m as I,aS as Q}from"./20260923_30-BoOx6aVR.js";import{p as X}from"./20260923_30-CebjvLYK.js";import{g as Z}from"./20260923_30-BSbKw8hS.js";import{u as tt}from"./20260923_30-CLapcq1P.js";import{u as et}from"./20260923_30-B7U2Li7q.js";import"./20260923_30-ZPojt6zx.js";import"./20260923_30-C9BGtTLe.js";import"./20260923_30-DVg5e7cc.js";import"./20260923_30-BXW5YF-n.js";import"./20260923_30-BX4gNfyL.js";import"./20260923_30-pjSx3fLE.js";import"./20260923_30-CdBd5foE.js";import"./20260923_30-BFYG6KER.js";import"./20260923_30-RmZXkAI8.js";import"./20260923_30-Br9Onojv.js";import"./20260923_30-DodMfDoj.js";import"./20260923_30-B-61cgzE.js";/* empty css */const at=async()=>{const h=U(),p=h.status(),{data:f}=await T("reforma-pac-microsite",async()=>{try{const e=await h.getReformaPacMicrosite(p),i=(e?.content_tags??[]).map(s=>
1s.slug).filter(Boolean);let b=null;if(i.length)try{b=await h.getReformaPacContentByTags(i,p)}catch(s){console.error("[reforma-pac] tagged content fetch failed, grid will be empty",s)}return{microsite:e,tagged:b}}catch(e){return console.error("[reforma-pac] microsite fetch failed",e),null}}),c=d(()=>f.value?.microsite??null),k=d(()=>c.value?.hero?.image??null),y=d(()=>c.value?.hero?.subtitle||null),v=d(()=>c.value?.presentation||""),A=d(()=>c.value?.seo??null),S=d(()=>{const e=c.value?.project?.slug;return e?`${z}/${e}`:null}),_=e=>e?.pt_icons?{pt_icons:e.pt_icons.map(i=>({id:i.slug,...i}))}:e,o=e=>e.filter(i=>i?.slug),w=e=>o([...e.author_role??[],...(e.organization_author_role??[]).map(i=>({...i,isOrganization:!0}))]),E=e=>o([X(e)]),$=d(()=>{const e=f.value?.tagged,i=e?.articles??[],b=e?.posts??[],s=i.map(t=>{const l=w(t);return{key:`article-${t.slug}`,id:t.documentId,slug:t.slug,title:t.meta_title||t.title,image:t.main_image,description:t.abstract,section:W.replace("/",""),entityName:"article",icons:_(t.icons),tags:t.tags,date:t.published_date,author:l[0],authorExtraCount:Math.max(l.length-1,0)}}),N=b.filter(t=>t.blog?.slug).map(t=>{const l=E(t);return{key:`post-${t.slug}`,id:t.documentId,slug:`${t.blog.slug}/${t.slug}`,title:t.title,image:t.main_image,description:t.abstract,section:F.replace("/",""),entityName:"post",icons:_(t.icons),tags:t.tags,date:t.published_date,author:l[0],authorExtraCount:Math.max(l.length-1,0)}});return[...s,...N].sort((t,l)=>new Date(l.date)-new Date(t.date))});return{microsite:c,heroImage:k,heroSubtitle:y,presentation:v,projectUrl:S,contentItems:$,seo:A}},ot=async()=>{const{fetchEvents:h}=tt(),{data:p}=await T("reforma-pac-webinars",async()=>{const y=Z(),v=`tags_slug_facets IN [${V.map(o=>`"${o}"`).join(", ")}]`,[A,S]=await Promise.all([h({sort:["min_session_date:asc"],filter:`${v} AND finish_date_timestamp >= ${y} AND min_session_date > 0`}),h({sort:["min_session_date:desc"],filter:`${v} AND finish_date_timestamp < ${y} AND min_session_date > 0`})]),_=o=>Array.isArray(o.event_features?.event_format)?{...o,event_features:{...o.event_features,event_format:"hybrid"}}:o;return{agenda:(A.hits??[]).map(_),past:(S.hits??[]).map(_)}}),f=d(()=>p.value?.agenda??[]),c=d(()=>p.value?.past??[]),k=d(()=>f.value.length>0||c.value.length>0);return{agenda:f,past:c,hasWebinars:k}},st={class:"reforma-pac__nav","aria-label":"Secciones del microsite"},rt=["innerHTML"],nt={id:"webinars"},it={key:0,class:"mb-12"},lt={class:"reforma-pac__grid"},ct={key:1},ut={class:"reforma-pac__grid"},pt={id:"articulos"},dt={class:"reforma-pac__grid"},_t={__name:"reforma-pac",async setup(h){let p,f;const[c,k]=([p,f]=Y(()=>Promise.all([at(),ot()])),p=await p,f(),p),{heroImage:y,heroSubtitle:v,presentation:A,projectUrl:S,contentItems:_,seo:o}=c,{agenda:w,past:E,hasWebinars:$}=k,{createHeadSeo:e}=et(),i=Q();return J(o,()=>{e(o.value?.title||"Reforma PAC post-2027",o.value?.description||"El futuro de la PAC se decide ahora. Infórmate y participa.",o.value?.og_image?.url,void 0,void 0,!1)},{immediate:!0}),q({script:[{type:"application/ld+json",innerHTML:()=>({"@context":"https://schema.org","@type":"CollectionPage",name:o.value?.title||"Reforma PAC post-2027",description:o.value?.description||"El futuro de la PAC se decide ahora. Infórmate y participa.",url:`${i.public.APP_BASE_DOMAIN}/reforma-pac`,...o.value?.og_image?.url&&{image:o.value.og_image.url},inLanguage:"es",about:{"@type":"Thing",name:"Reforma de la PolÃtica Agraria Común post-2027"},isPartOf:{"@type":"WebSite",name:"Plataforma Tierra",url:i.public.APP_BASE_DOMAIN}})}]}),(b,s)=>{const N=L,t=D,l=O,M=H,B=j;return r(),u("div",null,[n(y)?(r(),P(N,{key:0,image:n(y),title:"Reforma PAC post-2027",subtitle:n(v)||"El futuro de la PAC se decide ahora"},null,8,["image","subtitle"])):m("",!0),x(l,{grid:"E","padding-y":"py-8"},{content:C(()=>[g("nav",st,[n($)?(r(),u("button",{key:0,type:"button",class:"reforma-pac__nav-link",onClick:s[0]||(s[0]=a=>b.$scrollToSmoothly("webinars"))}," Webinars ")):m("",!0),n(_).length?(r(),u("button",{key:1,type:"button",class:"reforma-pac__nav-link",onClick:s[1]||(s[1]=a=>b.$scrollToSmoothly("articulos"))}," ArtÃculos ")):m("",!0),n(S)?(r(),P(t,{key:2,to:n(S),class:"reforma-pac__nav-link"},{default:C(()=>[...s[2]||(s[2]=[K(" ThinkPAC ",-1)])]),_:1},8,["to"])):m("",!0)])]),_:1}),n(A)?(r(),P(l,{key:1,grid:"E",title:"La reforma de la PAC","padding-y":"py-10"},{content:C(()=>[g("div",{class:"reforma-pac__prose",innerHTML:n(A)},null,8,rt)]),_:1})):m("",!0),g("div",nt,[n($)?(r(),P(l,{key:0,grid:"E",title:"Webinars","padding-y":"py-10"},{content:C(()=>[n(w).length?(r(),u("div",it,[s[3]||(s[3]=g("h3",{class:"reforma-pac__subtitle"},"Agenda",-1)),g("ul",lt,[(r(!0),u(R,null,I(n(w),a=>(r(),u("li",{key:a.slug},[x(M,{"card-info":a,"title-tag":"h4"},null,8,["card-info"])]))),128))])])):m("",!0),n(E).length?(r(),u("div",ct,[s[4]||(s[4]=g("h3",{class:"reforma-pac__subtitle"},"Ya realizados",-1)),g("ul",ut,[(r(!0),u(R,null,I(n(E),a=>(r(),u("li",{key:a.slug},[x(M,{"card-info":a,"title-tag":"h4"},null,8,["card-info"])]))),128))])])):m("",!0)]),_:1})):m("",!0)]),g("div",pt,[n(_).length?(r(),P(l,{key:0,grid:"E",title:"ArtÃculos","padding-y":"py-10"},{content:C(()=>[g("ul",dt,[(r(!0),u(R,null,I(n(_),a=>(r(),u("li",{key:a.key},[x(B,{id:a.id,size:"xs",dir:"col",slug:a.slug,title:a.title,image:a.image,description:a.description,section:a.section,"entity-name":
1a.entityName,icons:a.icons,tags:a.tags,date:a.date,"date-format":"short",author:a.author,"author-extra-count":a.authorExtraCount,class:"h-full overflow-hidden rounded-sm bg-white","class-content":"px-5 pb-5","class-title":"text-lg font-bold leading-6 line-clamp-3","icon-position":"middle"},null,8,["id","slug","title","image","description","section","entity-name","icons","tags","date","author","author-extra-count"])]))),128))])]),_:1})):m("",!0)])])}}},Dt=G(_t,[["__scopeId","data-v-483ef21a"]]);export{Dt 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.