PageSourceSearch

https://floodwarn.co.uk/_next/static/chunks/0yyls44vd_d4n.js

js floodwarn.co.uk collected 2026-10-06 14:05:30 UTC 6,233 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15086,e=>{"use strict";var t=e.i(43476),s=e.i(71645);function l({title:e,subtitle:s,counts:n,href:i,note:a}){let r=[{label:"Severe",value:n.severe,tone:"rose"},{label:"Warnings",value:n.warnings,tone:"amber"},{label:"Alerts",value:n.alerts,tone:"sky"}];return(0,t.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"group rounded-2xl bg-white/5 p-5 ring-1 ring-white/10 transition hover:bg-white/7",title:`Open official source for ${e}`,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:e}),(0,t.jsx)("div",{className:"mt-1 text-xs text-slate-300",children:s})]}),(0,t.jsx)("div",{className:"rounded-full bg-white/5 px-2.5 py-1 text-[11px] font-semibold text-slate-100 ring-1 ring-white/10",children:"Official"})]}),(0,t.jsx)("div",{className:"mt-4 grid grid-cols-3 gap-3",children:r.map(e=>{let s;return(0,t.jsxs)("div",{className:`rounded-xl p-3 ring-1 ${"rose"===(s=e.tone)?"ring-rose-400/25 bg-rose-500/10":"amber"===s?"ring-amber-400/25 bg-amber-500/10":"ring-sky-400/25 bg-sky-500/10"}`,children:[(0,t.jsx)("div",{className:"text-[11px] font-semibold text-slate-200",children:e.label}),(0,t.jsx)("div",{className:"mt-1 text-2xl font-semibold tracking-tight text-white",children:e.value??"—"})]},e.label)})}),a?(0,t.jsx)("div",{className:"mt-3 text-xs text-slate-400",children:a}):null,(0,t.jsx)("div",{className:"mt-3 text-xs font-semibold text-slate-200 underline underline-offset-4 opacity-80 group-hover:opacity-100",children:"Open source"})]})}e.s(["RegionQuickCheck",0,function(){let[e,n]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/uk-situation",{cache:"no-store"}),s=await t.json();e||n(s)}catch{e||n({})}})(),()=>{e=!0}},[]);let i=(0,s.useMemo)(()=>{let t=e?.evidence?.england?.counts;return{severe:t?.severe??null,warnings:t?.warnings??null,alerts:t?.alerts??null}},[e]),a=(0,s.useMemo)(()=>{let t=e?.evidence?.wales?.counts;return{severe:t?.severe??null,warnings:t?.warnings??null,alerts:t?.alerts??null}},[e]),r=(0,s.useMemo)(()=>{let t=e?.evidence?.scotland?.counts;return{severe:t?.severe??null,warnings:t?.warnings??null,alerts:t?.alerts??null}},[e]);return(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:"Quick check"}),(0,t.jsx)("div",{className:"mt-1 text-xs text-slate-300",children:"Snapshot counts from official sources (where available)."})]})}),(0,t.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,t.jsx)(l,{title:"England (EA)",subtitle:"Environment Agency flood alerts and warnings",counts:i,href:"https://check-for-flooding.service.gov.uk/"}),(0,t.jsx)(l,{title:"Wales (NRW)",subtitle:"Natural Resources Wales flood warnings and alerts",counts:a,href:"https://flood-warning.naturalresources.wales/",note:e?.evidence?.wales?.note??"NRW blocks embedding on other sites; use ‘Open source’ for details."}),(0,t.jsx)(l,{title:"Scotland (SEPA)",subtitle:"SEPA Floodline live flooding information",counts:r,href:"https://floodline.sepa.org.uk/floodupdates/"})]})]})}])},51162,e=>{"use strict";var t=e.i(43476),s=e.i(71645);e.s(["UkSituationHeadline",0,function(){let[e,l]=(0,s.useState)(null),[n,i]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/uk-situation",{cache:"no-store"});if(!t.ok)throw Error(`Upstream ${t.status}`);let s=await t.json();e||l(s)}catch(t){e||i(t instanceof Error?t.message:"Failed to load")}})(),()=>{e=!0}},[]);let a=(0,s.useMemo)(()=>e?e.floodingLikelyNext24h?"Flooding more likely (next 24h)":"Lower flood likelihood (next 24h)":null,[e]);if(n)return(0,t.jsxs)("section",{className:"rounded-2xl bg-white/5 p-6 ring-1 ring-white/10",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:"UK situation headline"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-slate-300",children:["Couldn’t load the live headline (",n,")."]})]});if(!e)return(0,t.jsxs)("section",{className:"rounded-2xl bg-white/5 p-6 ring-1 ring-white/10",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:"UK situation headline"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-slate-300",children:"Generating a live headline…"})]});let r=e.evidence?.england?.counts,o=e.evidence?.england?.lastUpdated;return(0,t.jsxs)("section",{className:"rounded-2xl bg-gradient-to-b from-white/8 to-white/4 p-6 ring-1 ring-white/10",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-white",children:"UK conditions (auto-generated)"}),a?(0,t.jsx)("div",{className:"rounded-full bg-white/10 px-3 py-1 text-xs font-semibold text-white ring-1 ring-white/15",children:a}):null]}),(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-slate-100",children:e.headline}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2 text-xs text-slate-300",children:[(0,t.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 ring-1 ring-white/10",children:["Generated: ",function(e){if(!e)return null;let t=new Date(e);
1return Number.isNaN(t.getTime())?null:t.toLocaleString("en-GB",{weekday:"short",day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:"Europe/London"})}(e.generatedAt)??"now"]}),r?(0,t.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 ring-1 ring-white/10",children:["EA in force: ",r.totalInForce," (Severe ",r.severe,", Warning ",r.warnings,", Alert ",r.alerts,")"]}):null,o?(0,t.jsxs)("span",{className:"rounded-full bg-white/5 px-3 py-1 ring-1 ring-white/10",children:["EA updated: ",o]}):null]}),(0,t.jsx)("p",{className:"mt-3 text-xs text-slate-400",children:"This headline is generated automatically from official alerts plus a 24‑hour weather snapshot. Always follow official agency guidance for decisions."})]})}])}]);

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.