PageSourceSearch

https://bienestar.mil.ar/_nuxt/D60h_jvb.js

js bienestar.mil.ar collected 2026-09-24 23:53:37 UTC 3,360 bytes, 1 lines download raw bytes

1import{N as B}from"./BwUpnvnW.js";import{u as E}from"./HNqD31RN.js";import{_ as L,f as $,g as z,c as i,a as o,F as k,r as N,b as F,h as n,z as O,o as c,t as _,d as q,n as A}from"./BVfcN0FZ.js";const I={class:"page"},T={class:"grid"},J=["onClick","title"],U={class:"media"},H=["src","alt"],K={class:"dateBadge"},R={class:"body"},j={class:"title"},G={class:"pagination"},Q=["disabled"],W={class:"paginationDots",role:"navigation","aria-label":"Paginación"},X=["onClick","aria-current"],Y=["disabled"],Z={__name:"novedades",setup(ee){const u=E(),s=n(1),v=n(8),g=n(!1),p=n([]),b=n(0),r=O(()=>Math.max(1,Math.ceil(b.value/v.value))),l=n(!1),m=n(null),C=async a=>{const{data:t,error:e}=await u.from("novedades").select("id, titulo, img, fecha_publicacion, texto").eq("id",a.id).maybeSingle();if(e){console.error(e);return}m.value=t,l.value=!0,document.body.style.overflow="hidden"},y=()=>{l.value=!1,m.value=null,document.body.style.overflow=""},S=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],D=a=>{if(!a)return"";const t=String(a).split("-");return t.length!==3?"":`${t[2]} de ${S[Number(t[1])-1]} de ${t[0]}`},M=async()=>{const a=new Date().toISOString().slice(0,10),{count:t,error:e}=await u.from("novedades").select("id",{count:"exact",head:!0}).eq("activo",1).lte("fecha_publicacion",a);e&&console.error(e),b.value=t||0},d=async()=>{g.value=!0;const a=new Date().toISOString().slice(0,10),t=(s.value-1)*v.value,e=s.value*v.value-1,{data:f,error:w}=await u.from("novedades").select("id, titulo, img, fecha_publicacion").eq("activo",1).lte("fecha_publicacion",a).order("fecha_publicacion",{ascending:!1}).range(t,e);w?console.error(w):p.value=f||[],g.value=!1},P=async()=>{s.value!==1&&(s.value-=1,await d())},x=async()=>{s.value!==r.value&&(s.value+=1,await d())},V=async a=>{a<1||a>r.value||(s.value=a,await d())},h=a=>{a.key==="Escape"&&l.value&&y()};return $(async()=>{await M(),await d(),document.addEventListener("keydown",h)}),z(()=>{document.removeEventListener("keydown",h),document.body.style.overflow=""}),(a,t)=>(c(),i("div",I,[t[2]||(t[2]=o("header",{class:"pageHeader"},[o("h1",{class:"pageTitle"},"Novedades"),o("p",{class:"pageSubtitle"}," Enterate de las últimas comunicaciones y actualizaciones. ")],-1)),o("div",T,[(c(!0),i(k,null,N(p.value,e=>(c(),i("button",{key:e.id,class:"card",type:"button",onClick:f=>C(e),title:e.titulo},[o("div",U,[o("img",{src:e.img,class:"img",alt:e.titulo},null,8,H),o("div",K,_(new Date(e.fecha_publicacion+"T00:00:00").toLocaleDateString("es-AR")),1)]),o("div",R,[o("h3",j,_(e.titulo),1),t[1]||(t[1]=o("div",{class:"cta"},[q(" Ver novedad "),o("span",{class:"arrow"},"→")],-1))])],8,J))),128))]),o("div",G,[o("button",{onClick:P,disabled:s.value===1,class:"paginationBtn",type:"button"}," Página anterior ",8,Q),o("div",W,[(c(!0),i(k,null,N(r.value,e=>(c(),i("button",{key:e,class:A(["dot",{active:e===s.value}]),type:"button",onClick:f=>V(e),"aria-current":e===s.value?"page":null},_(e),11,X))),128))]),o("button",{onClick:x,disabled:s.value===r.value,class:"paginationBtn",type:"button"}," Página siguiente ",8,Y)]),F(B,{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=e=>l.value=e),novedad:m.value,"format-fecha":D,onClose:y},null,8,["modelValue","novedad"])]))}},se=L(Z,[["__scopeId","data-v-8c4722d7"]]);export{se 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.