(()=>{var e={91238(e,t,n){var o=n(27650).Symbol;e.exports=o},84847(e,t,n){var o=n(91238),r=n(31034),i=n(56713),a=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):i(e)}},77687(e,t,n){var o=n(41725),r=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(r,""):e}},20683(e,t,n){var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},31034(e,t,n){var o=n(91238),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,s=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var o=!0}catch(e){}var r=a.call(e);return o&&(t?e[s]=n:delete e[s]),r}},56713(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},27650(e,t,n){var o=n(20683),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},41725(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},49852(e,t,n){var o=n(80320),r=n(3819),i=n(67167),a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,l,u,d,m,p,f=0,b=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=c,o=l;return c=l=void 0,f=t,d=e.apply(o,n)}function y(e){var n=e-p;return void 0===p||n>=t||n<0||h&&e-f>=u}function v(){var e=r();if(y(e))return x(e);m=setTimeout(v,function(e){var n=t-(e-p);return h?s(n,u-(e-f)):n}(e))}function x(e){return m=void 0,g&&c?w(e):(c=l=void 0,d)}function _(){var e=r(),n=y(e);if(c=arguments,l=this,p=e,n){if(void 0===m)return function(e){return f=e,m=setTimeout(v,t),b?w(e):d}(p);if(h)return clearTimeout(m),m=setTimeout(v,t),w(p)}return void 0===m&&(m=setTimeout(v,t)),d}return t=i(t)||0,o(n)&&(b=!!n.leading,u=(h="maxWait"in n)?a(i(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),_.cancel=function(){void 0!==m&&clearTimeout(m),f=0,c=p=l=m=void 0},_.flush=function(){return void 0===m?d:x(r())},_}},80320(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},26487(e){e.exports=function(e){return null!=e&&"object"==typeof e}},74151(e,t,n){var o=n(84847),r=n(26487);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==o(e)}},3819(e,t,n){var o=n(27650);e.exports=function(){return o.Date.now()}},64015(e,t,n){var o=n(49852),r=n(80320);e.exports=function(e,t,n){var i=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return r(n)&&(i="leading"in n?!!n.leading:i,a="trailing"in n?!!n.trailing:a),o(e,t,{leading:i,maxWait:t,trailing:a})}},67167(e,t,n){var o=n(77687),r=n(80320),i=n(74151),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";const e="independent.co.uk",t="esi_puid",o="__DEBUG__";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function c(e){for(var t=1;t(((e,t={})=>{const n=JSON.stringify(t,null,2),o=n.split("\n").reduce((e,t)=>t.length>=e?t.length:e,0),r=e.length,i=Math.max(r,o),a=` ${e.padEnd(i)} `,s=n.split("\n").map(e=>` ${e.padEnd(i)} `),c=s.length>1?`%c${s.slice(0,1)}\n%c${s.slice(1,-1).join("\n")}\n%c${s.slice(-1)}\n`:`%c${s[0]}\n`,l=s.length>1?["font-family:monospace; background: #333; color: #eee; padding-top: 5px;","font-family:monospace; background: #333; color: #eee;","font-family:monospace; background: #333; color: #eee; padding-bottom: 10px; border-radius: 0 0 6px 6px"]:["font-family:monospace; background: #333; color: #eee; padding-top: 5px; padding-bottom: 10px; border-radius: 0 0 6px 6px"];console.log(`%c${a}\n${c}`,"font-family:monospace; background: #333; color: #eee; border-bottom: 1px solid #666; padding: 5px 0; border-radius: 6px 6px 0 0",...l)})(`CustomEvent: ${e}`,t),new CustomEvent("analytics-trigger",{detail:{data:c({},t),eventName:e}})),u=(e,t)=>{return n=l(e,t),void document.body.dispatchEvent(n);var n};const d=(e={})=>u("comment",e),m=(e={})=>u("load_more_comments",e);const p=(e,t=null)=>{var n,o;const r=`; ${document.cookie}`.split(`; ${e}=`);return 2===r.length?decodeURIComponent(null!==(n=null===(o=r.pop())||void 0===o?void 0:o.split(";").shift())&&void 0!==n?n:""):t},f=e=>{const t=document.createElement("div");return t.style.cssText=`position: absolute; top: ${e}%; left: 0; width: 0; height: 1px; pointer-events: none;`,t.dataset.scrollDepth=`${e}`,t},b=(e,t)=>{const n=new IntersectionObserver(o=>{var r;null!==(r=o[0])&&void 0!==r&&r.isIntersecting&&(t(),n.disconnect(),e.remove())},{threshold:0});n.observe(e)},h=e=>{[25,50,75].forEach(t=>{const n=f(t);e.appendChild(n),b(n,()=>{((e={})=>{u("article_scroll_depth",e)})({article_percent_scrolled:t})})})},g=e=>{const t=f(100);e.appendChild(t),b(t,()=>{u("article_complete")})},w=()=>{const e=document.getElementById("main");var t,n;[(null===(t=window.JSGlobals.article)||void 0===t?void 0:t.isNews)&&"true"===p("feat__article_complete_tracking_news"),(null===(n=window.JSGlobals.article)||void 0===n?void 0:n.isCommercial)&&"true"===p("feat__article_complete_tracking_commercial")].some(Boolean)&&e&&((e=>{"static"===window.getComputedStyle(e).position&&(e.style.position="relative")})(e),h(e),g(e))},y="indy_affiliate_user_id",v=()=>{const e=(()=>{try{const e=localStorage.getItem(y);if(!e)return null;const t=JSON.parse(e);if(t.expiresAt>Date.now())return t.id}catch(e){}return null})();if(e)return e;const t="undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});return(e=>{try{const t={id:e,expiresAt:Date.now()+63072e6};localStorage.setItem(y,JSON.stringify(t))}catch(e){}})(t),t},x=["ascsubtag","subtag","subid","sub_id","clickref","click_ref","pubref","aff_sub","affsub","aff_sub2","aff_sub3","aff_sub4","aff_sub5","urclick","awc","awclickref","sid","u1","afftrack","subId","subId1","subId2","subId3","sharedid","sharedId","tduid","publisher_sub_name","epire","clickId","clickid","customid","customId","xcust","fobs","rfsn","af_sub1","af_sub2","af_sub3","af_sub4","af_sub5"],_=["u","q","url","link","redirect","destination","plainlink","dest","target","goto","forward","outbound","r","DL","ued","murl","UL","urllink","urltarget","urldest"],O=["cuid"],E=/(^|\.)((prf\.hn)|(pxf\.io)|(sjv\.io))$/i,j=/\/pubref:([^/]+)/,S=(e,t)=>{const n=`_${t}`;return e.endsWith(n)?e:`${e}${n}`},k=(e,t)=>{const n=`|uid:${t}`;return e.includes(n)?e:`${e}${n}`},$=(e,t,n=0)=>{if(n>6)return e;try{const o=new URL(e);let r=!1;return r||=((e,t)=>{let n=!1;for(const o of x){const r=e.searchParams.get(o);r&&(e.searchParams.set(o,S(r,t)),n=!0)}return n})(o,t),r||=((e,t)=>{if(!E.test(e.hostname))return!1;const n=`_${t}`;if(e.pathname.includes(n))return!0;const o=e.pathname.replace(j,(e,n)=>`/pubref:${S(n,t)}`);return o!==e.pathname&&(e.pathname=o,!0)})(o,t),r||=((e,t,n)=>{for(const o of _){const r=e.searchParams.get(o);if(!r)continue;const i=$(r,t,n+1);if(i!==r)return e.searchParams.set(o,i),!0}return!1})(o,t,n),r||=((e,t)=>{let n=!1;for(const o of O){const r=e.searchParams.get(o);r&&(e.searchParams.set(o,k(r,t)),n=!0)}return n})(o,t),r?o.toString():e}catch(t){return e}},P="js-comment",C="js-comment-count",I=["Registration is a free and easy way to support our truly independent journalism"];const T="ssr-auth-state",D="/internal-api",L=`${D}/comments/nickname/submit`,M="/login",A="/user/logout",N={foreground:31,background:41,light:"#AA0000",dark:"#ed4e4c"},B={foreground:33,background:43,light:"#AA5500",dark:"#d2c057"},R="light",F="dark",U=e=>e===o?"":`[${e.replace(/^_+|_+$/g,"")}]`,J=e=>`color: ${e};`,H=e=>("undefined"==typeof window||"function"!=typeof window.matchMedia?R:window.matchMedia("(prefers-color-scheme: dark)").matches?F:R)===F?e.dark:e.light,q=new Map,G=e=>{if("undefined"==typeof window)return"prod"!=={NODE_ENV:"production",npm_config_domain:""}.SERVER;if(!q.has(e)){var t;const n=new URLSearchParams(null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.search);q.set(e,n.has(e))}return q.get(e)||"true"===p(e)};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}let V;let z=0;const Q=()=>{return"undefined"!=typeof window&&(void 0===V&&(V=!0===(null===(e=window.JSGlobals)||void 0===e||null===(e=e.featureFlags)||void 0===e?void 0:e.feat__sentry)),V);var e},Y=(e,t)=>{const n=()=>G(o)||G(e),r=(e,n)=>{const o=t.filter(({tag:e})=>""!==e);if(0===o.length)return e;const r=o.map(({tag:e,color:t})=>{const o=null!=n?n:t,r=void 0!==o;return function(e){for(var t=1;te+t,""),u=r.filter(e=>"style"in e).map(({style:e})=>e);if("string"==typeof i){return"string"==typeof s&&s.includes("color")&&i.startsWith("%c")?[`${l} ${i}`,...u.concat(s),...c]:[l,...u,i,...e.slice(1)]}return[l,...u,...e]};return{log:(...e)=>{n()&&console.log(...z>0?e:r(e))},info:(...e)=>{n()&&console.info(...z>0?e:r(e))},group:(...e)=>{n()&&(console.group(...r(e)),z+=1)},groupCollapsed:(...e)=>{n()&&(console.groupCollapsed(...r(e)),z+=1)},groupEnd:(...e)=>{n()&&(z=Math.max(0,z-1),console.groupEnd(...e))},table:(...e)=>{n()&&console.table(...e)},warn:(...e)=>{var t;n()&&console.warn(...r(e,H(B))),Q()&&(null===(t=window.Sentry)||void 0===t||t.captureException(...e))},error:(...e)=>{var t;n()&&console.error(...r(e,H(N))),Q()&&(null===(t=window.Sentry)||void 0===t||t.captureException(...e))},extend:(n,o)=>Y(e,[...t,{tag:n,color:o}]),logDate:e=>e.toLocaleString("en-GB",{timeZone:"UTC"})}},K=(({flagName:e,tagSegment:t={}})=>{const{tag:n,color:o}=t;return Y(e,[{tag:null!=n?n:U(e),color:o}])})({flagName:o}),{log:Z,info:X,warn:ee,error:te,group:ne,groupEnd:oe,logDate:re}=K;let ie;function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function se(e){for(var t=1;t{try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t));return JSON.parse(n)}catch(e){return null}};function le(){if(void 0===globalThis.window)return null;const e=(()=>{var e;const t=null!==(e=p("esi_auth"))&&void 0!==e?e:"";return ce(t)})();if(!e)return null;const{email:t,given_name:n,family_name:o,userStatus:r,pUid:i,exp:a,isAdFreeUser:s,isActiveRecurringDonator:c,adFreeExpiryTimestamp:l,recurringDonatorExpiryTimestamp:u,permutiveId:d}=e;return{email:t,givenName:n,familyName:o,userStatus:r,uid:i,exp:a,isAdFreeUser:s,isActiveRecurringDonator:c,adFreeExpiryTimestamp:l,recurringDonatorExpiryTimestamp:u,permutiveId:d}}const ue="AUTHENTICATED";var de;function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}const pe=Math.random().toString(36).slice(2),fe={status:"ANONYMOUS",loading:!1,__id__:pe},be=null!==(de="undefined"!=typeof window?function(e=document){if(void 0===e)return null;if(void 0!==ie)return ie;const t=e.getElementById(T),n=null==t?void 0:t.textContent;let o=null;try{if(!n)throw new Error("No auth snapshot found in DOM");o=JSON.parse(atob(n))}catch(e){Z(e)}finally{var r;null===(r=document.getElementById(T))||void 0===r||r.remove()}return ie=o,o}(document):void 0)&&void 0!==de?de:fe,he=function(e){let t=e;const n=new Set;return{get:()=>t,set:e=>{t=e,n.forEach(e=>e(t))},patch:e=>{t=se(se({},t),e),n.forEach(e=>e(t))},subscribe:e=>(n.add(e),()=>n.delete(e))}}(be),ge={__id__:pe,get:he.get,subscribe:he.subscribe,actions:{set:he.set,patch:he.patch,login:e=>{he.patch({loading:!0});const t=new URL(M,window.location.origin);e&&t.searchParams.set("returnPath",e),window.location.href=t.toString()},logout:async()=>{he.patch({loading:!0});try{await fetch(A,{credentials:"include"})}finally{he.set(fe)}},loadProfile:()=>{const e=le();e?he.patch(function(e){for(var t=1;t{const n=`; ${document.cookie}`.split(`; ${e}=`);return 2===n.length?decodeURIComponent(n.pop().split(";").shift()):t},ye=e=>new Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short",maximumFractionDigits:0,roundingMode:"floor"}).format(e).replace("K","k");const ve=(e,t)=>{const n=document.getElementById("loginButton"),o=document.getElementById("registerLink");o&&o.setAttribute("href",function(e,t){if(!e&&!t)return"/register";const n=new URLSearchParams;return e&&n.append("regSourceMethod",e),t&&n.append("regSourceSection",t),`/register?${n.toString()}`}(e,t)),localStorage.setItem("returnUrl",window.location.href),localStorage.setItem("regSourceMethod",e),localStorage.setItem("regSourceSection",t),n&&n.click()};const xe=(e,{async:t=!0,defer:n=document.location.search.includes("___FORCE_DEFER___"),parent:o=document.body,attributes:r}={})=>{window.JSGlobals=window.JSGlobals||{};const i=window.JSGlobals.loadedJS=[];return new Promise((a,s)=>{const c=(e instanceof Array?e:[e]).map(e=>i.includes(e)?Promise.resolve():new Promise((a,s)=>{const c=((e,{id:t,async:n,defer:o,ok:r,error:i,attributes:a})=>{const s=document.createElement("script");return s.onload=r,s.onerror=i,t&&"undefined"!==t&&(s.id=t),n&&!o&&s.setAttribute("async",""),o&&s.setAttribute("defer",""),a&&a.forEach(([e,t])=>{s.setAttribute(e,t)}),s.src=e,s})(e,{async:t,defer:n,ok:a,error:s,attributes:r});o.appendChild(c),i.push(e)}));return Promise.all(c).then(a,s)})},_e="Thanks for your vote",Oe="We'll share the results once the poll has closed. In the meantime, join the debate in the comments below.",Ee="indyPollCopyObserver",je="indy-standalone-poll-styles",Se=[0,50,150,500],ke=[e,"the-independent.com"],$e="polls.vote.vote_recorded",Pe="polls.vote.register_see_vote";let Ce=!1,Ie=!1,Te=!1,De=!1;const Le=[],Me=()=>[...document.querySelectorAll("vf-poll, vf-widget")].filter(e=>!e.closest("vf-conversation-starter")),Ae=()=>Me().length>0,Ne=()=>(()=>{var e;const{domain:t}=null!==(e=window.JSGlobals)&&void 0!==e?e:{};return ke.includes(t)})()&&Ae(),Be=e=>{var t,n,o;null!=e&&e.translations&&(e.translations[$e]=_e,e.translations[Pe]=Oe,null===(t=e.formatters)||void 0===t||delete t[$e],null===(n=e.formatters)||void 0===n||delete n[Pe],null===(o=e.beginIdle)||void 0===o||o.call(e,{[$e]:_e,[Pe]:Oe}))},Re=e=>{const t=e.querySelector(".polls-authentication-prompt__title"),n=e.querySelector(".polls-authentication-prompt__subtitle");t instanceof HTMLElement&&n instanceof HTMLElement&&(t.textContent===_e&&n.textContent===Oe||(t.textContent=_e,n.textContent=Oe))},Fe=e=>{Se.forEach(t=>{window.setTimeout(()=>{Re(e)},t)})},Ue=e=>{if("true"===e.dataset[Ee])return;e.dataset[Ee]="true";const t=new MutationObserver(()=>{Re(e),Fe(e)});t.observe(e,{childList:!0,subtree:!0,characterData:!0}),Le.push(t),Fe(e)},Je=()=>{Me().forEach(Ue)},He=()=>{var e,t,n;Ne()&&((()=>{if(document.getElementById(je))return;const e=document.createElement("style");e.id=je,e.textContent=`\n [data-${Ee}="true"] .vf-poll-content-wrapper__show-all-btn {\n display: none !important;\n }\n [data-${Ee}="true"] .polls-authentication-prompt__action-button {\n display: inline-flex !important;\n }\n `,document.head.appendChild(e)})(),Be(null===(e=window.vf)||void 0===e?void 0:e.language),!Ie&&null!==(t=window.vf)&&void 0!==t&&t.$prepublish&&(Ie=!0,window.vf.$prepublish((e,t,...n)=>("language"===e&&"load"===t&&Be(n[0]),{channel:e,event:t,args:n}))),Je(),(()=>{if(De)return;De=!0;const e=new MutationObserver(()=>{document.body.isConnected&&Je()});e.observe(document.body,{childList:!0,subtree:!0}),Le.push(e)})(),!Te&&null!==(n=window.vf)&&void 0!==n&&n.$subscribe&&(Te=!0,window.vf.$subscribe("analytics","interaction",e=>{var t;(e=>"object"==typeof e&&null!==e&&"widget_subtype"in e&&"label"in e&&"poll"===e.widget_subtype&&"vote"===e.label)(e)&&(Be(null===(t=window.vf)||void 0===t?void 0:t.language),Je(),Me().forEach(Fe))})))};let qe=0;const Ge=e=>{qe++,Z(`Commenting: Reauthenticating, attempt ${qe}`),window.vf.session.logout().then(window.vf.session.login.cookie(p(t)||"")).then(()=>{e&&setTimeout(e,500)})},We=(e,t)=>{(async(e,t)=>{const n=new FormData;return Object.keys(t).forEach(e=>{n.append(e,t[e])}),await fetch(e,{method:"POST",mode:"same-origin",cache:"no-cache",credentials:"same-origin",body:n})})(`${L}?__amp_source_origin=${window.location.origin}`,{nickname:e}).then(e=>{if(200!==e.status)return e.json().then(({message:e})=>{t({success:!1,errorMessage:e})});t({success:!0})}).catch(e=>{t({success:!1,errorMessage:e.message})})},Ve=()=>{const[e]=document.getElementsByClassName("vf-post-form"),t=e.firstElementChild;t instanceof HTMLDivElement&&(t.style.display="none");const n=(e=>{const t=document.createElement("div"),n=document.createElement("h2"),o=document.createElement("p"),r=document.createElement("div"),i=document.createElement("input"),a=document.createElement("button");return t.id="add-nickname-form",n.innerHTML="We have noticed you don't have a commenting name yet.",o.innerHTML="Your commenting name is what people will see when you make any comments across Independent articles. Please don't use anything rude or anything that could identify you.",i.setAttribute("placeholder","Commenting name"),i.setAttribute("pattern","^[A-Za-z0-9]{3,40}$"),i.required=!0,a.innerHTML="SUBMIT",a.disabled=!0,t.appendChild(n),t.appendChild(o),t.appendChild(r),r.appendChild(i),r.appendChild(a),a.addEventListener("click",({target:t})=>{if(t instanceof HTMLInputElement&&t.disabled)return!1;e(i.value.trim())}),i.addEventListener("keypress",e=>{var t;(t=e.key.charCodeAt(0))>64&&t<91||t>96&&t<123||8===t||t>=48&&t<=57||e.preventDefault()}),i.addEventListener("input",e=>{a.disabled=e.target instanceof HTMLInputElement&&!e.target.checkValidity()}),t})(o=>{We(o,({success:o,errorMessage:r})=>{o?(e.removeChild(n),t instanceof HTMLDivElement&&(t.style.display="block"),Ge()):alert(r)})});e.appendChild(n)},ze=()=>{window.vf.context.get("user").then(e=>{e&&("guest"===e.user_privilege||p(t)!==e.social_login_id?Ge(()=>{qe<10&&ze()}):"anonymous"===e.name.toLowerCase()&&(Z("Commenting: User has not set nickname, initialising nickname form"),Ve()))})},Qe=()=>{var e;null===(e=document.getElementById("comments"))||void 0===e||e.addEventListener("click",({target:e})=>{var t;e instanceof HTMLElement&&(e.className.split(" ").some(e=>e.startsWith("vf-content-actions__like")||e.startsWith("vf-content-actions__dislike"))?((e={})=>{u("vote_comment_click",e)})({}):["Flag","Flagged"].includes(null===(t=e.innerText)||void 0===t?void 0:t.trim())?((e={})=>{u("flag_comment_click",e)})({}):e.closest(".vf-load-more__button")&&m())})},Ye=()=>(()=>{const{status:e}=ge.get();return e===ue})(),Ke=e=>{const t=document.getElementsByClassName(P),n=document.querySelectorAll('a[href="#comments-area"]');[...t].forEach(t=>{if(t instanceof HTMLElement){const n=t.querySelector(`.${C}`);t.dataset.count=e.toString()||"0",n&&(n.innerHTML=e.toString()||"")}}),[...document.getElementsByClassName(P)].forEach(e=>{if(e instanceof HTMLElement){var t;const n=e.querySelector(`.${C}`),o=e.querySelector(".js-comment-plural"),r=null!==(t=e.dataset.count)&&void 0!==t?t:"",i=parseInt(null!=r?r:"");if(!n||!o)return;o.innerHTML=1===i?"Comment":"Comments",n.innerHTML=i>0?r:''}}),[...n].forEach(e=>{e.classList.remove("is-disabled"),e.setAttribute("aria-disabled","false"),e.setAttribute("tabindex","0")})},Ze=()=>{Qe(),He(),window.vf.$prepublish((e,t,...n)=>{if(console.log(`Commenting: channel = ${e}; event = ${t};`),"commenting"===e&&"loaded"===t){try{(()=>{const e=document.getElementById("comments"),t=(null==e?void 0:e.offsetHeight)||0,n=new URLSearchParams(document.location.search).get("__vfz");if(t>600&&!n){null==e||e.classList.add("height-limited");const t=document.createElement("button");t.className="show-more",t.innerHTML="See more comments",null==e||e.appendChild(t);const n=()=>{null==e||e.removeChild(t),null==e||e.classList.remove("height-limited"),null==e||e.removeEventListener("click",n),m()};null==e||e.addEventListener("click",n)}})()}catch(e){te("Commenting: Error in initViafora()->limitCommentingHeight()",e)}Ye()?ze():window.vf.context.get("user").then(e=>{var t;0!==e.id&&(null===(t=window.viafoura)||void 0===t||t.session.logout())})}if("comment"===e&&"created"===t&&d({commentType:"first comment"}),"authentication"===e&&("required"===t||"needed"===t)){var o,r;const[e]=null!==(o=window.JSGlobals.sections)&&void 0!==o?o:[];return ve("Commenting",null!==(r=e.sourcePath)&&void 0!==r?r:""),!1}return{channel:e,event:t,args:n}}),window.vf.$subscribe("authentication","logout",()=>{var e;((e={})=>{u("logout_success",e)})(),e=A,location.href=e}),window.vf.$subscribe("comment-reply","posted",()=>{d({commentType:"reply"})})},Xe=async()=>{if(p(t)||!Ye())return;const e=ge.get();e.status===ue&&((e,t,n)=>{const o=new Date;if(n&&(n.days||n.hours)){const e=n.days?24*n.days*60*60*1e3:60*n.hours*60*1e3;o.setTime(o.getTime()+e)}const r=[];r.push(`${e}=${encodeURIComponent(t)}`),r.push("path=/"),r.push("secure"),n&&r.push(`expires=${o.toUTCString()}`),document.cookie=r.join(";")})(t,e.uid,{days:365})},et=async()=>{(document.getElementById("comments")||Ae()||document.querySelector("vf-livequestions"))&&((async()=>{var e,t;const{endpoint:n,section_uuid:o}=null!==(e=null===(t=window.JSGlobals)||void 0===t?void 0:t.viafoura)&&void 0!==e?e:{},r="article_original_source_id"in window.digitalData?null===(i=window.digitalData.article_original_source_id)||void 0===i?void 0:i.replace("b",""):"article_id_root"in window.digitalData?window.digitalData.article_id_root:"";var i;const a={method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify([r])};try{var s;const e=await fetch(`${n}/v4/livecomments/${o}/content-containers/comment-count-and-status/by-container-ids`,a),t=(null===(s=(await e.json())[0])||void 0===s?void 0:s.commentCount)||0;return t>=1e4?ye(t):t.toString()}catch(e){console.error(e)}return(0).toString()})().then(Ke),await Xe(),(()=>{if(!Ne()||Ce)return;Ce=!0;const e=window.vfAsyncInit;window.vfAsyncInit=()=>{var t;"function"==typeof e&&e(),!Ie&&null!==(t=window.vf)&&void 0!==t&&t.$prepublish&&(Ie=!0,window.vf.$prepublish((e,t,...n)=>("language"===e&&"load"===t&&Be(n[0]),{channel:e,event:t,args:n})))}})(),window.vfQ=window.vfQ||[],window.vfQ.push(Ze),xe("//cdn.viafoura.net/entry/index.js"))},tt=async()=>{document.getElementsByClassName("fb-post").length>0&&await xe("https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v11.0")},nt=()=>{var e;const{url:t}=(null===(e=window.JSGlobals)||void 0===e?void 0:e.heyFlow)||{};t?t&&xe(t):console.error("No heyFlow URL is found",{cause:window.JSGlobals?"heyFlow object is missing or does not contain a URL":"JSGlobals is undefined"})},ot=async()=>{document.getElementsByClassName("instagram-media").length>0&&await xe("https://www.instagram.com/embed.js")},rt="uk",it="us",at=async()=>{const e=p("subscriber_origin")||"";[rt,it].includes(e)||await xe("https://sdk.k-words.io/script.js",{attributes:[["data-kwords-site-id","9614266d-5149-4180-848d-69cb140f6022"]]})},st=()=>{const e=document.querySelectorAll("[data-parallax]");e.length&&window.addEventListener("scroll",function(){e.forEach(e=>{var t;const n=e.getBoundingClientRect().top;if(!n||n>window.innerHeight)return;const o=null!==(t=e.dataset.parallax)&&void 0!==t?t:"",r=(e=>{const t=window.innerHeight;let n=0;for(let t=e;t;t=t.offsetParent)n+=t.offsetTop;return nmt(e,"name",{value:t,configurable:!0});function ft(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}pt(ft,"upperFirst");const bt=pt((e,t)=>{throw new Error(`Value for ${e} must be greater or equal to ${t}`)},"handleError");function ht(e){return e<1&&bt("minWidth",1),`(min-width: ${e}px)`}function gt(e){return e<2&&bt("maxWidth",2),`(max-width: ${e-1}px)`}function wt(e){return Object.entries(e).sort(([,e],[,t])=>e>t?1:-1)}function yt(e){return wt(e).reduce((e,[t,n],o,r)=>{const i=r[o+1],a=ht(n),s=i&>(i[1]),c=gt(n);if(i&&n===i[1])throw new Error(`Duplicate width value of ${n} detected for ${t} and ${i[0]}`);return e=dt(dt({},e),{},{[t]:a,[`max${ft(t)}`]:c,[`only${ft(t)}`]:i?`${a} and ${s}`:a})},{})}pt(ht,"minWidth"),pt(gt,"maxWidth"),pt(wt,"sortSizesAscending"),pt(yt,"generateMediaQueryRules");const vt=yt({mobile:360,tablet:768,laptop:1e3,desktop:1250}),{mobile:xt,maxMobile:_t,onlyMobile:Ot,tablet:Et,maxTablet:jt,onlyTablet:St,laptop:kt,maxLaptop:$t,onlyLaptop:Pt,desktop:Ct,maxDesktop:It,onlyDesktop:Tt}=vt;Symbol.toStringTag;let Dt=!1;const Lt=async()=>{window.matchMedia(kt).matches&&!Dt&&(await xe(["https://cdn.mediavoice.com/nativeads/script/esi/esi-rr-collection.js"]),Dt=!0)},Mt=async()=>{document.getElementsByClassName("reddit-embed-bq").length>0&&await xe("https://embed.reddit.com/widgets.js")},At="taboola-below-article-1",Nt="taboola-carousel-thumbnails",Bt="taboola-mid-article-thumbnails",Rt="taboola-mid-article-thumbnails-us-premium",Ft=()=>{var e;return!(null===(e=window.JSGlobals)||void 0===e||!e.isBulletin)};function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Jt(e){for(var t=1;t{const{host:e,pathname:t}=window.location;return`//${e}${t}`},Qt=()=>{window._taboola=window._taboola||[];const{article:e,section:t,sectionName:n}=window.JSGlobals,o=!!e,r=!!t,i=[],a=Ft(),{sectionUnits:s=[],pageType:c}=window.JSGlobals.taboola||{};if(e&&c){const t=a?"photo":c;window._taboola.push({[t]:"auto",url:zt()});const n=document.getElementById("stickyFooterContainer");window._taboola.push({listenTo:"visible",handler:e=>{e.detail.placement.includes("Below Article Thumbnails | Card 19")&&n&&(n.style.display="none")}}),(e=>{var t;const{user_status:n,uid:o}=window.digitalData;var r;window._taboola.push({unified_id:o,user_type:(r=n,{premium:"subscriber",registered:"registered",anonymous:"guest"}[r]||"other"),paywall:null!==(t=e.premium)&&void 0!==t&&t&&"premium"!==n})})(e),e.premium&&window._taboola.push({premium:!0})}if(r){const e="News"===n?Ht:qt;window._taboola.push({[e]:"auto"}),s.forEach(t=>{delete t.category,(e===Ht&&t.pageType===Ht||e===qt&&t.pageType===qt)&&i.push(t)}),i.push(...Wt)}if(o){const e=[At,Nt,`${Bt}-ii`];[...Vt,...Gt].forEach(t=>{e.includes(t.container)&&"true"===p("feat__use_light_ad_rules")&&"true"===p("is_mobile_or_tablet")&&(t.placement+=" lal test"),i.push(t)}),a&&i.push(...(()=>{const e={mode:"thumbnails-mid-b",placement:"Bulletin Article Feed",target_type:"mix"};return[Jt(Jt({},e),{},{container:"taboola-bulletin-mid-article-thumbnails"}),Jt(Jt({},e),{},{container:"taboola-bulletin-mid-article-thumbnails-two"}),{mode:"thumbnails-rr-2x3",container:"taboola-more-bulletins",placement:"More bulletins",target_type:"mix"}]})())}i.forEach(e=>(e=>{if(e.container){const t=document.getElementById(e.container);t&&"none"!==window.getComputedStyle(t).getPropertyValue("display")&&window._taboola.push(e)}})(e)),window._taboola.push({flush:!0})},Yt=async()=>{var e,t;const n=(()=>{var e;const{publisherId:t,publisherIdIndyBest:n}=window.JSGlobals.taboola||{};return null!==(e=window.location.pathname)&&void 0!==e&&e.includes("indybest")?n:t})();await xe([`//cdn.taboola.com/libtrc/${n}/loader.js`]),null===(e=window)||void 0===e||null===(e=e.performance)||void 0===e||null===(t=e.mark)||void 0===t||t.call(e,"tbl_ic")},Kt=()=>{document.getElementsByClassName("twitter-post").length>0&&(window.twttr=function(e,t,n){let o,r=e.getElementsByTagName(t)[0],i=window.twttr||{};return e.getElementById(n)||(o=e.createElement(t),o.id=n,o.src="https://platform.twitter.com/widgets.js",r.parentNode.insertBefore(o,r),i._e=[],i.ready=function(e){i._e.push(e)}),i}(document,"script","twitter-wjs"))},Zt=document.documentElement;let Xt=!1;const en=()=>Zt.classList.contains("indy-ready"),tn=e=>{Xt||(Xt=!0,e())},nn=e=>{((e,t)=>{if(!e)return;let n=e.classList.toString();const o=new MutationObserver(r=>{for(const i of r)if("class"===i.attributeName){const r=e.classList.toString();if(r!==n){t(o),n=r;break}}});o.observe(e,{attributes:!0})})(Zt,()=>{en()&&tn(e)})};var on={maxInProgress:5,failFast:!1,nextCheck:function(e,t){return Promise.resolve(e.amountStartedDate.now()-cn,un=e=>{const t=ln();Z(`finished ${e} load @ ${t}, duration ${t-sn[e]}`),delete sn[e]},dn=e=>Object.keys(e).map(t=>async()=>{const n=e[t];if(n){(e=>{const t=ln();sn[e]=t,Z(`starting ${e} load @ ${t}`)})(t);try{if("function"==typeof n)await n(),un(t);else if(await n.method(),un(t),n.dependents){ne(`${t} deps`),await an(dn(n.dependents)),oe()}}catch(e){console.warn(`Error caught in ${t}()`),console.error(e)}}}),mn=async e=>{for(let t=0;t{if(!window.JSGlobals.taboola)return;Gt.map(e=>document.getElementById(e.container)).length&&((()=>{const e=zt();localStorage.setItem("subscription-cause",e)})(),await(async()=>{await Yt(),Qt()})())}),initComments:fn.userComments&&!wn&&et},{polar:!gn&&(()=>{Lt(),window.addEventListener("resize",lt(Lt,500))}),parallax:st,redditEmbed:Mt,instagramEmbed:ot,twitterWidgets:Kt,persistentPlayer:()=>{const e="true"===we("subscriber"),t=document.querySelector(".article-liveblog");if(e&&t){let e;const t=function(){window.matchMedia("(min-width: 1000px)").matches?e=(()=>{const e=document.querySelector(".video-hero-wrapper"),t="sticky-video";let n;const o=()=>{window.matchMedia("(min-width: 930px)").matches&&(n=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio<.5&&e.boundingClientRect.top<0?e.target.classList.add(t):e.target.classList.remove(t)})},{threshold:.5}),n.observe(e))};return window.addEventListener("orientationchange",o),{dispose(){n&&n.unobserve(e),window.removeEventListener("orientationchange",o)}}})():e&&e.dispose()};window.addEventListener("orientationchange",t),window.addEventListener("resize",ct(t,100)),t()}else(()=>{var e;const t=document.querySelector(".video-top-container.video");if(!t)return;const n=document.querySelector(".video-hero-wrapper"),o=document.querySelector("#video-popout-close"),r=null===(e=document.getElementById("video_holder"))||void 0===e||null===(e=e.firstElementChild)||void 0===e||null===(e=e.firstElementChild)||void 0===e?void 0:e.id;let i=2e4;(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<620&&(i=1e4);const a="sticky",s=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio<.5&&e.boundingClientRect.top<0?(n.style.height=`${n.clientHeight}px`,e.target.classList.add(a)):(n.style.height=null,e.target.classList.remove(a))})},{threshold:.5});s.observe(t),o&&(o.addEventListener("click",()=>{t.classList.add("closed")}),o.classList.contains("sensitive")?o.classList.add("shown"):setTimeout(()=>{o.classList.add("shown")},i)),"undefined"!=typeof jwplayer&&r&&(jwplayer(r).on("autostartNotAllowed",({error:e,reason:t,type:n})=>{Z("jwplayer autostartNotAllowed",e,t,n)}),jwplayer(r).on("error",({code:e,message:t,sourceError:n,type:o})=>{Z("jwplayer error",e,t,n,o)}),jwplayer(r).on("warning",({code:e,message:t,sourceError:n,type:o})=>{Z("jwplayer warning",e,t,n,o)}))})()},facebookSDK:tt},{heyFlow:hn&&(Boolean(null===(pn=fn.article)||void 0===pn?void 0:pn.hasHeyflowForm)||vn)&&nt},{geniuslinkAffiliateLinks:()=>{document.addEventListener("mousedown",e=>{const t=e.target.closest('a[data-ml="true"], a[data-affiliate="true"]');if(!t)return;const n=t.getAttribute("href");if(!n)return;const o=v();t.setAttribute("href",$(n,o))},{capture:!0})},kwords:at,trackArticleComplete:w}];var _n;_n=async()=>await mn(xn),en()?_n():(nn(_n),(e=>{setTimeout(()=>tn(e),3e3)})(_n))})()})();