PageSourceSearch

https://static.wbur.org/app/prod/_next/static/chunks/pages/auth/app-turnstile-bf50c3ef8abe0700.js

js wbur.org collected 2026-09-24 07:30:42 UTC 8,145 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1549],{4318:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/app-turnstile",function(){return t(4332)}])},4332:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return x}});var n=t(5893),o=t(7294),i=t(9008),c=t.n(i),a=(0,o.forwardRef)(({as:e="div",...r},t)=>(0,n.jsx)(e,{...r,ref:t}));let s="onloadTurnstileCallback",u=e=>!!document.getElementById(e),l=({render:e="explicit",onLoadCallbackName:r=s,scriptOptions:{nonce:t="",defer:n=!0,async:o=!0,id:i="",appendTo:c,onError:a,crossOrigin:l=""}={}})=>{let d=i||"cf-turnstile-script";if(u(d))return;let f=document.createElement("script");f.id=d,f.src=`https://challenges.cloudflare.com/turnstile/v0/api.js?onload=${r}&render=${e}`,document.querySelector(`script[src="${f.src}"]`)||(f.defer=!!n,f.async=!!o,t&&f.setAttribute("nonce",t),l&&(f.crossOrigin=l),a&&(f.onerror=a,delete window[r]),("body"===c?document.body:document.getElementsByTagName("head")[0]).appendChild(f))},d={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65}},f="unloaded",p,w=new Promise((e,r)=>{p={resolve:e,reject:r},"ready"===f&&e(void 0)}),m=(e=s)=>("unloaded"===f&&(f="loading",window[e]=()=>{p.resolve(),f="ready",delete window[e]}),w),h=(0,o.forwardRef)((e,r)=>{let{scriptOptions:t,options:i={},siteKey:c,onWidgetLoad:s,onSuccess:p,onExpire:w,onError:h,onBeforeInteractive:b,onAfterInteractive:v,onUnsupported:y,onTimeout:x,onLoadScript:g,id:E,style:T,as:k="div",injectScript:S=!0,rerenderOnCallbackChange:I=!1,...N}=e,R=i.size,j=(0,o.useMemo)(()=>{if(void 0===R)return{};let e=d[R];return"interaction-only"===i.appearance?{...e,height:"auto"}:e},[R,i.appearance]),A="execute"===i.execution?d.invisible:j,[C,_]=(0,o.useState)(A),O=(0,o.useRef)(null),[P,F]=(0,o.useState)(!1),L=(0,o.useRef)(void 0),B=(0,o.useRef)(!1),V=E||"cf-turnstile",z=(0,o.useRef)({onSuccess:p,onError:h,onExpire:w,onBeforeInteractive:b,onAfterInteractive:v,onUnsupported:y,onTimeout:x});(0,o.useEffect)(()=>{I||(z.current={onSuccess:p,onError:h,onExpire:w,onBeforeInteractive:b,onAfterInteractive:v,onUnsupported:y,onTimeout:x})});let D=t?.id||"cf-turnstile-script",M=function(e="cf-turnstile-script"){let[r,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let r=()=>{u(e)&&t(!0)},n=new MutationObserver(r);return n.observe(document,{childList:!0,subtree:!0}),r(),()=>{n.disconnect()}},[e]),r}(D),H=t?.onLoadCallbackName||"onloadTurnstileCallback",U=(0,o.useMemo)(()=>({sitekey:c,action:i.action,cData:i.cData,theme:i.theme||"auto",language:i.language||"auto",tabindex:i.tabIndex,"response-field":i.responseField,"response-field-name":i.responseFieldName,size:function(e){if("invisible"!==e)return e}(R),retry:i.retry||"auto","retry-interval":i.retryInterval||8e3,"refresh-expired":i.refreshExpired||"auto","refresh-timeout":i.refreshTimeout||"auto",execution:i.execution||"render",appearance:i.appearance||"always","feedback-enabled":i.feedbackEnabled??!0,"offlabel-show-privacy":i.offlabelShowPrivacy??!0,"offlabel-show-help":i.offlabelShowHelp??!0,callback:e=>{B.current=!0,I?p?.(e):z.current.onSuccess?.(e)},"error-callback":I?h:(...e)=>z.current.onError?.(...e),"expired-callback":I?w:(...e)=>z.current.onExpire?.(...e),"before-interactive-callback":I?b:(...e)=>z.current.onBeforeInteractive?.(...e),"after-interactive-callback":I?v:(...e)=>z.current.onAfterInteractive?.(...e),"unsupported-callback":I?y:(...e)=>z.current.onUnsupported?.(...e),"timeout-callback":I?x:(...e)=>z.current.onTimeout?.(...e)}),[i.action,i.appearance,i.cData,i.execution,i.language,i.refreshExpired,i.responseField,i.responseFieldName,i.retry,i.retryInterval,i.tabIndex,i.theme,i.feedbackEnabled,i.offlabelShowPrivacy,i.offlabelShowHelp,i.refreshTimeout,c,R,I,I?p:null,I?h:null,I?w:null,I?b:null,I?v:null,I?y:null,I?x:null]),W=(0,o.useCallback)(()=>"u">typeof window&&!!window.turnstile,[]),$=(0,o.useCallback)((e,r)=>{try{return window.turnstile.render(e,r)}catch(r){let e=I?h:z.current.onError;e?e(r instanceof Error?r.message:String(r)):console.error(r);return}},[I,I?h:null]);return(0,o.useEffect)(function(){S&&!P&&(m(H),l({onLoadCallbackName:H,scriptOptions:{...t,id:D}}))},[S,P,t,D,H]),(0,o.useEffect)(function(){"ready"!==f&&m(H).then(()=>F(!0)).catch(console.error)},[H]),(0,o.useEffect)(function(){if(!O.current||!P)return;let e=!1;return(async()=>
1{if(e||!O.current)return;let r=$(O.current,U);L.current=r,_(A),L.current&&s?.(L.current)})(),()=>{e=!0,L.current&&(window.turnstile.remove(L.current),B.current=!1)}},[V,P,U,A,$]),(0,o.useImperativeHandle)(r,()=>{let{turnstile:e}=window;return{getResponse(){if(!e?.getResponse||!L.current||!W()){console.warn("Turnstile has not been loaded");return}return e.getResponse(L.current)},getResponsePromise:async(e=3e4,r=100)=>new Promise((t,n)=>{let o,i=async()=>{if(B.current&&window.turnstile&&L.current)try{let e=window.turnstile.getResponse(L.current);return o&&clearTimeout(o),e?t(e):n(Error("No response received"))}catch(e){return o&&clearTimeout(o),console.warn("Failed to get response",e),n(Error("Failed to get response"))}o||=setTimeout(()=>{o&&clearTimeout(o),n(Error("Timeout"))},e),await new Promise(e=>setTimeout(e,r)),await i()};i()}),reset(){if(!e?.reset||!L.current||!W()){console.warn("Turnstile has not been loaded");return}_(A);try{B.current=!1,e.reset(L.current)}catch(e){console.warn(`Failed to reset Turnstile widget ${L.current}`,e)}},remove(){if(!e?.remove||!L.current||!W()){console.warn("Turnstile has not been loaded");return}_(d.invisible),B.current=!1,e.remove(L.current),L.current=null},render(){if(!e?.render||!O.current||!W()||L.current){console.warn("Turnstile has not been loaded or container not found");return}let r=$(O.current,U);return L.current=r,L.current&&s?.(L.current),_(A),r},execute(){if("execute"!==i.execution){console.warn('Execution mode is not set to "execute"');return}if(!e?.execute||!O.current||!L.current||!W()){console.warn("Turnstile has not been loaded or container not found");return}e.execute(O.current),_(j)},isExpired:()=>e?.isExpired&&L.current&&W()?e.isExpired(L.current):(console.warn("Turnstile has not been loaded"),!1)}},[L,i.execution,U,O,W,$,P,s,A,j]),(0,o.useEffect)(()=>{if(P||!M)return;if(window.turnstile){F(!0);return}let e=setInterval(()=>{window.turnstile&&(F(!0),clearInterval(e))},50);return()=>{clearInterval(e)}},[P,M]),(0,o.useEffect)(()=>{_(A)},[A]),(0,o.useEffect)(()=>{M&&"function"==typeof g&&g()},[M]),(0,n.jsx)(a,{ref:O,as:k,id:V,style:{...C,...T},...N})});h.displayName="Turnstile";let b="0x4AAAAAAD1T7TMie0SsPt6K",v=(0,o.forwardRef)(function(e,r){let{action:t,onSuccess:o,onExpire:i,onError:c}=e;if(!b)return null;let a=t?t.replace(/[^a-zA-Z0-9_-]/g,"-").slice(0,32):void 0;return(0,n.jsx)(h,{ref:r,siteKey:b,onSuccess:o,onExpire:i,onError:c,options:{action:a,appearance:"interaction-only",theme:"light",size:"flexible"}})});function y(e){let r=JSON.stringify(e);window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(r)}function x(){let e=(0,o.useRef)(null),[r,t]=(0,o.useState)("verifying"),i=e=>{t("verified"),y({type:"turnstile-token",token:e})},a=()=>{var r;t("verifying"),y({type:"turnstile-error",error:"expired"}),null===(r=e.current)||void 0===r||r.reset()},s=()=>{var r;t("error"),y({type:"turnstile-error",error:"error"}),null===(r=e.current)||void 0===r||r.reset()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(c(),{children:[(0,n.jsx)("title",{children:"Verifying…"}),(0,n.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,n.jsxs)("main",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"1rem",padding:"1.5rem",fontFamily:"system-ui, -apple-system, sans-serif",textAlign:"center"},children:[(0,n.jsx)(v,{action:"app-login",ref:e,onSuccess:i,onExpire:a,onError:s}),(0,n.jsx)("p",{style:{color:"#555",fontSize:"0.9rem",margin:0},children:"verified"===r?"Verified":"error"===r?"Verification failed. Please try again.":"Verifying…"})]})]})}x.bareLayout=!0}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=4318)}),_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.