1import{r as i,b as ke,L as ee,e as Ke,w as ys,g as bs,R as Ft,A as Ns}from"./chunk-JZWAC4HX-CWXBk4Fr.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{B as Ne}from"./breadcrumb-CmqCLHGi.js";import{u as Ss}from"./useFunnel-D4SFp3Te.js";import{H as ws}from"./typography-BidBTGzb.js";import{s as ks}from"./FeedSwitcher-3ptSMGKl.js";import{u as Ue,E as ze}from"./useExperiment-Bfej4i1N.js";import"./index-DeeQjsLN.js";import{B as ce}from"./button-DwvMrSl7.js";import{m as Ut,b as zt,u as Is,s as Bt,c as Se,a as Cs}from"./utils-Cw_CyOto.js";import{u as Ls}from"./section-layout-D_T60sp3.js";import{S as Be}from"./separator-Cgv2xm19.js";import"./index-eoqpUOz7.js";import"./tabs-CGsfRUoC.js";import{d as At,h as Fs,b as As}from"./useSearchApi-CwBm4MVn.js";import{trackFeedNoData as Ts,trackFeedTypeToggled as _s,trackFeedLoadMore as Tt,trackArticleFavoriteToggled as Ps,trackArticleCardClicked as Es}from"./events-DwyJj_Sc.js";import{F as $s}from"./FollowButton-Bm71PS2X.js";import{F as Ms}from"./FollowLimitToast-Drrh6qyq.js";import{C as Rs}from"./card-DxlniCpO.js";import{C as Y}from"./Skeleton-B1amOcTs.js";import{d as Ds,s as Us}from"./defaultArticleImage-Bj1E6rFN.js";import{T as zs,L as Bs}from"./two-column-BB47RB29.js";import{E as Oe,R as Os,S as Hs,T as _t}from"./ReviveAdSlot--7xUcvfd.js";import{u as Gs}from"./useCivicOfficials-v_dorRWm.js";import{U as Vs}from"./users-CrhcRh5r.js";import{C as qe}from"./chevron-right-toEDFyM5.js";import{F as He}from"./FeedLocationMap-B7JkYVp1.js";import{u as Ws}from"./RailSlot-DCu7uxIm.js";import{a as Ks,C as qs}from"./CardExtras-BhFbcHn1.js";import{P as Ve}from"./PremiumGate-Co8f5axP.js";import{A as Qs,a as Ys}from"./pageLayouts-BrzGJZNa.js";import{r as Pt,c as Et,a as Xs}from"./useHomeSections-BRtbMF1A.js";import{C as Zs}from"./chevron-left-BUhpmg6x.js";import{F as We}from"./flame-C2h-zRQY.js";import{C as Js}from"./chevron-up-Dk0fyBX6.js";import{C as eo}from"./chevron-down-nIkVfR8X.js";import{Q as to}from"./quote-C5F1EjdM.js";import{E as Ot}from"./external-link-BlriwzxC.js";import{A as so}from"./arrow-right-stWhx5fV.js";import{f as oo}from"./focusTopicStore-CdHeT_IC.js";import{S as ro}from"./focusTopicExamples-8EjWJRiT.js";import{F as ao,A as io}from"./SearchFilters-Dk190Gni.js";import"./react-google-recaptcha-v3.esm-Cit1sZX9.js";import{u as no}from"./ChatContext-YLJETIb3.js";import{d as $t}from"./textUtils-Xdy2u06q.js";import{c as ye}from"./utils-C46YwbG5.js";import{C as lo,a as co}from"./card-CSpk002g.js";import{M as we}
1from"./map-pin-CFaI-Ndx.js";import{u as mo}from"./useFollowedFeeds-UWL_ELuy.js";import{u as uo}from"./useFavoriteArticles-cVINI6ps.js";import{u as po}from"./useVisitedArticles-BPy8rmoj.js";import{a as fo}from"./recentActivity-BRYQqEU9.js";import{S as xo}from"./search-B_sLoBkx.js";import{H as ho}from"./heart-CarQwEJe.js";import{C as go}from"./check-BDlDVl3g.js";import{C as jo}from"./calendar-Bfv0wD71.js";import"./dropdown-menu-DvR4Rx6Z.js";import"./index-Bak1hYeE.js";import"./index-Ct4MertI.js";import"./createLucideIcon-ypzDO7z3.js";import"./bundle-mjs-COJ8Fh6m.js";import"./command-DO6TyIco.js";import"./dialog-CKQmONq-.js";import"./popover-BpIsz9Wt.js";import"./loader-circle-DoC9zm3S.js";import"./events-DQwX_v3Q.js";import"./analytics-W9JYYqeG.js";import"./clsx-B-dksMZM.js";import"./input-B4n9V2oH.js";import"./copy-DV_BI0A-.js";import"./index-Cun2h49Q.js";import"./useQuery-CDp4FGXq.js";import"./useBaseQuery-hOs9KK8F.js";import"./QueryClientProvider-DlLxqsDH.js";import"./useInfiniteQuery-Ci_36bnT.js";import"./infiniteQueryBehavior-MWf2_mB2.js";import"./circle-plus-CoQ-zP-e.js";import"./pendingGates-lZgL5sI_.js";import"./tags-DNLIKpCR.js";import"./circle-check-DTF0l82u.js";import"./skeleton-Bmlf2QLK.js";import"./RequestUpdateDialog-Dm93QlBE.js";import"./label-LfhFLJlu.js";import"./textarea-ALl54wAR.js";import"./mail-Dw6n3-fX.js";import"./phone-BgYN4nY8.js";import"./flag-C2XPsXk0.js";import"./useBrandTheme-8WviUk9p.js";import"./usePreference-DXz2I1gs.js";import"./react-RACaCFMV.js";import"./chart-column-C3sv2raq.js";import"./iconMapping-B9TyxiHq.js";import"./minus-1bdmBcGM.js";import"./plus-y0W2m50q.js";import"./square-pen-3vApQF2M.js";import"./truck-VGFIG48p.js";import"./archive-CxezuHVe.js";import"./list-BMXqRuvq.js";import"./grid-3x3-DwEUHhO-.js";import"./layers-DBbKphuj.js";import"./funnel-9a6Z357O.js";import"./refresh-cw-CM9oajJ7.js";import"./settings-LX_bDXX-.js";import"./lock-DW_wUTJL.js";import"./eye-BHLL86fB.js";import"./award-xEiTOhdX.js";import"./star-CouxezTO.js";import"./target-d0dYd8VP.js";import"./activity-DppYOYOj.js";import"./chart-pie-C4_0pPfC.js";import"./message-square-DFz6CaAo.js";import"./wrench-BjPI-cxF.js";import"./clock-CM-DzFt6.js";import"./trending-down-CZqcSeGZ.js";import"./trending-up-CPbkWCqf.js";import"./zap-Ccs838KE.js";import"./house-3qOG5tL4.js";import"./globe-BRRmi9g2.js";import"./file-text-BEk6sdPH.js";import"./scale-D6t3-Ogw.js";import"./book-open-_HU-rl5s.js";import"./shield-CMl8HKT9.js";import"./building-BlNbxSOL.js";import"./circle-check-big-qngRBwWD.js";import"./triangle-alert-CY9KP7yl.js";import"./clipboard-list-HrRkeuCq.js";import"./generateCategoricalChart-DWJczR-H.js";import"./index-CHoLgYxq.js";import"./string-Dbxi5Fic.js";import"./index.es-DPO5DnIy.js";import"./use-theme-DAxoGaci.js";import"./useReaderProfile-BMOhs68H.js";import"./storageOwner-CUDkrTaq.js";import"./ArticleCards-iyxssS-c.js";import"./useMediaTracking-DZK_vYzx.js";import"./mutation-DQZnylZM.js";import"./useUserLocation-DMJ0ctEY.js";import"./homeWidgets-CvM_UlOV.js";import"./checkbox-D4uaBGHK.js";import"./radio-group-DNZ5OlIP.js";import"./circle-C53JJ1Kc.js";import"./useScopeContext-D1xYCrff.js";import"./whole-word-DyMNhcX_.js";function Mt(t){return t.meetingDate||t.itemDate||t.date}function be(t){return t.mediaId||t.id||String(t.packageId)||""}function vo(t,a){return!t||t.length===0?[]:t.map((s,l)=>({title:s,taxId:String((a==null?void 0:a[l])||""),taxonomyId:String((a==null?void 0:a[l])||""),url:zt(String((a==null?void 0:a[l])||""),a||[],t||[],l),name:s,fetchOptionsUrl:`/api/taxonomy/options/${a==null?void 0:a[l]}`,dataLevel:""}))}function yo({media:t,taxonomyName:a,totalCount:s,startDate:l,endDate:g,hasMore:v,isLoading:A,observerTarget:d}){const x=i.useMemo(()=>{if(!l&&!g)return null;const w=l?new Date(l):null,h=g?new Date(g):null;return w&&h?`${w.toLocaleDateString("en-US",{month:"short",day:"numeric"})} â ${h.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`:null},[l,g]);return e.jsxs("div",{className:"flex flex-col gap-3",children:[(s||x)&&e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s&&e.jsxs("span",{className:"font-medium text-foreground",children:[s," meetings"]}),s&&x&&e.jsx("span",{children:" · "}),x&&e.jsx("span",{children:x})]}),e.jsxs("div",{className:"relative",children:[t.length===0?e.jsx("div",{className:"p-8 text-center rounded-lg border border-border bg-card",children:e.jsx("p",{className:"text-muted-foreground",children:"No meetings found."})}):e.jsx("div",{className:"space-y-0",children:t.map((w,h)=>e.jsx(bo,{item:w,isFirst:h===0,isLast:h===t.length-1&&!v},be(w)))}),v&&d&&e.jsx("div",{ref:d,className:"flex justify-center mt-6 py-4",children:A?e.jsx("div",{className:"text-muted-foreground",children:"Loading more..."}):e.jsx("div",{className:"h-4"})})]})]})}
1function bo({item:t,isFirst:a,isLast:s}){const l=ke(),g=Mt(t),v=g?new Date(g):null,A=v&&!isNaN(v.getTime()),d=t.discussionPoints&&t.discussionPoints.length>0||t.decisions&&t.decisions.length>0||t.directions&&t.directions.length>0,x=vo(t.taxonomyPathNames,t.taxonomyPathIds),w=(p,L)=>{const F=p.taxId||p.taxonomyId,R=p.url||(F?`/feed/${F}`:"/feed/2145"),_=L.findIndex(I=>(I.taxId||I.taxonomyId)===F);l(R,{state:{feedTitle:p.title,breadcrumbs:L.slice(0,_+1)}})},h=Ut(be(t),t.title)||`/source/${be(t)}`,k={title:t.title,breadcrumbs:x,date:Mt(t),image:t.thumbnailUrl||t.imageUrl,shortSummary:t.shortSummary},n=p=>{p.target.closest("[data-breadcrumb]")||l(h,{state:k,viewTransition:!0})};return e.jsxs("div",{className:"flex gap-2 relative",children:[e.jsxs("div",{className:"flex flex-col items-center flex-shrink-0",children:[e.jsx("div",{className:ye("w-0.5 h-2 -ml-[5px] mr-[5px]",a?"bg-transparent":"bg-primary/80")}),e.jsx(ee,{to:h,state:k,viewTransition:!0,className:ye("w-12 py-1 rounded text-center border-2 transition-colors -ml-[5px] mr-[5px]",A?"bg-card border-primary/80 hover:border-primary/50 hover:bg-primary/5":"bg-card border-border"),children:A?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm font-bold leading-none text-foreground",children:v.getDate()}),e.jsx("div",{className:"text-[10px] font-medium text-muted-foreground",children:v.toLocaleDateString("en-US",{month:"short"})})]}):e.jsx("div",{className:"text-sm font-bold leading-none text-muted-foreground",children:"--"})}),e.jsx("div",{className:ye("w-0.5 flex-1 -ml-[5px] mr-[5px]",s?"bg-transparent":"bg-primary/80")})]}),e.jsx("div",{className:ye("flex-1 pb-8",!s&&"border-b border-border mb-4"),children:e.jsxs("div",{className:"group/card rounded-lg -m-2 p-2 transition-colors hover:bg-muted cursor-pointer",onClick:n,children:[e.jsxs("h3",{className:"font-semibold text-lg text-foreground group-hover/card:text-primary group-hover/card:underline transition-colors mb-1 flex items-start gap-1",children:[e.jsx("span",{className:"flex-1",children:t.title}),e.jsx(qe,{className:"size-5 flex-shrink-0 mt-0.5 opacity-0 -translate-x-1 group-hover/card:opacity-100 group-hover/card:translate-x-0 transition-all"})]}),x.length>0&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-2","data-breadcrumb":!0,children:[e.jsx(we,{className:"size-3 flex-shrink-0"}),e.jsx(Ne,{collapseAt:2,className:"text-xs",items:x,onItemClick:p=>{w(p,x)}})]}),t.shortSummary&&e.jsx("p",{className:"text-base text-foreground/80",children:t.shortSummary}),d&&e.jsx("div",{className:"mt-3",children:e.jsx(Ve,{contentId:`meeting-insights-${be(t)}`,title:"Meeting Insights",description:"See discussion points, decisions, and directions",variant:a?"compact":"hidden",compactSize:"lg",previewImages:"meeting",children:e.jsx(lo,{className:"py-0",children:e.jsxs(co,{className:"p-4 space-y-3",children:[t.discussionPoints&&t.discussionPoints.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold mb-2",children:"Discussion Points"}),e.jsx("ul",{className:"space-y-1.5",children:t.discussionPoints.map((p,L)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground mt-0.5",children:"â¢"}),e.jsx("span",{className:"text-foreground",children:p})]},L))})]}),t.decisions&&t.decisions.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold mb-2",children:"Decisions"}),e.jsx("ul",{className:"space-y-1.5",children:t.decisions.map((p,L)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground mt-0.5",children:"â¢"}),e.jsx("span",{className:"text-foreground",children:p})]},L))})]}),t.directions&&t.directions.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-semibold mb-2",children:"Directions"}),e.jsx("ul",{className:"space-y-1.5",children:t.directions.map((p,L)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground mt-0.5",children:"â¢"}),e.jsx("span",{className:"text-foreground",children:p})]},L))})]})]})})})})]})})]})}function No({taxonomyId:t,locationName:a="Local",dataLevel:s}){return t?e.jsx(ce,{asChild:!0,variant:"outline",className:"flex-1 justify-between",children:e.jsxs(ee,{to:`/feed/${t}/officials?name=${encodeURIComponent(a)}${s?`&dataLevel=${s}`:""}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(Vs,{className:"size-4"}),"View Officials"]}),e.jsx(qe,{className:"size-4"})]})}):null}function So(t){const a=Ke(),s=new URLSearchParams(a.search);return s.set("topic",t),`${a.pathname}?${s.toString()}`}const Ht={support:"bg-emerald-500",oppose:"bg-rose-500",mixed:"bg-amber-500",comment:"bg-slate-400"},Gt={support:"In favor",oppose:"Against",mixed:"Undecided",comment:"Commented"};function Vt(t){return t.mode==="issue"?!0:t.mode==="legislation"||t.positions.length===0?!1:t.positions.every(a=>a.position==="comment")}function wo({topic:t,variants:a,variantIndex:s,onVariantChange:l}){const g=(a==null?void 0:a.length)??0,v=g>
11&&s!==void 0&&!!a,A=So(t.topicFilter),d=Ke(),x=ke(),h=new URLSearchParams(d.search).get("topic")===t.topicFilter,[k,n]=i.useState(h);i.useEffect(()=>{h&&n(!0)},[h]);const p=c=>{const y=new URLSearchParams(d.search);c?y.set("topic",c):y.delete("topic");const T=y.toString();x(`${d.pathname}${T?`?${T}`:""}`,{replace:!0})},L=c=>{!a||!a[c]||(k&&p(a[c].topicFilter),l==null||l(c))},F=()=>{v&&L((s+g-1)%g)},R=()=>{v&&L((s+1)%g)},_=Vt(t),I=["support","oppose","mixed"].map(c=>({position:c,n:t.positions.filter(y=>y.position===c).length})).filter(c=>c.n>0),z=t.positions.filter(c=>c.position==="comment").length,P=t.positions.find(c=>c.position==="oppose")||t.positions[0];return e.jsxs("article",{className:"border-y border-slate-300 dark:border-slate-700 py-5 mb-2",children:[v&&e.jsxs("div",{className:"flex items-center gap-2 mb-3 pb-3 border-b border-slate-200 dark:border-slate-700",children:[e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400",children:["Big debates in ",t.scope]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:F,"aria-label":"Previous story",className:"inline-flex items-center justify-center size-6 rounded hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-400",children:e.jsx(Zs,{className:"size-4"})}),e.jsx("div",{className:"flex items-center gap-1.5",children:Array.from({length:g}).map((c,y)=>e.jsx("button",{type:"button",onClick:()=>L(y),"aria-label":`Story ${y+1} of ${g}`,"aria-current":y===s?"true":void 0,className:`size-2 rounded-full transition-colors ${y===s?"bg-slate-900 dark:bg-slate-100":"bg-slate-300 dark:bg-slate-600 hover:bg-slate-400 dark:hover:bg-slate-500"}`},y))}),e.jsxs("span",{className:"text-[11px] text-slate-500 dark:text-slate-400 tabular-nums",children:[s+1," / ",g]}),e.jsx("button",{type:"button",onClick:R,"aria-label":"Next story",className:"inline-flex items-center justify-center size-6 rounded hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-400",children:e.jsx(qe,{className:"size-4"})})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] uppercase tracking-widest mb-3",children:[e.jsx("span",{className:"font-bold text-slate-900 dark:text-slate-100",children:"Today's big story"}),e.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"·"}),e.jsx("span",{className:"font-semibold text-slate-700 dark:text-slate-300",children:t.scope}),e.jsx("span",{className:"text-slate-400 dark:text-slate-500",children:"·"}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-rose-700 dark:text-rose-400",children:[e.jsx(We,{className:"size-3"}),t.status]}),t.isPrototype&&e.jsxs("span",{className:"ml-auto inline-flex items-center gap-1 text-amber-700 dark:text-amber-300",children:[e.jsx(We,{className:"size-3"}),e.jsx("span",{className:"text-[10px] font-bold",children:"P42 prototype"})]})]}),e.jsx("h2",{className:"text-2xl sm:text-3xl lg:text-4xl font-bold text-slate-900 dark:text-slate-100 leading-[1.1] tracking-tight",style:{fontFamily:'"Charter", "Iowan Old Style", Georgia, serif'},children:t.question}),e.jsx("p",{className:"mt-3 text-[15px] sm:text-base text-slate-700 dark:text-slate-300 leading-relaxed max-w-3xl",style:{fontFamily:'"Charter", "Iowan Old Style", Georgia, serif'},children:t.framing}),e.jsx("p",{className:"mt-2 text-[11px] text-slate-500 dark:text-slate-400 italic",children:"AI-generated summary compiled from Citizen Portal's coverage of the bill. Officials' positions below are sourced from their own words in indexed meetings and press events."}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-slate-600 dark:text-slate-400",children:[e.jsx("span",{className:"font-bold uppercase tracking-widest text-slate-500 dark:text-slate-400",children:_?"Officials' comments":"Where they stand"}),_?z>0&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:"font-semibold text-slate-800 dark:text-slate-200",children:z}),e.jsx("span",{className:"opacity-80",children:z===1?"official":"officials"})]}):I.map(c=>e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx("span",{className:`size-2 roun
1ded-full ${Ht[c.position]}`}),e.jsx("span",{className:"font-semibold text-slate-800 dark:text-slate-200",children:c.n}),e.jsx("span",{className:"opacity-80",children:Gt[c.position].toLowerCase()})]},c.position)),k?e.jsxs("button",{onClick:()=>{n(!1),p(null)},"aria-expanded":!0,className:"ml-auto inline-flex items-center gap-1 font-semibold text-blue-700 dark:text-blue-400 hover:underline",children:["Hide ",e.jsx(Js,{className:"size-3.5"})]}):e.jsxs(ee,{to:A,onClick:()=>n(!0),"aria-expanded":!1,className:"ml-auto inline-flex items-center gap-1 font-semibold text-blue-700 dark:text-blue-400 hover:underline",children:["Read More ",e.jsx(eo,{className:"size-3.5"})]})]}),k&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-6",children:e.jsx(ko,{topic:t})}),e.jsxs("div",{className:"mt-6 pt-6 border-t border-slate-200 dark:border-slate-700 grid grid-cols-1 lg:grid-cols-[2fr_3fr] gap-6",children:[P&&e.jsxs("figure",{className:"flex flex-col gap-3",children:[e.jsx(to,{className:"size-7 text-slate-300 dark:text-slate-600","aria-hidden":!0}),e.jsx("blockquote",{className:"text-xl leading-snug text-slate-900 dark:text-slate-100 italic",style:{fontFamily:'"Charter", "Iowan Old Style", Georgia, serif'},children:P.quote}),e.jsxs("figcaption",{className:"text-xs",children:[e.jsxs("div",{className:"font-semibold text-slate-900 dark:text-slate-100",children:["â ",P.name]}),e.jsx("div",{className:"text-slate-600 dark:text-slate-400",children:P.title}),e.jsxs("a",{href:P.source.url,className:"mt-1 inline-flex items-center gap-1 text-blue-700 dark:text-blue-400 hover:underline",children:[P.source.label,P.source.date?` · ${new Date(P.source.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:"",e.jsx(Ot,{className:"size-3"})]})]})]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-widest text-slate-600 dark:text-slate-400 mb-2",children:"Recent coverage"}),e.jsx("ul",{className:"flex flex-col divide-y divide-slate-200 dark:divide-slate-700",children:t.recentCoverage.map((c,y)=>e.jsx("li",{children:e.jsxs("a",{href:c.url,className:"flex items-start gap-3 py-3 group",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-semibold text-slate-900 dark:text-slate-100 group-hover:text-blue-700 dark:group-hover:text-blue-400 leading-snug",children:c.title}),e.jsxs("div",{className:"text-xs text-slate-500 dark:text-slate-400 mt-0.5",children:[c.outlet?`${c.outlet} · `:"",new Date(c.date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]}),e.jsx(so,{className:"size-4 text-slate-400 dark:text-slate-500 group-hover:text-blue-600 dark:group-hover:text-blue-400 group-hover:translate-x-0.5 transition mt-1"})]})},y))})]})]})]})]})}function ko({topic:t}){const a=Vt(t),s=t.question.replace(/\?$/,"").trim();return e.jsxs("section",{className:"rounded-lg border bg-card p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(We,{className:"size-4 text-rose-600 dar
1k:text-rose-400"}),e.jsx("h3",{className:"text-sm font-bold uppercase tracking-widest text-foreground",children:a?"Officials' comments":"Where they stand"})]}),s&&e.jsxs("p",{className:"text-xs text-muted-foreground leading-snug mb-3",children:[a?"What officials are saying on ":"On ",e.jsx("em",{className:"font-semibold not-italic text-foreground",children:s})]}),e.jsx("ul",{className:"flex flex-col divide-y divide-border -mx-1",children:t.positions.map(l=>e.jsx("li",{children:e.jsxs("a",{href:l.source.url,className:"flex items-center gap-2 px-1 py-2 hover:bg-accent rounded transition-colors group",children:[e.jsx("span",{className:`size-2 rounded-full flex-shrink-0 ${Ht[l.position]}`,title:Gt[l.position]}),e.jsxs("span",{className:"flex-1 min-w-0",children:[e.jsx("span",{className:"block text-sm font-medium text-foreground truncate group-hover:text-blue-700 dark:group-hover:text-blue-400",children:l.name}),e.jsx("span",{className:"block text-[11px] text-muted-foreground truncate",children:l.title})]}),e.jsx(Ot,{className:"size-3 text-muted-foreground group-hover:text-blue-600 dark:group-hover:text-blue-400 flex-shrink-0"})]})},l.name))})]})}const Rt={taxId:"home",title:"National",name:"National",url:"/feed/2145",taxonomyId:"home",fetchOptionsUrl:"",dataLevel:"home"};function Dt(t){if(!t||t.length===0)return[Rt];const a=t[0];return a.taxId==="home"||a.taxId==="0"||a.title==="Home"||a.title==="National"?t:[Rt,...t]}function Io(){const t=new Date;return t.setDate(t.getDate()-7),t.toISOString().split("T")[0]}function Co({feedTitle:t,breadcrumbs:a,taxonomyId:s}){const l=t||"Local News",g=a.map(d=>d.title).filter(Boolean).join(" > "),v=g?`Stay informed about ${l}. Get the latest news and updates from official government sources covering ${g}.`:"Stay informed about local government news. Get the latest updates from official sources - no spin, just the facts.",A=(()=>{if(!s)return"https://citizenportal.ai/feed/2145/national";const d="2145",x=[];if(String(s)===d)x.push("national");else for(const h of a){if((h.taxId||h.taxonomyId)===d)continue;const n=h.title||h.name;if(n==="States, Counties, and Cities")continue;const p=Bt(n);p&&x.push(p)}return`https://citizenportal.ai${x.length>0?`/feed/${s}/${x.map(encodeURIComponent).join("/")}`:`/feed/${s}`}`})();return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:`${l} | Citizen Portal`}),e.jsx("meta",{name:"description",content:v}),e.jsx("meta",{property:"og:title",content:`${l} | Citizen Portal`}),e.jsx("meta",{property:"og:description",content:v}),e.jsx("meta",{property:"og:image",content:"https://citizenportal.ai/og-image.png"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:A}),e.jsx("meta",{property:"og:site_name",content:"Citizen Portal"}),e.jsx("meta",{property:"og:locale",content:"en_US"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:`${l} | Citizen Portal`}),e.jsx("meta",{name:"twitter:description",content:v}),e.jsx("meta",{name:"twitter:image",content:"https://citizenportal.ai/og-image.png"}),e.jsx("link",{rel:"canonical",href:A})]})}const Lo=["no article will be produced","no articles will be produced","no article was produced","no articles were produced","no articles generated","no article generated","not substantive civic meeting content","does not contain civic meeting content","transcript is a public service announcement","transcript is a single","personal statement/public-service"],Fo=/^ineligible for article generation\b/;function Ao(t){const a=String((t==null?void 0:t.shortSummary)??(t==null?void 0:t.short_summary)??(t==null?void 0:t.description)??(t==null?void 0:t.summary)??"").toLowerCase();if(Lo.some(l=>a.includes(l)))return!0;const s=String((t==null?void 0:t.headline)??(t==null?void 0:t.title)??"").toLowerCase();return Fo.test(s)}function Ge(t){var g,v,A;const a=String(t.cpArticleId||t.mediaId||t.packageId||t.id),s=$t(t.headline||t.title),l=t.itemDate||t.meetingDate||t.date||t.item_date;return{id:a,title:s,shortSummary:$t(t.shortSummary||t.description||t.short_summary||""),itemDate:l,taxonomyId:t.taxonomyId??t.taxId??null,taxonomyPathIds:t.taxonomyPathIds||[],taxonomyPathNames:t.taxonomyPathNames||[],thumbnailUrl:t.thumbnailUrl||t.imageUrl||t.thumbnail||"",parentId:t.parentId??null,discu
1ssionPoints:t.discussionPoints||[],decisions:t.decisions||[],directions:t.directions||[],category:t.category||null,importance:t.importance||null,articleCount:t.articleCount||0,salience:t.salience??null,salienceCategories:(()=>{const d=t.salience;if(!d)return[];const x=Array.isArray(d)?d[0]:d,w=Array.isArray(x==null?void 0:x.categories)?x.categories:void 0,h=n=>{if(n!=null){if(typeof n=="number")return n;if(typeof n=="string"){const p=parseFloat(n);return Number.isFinite(p)?p:void 0}}},k=[];return Array.isArray(w)&&w.length>0&&w.forEach(n=>{const p=(n==null?void 0:n.name)??(n==null?void 0:n.category)??void 0;if(!p||String(p).toLowerCase()==="overall")return;const L=h((n==null?void 0:n.score)??(n==null?void 0:n.value)??(n==null?void 0:n.score_value)),F=(n==null?void 0:n.justification)??(n==null?void 0:n.explanation)??(n==null?void 0:n.justification_text)??"";k.push({name:p,score:L,justification:F})}),k})(),alertFlags:(()=>{var w;const d=t.salience;if(!d)return[];if(Array.isArray(d)){const h=[];return d.forEach(k=>{const n=(k==null?void 0:k.alert_flags)||(k==null?void 0:k.alertFlags);Array.isArray(n)&&h.push(...n.filter(Boolean))}),h}const x=d.alert_flags||d.alertFlags||((w=t.salience)==null?void 0:w.alert_flags);return Array.isArray(x)?x:[]})(),fundingSources:t.communityRelevance&&(t.communityRelevance.funding_sources||t.communityRelevance.fundingSources)||((g=t.community_relevance)==null?void 0:g.funding_sources)||[],geographies:t.communityRelevance&&(t.communityRelevance.geographies||t.communityRelevance.geographies)||((v=t.community_relevance)==null?void 0:v.geographies)||[],impactGroups:t.communityRelevance&&(t.communityRelevance.impact_groups||t.communityRelevance.impactGroups)||((A=t.community_relevance)==null?void 0:A.impact_groups)||[],topicPrimary:t.topicPrimary??t.topic_primary,newsworthinessNational:t.newsworthinessNational??t.newsworthiness_national,newsworthinessRegional:t.newsworthinessRegional??t.newsworthiness_regional,newsworthinessLocal:t.newsworthinessLocal??t.newsworthiness_local}}const yi=ys(function({loaderData:a}){var yt,bt,Nt,St,wt,kt,It,Ct;const{taxonomyId:s,breadcrumbsPromise:l,seoBreadcrumbs:g,seoTitle:v,feedPromise:A,feedTitlePromise:d,forceReload:x,civicOfficialsPromise:w,taxonomyTimelinePromise:h,dataLevelPromise:k,spendingDataInfoPromise:n,localityExistsPromise:p,pipelineFocusVariants:L}=a,[F,R]=bs(),{state:_}=Ke(),I=Ls(),z=Is();Ue(ze.feedLayout);const{variant:P}=Ue(ze.feedFocusTopicStyle),[c,y]=i.useState(null);i.useEffect(()=>{if(!s)return;let o=!0;return oo.getByFeedId(Number(s)).then(r=>{o&&y(r)}).catch(()=>{o&&y(null)}),()=>{o=!1}},[s]);const T=i.useMemo(()=>{if(!s)return c?[c]:[];const o=Number(s),r=ro[o]??[],m=L,f=new Set,C=[];c&&(C.push(c),f.add(c.topicFilter));for(const S of r)f.has(S.topicFilter)||(f.add(S.topicFilter),C.push(S));for(const S of m)f.has(S.topicFilter)||(f.add(S.topicFilter),C.push(S));return C},[c,s,L]),[de,te]=i.useState(0);i.useEffect(()=>{if(T.length<=1||!s)return;const o=`focusVariantIndex:${s}`,r=m=>{if(te(m),typeof window<"u")try{window.sessionStorage.setItem(o,String(m))}catch{}};if(typeof window<"u"){const m=new URLSearchParams(window.location.search),f=m.get("focus"),C=m.get("topic")||m.get("topics"),S=Q=>T.findIndex(le=>le.key===Q||le.topicFilter===Q),$=f?S(f):C?S(C):-1;if($>=0){r($);return}}try{const m=typeof window<"u"?window.sessionStorage.getItem(o):null,f=m!==null?Number(m):NaN;if(Number.isFinite(f)&&f>=0&&f<T.length){te(f);return}}catch{}r(Math.floor(Math.random()*T.length))},[T.length,s]);const Wt=o=>{if(te(o),s&&typeof window<"u")try{window.sessionStorage.setItem(`focusVariantIndex:${s}`,String(o))}catch{}},Ie=T[de]??T[0]??null,Qe=!!Ie&&P==="spread-story",{unfollow:Kt,isFollowing:qt,followWithBreadcrumbs:Qt,followLimit:Yt,isPremium:Xt}=mo(),Zt=s?qt(s):!1,[Jt,Ye]=i.useState(!1);Ss({taxonomyId:String(s),pageType:"feed"});const ae=_==null?void 0:_.breadcrumbs,Xe=((yt=ae==null?void 0:ae[ae.length-1])==null?void 0:yt.taxId)===String(s),me=Xe?ae:void 0,G=Xe?_==null?void 0:_.feedTitle:void 0,[Ze,es]=i.useState(G||"");i.useEffect(()=>{let o=!0;return d.then(r=>{o&&es(r)}),()=>{o=!1}},[d]),i.useEffect(()=>{F.get("src")==="home"&&R(o=>
1{const r=new URLSearchParams(o);return r.delete("src"),r},{replace:!0})},[]);const j=Ze;i.useEffect(()=>{s&&j&&fo(String(s),j)},[s,j]);const Je=no(),Ce={type:"feed",id:String(s),title:G||Ze};i.useEffect(()=>(Je.updateContext(Ce),()=>Je.updateContext(void 0)),[Ce.id,Ce.title]);const{isFavorited:ts,toggle:et}=uo(),[Po,Le]=i.useState([]),b=F.get("type")==="meetings"?"meetings":"articles",V=F.get("topics")||F.get("topic")||"",se=F.get("keyword")||"",ue=F.get("sortBy")||"date",ie=F.get("filterMode")||void 0,tt=["federal","state","school","county","city"],st=F.getAll("dataLevels"),X=st.length>0?st.flatMap(o=>o.split(",")).map(o=>o.toLowerCase().trim()).filter(o=>tt.includes(o)):null,pe=ue==="local"?Io():void 0,[N,ss]=i.useState(me||[]);i.useEffect(()=>{if(!s||N.length===0)return;const o="2145",r=[];if(String(s)===o)r.push("national");else for(const C of N){if((C.taxId||C.taxonomyId)===o)continue;const $=C.title||C.name;if($==="States, Counties, and Cities")continue;const Q=Bt($);Q&&r.push(Q)}const m=r.length>0?`/feed/${s}/${r.map(encodeURIComponent).join("/")}`:`/feed/${s}`;if(window.location.pathname!==m){const C=new URLSearchParams(window.location.search);C.delete("originCity");const S=C.toString()?`?${C.toString()}`:"";window.history.replaceState(window.history.state,"",m+S)}},[s,N]);const Fe=(bt=N[N.length-1])==null?void 0:bt.dataLevel,u=Fe==null?void 0:Fe.toLowerCase(),D=X||(u?[u]:tt);i.useEffect(()=>{if(s&&j&&N.length>0){const o=N.filter(r=>r.title!=="States, Counties, and Cities");ks({taxonomyId:String(s),title:j,breadcrumbs:o.map(r=>r.title),breadcrumbIds:o.map(r=>Number(r.taxonomyId))})}},[s,j,N]);const Ae=200,Te=9,os=12,{variant:rs}=Ue(ze.feedArticleBody),W=rs==="above-the-fold"&&b==="articles",fe=W?50:os,[B,oe]=i.useState([]),[O,ne]=i.useState(fe),[re,ot]=i.useState(0),[xe,_e]=i.useState(!0),[Z,he]=i.useState(!1),[J,rt]=i.useState(null),[as,at]=i.useState(!1),[it,nt]=i.useState(void 0),[Mo,lt]=i.useState(null),[Ro,ct]=i.useState(!1);i.useEffect(()=>{let o=!0;return w.then(r=>{o&&(rt(r),at(!0))}).catch(()=>{o&&(rt({officials:[],count:0,offset:0}),at(!0))}),h.then(r=>{o&&nt(r)}).catch(()=>{o&&nt(null)}),n.then(r=>{o&<(r)}).catch(()=>{o&<(null)}),p&&p.then(r=>{o&&ct(r)}).catch(()=>{o&&ct(!1)}),()=>{o=!1}},[w,h,n,p]);const is=as&&(((Nt=J==null?void 0:J.officials)==null?void 0:Nt.length)??0)===0,ns=Gs({taxonomyId:s??void 0,dataLevel:u==="state"||u==="county"||u==="city"?u:void 0,locationType:u==="state"?"state":void 0,limit:50},{enabled:is&&!!s,staleTime:300*1e3}),U=(St=J==null?void 0:J.officials)!=null&&St.length?J:ns.data??null;i.useEffect(()=>{const o=setTimeout(()=>{Z||(console.warn("Server data timeout - marking as loaded with empty results"),he(!0),oe([]))},1e4);return()=>clearTimeout(o)},[Z]);const ls=i.useMemo(()=>({taxonomyIds:s?String(s):"2145",includeDescendants:!0,topics:V||void 0,keywords:se||void 0,filterMode:ie,sortBy:ue==="local"?"local":"date",dataLevels:D,startDate:pe,limit:Ae,offset:re,forceRefresh:x}),[s,V,se,ie,ue,D,pe,re,x]),cs=i.useMemo(()=>({taxonomyIds:s?String(s):"2145",includeDescendants:!0,topics:V||void 0,keywords:se||void 0,filterMode:ie,dataLevels:D,startDate:pe,limit:Ae,offset:re,forceRefresh:x}),[s,V,se,ie,D,pe,re,x]),Pe=N.length>0,ds=At(ls,{enabled:b==="articles"&&!!s&&Pe,staleTime:300*1e3}),ms=Fs(cs,{enabled:b==="meetings"&&!!s&&Pe,staleTime:300*1e3}),K=b==="meetings"?ms:ds,us=K.isLoading,M=K.isFetching,dt=i.useCallback(Ge,[]);i.useEffect(()=>{if(K.data){const o=b==="meetings"?K.data.media||[]:(K.data.articles||[]).filter(f=>!Ao(f)),r=o.map(dt);re===0?(!Z||r.length>0)&&(oe(r),ne(fe)):oe(f=>[...f,...r]);const m=K.data.hasMore;_e(o.length>0&&(m??!1))}},[K.data,b,re,Z,dt]);const ps=X?[...X].sort().join(","):"",ge=`${s}-${b}-${V}-${se}-${ie||""}-${ue}-${ps}`,[mt,fs]=i.useState(ge);i.useEffect(()=>{ge!==mt&&(ot(0),oe([]),ne(fe),_e(!0),he(!1),fs(ge))},[ge,mt]),i.useEffect(()=>{let o=!0;return A.then(r=>{if(!o)return;const m=r&&"articles"in r?r.articles:r&&"media"in r?r.media:[],f=Array.isArray(m)?m.map(Ge):[];oe(f),ne(fe),he(!0),r&&"hasMore"in r&&_e(f.length>0&&(r.hasMore??!1))}).catch(r=>{o&&(console.error("[Feed] Server data promise rejected:",r),he(!0),oe([]))}),l.then(r=>{o&&r&&ss(r)}).catch(()=>{}),()=>{o=!1}},[A,l]);const H=O<B.length||xe,je=!!z.id&&(!X||X.length===1&&X[0]===u),Ee=!!((wt=U==null?void 0:U.officials)!=null&&wt.length),ut=Ee&&je&&!W,pt=Ee&&(!je||W&&!I),xs=Ft.useMemo(()=>I?[]:[{id:"feed-map",title:j||"Location",node:e.jsx(He,{breadcrumbs:N,dataLevel:u,taxonomyId:s})},...pt?[{id:"feed-officials",title:`${j||"Local"} Officials`,node:e.jsx(Oe,{taxonomyId:s,locationName:j||"Local",dataLevel:u==="state"||u==="county"||u==="city"?u:void 0,dataTour:"elected-officials",initialData:U})}]:[]],[I,j,N,u,s,pt,U]);Ws(xs);const $e=ut&&!I&&O%3===0?O-1:O,E=B.slice(0,$e);E==null||E[0];
1const ft=i.useMemo(()=>W?Pt(B,{scope:Et(u)}):[],[W,B,u]),{fold:Me,rest:xt}=i.useMemo(()=>Xs(ft,{size:Ys}),[ft]),{data:ve}=As({taxonomyId:s?Number(s):void 0,includeDescendants:!0,limit:10},{enabled:W&&!!s&&Pe,staleTime:600*1e3}),q=i.useMemo(()=>{const o=ve==null?void 0:ve.results;if(!(o!=null&&o.length))return null;const r=[...o].sort((m,f)=>f.totalArticles-m.totalArticles)[0];return r&&r.totalArticles>=4?r:null},[ve]),hs=i.useMemo(()=>({taxonomyIds:s?String(s):"2145",includeDescendants:!0,topics:q==null?void 0:q.topic,limit:12}),[s,q]),ht=At(hs,{enabled:W&&!!q&&!!s,staleTime:600*1e3}),gs=i.useMemo(()=>{var m;if(!q)return null;const o=(m=ht.data)==null?void 0:m.articles;if(!(o!=null&&o.length))return null;const r=Pt(o.map(Ge),{scope:Et(u)});return{name:q.topic.replace(/\b\w/g,f=>f.toUpperCase()),stories:r}},[q,ht.data,u]),js=i.useMemo(()=>[...Me,...xt.slice(0,Math.max(0,$e-Me.length))],[Me,xt,$e]);i.useEffect(()=>{if(Z&&(!E||E.length===0)&&s){const o=typeof window<"u"?window.location:null;Ts({feed_id:s,feed_name:j,feed_type:b,requested_path:(o==null?void 0:o.pathname)||""})}},[Z,E,s,j,b]);const gt=i.useCallback(o=>{_s({from_type:b,to_type:o,taxonomy_id:String(s||"")}),R(r=>{const m=new URLSearchParams(r);return o==="meetings"?m.set("type","meetings"):m.delete("type"),m},{replace:!0})},[R,b,s]),jt=i.useCallback(()=>{if(!H||M)return;const o=Math.floor(O/Te);if(O<B.length){Tt({page_number:o+1,taxonomy_id:String(s||""),feed_type:b});const r=Math.min(O+Te,B.length),m=xe?Math.floor(r/3)*3:r;ne(m>O?m:r)}else xe&&(Tt({page_number:o+1,taxonomy_id:String(s||""),feed_type:b}),ne(r=>r+Te),ot(r=>r+Ae))},[H,M,O,B.length,xe,s,b]),Re=i.useCallback(()=>{!M&&H&&jt()},[M,H,jt]),vs=i.useCallback((o,r,m)=>{const f=et(o,m||{title:""});Ps({article_id:o,action:f?"favorite":"unfavorite"})},[et]);i.useEffect(()=>{if(localStorage){const o=localStorage.getItem("favoritedArticles");try{const r=JSON.parse(`${o}`);Le(r)}catch(r){console.error("Error parsing favorited articles",r),Le([])}}else Le([])},[]);const De=ke(),vt=i.useCallback(o=>{const r=o.taxId||o.taxonomyId,m=b==="meetings"?"?type=meetings":"",f=N.findIndex($=>($.taxId||$.taxonomyId)===r),C=f>=0?N.slice(0,f+1):[],S={feedTitle:o.title,breadcrumbs:C};if(!r||r==="0"||r==="home")De(`/feed/2145${m}`,{state:S});else{const $=o.url||`/feed/${r}`;De(`${$}${m}`,{state:S})}},[b,De,N]);return i.useMemo(()=>N.map(o=>Number(o.taxonomyId||o.taxId)).filter(o=>!isNaN(o)&&o>0),[N]),e.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[e.jsx(Co,{feedTitle:v,breadcrumbs:g,taxonomyId:s}),(!z.id||!z.isPremium)&&e.jsx(Os,{}),me&&me.length>0?e.jsxs("div",{className:"flex flex-row items-center gap-2","data-tour":"breadcrumb",children:[e.jsx(we,{className:"size-4 text-muted-foreground"}),e.jsx(Ne,{items:Dt(me),collapseAt:I?3:8,className:"flex-1",onItemClick:vt})]}):e.jsx(i.Suspense,{fallback:e.jsx(Y,{className:"h-4 w-48"}),children:e.jsx(Ns,{resolve:l,errorElement:null,children:o=>o&&o.length>0?e.jsxs("div",{className:"flex flex-row items-center gap-2",children:[e.jsx(we,{className:"size-4 text-muted-foreground"}),e.jsx(Ne,{items:Dt(o),collapseAt:I?3:8,className:"flex-1",onItemClick:vt})]}):null})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-3",children:[G||j?e.jsx(ws,{level:I?1:"big",title:G||j}):e.jsx(Y,{className:"h-10 w-64"}),s&&e.jsx($s,{isFollowed:Zt,size:I?"sm":"default",className:"relative top-[-2px]",gateLabel:G||j||"this feed",gateId:String(s),gateKind:"location",onFollow:async()=>{await Qt(s)==="limit-reached"&&Ye(!0)},onUnfollow:()=>Kt(s)})]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Unbiased updates from official public meetings."}),e.jsx(Ms,{open:Jt,followLimit:Yt,isPremium:Xt,onDismiss:()=>Ye(!1)})]}),e.jsx("div",{className:"flex flex-col lg:flex-row lg:items-center gap-3",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2 order-first lg:order-last",children:[e.jsxs("div",{className:"flex","data-tour":"content-type-filter",children:[e.jsx(ee,{to:s?`/feed/${s}`:"/",onClick:o=>{o.preventDefault(),gt("articles")},className:Se("inline-flex items-center justify-center rounded-l-md border px-3 h-7 text-xs md:text-sm md:h-8 font-medium transition-colors",b==="articles"?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-accent hover:text-accent-foreground border-input"),children:"Articles"}),e.jsx(ee,{to:s?`/feed/${s}?type=meetings`:"/?type=meetings",onClick:o=>{o.preventDefault(),gt("meetings")}
1,className:Se("inline-flex items-center justify-center rounded-r-md border-t border-r border-b px-3 h-7 text-xs md:text-sm md:h-8 font-medium transition-colors -ml-px",b==="meetings"?"bg-primary text-primary-foreground border-primary":"bg-background hover:bg-accent hover:text-accent-foreground border-input"),children:"Meetings"})]}),e.jsx(ao,{showTopic:!0,showKeyword:!0,showDataLevels:!0,taxonomyId:s?String(s):void 0,localeLabel:j,currentDataLevel:u,children:e.jsx(Hs,{taxonomyId:s,locationName:j||"Local"})})]})}),e.jsx(io,{showDataLevels:!0,currentDataLevel:u,taxonomyId:s?String(s):void 0}),e.jsx(zs,{children:e.jsxs(Bs,{className:"flex flex-col gap-4 w-full",children:[I&&e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"flex gap-2 flex-wrap",children:(kt=U==null?void 0:U.officials)!=null&&kt.length?e.jsx(No,{taxonomyId:s,locationName:j||"Local",dataLevel:u==="state"||u==="county"||u==="city"?u:void 0}):null}),je&&e.jsx(Ve,{variant:"compact",title:"Unlock AI Timeline Insights",description:"Get the most out of your subscription with AI-powered analysis",contentId:"taxonomy-timeline",children:e.jsx(_t,{taxonomyId:s,topic:V||void 0,dataLevels:(D==null?void 0:D.join(","))||void 0,taxonomyName:j,initialData:it})})]}),Qe&&Ie&&e.jsx(wo,{topic:Ie,variants:T,variantIndex:de,onVariantChange:Wt}),!Z&&(us||B.length===0)?e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("p",{className:"text-muted-foreground text-center",children:["Loading"," ",b==="meetings"?"meeting recordings":"articles","..."]}),e.jsx(Y,{className:"h-[350px] w-full rounded-md"}),e.jsx(Y,{className:"h-8 w-3/4"}),e.jsx(Y,{className:"h-4 w-1/2"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[1,2,3,4].map(o=>e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(Y,{className:"h-[200px] w-full rounded-md"}),e.jsx(Y,{className:"h-6 w-3/4"}),e.jsx(Y,{className:"h-4 w-1/2"})]},o))})]}):!E||E.length===0?e.jsxs(Rs,{className:"p-8 flex flex-col items-center gap-4",children:[e.jsx(xo,{className:"size-10 text-muted-foreground/50"}),e.jsxs("p",{className:"text-muted-foreground text-lg",children:["No ",b==="meetings"?"meeting recordings":"articles"," found in"," ",((It=N[N.length-1])==null?void 0:It.title)||u||"this location"]}),e.jsx("div",{className:"flex flex-col gap-2 text-sm text-muted-foreground",children:(V||se||X)&&e.jsxs("p",{children:["Try"," ",e.jsx("button",{type:"button",onClick:()=>{R(o=>{const r=new URLSearchParams(o);return r.delete("topic"),r.delete("topics"),r.delete("keyword"),r.delete("dataLevels"),r},{replace:!0})},className:"text-primary hover:underline font-medium",children:"clearing your filters"})," ","to see more results."]})}),e.jsx(Be,{className:"my-1"}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"We're always expanding coverage. Let us know what you'd like to see."}),e.jsx(ce,{asChild:!0,variant:"outline",children:e.jsx(ee,{to:`/help-find-content?location=${encodeURIComponent(((Ct=N[N.length-1])==null?void 0:Ct.title)||G||j||"")}&taxonomyId=${s||""}`,children:"Request content for this location"})})]})]}):b==="meetings"?e.jsxs(e.Fragment,{children:[e.jsx(yo,{media:E,taxonomyName:G||j||"Civic Meetings",totalCount:B.length,hasMore:H,isLoading:M}),H&&e.jsx("div",{className:"flex justify-center mt-4 mb-6",children:e.jsx(ce,{onClick:Re,disabled:M,variant:"outline",size:"lg",className:"min-w-[200px]",children:M?"Loading...":"Show More"})})]}):W?e.jsxs(e.Fragment,{children:[e.jsx(Be,{}),e.jsx("div",{className:"flex flex-col gap-8",children:e.jsx(Qs,{stories:js,tailTitle:"More in this feed",hasAuthoredLead:Qe,moreAvailable:H,topicSection:gs,scopeName:j||G||"",interstitial:e.jsxs(e.Fragment,{children:[I&&Ee&&e.jsx(Oe,{taxonomyId:s,locationName:j||"Local",dataLevel:u==="state"||u==="county"||u==="city"?u:void 0,dataTour:"elected-officials",initialData:U}),I&&e.jsx(He,{breadcrumbs:N,dataLevel:u,taxonomyId:s})]})})}),H&&e.jsx("div",{className:"flex justify-center mt-8 mb-6",children:e.jsx(ce,{onClick:Re,disabled:M,variant:"outline",size:"lg",className:"min-w-[200px]",children:M?"Loading...":"Show More"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Be,{}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:E.map((o,r)=>
1{var f;const m=I&&(E.length>2&&r===1||E.length<=2&&r===E.length-1);return e.jsxs(Ft.Fragment,{children:[r===2&&ut&&!I&&e.jsx(Oe,{taxonomyId:s,locationName:j||"Local",dataLevel:u==="state"||u==="county"||u==="city"?u:void 0,dataTour:"elected-officials",initialData:U}),e.jsx("div",{...r===0?{"data-tour":"hero-article"}:{},children:e.jsx(To,{breadcrumbItems:(f=o.taxonomyPathNames)==null?void 0:f.map((C,S)=>{var $,Q,le,Lt;return{title:C,taxId:($=o.taxonomyPathIds)==null?void 0:$[S],taxonomyId:(Q=o.taxonomyPathIds)==null?void 0:Q[S],url:zt(String(((le=o.taxonomyPathIds)==null?void 0:le[S])??""),o.taxonomyPathIds??[],o.taxonomyPathNames??[],S),name:C,fetchOptionsUrl:`/api/taxonomy/options/${(Lt=o.taxonomyPathIds)==null?void 0:Lt[S]}`}}),isFavorited:ts(o.id),image:o.thumbnailUrl||o.imageUrl,title:o.title,shortSummary:o.shortSummary,id:o.id,date:o.itemDate||o.date,onToggleFavorite:vs,linkType:"article",positionInList:r+1,taxonomyPathNames:o.taxonomyPathNames,topicPrimary:o.topicPrimary})}),m&&e.jsx(He,{breadcrumbs:N,dataLevel:u,taxonomyId:s})]},`${o.id}-${r}`)})}),H&&e.jsx("div",{className:"flex justify-center mt-8 mb-6",children:e.jsx(ce,{onClick:Re,disabled:M,variant:"outline",size:"lg",className:"min-w-[200px]",children:M?"Loading...":"Show More"})})]}),je&&e.jsx(Ve,{variant:"compact",title:"Unlock AI Timeline Insights",description:"Get the most out of your subscription with AI-powered analysis",contentId:"taxonomy-timeline",children:e.jsx(_t,{taxonomyId:s,topic:V||void 0,dataLevels:(D==null?void 0:D.join(","))||void 0,taxonomyName:j,initialData:it})})]})})]})}),To=({image:t,title:a,shortSummary:s,id:l,date:g,isFavorited:v,onToggleFavorite:A,breadcrumbItems:d,linkType:x="article",positionInList:w,taxonomyPathNames:h,topicPrimary:k})=>{const n=ke(),{isVisited:p}=po(),L=p(l),F=c=>{c.preventDefault(),c.stopPropagation(),A(l,!v,{title:a,shortSummary:s,thumbnailUrl:t,itemDate:g,taxonomyPathNames:h})},R=(c,y)=>{y==null||y.preventDefault(),y==null||y.stopPropagation();const T=c.taxId||c.taxonomyId,de=c.url||(T?`/feed/${T}`:"/feed/2145");n(de,{state:{feedTitle:c.title,breadcrumbs:d==null?void 0:d.slice(0,((d==null?void 0:d.findIndex(te=>(te.taxId||te.taxonomyId)===T))??-1)+1)}})},_=x==="source"?Ut(l,a)||`/source/${l}`:Cs(l,a,void 0,h)||`/articles/${l}`,I=Ds({taxonomyPathNames:h,id:l,title:a}),z=()=>{Es({article_id:l,article_title:a,source_context:"feed",position_in_list:w})},P={cpArticleId:l,headline:a,shortSummary:s,topicPrimary:k,taxonomyPathNames:h};return e.jsxs("article",{className:"group h-full flex flex-col",children:[e.jsx(ee,{to:_,viewTransition:!0,className:"block",onClick:z,state:{breadcrumbItems:d,title:a,image:t,date:g},children:e.jsxs("div",{className:"flex flex-col gap-2 p-2 h-fit ",children:[e.jsxs("div",{className:"overflow-hidden rounded-md bg-muted aspect-video flex items-center justify-center relative",children:[e.jsx("img",{loading:"lazy",src:t||I,alt:a,onError:c=>Us(c,I),className:"max-w-full max-h-full object-contain group-hover:scale-105 transition-transform duration-600 ease-in-out"}),e.jsx("button",{type:"button",onClick:F,"aria-label":v?"Remove from favorites":"Add to favorites",className:"absolute top-2 right-2 bg-background/80 backdrop-blur-sm rounded-full p-1.5 hover:bg-background transition-colors shadow-sm",children:e.jsx(ho,{className:Se("size-4",v?"fill-red-500 text-red-500":"text-muted-foreground")})}),L&&e.jsxs("span",{"aria-label":"Read",className:"absolute bottom-2 left-2 flex items-center gap-1 rounded-full bg-green-600 text-white text-xs font-medium pl-1.5 pr-2 py-0.5 shadow-sm",children:[e.jsx(go,{className:"size-3",strokeWidth:3}),"Read"]})]}),e.jsxs("div",{className:"flex flex-col gap-2 group-hover:bg-muted p-2 rounded-md h-full",children:[a&&e.jsx("p",{className:Se("font-medium",L&&"font-normal"),children:a}),e.jsxs("div",{className:"flex flex-col gap-2 h-fit",children:[e.jsx("div",{className:"flex flex-row justify-between items-center",children:e.jsxs("span",{className:"text-sm text-muted-foreground flex flex-row gap-2 items-center",children:[e.jsx(jo,{className:"size-4"}),g?new Date(g).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"}):null]})}),d&&d.length>=3&&e.jsxs("span",{className:"flex flex-row gap-2 items-center",onClick:c=>c.stopPropagation(),children:[e.jsx(we,{className:"size-4 text-muted-foreground"}),e.jsx(Ne,{collapseAt:2,className:"text-sm",items:d,onItemClick:R,disableNavigation:!0})]}),s&&e.jsx("p",{className:"text-sm text-muted-foreground",children:s}),e.jsx(Ks,{article:P})]})]})]})}),e.jsx("div",{className:"mt-auto px-2 pb-2",children:e.jsx(qs,{article:P})})]})};export{yi 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.