/*
 HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
 JavaScript Cookie v2.0.3
 https://github.com/js-cookie/js-cookie

 Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 Released under the MIT license
*/
tmg.createNamespace("tmg.viewport");tmg.addEvent=function(b,d,e){null!==b&&void 0!==b&&(b.addEventListener?b.addEventListener(d,e,!1):b.attachEvent?b.attachEvent("on"+d,e):b["on"+d]=e)};tmg.createNamespace("tmg.pageReady");window.tmg.pageReady=function(b){"loading"!==document.readyState?b():document.addEventListener("DOMContentLoaded",b)};tmg.createNamespace("tmg.getViewportWidth");
tmg.getViewportWidth=function(b){"undefined"===typeof b&&(b=!0);return b&&0<=document.documentElement.clientWidth?document.documentElement.clientWidth:b&&document.body&&0<=document.body.clientWidth?document.body.clientWidth:0<=window.innerWidth?window.innerWidth:0};tmg.createNamespace("tmg.getMediaQuery");
tmg.getMediaQuery=function(){var b=document.body,d=document.getElementById("tmgMediaQuery");!d&&b&&(d=document.createElement("div"),d.id="tmgMediaQuery",b.appendChild(d));return window.getComputedStyle&&b?window.getComputedStyle(d,":after").content.replace(/[^a-z]/g,"")||"xxs":"xxs"};
(window["tmg.build"]=window["tmg.build"]||[]).push([[7],{3:function(b,d,e){var g,l;e=[d,e(0)];void 0===(l="function"==typeof(g=function(d,b){Object.defineProperty(d,"__esModule",{value:!0});b=b&&b.__esModule?b:{default:b};var e={},h=function(c){var a={};return"string"==typeof c&&(a=g(c.replace(/'/g,'"'))),a},g=function(c,a){a=a||{};var k=c,v="",b=[],d=[],e=/[{?,\s]\s*"([^"]|\\")+"\s*:(\s*"([^"]|\\")+"|(.+))\s*[},]/gi,h=/^\s*{?\s*'|'\s*}?\s*$/i;if(!c)return a;if("[object Object]"===Object.prototype.toString.call(c))return c;
if(f(k)||((k.match(e)||[]).forEach(function(a){if(a.includes('"label"')){var c=a.replace(/^\s*[{\s]|[,}]\s*$/gi,"").split(":")[1].replace(/\s*"([^]+|\\")"\s*$/gi,"$1"),m=c.replace(/"/gi,'\\"');c=a.replace(c,m);k=k.replace(a,c)}}),v=k.replace(e,""),b=v.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/)),b.forEach(function(a){a=a.replace(/^\s*{|}\s*$/gi,"");f("{"+a+"}")||d.push(a)}),d.forEach(function(a){var c=!1,m=a;!0===h.test(a)&&(m=a.replace(/^\s*'([^']+|\\')':/,'"$1":').replace(/:\s*('')\s*$/,': ""').replace(/:\s*'([^']+|\\')'\s*$/,
': "$1"'),c=f("{"+m+"}"));c||!0!==/[^"']\w+[^"']:/.test(m)||(m=m.replace(/^\s*(.*?):/,'"$1":'),c=f("{"+m+"}"));c&&(k=k.replace(a,m))}),f(k))a=f(k);else try{JSON.parse(k)}catch(r){console.log("tmg.json.tryParse failed:",r)}return a},f=function(c){var a=!1;try{a=JSON.parse(c)}catch(k){}return a};e={parseFromAem:h,tryParse:g,simpleTryParse:f};b.default.create("tmg.json");tmg.json=e;d.default=e;tmg.parseAemJson=h})?g.apply(d,e):g)||(b.exports=l)}},[[3,0,1]]]);tmg.createNamespace("tmg.timer");
tmg.timer=function(b,d){var e=this,g=void 0,l=void 0,p=d;this.pause=function(){window.clearTimeout(g);p-=new Date-l};this.resume=function(){l=new Date;window.clearTimeout(g);g=window.setTimeout(function(){b.call(e)},p)};this.stop=function(){window.clearTimeout(g);p=0};this.status=function(){return g};this.resume()};tmg.createNamespace("tmg.throttle");
window.tmg.throttle=function(b,d){d=d||200;var e,g;return function(){var l=this,p=+new Date,h=arguments;e&&p<e+d?(clearTimeout(g),g=setTimeout(function(){e=p;b.apply(l,h)},d)):(e=p,b.apply(l,h))}};var _typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};tmg.createNamespace("tmg.loadClientLibs");
tmg.loadClientLibs={init:function(){if("function"===typeof yepnope){var b=this.transposeClientlibs(window.clientlibs),d={load:b.load,complete:function(){for(var d=document.getElementsByTagName("script")[0],g=0;g<b.completeCallback.length;g++){var l=document.createElement("script");l.type="text/javascript";l[l.innerText?"innerText":"textContent"]=b.completeCallback[g];d.parentNode.insertBefore(l,d)}}.bind(this)};yepnope(d)}},transposeClientlibs:function(b,d,e){var g={load:[],completeCallback:[]};if(!b.test||
void 0!==e&&!1!==e)for(var l in b)b.hasOwnProperty(l)&&"test"!==l&&("load"===l?g.load=g.load.concat(b[l]):"completeCallback"===l?g.completeCallback=g.completeCallback.concat(b[l]):"object"===_typeof(b[l])?(e=this.transposeClientlibs(b[l],(d?d+".":"")+l),g.load=g.load.concat(e.load),g.completeCallback=g.completeCallback.concat(e.completeCallback)):console.warn("clientlib on "+d+" has an unsuported property of "+l));else eval(b.test)||(g=this.transposeClientlibs(b,(d?d+".":"")+l,!0));return g}};tmg.createNamespace("tmg.viewport");
tmg.viewport={width:document.documentElement.clientWidth,dpr:1,mediaQueriesBreakpoints:{xxs:0,xs:480,sm:730,md:988,lg:1008,xl:1328},containerSizes:{sm:740,md:960,lg:1280}};
var print_uk_day=function(b){var d=new Date;isNaN(b)&&(b=0);b*=1;var e=new Date(d.getTime()+b+6E4*d.getTimezoneOffset());b=e.getDate();d=e.getMonth();e=e.getDay();document.write("\x3cspan\x3e"+"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")[e]+" "+function(b){if(3<b&&21>b)return b+"th";switch(b%10){case 1:return b+"st";case 2:return b+"nd";case 3:return b+"rd";default:return b+"th"}}(b)+" "+"January February March April May June July August September October November December".split(" ")[d]+
"\x3c/span\x3e")};
(window["tmg.build"]=window["tmg.build"]||[]).push([[13,10],{1:function(b,d,e){var g,l;e=[d,e(0),e(2)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=function(){return document.location};e=function(){var b={};return function(f){if(b[f])return b[f];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=f;b.addEventListener("load",
a,!1);c.appendChild(b)});return b[f]=c,c}}();e={getChannel:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"tmgads.channel"]');return f&&f.content&&"/"!==h().pathname&&"portal"!==f.content&&(b=f.content),b},getContentType:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return f&&f.content&&(b=f.content),b},getLocation:h,injectScript:e,
isArticle:function(){return document.body.classList.contains("articleRenderer2")}};d.default.create("tmg.page");tmg.page=e;b.default=e})?g.apply(d,e):g)||(b.exports=l)},8:function(b,d,e){var g,l;e=[d,e(0),e(1)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=e&&e.__esModule?e:{default:e},g=new RegExp(/\?[^#]*|(?=#)|$/),f=function(){var a={};return function(c){return a[c]||(a[c]=new RegExp("([?\x26;]"+c+"(?\x3d[\x3d\x26;#]|$))\x3d?([^\x26;#]*)"))}}(),
c=function(a,c){return(a=f(c).exec(a))&&decodeURIComponent(a[2])},a=function(a,b,d){var e=void 0,k=void 0,v=void 0;return void 0===a&&(a=h.default.getLocation().search),null===c(a,b)?(e=b+"\x3d"+encodeURIComponent(d),k=g.exec(a)[0],v=a.replace(g,(k.length?k+"\x26":"?")+e)):v=a.replace(f(b),"$1\x3d"+encodeURIComponent(d)),v};e=function(a,b){if(null!==c(b,a)){var f=b.split("?")[0];b=(-1!==b.indexOf("?")?b.split("?")[1]:"").split("\x26");for(var d=b.length-1;0<=d;--d)b[d].split("\x3d")[0]===a&&b.splice(d,
1);return f+(0<b.length?"?":"")+b.join("\x26")}return b};var k=function(b,f){return null!==c(b,"redirectTo")?a(b,"redirectTo",f):b};d.default.create("tmg.GET_PARAM");tmg.getQuerystringParam=c;tmg.setQuerystringParam=a;tmg.removeQuerystringParam=e;tmg.updateRedirectParam=k;location.search.substr(1).split("\x26").forEach(function(a){a=a.split("\x3d");1<a.length?tmg.GET_PARAM[a[0]]=decodeURIComponent(a[1]):tmg.GET_PARAM[a[0]]=""});b.default={matchParam:f,matchQuerystring:g,getQuerystringParam:c,removeQuerystringParam:e,
setQuerystringParam:a,updateRedirectParam:k}})?g.apply(d,e):g)||(b.exports=l)}},[[8,0,1]]]);(function(){function b(b,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var d=document.createEvent("CustomEvent");d.initCustomEvent(b,e.bubbles||!1,e.cancelable||!1,e.detail||void 0);return d}if("function"===typeof window.CustomEvent)return!1;b.prototype=window.Event.prototype;window.CustomEvent=b})();
(function(){if("function"===typeof String.prototype.endsWith)return!1;String.prototype.endsWith=function(b,d){var e=this.toString();if("number"!==typeof d||!isFinite(d)||Math.floor(d)!==d||d>e.length)d=e.length;d-=b.length;b=e.indexOf(b,d);return-1!==b&&b===d}})();
(function(b,d,e){function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function l(){var m=a.shift();k=1;m?m.t?A(function(){("c"==m.t?C.injectCss:C.injectJs)(m.s,0,m.a,m.x,m.e,1)},0):(m(),l()):k=0}function p(m,c,b,n,e,v,h){function t(a){if(!H&&g(r.readyState)&&(q.r=H=1,!k&&l(),r.onload=r.onreadystatechange=null,a)){"img"!=m&&A(function(){w.removeChild(r)},50);for(var b in x[c])if(x[c].hasOwnProperty(b))x[c][b].onload()}}h=h||C.errorTimeout;var r=d.createElement(m),H=0,u=0,q={t:b,s:c,
e:e,a:v,x:h};1===x[c]&&(u=1,x[c]=[]);"object"==m?r.data=c:(r.src=c,r.type=m);r.width=r.height="0";r.onerror=r.onload=r.onreadystatechange=function(){t.call(this,u)};a.splice(n,0,q);"img"!=m&&(u||2===x[c]?(w.insertBefore(r,z?null:f),A(t,h)):x[c].push(r))}function h(c,b,f,d,n){k=0;b=b||"j";m(c)?p("c"==b?r:q,c,b,this.i++,f,d,n):(a.splice(this.i++,0,c),1==a.length&&l());return this}function u(){var a=C;a.loader={load:h,i:0};return a}var y=d.documentElement,A=b.setTimeout,f=d.getElementsByTagName("script")[0],
c={}.toString,a=[],k=0,v=function(){},t="MozAppearance"in y.style,z=t&&!!d.createRange().compareNode,w=z?y:f.parentNode;y=b.opera&&"[object Opera]"==c.call(b.opera);y=!!d.attachEvent&&!y;var q=t?"object":y?"script":"img",r=y?"script":q,n=Array.isArray||function(a){return"[object Array]"==c.call(a)},m=function(a){return"string"==typeof a},B=function(a){return"[object Function]"==c.call(a)},F=[],x={},D={timeout:function(a,m){m.length&&(a.timeout=m[0]);return a}},G;var C=function(a){function c(a){a=
a.split("!");var m=F.length,c=a.pop(),b=a.length;c={url:c,origUrl:c,prefixes:a};var d,f;for(f=0;f<b;f++){var n=a[f].split("\x3d");(d=D[n.shift()])&&(c=d(c,n))}for(f=0;f<m;f++)c=F[f](c);return c}function b(a,m,b,f,d){var n=c(a),k=n.autoCallback;n.url.split(".").pop().split("?").shift();if(!n.bypass){m&&(m=B(m)?m:m[a]||m[f]||m[a.split("/").pop().split("?")[0]]);if(n.instead)return n.instead(a,m,b,f,d);x[n.url]?n.noexec=!0:x[n.url]=1;b.load(n.url,n.forceCSS||!n.forceJS&&"css"==n.url.split(".").pop().split("?").shift()?
"c":e,n.noexec,n.attrs,n.timeout);(B(m)||B(k))&&b.load(function(){u();m&&m(n.origUrl,d,f);k&&k(n.origUrl,d,f);x[n.url]=2})}}function f(a,c){function f(a,f){if(!a)!f&&h();else if(m(a))f||(k=function(){var a=[].slice.call(arguments);e.apply(this,a);h()}),b(a,k,c,0,d);else if(Object(a)===a)for(t in r=function(){var m=0,c;for(c in a)a.hasOwnProperty(c)&&m++;return m}(),a)a.hasOwnProperty(t)&&(f||--r||(B(k)?k=function(){var a=[].slice.call(arguments);e.apply(this,a);h()}:k[t]=function(a){return function(){var m=
[].slice.call(arguments);a&&a.apply(this,m);h()}}(e[t])),b(a[t],k,c,t,d))}var d=!!a.test,n=a.load||a.both,k=a.callback||v,e=k,h=a.complete||v,r,t;f(d?a.yep:a.nope,!!n);n&&f(n)}var d,k=this.yepnope.loader;if(m(a))b(a,0,k,0);else if(n(a))for(d=0;d<a.length;d++){var h=a[d];m(h)?b(h,0,k,0):n(h)?C(h):Object(h)===h&&f(h,k)}else Object(a)===a&&f(a,k)};C.addPrefix=function(a,m){D[a]=m};C.addFilter=function(a){F.push(a)};C.errorTimeout=1E4;null==d.readyState&&d.addEventListener&&(d.readyState="loading",d.addEventListener("DOMContentLoaded",
G=function(){d.removeEventListener("DOMContentLoaded",G,0);d.readyState="complete"},0));b.yepnope=u();b.yepnope.executeStack=l;b.yepnope.injectJs=function(a,m,c,b,n,k){var e=d.createElement("script"),h,t;b=b||C.errorTimeout;e.src=a;for(t in c)e.setAttribute(t,c[t]);m=k?l:m||v;e.onreadystatechange=e.onload=function(){!h&&g(e.readyState)&&(h=1,m(),e.onload=e.onreadystatechange=null)};A(function(){h||(h=1,m(1))},b);n?e.onload():f.parentNode.insertBefore(e,f)};b.yepnope.injectCss=function(a,m,c,b,n,e){b=
d.createElement("link");var k;m=e?l:m||v;b.href=a;b.rel="stylesheet";b.type="text/css";for(k in c)b.setAttribute(k,c[k]);n||(f.parentNode.insertBefore(b,f),A(m,0))}})(this,document);
window.Modernizr=function(b,d,e){function g(a,m){for(var c in a){var b=a[c];if(!~(""+b).indexOf("-")&&y[b]!==e)return"pfx"==m?b:!0}return!1}function l(a,m,b){var d=a.charAt(0).toUpperCase()+a.slice(1),n=(a+" "+f.join(d+" ")+d).split(" ");if("string"===typeof m||"undefined"===typeof m)return g(n,m);n=(a+" "+c.join(d+" ")+d).split(" ");a:{a=n;for(var k in a)if(d=m[a[k]],d!==e){m=!1===b?a[k]:"function"===typeof d?d.bind(b||m):d;break a}m=!1}return m}var p={},h=d.documentElement,u=d.createElement("modernizr"),
y=u.style,A=" -webkit- -moz- -o- -ms- ".split(" "),f=["Webkit","Moz","O","ms"],c=["webkit","moz","o","ms"];u={};var a=[],k=a.slice,v=function(a,m,c,b){var f=d.createElement("div"),n=d.body,k=n||d.createElement("body");if(parseInt(c,10))for(;c--;){var e=d.createElement("div");e.id=b?b[c]:"modernizr"+(c+1);f.appendChild(e)}c=['\x26#173;\x3cstyle id\x3d"smodernizr"\x3e',a,"\x3c/style\x3e"].join("");f.id="modernizr";(n?f:k).innerHTML+=c;k.appendChild(f);if(!n){k.style.background="";k.style.overflow="hidden";
var v=h.style.overflow;h.style.overflow="hidden";h.appendChild(k)}a=m(f,a);n?f.parentNode.removeChild(f):(k.parentNode.removeChild(k),h.style.overflow=v);return!!a},t=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(m,c){c=c||d.createElement(a[m]||"div");m="on"+m;var b=m in c;b||(c.setAttribute||(c=d.createElement("div")),c.setAttribute&&c.removeAttribute&&(c.setAttribute(m,""),b="function"===typeof c[m],"undefined"!==typeof c[m]&&
(c[m]=e),c.removeAttribute(m)));return b}}(),z={}.hasOwnProperty;var w="undefined"!==typeof z&&"undefined"!==typeof z.call?function(a,c){return z.call(a,c)}:function(a,c){return c in a&&"undefined"===typeof a.constructor.prototype[c]};Function.prototype.bind||(Function.prototype.bind=function(a){var c=this;if("function"!=typeof c)throw new TypeError;var b=k.call(arguments,1),f=function(){if(this instanceof f){var m=function(){};m.prototype=c.prototype;m=new m;var d=c.apply(m,b.concat(k.call(arguments)));
return Object(d)===d?d:m}return c.apply(a,b.concat(k.call(arguments)))};return f});u.flexbox=function(){return l("flexWrap")};u.flexboxlegacy=function(){return l("boxDirection")};u.touch=function(){var a;"ontouchstart"in b||b.DocumentTouch&&d instanceof DocumentTouch?a=!0:v(["@media (",A.join("touch-enabled),("),"modernizr){#modernizr{top:9px;position:absolute}}"].join(""),function(c){a=9===c.offsetTop});return a};u.backgroundsize=function(){return l("backgroundSize")};u.csscolumns=function(){return l("columnCount")};
u.svg=function(){return!!d.createElementNS&&!!d.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect};u.inlinesvg=function(){var a=d.createElement("div");a.innerHTML="\x3csvg/\x3e";return"http://www.w3.org/2000/svg"==(a.firstChild&&a.firstChild.namespaceURI)};u.csspositionsticky=function(){var a=d.createElement("a").style;a.cssText="position:"+" -webkit- -moz- -o- -ms- ".split(" ").join("sticky;position:").slice(0,-9);return-1!==a.position.indexOf("sticky")};for(var q in u)if(w(u,q)){var r=
q.toLowerCase();p[r]=u[q]();a.push((p[r]?"":"no-")+r)}p.addTest=function(a,c){if("object"==typeof a)for(var m in a)w(a,m)&&p.addTest(m,a[m]);else{a=a.toLowerCase();if(p[a]!==e)return p;c="function"==typeof c?c():c;h.className+=" "+(c?"":"no-")+a;p[a]=c}return p};y.cssText="";u=null;p._version="2.8.3";p._prefixes=A;p._domPrefixes=c;p._cssomPrefixes=f;p.mq=function(a){var c=b.matchMedia||b.msMatchMedia;if(c)return c(a)&&c(a).matches||!1;var f;v("@media "+a+" { #modernizr { position: absolute; } }",
function(a){f="absolute"==(b.getComputedStyle?getComputedStyle(a,null):a.currentStyle).position});return f};p.hasEvent=t;p.testProp=function(a){return g([a])};p.testAllProps=l;p.testStyles=v;p.prefixed=function(a,c,b){return c?l(a,c,b):l(a,"pfx")};h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(" js "+a.join(" "));return p}(this,this.document);
(function(b,d){function e(a,c){var m=a.createElement("p");a=a.getElementsByTagName("head")[0]||a.documentElement;m.innerHTML="x\x3cstyle\x3e"+c+"\x3c/style\x3e";return a.insertBefore(m.lastChild,a.firstChild)}function g(){var a=w.elements;return"string"==typeof a?a.split(" "):a}function l(a){var c=t[a._html5shiv];c||(c={},v++,a._html5shiv=v,t[v]=c);return c}function p(b,m,f){m||(m=d);if(z)return m.createElement(b);f||(f=l(m));m=f.cache[b]?f.cache[b].cloneNode():a.test(b)?(f.cache[b]=f.createElem(b)).cloneNode():
f.createElem(b);return!m.canHaveChildren||c.test(b)||m.tagUrn?m:f.frag.appendChild(m)}function h(a,c){c.cache||(c.cache={},c.createElem=a.createElement,c.createFrag=a.createDocumentFragment,c.frag=c.createFrag());a.createElement=function(b){return w.shivMethods?p(b,a,c):c.createElem(b)};a.createDocumentFragment=Function("h,f","return function(){var n\x3df.cloneNode(),c\x3dn.createElement;h.shivMethods\x26\x26("+g().join().replace(/\w+/g,function(a){c.createElem(a);c.frag.createElement(a);return'c("'+
a+'")'})+");return n}")(w,c.frag)}function u(a){a||(a=d);var c=l(a);!w.shivCSS||k||c.hasCSS||(c.hasCSS=!!e(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}"));z||h(a,c);return a}function y(a){for(var c,b=a.attributes,f=b.length,d=a.ownerDocument.createElement("html5shiv:"+a.nodeName);f--;)c=b[f],c.specified&&d.setAttribute(c.nodeName,c.nodeValue);d.style.cssText=a.style.cssText;return d}function A(a){function c(){clearTimeout(d._removeSheetTimer);
b&&b.removeNode(!0);b=null}var b,f,d=l(a),k=a.namespaces,h=a.parentWindow;if(!r||a.printShived)return a;"undefined"==typeof k.html5shiv&&k.add("html5shiv");h.attachEvent("onbeforeprint",function(){c();var m=a.styleSheets;for(var d=[],k=m.length,h=Array(k);k--;)h[k]=m[k];for(;m=h.pop();)if(!m.disabled&&q.test(m.media)){try{var v=m.imports;var t=v.length}catch(K){t=0}for(k=0;k<t;k++)h.push(v[k]);try{d.push(m.cssText)}catch(K){}}v=d.reverse().join("").split("{");t=v.length;for(k=RegExp("(^|[\\s,\x3e+~])("+
g().join("|")+")(?\x3d[[\\s,\x3e+~#.:]|$)","gi");t--;)d=v[t]=v[t].split("}"),d[d.length-1]=d[d.length-1].replace(k,"$1html5shiv\\:$2"),v[t]=d.join("}");d=v.join("{");t=a.getElementsByTagName("*");k=t.length;h=RegExp("^(?:"+g().join("|")+")$","i");for(m=[];k--;)v=t[k],h.test(v.nodeName)&&m.push(v.applyElement(y(v)));f=m;b=e(a,d)});h.attachEvent("onafterprint",function(){for(var a=f,b=a.length;b--;)a[b].removeNode();clearTimeout(d._removeSheetTimer);d._removeSheetTimer=setTimeout(c,500)});a.printShived=
!0;return a}var f=b.html5||{},c=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,a=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,k,v=0,t={},z;(function(){try{var a=d.createElement("a");a.innerHTML="\x3cxyz\x3e\x3c/xyz\x3e";k="hidden"in a;var c;if(!(c=1==a.childNodes.length)){d.createElement("a");var b=d.createDocumentFragment();c="undefined"==typeof b.cloneNode||"undefined"==typeof b.createDocumentFragment||"undefined"==
typeof b.createElement}z=c}catch(F){z=k=!0}})();var w={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==f.shivCSS,supportsUnknownElements:z,shivMethods:!1!==f.shivMethods,type:"default",shivDocument:u,createElement:p,createDocumentFragment:function(a,c){a||(a=d);if(z)return a.createDocumentFragment();c=c||l(a);a=c.frag.cloneNode();
c=0;for(var b=g(),m=b.length;c<m;c++)a.createElement(b[c]);return a}};b.html5=w;u(d);var q=/^$|\b(?:all|print)\b/,r=!z&&function(){var a=d.documentElement;return!("undefined"==typeof d.namespaces||"undefined"==typeof d.parentWindow||"undefined"==typeof a.applyElement||"undefined"==typeof a.removeNode||"undefined"==typeof b.attachEvent)}();w.type+=" print";w.shivPrint=A;A(d)})(this,document);
var cssua=function(b,d){var e=/\s*([\-\w ]+)[\s\/\:]([\d_]+\b(?:[\-\._\/]\w+)*)/,g=/([\w\-\.]+[\s\/][v]?[\d_]+\b(?:[\-\._\/]\w+)*)/g,l=/\b(?:(blackberry\w*|bb10)|(rim tablet os))(?:\/(\d+\.\d+(?:\.\w+)*))?/,p=/\bsilk-accelerated=true\b/,h=/\bfluidapp\b/,u=/(\bwindows\b|\bmacintosh\b|\blinux\b|\bunix\b)/,y=/(\bandroid\b|\bipad\b|\bipod\b|\bwindows phone\b|\bwpdesktop\b|\bxblwp7\b|\bzunewp7\b|\bwindows ce\b|\bblackberry\w*|\bbb10\b|\brim tablet os\b|\bmeego|\bwebos\b|\bpalm|\bsymbian|\bj2me\b|\bdocomo\b|\bpda\b|\bchtml\b|\bmidp\b|\bcldc\b|\w*?mobile\w*?|\w*?phone\w*?)/,
A=/(\bxbox\b|\bplaystation\b|\bnintendo\s+\w+)/,f={parse:function(c){var a={};c=(""+c).toLowerCase();if(!c)return a;for(var b,f,d=c.split(/[()]/),z=0,w=d.length;z<w;z++)if(z%2){var q=d[z].split(";");b=0;for(f=q.length;b<f;b++)if(e.exec(q[b])){var r=RegExp.$1.split(" ").join("_"),n=RegExp.$2;if(!a[r]||parseFloat(a[r])<parseFloat(n))a[r]=n}}else if(q=d[z].match(g))for(b=0,f=q.length;b<f;b++)r=q[b].split(/[\/\s]+/),r.length&&"mozilla"!==r[0]&&(a[r[0].split(" ").join("_")]=r.slice(1).join("-"));y.exec(c)?
(a.mobile=RegExp.$1,l.exec(c)&&(delete a[a.mobile],a.blackberry=a.version||RegExp.$3||RegExp.$2||RegExp.$1,RegExp.$1?a.mobile="blackberry":"0.0.1"===a.version&&(a.blackberry="7.1.0.0"))):u.exec(c)?a.desktop=RegExp.$1:A.exec(c)&&(a.game=RegExp.$1,b=a.game.split(" ").join("_"),a.version&&!a[b]&&(a[b]=a.version));a.intel_mac_os_x?(a.mac_os_x=a.intel_mac_os_x.split("_").join("."),delete a.intel_mac_os_x):a.cpu_iphone_os?(a.ios=a.cpu_iphone_os.split("_").join("."),delete a.cpu_iphone_os):a.cpu_os?(a.ios=
a.cpu_os.split("_").join("."),delete a.cpu_os):"iphone"!==a.mobile||a.ios||(a.ios="1");a.opera&&a.version?(a.opera=a.version,delete a.blackberry):p.exec(c)?a.silk_accelerated=!0:h.exec(c)&&(a.fluidapp=a.version);if(a.applewebkit)a.webkit=a.applewebkit,delete a.applewebkit,a.opr&&(a.opera=a.opr,delete a.opr,delete a.chrome),a.safari&&(a.chrome||a.crios||a.opera||a.silk||a.fluidapp||a.phantomjs||a.mobile&&!a.ios?delete a.safari:a.safari=a.version&&!a.rim_tablet_os?a.version:{419:"2.0.4",417:"2.0.3",
416:"2.0.2",412:"2.0",312:"1.3",125:"1.2",85:"1.0"}[parseInt(a.safari,10)]||a.safari);else if(a.msie||a.trident)if(a.opera||(a.ie=a.msie||a.rv),delete a.msie,a.windows_phone_os)a.windows_phone=a.windows_phone_os,delete a.windows_phone_os;else{if("wpdesktop"===a.mobile||"xblwp7"===a.mobile||"zunewp7"===a.mobile)a.mobile="windows desktop",a.windows_phone=9>+a.ie?"7.0":10>+a.ie?"7.5":"8.0",delete a.windows_nt}else if(a.gecko||a.firefox)a.gecko=a.rv;a.rv&&delete a.rv;a.version&&delete a.version;return a},
format:function(c){var a="",b;for(b in c)if(b&&c.hasOwnProperty(b)){var f=b,d=c[b];f=f.split(".").join("-");var e=" ua-"+f;if("string"===typeof d){d=d.split(" ").join("_").split(".").join("-");for(var h=d.indexOf("-");0<h;)e+=" ua-"+f+"-"+d.substring(0,h),h=d.indexOf("-",h+1);e+=" ua-"+f+"-"+d}a+=e}return a},encode:function(c){var a="",b;for(b in c)b&&c.hasOwnProperty(b)&&(a&&(a+="\x26"),a+=encodeURIComponent(b)+"\x3d"+encodeURIComponent(c[b]));return a}};f.userAgent=f.ua=f.parse(d);d=f.format(f.ua)+
" js";b.className=b.className?b.className.replace(/\bno-js\b/g,"")+d:d.substr(1);return f}(document.documentElement,navigator.userAgent);
window.lzld||(tmg.lzld=function(b,d,e,g,l){function p(){D=!0;E();setTimeout(E,25)}function h(a,c,b){a.attachEvent?a.attachEvent&&a.attachEvent("on"+c,b):a.addEventListener(c,b,!1)}function u(a,c,b){a.detachEvent?a.detachEvent&&a.detachEvent("on"+c,b):a.removeEventListener(c,b,!1)}function y(){return 0<=d.documentElement.clientHeight?d.documentElement.clientHeight:d.body&&0<=d.body.clientHeight?d.body.clientHeight:0<=b.innerHeight?b.innerHeight:0}function A(){F=y()}function f(){var a=x.length,c,f=
!0;J=!!d.querySelector("["+I+"]");for(c=0;c<a;c++){var m=x[c];null===m||!0===m.complete||r.showIfVisible(m.img,c)||(f=!1)}f&&D&&(G=!0,u(b,"resize",C),u(b,"resize",E),u(b,"scroll",E),u(b,"touchstart",E),u(b,"load",p))}function c(){G=!1;h(b,"resize",C);h(b,"resize",E);h(b,"scroll",E);h(b,"touchstart",E)}function a(a,c){if(a.getAttribute("data-frz-src-array")){var f=a.getAttribute("data-frz-src-array")?b.JSON?JSON.parse(a.getAttribute("data-frz-src-array").replace(/'/g,'"')).sort(k):[]:[];var d=a.getAttribute("data-frz-use-parent");
if(-1<b.location.search.indexOf("debug"))var e=1;else{for(var h=e=0;h<B.length;h++)e+=parseFloat(B[h]);e=B.length===n?(e/B.length).toFixed(2)>m:!0;e=e?1:.5}var v=a.hasAttribute("src")?parseInt(a.getAttribute("width")):parseInt(a.getAttribute("data-width"));h="undefined"!==typeof a.offsetWidth?Math.floor(a.offsetWidth*tmg.viewport.dpr):tmg.getViewportWidth();c="undefined"!==typeof c?c:!1;if(NaN!=v&&v>=h){if(a.hasAttribute("src"))return null;c={};c.src=a.getAttribute("data-src");return c}null!=d&&""!=
d&&d&&(h="undefined"!==typeof a.parentNode.offsetWidth?Math.floor(a.parentNode.offsetWidth*tmg.viewport.dpr):tmg.getViewportWidth());if(f){for(a=0;a<f.length;a++)if(parseInt(f[a].width)>=h*e)return c?f[a]:f[a].src;return c?f[f.length-1]:f[f.length-1].src}}return null}function k(a,c){return a.width-c.width}function v(){var c=HTMLImageElement.prototype.getAttribute;HTMLImageElement.prototype.getAttribute=function(b){return"src"===b?a(this)||c.call(this,"data-frz-src")||c.call(this,b):c.call(this,b)}}
function t(a,c,b){for(var f=0;f<c.length;f++)if(c[f][b]===a[b])return f;return-1}function z(a,c,b){for(var f=a.getAttribute(b);a.parentNode&&a.parentNode.getAttribute;)if(a=a.parentNode,null!==a.getAttribute(c)){(c=a.getAttribute(b))&&(f=c+","+f);a.setAttribute(b,f);break}}var w=0;l=["ms","moz","webkit","o"];var q;for(q=0;q<l.length&&!b[e];++q)b[e]=b[l[q]+"RequestAnimationFrame"],b[g]=b[l[q]+"CancelAnimationFrame"]||b[l[q]+"CancelRequestAnimationFrame"];b[e]||(b[e]=function(a){var c=(new Date).getTime(),
f=Math.max(0,16-(c-w)),d=b.setTimeout(function(){a(c+f)},f);w=c+f;return d});b[g]||(b[g]=function(a){b.clearTimeout(a)});var r={},n=tmg&&tmg.bandwidth&&tmg.bandwidth.noOfMeasurements?tmg.bandwidth.measurements:5,m=tmg&&tmg.bandwidth&&tmg.bandwidth.limit?tmg.bandwidth.upperLimit:14E3;var B=b.JSON?b.JSON.parse(sessionStorage.getItem("lazyload_bandwidth")||"[]"):[];var F=y(),x=[],D=!1,G=!1,C=function(){b.requestAnimationFrame(A)},E=function(){b.requestAnimationFrame(f)},I="data-frz-ancestor",J;b.HTMLImageElement&&
v();b.lzld=function(a){J=!!d.querySelector("["+I+"]");-1===t({img:a},x,"img")&&(G&&c(),r.showIfVisible(a,x.push({img:a})-1))};(function(a){function c(f){if("readystatechange"!==f.type||"complete"===d.readyState)u("load"===f.type?b:d,f.type,c),m||(m=!0,a())}function f(){try{d.documentElement.doScroll("left")}catch(M){setTimeout(f,50);return}c("poll")}var m=!1,e=!0;if("complete"===d.readyState)a();else{if(d.createEventObject&&d.documentElement.doScroll){try{e=!b.frameElement}catch(M){}e&&f()}h(d,"DOMContentLoaded",
c);h(d,"readystatechange",c);h(b,"load",c)}})(function(){for(var a=d.getElementsByClassName("responsive-image"),c,b=0,m=a.length;b<m;b+=1)c=a[b],(c.getAttribute("data-frz-src")||c.getAttribute("data-frz-src-array"))&&-1===t({img:c},x,"img")&&x.push({img:c});f();setTimeout(E,25)});h(b,"load",p);c();r.showIfVisible=function(c,f){"undefined"==typeof f&&(f=t({img:c},x,"img"));-1===f&&(f=x.push({img:c})-1);try{if(L(d.documentElement,c)&&c.getBoundingClientRect().top<F+150&&("boolean"!==typeof b.navigator.onLine||
b.navigator.onLine)){var m=a(c,!0),e="IMG"==c.tagName;if(null!==m){if(e)c.src=m.src;else{var k=d.createElement("img");k.src=m.src}c.complete||(x[f].size=m.size,x[f].start=+new Date,x[f].timer=setTimeout(function(){x[f].expired=!0},7E3),c.onload=function(){if(x[f].size){x[f].end=+new Date;clearTimeout(x[f].timer);var a=(x[f].size/((x[f].end-x[f].start)/1E3)).toFixed(2);isFinite(a)&&(B.length>n-1&&B.shift(),B.push(a),sessionStorage.setItem("lazyload_bandwidth",b.JSON.stringify(B)))}})}c.getAttribute("data-frz-persist")||
(c.removeAttribute("data-frz-src"),c.removeAttribute("data-frz-src-array"));e&&null!==c.src?c.parentNode.style.backgroundImage="url('"+c.src+"')":null!==m&&(c.parentNode.style.backgroundImage="url('"+m.src+"')");c.parentNode.setAttribute("data-frz-ratio",c.getAttribute("data-frz-ratio"));c.parentNode.setAttribute("data-frz-parent","");J&&z(c,I,"data-frz-ratio");c.setAttribute("data-lazy-loaded","true");if(!e&&null!==m){var h=c.getAttribute("data-alt");k.className="responsive-image__source";k.alt=
h;c.appendChild(k)}return x[f].complete=!0}return!1}catch(N){}};var L=d.documentElement.compareDocumentPosition?function(a,c){return!!(a.compareDocumentPosition(c)&16)}:d.documentElement.contains?function(a,c){return a!==c&&(a.contains?a.contains(c):!1)}:function(a,c){for(;c=c.parentNode;)if(c===a)return!0;return!1};return r}(this,document,"requestAnimationFrame","cancelAnimationFrame",this.Modernizr));
(function(b){if("function"===typeof define&&define.amd)define(b);else if("object"===typeof exports)module.exports=b();else{var d=window.Cookies,e=window.Cookies=b();e.noConflict=function(){window.Cookies=d;return e}}})(function(){function b(){for(var b=0,d={};b<arguments.length;b++){var l=arguments[b],p;for(p in l)d[p]=l[p]}return d}function d(e){function g(d,p,h){if(1<arguments.length){h=b({path:"/"},g.defaults,h);if("number"===typeof h.expires){var u=new Date;u.setMilliseconds(u.getMilliseconds()+
864E5*h.expires);h.expires=u}try{var l=JSON.stringify(p);/^[\{\[]/.test(l)&&(p=l)}catch(k){}p=encodeURIComponent(String(p));p=p.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);d=encodeURIComponent(String(d));d=d.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);d=d.replace(/[\(\)]/g,escape);return document.cookie=[d,"\x3d",p,h.expires&&"; expires\x3d"+h.expires.toUTCString(),h.path&&"; path\x3d"+h.path,h.domain&&"; domain\x3d"+h.domain,h.secure?"; secure":
""].join("")}d||(l={});u=document.cookie?document.cookie.split("; "):[];for(var A=/(%[0-9A-Z]{2})+/g,f=0;f<u.length;f++){var c=u[f].split("\x3d"),a=c[0].replace(A,decodeURIComponent);c=c.slice(1).join("\x3d");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{c=e&&e(c,a)||c.replace(A,decodeURIComponent);if(this.json)try{c=JSON.parse(c)}catch(k){}if(d===a){l=c;break}d||(l[a]=c)}catch(k){}}return l}g.get=g.set=g;g.getJSON=function(){return g.apply({json:!0},[].slice.call(arguments))};g.defaults={};g.remove=function(d,
e){g(d,"",b(e,{expires:-1}))};g.withConverter=d;return g}return d()});
(window["tmg.build"]=window["tmg.build"]||[]).push([[10],[,function(b,d,e){var g,l;e=[d,e(0),e(2)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=function(){return document.location};e=function(){var b={};return function(f){if(b[f])return b[f];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=f;b.addEventListener("load",
a,!1);c.appendChild(b)});return b[f]=c,c}}();e={getChannel:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"tmgads.channel"]');return f&&f.content&&"/"!==h().pathname&&"portal"!==f.content&&(b=f.content),b},getContentType:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return f&&f.content&&(b=f.content),b},getLocation:h,injectScript:e,
isArticle:function(){return document.body.classList.contains("articleRenderer2")}};d.default.create("tmg.page");tmg.page=e;b.default=e})?g.apply(d,e):g)||(b.exports=l)}],[[1,0,1]]]);
(window["tmg.build"]=window["tmg.build"]||[]).push([[4,10],[,function(b,d,e){var g,l;e=[d,e(0),e(2)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=function(){return document.location};e=function(){var b={};return function(f){if(b[f])return b[f];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=f;b.addEventListener("load",
a,!1);c.appendChild(b)});return b[f]=c,c}}();e={getChannel:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"tmgads.channel"]');return f&&f.content&&"/"!==h().pathname&&"portal"!==f.content&&(b=f.content),b},getContentType:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return f&&f.content&&(b=f.content),b},getLocation:h,injectScript:e,
isArticle:function(){return document.body.classList.contains("articleRenderer2")}};d.default.create("tmg.page");tmg.page=e;b.default=e})?g.apply(d,e):g)||(b.exports=l)},,,function(b,d,e){var g,l;e=[d,e(0),e(1)];void 0===(l="function"==typeof(g=function(b,d,e){function h(){return g.default.create("tmg.environment"),tmg.environment=t,c=a()}Object.defineProperty(b,"__esModule",{value:!0});var g=d&&d.__esModule?d:{default:d},f=e&&e.__esModule?e:{default:e},c=void 0,a=function(){var a=k().prod,c=f.default.getLocation().hostname.split(".");
a=c.some(function(a){return"local"===a||"127"===a||"localhost"===a});var b=c.some(function(a){return/(^|-)qa[0-9]+$/i.test(a)}),d=c.some(function(a){return/(^|-)ci[0-9]+$/i.test(a)}),e=c.some(function(a){return/-perf$/i.test(a)});c=c.some(function(a){return/(^|-)staging(.*)$/i.test(a)});switch(!0){case a:a=k().local;break;case b:a=k().qa;break;case d:a=k().ci;break;case e:a=k().perf;break;case c:a=k().staging;break;default:a=k().prod}return a},k=function(){return{local:"local",qa:"qa",ci:"ci",perf:"perf",
staging:"staging",prod:"prod"}},v=function(){return c===k().local},t={getEnvironment:function(){return c},getList:k,getTld:function(){return"telegraph.co.uk"},init:h,isCommentingTurnedOn:function(){var a=!1;try{void 0!==tmg.COMMENTING_STATUS&&(a=!!tmg.COMMENTING_STATUS)}catch(w){}return a},isAuthor:function(){return!!window.CQ},isHttps:function(){return"https:"===f.default.getLocation().protocol||v()},isLocal:v};h();b.default=t})?g.apply(d,e):g)||(b.exports=l)}],[[4,0,1]]]);
(window["tmg.build"]=window["tmg.build"]||[]).push([[11,4,7,10],[,function(b,d,e){var g,l;e=[d,e(0),e(2)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=function(){return document.location};e=function(){var b={};return function(f){if(b[f])return b[f];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=f;b.addEventListener("load",
a,!1);c.appendChild(b)});return b[f]=c,c}}();e={getChannel:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"tmgads.channel"]');return f&&f.content&&"/"!==h().pathname&&"portal"!==f.content&&(b=f.content),b},getContentType:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",f=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return f&&f.content&&(b=f.content),b},getLocation:h,injectScript:e,
isArticle:function(){return document.body.classList.contains("articleRenderer2")}};d.default.create("tmg.page");tmg.page=e;b.default=e})?g.apply(d,e):g)||(b.exports=l)},,function(b,d,e){var g,l;e=[d,e(0)];void 0===(l="function"==typeof(g=function(b,d){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var e={},h=function(c){var a={};return"string"==typeof c&&(a=g(c.replace(/'/g,'"'))),a},g=function(c,a){a=a||{};var b=c,d="",e=[],h=[],g=/[{?,\s]\s*"([^"]|\\")+"\s*:(\s*"([^"]|\\")+"|(.+))\s*[},]/gi,
l=/^\s*{?\s*'|'\s*}?\s*$/i;if(!c)return a;if("[object Object]"===Object.prototype.toString.call(c))return c;if(f(b)||((b.match(g)||[]).forEach(function(a){if(a.includes('"label"')){var c=a.replace(/^\s*[{\s]|[,}]\s*$/gi,"").split(":")[1].replace(/\s*"([^]+|\\")"\s*$/gi,"$1"),d=c.replace(/"/gi,'\\"');c=a.replace(c,d);b=b.replace(a,c)}}),d=b.replace(g,""),e=d.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/)),e.forEach(function(a){a=a.replace(/^\s*{|}\s*$/gi,"");f("{"+a+"}")||h.push(a)}),h.forEach(function(a){var c=
!1,d=a;!0===l.test(a)&&(d=a.replace(/^\s*'([^']+|\\')':/,'"$1":').replace(/:\s*('')\s*$/,': ""').replace(/:\s*'([^']+|\\')'\s*$/,': "$1"'),c=f("{"+d+"}"));c||!0!==/[^"']\w+[^"']:/.test(d)||(d=d.replace(/^\s*(.*?):/,'"$1":'),c=f("{"+d+"}"));c&&(b=b.replace(a,d))}),f(b))a=f(b);else try{JSON.parse(b)}catch(r){console.log("tmg.json.tryParse failed:",r)}return a},f=function(c){var a=!1;try{a=JSON.parse(c)}catch(k){}return a};e={parseFromAem:h,tryParse:g,simpleTryParse:f};d.default.create("tmg.json");tmg.json=
e;b.default=e;tmg.parseAemJson=h})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(0),e(1)];void 0===(l="function"==typeof(g=function(b,d,e){function h(){return g.default.create("tmg.environment"),tmg.environment=t,c=a()}Object.defineProperty(b,"__esModule",{value:!0});var g=d&&d.__esModule?d:{default:d},f=e&&e.__esModule?e:{default:e},c=void 0,a=function(){var a=k().prod,c=f.default.getLocation().hostname.split(".");a=c.some(function(a){return"local"===a||"127"===a||"localhost"===
a});var b=c.some(function(a){return/(^|-)qa[0-9]+$/i.test(a)}),d=c.some(function(a){return/(^|-)ci[0-9]+$/i.test(a)}),e=c.some(function(a){return/-perf$/i.test(a)});c=c.some(function(a){return/(^|-)staging(.*)$/i.test(a)});switch(!0){case a:a=k().local;break;case b:a=k().qa;break;case d:a=k().ci;break;case e:a=k().perf;break;case c:a=k().staging;break;default:a=k().prod}return a},k=function(){return{local:"local",qa:"qa",ci:"ci",perf:"perf",staging:"staging",prod:"prod"}},v=function(){return c===
k().local},t={getEnvironment:function(){return c},getList:k,getTld:function(){return"telegraph.co.uk"},init:h,isCommentingTurnedOn:function(){var a=!1;try{void 0!==tmg.COMMENTING_STATUS&&(a=!!tmg.COMMENTING_STATUS)}catch(w){}return a},isAuthor:function(){return!!window.CQ},isHttps:function(){return"https:"===f.default.getLocation().protocol||v()},isLocal:v};h();b.default=t})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(7),e(4),e(3),e(0),e(6)];void 0===(l="function"==typeof(g=function(b,
d,e,g,l,f){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0});var a=c(d),k=c(e),h=c(g);d=c(l);var t=c(f),z={pId:"",firstName:"",lastName:"",username:"",email:"",readerType:"",subscriber:"",subButton:""},w={livefyreToken:"livefyre-token",meterCount:"tmg_meter_count",personalisation:"tmg_p13n",publicId:"tmg_pid",registrationSuccess:"tmg_registration_success",rememberMe:"tmg_rem",session:"tmg_session",subscriptionConfirmation:"tmg_subscription_confirmation"},
q={},r=document.querySelector("html"),n=(k.default.getTld(),function(a,c){if(c||(k.default.getTld(),function(){var a=document.querySelectorAll('[class*\x3d"logged-in--"], [class*\x3d"is-subscriber--"]');(a=Array.prototype.slice.call(a)).forEach(function(a){n(a,!0)})})(),a)return a.className=a.className.replace(/\b(?:logged-in--|is-subscriber--).+\b/g,""),a.classList&&(a.classList.add("logged-in--"+u()),a.classList.add("is-subscriber--"+p())),a.classList}),m=function(){var c=a.default.get(w.personalisation);
return h.default.tryParse(c,z)},u=function(){return!!a.default.get(w.session)},p=function(){return"true"===q.subscriber||""===a.default.get(w.subscriptionConfirmation)},x=function(){return window.sessionStorage.removeItem("id_token"),window.sessionStorage.removeItem("access_token"),a.default.remove(w.session),y(),!0},y=function(){return q=m(),n(r),q};f={applyStatusCssClasses:n,clearAllData:function(){for(var c in x(),w)a.default.remove(w[c]);return t.default.remove("fyre-auth"),t.default.remove("fyre-authentication-creds"),
y(),!0},getLiveFyreToken:function(){return a.default.get(w.livefyreToken)||!1},getLiveFyreDetails:function(){var a=t.default.get("fyre-auth")||"{}";return h.default.tryParse(a)},getMeterCount:function(){return!1},getMyTelegraphToken:function(){var a=t.default.storage.read("tmg.user.mytelegraph.token");return"undefined"!==a&&null!==a||(a=!1),a},getProfile:m,getSessionId:function(){return a.default.get(w.session)||""},isLoggedIn:u,isRegistered:function(){return!!q.pId},isSubscriber:p,login:function(){return y(),
!1},logout:x,setMyTelegraphToken:function(a){return t.default.storage.write("tmg.user.mytelegraph.token",a.token)},updateState:y};d.default.create("tmg.user");window.tmg.user=f;k.default.isLocal();q=y();b.default=f})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(10),e(0)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};(e&&e.__esModule?e:{default:e}).default.create("tmg.store");tmg.store=d.default;b.default=
d.default})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d];void 0===(l="function"==typeof(g=function(b){function d(){for(var b=0,d={};b<arguments.length;b++){var e=arguments[b],f;for(f in e)d[f]=e[f]}return d}Object.defineProperty(b,"__esModule",{value:!0});b.default=function y(b){function f(c,a,e){if(1<arguments.length){if("number"==typeof(e=d({path:"/"},f.defaults,e)).expires){var k=new Date;k.setMilliseconds(k.getMilliseconds()+864E5*e.expires);e.expires=k}try{var h=JSON.stringify(a);
/^[\{\[]/.test(h)&&(a=h)}catch(n){}return a=(a=encodeURIComponent(String(a))).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=(c=(c=encodeURIComponent(String(c))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[c,"\x3d",a,e.expires&&"; expires\x3d"+e.expires.toUTCString(),e.path&&"; path\x3d"+e.path,e.domain&&"; domain\x3d"+e.domain,e.secure?"; secure":""].join("")}c||(h={});k=document.cookie?document.cookie.split("; "):
[];for(var g=/(%[0-9A-Z]{2})+/g,l=0;l<k.length;l++){var q=k[l].split("\x3d"),r=q[0].replace(g,decodeURIComponent);q=q.slice(1).join("\x3d");'"'===q.charAt(0)&&(q=q.slice(1,-1));try{if(q=b&&b(q,r)||q.replace(g,decodeURIComponent),this.json)try{q=JSON.parse(q)}catch(n){}if(c===r){h=q;break}c||(h[r]=q)}catch(n){}}return h}return f.get=f.set=f,f.getJSON=function(){return f.apply({json:!0},[].slice.call(arguments))},f.defaults={},f.remove=function(c,a){f(c,"",d(a,{expires:-1}))},f.withConverter=y,f}()})?
g.apply(d,e):g)||(b.exports=l)},,,function(b,d,e){(function(e){var g,p,h;!function(e,l){p=[b,d];void 0===(h="function"==typeof(g=l)?g.apply(d,p):g)||(b.exports=h)}(0,function(b,d){var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};!function(f){"object"==(void 0===d?"undefined":l(d))&&void 0!==b?b.exports=f():(p=[],void 0===(h="function"==typeof(g=
f)?g.apply(d,p):g)||(b.exports=h))}(function(){return function c(a,b,d){function e(h,g){if(!b[h]){if(!a[h]){if(k)return k(h,!0);g=Error("Cannot find module '"+h+"'");throw g.code="MODULE_NOT_FOUND",g;}g=b[h]={exports:{}};a[h][0].call(g.exports,function(c){return e(a[h][1][c]||c)},g,g.exports,c,a,b,d)}return b[h].exports}for(var k=!1,h=0;h<d.length;h++)e(d[h]);return e}({1:[function(c,a,b){b=c("../src/store-engine");c=[c("../storages/localStorage"),c("../storages/sessionStorage"),c("../storages/cookieStorage"),
c("../storages/memoryStorage")];a.exports=b.createStore(c,[])},{"../src/store-engine":2,"../storages/cookieStorage":4,"../storages/localStorage":5,"../storages/memoryStorage":6,"../storages/sessionStorage":7}],2:[function(c,a,b){function d(a,c,b){b||(b="");a&&!n(a)&&(a=[a]);c&&!n(c)&&(c=[c]);var d=b?"__storejs_"+b+"_":"",t=b?new RegExp("^"+d):null;if(!/^[a-zA-Z0-9_\-]*$/.test(b))throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");var v=l({_namespacePrefix:d,_namespaceRegexp:t,
_testStorage:function(a){try{a.write("__storejs__test__","__storejs__test__");var c="__storejs__test__"===a.read("__storejs__test__");return a.remove("__storejs__test__"),c}catch(H){return!1}},_assignPluginFnProp:function(a,c){var b=this[c];this[c]=function(){var c=e(arguments,0),d=this,m=[function(){if(b)return k(arguments,function(a,b){c[b]=a}),b.apply(d,c)}].concat(c);return a.apply(d,m)}},_serialize:function(a){return JSON.stringify(a)},_deserialize:function(a,c){if(!a)return c;var b="";try{b=
JSON.parse(a)}catch(K){b=a}return void 0!==b?b:c},_addStorage:function(a){this.enabled||this._testStorage(a)&&(this.storage=a,this.enabled=!0)},_addPlugin:function(a){var c=this;if(n(a))k(a,function(a){c._addPlugin(a)});else if(!h(this.plugins,function(c){return a===c})){if(this.plugins.push(a),!m(a))throw Error("Plugins must be function values that return objects");var b=a.call(this);if(!u(b))throw Error("Plugins must return an object of function properties");k(b,function(b,d){if(!m(b))throw Error("Bad plugin property: "+
d+" from plugin "+a.name+". Plugins should only return functions.");c._assignPluginFnProp(b,d)})}},addStorage:function(a){(function(){var a="undefined"==typeof console?null:console;a&&(a.warn?a.warn:a.log).apply(a,arguments)})("store.addStorage(storage) is deprecated. Use createStore([storages])");this._addStorage(a)}},p,{plugins:[]});return v.raw={},k(v,function(a,c){m(a)&&(v.raw[c]=g(v,a))}),k(a,function(a){v._addStorage(a)}),k(c,function(a){v._addPlugin(a)}),v}c=c("./util");var e=c.slice,h=c.pluck,
k=c.each,g=c.bind,l=c.create,n=c.isList,m=c.isFunction,u=c.isObject;a.exports={createStore:d};var p={version:"2.0.12",enabled:!1,get:function(a,c){a=this.storage.read(this._namespacePrefix+a);return this._deserialize(a,c)},set:function(a,c){return void 0===c?this.remove(a):(this.storage.write(this._namespacePrefix+a,this._serialize(c)),c)},remove:function(a){this.storage.remove(this._namespacePrefix+a)},each:function(a){var c=this;this.storage.each(function(b,d){a.call(c,c._deserialize(b),(d||"").replace(c._namespaceRegexp,
""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return d(this.storage,this.plugins,a)}}},{"./util":3}],3:[function(c,a,b){(function(c){function b(a,c){return Array.prototype.slice.call(a,c||0)}function d(a,c){e(a,function(a,b){return c(a,b),!1})}function e(a,c){if(h(a))for(var b=0;b<a.length;b++){if(c(a[b],
b))return a[b]}else for(b in a)if(a.hasOwnProperty(b)&&c(a[b],b))return a[b]}function h(a){return null!=a&&"function"!=typeof a&&"number"==typeof a.length}var k=Object.assign?Object.assign:function(a,c,b,e){for(var m=1;m<arguments.length;m++)d(Object(arguments[m]),function(c,b){a[b]=c});return a},g=function(){if(Object.create)return function(a,c,d,e){var m=b(arguments,1);return k.apply(this,[Object.create(a)].concat(m))};var a=function(){};return function(c,d,e,m){var h=b(arguments,1);return a.prototype=
c,k.apply(this,[new a].concat(h))}}();a.exports={assign:k,create:g,trim:String.prototype.trim?function(a){return String.prototype.trim.call(a)}:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},bind:function(a,c){return function(){return c.apply(a,Array.prototype.slice.call(arguments,0))}},slice:b,each:d,map:function(a,c){var b=h(a)?[]:{};return e(a,function(a,d){return b[d]=c(a,d),!1}),b},pluck:e,isList:h,isFunction:function(a){return a&&"[object Function]"==={}.toString.call(a)},
isObject:function(a){return a&&"[object Object]"==={}.toString.call(a)},Global:"undefined"!=typeof window?window:c}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(c,a,b){function d(a){for(var c=g.cookie.split(/; ?/g),b=c.length-1;0<=b;b--)if(k(c[b])){var d=c[b].split("\x3d"),e=unescape(d[0]);a(unescape(d[1]),e)}}function e(a){a&&h(a)&&(g.cookie=escape(a)+"\x3d; expires\x3dThu, 01 Jan 1970 00:00:00 GMT; path\x3d/")}function h(a){return(new RegExp("(?:^|;\\s*)"+
escape(a).replace(/[\-\.\+\*]/g,"\\$\x26")+"\\s*\\\x3d")).test(g.cookie)}c=c("../src/util");b=c.Global;var k=c.trim;a.exports={name:"cookieStorage",read:function(a){if(!a||!h(a))return null;a="(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$\x26")+"\\s*\\\x3d\\s*((?:[^;](?!;))*[^;]?).*";return unescape(g.cookie.replace(new RegExp(a),"$1"))},write:function(a,c){a&&(g.cookie=escape(a)+"\x3d"+escape(c)+"; expires\x3dTue, 19 Jan 2038 03:14:07 GMT; path\x3d/")},each:d,remove:e,clearAll:function(){d(function(a,
c){e(c)})}};var g=b.document},{"../src/util":3}],5:[function(c,a,b){function d(a){return e.localStorage.getItem(a)}var e=c("../src/util").Global;a.exports={name:"localStorage",read:d,write:function(a,c){return e.localStorage.setItem(a,c)},each:function(a){for(var c=e.localStorage.length-1;0<=c;c--){var b=e.localStorage.key(c);a(d(b),b)}},remove:function(a){return e.localStorage.removeItem(a)},clearAll:function(){return e.localStorage.clear()}}},{"../src/util":3}],6:[function(c,a,b){a.exports={name:"memoryStorage",
read:function(a){return d[a]},write:function(a,c){d[a]=c},each:function(a){for(var c in d)d.hasOwnProperty(c)&&a(d[c],c)},remove:function(a){delete d[a]},clearAll:function(a){d={}}};var d={}},{}],7:[function(c,a,b){function d(a){return e.sessionStorage.getItem(a)}var e=c("../src/util").Global;a.exports={name:"sessionStorage",read:d,write:function(a,c){return e.sessionStorage.setItem(a,c)},each:function(a){for(var c=e.sessionStorage.length-1;0<=c;c--){var b=e.sessionStorage.key(c);a(d(b),b)}},remove:function(a){return e.sessionStorage.removeItem(a)},
clearAll:function(){return e.sessionStorage.clear()}}},{"../src/util":3}]},{},[1])(1)})})}).call(this,e(11))},function(b,d,e){var g,l;e=[b];void 0===(l="function"==typeof(g=function(b){var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};var e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(y){"object"===("undefined"==
typeof window?"undefined":d(window))&&(e=window)}b.exports=e})?g.apply(d,e):g)||(b.exports=l)}],[[5,0,1]]]);tmg.createNamespace("tmg.commenting");
tmg.commenting=function(b,d,e,g,l){function p(){return"undefined"===typeof e.COMMENTING_STATUS||!!e.COMMENTING_STATUS}function h(){var b="",h=void 0,f=[];h=Array.prototype.slice.call(d.querySelectorAll('[data-js\x3d"comment-count"]'));h.filter(function(c){return-1<c.dataset.options.indexOf("articleId")}).forEach(function(c){c=e.parseAemJson(c.dataset.options);-1===f.indexOf(c.articleId)&&f.push(c.articleId);!b&&c.siteId&&(b=c.siteId)});f.forEach(function(c){var a=localStorage.getItem("tmg.commenting.count-"+
c);a&&u(c,a)});e.commenting.fetchCountsFromLiveFyre(b,f).then(function(c){f.forEach(function(a){c[a]&&c[a].total&&(localStorage.setItem("tmg.commenting.count-"+a,c[a].total),u(a,c[a].total))})})}function u(b,e,f){b=Array.prototype.slice.call(d.querySelectorAll('[data-js\x3d"comment-count"][data-options*\x3d"'+b+'"]'));9999<e&&(e="10k +");b.forEach(function(c){c.querySelector('[data-js\x3d"comment-count__number"]').innerHTML=e;(f||9<e)&&c.parentNode.classList.add("is-visible")})}e.pageReady(function(){p()&&
h()});return{fetchCountsFromLiveFyre:function(d,e){var f=void 0;f="https://telegraphmedia"+("prod"===l.getEnvironment()?"":"-int")+".bootstrap.fyre.co/api/v1.1/public/comments/ncomments/";e=btoa(d+":"+e.join(","));return f=b.fetch(""+f+e+".json").then(function(c){return 200<=c.status&&300>c.status?Promise.resolve(c):Promise.reject(Error(c.statusText))}).then(function(c){return c.json()}).then(function(c){return c.data[d]||{}},function(c){console.log("error getting data from livefyre",c);return{}})},
isFeatureEnabled:p,loadLiveFyreLibrary:function(d){return new Promise(function(e,f){b.Livefyre?e():e(g.injectScript(d))})},processCounts:h,renderIndicatorCount:u}}(window,document,tmg,tmg.page,tmg.environment);
(window["tmg.build"]=window["tmg.build"]||[]).push([[14,4,7,10,11,13],[,function(b,d,e){var g,l;e=[d,e(0),e(2)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var h=function(){return document.location};e=function(){var b={};return function(d){if(b[d])return b[d];var c=new Promise(function(a,c){c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src=
d;b.addEventListener("load",a,!1);c.appendChild(b)});return b[d]=c,c}}();e={getChannel:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",d=document.querySelector('meta[name\x3d"tmgads.channel"]');return d&&d.content&&"/"!==h().pathname&&"portal"!==d.content&&(b=d.content),b},getContentType:function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"generic",d=document.querySelector('meta[name\x3d"DCSext.Content_Type"]');return d&&d.content&&(b=d.content),
b},getLocation:h,injectScript:e,isArticle:function(){return document.body.classList.contains("articleRenderer2")}};d.default.create("tmg.page");tmg.page=e;b.default=e})?g.apply(d,e):g)||(b.exports=l)},,function(b,d,e){var g,l;e=[d,e(0)];void 0===(l="function"==typeof(g=function(b,d){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var e={},h=function(c){var a={};return"string"==typeof c&&(a=g(c.replace(/'/g,'"'))),a},g=function(c,a){a=a||{};var b=c,d="",e=[],h=[],g=
/[{?,\s]\s*"([^"]|\\")+"\s*:(\s*"([^"]|\\")+"|(.+))\s*[},]/gi,l=/^\s*{?\s*'|'\s*}?\s*$/i;if(!c)return a;if("[object Object]"===Object.prototype.toString.call(c))return c;if(f(b)||((b.match(g)||[]).forEach(function(a){if(a.includes('"label"')){var c=a.replace(/^\s*[{\s]|[,}]\s*$/gi,"").split(":")[1].replace(/\s*"([^]+|\\")"\s*$/gi,"$1"),d=c.replace(/"/gi,'\\"');c=a.replace(c,d);b=b.replace(a,c)}}),d=b.replace(g,""),e=d.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/)),e.forEach(function(a){a=a.replace(/^\s*{|}\s*$/gi,
"");f("{"+a+"}")||h.push(a)}),h.forEach(function(a){var c=!1,d=a;!0===l.test(a)&&(d=a.replace(/^\s*'([^']+|\\')':/,'"$1":').replace(/:\s*('')\s*$/,': ""').replace(/:\s*'([^']+|\\')'\s*$/,': "$1"'),c=f("{"+d+"}"));c||!0!==/[^"']\w+[^"']:/.test(d)||(d=d.replace(/^\s*(.*?):/,'"$1":'),c=f("{"+d+"}"));c&&(b=b.replace(a,d))}),f(b))a=f(b);else try{JSON.parse(b)}catch(r){console.log("tmg.json.tryParse failed:",r)}return a},f=function(c){var a=!1;try{a=JSON.parse(c)}catch(k){}return a};e={parseFromAem:h,tryParse:g,
simpleTryParse:f};d.default.create("tmg.json");tmg.json=e;b.default=e;tmg.parseAemJson=h})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(0),e(1)];void 0===(l="function"==typeof(g=function(b,d,e){function h(){return g.default.create("tmg.environment"),tmg.environment=t,c=a()}Object.defineProperty(b,"__esModule",{value:!0});var g=d&&d.__esModule?d:{default:d},f=e&&e.__esModule?e:{default:e},c=void 0,a=function(){var a=k().prod,c=f.default.getLocation().hostname.split(".");a=c.some(function(a){return"local"===
a||"127"===a||"localhost"===a});var b=c.some(function(a){return/(^|-)qa[0-9]+$/i.test(a)}),d=c.some(function(a){return/(^|-)ci[0-9]+$/i.test(a)}),e=c.some(function(a){return/-perf$/i.test(a)});c=c.some(function(a){return/(^|-)staging(.*)$/i.test(a)});switch(!0){case a:a=k().local;break;case b:a=k().qa;break;case d:a=k().ci;break;case e:a=k().perf;break;case c:a=k().staging;break;default:a=k().prod}return a},k=function(){return{local:"local",qa:"qa",ci:"ci",perf:"perf",staging:"staging",prod:"prod"}},
l=function(){return c===k().local},t={getEnvironment:function(){return c},getList:k,getTld:function(){return"telegraph.co.uk"},init:h,isCommentingTurnedOn:function(){var a=!1;try{void 0!==tmg.COMMENTING_STATUS&&(a=!!tmg.COMMENTING_STATUS)}catch(w){}return a},isAuthor:function(){return!!window.CQ},isHttps:function(){return"https:"===f.default.getLocation().protocol||l()},isLocal:l};h();b.default=t})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(7),e(4),e(3),e(0),e(6)];void 0===(l=
"function"==typeof(g=function(b,d,e,g,l,f){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0});var a=c(d),h=c(e),v=c(g);d=c(l);var t=c(f),p={pId:"",firstName:"",lastName:"",username:"",email:"",readerType:"",subscriber:"",subButton:""},w={livefyreToken:"livefyre-token",meterCount:"tmg_meter_count",personalisation:"tmg_p13n",publicId:"tmg_pid",registrationSuccess:"tmg_registration_success",rememberMe:"tmg_rem",session:"tmg_session",subscriptionConfirmation:"tmg_subscription_confirmation"},
q={},r=document.querySelector("html"),n=(h.default.getTld(),function(a,c){if(c||(h.default.getTld(),function(){var a=document.querySelectorAll('[class*\x3d"logged-in--"], [class*\x3d"is-subscriber--"]');(a=Array.prototype.slice.call(a)).forEach(function(a){n(a,!0)})})(),a)return a.className=a.className.replace(/\b(?:logged-in--|is-subscriber--).+\b/g,""),a.classList&&(a.classList.add("logged-in--"+u()),a.classList.add("is-subscriber--"+y())),a.classList}),m=function(){var c=a.default.get(w.personalisation);
return v.default.tryParse(c,p)},u=function(){return!!a.default.get(w.session)},y=function(){return"true"===q.subscriber||""===a.default.get(w.subscriptionConfirmation)},x=function(){return window.sessionStorage.removeItem("id_token"),window.sessionStorage.removeItem("access_token"),a.default.remove(w.session),D(),!0},D=function(){return q=m(),n(r),q};f={applyStatusCssClasses:n,clearAllData:function(){for(var c in x(),w)a.default.remove(w[c]);return t.default.remove("fyre-auth"),t.default.remove("fyre-authentication-creds"),
D(),!0},getLiveFyreToken:function(){return a.default.get(w.livefyreToken)||!1},getLiveFyreDetails:function(){var a=t.default.get("fyre-auth")||"{}";return v.default.tryParse(a)},getMeterCount:function(){return!1},getMyTelegraphToken:function(){var a=t.default.storage.read("tmg.user.mytelegraph.token");return"undefined"!==a&&null!==a||(a=!1),a},getProfile:m,getSessionId:function(){return a.default.get(w.session)||""},isLoggedIn:u,isRegistered:function(){return!!q.pId},isSubscriber:y,login:function(){return D(),
!1},logout:x,setMyTelegraphToken:function(a){return t.default.storage.write("tmg.user.mytelegraph.token",a.token)},updateState:D};d.default.create("tmg.user");window.tmg.user=f;h.default.isLocal();q=D();b.default=f})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(10),e(0)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};(e&&e.__esModule?e:{default:e}).default.create("tmg.store");tmg.store=d.default;b.default=
d.default})?g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d];void 0===(l="function"==typeof(g=function(b){function d(){for(var b=0,d={};b<arguments.length;b++){var e=arguments[b],f;for(f in e)d[f]=e[f]}return d}Object.defineProperty(b,"__esModule",{value:!0});b.default=function y(b){function e(c,a,f){if(1<arguments.length){if("number"==typeof(f=d({path:"/"},e.defaults,f)).expires){var g=new Date;g.setMilliseconds(g.getMilliseconds()+864E5*f.expires);f.expires=g}try{var h=JSON.stringify(a);
/^[\{\[]/.test(h)&&(a=h)}catch(n){}return a=(a=encodeURIComponent(String(a))).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=(c=(c=encodeURIComponent(String(c))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[c,"\x3d",a,f.expires&&"; expires\x3d"+f.expires.toUTCString(),f.path&&"; path\x3d"+f.path,f.domain&&"; domain\x3d"+f.domain,f.secure?"; secure":""].join("")}c||(h={});g=document.cookie?document.cookie.split("; "):
[];for(var k=/(%[0-9A-Z]{2})+/g,l=0;l<g.length;l++){var q=g[l].split("\x3d"),r=q[0].replace(k,decodeURIComponent);q=q.slice(1).join("\x3d");'"'===q.charAt(0)&&(q=q.slice(1,-1));try{if(q=b&&b(q,r)||q.replace(k,decodeURIComponent),this.json)try{q=JSON.parse(q)}catch(n){}if(c===r){h=q;break}c||(h[r]=q)}catch(n){}}return h}return e.get=e.set=e,e.getJSON=function(){return e.apply({json:!0},[].slice.call(arguments))},e.defaults={},e.remove=function(b,a){e(b,"",d(a,{expires:-1}))},e.withConverter=y,e}()})?
g.apply(d,e):g)||(b.exports=l)},function(b,d,e){var g,l;e=[d,e(0),e(1)];void 0===(l="function"==typeof(g=function(b,d,e){Object.defineProperty(b,"__esModule",{value:!0});d=d&&d.__esModule?d:{default:d};var g=e&&e.__esModule?e:{default:e},h=new RegExp(/\?[^#]*|(?=#)|$/),f=function(){var a={};return function(b){return a[b]||(a[b]=new RegExp("([?\x26;]"+b+"(?\x3d[\x3d\x26;#]|$))\x3d?([^\x26;#]*)"))}}(),c=function(a,b){return(a=f(b).exec(a))&&decodeURIComponent(a[2])},a=function(a,b,d){var e=void 0,k=
void 0,l=void 0;return void 0===a&&(a=g.default.getLocation().search),null===c(a,b)?(e=b+"\x3d"+encodeURIComponent(d),k=h.exec(a)[0],l=a.replace(h,(k.length?k+"\x26":"?")+e)):l=a.replace(f(b),"$1\x3d"+encodeURIComponent(d)),l};e=function(a,b){if(null!==c(b,a)){var d=b.split("?")[0];b=(-1!==b.indexOf("?")?b.split("?")[1]:"").split("\x26");for(var e=b.length-1;0<=e;--e)b[e].split("\x3d")[0]===a&&b.splice(e,1);return d+(0<b.length?"?":"")+b.join("\x26")}return b};var k=function(b,d){return null!==c(b,
"redirectTo")?a(b,"redirectTo",d):b};d.default.create("tmg.GET_PARAM");tmg.getQuerystringParam=c;tmg.setQuerystringParam=a;tmg.removeQuerystringParam=e;tmg.updateRedirectParam=k;location.search.substr(1).split("\x26").forEach(function(a){a=a.split("\x3d");1<a.length?tmg.GET_PARAM[a[0]]=decodeURIComponent(a[1]):tmg.GET_PARAM[a[0]]=""});b.default={matchParam:f,matchQuerystring:h,getQuerystringParam:c,removeQuerystringParam:e,setQuerystringParam:a,updateRedirectParam:k}})?g.apply(d,e):g)||(b.exports=
l)},,function(b,d,e){(function(e){var g,p,h;!function(e,l){p=[b,d];void 0===(h="function"==typeof(g=l)?g.apply(d,p):g)||(b.exports=h)}(0,function(b,d){var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};!function(e){"object"==(void 0===d?"undefined":l(d))&&void 0!==b?b.exports=e():(p=[],void 0===(h="function"==typeof(g=e)?g.apply(d,p):g)||(b.exports=
h))}(function(){return function c(a,b,d){function e(h,k){if(!b[h]){if(!a[h]){if(g)return g(h,!0);k=Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k;}k=b[h]={exports:{}};a[h][0].call(k.exports,function(b){return e(a[h][1][b]||b)},k,k.exports,c,a,b,d)}return b[h].exports}for(var g=!1,h=0;h<d.length;h++)e(d[h]);return e}({1:[function(b,a,d){d=b("../src/store-engine");b=[b("../storages/localStorage"),b("../storages/sessionStorage"),b("../storages/cookieStorage"),b("../storages/memoryStorage")];
a.exports=d.createStore(b,[])},{"../src/store-engine":2,"../storages/cookieStorage":4,"../storages/localStorage":5,"../storages/memoryStorage":6,"../storages/sessionStorage":7}],2:[function(b,a,d){function c(a,b,c){c||(c="");a&&!n(a)&&(a=[a]);b&&!n(b)&&(b=[b]);var d=c?"__storejs_"+c+"_":"",t=c?new RegExp("^"+d):null;if(!/^[a-zA-Z0-9_\-]*$/.test(c))throw Error("store.js namespaces can only have alphanumerics + underscores and dashes");var r=l({_namespacePrefix:d,_namespaceRegexp:t,_testStorage:function(a){try{a.write("__storejs__test__",
"__storejs__test__");var b="__storejs__test__"===a.read("__storejs__test__");return a.remove("__storejs__test__"),b}catch(H){return!1}},_assignPluginFnProp:function(a,b){var c=this[b];this[b]=function(){var b=e(arguments,0),d=this,g=[function(){if(c)return h(arguments,function(a,c){b[c]=a}),c.apply(d,b)}].concat(b);return a.apply(d,g)}},_serialize:function(a){return JSON.stringify(a)},_deserialize:function(a,b){if(!a)return b;var c="";try{c=JSON.parse(a)}catch(K){c=a}return void 0!==c?c:b},_addStorage:function(a){this.enabled||
this._testStorage(a)&&(this.storage=a,this.enabled=!0)},_addPlugin:function(a){var b=this;if(n(a))h(a,function(a){b._addPlugin(a)});else if(!g(this.plugins,function(b){return a===b})){if(this.plugins.push(a),!m(a))throw Error("Plugins must be function values that return objects");var c=a.call(this);if(!p(c))throw Error("Plugins must return an object of function properties");h(c,function(c,d){if(!m(c))throw Error("Bad plugin property: "+d+" from plugin "+a.name+". Plugins should only return functions.");
b._assignPluginFnProp(c,d)})}},addStorage:function(a){(function(){var a="undefined"==typeof console?null:console;a&&(a.warn?a.warn:a.log).apply(a,arguments)})("store.addStorage(storage) is deprecated. Use createStore([storages])");this._addStorage(a)}},u,{plugins:[]});return r.raw={},h(r,function(a,b){m(a)&&(r.raw[b]=k(r,a))}),h(a,function(a){r._addStorage(a)}),h(b,function(a){r._addPlugin(a)}),r}b=b("./util");var e=b.slice,g=b.pluck,h=b.each,k=b.bind,l=b.create,n=b.isList,m=b.isFunction,p=b.isObject;
a.exports={createStore:c};var u={version:"2.0.12",enabled:!1,get:function(a,b){a=this.storage.read(this._namespacePrefix+a);return this._deserialize(a,b)},set:function(a,b){return void 0===b?this.remove(a):(this.storage.write(this._namespacePrefix+a,this._serialize(b)),b)},remove:function(a){this.storage.remove(this._namespacePrefix+a)},each:function(a){var b=this;this.storage.each(function(c,d){a.call(b,b._deserialize(c),(d||"").replace(b._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},
hasNamespace:function(a){return this._namespacePrefix=="__storejs_"+a+"_"},createStore:function(){return c.apply(this,arguments)},addPlugin:function(a){this._addPlugin(a)},namespace:function(a){return c(this.storage,this.plugins,a)}}},{"./util":3}],3:[function(b,a,d){(function(b){function c(a,b){return Array.prototype.slice.call(a,b||0)}function d(a,b){e(a,function(a,c){return b(a,c),!1})}function e(a,b){if(g(a))for(var c=0;c<a.length;c++){if(b(a[c],c))return a[c]}else for(c in a)if(a.hasOwnProperty(c)&&
b(a[c],c))return a[c]}function g(a){return null!=a&&"function"!=typeof a&&"number"==typeof a.length}var h=Object.assign?Object.assign:function(a,b,c,e){for(var g=1;g<arguments.length;g++)d(Object(arguments[g]),function(b,c){a[c]=b});return a},k=function(){if(Object.create)return function(a,b,d,e){var g=c(arguments,1);return h.apply(this,[Object.create(a)].concat(g))};var a=function(){};return function(b,d,e,g){var m=c(arguments,1);return a.prototype=b,h.apply(this,[new a].concat(m))}}();a.exports=
{assign:h,create:k,trim:String.prototype.trim?function(a){return String.prototype.trim.call(a)}:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},bind:function(a,b){return function(){return b.apply(a,Array.prototype.slice.call(arguments,0))}},slice:c,each:d,map:function(a,b){var c=g(a)?[]:{};return e(a,function(a,d){return c[d]=b(a,d),!1}),c},pluck:e,isList:g,isFunction:function(a){return a&&"[object Function]"==={}.toString.call(a)},isObject:function(a){return a&&"[object Object]"===
{}.toString.call(a)},Global:"undefined"!=typeof window?window:b}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(b,a,d){function c(a){for(var b=k.cookie.split(/; ?/g),c=b.length-1;0<=c;c--)if(h(b[c])){var d=b[c].split("\x3d"),e=unescape(d[0]);a(unescape(d[1]),e)}}function e(a){a&&g(a)&&(k.cookie=escape(a)+"\x3d; expires\x3dThu, 01 Jan 1970 00:00:00 GMT; path\x3d/")}function g(a){return(new RegExp("(?:^|;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,
"\\$\x26")+"\\s*\\\x3d")).test(k.cookie)}b=b("../src/util");d=b.Global;var h=b.trim;a.exports={name:"cookieStorage",read:function(a){if(!a||!g(a))return null;a="(?:^|.*;\\s*)"+escape(a).replace(/[\-\.\+\*]/g,"\\$\x26")+"\\s*\\\x3d\\s*((?:[^;](?!;))*[^;]?).*";return unescape(k.cookie.replace(new RegExp(a),"$1"))},write:function(a,b){a&&(k.cookie=escape(a)+"\x3d"+escape(b)+"; expires\x3dTue, 19 Jan 2038 03:14:07 GMT; path\x3d/")},each:c,remove:e,clearAll:function(){c(function(a,b){e(b)})}};var k=d.document},
{"../src/util":3}],5:[function(b,a,d){function c(a){return e.localStorage.getItem(a)}var e=b("../src/util").Global;a.exports={name:"localStorage",read:c,write:function(a,b){return e.localStorage.setItem(a,b)},each:function(a){for(var b=e.localStorage.length-1;0<=b;b--){var d=e.localStorage.key(b);a(c(d),d)}},remove:function(a){return e.localStorage.removeItem(a)},clearAll:function(){return e.localStorage.clear()}}},{"../src/util":3}],6:[function(b,a,d){a.exports={name:"memoryStorage",read:function(a){return c[a]},
write:function(a,b){c[a]=b},each:function(a){for(var b in c)c.hasOwnProperty(b)&&a(c[b],b)},remove:function(a){delete c[a]},clearAll:function(a){c={}}};var c={}},{}],7:[function(b,a,d){function c(a){return e.sessionStorage.getItem(a)}var e=b("../src/util").Global;a.exports={name:"sessionStorage",read:c,write:function(a,b){return e.sessionStorage.setItem(a,b)},each:function(a){for(var b=e.sessionStorage.length-1;0<=b;b--){var d=e.sessionStorage.key(b);a(c(d),d)}},remove:function(a){return e.sessionStorage.removeItem(a)},
clearAll:function(){return e.sessionStorage.clear()}}},{"../src/util":3}]},{},[1])(1)})})}).call(this,e(11))},function(b,d,e){var g,l;e=[b];void 0===(l="function"==typeof(g=function(b){var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(b){return typeof b}:function(b){return b&&"function"==typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b};var e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(y){"object"===("undefined"==
typeof window?"undefined":d(window))&&(e=window)}b.exports=e})?g.apply(d,e):g)||(b.exports=l)},,,,,,,,,,,,,function(b,d,e){var g,l;e=[d,e(7),e(0),e(1),e(8),e(5)];void 0===(l="function"==typeof(g=function(b,d,e,g,l,f){function c(a){return a&&a.__esModule?a:{default:a}}Object.defineProperty(b,"__esModule",{value:!0});var a=c(d);d=c(e);var h=c(g),p=c(l),t=c(f),u=a.default.get("tmg_registration_success"),w=a.default.get("tmg_registration_update"),q=a.default.get("tmg_subscription_confirmation");g=function(){var b=
"";u?(dataLayer.event=["registrationComplete"],dataLayer.registration={registrationType:"success_facebook"===u?"facebook":"email",emailOptIn:"success_emailoffers-true"===u?"true":"false"},b="tmg_registration_success"):w?(dataLayer.event=["registrationUpdate"],dataLayer.registration={registrationType:"email"},b="tmg_registration_update"):q?(dataLayer.event=["subscriptionConfirmation"],dataLayer.subscription=JSON.parse(q),b="tmg_subscription_confirmation"):"paymentRenderer"===dataLayer.pageType&&(dataLayer.event=
["subscriptionCheckout"],dataLayer.subscription={productID:p.default.getQuerystringParam(h.default.getLocation().search,"productId")});b&&a.default.remove(b,{domain:".telegraph.co.uk"});t.default.isLoggedIn()?dataLayer.userStatus=t.default.isSubscriber()?"subscribed":"registered":dataLayer.userStatus="anonymous"};d.default.create("tmg.dataLayerUtils");window.tmg.dataLayerUtils.update=g;window.dataLayer=window.dataLayer||{};g();b.default={update:g}})?g.apply(d,e):g)||(b.exports=l)}],[[24,0,1]]]);