PageSourceSearch

https://actualidadpenal.pe/_nuxt/CkEi5UlC.js

js actualidadpenal.pe collected 2026-10-02 13:05:25 UTC 8,830 bytes, 1 lines download raw bytes

1import{_ as de}from"./BbgpcWak.js";import{d as K,b as s,j as w,i as v,k as C,s as _,e as n,c as r,f as k,_ as Q,t as x,B as ve,A as me,r as g,R as D,h as y,o as pe,a as ge,n as H,g as f,F as L,l as M,m as j,C as X,bl as J}from"./Tu_9qqDy.js";import{_ as V}from"./BEU_PX5H.js";import{_ as fe}from"./BpJXRNlH.js";import{_ as be}from"./BpZHJnk_.js";import{_ as _e}from"./ChSGVX5R.js";import{_ as xe}from"./CeXSdCxY.js";import{B as he}from"./P3rpgwUe.js";import{u as ye}from"./BFyFmc1P.js";import{a as T}from"./CZ_t7wTv.js";import{u as ke}from"./RDwtmSOm.js";import{L as we}from"./WZY87EM8.js";import"./BLwLhTZd.js";import"./CDrgXwbz.js";import"./DZBJ4Mwk.js";import"./BlAa4GRe.js";import"./CHlv-ev0.js";import"./CzocND4P.js";import"./Bz_7BURO.js";import"./CvMi1f2b.js";import"./jc0MLXVe.js";import"./ZhWAdK_X.js";import"./Z0pEkunY.js";import"./C-WUsUQi.js";import"./D6MhI1Dd.js";import"./CmMqz9uY.js";const Se={class:"relative w-full shrink-0 bg-slate-100"},$e={key:1,class:"aspect-3/4 flex w-full flex-col items-center justify-center gap-2"},Ce={class:"bg-brand-first absolute left-0 top-0 z-10 rounded-br-lg px-2 py-1 text-xs font-bold text-white"},Ie={class:"flex flex-grow items-center justify-center border-t border-slate-100 bg-white px-3 py-3 text-center"},Re={class:"line-clamp-2 text-xs font-semibold leading-snug text-slate-800"},qe={class:"bg-brand-first/70 pointer-events-none absolute inset-0 z-20 flex flex-col items-center justify-center p-4 text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"},Ne={class:"mb-5 text-center"},Be={class:"mb-1 text-xs text-white/60"},Ee={class:"line-clamp-2 px-2 text-sm leading-tight"},Ae=K({__name:"RevistaCard",props:{revista:{}},emits:["click"],setup(c,{emit:B}){const I=c,E=B,m=_(()=>`/revistas/edicion/${I.revista.slug}`),b=()=>{E("click",I.revista)};return(l,i)=>{const S=xe,d=Q,R=V;return s(),w(R,{to:v(m),class:"group relative flex h-full cursor-pointer flex-col overflow-hidden rounded-lg border border-slate-200 bg-white shadow-sm transition-shadow hover:shadow-md",onClick:b},{default:C(()=>[n("div",Se,[c.revista.portada?(s(),w(S,{key:0,src:c.revista.portada,alt:c.revista.descripcion_imagen||`Edición ${c.revista.edicion}`,width:"300",format:"webp",quality:"70",sizes:"sm:50vw md:33vw lg:240px",loading:"lazy",decoding:"async",class:"block h-auto w-full"},null,8,["src","alt"])):(s(),r("div",$e,[k(d,{name:"heroicons:photo",class:"h-10 w-10 text-slate-300"}),i[0]||(i[0]=n("span",{class:"text-xs text-slate-400"},"Sin portada",-1))])),n("div",Ce," N.º "+x(c.revista.edicion),1)]),n("div",Ie,[n("span",Re,x(c.revista.quincena),1)]),n("div",qe,[n("div",Ne,[n("p",Be,"N.º "+x(c.revista.edicion),1),n("h3",Ee,x(c.revista.quincena),1)]),i[1]||(i[1]=n("span",{class:"bg-brand-seventh group-hover:bg-brand-seventh-hover w-full max-w-[140px] rounded-lg px-3 py-1.5 text-center text-xs font-bold text-white shadow-md transition-colors"}," Abrir contenido ",-1))])]),_:1},8,["to"])}}}),De=Object.assign(Ae,{__name:"FeaturesRevistasRevistaCard"}),Le={class:"ap-page-content"},Me={class:"mb-6 flex items-center justify-between border-b border-slate-200"},je={class:"flex gap-1"},Te={class:"flex gap-4"},Pe=["value"],ze=["value"],Fe={key:0,class:"mb-6 text-sm text-slate-500"},Oe={key:3,class:"grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:gap-6"},Ue={key:4,class:"py-8"},bt=K({__name:"index",setup(c){const{getFechas:B,getEdiciones:I,getRevistasDigitales:E}=ye(),m=ve(),b=me(),l=g(m.query.tab==="campanas"||m.query.campana?"campanas":"ediciones"),i=g("all"),S=g("all"),d=g(1),{data:R}=B(),{data:W}=I({revista:D.slug}),A=_(()=>T(R.value)),P=_(()=>T(W.value)),z=e=>{if(!e||e==="all")return"all";const t=A.value.find(u=>String(u.id)===e||String(u.quincena)===e||String(u.campana)===e);return String(t?.id||"all")},Y=e=>{if(e==="all")return"all";const t=A.value.find(u=>String(u.id)===e||String(u.quincena)===e||String(u.campana)===e);return String(t?.id||e)},Z=_(()=>{const e={revista:D.slug,page:d.value};return l.value==="campanas"&&i.value!=="all"&&(e.anio=Y(i.value)),e}),{data:p,pending:q,error:F,refresh:Ge}=E(Z),o=g(T(p.value)),ee=_(()=>o.value.slice(0,we).flatMap(e=>e.slug?[{name:`Edición ${e.edicion} - ${e.quincena}`.trim(),url:`/revistas/edicion/${e.slug}`}]:[])),{metaInfo:te}=ke({module:"RD",path:"/revistas",listItems:ee}),se=_(()=>
1te.value?.description||`Explora las ediciones de ${D.name}.`),h=g(!1),O=g(!1);if(p.value&&p.value.body){const e=p.value.body;e.current_page&&e.last_page?h.value=e.current_page<e.last_page:h.value=(e.data?.length||0)>=10}y(p,e=>{if(e&&e.body&&e.body.data){if(e.body.data.some(t=>t.image_available===!1||t.image_available===0||t.image_available==="false")&&(O.value=!0),d.value===1)o.value=e.body.data;else{const t=new Set(o.value.map($=>$.id)),u=e.body.data.filter($=>!t.has($.id));o.value=[...o.value,...u]}e.body.current_page&&e.body.last_page?h.value=e.body.current_page<e.body.last_page:h.value=e.body.data.length>=10}else d.value===1&&(o.value=[]),h.value=!1},{immediate:!0}),y(R,()=>{const e=m.query.campana?String(m.query.campana):"";e&&(l.value="campanas",i.value=z(e))},{immediate:!0}),y(i,()=>{d.value=1,o.value=[]}),y(l,()=>{d.value=1,o.value=[]}),y(()=>m.query.campana,e=>{e&&(l.value="campanas",i.value=z(String(e)))});const ae=_(()=>({modulo:{type:"revistas-digitales",web:"AP",slug:"revistas",edicion:"lista",url:m.fullPath,user:{id:void 0}},resource:"portada"})),oe=()=>{!q.value&&h.value&&d.value++},U=g(null);let N=null;pe(()=>{N=new IntersectionObserver(e=>{e[0]?.isIntersecting&&oe()},{threshold:.1}),y(U,e=>{e&&N?.observe(e)},{immediate:!0})}),ge(()=>{N&&N.disconnect()});const ne=()=>{const e=P.value.find(t=>String(t.id)===String(S.value));e&&(e.id==="all"?b.push("/revistas"):e.modulo==="RD"?b.push(`/revistas/edicion/${e.slug}`):e.modulo==="RV"?b.push(`/revistas/edicion/${e.slug}`):b.push(`/revistas/edicion/${e.slug}`))},ie=()=>{d.value=1,o.value=[],b.replace({path:"/revistas",query:i.value==="all"?{tab:"campanas"}:{tab:"campanas",campana:i.value}})},re=e=>{};return(e,t)=>{const u=de,$=Q,le=V,ue=fe,G=be,ce=_e;return s(),r("div",Le,[k(u,{title:"Revistas Digitales",subtitle:se.value,icon:"heroicons:book-open-solid","title-level":4,"subtitle-variant":"intro"},null,8,["subtitle"]),n("div",Me,[n("div",je,[n("button",{onClick:t[0]||(t[0]=a=>l.value="ediciones"),class:H([l.value==="ediciones"?"bg-brand-first font-bold text-white":"hover:text-brand-first bg-transparent font-medium text-slate-500","rounded-t-lg px-6 py-2 text-sm transition-colors"])}," Ediciones ",2),n("button",{onClick:t[1]||(t[1]=a=>l.value="campanas"),class:H([l.value==="campanas"?"bg-brand-first font-bold text-white":"hover:text-brand-first bg-transparent font-medium text-slate-500","rounded-t-lg px-6 py-2 text-sm transition-colors"])}," Campañas ",2)]),k(le,{to:"/revistas/ediciones-anteriores",class:"text-brand-seventh hover:text-brand-seventh-hover flex items-center gap-1 pb-1 text-sm font-semibold transition-opacity"},{default:C(()=>[t[4]||(t[4]=j(" Ediciones anteriores ",-1)),k($,{name:"heroicons:arrow-right",class:"h-4 w-4"})]),_:1})]),k(ue,{mb:"mb-4"},{default:C(()=>[n("div",Te,[l.value==="ediciones"?X((s(),r("select",{key:0,"onUpdate:modelValue":t[2]||(t[2]=a=>S.value=a),onChange:ne,class:"focus:ring-brand-first focus:border-brand-first block min-w-[200px] rounded-lg border border-slate-300 bg-white p-2.5 text-sm text-slate-700"},[(s(!0),r(L,null,M(P.value,a=>(s(),r("option",{key:a.id,value:a.id},x(a.text),9,Pe))),128))],544)),[[J,S.value]]):f("",!0),l.value==="campanas"?X((s(),r("select",{key:1,"onUpdate:modelValue":t[3]||(t[3]=a=>i.value=a),onChange:ie,class:"focus:ring-brand-first focus:border-brand-first block min-w-[200px] rounded-lg border border-slate-300 bg-white p-2.5 text-sm text-slate-700"},[(s(!0),r(L,null,M(A.value,a=>(s(),r("option",{key:a.id||a.quincena,value:String(a.id)},x(a.quincena),9,ze))),128))],544)),[[J,i.value]]):f("",!0)])]),_:1}),!v(q)&&v(p)&&v(p).body?(s(),r("p",Fe,x(v(p).body.total||(o.value?o.value.length:0))+" ediciones encontradas ",1)):f("",!0),v(F)?(s(),w(G,{key:1,type:"error",class:"mb-6"},{default:C(()=>[...t[5]||(t[5]=[j(" Ocurrió un error al cargar las revistas. Por favor, intenta nuevamente. ",-1)])]),_:1})):f("",!0),!v(q)&&!v(F)&&o.value&&o.value.length===0?(s(),w(G,{key:2,type:"info",class:"mb-6"},{default:C(()=>[...t[6]||(t[6]=[j(" No se encontraron ediciones. ",-1)])]),_:1})):f("",!0),o.value&&o.value.length>0?(s(),r("div",Oe,[(s(!0),r(L,null,M(o.value,a=>(s(),w(De,{key:a.id,revista:a,onClick:re},null,8,["revista"]))),128))])):f("",!0),v(q)?(s(),r("div",Ue,[k(ce,{type:"grid",count:d.value===1?4:2,cols:4}
1,null,8,["count"])])):f("",!0),n("div",{ref_key:"sentinelRef",ref:U,class:"h-4 w-full"},null,512),O.value?(s(),w(he,{key:5,"info-send":ae.value},null,8,["info-send"])):f("",!0)])}}});export{bt 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.