PageSourceSearch

https://amigosdobem.org/assets/TransparenciaView-D9fRqlpH.js

js amigosdobem.org collected 2026-09-24 17:56:39 UTC 17,545 bytes, 1 lines download raw bytes

1import{c as l,a as e,d as h,w as $,e as v,f as D,o as n,F as x,r as w,g as b,i as y,t as g,y as F,U as j,V as z,h as f,p as B,k as A,b as L,n as N}from"./app-C4G5NBy_.js";const _={class:"relative min-h-[520px] max-md:min-h-[420px] overflow-hidden grid items-center",style:{background:"#0d1a2e"},"aria-label":"Seção de apresentação — Transparência"},E={class:"container-adb relative z-[2] py-20 max-md:py-14"},V={class:"max-w-[700px]"},U={class:"flex flex-wrap gap-4 mt-9"},q={__name:"TransparencyHero",setup(a){return(s,t)=>(n(),l("section",_,[t[5]||(t[5]=e("div",{class:"absolute bottom-0 right-0 w-[600px] h-[600px] z-[1] pointer-events-none opacity-15",style:{background:"radial-gradient(circle, #FF6B00 0%, transparent 65%)",transform:"translate(35%, 45%)"},"aria-hidden":"true"},null,-1)),t[6]||(t[6]=e("div",{class:"absolute top-0 right-0 w-[400px] h-[400px] z-[1] pointer-events-none opacity-10",style:{background:"radial-gradient(circle, #FFD900 0%, transparent 65%)",transform:"translate(30%, -30%)"},"aria-hidden":"true"},null,-1)),e("div",E,[e("div",V,[t[2]||(t[2]=e("div",{class:"inline-flex items-center gap-2.5 mb-6"},[e("span",{class:"text-eyebrow uppercase text-adbOrange tracking-[0.2em]"},"Institucional")],-1)),t[3]||(t[3]=e("h1",{class:"text-display m-0 text-white",style:{"text-shadow":"0 2px 24px rgba(0,0,0,0.45)","line-height":"0.91"}}
1," Transparência ",-1)),t[4]||(t[4]=e("p",{class:"text-[clamp(16px,1.8vw,19px)] leading-relaxed text-white/80 mt-4 max-w-[560px]",style:{"text-shadow":"0 1px 10px rgba(0,0,0,0.35)"}}," Disponibilizamos todos os nossos documentos institucionais e financeiros para doadores, parceiros e cidadãos. Confiança se constrói com clareza. ",-1)),e("div",U,[h(D,{variant:"primary",size:"lg",href:"#documentos"},{default:$(()=>[...t[0]||(t[0]=[v(" Ver documentos ",-1),e("i",{class:"fa-solid fa-file-lines","aria-hidden":"true"},null,-1)])]),_:1}),h(D,{variant:"outline",size:"lg",href:"mailto:[email protected]"},{default:$(()=>[...t[1]||(t[1]=[v(" Fale conosco ",-1),e("i",{class:"fa-solid fa-envelope","aria-hidden":"true"},null,-1)])]),_:1})])])])]))}},P={class:"flex flex-col sm:flex-row gap-3 items-stretch sm:items-center",role:"search","aria-label":"Filtros de documentos"},Y={class:"relative flex-1 min-w-[200px]"},H=["value"],I={key:0,class:"relative"},G=["value"],J=["value"],K={key:1,class:"relative"},Q=["value"],R=["value"],W={__name:"TransparencyFilters",props:{search:{type:String,default:""},categorySlug:{type:String,default:"all"},year:{type:[String,Number],default:"all"},years:{type:Array,default:()=>[]},categories:{type:Array,default:()=>[]}},emits:["update:search","update:categorySlug","update:year"],setup(a,{emit:s}){const t=a,o=s,c=y(()=>t.search.trim()!==""||t.categorySlug!=="all"||t.year!=="all");function d(){o("update:search",""),o("update:categorySlug","all"),o("update:year","all")}return(u,r)=>(n(),l("div",P,[r[14]||(r[14]=e("span",{class:"hidden lg:flex items-center gap-1.5 text-xs font-black uppercase tracking-widest text-adbMuted whitespace-nowrap shrink-0"},[e("i",{class:"fa-solid fa-filter text-adbOrange","aria-hidden":"true"}),v(" Filtrar ")],-1)),r[15]||(r[15]=e("div",{class:"hidden lg:block w-px h-8 bg-adbLine shrink-0","aria-hidden":"true"},null,-1)),e("div",Y,[r[3]||(r[3]=e("span",{class:"absolute left-3.5 top-1/2 -translate-y-1/2 pointer-events-none text-adbMuted","aria-hidden":"true"},[e("i",{class:"fa-solid fa-magnifying-glass text-sm"})],-1)),e("input",{id:"tp-search",type:"search",value:a.search,placeholder:"Buscar documento...",class:"w-full pl-9 pr-4 py-2.5 rounded-card border border-adbLine bg-white text-adbText text-sm placeholder-adbMuted shadow-soft transition-all duration-200 focus:outline-none focus:border-adbOrange focus:shadow-[0_0_0_3px_rgba(255,107,0,0.12)]",onInput:r[0]||(r[0]=m=>u.$emit("update:search",m.target.value))},null,40,H),r[4]||(r[4]=e("label",{for:"tp-search",class:"sr-only"},"Buscar por nome do documento",-1))]),a.categories.length>0?(n(),l("div",I,[r[6]||(r[6]=e("span",{class:"absolute left-3.5 top-1/2 -translate-y-1/2 pointer-events-none text-adbMuted","aria-hidden":"true"},[e("i",{class:"fa-solid fa-tag text-sm"})],-1)),e("select",{id:"tp-category",value:a.categorySlug,class:"appearance-none pl-9 pr-9 py-2.5 rounded-card border border-adbLine bg-white text-adbText text-sm cursor-pointer shadow-soft transition-all duration-200 focus:outline-none focus:border-adbOrange focus:shadow-[0_0_0_3px_rgba(255,107,0,0.12)] min-w-[200px]",onChange:r[1]||(r[1]=m=>u.$emit("update:categorySlug",m.target.value))},[r[5]||(r[5]=e("option",{value:"all"},"Todas as categorias",-1)),(n(!0),l(x,null,w(a.categories,m=>(n(),l("option",{key:m.slug,value:m.slug},g(m.name),9,J))),128))],40,G),r[7]||(r[7]=e("span",{class:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-adbMuted","aria-hidden":"true"},[e("i",{class:"fa-solid fa-chevron-down text-xs"})],-1)),r[8]||(r[8]=e("label",{for:"tp-category",class:"sr-only"}
1,"Filtrar por categoria",-1))])):b("",!0),a.years.length>0?(n(),l("div",K,[r[10]||(r[10]=e("span",{class:"absolute left-3.5 top-1/2 -translate-y-1/2 pointer-events-none text-adbMuted","aria-hidden":"true"},[e("i",{class:"fa-solid fa-calendar text-sm"})],-1)),e("select",{id:"tp-year",value:a.year,class:"appearance-none pl-9 pr-9 py-2.5 rounded-card border border-adbLine bg-white text-adbText text-sm cursor-pointer shadow-soft transition-all duration-200 focus:outline-none focus:border-adbOrange focus:shadow-[0_0_0_3px_rgba(255,107,0,0.12)] min-w-[130px]",onChange:r[2]||(r[2]=m=>u.$emit("update:year",m.target.value))},[r[9]||(r[9]=e("option",{value:"all"},"Todos os anos",-1)),(n(!0),l(x,null,w(a.years,m=>(n(),l("option",{key:m,value:m},g(m),9,R))),128))],40,Q),r[11]||(r[11]=e("span",{class:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-adbMuted","aria-hidden":"true"},[e("i",{class:"fa-solid fa-chevron-down text-xs"})],-1)),r[12]||(r[12]=e("label",{for:"tp-year",class:"sr-only"},"Filtrar por ano",-1))])):b("",!0),c.value?(n(),l("button",{key:2,type:"button",class:"inline-flex items-center gap-2 px-4 py-2.5 rounded-card border border-adbLine text-adbMuted text-sm font-semibold hover:border-adbOrange hover:text-adbOrange transition-all duration-200 whitespace-nowrap shrink-0","aria-label":"Limpar todos os filtros",onClick:d},[...r[13]||(r[13]=[e("i",{class:"fa-solid fa-xmark","aria-hidden":"true"},null,-1),v(" Limpar ",-1)])])):b("",!0)]))}},X={class:"relative aspect-[3/4] overflow-hidden flex-shrink-0 bg-[#EEF0FA]"},Z=["src","alt"],ee={key:1,class:"w-full h-full flex flex-col items-center justify-center gap-3 p-5 text-center",style:{background:"linear-gradient(160deg, #FF6B00 0%, #c94f00 100%)"},"aria-hidden":"true"},te={class:"text-[11px] font-bold text-white/65 uppercase tracking-wide leading-snug line-clamp-3"},ae={key:2,class:"absolute inset-0 bg-black/55 opacity-0 group-hover:opacity-100 transition-opacity duration-200 flex items-center justify-center p-4","aria-hidden":"true"},se={class:"flex flex-col gap-1 p-3 pb-4"},re={key:0,class:"text-[10px] font-black uppercase tracking-widest",style:{color:"#FF9200"}},oe={class:"text-sm font-bold text-adbText leading-snug m-0 line-clamp-2"},ne={key:1,class:"text-[11px] text-adbMuted line-clamp-1 mt-0.5"},le={key:2,class:"text-[10px] text-adbMuted italic mt-1.5"},ie={__name:"TransparencyDocumentCard",props:{document:{type:Object,required:!0}},setup(a){const s=a,t=f(!1),o=y(()=>{var d;return!!((d=s.document.fileUrl)!=null&&d.trim())}),c=y(()=>{if(!o.value)return{};const d=["Visualizar documento:",s.document.title,s.document.year?`— ${s.document.year}`:""].filter(Boolean).join(" ");return{href:s.document.fileUrl,target:"_blank",rel:"noopener noreferrer","aria-label":d}});return(d,u)=>(n(),F(z(o.value?"a":"div"),j(c.value,{class:["group relative flex flex-col overflow-hidden rounded-xl bg-white border border-adbLine transition-all duration-200",o.value?"hover:-translate-y-1 hover:shadow-strong cursor-pointer focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2":"opacity-60 cursor-default"],style:{"outline-color":"#FF6B00"}}),{default:$(()=>[e("div",X,[a.document.cover&&!t.value?(n(),l("img",{key:0,src:a.document.cover,alt:`Capa do documento: ${a.document.title}`,class:"w-full h-full object-cover",loading:"lazy",onError:u[0]||(u[0]=r=>t.value=!0)},null,40,Z)):(n(),l("div",ee,[u[1]||(u[1]=e("svg",{class:"w-10 h-10 text-white/40 flex-shrink-0",fill:"none",stroke:"currentColor","stroke-width":"1.4",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1)),e("span",te,g(a.document.title),1)])),o.value?(n(),l("div",ae,[...u[2]||(u[2]=[e("span",{class:"inline-flex items-center bg-white text-adbOrange gap-2 rounded-full px-5 py-2.5 text-sm font-bold shadow-lg text-center"},[e("svg",{class:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2.2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]),v(" Visualizar documento ")],-1)])])):b("",!0)]),e("div",se,[a.document.year?(n(),l("span",re,g(a.document.year),1)):b("",!0),e("h3",oe,g(a.document.title),
11),a.document.category?(n(),l("span",ne,g(a.document.category),1)):b("",!0),o.value?b("",!0):(n(),l("span",le," Documento não disponível "))])]),_:1},16,["class"]))}},de=["aria-label"],ue={class:"container-adb"},ce={class:"flex items-end justify-between gap-4 mb-8 max-md:mb-6"},me={class:"text-title-sm m-0"},pe={class:"text-sm text-adbMuted whitespace-nowrap flex-shrink-0 mb-1"},ge=["aria-label"],be={__name:"TransparencyDocumentsSection",props:{title:{type:String,required:!0},documents:{type:Array,required:!0}},setup(a){return(s,t)=>(n(),l("section",{"aria-label":a.title},[e("div",ue,[e("div",ce,[e("div",null,[t[0]||(t[0]=e("p",{class:"text-eyebrow uppercase text-adbOrange mb-2"},"Documentos",-1)),e("h2",me,g(a.title),1)]),e("span",pe,g(a.documents.length)+" "+g(a.documents.length===1?"documento":"documentos"),1)]),e("ul",{class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5 list-none p-0 m-0",role:"list","aria-label":`Documentos: ${a.title}`},[(n(!0),l(x,null,w(a.documents,o=>(n(),l("li",{key:o.id,role:"listitem"},[h(ie,{document:o},null,8,["document"])]))),128))],8,ge)])],8,de))}};function fe(a){var o;const s=a.adb_fields??{},t=Array.isArray(s.categories)?s.categories[0]:null;return{id:a.id,title:((o=a.title)==null?void 0:o.rendered)??"",slug:a.slug??"",year:s.year??null,category:(t==null?void 0:t.name)??"",categorySlug:(t==null?void 0:t.slug)??"",description:s.description??"",cover:s.cover_url??"",fileUrl:s.pdf_url??"",featured:!!s.featured,order:typeof s.order=="number"?s.order:0}}async function xe(){{const a=await fetch("/data/transparencia.json");if(!a.ok)throw new Error(`Erro ao carregar dados estáticos (HTTP ${a.status})`);const s=await a.json();if(!Array.isArray(s))throw new Error("Dados estáticos em formato inesperado.");return s.map(fe)}}
1function ye(a,{search:s="",categorySlug:t="all",year:o="all"}={}){const c=s.trim().toLowerCase();return a.filter(d=>{const u=!c||d.title.toLowerCase().includes(c),r=t==="all"||d.categorySlug===t,m=o==="all"||d.year!==null&&d.year!==void 0&&d.year===Number(o);return u&&r&&m})}function ve(a){const s=new Map,t=[];for(const o of a){const c=o.categorySlug||"sem-categoria";s.has(c)||(s.set(c,{slug:c,title:o.category||"Documentos",documents:[]}),t.push(c)),s.get(c).documents.push(o)}return t.map(o=>{const c=s.get(o);return c.documents.sort((d,u)=>d.year===null&&u.year===null?0:d.year===null?1:u.year===null?-1:u.year-d.year),c}).filter(o=>o.documents.length>0)}function he(a){const s=a.map(t=>t.year).filter(t=>t!=null&&!Number.isNaN(Number(t)));return[...new Set(s)].sort((t,o)=>o-t)}function we(a){const s=new Map;for(const t of a)t.categorySlug&&!s.has(t.categorySlug)&&s.set(t.categorySlug,{slug:t.categorySlug,name:t.category});return[...s.values()]}function ke(a){return a.find(s=>s.featured)??a[0]??null}const $e={class:"overflow-x-hidden bg-white"},Se={key:0,id:"documentos",class:"sticky top-0 z-30 bg-white/95 backdrop-blur-sm border-b border-adbLine shadow-sm"},De={class:"container-adb py-4"},Ce={key:1,class:"py-16 max-md:py-10","aria-busy":"true","aria-label":"Carregando documentos"},Fe={class:"container-adb"},Me={class:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 md:gap-5"},Te={key:2,class:"py-28 max-md:py-20 flex flex-col items-center justify-center text-center",role:"alert"},Oe={class:"text-sm text-adbMuted max-w-[340px] mb-7 leading-relaxed"},je={key:0,class:"space-y-0"},ze={key:1,class:"py-28 max-md:py-20 flex flex-col items-center justify-center text-center",role:"status","aria-live":"polite"},Be={class:"py-[80px] max-md:py-[60px] bg-adbSand border-t border-adbLine","aria-label":"Contato sobre documentos"},Ae={class:"container-adb text-center"},Ne={__name:"TransparenciaView",setup(a){B("Transparência | Amigos do Bem","Acesse os documentos institucionais, relatórios financeiros, atas e demonstrativos de transparência dos Amigos do Bem.");const s=f([]),t=f(!0),o=f(null),c=f(""),d=f("all"),u=f("all");async function r(){t.value=!0,o.value=null;try{s.value=await xe()}catch(k){o.value=k.message??"Erro desconhecido."}finally{t.value=!1}}A(r);const m=y(()=>ke(s.value)),M=y(()=>he(s.value)),T=y(()=>we(s.value)),C=y(()=>{const k=ye(s.value,{search:c.value,categorySlug:d.value,year:u.value});return ve(k)});function O(){c.value="",d.value="all",u.value="all"}return(k,i)=>(n(),l("main",$e,[h(q,{"featured-document":m.value},null,8,["featured-document"]),!t.value&&!o.value?(n(),l("div",Se,[e("div",De,[h(W,{search:c.value,"onUpdate:search":i[0]||(i[0]=p=>c.value=p),categorySlug:d.value,"onUpdate:categorySlug":i[1]||(i[1]=p=>d.value=p),year:u.value,"onUpdate:year":i[2]||(i[2]=p=>u.value=p),years:M.value,categories:T.value},null,8,["search","categorySlug","year","years","categories"])])])):b("",!0),t.value?(n(),l("div",Ce,[(n(),l(x,null,w(2,p=>e("div",{key:p,class:"mb-16"},[e("div",Fe,[i[4]||(i[4]=e("div",{class:"mb-7 space-y-2"},[e("div",{class:"h-3 w-24 bg-adbSandDark rounded animate-pulse"}),e("div",{class:"h-8 w-72 bg-adbSandDark rounded animate-pulse"})],-1)),e("div",Me,[(n(),l(x,null,w(5,S=>e("div",{key:S,class:"animate-pulse"},[...i[3]||(i[3]=[e("div",{class:"aspect-[3/4] rounded-xl bg-adbSandDark mb-3"},null,-1),e("div",{class:"h-3 w-1/3 bg-adbSandDark rounded mb-2"},null,-1),e("div",{class:"h-4 w-full bg-adbSandDark rounded mb-1.5"},null,-1),e("div",{class:"h-3 w-2/3 bg-adbSandDark rounded"},null,-1)])])),64))])])])),64))])):o.value?(n(),l("div",Te,[i[6]||(i[6]=e("div",{class:"w-16 h-16 rounded-2xl bg-adbOrangeSoft flex items-center justify-center mb-5","aria-hidden":"true"},[e("i",{class:"fa-solid fa-triangle-exclamation text-2xl text-adbOrange"})],-1)),i[7]||(i[7]=e("p",{class:"font-bold text-adbText mb-2 text-lg"},"Erro ao carregar documentos",-1)),e("p",Oe,g(o.value),1),e("button",{type:"button",class:"inline-flex items-center gap-2 px-6 py-3 rounded-button font-bold text-sm text-white bg-adbOrange hover:bg-adbOrangeDark transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-adbOrange",onClick:r},[...i[5]||(i[5]=[e("i",{class:"fa-solid fa-rotate-right w-4 h-4","aria-hidden":"true"},null,-1),v(" Tentar novamente ",-1)])])])):(n(),l(x,{key:3},[C.value.length>0?(n(),l("div",je,[(n(!0),l(x,null,w(C.value,(p,S)=>(n(),F(be,{key:p.slug,title:p.title,documents:p.documents,class:N(S%2===0?"py-16 max-md:py-10 bg-white":"py-16 max-md:py-10 bg-adbSand")},null,8,["title","documents","class"]))),128))])):(n(),l("div",ze,[i[8]||(i[8]=L('<div class="w-16 h-16 rounded-2xl bg-adbSand flex items-center justify-center mb-5" aria-hidden="true"><svg class="w-8 h-8 text-adbMuted" fill="none" stroke="currentColor" stroke-width="1.6" viewBox="0 0 24 24">
1<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg></div><p class="font-bold text-adbText mb-1">Nenhum documento encontrado</p><p class="text-sm text-adbMuted max-w-[260px] mb-6">Tente ajustar os filtros ou a busca.</p>',3)),e("button",{type:"button",class:"text-sm font-bold text-adbOrange underline underline-offset-2 hover:text-adbOrangeDark focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-adbOrange",onClick:O}," Limpar filtros ")]))],64)),e("section",Be,[e("div",Ae,[i[10]||(i[10]=e("p",{class:"text-eyebrow uppercase text-adbOrange mb-3"},"Dúvidas?",-1)),i[11]||(i[11]=e("h2",{class:"text-title-sm m-0 mb-4"},"Fale com a Nossa Equipe",-1)),i[12]||(i[12]=e("p",{class:"text-adbMuted text-lg leading-relaxed max-w-[500px] mx-auto mb-8"}," Caso não encontre algum documento ou tenha dúvidas sobre as informações publicadas, entre em contato. ",-1)),h(D,{variant:"primary",size:"lg",href:"mailto:[email protected]","aria-label":"Enviar e-mail para [email protected]"},{default:$(()=>[...i[9]||(i[9]=[e("i",{class:"fa-solid fa-envelope","aria-hidden":"true"},null,-1),v(" [email protected] ",-1)])]),_:1})])])]))}};export{Ne 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.