PageSourceSearch

https://cianjurkab.go.id/assets/DetailInformasi-DBJ2KRPw.js

js cianjurkab.go.id collected 2026-10-02 05:12:15 UTC 6,253 bytes, 1 lines download raw bytes

1import{j as e,S,b as o,f as T,c as L,i as z,h as C,k as d}from"./index-CTCCZ3cj.js";import{R as I,b as c,_ as A,a4 as E,q as F,a5 as U,X as B}from"./icons-vendor-g5_cZw3I.js";import{c as _,u as K,L as M}from"./router-vendor-D69GvUnw.js";import{f as O}from"./formatSlug-CD7WimhG.js";import{g as G}from"./news.service-0-aF-Ty-.js";/* empty css                 */import{p as R}from"./index-Cob00amZ.js";import{P as q}from"./PageLayout-BR0Jt7eH.js";import{P as w}from"./PdfViewerComponent-Do3z-J4Y.js";import"./pdf-vendor-VwBuNVfd.js";import"./utils-vendor-B9ygI19o.js";const x=r=>typeof r=="string"&&r.toLowerCase().includes(".pdf"),H=()=>{const r=_(),v=K(),y=O(r.slug),[a,D]=c.useState(null),[m,p]=c.useState(!0),[h,u]=c.useState(null);c.useEffect(()=>{let t=!0;return p(!0),G().then(s=>{if(!t||!Array.isArray(s))return;const i=s.find(l=>l.slug===r.slug);D(i||null),p(!1)}),()=>{t=!1}},[r.slug]);const g=(()=>{if(!a)return null;const t="https://cianjurkab.go.id",s=v.pathname;let i,l;s.includes("/informasi-penting/")?(l="Informasi Penting",i=`${t}/informasi-penting/${r.slug}`):s.includes("/layak-anak/")?(l="Layak Anak",i=`${t}/layak-anak/${r.slug}`):s.includes("/apbd/")?(l="APBD",i=`${t}/apbd/${r.slug}`):(l="Informasi",i=`${t}${s}`);const k=a.thumbnail?.[0]?.url?`https://editor.cianjurkab.go.id${a.thumbnail[0].url}`:`${t}/cianjur.png`,N=L(a.DeskripsiBaru||a.Title),P=z(a.DeskripsiBaru,a.Title,l.toLowerCase());return{title:`${a.Title} - Pemerintah Kabupaten Cianjur`,description:N,keywords:P,image:k,url:i,canonicalUrl:i,type:"article",publishedTime:d(a.tgl_tayang),modifiedTime:d(a.updatedAt),structuredData:C({title:a.Title,description:N,image:k,publishedTime:d(a.tgl_tayang),modifiedTime:d(a.updatedAt),url:i,category:l})}})(),$=[...a?.thumbnail||[],...a?.Gambar||[]],n=a?.thumbnail?.[0]?.url?`https://editor.cianjurkab.go.id${a.thumbnail[0].url}`:null,f=n&&x(n),b=(a?.Gambar||[]).filter(t=>t.url&&!x(t.url)),j=$.filter(t=>t.url&&x(t.url));return e.jsxs(e.Fragment,{children:[g&&e.jsx(S,{...g}),e.jsx(q,{from:"Informasi",title:y,children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[e.jsx("div",{className:"bezel-shell p-2",children:e.jsxs("div",{className:"bezel-core p-6 sm:p-10 space-y-8",children:[e.jsxs("div",{className:"space-y-4 border-b border-slate-100 dark:border-zinc-800/80 pb-6",children:[e.jsx("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 text-xs font-bold uppercase tracking-wider",children:a?.categories?.[0]?.Name||"Informasi Publik"}),m?e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{height:36}),e.jsx(o,{height:20,width:"40%"})]}):e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-extrabold tracking-tight text-slate-900 dark:text-white leading-snug",children:a?.Title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs font-semibold text-slate-500 dark:text-slate-400 pt-1",children:[a?.tgl_tayang&&e.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400",children:[e.jsx(A,{className:"w-4 h-4"}),e.jsx("span",{children:T(a.tgl_tayang)})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(E,{className:"w-4 h-4"}),e.jsx("span",{children:"Pemerintah Kabupaten Cianjur"})]})]})]})]}),m?e.jsx(o,{height:450,className:"rounded-2xl"}):f?e.jsx(w,{fileUrl:n,title:a?.Title||"Dokumen Publik",height:650}):n&&e.jsx("div",{className:"rounded-2xl overflow-hidden shadow-lg border border-slate-100 dark:border-zinc-800 bg-slate-950",children:e.jsx("img",{src:n,alt:a?.Title,className:"w-full h-auto max-h-[500px] object-cover",loading:"eager"})}),m?e.jsx(o,{count:6,className:"my-2"}):a?.DeskripsiBaru&&e.jsx("div",{className:"prose dark:prose-invert max-w-none text-slate-700 dark:text-slate-300 text-sm sm:text-base leading-relaxed space-y-4 pt-2",children:R(a.DeskripsiBaru)}),j.length>0&&!f&&e.jsxs("div",{className:"pt-6 border-t border-slate-100 dark:border-zinc-800/80 space-y-4",children:[e.jsx("h3",{className:"text-sm font-extrabold uppercase tracking-wider text-slate-900 dark:text-white",children:"Lampiran Dokumen PDF"}),e.jsx("div",{className:"space-y-6",children:j.map((t,s)=>e.jsx(w,{fileUrl:`https://editor.cianjurkab.go.id${t.url}`,title:t.name||`Dokumen Lampiran Informasi ${s+1}`,height:550},`info-pdf-${s}`))})]}),b.length>
10&&e.jsxs("div",{className:"pt-8 border-t border-slate-100 dark:border-zinc-800/80 space-y-4",children:[e.jsx("h3",{className:"text-sm font-extrabold uppercase tracking-wider text-slate-900 dark:text-white",children:"Galeri Dokumentasi"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:b.map((t,s)=>e.jsxs("div",{onClick:()=>u(`https://editor.cianjurkab.go.id${t.url}`),className:"aspect-[4/3] rounded-xl overflow-hidden cursor-pointer group relative border border-slate-100 dark:border-zinc-800",children:[e.jsx("img",{src:`https://editor.cianjurkab.go.id${t.url}`,alt:t.alternativeText||"Dokumentasi",className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500",loading:"lazy"}),e.jsx("div",{className:"absolute inset-0 bg-black/30 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center text-white",children:e.jsx(F,{className:"w-5 h-5"})})]},`info-img-${s}`))})]}),e.jsx("div",{className:"pt-8 border-t border-slate-100 dark:border-zinc-800",children:e.jsxs(M,{to:"/",className:"inline-flex items-center gap-2 text-xs font-bold text-emerald-600 dark:text-emerald-400 hover:underline",children:[e.jsx(U,{className:"w-4 h-4"}),e.jsx("span",{children:"Kembali ke Beranda"})]})})]})}),h&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/90 backdrop-blur-xl animate-in fade-in-50 duration-200",onClick:()=>u(null),children:e.jsxs("div",{className:"relative max-w-5xl max-h-[90vh]",onClick:t=>t.stopPropagation(),children:[e.jsx("button",{onClick:()=>u(null),className:"absolute -top-12 right-0 p-2 text-white/80 hover:text-white",children:e.jsx(B,{className:"w-6 h-6"})}),e.jsx("img",{src:h,alt:"Enlarged view",className:"max-w-full max-h-[85vh] rounded-2xl shadow-2xl object-contain"})]})})]})})]})},ie=I.memo(H);export{ie 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.