1import{_ as re}from"./ChSGVX5R.js";import{_ as ce}from"./CeXSdCxY.js";import{d as V,b as a,c as n,n as de,e as o,j as v,_ as H,t as p,F as C,l as P,z as J,i as s,f as i,g as l,m as T,y as ue,s as r,r as R,p as me,q as pe}from"./Tu_9qqDy.js";import{_ as ve}from"./BMOOCHg3.js";import{_ as be}from"./ASoeWEbe.js";import{u as ge}from"./u_MoT1Px.js";import{u as fe,a as he,C as _e}from"./xwK8bHKo.js";import{u as xe}from"./D1j53pxr.js";import{u as ye}from"./mVRKZrNs.js";import{C as ke,f as we,p as U,d as Ce}from"./h2e8lgc4.js";import{d as Se,S as Pe,r as $e,b as Ie}from"./WZY87EM8.js";import{C as Le,u as Be}from"./fsrcT0Gr.js";import{C as Fe}from"./BZUriWtP.js";import{S as Ae}from"./Bw4ItkBr.js";import{C as ze}from"./Bxfe6tVa.js";import{S as Ne}from"./Di3Y_Dir.js";import{u as je}from"./Z0pEkunY.js";import{u as De}from"./C-WUsUQi.js";import"./CmMqz9uY.js";/* empty css */import"./CQWRIt8R.js";import"./BEU_PX5H.js";import"./DnFtfSPy.js";import"./D6MhI1Dd.js";const Ee=["title","aria-label"],Me={key:0,class:"player-content-row"},Te={class:"audio-label-text"},Re={class:"audio-visualizer static-bars"},Ue={key:1,class:"player-content-row expanded-row"},Ve={class:"audio-visualizer expanded-bars"},He=40,Je=V({__name:"ContentSpeechPlayer",props:{isSpeaking:{type:Boolean},isPaused:{type:Boolean,default:!1},label:{default:"Escuchar comentario"}},emits:["speak","pause"],setup(c,{emit:k}){const $=c,b=k,g=()=>{if($.isSpeaking){b("pause");return}b("speak")};return(I,m)=>{const f=H;return a(),n("div",{class:de(["custom-audio-player",{"is-playing":c.isSpeaking}])},[o("button",{type:"button",class:"player-control-btn",title:c.isSpeaking?"Pausar":c.label,"aria-label":c.isSpeaking?"Pausar":c.label,onClick:g},[c.isSpeaking?(a(),v(f,{key:0,name:"heroicons:pause-solid",class:"h-5 w-5"})):(a(),v(f,{key:1,name:"heroicons:play-solid",class:"ml-0.5 h-5 w-5"}))],8,Ee),c.isSpeaking?(a(),n("div",Ue,[o("div",Ve,[(a(),n(C,null,P(He,h=>o("div",{key:h,class:"wave-bar active"})),64))])])):(a(),n("div",Me,[o("span",Te,p(c.label),1),o("div",Re,[(a(),n(C,null,P(10,h=>o("div",{key:h,class:"wave-bar"})),64))])]))],2)}}}),Oe=Object.assign(J(Je,[["__scopeId","data-v-2d3f2d37"]]),{__name:"FeaturesCommonContentSpeechPlayer"}),qe={class:"print-grid grid grid-cols-1 items-start gap-8 lg:grid-cols-12"},Ge={class:"print-content rounded-lg border border-slate-200/80 bg-white p-4 shadow-sm lg:col-span-8"},Ke={class:"ap-title-4 text-brand-first mb-4 leading-tight"},Qe={key:0,class:"mb-6"},We={class:"aspect-video overflow-hidden rounded-lg bg-slate-100"},Xe={key:0,class:"mt-2 px-1 text-xs text-slate-400"},Ye={class:"mb-4 flex items-center gap-1.5 text-sm font-medium text-slate-400"},Ze={key:0},et={class:"no-print mb-8 flex flex-col gap-4 border-y border-slate-100 py-3 sm:flex-row sm:items-center sm:justify-between"},tt={key:0,class:"flex min-w-0 flex-1 flex-col gap-3"},at={class:"no-print relative flex w-full flex-wrap justify-end gap-2 sm:w-auto"},ot=["disabled","title"],st={key:1,class:"no-print audio-player-normal my-8 flex flex-col gap-3 rounded-lg border border-slate-200 bg-slate-50 p-5 shadow-sm"},nt={class:"text-brand-first flex items-center gap-2 text-base font-bold"},lt={key:5,class:"no-print"},it={class:"text-brand-first mb-4 flex items-center gap-2 text-base"},rt={class:"space-y-4"},ct={class:"text-brand-second mb-1 block text-xs font-bold uppercase tracking-wide"},dt={class:"text-brand-first mb-2 text-sm"},ut=["innerHTML"],mt={key:6,class:"no-print mt-8 flex flex-wrap items-center gap-2"},pt=V({__name:"[plan]",setup(c){const k=me(),$=pe(),b=ge(),g=r(()=>k.params.alias),I=r(()=>k.params.plan),{data:m}=je({module:"EN",item:g}),{data:f,pending:h,error:O}=b.getComentarioDetail(()=>g.value,()=>I.value.toLowerCase()==="pro"?2:1),q={id:"",titulo:"",alias:"",plan_id:1,fecha_publicacion:""},e=r(()=>f.value?.body?.data||f.value?.data||f.value?.body||q),{authStore:A,planId:z,canViewContent:_,showPaywall:N}=fe({planParam:I,data:f,content:e}),{data:j}=b.getComentariosLegales({resultados_por_pagina:15}),G=r(()=>(j.value?.body?.data||j.value?.data||[]).filter(t=>t.alias!==g.value).map(t=>({id:t.id,titulo:t.titulo,fecha_publicacion:t.fecha_publicacion,imagen_medium:t.imagen_medium,imagen_small:t.imagen_small,imagen:t.imagen,to:`/comentarios-legales/${t.alias}/${U(t.plan_id)}`}))),K=r(()=>!!e.value?.titulo&&!h.value),{isFavorite:Q,favoriteLoading:W,handleFavoriteToggle:X}=ye({content:e,toggleFavorite:d=>b.toggleFavorite(d),onNeedAuth:()=>$.push(`/login?from=${encodeURIComponent(k.fullPath)}`),isAuthenticated:r(()=>!!A.auth)}),L=R(!1),Y=async d=>{try{L.value=!0;const t=await b.getAttachmentBlob(d.id);Ce(t,d.nombre_archivo||"documento.pdf")}catch(t){console.error("Failed to download file",t)}finally{L.value=!1}},{isSpeaking:Z,speakContent:ee,pauseSpeaking:te}=he(()=>`${e.value?.titulo||""}. ${e.value?.contenido||""}`),{handlePrint:D}=xe(),w=R(0),ae=()=>{w.value<4&&w.value++},oe=()=>{w.value>-1&&w.value--},se=r(()=>({fontSize:{"-1":"0.875rem",0:"1rem",1:"1.125rem",2:"1.25rem",3:"1.375rem",4:"1.5rem"}[w.value]||"1rem"})),B=r(()=>m.value?.image||e.value?.imagen_medium||e.value?.imagen||Se()),E=r(()=>m.value?.description||e.value?.sumilla||e.value?.sumario||""),F=r(()=>{if(e.value?.titulo)return`/comentarios-legales/${g.value}/${U(e.value.plan_id)}`}
1),M=Be({module:"EN",slug:g,metaInfo:m}),ne=r(()=>{if(!e.value?.titulo&&!m.value?.title)return null;const d=m.value?.title||e.value?.titulo||"",t=e.value?.sumilla||e.value?.sumario||E.value,S=M.value||(F.value?`${Pe.origin}${F.value}`:void 0),y=e.value?.staff,x=y?.nombre_completo?{name:y.nombre_completo,jobTitle:y.cargo_laboral||y.profesion}:void 0;return $e({name:d,description:t,image:B.value,canonicalUrl:S,extra:Ie({type:"NewsArticle",headline:d,description:t,articleBody:e.value?.contenido||t,image:B.value,datePublished:e.value?.fecha_publicacion,dateModified:e.value?.fecha_publicacion,articleSection:"Comentarios legales",canonicalUrl:S,author:x,isAccessibleForFree:z.value!==2,showPaywall:N.value})})});return De({title:()=>m.value?.title||e.value?.titulo||"",moduleLabel:()=>m.value?.title?void 0:"Comentario legal",description:E,path:F,canonicalHref:M,type:"article",image:B,jsonLd:ne,titleTemplate:"%s"}),(d,t)=>{const S=re,y=ce,x=H,le=ve,ie=be;return a(),n("div",qe,[o("div",Ge,[s(h)&&!e.value.titulo?(a(),v(S,{key:0,type:"article"})):s(O)&&!e.value.titulo?(a(),v(ke,{key:1,title:"Error al cargar el comentario legal"})):(a(),n(C,{key:2},[t[4]||(t[4]=o("div",{class:"mb-4 flex items-center border-b border-slate-100 pb-3"},[o("span",{class:"bg-brand-first rounded-lg px-2.5 py-1 text-xs font-bold text-white"}," Comentario Legal ")],-1)),o("h1",Ke,p(e.value.titulo),1),e.value.imagen_medium||e.value.imagen?(a(),n("div",Qe,[o("div",We,[i(y,{src:e.value.imagen,alt:e.value.descripcion_imagen||e.value.titulo,provider:"none",width:"800",height:"450",loading:"eager",fetchpriority:"high",decoding:"async",class:"h-full w-full object-cover"},null,8,["src","alt"])]),e.value.descripcion_imagen?(a(),n("p",Xe,p(e.value.descripcion_imagen),1)):l("",!0)])):l("",!0),o("div",Ye,[i(x,{name:"heroicons:calendar",class:"h-4 w-4 text-slate-400"}),e.value.fecha_publicacion?(a(),n("span",Ze,p(s(we)(e.value.fecha_publicacion,"long")),1)):l("",!0)]),o("div",et,[e.value.staff?(a(),n("div",tt,[i(Ne,{staff:e.value.staff,class:"!border-t-0 !pt-0"},null,8,["staff"])])):l("",!0),o("div",at,[i(le,{"is-favorite":s(Q),loading:s(W),"icon-only":!0,onClick:s(X)},null,8,["is-favorite","loading","onClick"]),o("button",{type:"button",disabled:!s(_),title:s(_)?"Imprimir comentario":"Inicia sesión para imprimir el comentario completo","aria-label":"Imprimir comentario",class:"hover:text-brand-seventh inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-slate-200 bg-white text-slate-500 transition-colors disabled:cursor-not-allowed disabled:opacity-50",onClick:t[0]||(t[0]=(...u)=>s(D)&&s(D)(...u))},[i(x,{name:"heroicons:printer",class:"h-5 w-5"})],8,ot),o("button",{type:"button",title:"Disminuir tamaño de letra","aria-label":"Disminuir tamaño de letra",class:"hover:text-brand-seventh inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-slate-200 bg-white text-sm font-bold text-slate-600 transition-colors",onClick:oe}," A- "),o("button",{type:"button",title:"Aumentar tamaño de letra","aria-label":"Aumentar tamaño de letra",class:"hover:text-brand-seventh inline-flex h-9 w-9 shrink-0 cursor-pointer items-center justify-center rounded-lg border border-slate-200 bg-white text-sm font-bold text-slate-600 transition-colors",onClick:ae}," A+ "),t[1]||(t[1]=o("div",{class:"mx-1 hidden h-6 w-px shrink-0 self-center bg-slate-200 sm:block"},null,-1)),s(A).auth?(a(),v(ze,{key:0,class:"sm:ml-1","show-twitter":"","share-prefix":"Te invito a revisar este comentario legal:"})):l("",!0)])]),s(_)?(a(),n("div",st,[o("div",nt,[i(x,{name:"heroicons:speaker-wave",class:"text-brand-seventh h-5 w-5"}),t[2]||(t[2]=T(" Escuchar comentario completo ",-1))]),i(Oe,{"is-speaking":s(Z),label:"Escuchar comentario",onSpeak:s(ee),onPause:s(te)},null,8,["is-speaking","onSpeak","onPause"])])):l("",!0),s(_)?(a(),n("div",{key:2,style:ue(se.value)},[i(ie,{content:e.value.contenido||"",decode:!1,size:"article"},null,8,["content"])],4)):l("",!0),s(N)?(a(),v(Ae,{key:3,description:"Para leer el comentario legal completo necesitas iniciar sesión con tu código de suscriptor."})):l("",!0),s(_)&&e.value.adjuntos?.length?(a(),v(Le,{key:4,attachments:e.value.adjuntos,loading:s(L),onDownload:Y},null,8,["attachments","loading"])):l("",!0),s(_)&&e.value.l_n_l?.length?(a(),n("div",lt,[o("h2",it,[i(x,{name:"heroicons:scale",class:"h-5 w-5 text-slate-400"}),t[3]||(t[3]=T(" Normas Legales Enlazadas ",-1))]),o("div",rt,[(a(!0),n(C,null,P(e.value.l_n_l,u=>(a(),n("div",{key:u.id,class:"shadow-2xs rounded-lg border border-slate-200/60 bg-slate-50 p-4"},[o("span",ct,p(u.entidad?.nombre),1),o("h3",dt,p(u.tipo?.nombre)+" Nº "+p(u.numero),1),o("div",{class:"text-sm leading-relaxed text-slate-500",innerHTML:u.sumilla},null,8,ut)]))),128))])])):l("",!0),e.value.tags?.length?(a(),n("div",mt,[i(x,{name:"heroicons:tag",class:"h-4 w-4 shrink-0 text-slate-400","aria-hidden":"true"}),(a(!0),n(C,null,P(e.value.tags,u=>(a(),n("span",{key:u.id,class:"bg-brand-first/10 text-brand-first border-brand-first/20 inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-semibold"},p(u.nombre),1))),128))])):l("",!0),s(_)&&e.value.id?(a(),v(Fe,{key:7,"section-class":"mt-12 pt-8 border-t border-slate-200 no-print",title:"Comentarios",id:e.value.id,modulo:"EN",plan:s(z),titulo:e.value.titulo??""},null,8,["id","plan","titulo"])):l("",!0)],64))]),i(_e,{layout:"inline",title:"Ãltimos Comentarios","image-folder":"entradas",items:G.value,"show-sidebar":K.value,pending:s(h),"fab-title":"Ãltimos comentarios","empty-message":"No hay más comentarios disponibles."},null,8,["items","show-sidebar","pending"])])}}}),Mt=J(pt,[["__scopeId","data-v-33ceccd9"]]);export{Mt 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.