PageSourceSearch

https://www.ok.co.uk/nav-web-static/main-25e5ee27a94654e23237fde8a…/static/chunks/6616-46fb54d05f2b72e1.js

js ok.co.uk collected 2026-09-24 18:02:45 UTC 31,981 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6616],{7486:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var o=n(12115);let a=function({mantisData:e}){return(0,o.useEffect)(()=>{window.mantis={...window.mantis||{},...e}},[e]),null}},8554:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});var o=n(12115),a=n(8770);let r=function({mantisData:e}){return(0,o.useRef)(!1).current||a.A.getState().actions.addMantisConfigToServerStore(e),null}},11048:(e,t,n)=>{"use strict";n.d(t,{default:()=>O});var o=n(95155),a=n(12115),r=n(62064);let i={PERMISSION:{DEFAULT:"default",DENIED:"denied",GRANTED:"granted"},WEB_ALERT_STORAGE_NAME:"webAlertPermission",WEB_ALERT_PROVIDER_STORAGE_NAME:"webAlertProvider",TTL:{ACCEPT:99999,DECLINE:30},ONE_SIGNAL:"one-signal"},{WEB_ALERT_STORAGE_NAME:s,PERMISSION:l}=i,c=async e=>{let t=void 0!==window.localStorage,n=`${s}:${e}`,o=t&&localStorage.getItem(n),{expiry:a,permission:r}=o?JSON.parse(o):"",i=r===l.GRANTED,c=new Date().getTime();return a&&a<c&&t||o&&i&&"denied"===("Notification"in window&&Notification.permission)&&t?(localStorage.removeItem(n),!1):!!o};var d=n(4831),u=n(772),p=n(50399),m=n(95404);let w=(e,t="airship")=>{let n=void 0!==window.localStorage,o=JSON.parse(n&&localStorage.getItem(t)||"[]"),a=new Date().getTime(),r=o.filter(e=>e.expiry>a);if(e.length){let t=new Date,n=new Date(t);n.setDate(t.getDate()+3);let o={message:e,expiry:n.getTime()};r.push(o)}n&&localStorage.setItem(t,JSON.stringify(r))},h=(e,t,n)=>{let o=void 0!==window.localStorage,a=new Date,r=new Date(a);r.setDate(a.getDate()+n);let i={permission:t,expiry:r.getTime()};o&&localStorage.setItem(e,JSON.stringify(i))},f=async(e,t,n)=>{let o=await Notification.requestPermission();return t("WEB_ALERTS:BROWSER_PROMPT_DISPLAYED",{linkURL:e,componentID:"",componentText:"",...n}),o===i.PERMISSION.GRANTED&&(t("WEB_ALERTS:BROWSER_PROMPT_ALLOWED",{linkURL:e,componentID:"",componentText:"",...n}),window.feliz.click("web-alert-notification",0,0,{})),o===i.PERMISSION.DENIED&&(t("WEB_ALERTS:BROWSER_PROMPT_BLOCKED",{linkURL:e,componentID:"",componentText:"",...n}),window.feliz.click("web-alert-notification-close",0,0,{})),o},{WEB_ALERT_STORAGE_NAME:g,PERMISSION:S,TTL:E,ONE_SIGNAL:y}=i,T=async(e,t,n,o)=>e===S.DEFAULT&&await f(t,n,o)===S.GRANTED,v=async(e,t,n,o,a,r,s)=>{w("-- Subscribing to OneSignal --",y);let l=await window.OneSignal;if(l){l.setConsentGiven(!0);let c=()=>{let e={[a]:"true"};return s&&(e.is_premium_user="true"),e},d="Notification"in window?Notification.permission:null;if(!d||d===S.DENIED)return;if(d===S.GRANTED||await T(d,t,n,o)){l.User?.addEventListener("change",s=>{s.current.onesignalId&&(w(`OneSignal channel created. ID: ${s.current.onesignalId}`,y),void 0!==window.localStorage&&localStorage.setItem(i.WEB_ALERT_PROVIDER_STORAGE_NAME,y),l.User?.addTags(c()),h(`${g}:${e}${r}`,S.GRANTED,E.ACCEPT),n("WEB_ALERTS:WEB_ALERT_SUBSCRIBE_SUCCESS_OS",{linkURL:t,componentID:"",componentText:"",...o}),w(`OneSignal tag added: ${a}`,y))});try{l.User?.onesignalId?(l.User?.addTags(c()),h(`${g}:${e}${r}`,S.GRANTED,E.ACCEPT),n("WEB_ALERTS:WEB_ALERT_SUBSCRIBE_SUCCESS_OS",{linkURL:t,componentID:"",componentText:"",...o}),w(`OneSignal new tag added: ${a}`,y)):l.Notifications.requestPermission()}catch(e){n("WEB_ALERTS:WEB_ALERT_SUBSCRIBE_FAIL_OS",{linkURL:t,componentID:"",componentText:"",...o})}}}};var b=n(79712),A=n(16528),_=n(83391),k=n(18692),C=n(50910),L=n(64187),R=n.n(L);let I=({publicationName:e,onClose:t,subscribe:n,iconUrl:a})=>{let r=(0,C.c3)("components.molecules.WebAlert");return(0,o.jsx)("div",{className:R()["web-alert-main-container"],children:(0,o.jsxs)("div",{className:R()["web-alert-container"],"data-testid":"WebAlert",children:[(0,o.jsx)(_.default,{src:a,width:48,height:48,alt:e}),(0,o.jsx)(A.A,{children:r("message",{publicationName:e})}),(0,o.jsx)(k.A,{design:"primary",label:r("submit"),dataTestId:"submit",tracking:{dataTmDataTrack:"web-alert-subjective"},onClick:n}),(0,o.jsx)(k.A,{design:"white",label:r("cancel"),dataTestId:"cancel",tracking:{dataTmDataTrack:"web-alert-subjective-close"},onClick:t})]})})},N={showModal:!1,segmentScope:"",segmentTag:"",popupTitle:"",iconName:"",iconUrl:""};function x(e,t){switch(t.type){case"SET_DATA":return{...e,...t.payload};case"SET_ICON_URL":return{...e,iconUrl:t.payload};case"SHOW_MODAL":return{...e,showModal:!0};case"HIDE_MODAL":return{...e,showModal:!1};default:return e}}let D=()=>{},O=function({publication:e,webAlertsConfig:t,tags:n,webAlertsOneStepEnabled:s=!1}){let l=(0,a.useRef)(""),w=(0,a.useRef)(""),[f,g]=(0,a.useReducer)(x,N),{showModal:S,segmentScope:E,segmentTag:y,popupTitle:T,iconName:A,iconUrl:_}=f,{WEB_ALERT_STORAGE_NAME:k,PERMISSION:C,TTL:L}=i,R=(0,b.w)(e=>e.actions.clickEvent),O=(0,b.w)(e=>e.state.client.analytics),$=((e,t,n)=>{let{notification:o}=(0,d.Z)(e=>({notification:e?.state?.client.webAlert?.notification})),[i,s]=(0,a.useState)(!1),[l,p]=(0,a.useState)(!1),[m,w]=(0,a.useState)(!0),[h,f]=(0,a.useState)(!1),[g,S]=(0,a.useState)(!1),[E,y]=(0,a.useState)(!1),T=(0,a.useRef)(!1),v=(0,u.v0)(e=>e),b=(0,r.ms)(v),A=(0,a.useCallback)(()=>
1{if(!T.current){let e;((e=document.documentElement.scrollHeight-window.innerHeight)>200&&window.scrollY>200||e<=200||0)&&(y(!0),T.current=!0)}},[]);return(0,a.useEffect)(()=>{let e=!0,t=async()=>{let n=await window.OneSignal;e&&n&&(s(!0),window.removeEventListener("web.alerts.sdk.snippet.loaded",t))};return window.addEventListener("web.alerts.sdk.snippet.loaded",t),t(),()=>{e=!1,window.removeEventListener("web.alerts.sdk.snippet.loaded",t)}},[i,b]),(0,a.useEffect)(()=>{let o=async()=>{w(await c(e))};n&&t&&i&&o()},[e,i,t,n]),(0,a.useEffect)(()=>{S(!!o)},[o]),(0,a.useEffect)(()=>{let e="Notification"in window&&Notification.permission;f(!!e&&"denied"!==e)},[]),(0,a.useEffect)(()=>(A(),window.addEventListener("scroll",A,{passive:!0}),()=>window.removeEventListener("scroll",A)),[A]),(0,a.useEffect)(()=>{!m&&h&&g&&E&&b?p(!0):p(!1)},[m,h,g,E,b]),l})(`${l.current}${E}`,y,E),{isPremium:j}=(0,p.A)();(0,a.useEffect)(()=>{let{hostname:e,href:t}=window.location;return l.current=`${e}`,w.current=t,()=>{l.current=null,w.current=null}},[]),(0,a.useEffect)(()=>{let{segments:e}=t,o=()=>{g({type:"SET_DATA",payload:{popupTitle:t.defaultTitle,segmentScope:t.defaultScope,segmentTag:t.defaultSegmentName,iconName:t.defaultIcon}})};if(!e||!e.length||T){T||o();return}let a=e.filter(e=>n.some(t=>e.tag===t.name)).map(e=>{let t=n.find(t=>e.tag===t.name);return{...e,isPrimary:t?.isPrimary}}),r=window.location.href,i=e.filter(e=>r.includes(e.scope));if(a.length){let e=a.filter(e=>e.isPrimary);e.length?g({type:"SET_DATA",payload:{popupTitle:e[0].title,segmentScope:e[0].scope,segmentTag:e[0].segmentName,iconName:e[0].icon}}):g({type:"SET_DATA",payload:{popupTitle:a[0].title,segmentScope:a[0].scope,segmentTag:a[0].segmentName,iconName:a[0].icon}})}else i.length?g({type:"SET_DATA",payload:{popupTitle:i[0].title,segmentScope:i[0].scope,segmentTag:i[0].segmentName,iconName:i[0].icon}}):o()},[T,n,t]),(0,a.useEffect)(()=>{A&&!_&&g({type:"SET_ICON_URL",payload:`/assets/${e}/logos/web-alerts/web-alert-${A}.png`})},[A,_,e]);let U=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!U.current&&$&&T&&E&&_&&A){if(U.current=!0,s)return void v(l.current,w.current,R,O,y,E,j);g({type:"SHOW_MODAL"}),R("WEB_ALERTS:REACH_PROMPT_DISPLAYED",{componentTitle:"",linkURL:w.current,...O})}},[$,T,E,_,A,s,R,O,y,j]);let P=(0,a.useCallback)(()=>{h(`${k}:${l.current}${E}`,C.DENIED,L.DECLINE),R("WEB_ALERTS:REACH_PROMPT_DECLINED",{componentTitle:"",linkURL:w.current,...O}),g({type:"HIDE_MODAL"})},[k,C,L,E,R,O]),B=(0,a.useCallback)(()=>{v(l.current,w.current,R,O,y,E,j),R("WEB_ALERTS:REACH_PROMPT_ACCEPTED",{componentTitle:"",linkURL:w.current,...O}),g({type:"HIDE_MODAL"})},[R,O,y,E,j]);return S&&S?(0,o.jsx)(m.A,{"data-testid":"web-alert-modal",onClose:D,outsideClickClose:!1,preventBodyScroll:!1,children:(0,o.jsx)(I,{"data-testid":"web-alert-component",iconUrl:_,onClose:P,publicationName:T,subscribe:B})}):null}},16528:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n(95155),a=n(76679),r=n.n(a);let i=({children:e,dataTestId:t,className:n,contentType:a,dataTmDataTrack:i,dataTmdatatrackType:s})=>{let l=`${r()["paragraph-text"]}${n?` ${n}`:""}`;return"opinion"===a&&r()["drop-cap"]&&(l+=` ${r()["drop-cap"]}`),(0,o.jsx)("p",{className:l,"data-testid":t||null,"data-tmdatatrack":i,"data-tmdatatrack-type":s,children:e})}},22355:e=>{e.exports={"comments-wrapper":"CommentBox_comments-wrapper__HkHu7","comments-wrapper-no-ads":"CommentBox_comments-wrapper-no-ads__lEK0a","viafoura-wrapper":"CommentBox_viafoura-wrapper__jxHX0"}},23616:e=>{e.exports={"sharebar-wrapper":"ShareBar_sharebar-wrapper__lc4gU","sharebar-inner-wrapper":"ShareBar_sharebar-inner-wrapper__D0YTf",whatsapp:"ShareBar_whatsapp__pnIxF"}},27463:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var o=n(95155),a=n(93423),r=n(29843),i=n(85767),s=n(89969),l=n(65823),c=n(46780),d=n(18692),u=n(50910),p=n(23616),m=n.n(p);let{WHATSAPP:w}=r.A,{ACTIVE:h}=a.A,f=function({socialPlatforms:e,dataTmDataTrack:t,displayOnlyIcons:n=!1,iconRight:a,buttonDesignType:r,url:p,commentingBoxEnabled:f,publication:g,vfContainerId:S="",vfUUId:E,headlineText:y=""}){let T=[`button-${r}`];n&&T.push("button-has-fixed-dimensions");let v=(0,u.c3)("components.molecules.ShareBar");return(0,o.jsxs)("div",{className:m()["sharebar-wrapper"],children:[(0,o.jsxs)("div",{className:m()["sharebar-inner-wrapper"],children:[(0,o.jsx)("ul",{children:e?Object.values(e).map(e=>
1e.shareContent?.status===h&&(0,o.jsx)("li",{className:e.name===w?m().whatsapp:void 0,children:(0,o.jsx)(i.default,{analyticsData:(0,c.A)("SOCIAL_SHARE",p||"",{componentTitle:e.name,componentID:"",componentText:"",eventAttributes:{eventLocation:"share bar",eventTargetPlatform:e.name}}),children:(0,o.jsx)(d.A,{ariaLabel:`${v("shareOn")} ${e.name}, ${v("linkOpenNewTab")}`,design:r,hideLabel:a,href:`${e.shareContent.url}${p}&text=${encodeURIComponent(y)}`,htmlTitle:`${v("shareOn")} ${e.name}`,icons:e?.name&&{icon:e.name}||void 0,isLink:!0,label:e.name,rel:"noreferrer",social:"social-opinion"!==r?e?.name:void 0,target:"_blank",tracking:{dataTmDataTrack:t,dataTmDataTrackName:e.name,dataLinkTracking:`${e.name.toLowerCase()}|share|top`,dataTrackUrl:p}})})},e.name)):null}),(0,o.jsx)(i.default,{analyticsData:(0,c.A)("SOCIAL_SHARE",p||"",{componentTitle:"Copy Link",componentID:"",componentText:"",eventAttributes:{eventLocation:"share bar",eventTargetPlatform:"Copy Link"}}),children:(0,o.jsx)(l.A,{buttonDesignType:"social-opinion"===r?"social-opinion":"primary",dataTmDataTrack:t,url:p})})]}),f?(0,o.jsx)(s.default,{publication:g,vfContainerId:S,vfUUId:E}):null]})}},29843:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});let o={FACEBOOK:"Facebook",X:"X",INSTAGRAM:"Instagram",TIKTOK:"TikTok",YOUTUBE:"Youtube",SNAPCHAT:"Snapchat",WHATSAPP:"WhatsApp",NEXTDOOR:"NextDoor",TWITTER:"Twitter",LINKEDIN:"LinkedIn"}},33116:(e,t,n)=>{"use strict";n.d(t,{Dv:()=>a,LP:()=>r,a6:()=>i});var o=n(29549);let a={get:()=>{if("u">typeof localStorage){let e=localStorage.getItem("auth-user");if(e)try{return JSON.parse(e)}catch(e){console.error("Failed to parse auth-user from localStorage",e)}}return null},set:e=>{"u">typeof localStorage&&localStorage.setItem("auth-user",JSON.stringify(e))},delete:()=>{"u">typeof localStorage&&(localStorage.removeItem("auth-user"),localStorage.setItem("loggedOut","true"),localStorage.removeItem("logged-via"))}},r={set:e=>{"u">typeof localStorage&&(localStorage.setItem("auth-token",JSON.stringify(e)),localStorage.setItem("loginRadiusToken",e.accessToken));let t=a.get()?.LastLoginDate;(0,o.TV)("rememberMe",JSON.stringify({access_token:e.accessToken,refresh_token:e.refreshToken,expires_in:e.expiresIn}),30,t)},delete:()=>{"u">typeof localStorage&&(localStorage.removeItem("auth-token"),localStorage.removeItem("loginRadiusToken"),localStorage.removeItem("logged-via")),(0,o.Ri)("rememberMe")&&(0,o.u6)("rememberMe")}},i=(e,t="",n="")=>({accessToken:e,refreshToken:t,expiresIn:n})},42311:e=>{e.exports={"button-container":"CopyButton_button-container__F12f4"}},50399:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var o=n(12115),a=n(29549);function r(){let e="1"===(0,a.Ay)("_pc_is-premium","0").value,[t,n]=(0,o.useState)(e),r=(0,o.useCallback)(e=>{e?.detail&&"boolean"==typeof e.detail.isPremium&&n(e.detail.isPremium)},[]);return(0,o.useEffect)(()=>(window.addEventListener("auth-ui.pianoPremiumStatusChanged",r),()=>{window.removeEventListener("auth-ui.pianoPremiumStatusChanged",r)}),[r]),{isPremium:t,setIsPremium:n}}},50995:e=>{e.exports={notification:"Notification_notification__LJpZd"}},52325:e=>{e.exports={modal:"Modal_modal__CkaTg","modal-bottom-aligned":"Modal_modal-bottom-aligned__UBA4w"}},56242:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var o=n(95155),a=n(65242),r=n(12115),i=n(12669),s=n(47665),l=n(54632),c=n(7263),d=n(98109),u=n(772),p=n(8438),m=n(81339),w=n(22355),h=n.n(w);let f=({isAuthFlowEnabled:e=!1,containerId:t="any-random-article-id",testId:n="viafoura-wrapper",commentingEnabled:w=!1})=>{let f={event:"CommentAdded",componentCategory:"DirectEngagement",componentType:"Commenting",linkURL:window.location.href},g=(0,r.useRef)(0),S=(0,u.iF)(),E=(0,c.KQ)(),y=(0,m.St)(),T=(0,d.q)(),{allowCommentAds:v}=(0,p.A)(),{isLoggedIn:b,logoutAction:A,openModal:_,authUser:k,promptUsername:C,authToken:L}=(0,a.T)(e=>({isLoggedIn:e.state.client.isAuthenticated,authUser:e.state.client.authUser,authToken:e.state.client.authToken,logoutAction:e.actions.logout,openModal:e.actions.openModal,promptUsername:e.actions.promptUsername})),R=(()=>{let[e,t]=(0,r.useState)(!1);(0,r.useEffect)(()=>{window.vfQ=window.vfQ||[],window.vfQ.push(()=>{t(!0)}),window.vf&&t(!0)},[]);let n=(0,r.useCallback)(e=>{window?.vf?.session?.login?.loginRadius?.(e)},[]);return{isVfReady:e,login:n,logout:(0,r.useCallback)(()=>{window?.vf?.session?.logout?.()},[]),listeners:{onAdSlotAvailable:(0,r.useCallback)(e=>{window?.vf?.$subscribe?.("vf-ads","requestCommentAd",e)},[]),onCommentPrepublish:(0,r.useCallback)(e=>{window?.vf?.$prepublish?.(e)},[]),onCommentCreated:(0,r.useCallback)(e=>{window?.vf?.$subscribe?.("comment","created",e)},[]),onCommentReplied:(0,r.useCallback)(e=>{window?.vf?.$subscribe?.("comment-reply","posted",e)},[]),onVfReady:(0,r.useCallback)(e=>{window.vfQ=window.vfQ||[],window.vfQ.push(async()=>{e()})},[])}}})(),I=e=>{let t=e?document.getElementById(e):null;if(!t)return;let n=t.closest(".vf-promo-gtag");n&&(n.style.display="block"),g.current+=1,(0,i.createRoot)(t).render((0,o.jsx)(m.nE.Provider,{value:y,children:(0,o.jsx)(u.t.Provider,{value:S,children:(0,o.jsx)(c.PB.Provider,{value:E,children:(0,o.jsx)(d.c.Provider,{value:T,children:(0,o.jsx)(l.default,{location:"comment-section",position:g.current})})})})}))};return(0,r.useEffect)(()=>{R.isVfReady&&w&&e&&(R.listeners.onCommentCreated(()=>{(0,s.A)({...f,event:"CommentAdded",componentAction:"Comment Added"})}),R.listeners.onCommentReplied(()=>{(0,s.A)({...f,event:"CommentReplied",componentAction:"Comment Replied"})}))},[R.isVfReady,w,e]),(0,r.useEffect)(()=>
1{if(R.isVfReady){let t=k?.UserName&&k.UserName!==k.Email[0].Value;w&&e&&(v&&R.listeners.onAdSlotAvailable(I),R.listeners.onCommentPrepublish((e,n,...o)=>"authentication"===e&&"needed"===n?(b&&k?t&&L?R.login(L.accessToken):C():_("comments"),!1):"authentication"===e&&"logout"===n?(R.logout(),A(),!1):{channel:e,event:n,args:o}));let n=b&&t&&L&&w;b||R.logout(),n&&e&&R.login(L.accessToken)}},[R.isVfReady,b,k,L]),(0,r.useEffect)(()=>{if("u"<typeof document)return;let e=new MutationObserver(()=>{let t=document.querySelector("#comments-wrapper article.vf-tabbed-views");t&&(t.insertAdjacentHTML("beforebegin",'Commenting is subject to our <a href="/community-standards/">house rules</a>.'),e.disconnect())});e.observe(document.body,{childList:!0,subtree:!0})},[]),(0,o.jsxs)("div",{id:"comments-wrapper","data-testid":n,className:h()[v?"comments-wrapper":"comments-wrapper-no-ads"],style:{overflow:"clip"},children:[(0,o.jsx)(l.default,{location:"above-comment-section",position:1}),(0,o.jsx)("div",{className:`viafoura ${h()["viafoura-wrapper"]}`,children:(0,o.jsx)("vf-conversations",{"vf-container-id":t})})]})}},57092:e=>{e.exports={"disclosure-notice":"DisclosureNotice_disclosure-notice__LgLFU"}},64187:e=>{e.exports={"web-alert-main-container":"WebAlert_web-alert-main-container__ysEvW","web-alert-container":"WebAlert_web-alert-container__TOmlw"}},65242:(e,t,n)=>{"use strict";n.d(t,{WithLoginContext:()=>f,T:()=>g});var o=n(95155),a=n(12115),r=n(60150),i=n(31692),s=n(66373),l=n(84018),c=n(29991),d=n(33116);let u=()=>{((e="registration-wall-registered")=>{window.dispatchEvent(new CustomEvent("auth-ui.state-prompt",{detail:{origin:e}}))})(),localStorage.setItem("localLastLoginDate",new Date().toJSON())},p=["irishstar","themirror","express","the-express"];var m=n(5897),w=n(87358);let h=(0,a.createContext)(void 0),f=({children:e})=>{var t,n;let f,g;return(0,o.jsx)(m.default,{children:(0,o.jsx)(h.Provider,{value:(t=(e=>{let t=void 0!==window.localStorage,n=null,o=null;if(t){let e=localStorage.getItem("auth-user");if(e)try{n=JSON.parse(e)}catch(e){console.error("Failed to parse auth-user from localStorage",e),n=null}let t=localStorage.getItem("auth-token");if(t)try{o=JSON.parse(t)}catch(e){console.error("Failed to parse auth-token from localStorage",e),o=null}}return{...s.B6,client:{...s.B6.client,isAuthenticated:!!n,isMenuOpened:!1,authUser:n,authToken:o,isUsaPublication:(()=>{let e=null,{hostname:t}=window.location;if(t?.endsWith(".com")){let n=t.split(".");e=n[n.length-2]}else"localhost"===t&&(e="express");return p.includes(e)})(),origin:"unknown",loginEnv:{host:e}}}})(w.env.ENVIRONMENT||c.jF.DEV),(f=(0,r.vt)((0,i.eh)((0,i.lt)(e=>({state:{...t},actions:{updateUser:t=>{d.Dv.set(t),e(({state:e})=>({state:{...e,...t}}))},setLoggedInStatus:(t,n)=>{e(({state:e})=>({state:{...e,client:{...e.client,isAuthenticated:t,authUser:n||null}}}))},login:(t,n,o)=>e(({state:e})=>({state:{...e,client:{...e.client,authToken:n||null,authUser:t,isAuthenticated:!0,...o?{origin:o}:{}}}})),promptUsername:()=>{window.dispatchEvent(new CustomEvent("auth-ui.complete-profile",{detail:{origin:"comments",fields:["username"]}}))},checkResidency:(e=!1)=>{let{client:t}=f.getState().state;if(t.isAuthenticated&&t.authUser&&t.isUsaPublication){if(e)return void u();let{CustomFields:n}=t.authUser,o=n?.UsaResidencyState,a=null;if(o)try{a=JSON.parse(o).LastUpdated}catch(e){console.error("Failed to parse UsaResidencyState",e)}let r=o&&Date.now()-new Date(a).getTime()>=316224e5,i=localStorage.getItem("closedSor"),s=i&&Date.now()-new Date(i).getTime()<864e5,l=!!localStorage.getItem("displaySor"),c=(!o||o.includes("answer not provided"))&&!l&&!s;(l&&!i||l&&!s||r||c)&&u(),!l&&i&&localStorage.removeItem("closedSor")}},logout:t=>e(({state:e})=>({state:{...e,client:{...e.client,authToken:null,authUser:null,isAuthenticated:!1,origin:t||"unknown"}}})),openModal:t=>{var n;let o=t;if(!t){let{state:e}=f.getState();o=e.client.origin||"unknown"}return n=o,window.dispatchEvent(new CustomEvent("auth-ui.authenticate",{detail:{origin:n}})),e(({state:e})=>({state:{...e,client:{...e.client,origin:o,isDialogOpened:!0}}}))},toggleMenu:()=>e(({state:e})=>({state:{...e,client:{...e.client,isMenuOpened:!e.client.isMenuOpened}}})),closeMenu:()=>e(({state:e})=>({state:{...e,client:{...e.client,isMenuOpened:!1}}})),setToken:t=>{t?d.LP.set(t):d.LP.delete(),e(({state:e})=>({state:{...e,client:{...e.client,authToken:t}}}))},getToken:async()=>{let{state:t}=f.getState(),n=t.client.authToken;
1if(n?.expiresIn&&new Date(n.expiresIn)<new Date(Date.now()+6e5))return n;let o=await (0,l.Sy)((0,l.aU)(t.client.loginEnv.host),n?.refreshToken);return e(({state:e})=>({state:{...e,client:{...e.client,authToken:o}}})),o},setOrigin:t=>{localStorage.setItem("lr-position",t),e(({state:e})=>({state:{...e,client:{...e.client,origin:t}}}))},toPrevPage:(e=!1)=>{let t=localStorage.getItem("last-page-visited");(t&&t!==window.location.href||`${window.location.origin}/`!==window.location.href)&&(t?window.location.href=t+(e?"?au_route=email":""):window.location.href=window.location.origin+(e?"?au_route=email":""))}}}),{name:"login"})))).subscribe(({state:e})=>e.client.authToken,e=>{e?d.LP.set(e):d.LP.delete()}),f.subscribe(({state:e})=>e.client.authUser,e=>{e?d.Dv.set(e):d.Dv.delete()}),f.subscribe(({state:e})=>e.client.isAuthenticated,e=>{if(e){let{state:e}=f.getState(),{authUser:t,origin:n}=e.client;window.dispatchEvent(new CustomEvent("auth-ui.authentication",{detail:{origin:n||"unknown",isAuthenticated:!0,user:t,stopPropagation:!0}}))}else{let{state:e}=f.getState(),{origin:t}=e.client;window.dispatchEvent(new CustomEvent("auth-ui.logout",{detail:{origin:t||"unknown"}})),f.getState().actions.toPrevPage()}}),n=f,(g=(0,a.useRef)(null)).current||(g.current=n),g.current),children:e})})},g=e=>{let t=(0,a.useContext)(h);if(!t)throw Error("useLoginStoreContext must be used within LoginStoreProvider");return(0,r.Pj)(t,e)}},65823:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var o=n(95155),a=n(12115);let r=({color:e})=>(0,o.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{opacity:"0.16",cx:"12",cy:"12",r:"9",fill:e}),(0,o.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M15 10L11 14L9 12",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});var i=n(50995),s=n.n(i);let l=({text:e})=>(0,o.jsxs)("div",{className:s().notification,children:[(0,o.jsx)("label",{children:e}),(0,o.jsx)(r,{color:"var(--color-sem-icon-primary-default)"})]});var c=n(76203),d=n(40545),u=n(18692),p=n(50910),m=n(42311),w=n.n(m);let h=({dataTmDataTrack:e,url:t,isLink:n=!0,buttonDesignType:r="primary"})=>{let[i,s]=(0,a.useState)(!1),m=(0,p.c3)("components.atoms.CopyButton"),h=async()=>{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),3e3)}catch(n){let e=(0,d.A)("file:///drone/src/src/components/atoms/CopyButton/CopyButton.tsx"),t="";t=window.location.href,(0,c.A)().error({message:`Url- ${t} file - ${e} Error copying link`,error:n})}};return(0,o.jsxs)("div",{className:w()["button-container"],"data-testid":"copy-button",children:[(0,o.jsx)(u.A,{design:r,ariaLabel:"copy link",dataTestId:"copy-link",icons:{icon:"link"},isLink:n,onClick:h,htmlTitle:m("copyLink"),tracking:{dataTmDataTrack:e,dataTmDataTrackName:"copy-link"}}),i&&(0,o.jsx)(l,{text:m("linkCopied")})]})}},81660:e=>{e.exports={"byline-container":"Byline_byline-container__K_Owl","byline-content-wrapper":"Byline_byline-content-wrapper__Imque",affiliate:"Byline_affiliate__x6U8c","author-badge-date-wrapper":"Byline_author-badge-date-wrapper__Q7jj1","affiliate-wrapper":"Byline_affiliate-wrapper__1OUZX","author-and-badge-wrapper":"Byline_author-and-badge-wrapper__2dsv1"}},84018:(e,t,n)=>{"use strict";n.d(t,{AF:()=>m,BI:()=>S,Gy:()=>p,Sy:()=>u,VF:()=>c,W6:()=>h,Wr:()=>f,aU:()=>s,e0:()=>g,k9:()=>d,lw:()=>w});var o=n(27263),a=n(40545);let r="https://api.loginradius.com/identity/v2",i=(0,a.A)("file:///drone/src/src/components/organisms/AuthModal/utilities/ApiCalls.ts"),s=e=>e===o.u0?"https://5yep17ytxf.execute-api.eu-west-1.amazonaws.com/prod":e===o.IJ?"https://d2054971f8.execute-api.eu-west-1.amazonaws.com/bertha":"https://zrs0iux2f6.execute-api.eu-west-1.amazonaws.com/stable",l=async e=>{let t,n=new URL(`https://config.lrcontent.com/ciam/consent?apikey=${e}`);try{t=await fetch(n.toString(),{mode:"cors",method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}})}catch(e){throw console.error(`${i} Api Client Error: `,e),e}let o=await t.json();if(t.ok)return o;throw Error(`HTTP error! status: ${t.status}`)},c=async(e,t,n,o)=>{let a,s=new URL(`${r}/auth/consent?apikey=${e}`);s.searchParams.append("consenttoken",t);let l={mode:"cors",method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({Events:[{Event:"Register",IsCustom:!1}],Data:[{ConsentOptionId:n,IsAccepted:o}]})};try{a=await fetch(s.toString(),l)}catch(e){throw console.error(`${i} Api Client Error: `,e),e}let c=await a.json();if(!a.ok)throw Error(`HTTP error! status: ${a.status}`);return c},d=async(e,t)=>{let n,o={mode:"cors",method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:`Bearer ${t}`}},a=new URL(`${r}/auth/access_token/Validate?apikey=${e}`);try{n=await fetch(a.toString(),o)}catch(e){throw console.error(`${i} Api Client Error: `,e),e}let s=await n.json();if(!n.ok)throw Error(`HTTP error! status: ${n.status}`);return s},u=async(e,t)=>{let n=new URL(`${e}/token`),o=await fetch(n.toString(),{mode:"cors",method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"},params:{refreshToken:t}}),a=await o.json();if(!o.ok)throw Error("API response nok");if(!a)throw Error("No token found in response");return{accessToken:a.access_token,refreshToken:a.refresh_token,expiresIn:a.expires_in}},p=async(e,t,n)=>
1{let o,a=!!(n.customRegistrationSource||n.NewsletterSubscriptionShown||n.CustomLoginSource||n.LastVisited||n.usResidencyStatus||n.Reach_MktOptIn),i={..."string"==typeof n.username&&{Username:n.username},..."string"==typeof n.firstName&&{FirstName:n.firstName},..."string"==typeof n.lastName&&{LastName:n.lastName},...a&&{CustomFields:{..."string"==typeof n.customRegistrationSource&&{CustomRegistrationSource:n.customRegistrationSource},..."string"==typeof n.NewsletterSubscriptionShown&&{NewsletterSubscriptionShown:n.NewsletterSubscriptionShown},..."string"==typeof n.NewslettersSubscribed&&{NewslettersSubscribed:n.NewslettersSubscribed},..."string"==typeof n.CustomLoginSource&&{CustomLoginSource:n.CustomLoginSource},..."number"==typeof n.LastVisited&&{LastVisited:n.LastVisited},..."string"==typeof n.LastVisitedURL&&{LastVisitedURL:n.LastVisitedURL},..."string"==typeof n.usResidencyStatus&&{USStateOfResidence:n.usResidencyStatus},..."string"==typeof n.Reach_MktOptIn&&{Reach_MktOptIn:n.Reach_MktOptIn}}},GravatarImageUrl:null},s=new URL(`${r}/auth/account?apikey=${e}`),l={mode:"cors",method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(i)};try{o=await fetch(s.toString(),l)}catch(e){throw console.error("Api request failed: ",e),e}let c=await o.json();if(!o.ok)throw console.error("API Error: ",c),Error("API response nok",{cause:c});return c},m=async(e,t,n)=>{let o,a=new URL(`${r}/auth/account?apikey=${e}`);n&&a.searchParams.append("welcomeEmailTemplate",n);let s={mode:"cors",method:"GET",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${t}`}};try{o=await fetch(a.toString(),s)}catch(e){throw console.error(`${i} Api Client Error: `,e),e}let l=await o.json();if(!o.ok)if(1226===l.ErrorCode)throw{name:"ConsentError",message:"User not found, needs consent",code:1226,consentToken:l.Data.ConsentToken,consentName:l.Data.Events[0].Name};else throw Error(`API Error: ${l}`);return l},w=async(e,t)=>{let n,o,a=`${e}/delete`,r=new URL(`${a}?token=${t}`);try{n=await fetch(r.toString())}catch(e){throw console.error("Api Client Error: ",e),e}try{o=await n.json()}catch(e){throw console.error("Error parsing JSON response: ",e),e}if(n.ok)return{message:"Account deleted successfully",isDeleted:o.isDeleted};throw o},h=async(e,t)=>{let n,o=new URL(`${r}/auth/username?apikey=${e}`);o.searchParams.append("username",t);try{n=await fetch(o.toString(),{mode:"cors",method:"GET",headers:{Accept:"application/json","Content-Type":"application/x-www-form-urlencoded"}})}catch(e){throw console.error(`${i} Api Client Error: `,e),e}let a=await n.json();if(!n.ok)throw Error(`HTTP error! status: ${n.status}`);return!a.IsExist},f=async(e,t)=>{let{consentId:n}=(await l(e)).map(e=>{let t=e.ConsentForm.find(e=>"Consent"===e.Type);if(!t)return null;let n=t.Consents.shift();return n?{events:e.Events.map(e=>e.Name),consentId:n.ConsentId,title:n.Title,description:n.Description,isRequired:n.IsRequired}:null}).find(e=>e.events.some(e=>e===t||"Register"));return n},g=async(e,t,n,o,a,i)=>{let s=window.location,l=window.history.state,c=`${e}/RequestHandler.aspx?apikey=${t}&provider=${o}&callbacktype=hash&callback=${s}&is_access_token=true&disablesignup=undefined&scope=&ac_linking=true`,d=window.outerHeight/2+window.screenY-225,u=window.outerWidth/2+window.screenX-225,p=`menubar=1,resizable=1,width=450,height=450,scrollbars=1,left=${u},top=${d}`,m=window.open(c,"account-link-window",p),w=!1,h=async e=>{w=!0;let{hash:o}=window.location,s=/^#lr-token=([a-z0-9-]+)$/.exec(o);if(null!==s){let o;e.preventDefault(),void 0!==window.history&&((o=new URL(window.location.href)).hash="",window.history.replaceState({...l},"",o.toString()));let c={mode:"cors",method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${n?.accessToken}`},body:JSON.stringify({candidatetoken:s[1]})};try{let e=new URL(`${r}/auth/socialidentity?apikey=${t}`),n=await fetch(e.toString(),c),o=await n.json();a(o)}catch(e){throw console.error(e),i(!1),e}}},f=setInterval(()=>{w||m&&!m.closed||(clearInterval(f),i(!1))},500);window.addEventListener("hashchange",e=>h(e))},S=async(e,t,n,o)=>{let a={mode:"cors",method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${o.accessToken}`},body:JSON.stringify({provider:t,providerid:n})},i=new URL(`${r}/auth/socialidentity?apikey=${e}`),s=await fetch(i.toString(),a);return await s.json()}},89969:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var o=n(95155),a=n(12115),r=n(40545);async function i({sectionUuid:e,articleId:t}){let n,o=`https://livecomments.viafoura.co/v4/livecomments/${e}/content-containers/comment-count-and-status/by-container-ids`,a={mode:"cors",method:"POST",headers:{Accept:"application/json","Content-Type":"*/*"},body:JSON.stringify("object"==typeof t?t:[t])};try{n=await fetch(o,a)}catch(t){let e=(0,r.A)("file:///drone/src/src/helpers/viafoura/commentCount.ts");throw console.error(`${e} Api Error: `,t),t}let s=await n.json();if(!n.ok)throw Error(`HTTP error! status: ${n.status}`);return s}var s=n(63808),l=n(50910),c=n(96074),d=n(18692);let u=({count:e,testId:t,vfContainerId:n,vfUUId:u,publication:p})=>{let[m,w]=(0,a.useState)(),h=(p&&(0,c.qu)(p)?.extraFont)??void 0;(0,a.useEffect)(()=>{(async()=>
1{if(u)try{let e=await i({articleId:n||"",sectionUuid:u});w(e[0].commentCount)}catch(t){let e=(0,r.A)("file:///drone/src/src/components/atoms/CommentButton/CommentButton.tsx");console.error(`${e} Error fetching article comment count:`,t)}})()},[u,n]);let f=(0,l.c3)("components.atoms.CommentButton");return(0,o.jsx)("div",{className:"comment-button",children:(0,o.jsx)(d.A,{ariaLabel:f("ariaLabel"),design:"primary",isLink:!0,href:"#comments-wrapper",label:f("label"),customFont:h,icons:{icon:"comment"},count:e&&e||m&&m,hideLabel:"small"===(0,s.A)(),dataTestId:t,htmlTitle:f("htmlTitle")})})}},91851:e=>{e.exports={"breadcrumb-nav":"Breadcrumb_breadcrumb-nav__xTgNR","logo-item":"Breadcrumb_logo-item__ZVrEQ","list-item":"Breadcrumb_list-item__jsYOq"}},93423:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});let o={ACTIVE:"active",INACTIVE:"inactive"}},95404:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var o=n(95155),a=n(12115),r=n(52325),i=n.n(r);let s=({onClose:e,outsideClickClose:t,preventBodyScroll:n,bottomAlign:r,overRideStyles:s,...l})=>{let c=t=>{let n=document.getElementById("modal");n?.contains(t.target)||e?.()};return(0,a.useEffect)(()=>(n&&(document.body.style.height="100%",document.body.style.overflow="hidden"),t&&e&&document.addEventListener("click",c),()=>{t&&e&&document.removeEventListener("click",c),n&&(document.body.style.overflow="auto",document.body.style.height="auto")}),[n,t]),r?(0,o.jsx)("div",{id:i()["modal-bottom-aligned"],className:s,"data-testid":"pop-up-modal",...l,children:l.children}):(0,o.jsx)("div",{id:i().modal,...l,"data-testid":"pop-up-modal",children:l.children})}}}]);
2//# sourceMappingURL=6616-46fb54d05f2b72e1.js.map

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.