PageSourceSearch

https://static.wbur.org/app/prod/_next/static/chunks/pages/newsletters-abccd0464853ed1b.js

js wbur.org collected 2026-09-24 07:30:57 UTC 12,926 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3639],{8213:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/newsletters",function(){return r(6754)}])},9230:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var l=r(5893),s=r(8153),n=r(5424);let i=(e,t)=>"channel"==e&&"leaderboard"!==t?[{viewport:[0,0],slot:[[300,50],[300,250],"fluid"]},{viewport:[900,0],slot:[[728,90],"fluid"]},{viewport:[1120,0],slot:[[970,250],[728,90],"fluid"]}]:"recirc"==t?[{viewport:[0,0],slot:[[300,50],[300,250],"fluid"]},{viewport:[900,0],slot:[[728,90],"fluid"]}]:"leaderboard"==t?[{viewport:[0,0],slot:[300,50]},{viewport:[900,0],slot:[728,90]}]:[{viewport:[0,0],slot:[[300,50],[300,250],"fluid"]},{viewport:[900,0],slot:[[728,90],"fluid"]},{viewport:[1120,0],slot:[[970,250],[728,90],"fluid"]}];var o=r(3372);let a=(e,t)=>{let r="/".concat(o.Tr.dfpId,"/");return t.length?"".concat(r).concat(t):"channel"!==e?"".concat(r,"wbur.billboard.landing'"):"".concat(r,"wbur.billboard")},c=(e,t,r,l,s,n,i)=>{let o=[];Array.isArray(s)&&s.forEach(e=>{("category"==e.type||"topic"==e.type)&&o.push(e.slug)});let a=[];Array.isArray(s)&&s.forEach(e=>{/tag/.test(e.type)&&a.push(e.slug)});let c=null;return i&&(c="billboard_".concat(l&&l>1?"btf":"atf","_").concat(i)),{adPosition:c,channel:n||"",routeType:e,articleID:t||null,newsSection:r||null,topics:o,tags:a}},d=e=>{let{index:t,routeType:r,adType:o,adUnit:d="wbur.billboard",adPositionBillboard:u,source:p,articleID:m,taxonomy:b,newsSection:h,css:f}=e;if("events"===p)return null;let w=a(r,d),v=c(r,m,h,t,b,p,u),g=i(r,o);return(0,l.jsx)("div",{className:f?"section--bp "+f:"section--bp",children:(0,l.jsx)("div",{className:"uw bp--outer",children:(0,l.jsxs)("div",{className:"bp-inner",children:[(0,l.jsx)("p",{className:"bp-label",children:"Support WBUR"}),(0,l.jsx)("div",{className:"bp-content bp-content--centered",children:(0,l.jsx)(s.Z,{children:(0,l.jsx)(n.Z,{path:w,targeting:v,sizeMapping:g})})})]})})})};var u=d},8153:function(e,t,r){"use strict";var l=r(5893),s=r(3519),n=r(2905);let i=e=>{let{children:t}=e,r=(0,n.Z)(),i=()=>(0,l.jsx)("div",{className:"bp-label-ab",children:(0,l.jsxs)("span",{children:["Advertisements on wbur.org help support the news. Please consider a"," ",(0,l.jsx)(s.default,{href:"https://donate.wbur.org/secure/give?utm_medium=web&utm_source=wbur.org&utm_term=ad_block_message",children:"donation today!"})]})});return(0,l.jsx)(l.Fragment,{children:r?(0,l.jsx)(i,{}):t})};t.Z=i},5424:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var l=r(5893),s=r(7294),n=r(6075);r(5761);let i=e=>{let{path:t,targeting:r,slotSize:i,sizeMapping:o,viewableThreshold:a=.5}=e,c=(0,s.useId)().replace(/:/g,""),[d,u]=(0,s.useState)(!1),[p,m]=(0,s.useState)(null),b=(0,s.useRef)(null),[h,f]=(0,s.useState)(!1),w=(0,s.useRef)(null),v=()=>{let e=!window.googletag;e||u(!0);let t=window.googletag=window.googletag||{};t.cmd=t.cmd||[],e&&(t.cmd.push(()=>{t.pubads().enableSingleRequest(),t.pubads().disableInitialLoad(),t.enableServices()}),(()=>{let e=document.createElement("script");e.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",e.id="gptScript",e.async=!0,document.body.appendChild(e),u(!0)})())};return((0,s.useEffect)(()=>{v()},[]),(0,s.useEffect)(()=>{let e;if(!d||!h)return;let l=(e,t)=>{if(t){let r=t.reduce((e,t)=>e.addSize(t.viewport,t.slot),s.sizeMapping()).build();e.defineSizeMapping(r)}},{googletag:s}=window;return s.cmd.push(()=>{(e=s.defineSlot(t,i||[""],"adslot-".concat(c)))&&(l(e,o),s.pubads().enableSingleRequest(),s.pubads().collapseEmptyDivs(),s.enableServices(),e.addService(s.pubads()),e&&r&&(e.clearTargeting(),Object.keys(r).forEach(t=>{e.setTargeting(t,r[t])})),s.display("adslot-".concat(c)),s.pubads().refresh([e]))}),()=>{s.cmd.push(()=>{e&&s.destroySlots([e])})}},[d,t,p,h]),(0,s.useEffect)(()=>{let{current:e}=w;if(!e)return;let t=()=>window.innerWidth<900?"mobile":window.innerWidth<1120?"leaderboard":"billboard",r=(0,n.Ds)(()=>{let e=t();e!==b.current&&(b.current=e,m(e))},100);r(),window.addEventListener("resize",r);let l=new IntersectionObserver(e=>{e[0].isIntersecting&&f(!0)},{threshold:a});return l.observe(e),()=>{window.removeEventListener("resize",r),l.disconnect()}},[a]),t)?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{ref:w,id:"adslot-".concat(c)})}):null};var o=i},3044:function(e,t,r){"use strict";var l=r(5893),s=r(5152),n=r.n(s),i=r(5153);let o=n()(()=>r.e(5152).then(r.bind(r,8350)),{loadableGenerated:{webpack:()=>[8350]}}),a=e=>{let{pageData:t}=e,{headline:r,excerpt:s,images:n}=t,a=null==n?void 0:n.find(e=>"hero"===e.type);return a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{}),(0,l.jsx)(o,{index:1,imageData:a,headline:r,excerpt:s,preload:!0})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("header",{className:"article-section--title",children:[(0,l.jsx)(i.Z,{}),(0,l.jsx)("h1",{className:"page-hdr",children:r})]})})};t.Z=a},963:function(e,t,r){"use strict";var l=r(5893);let s=e=>{let{children:t,id:r,rtype:s,className:n=""}=e;return(0,l.jsx)("div",{className:"view ".concat(n),"data-rtype":s,"data-rid":r,children:t})};t.Z=s},2905:function(e,t,r){"use strict";var l=r(7294);let s=()=>{let[e,t]=(0,l.useState)(!1),r=()=>{let r=document.querySelector("#jsdf8sdf78sjf3");if(!r){t(!0);return}setTimeout(()=>{var r,l;if(e)return;let s=document.querySelector('[id^="adslot-"]'),n=window.adsbygoogle=null!==(l=window.adsbygoogle)&&void 0!==l?l:{};!n.loaded&&((null==s?void 0:null===(r=s.childNodes)||void 0===r?void 0:r.length)||t(!0))},2500)};return(0,l.useEffect)(()=>{r()},[]),e};t.Z=s},6754:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return j},default:function(){return _}});var l=r(5893),s=r(7294),n=r(1163),i=r(963),o=r(3044),a=r(1083),c=r(9230),d=r(6549),u=r(6075);let p=async e=>{var t;let r=null==e?void 0:null===(t=e.body)||void 0===t?void 0:t.getReader(),l=new TextDecoder,s="",n=!1;for(;!n&&r;){let{done:e,value:t}=await r.read();(n=e)||(s+=l.decode(t,{stream:!0}))}return JSON.parse(s)};var m=r(1187),b=r(4432),h=r(3519),f=r(4242),w=r.n(f);let v=e=>{let{newsletters:t,setSubscribed:r}=e,{query:i}
1=(0,n.useRouter)(),[o,a]=(0,s.useState)(!1),[c,f]=(0,s.useState)(!1),v=(0,s.useRef)(null),g=async e=>{var l,s,n;if(e.preventDefault(),o)return;a(!0);let c=Array.from(e.target),b=(null==v?void 0:null===(l=v.current)||void 0===l?void 0:l.value)||"",h=[];for(let e of c)e instanceof HTMLInputElement&&e.checked&&("subscribe-all"===e.id?h=t.filter(e=>{let{hide:t}=e;return!t}).map(e=>{let{slug:t}=e;return t}):h.push(e.value));let w=(0,u.u$)((null==v?void 0:null===(s=v.current)||void 0===s?void 0:s.value)||"");if(!w||!h.length){a(!1);let e=document.querySelector("#email-error"),t=document.querySelector("#select-error");!h.length&&t&&(f(!0),t.style.display="block",null==t||t.scrollIntoView()),w||(e.style.display="block",f(!0),null==v||null===(n=v.current)||void 0===n||n.focus());return}let g=c.filter(e=>"checkbox"===e.type&&e.checked).reduce((e,t)=>(e[t.name]=t.value,e),{}),x=new URLSearchParams({Email:b.trim(),...g});(null==i?void 0:i.source)&&x.append("subSource",i.source.toLowerCase());try{let{grecaptcha:e}=window;if(!(null==e?void 0:e.ready))throw Error("reCAPTCHA is not ready");await new Promise(t=>e.ready(t));let l=await e.execute(d.$S,{action:"all_newsletters_signup"});if(!l)throw Error("Could not verify reCAPTCHA");x.append("g-recaptcha-response",l);try{let e=await fetch("https://cloud.email.wbur.org/all-handler",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:x});if(!e.ok)throw Error("Error with subscribe endpoint");let l=await p(e);if("Success"!==l.status)throw Error(l.message.message);let s=t.filter(e=>{let{sfmcid:t}=e;return Object.keys(g).includes(t)});s.forEach(e=>{let t={event:"engagement",engagement_type:"newsletter-subscribe",engagement_action:"subscribe",engagement_name:"all-newsletters",engagement_title:e.slug};(0,m.D)(t)}),r(!0),a(!1)}catch(e){if(e instanceof Error)throw Error(e.message);throw Error("Unknown error")}}catch(t){a(!1);let e=document.querySelector("#submit-error");e.style.display="block",null==e||e.scrollIntoView()}},x=e=>{var t;let r=e.target;if("checkbox"===r.type){let e=null==document?void 0:document.activeElement;null==e||e.blur()}let l=Array.from(r.form);if("subscribe-all"===r.id){let e=document.querySelector("#subscribe-all");l.forEach(t=>{"checkbox"===t.type&&"subscribe-all"!==t.id&&(t.disabled=e.checked)})}if(!c)return;if("email-all"===r.id){if(!(0,u.u$)(r.value))return;document.querySelector("#email-error").style.display="none"}let s=l.filter(e=>"checkbox"===e.type&&e.checked),n=(0,u.u$)((null==v?void 0:null===(t=v.current)||void 0===t?void 0:t.value)||"");s.length&&(document.querySelector("#select-error").style.display="none",n&&f(!1))},y=["events","weekender","wbur-today","cognoscenti","artery","fieldguide"],j=["massachusetts-politics-newsletter-election-2024","wbur-today","cognoscenti"];return(null==i?void 0:i.source)==="inpersoncityspace"&&t.sort((e,t)=>y.indexOf(e.slug)-y.indexOf(t.slug)),(null==i?void 0:i.source)==="staffpicks"&&t.sort((e,t)=>j.indexOf(e.slug)-j.indexOf(t.slug)),(0,l.jsxs)("section",{className:"article-section--content article-section--centered",children:[o&&(0,l.jsx)(b.Z,{type:"centered",css:w().loading}),(0,l.jsxs)("form",{onSubmit:g,onChange:x,className:o?"".concat(w().form," ").concat(w().submitting):w().form,children:[(0,l.jsx)("div",{className:w().info,children:(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{htmlFor:"email-all",children:["Email Address ",(0,l.jsx)("span",{children:"*"}),(0,l.jsx)("span",{id:"email-error",className:w().error,children:"Please provide a valid email address"})]}),(0,l.jsx)("input",{ref:v,id:"email-all",type:"email",autoCapitalize:"false",inputMode:"email",autoComplete:"email"})]})}),(null==i?void 0:i.source)?null:(0,l.jsxs)("div",{className:w().checkboxes,children:[(0,l.jsx)("input",{type:"checkbox",id:"subscribe-all",name:"allnewsletters",disabled:o}),(0,l.jsx)("label",{htmlFor:"subscribe-all",children:"Subscribe to All Newsletters"})]}),t.filter(e=>{let{hide:t}=e;return!t||!!i.source}).filter(e=>{let{sfmcid:t}=e;return t}).filter(e=>{let{slug:t}=e;return(null==i?void 0:i.source)==="staffpicks"?j.includes(t):(null==i?void 0:i.source)==="inpers
1oncityspace"?y.includes(t):t}).map(e=>{let{id:t,slug:r,name:s,message:n,sfmcid:i}=e;return(0,l.jsxs)("div",{className:w().checkboxes,children:[(0,l.jsx)("input",{type:"checkbox",id:r,name:i,disabled:o}),(0,l.jsx)("label",{htmlFor:r,children:(0,l.jsxs)("div",{children:[s,(0,l.jsx)("p",{children:n})]})})]},t)}),(0,l.jsx)("span",{id:"select-error",className:w().error,children:"Please select at least 1 newsletter"}),(0,l.jsx)("span",{id:"submit-error",className:w().error,children:"There was an error subscribing. Please try again later."}),(0,l.jsxs)("div",{className:w().button,children:[(0,l.jsx)("button",{type:"submit",className:o?"button form-button button-primary submitting":"button form-button button-primary",children:"Subscribe"}),(0,l.jsx)("p",{children:"I would like to receive WBUR’s newsletters as noted above."})]})]}),(0,l.jsxs)("p",{className:w().tos,children:["More information about how WBUR uses personal information is available"," ",(0,l.jsx)(h.default,{href:"/inside/privacy-policy",children:"here"}),"."]})]})},g=()=>(document.documentElement.scrollTop=500,(0,l.jsxs)("section",{className:"article-section--content article-section--centered",children:[(0,l.jsx)("h1",{children:"Thanks!"}),(0,l.jsx)("p",{children:"You’re officially signed up for some of WBUR’s newsletters."}),(0,l.jsx)("p",{children:"Welcome to the ’BUR community. We can’t wait for you to join the conversation!"})]})),x=e=>{var t;let{pageData:r,newsletters:d}=e,{query:u}=(0,n.useRouter)(),[p,m]=(0,s.useState)(!1),{id:b,source:h,disableAds:f,content:w,embedMeta:x}=r;return(0,l.jsx)(i.Z,{rtype:"page",id:b,children:(0,l.jsxs)("article",{className:"article",children:[["community","inpersoncityspace"].includes(null===(t=null==u?void 0:u.source)||void 0===t?void 0:t.toLowerCase())?null:(0,l.jsx)(o.Z,{pageData:r}),p?(0,l.jsx)(g,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.Z,{css:"article-section--centered article-sections",items:w,embeds:x}),(0,l.jsx)(v,{newsletters:d,setSubscribed:m})]}),f?null:(0,l.jsx)(c.Z,{source:h,routeType:"page",articleID:null==b?void 0:b.toString(),adUnit:"wbur.leaderboard.bottom"})]})})},y=e=>{let{pageData:t,newsletterData:r}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(x,{pageData:t,newsletters:r})})};var j=!0,_=y},4242:function(e){e.exports={form:"NewslettersForm_form__C7Ttu",button:"NewslettersForm_button__6o6II",info:"NewslettersForm_info__vgdI9",checkboxes:"NewslettersForm_checkboxes__kNUPj",submitting:"NewslettersForm_submitting__6Dn87",error:"NewslettersForm_error__zxGWW",loading:"NewslettersForm_loading__gk_Bp",tos:"NewslettersForm_tos__Kxwsu"}}},function(e){e.O(0,[5761,1083,9774,2888,179],function(){return e(e.s=8213)}),_N_E=e.O()}]);

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.