PageSourceSearch

https://citiesabc.com/_next/static/chunks/adb988f050c6a251.js

js citiesabc.com collected 2026-10-02 07:41:09 UTC 30,189 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87316,e=>{"use strict";let t=(0,e.i(475254).default)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["Calendar",()=>t],87316)},96907,39609,e=>{"use strict";e.i(247167);var t=e.i(843476),s=e.i(657688),l=e.i(522016),a=e.i(87316);let r=(0,e.i(475254).default)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);var i=e.i(975157),n=e.i(234913);function o({post:e,className:o="",priority:c=!1}){let d=(0,i.formatDateEnGbUtc)(e.publishedDate||e.publishedAt,{day:"numeric",month:"long",year:"numeric"}),h=[e.post_author?.name,...(e.other_authors||[]).map(e=>e.name),...(e.custom_authors||[]).map(e=>e.author_name)].filter(Boolean),{cardGradientColor:m}=(0,n.useAppContext)(),u="https://hel1.your-objectstorage.com/ztudium-cms/post_placeholder_d23a2725c7.jpg",x=(e=>{if(!e||"string"!=typeof e)return u;let t=e.trim();if(!t||t.includes("article_temp1"))return u;try{if(t.startsWith("http://")||t.startsWith("https://"))return new URL(t),t;if(t.startsWith("undefined"))return u;let e=t.startsWith("/")?t:`/${t.replace(/^\/+/,"")}`;return new URL(e,"https://citiesabc.com"),e}catch{return u}})(e.featureImageUrl||e.imageMedium||u);return(0,t.jsx)("div",{className:`group relative h-full rounded-2xl border border-white/10 overflow-hidden bg-black/40 ${o}`,children:(0,t.jsx)(l.default,{href:`/${e.slug}`,className:"block h-full",children:(0,t.jsxs)("div",{className:"relative h-[210px] sm:h-[230px] md:h-[260px] w-full",children:[(0,t.jsx)(s.default,{fill:!0,src:x,alt:e.title,priority:c,loading:c?"eager":"lazy",sizes:"(max-width: 768px) 100vw, (max-width: 1280px) 50vw, 400px",className:"object-cover transition-transform duration-500"}),(0,t.jsx)("div",{className:"absolute inset-0 z-20 pointer-events-none bg-black/40 opacity-60 group-hover:opacity-20 transition-opacity duration-500"}),(0,t.jsxs)("div",{className:"absolute inset-x-0 bottom-0 z-30 px-4 sm:px-5 pb-4 sm:pb-5 pt-16 space-y-3",style:{background:`linear-gradient(to bottom, transparent 0%, ${m||"black"} 40%)`},children:[(0,t.jsx)("h3",{className:"text-sm sm:text-base md:text-md leading-snug text-white line-clamp-2",children:e.title}),(0,t.jsxs)("div",{className:"flex text-xs md:flex-wrap items-center gap-x-4 gap-y-1 text-sm text-white/80",children:[d&&(0,t.jsxs)("div",{className:"flex items-center gap-1 sm:gap-2 whitespace-nowrap",children:[(0,t.jsx)(a.Calendar,{className:"h-3 w-3 sm:h-4 sm:w-4"}),(0,t.jsx)("span",{children:d})]}),h.length>0&&(0,t.jsxs)("div",{className:"flex items-start text-xs gap-1 sm:gap-2",children:[(0,t.jsx)(r,{className:"h-3 w-3 sm:h-4 sm:w-4 shrink-0 mt-0.5"}),(0,t.jsx)("div",{className:"flex flex-col",children:h.map((e,s)=>(0,t.jsx)("span",{children:e},s))})]})]})]})]})})})}e.s(["default",()=>o],96907);let c={md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)"};function d(){return window.matchMedia(c.xl).matches?"xl":window.matchMedia(c.lg).matches?"lg":window.matchMedia(c.md).matches?"md":"sm"}function h(e){let t=()=>e(d()),s=Object.values(c).map(e=>window.matchMedia(e));return s.forEach(e=>{e.addEventListener("change",t)}
1),()=>{s.forEach(e=>{e.removeEventListener("change",t)})}}function m(e){return"md"===e?2:"lg"===e?3:4}function u(e){return"md"===e?1:2}function x(e,t){let s=Math.min(Math.max(0,t),4),l=Math.max(0,4-s);return s*u(e)+l*m(e)}function g(e,t,s){return s<=0?0:function(e){let t=0;for(let s=0;s<e.length;s++)t=31*t+e.charCodeAt(s)|0;return Math.abs(t)}(`${t}:row:${e}`)%(s+1)}function p(e,t,s){let l=m(t);return Array.from({length:s},(t,s)=>{let a=s*l,r=Math.min(l,Math.max(0,e.length-a)),i=e.slice(a,a+r).map(e=>e.slug).join("|")||`empty-${s}`;return g(s,i,Math.max(0,r-1))})}e.s(["SSR_SCREEN_SIZE",0,"xl","computeGridLargeItemPositions",()=>p,"getBannerRowPostsConsumed",()=>u,"getDeterministicLargeItemPosition",()=>g,"getInitialGridPostCount",()=>x,"getPostsPerRow",()=>m,"resolveScreenSizeFromViewport",()=>d,"subscribeScreenSize",()=>h],39609)},299547,e=>{"use strict";var t=e.i(843476),s=e.i(677842),l=e.i(693655),a=e.i(424083),r=e.i(555436),i=e.i(37727),n=e.i(618566),o=e.i(271645);function c({href:e,className:s,style:l,children:a}){let r=(0,n.useRouter)(),[i,c]=(0,o.useTransition)();return(0,t.jsx)("a",{href:e,onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||(t.preventDefault(),c(()=>{r.push(e)}))},className:`${s} touch-manipulation ${i?"opacity-70 pointer-events-none":""}`,style:l,"aria-busy":i,children:a})}var d=e.i(234913);function h({title:e}){let{paddingXClass:s,contentWidthClass:l}=(0,d.useAppContext)();return(0,t.jsx)("div",{className:"w-full text-white z-30 mt-10",children:(0,t.jsx)("div",{className:`${l} ${s}`,children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 mb-6 lg:mb-2",children:(0,t.jsx)("h2",{className:"text-xl lg:text-2xl font-bold",children:e})}),(0,t.jsx)("div",{className:"min-h-[500px] flex items-center justify-center py-20",children:(0,t.jsxs)("div",{className:"text-center h-full",children:[(0,t.jsx)("div",{className:"text-gray-400 text-lg mb-2",children:"No categories selected"}),(0,t.jsx)("div",{className:"text-gray-500 text-sm",children:"Please select one or more categories to view posts"})]})})]})})})})}var m=e.i(96907),u=e.i(657688),x=e.i(522016);function g({card:e,className:s="",isFirst:l=!1}){let{appCode:a,themeColor:r}=(0,d.useAppContext)(),i=e?.background?.formats?.large?.url||e?.background?.formats?.medium?.url||e?.background?.url||"",n=e?.main_cta_url?e.main_cta_url.startsWith("http")||e.main_cta_url.startsWith("/")?e.main_cta_url:`https://${e.main_cta_url}`:void 0,o="impakt"===a?"from-[#14532d] via-[#166534] to-[#15803d]":"from-[#0040C1] via-[#3E1C96] to-[#1F235B]";return(0,t.jsxs)("div",{className:`relative group h-full ${s}`,children:[(0,t.jsx)("span",{className:`absolute -inset-x-1 -inset-y-1 rounded-md blur-sm opacity-60 transition-opacity duration-300 pointer-events-none group-hover:opacity-100 ${r?"":`bg-gradient-to-r ${o}`}`,style:r?{backgroundColor:r}:void 0}),(0,t.jsxs)("div",{className:"relative overflow-hidden rounded-md bg-gradient-to-br from-slate-800 to-slate-900 h-full w-full min-h-[260px]",children:[i?(0,t.jsx)(u.default,{src:i,alt:e.headline_title||"Banner",fill:!0,priority:!0,className:"object-cover",onError:e=>{console.error("Image failed to load:",i),e.currentTarget.style.display="none"}}):(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center text-white/50",children:(0,t.jsx)("span",{children:"No image available"})}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/50 to-transparent"}),n&&(0,t.jsx)(x.default,{href:n,target:`_${e?.main_cta_target}`||"_self",className:"absolute inset-0 z-10","aria-label":e.headline_title||"View details"}),(0,t.jsx)("div",{className:"absolute inset-0 p-6 flex flex-col justify-end",children:(0,t.jsxs)("div",{className:"flex justify-between items-end gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 flex-1 text-white",children:[e?.headline_title&&(0,t.jsx)("h3",{className:"text-xl font-semibold leading-tight text-white drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)]",children:e.headline_title}),e?.headline_subtitle&&(0,t.jsx)("p",{className:"text-sm text-white/80 line-clamp-3 drop-shadow-[0_1px_3px_rgba(0,0,0,0.85)]",children:e.headline_subtitle})]}),e?.main_cta_url&&(0,t.jsxs)("div",{className:"flex-shrink-0 group relative z-20",children:[(0,t.jsx)("span",{className:`absolute -inset-x-1 -inset-y-1 rounded-full blur-sm op
1acity-60 transition-opacity duration-300 pointer-events-none group-hover:opacity-100 ${r?"":`bg-gradient-to-r ${o}`}`,style:r?{backgroundColor:r}:void 0}),(0,t.jsx)(x.default,{href:n,target:`_${e?.main_cta_target}`||"_self",className:`relative z-10 inline-flex whitespace-nowrap items-center rounded-full px-4 py-2 text-sm text-white transition ${r?"hover:opacity-90":"bg-white/10 hover:bg-white/20"}`,style:r?{backgroundColor:r}:void 0,children:e?.main_cta_label||"Explore"})]})]})})]})]})}var p=e.i(634966);function f({apiEndpoint:e="/api/posts",initialPosts:s=[],themeColor:l}){let[a,r]=(0,o.useState)(null),[i,n]=(0,o.useState)(s||[]),[c,h]=(0,o.useState)(0===s.length),[m,u]=(0,o.useState)(!1),{isLightmode:g,postsTheme:f}=(0,d.useAppContext)(),b="light"===f||"dark"!==f&&g;if((0,o.useEffect)(()=>{u(!0)},[]),(0,o.useEffect)(()=>{if(s.length>0){n(s),h(!1);return}(async()=>{try{let t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:1,pageSize:12,categories:["first_page"],sort:["published_date:desc"]})});if(!t.ok)return;let s=await t.json();n(s.items||[])}catch(e){console.error("Error fetching first_page posts for carousel:",e)}finally{h(!1)}})()},[e,s]),(0,o.useEffect)(()=>{if(!a)return;let e=setInterval(()=>a.scrollNext(),5e3);return()=>clearInterval(e)},[a]),c)return(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)("div",{className:"-ml-3 flex gap-3 overflow-hidden",children:Array.from({length:4}).map((e,s)=>(0,t.jsx)("div",{className:"pl-3 basis-[85%] shrink-0 sm:basis-[50%] lg:basis-[25%]",children:(0,t.jsx)("div",{className:`h-[120px] animate-pulse rounded-xl ${b?"bg-white border border-gray-200":"bg-black/80 border border-white/10"}`})},`sk-${s}`))})});if(!i||0===i.length)return null;let v=i.map((e,s)=>(0,t.jsx)(p.CarouselItem,{className:"pl-3 basis-[85%] sm:basis-[50%] lg:basis-[25%]",children:(0,t.jsx)(x.default,{href:`/${e.slug}`,className:"block h-full group",children:(0,t.jsxs)("div",{className:`h-full flex flex-col justify-between p-4 transition-all duration-200 ${g?"border border-gray-200 rounded-xl shadow-sm group-hover:shadow-md group-hover:border-gray-300":"rounded-xl border border-white/10"}`,style:{background:b?"white":"rgba(0,0,0,0.8)",...l&&{backgroundImage:`linear-gradient(to top right, ${l}25 0%, transparent 85%)`}},children:[(0,t.jsx)("p",{className:`text-base font-medium leading-snug line-clamp-3 transition-colors duration-200 ${b?"text-gray-700 group-hover:text-gray-900":"text-white"}`,children:e.title}),e.publishedAt&&(0,t.jsx)("p",{className:`mt-3 text-xs ${b?"text-gray-400":"text-white/70"}`,children:e.publishedAt})]})})},e.slug??s));return m?(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(p.Carousel,{opts:{align:"start",loop:!0},setApi:r,className:"w-full",children:(0,t.jsx)(p.CarouselContent,{className:"-ml-3",children:v})})}):(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)("div",{className:"-ml-3 flex gap-3 overflow-hidden",children:i.slice(0,4).map((e,s)=>(0,t.jsx)("div",{className:"pl-3 basis-[85%] shrink-0 sm:basis-[50%] lg:basis-[25%]",children:(0,t.jsx)("div",{className:`h-[120px] rounded-xl p-4 ${b?"border border-gray-200 bg-white":"border border-white/10 bg-black/80"}`,children:(0,t.jsx)("p",{className:`text-base font-medium leading-snug line-clamp-3 ${b?"text-gray-700":"text-white"}`,children:e.title})})},e.slug??s))})})}var b=e.i(186346),v=e.i(39609);function j({title:e,title_color:s,banner_cards:u,showSearch:x,api_endpoint:p,filter_author:j,filter_author_slug:w,categoryOptions:y,showAuthorFilter:N,showCategoryFilter:C,filter_category:k,categories:S,initialPosts:$,carouselPosts:_,initialIsLoading:A,effectiveCategoryOptions:E}){let P,M,I,R,L=($?.length??0)>0||(_?.length??0)>0,[z,T]=(0,o.useState)(!1),[B,O]=(0,o.useState)($||[]),[U,F]=(0,o.useState)([]),[G,D]=(0,o.useState)(!1),[V,W]=(0,o.useState)(0===$.length&&!A),[K,J]=(0,o.useState)(!0),[Z,H]=(0,o.useState)(1),[X,q]=(0,o.useState)(!0),[Q,Y]=(0,o.useState)(()=>(0,v.computeGridLargeItemPositions)($||[],v.SSR_SCREEN_SIZE,8)),[ee,et]=(0,o.useState)([]),[es,el]=(0,o.useState)(!0),[ea,er]=(0,o.useState)(v.SSR_SCREEN_SIZE),[ei,en]=(0,o.useState)(L),[eo,ec]=(0,o.useState)(""),[ed,eh]=(0,o.useState)(!1),[em,eu]=(0,o.useState)(""),[ex,eg]=(0,o.useState)(""),[ep,ef]=(0,o.useState)([]),[eb,ev]=(0,o.useState)([]),[ej,ew]=(0,o.useState)(!1),[ey,eN]=(0,o.useState)(!0),[eC,ek]=(0,o.useState)([]),[eS,e$]=(0,o.useState)([]),[e_,eA]=(0,o.useState)(0),[eE,eP]=(0,o.useState)(!0),[eM,eI]=(0,o.useState)(!1),eR=(0,o.useRef)($.length>0),eL=(0,o.useRef)($||[]),{isLightmode:ez,themeColor:eT,showHighlights:eB,appCode:eO,allResourcesSlug:eU,fontClass:eF,paddingXClass:eG,contentWidthClass:eD,postsTheme:eV,postsTitleTheme:eW}=(0,d.useAppContext)(),eK=(0,n.useRouter)(),eJ="light"===eV||"dark"!==eV&&ez,eZ="businessabc"===eO,eH=(0,o.useMemo)(()=>[...B,...U],[B,U]),eX=u?.length??0,eq=(0,o.useMemo)(()=>{let e=[];
1return eU&&e.push(eU),E.forEach(t=>{let s=t.value.toLowerCase();"first_page"===s||"resources"===s||"all"===s||k&&s===k.toLowerCase()||e.push(`/posts/${encodeURIComponent(t.value)}`)}),e},[eU,E,k]),eQ=(e,t,s)=>(0,v.getDeterministicLargeItemPosition)(e,s,Math.max(0,t-1)),eY=(0,o.useCallback)(()=>(0,v.getInitialGridPostCount)((0,v.resolveScreenSizeFromViewport)(),eX),[eX]),e0=(0,o.useCallback)((e,t)=>{let s=(0,v.getInitialGridPostCount)(t,eX),l=e.slice(0,s),a=e.slice(s);O(l),F([]),e$(a),eN(a.length>0||e.length>=20)},[eX]);(0,o.useLayoutEffect)(()=>{let e=e=>{er(e)};return e((0,v.resolveScreenSizeFromViewport)()),en(!0),(0,v.subscribeScreenSize)(e)},[]),(0,o.useLayoutEffect)(()=>{if(!ei||eb.length>0||0!==e_)return;let e=eL.current;0!==e.length&&e0(e,ea)},[ei,ea,eX,eb.length,e_,e0]),(0,o.useEffect)(()=>{T(!0)},[]),(0,o.useEffect)(()=>{if(!z)return;let e=window.setTimeout(()=>{eq.forEach(e=>{eK.prefetch(e)})},0);return()=>window.clearTimeout(e)},[z,eq,eK]),(0,o.useEffect)(()=>{j&&eg(j)},[j]),(0,o.useEffect)(()=>{Y((0,v.computeGridLargeItemPositions)(eH,ea,8))},[eH,ea]),(0,o.useEffect)(()=>{eP(!0),eI(!1)},[]),(0,o.useEffect)(()=>{!eE&&z&&e1()},[eE,z]);let e1=async()=>{try{let e=await fetch("/api/authors");if(e.ok){let t=await e.json();ef(t.map(e=>({value:e.name,label:e.name})))}}catch(e){console.error("Error fetching authors:",e)}},e2=(0,o.useCallback)(()=>{ev([]),e$([]),eA(0),eN(!0),ek([])},[]),e4=(0,o.useCallback)(()=>{!eR.current&&z&&(O([]),F([]),H(1),q(!1),e2(),e3())},[z,e2]);(0,o.useEffect)(()=>{let e=setTimeout(()=>{eu(eo),!eR.current&&z&&e4()},500);return()=>clearTimeout(e)},[eo,z,e4]);let e3=async()=>{W(!0),D(!0);let e=eY();try{let t=(ex||j||"").trim().replace(/\s+/g," "),s=[],l=es?E.map(e=>e.value):ee;k&&s.push(k);let a=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:1,pageSize:e,categories:l,excludeCategories:s.length>0?s:void 0,sort:["published_date:desc"],...em&&{search:em},...w?{filterByAuthorSlug:w}:t?{filterByAuthorName:t}:{},...eZ&&{includeUncategorized:!0}})});if(!a.ok)throw Error(`API error: ${a.status}`);let r=await a.json();if(r&&r.items&&r.items.length>0){eL.current=r.items,H(1),q(!1),e2(),e0(r.items,ea);let e=(0,v.getPostsPerRow)(ea),t=Math.min(4,Math.ceil(Math.min(r.items.length,(0,v.getInitialGridPostCount)(ea,eX))/e)),s=Array.from({length:t},(t,s)=>{let l=s*e,a=Math.min(e,Math.max(0,r.items.length-l)),i=r.items.slice(l,l+a).map(e=>e.slug).join("|");return eQ(s,a,i)});Y(s)}else eL.current=[],O([]),F([]),q(!1),e2()}catch(e){O([]),q(!1)}finally{W(!1),D(!1),K&&J(!1)}},e5=e=>{et(t=>{if(es){el(!1);let t=[e];return e4(),t}if(t.includes(e)){let s=t.filter(t=>t!==e);return 0===s.length&&el(!0),e4(),s}{let s=[...t,e];return e4(),s}})},e6=!es&&ee.length>0&&ee.length<E.length,e8=()=>{es?el(!1):el(!0),et([]),e4()},e7=(0,o.useCallback)(e=>{ec(e)},[]),e9=(0,o.useCallback)(()=>{ec(""),eu("")},[]),te=(0,o.useCallback)(e=>{eg("all"===e?"":e),e4()},[e4]),tt=()=>es?"All Categories":0===ee.length?"Please select a category":1===ee.length?"1 category selected":`${ee.length} categories selected`,ts=async()=>{ew(!0);let e=(0,v.getPostsPerRow)(ea),t=4*e,s=new Set([...eH.map(e=>e.slug),...eb.map(e=>e.slug)]),l=[...eS],a=e_,r=!0;0===a&&(a=Math.floor((eH.length+eb.length)/t));try{let i=(ex||j||"").trim().replace(/\s+/g," "),n=es?E.map(e=>e.value):ee,o=[];k&&o.push(k);let c=async e=>{let s=await fetch(p,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:e,pageSize:t,categories:n,excludeCategories:o.length>0?o:void 0,sort:["published_date:desc"],...em&&{search:em},...w?{filterByAuthorSlug:w}:i?{filterByAuthorName:i}:{},...eZ&&{includeUncategorized:!0}})});if(!s.ok)throw Error(`API error: ${s.status}`);return s.json()};for(;l.length<t&&r;){a++;let e=await c(a);if(!e?.items?.length){r=!1;break}let i=new Set([...s,...l.map(e=>e.slug)]),n=e.items.filter(e=>!i.has(e.slug));l.push(...n),e.items.length<t&&(r=!1)}let d=l.slice(0,t),h=l.slice(t);if(d.length>0){ev(e=>[...e,...d]),e$(h),eA(a);let t=Math.ceil(d.length/e);ek(s=>[...s,...Array.from({length:t},(t,l)=>{let a=l*e,r=Math.min(e,d.length-a),i=d.slice(a,a+r).map(e=>e.slug).join("|");return eQ(s.length+l,r,i)})])}eN(r||h.length>0)}catch(e){console.error("Error loading more posts:",e)}finally{ew(!1)}};if(!es&&0===ee.length)return(0,t.jsx)(h,{title:e,categoryOptions:E,selectedCategories:ee,isAllSelected:es,isSomeSelected:e6,handleSelectAll:e8,handleCategoryToggle:e5,getDropdownText:tt});if(eM||!ei&&!L||K&&V){let e,s;return(0,t.jsx)("div",{className:`${eD} w-full ${eG} ${eJ?"bg-white text-black":"text-white"} z-10 pt-2`,children:(0,t.jsx)("div",{className:"w-full px-0",children:(e=eJ?"border border-gray-200 bg-gray-100":"border border-white/10 bg-white/5",s=eJ?"border border-gray-200 bg-gray-100":"bg-white/5",(0,t.jsxs)("div",{className:"space-y-6",children:[eE&&(0,t.jsxs)("div",{className:"mt-2",children:[(0,t.jsx)("div",{className:`h-5 w-40 rounded mb-3 animate-pulse ${eJ?"bg-gray-200":"bg-white/10"}`}),(0,t.jsx)("div",{className:"flex gap-4 overflow-x-auto scrollbar-hide",children:Array.from({length:4}).map((s,l)=>(0,t.jsx)("div",{className:"w-full flex-1",children:(0,t.jsx)("div",{className:`h-[110px] rounded-md animate-pulse ${e}`})},`carousel-skeleton-${l}`))})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"hidden md:block",children:Array.from({length:4}).map((e,l)=>(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ga
1p-4 mb-4",children:Array.from({length:5}).map((e,a)=>(0,t.jsx)("div",{className:`col-span-1${4===a?" hidden xl:block":""}${3===a?" hidden lg:block":""}${2===a?" hidden md:block":""}`,children:(0,t.jsx)("div",{className:`h-64 w-full rounded-2xl animate-pulse ${s}`})},`skeleton-${l}-${a}`))},`skeleton-row-${l}`))}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:Array.from({length:4}).map((e,l)=>(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)("div",{className:`h-56 w-full rounded-2xl animate-pulse ${s}`})},`mobile-skeleton-${l}`))})})]})]}))})})}return(0,t.jsxs)("div",{className:`${eD} w-full ${eG} ${eJ?"bg-white text-black":"text-white"} relative z-20 pt-4 ${eF??""}`,children:[(0,t.jsxs)("div",{className:"w-full px-0",children:[(0,t.jsxs)("div",{className:"flex flex-col mb-2 md:flex-row md:items-center gap-2",children:[eE&&(0,t.jsx)("p",{className:`${!s&&!eW?eJ?"text-black":"text-white":""} text-xl lg:text-2xl font-semibold mb-2`,style:eW&&eT?{color:eT}:s?{color:s}:void 0,children:e}),!eE&&x&&(0,t.jsxs)("div",{className:"relative flex-grow max-w-md",children:[(0,t.jsx)(a.Input,{type:"text",placeholder:"Search posts...",value:eo,onChange:e=>e7(e.target.value),className:`h-10 pl-10 ${eo?"pr-10":"pr-4"} bg-black/30 border-white/10 text-white text-sm placeholder-white/60 focus:outline-none transition-colors ${em?"border-blue-500/50 bg-blue-900/20":""}`}),(0,t.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 left-3 text-white/60 pointer-events-none",children:eo!==em?(0,t.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white/60"}):(0,t.jsx)(r.Search,{size:16})}),eo&&(0,t.jsx)("button",{onClick:e9,className:"absolute top-1/2 -translate-y-1/2 right-3 text-white/60 hover:text-white transition-colors",type:"button",children:(0,t.jsx)(i.X,{size:16})})]}),!eE&&N&&(0,t.jsx)("div",{className:"w-full md:w-[220px] md:flex-shrink-0",children:(0,t.jsxs)(l.Select,{value:ex||"all",onValueChange:te,children:[(0,t.jsx)(l.SelectTrigger,{className:"h-10 bg-black/30 border-white/10 text-white text-sm hover:bg-black/40 transition-colors w-full",children:(0,t.jsx)(l.SelectValue,{placeholder:"All Authors"})}),(0,t.jsxs)(l.SelectContent,{className:"bg-[#1a1a2e] border-white/10 w-[250px]",children:[(0,t.jsx)(l.SelectItem,{value:"all",className:"text-white hover:bg-white/10 focus:bg-white/10 data-[highlighted]:text-white data-[selected]:text-white",children:"All Authors"}),ep.map(e=>(0,t.jsx)(l.SelectItem,{value:e.value,className:"text-white hover:bg-white/10 focus:bg-white/10 data-[highlighted]:text-white data-[selected]:text-white",children:e.label},e.value))]})]})}),!eE&&C&&(0,t.jsx)("div",{className:"w-full md:w-[220px] md:flex-shrink-0",children:(0,t.jsxs)(l.Select,{children:[(0,t.jsx)(l.SelectTrigger,{className:"h-10 bg-black/30 border-white/10 text-white text-sm hover:bg-black/40 transition-colors w-full",children:(0,t.jsx)(l.SelectValue,{placeholder:tt()})}),(0,t.jsx)(l.SelectContent,{className:"bg-[#1a1a2e] border-white/10 w-[250px]",children:(0,t.jsxs)("div",{className:"p-2",children:[(0,t.jsxs)("label",{className:"flex items-center space-x-2 text-sm cursor-pointer p-2 hover:bg-white/10 rounded",children:[(0,t.jsx)("input",{type:"checkbox",checked:es,ref:e=>{e&&(e.indeterminate=e6)},onChange:e8,className:"rounded border-white/20 bg-transparent text-blue-500"}),(0,t.jsx)("span",{className:"text-white font-medium",children:"All Categories"})]}),(0,t.jsx)("div",{className:"border-t border-white/10 my-2"}),E.map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-2 text-sm cursor-pointer p-2 hover:bg-white/10 rounded",children:[(0,t.jsx)("input",{type:"checkbox",checked:ee.includes(e.value),onChange:()=>e5(e.value),className:"rounded border-white/20 bg-transparent text-blue-500"}),(0,t.jsx)("span",{className:"text-white",children:e.label})]},e.value))]})})]})})]}),eE&&eB&&(0,t.jsx)("div",{className:"mb-4 -mt-4",children:(0,t.jsx)(f,{apiEndpoint:p,initialPosts:_,themeColor:eT})}),eE&&E&&E.length>0&&(P=E.find(e=>"all"===e.value.toLowerCase()),I=(M=E.filter(e=>{let t=e.value.toLowerCase();return"first_page"!==t&&"resources"!==t&&"all"!==t&&(!k||t!==k.toLowerCase())})).length>10,R=ed||!I?M:M.slice(0,9),(0,t.jsx)("div",{className:"w-full mb-4 overflow-x-auto scrollbar-hide",children:(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 w-max mx-auto",children:[eU&&P&&(0,t.jsx)(c,{href:eU,className:`inline-flex font-semibold shrink-0 items-center justify-center h-12 px-3 py-2 rounded-xl text-xs transition-colors ${eT?"text-white border border-transparent hover:opacity-90":eJ?"bg-white border border-gray-200 text-gray-800 hover:bg-gray-100":"bg-[#111118] border border-[#2C3C4C] text-white hover:bg-[#1A1A24]"}`,style:eT?{backgroundColor:eT}:void 0,children:"All"}),R.map(e=>{let s;return(0,t.jsx)(c,{href:`/posts/${encodeURIComponent(e.value)}`,className:`inline-flex font-semibold shrink-0 items-center justify-center h-12 px-3 py-2 rounded-xl text-xs transition-colors ${eT?"text-white border border-transparent hover:opacity-90":eJ?"bg-white border border-gray-200 text-gray-800 hover:bg-gray-100":"bg-[#111118] border border-[#2C3C4C] text-white hover:bg-[#1A1A24]"}`,style:eT?{backgroundColor:eT}:void 0,children:{"Smart City":"Smart Cities","Safest City":"Safest Cities"}
1[s=(e.label||e.value).split(" ").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")]??s},e.value)}),I&&!ed&&(0,t.jsx)("button",{type:"button",onClick:()=>eh(!0),className:`inline-flex shrink-0 items-center justify-center h-12 px-4 py-2 rounded-xl text-xs font-semibold transition-colors ${ez?"bg-white border border-gray-200 text-gray-500 hover:bg-gray-100 hover:text-gray-800":"bg-[#111118] border border-[#2C3C4C] text-white/80 hover:bg-[#1A1A24] hover:text-white"}`,children:"More"})]})})),V&&!K?(0,t.jsxs)("div",{className:"flex justify-center items-center py-12",children:[(0,t.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-white/60"}),(0,t.jsx)("span",{className:"ml-3 text-white/80",children:"Searching..."})]}):0!==eH.length||K?(0,t.jsxs)(t.Fragment,{children:[(()=>{if(0===eH.length&&(!u||0===u.length))return null;let e=eE&&u&&u.length>0,s=e?u.length:0;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"hidden md:block",children:Array.from({length:4},(l,a)=>{let r=e&&a<s?u[a]:null;if(r)return((e,s,l)=>{let a=0,r=0,i=u&&u[0]===s;for(let t=0;t<e;t++)r+=a="xl"===ea||"lg"===ea?2:"md"===ea?1:2;a="xl"===ea||"lg"===ea?2:"md"===ea?1:2;let n=eH.slice(r,r+a);if(0===n.length&&!s)return null;let o=l>=n.length?0:l;return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 mb-4",children:["xl"===ea?n.slice(0,2).map((s,l)=>(0,t.jsx)("div",{className:l===o?"col-span-1 xl:col-span-2":"col-span-1",children:(0,t.jsx)(m.default,{post:s})},`post-${e}-${l}`)):"lg"===ea?n.slice(0,2).map((s,l)=>(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(m.default,{post:s})},`post-${e}-${l}`)):"md"===ea?n.slice(0,1).map((s,l)=>(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(m.default,{post:s})},`post-${e}-${l}`)):n.slice(0,2).map((s,l)=>(0,t.jsx)("div",{className:l===o?"col-span-2":"col-span-1",children:(0,t.jsx)(m.default,{post:s})},`post-${e}-${l}`)),s&&(0,t.jsx)("div",{className:"col-span-1 sm:col-span-2 lg:col-span-2 xl:col-span-2",children:(0,t.jsx)(g,{card:s,isFirst:i})})]},`row-${e}`)})(a,r,Q[a]||0);{let e=(0,v.getPostsPerRow)(ea),l=0;for(let e=0;e<Math.min(a,s);e++)l+=(0,v.getBannerRowPostsConsumed)(ea);return((e,s,l=!1)=>{let a=(0,v.getPostsPerRow)(ea),r=eH.slice(e,e+a);if(0===r.length&&!l)return null;let i=Array.from({length:a},(e,t)=>r[t]).filter(Boolean);if(0===i.length)return null;let n=s>=i.length?0:s;return(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 mb-4",children:i.map((s,l)=>(0,t.jsx)("div",{className:l===n?"col-span-1 md:col-span-2 xl:col-span-2":"col-span-1",children:(0,t.jsx)(m.default,{post:s})},`post-${e}-${l}`))},`row-${e}`)})(l+=(a-s)*e,Q[a]||0,!0)}})}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:eH.slice(0,8).map((e,s)=>(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(m.default,{post:e})},`mobile-post-${s}`))})})]})})(),(()=>{if(0===eb.length)return null;let e=(0,v.getPostsPerRow)(ea),s=Math.ceil(eb.length/e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"hidden md:block",children:Array.from({length:s},(s,l)=>{let a=l*e,r=eb.slice(a,a+e);if(0===r.length)return null;let i=eC[l]??0,n=i>=r.length?0:i;return(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 mb-4",children:r.map((e,s)=>(0,t.jsx)("div",{className:s===n?"col-span-1 md:col-span-2 xl:col-span-2":"col-span-1",children:(0,t.jsx)(m.default,{post:e})},`extra-post-${l}-${s}`))},`extra-row-${l}`)})}),(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:eb.map((e,s)=>(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(m.default,{post:e})},`mobile-extra-${s}`))})})]})})(),ey&&eH.length>0&&(0,t.jsx)("div",{className:"mt-4 mb-4",children:(0,t.jsx)(b.default,{size:"sm",href:"#",onClick:ts,disabled:ej,text:ej?"Loading...":"Load More"})})]}):(0,t.jsx)("div",{className:"flex justify-center items-center py-12",children:(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("h3",{className:`text-xl font-semibold mb-2 ${ez?"text-black":"text-white"}`,children:"No posts found"})})})]}),eE&&u&&u.length>0&&(0,t.jsxs)("div",{className:"hidden mb-12 mt-0 pt-0",children:[(0,t.jsx)("h3",{className:"text-xl font-bold text-start mb-4",children:"Discover More"}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:u.map((e,s)=>
1(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(g,{card:e})},`mobile-banner-${s}`))})]})]})}function w({isLightmode:e}){return(0,t.jsxs)("button",{onClick:()=>window.history.back(),className:`flex items-center gap-1.5 mb-3 text-sm font-medium transition-colors ${e?"text-gray-500 hover:text-gray-900":"text-white/60 hover:text-white"}`,"aria-label":"Go back",children:[(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M15 18l-6-6 6-6"})}),"Back"]})}function y({title:e="News & Resources",title_color:l,banner_cards:a=[],homepage:r=!1,showSearch:i=!1,api_endpoint:n="/api/posts",filter_author:o="",filter_author_slug:c="",categoryOptions:h=[],showAuthorFilter:m=!0,showCategoryFilter:u=!0,filter_category:x="",categories:g=[],posts:p=[],carouselPosts:f=[],isLoading:b=!1,initialPagination:v}){let{isLightmode:y}=(0,d.useAppContext)(),N=h&&h.length>0?h:(g||[]).map(e=>({value:e,label:e.split(" ").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(" ")}));if(!r){let l=g||[],a=l.length>0,r=a?l[0]:x?decodeURIComponent(x):"all",i=e||r||"News & Resources";return(0,t.jsx)("div",{className:"mt-24 md:mt-8 mb-16",children:(0,t.jsx)(s.default,{initialCategory:r,fixedCategories:a?l:void 0,excludeCategory:a&&x?x:void 0,initialPosts:p,initialPagination:v,categoryOptions:N,title:i,apiEndpoint:n,initialAuthor:o,initialAuthorSlug:c,backButton:(0,t.jsx)(w,{isLightmode:y}),showCategoryFilter:!a&&u,showAuthorFilter:m})})}return(0,t.jsx)(j,{title:e,title_color:l,banner_cards:a,showSearch:i,api_endpoint:n,filter_author:o,filter_author_slug:c,categoryOptions:h,showAuthorFilter:m,showCategoryFilter:u,filter_category:x,categories:g,initialPosts:p,carouselPosts:f,initialIsLoading:b,effectiveCategoryOptions:N})}e.s(["default",()=>y],299547)}]);

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.