1import{j as e,r as o,u as g}from"./app-DbGQ5MZF.js";import{c,N as f,S as y,F as b}from"./Navigation-BZjJCI-9.js";import{A as N}from"./arrow-right-DPr1iTcs.js";import{P as j}from"./PageHeader-DrJpso56.js";import{u as w,g as v,S as k}from"./useSeo-DN5qwNeC.js";/* empty css */const S=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],_=c("file-text",S);const C=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],F=c("newspaper",C);const H=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],L=c("play",H);const P=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],M=c("star",P);const $=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],D=c("video",$);function I(a){return a?new Date(a).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}):"Recently"}function x(a){if(a.excerpt)return a.excerpt;const t=a.body?.replace(/<[^>]*>/g,"").trim();return t?t.length>160?`${t.substring(0,160)}...`:t:""}function z(a){return a.url||a.pdf_url||null}function V(a){if(!a)return!1;try{const t=new URL(a),s=t.hostname.replace(/^www\./,"").toLowerCase();return s==="youtube.com"||s==="m.youtube.com"||s==="youtu.be"?s==="youtu.be"?t.pathname.replace(/\/$/,"").length>1:/^\/(watch|embed|shorts|live)(\/|\?|$)/.test(t.pathname):!1}catch{return!1}}function m(a){return a.map(t=>({item:t,href:z(t)})).filter(t=>t.href!==null)}function E({isPdf:a}){return e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-semibold text-pncc-cyan",children:[e.jsx("span",{children:"Read Full Story"}),e.jsx(N,{className:"h-4 w-4 shrink-0 transition-transform group-hover:translate-x-1","aria-hidden":"true"}),a&&e.jsx("span",{className:"sr-only",children:"(opens a PDF in a new tab)"})]})}function R(){return e.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-semibold text-pncc-cyan",children:[e.jsx("span",{children:"See Video"}),e.jsx(L,{className:"h-4 w-4 shrink-0 transition-transform group-hover:translate-x-1","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"(opens a YouTube video in a new tab)"})]})}function T(){return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-pncc-cyan/10 px-2 py-0.5 text-[10px] font-black tracking-widest text-pncc-cyan",children:[e.jsx(_,{className:"h-3 w-3","aria-hidden":"true"}),"PDF"]})}function Y(){return e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-pncc-cyan/10 px-2 py-0.5 text-[10px] font-black tracking-widest text-pncc-cyan",children:[e.jsx(D,{className:"h-3 w-3","aria-hidden":"true"}),"VIDEO"]})}function A({news:a,href:t}){const[s,n]=o.useState(!!a.image_url),r=t===a.pdf_url,l=V(t),d="group flex cursor-pointer flex-col overflow-hidden rounded-2xl bg-white ring-1 ring-gray-200 transition-all duration-300 hover:-translate-y-1 hover:shadow-xl hover:ring-pncc-cyan/30 focus-visible:ring-2 focus-visible:ring-pncc-cyan focus-visible:outline-none",i=e.jsxs(e.Fragment,{children:[s&&e.jsx("div",{className:"relative h-44 w-full overflow-hidden bg-pncc-light-bg",children:e.jsx("img",{src:a.image_url,alt:"",loading:"lazy",onError:()=>n(!1),className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"})}),e.jsxs("div",{className:"flex flex-1 flex-col gap-3 p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-semibold tracking-wide text-gray-500 uppercase",children:[e.jsx("span",{children:I(a.date_published)}),r&&e.jsx(T,{}),l&&e.jsx(Y,{}),!!a.featured&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-pncc-yellow px-2 py-0.5 text-[10px] font-black tracking-widest text-pncc-navy",children:[e.jsx(M,{className:"h-3 w-3 fill-pncc-navy text-pncc-navy","aria-hidden":"true"}),"Featured"]})]}),e.jsx("h3",{className:"line-clamp-3 text-lg leading-snug font-bold text-pncc-navy transition-colors group-hover:text-pncc-cyan",children:a.title}),x(a)&&e.jsx("p",{className:"line-clamp-3 text-sm leading-relaxed text-gray-600",children:x(a)}),e.jsx("div",{className:"mt-auto pt-2",children:l?e.jsx(R,{}):e.jsx(E,{isPdf:r})})]})]});return e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:d,children:i})}function B(){return e.jsxs("div",{className:"flex flex-col gap-3 rounded-2xl bg-white p-6 ring-1 ring-gray-200",children:[e.jsx("div",{className:"h-3 w-28 animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-5 w-full animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"h-5 w-2/3 animate-pulse rounded bg-gray-200"}),e.jsx("div",{className:"mt-2 h-3 w-full animate-pulse rounded bg-gray-100"}),e.jsx("div",{className:"h-3 w-5/6 animate-pulse rounded bg-gray-100"}),e.jsx("div",{className:"mt-4 h-4 w-32 animate-pulse rounded bg-gray-200"})]})}function O(){return e.jsxs("div",{className:"mx-auto max-w-2xl rounded-3xl border border-pncc-cyan/10 bg-pncc-light-bg px-6 py-16 text-center",children:[e.jsx("div",{className:"mb-5 flex justify-center",children:e.jsx("div",{className:"rounded-full bg-pncc-cyan/10 p-4",children:e.jsx(F,{className:"h-8 w-8 text-pncc-cyan","aria-hidden":"true"})})}),e.jsx("h3",{className:"text-xl font-bold text-pncc-navy",children:"No news just yet"}),e.jsx("p",{className:"mt-3 text-gray-600",children:"There are no announcements published at the moment. New press releases and updates from PNCC will appear here as soon as they are released."})]})}function u(a){const t="mx-auto grid w-full gap-6 lg:gap-8";return a===1?`${t} max-w-sm grid-cols-1`:a===2?`${t} max-w-3xl grid-cols-1 md:grid-cols-2`:`${t} grid-cols-1 md:grid-cols-2 lg:grid-cols-3`}function q({news:a,isLoading:t}){const s=m(a);return t?e.jsx("div",{className:u(6),"aria-busy":"true","aria-label":"Loading news",children:Array.from({length:6}).map((n,r)=>e.jsx(B,{},r))}):s.length===0?e.jsx(O,{}):e.jsx("div",{className:u(s.length),children:s.map(({item:n,href:r})=>e.jsx(A,{news:n,href:r},n.id))})}function W(){const{props:a}=g(),t=a.seo,s=w(t),n=[v("Organization",{name:"Palau National Communications Corporation",url:"https://www.pnccpalau.com"})],r=[{label:"Home",href:"/"},{label:"News",className:"text-black"}
1],[l,d]=o.useState([]),[i,p]=o.useState(!0);o.useEffect(()=>{d(a.news??[]),p(!1)},[a.news]);const h=m(l).length>0;return e.jsxs(e.Fragment,{children:[e.jsx(k,{seo:s,structuredData:n}),e.jsxs("div",{className:"flex min-h-screen flex-col bg-white",children:[e.jsx(f,{}),e.jsxs("main",{className:"flex-1 pb-20",children:[e.jsx(j,{title:"News",breadcrumbItems:r}),e.jsx("section",{className:"bg-linear-to-b from-pncc-cyan/5 to-white py-6 lg:py-20",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[(i||h)&&e.jsxs("div",{className:"mb-10 text-center",children:[e.jsx("h2",{className:"text-3xl font-bold tracking-tight text-pncc-navy sm:text-4xl",children:"Latest News"}),e.jsx("p",{className:"mt-4 text-lg text-gray-600",children:"Stay updated with the latest announcements and stories from PNCC."})]}),e.jsx(q,{news:l,isLoading:i})]})}),e.jsxs("div",{className:"mx-auto max-w-7xl px-4 py-30 text-center sm:px-6 lg:px-0",children:[e.jsx("p",{className:"mb-5 text-3xl font-bold",children:"For more news and updates, visit our"}),e.jsx(y,{href:"https://www.facebook.com/connectingpalau",iconSrc:"/images/icons/facebook-blue.svg",platform:"Facebook",className:"opacity-100 hover:text-blue-700 hover:opacity-70",size:"sm",label:"PNCC Facebook Page",showLabel:!0,textSize:"xl"})]})]}),e.jsx(b,{})]})]})}export{W 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.