!function(e){function t(t){for(var r,a,c=t[0],s=t[1],u=t[2],f=0,d=[];f1&&void 0!==arguments[1]?arguments[1]:[];return e&&Array.isArray(e)?e:t},C=function(){var e=O()(y.a.mark((function e(t){var n,r,o,i,a,c;return y.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.context,r=t.layers,o=void 0===r?[]:r,i={},a=0;case 3:if(!(a0&&void 0!==arguments[0]?arguments[0]:{},t=e.client_id_cookie_name,n=void 0===t?"_amp_pd":t,r=e.expires,o=void 0===r?365:r,i=S.a.get(n);if(!i){var a=window.location.hostname.split(".").splice(-2,2).join(".");i="amp-".concat(Object(x.a)()),S.a.set({name:n,value:i,days:o,domain:a})}return i},H=function(e){l()(n,e);var t=E(n);function n(e){var r;return s()(this,n),(r=t.call(this,e)).name="ClientEventSchemaLayerError",r}return a()(n)}(v()(Error)),M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return new H('Missing required field: "'.concat(e,'"'))},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.debug,r=void 0!==n&&n,i=Object.entries(e).filter((function(e){var t=o()(e,2)[1];return!(t instanceof H)||(r&&console.warn(t),!1)})),a=i.reduce((function(e,t){var n=o()(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return a}},function(e,t,n){"use strict";function r(e,t){var n=e.match(t);return n&&n.length?n[0]:null}var o={getBuzzfeedSubdomainOrWildcard:function(e){var t=r(e,"(dev|stage|www).(buzzfeed|buzzfeednews).(com|io)$");return t||r(e,".?[a-z]+.[a-z]+$")},get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="".concat(e,"=");if("undefined"==typeof document)return t;for(var r=document.cookie.split(";"),o=0;o>e/4).toString(16)}))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return f}));var r=n(38);function o(e){if(!e)return null;var t=Array.from(e.attributes).filter((function(e){return e.name.match(/^data-vars-/)&&e.value}));if(0===t.length)return null;var n=t.map((function(e){return[e.name.match(/^data-vars-(.*)/)[1].replace(/-/g,"_"),e.value]}));return Object.fromEntries(n)}function i(e){if(!e)return null;var t=e.closest(".o2-cvs-carousel-tile");if(!t)return null;var n,r=[].slice.call(t.parentElement.children).indexOf(t),o=t.querySelector(".o2-cvs-video-thumbnail");if(o&&o.hasAttribute("style")){var i=o.getAttribute("style").match(/url\(['"](.+?)['"]\)/);i&&(n=i[1].split("/").slice(-2,-1)[0])}return{item_name:n,item_type:"card",position_in_subunit:r,target_content_id:n,target_content_type:"video",type:"web_internal_link"}}function a(e){var t=!0;return"function"==typeof window.matchMedia&&(t=window.matchMedia("(min-width: 1024px)").matches),t&&!!e.closest(".js-right-container")}function c(){var e=!1;return"function"==typeof window.matchMedia&&(e=!window.matchMedia("(min-width: 1024px)").matches),e}function s(e,t){var n="";return t.forEach((function(t,r,o){n+="".concat(e," ").concat(t),r!==o.length-1&&(n+=", ")})),n}function u(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=0,u="",l=o.length>0?o:[".js-card[data-vars-type]","a[data-vars-type]:not(.js-card[data-vars-type] a)","button[data-vars-type]",".js-cet-item"],f=e.closest(".js-cet-subunit");if(!f)return null;if("buzz"===t)u="sidebar"===n?"left"===r?".js-cet-unit-left":".js-cet-unit-right":"site_header"===r||"nav_bar"===n?".js-cet-unit-site-header":"top_ad"===r?".js-cet-unit-top-ad":".js-cet-unit-".concat(n);else if(a(f)||"sidebar"===n)u=".js-cet-unit-right";else if(c())u=".js-cet-unit-main";else if("site_header"===r||"nav_bar"===n)u=".js-cet-unit-site-header";else if("top_ad"===r)u=".js-cet-unit-top-ad";else{var d=s(".js-cet-unit-main",l),p=s(".js-cet-unit-right",l),h=Array.from(document.querySelectorAll(d)),m=new Set(Array.from(document.querySelectorAll(p))),v=h.filter((function(e){return!m.has(e)}));if((i=v.indexOf(e))>=0)return i}return(i=Array.from(document.querySelectorAll(s(u,l))).indexOf(e))>=0?i:null}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t&&t.unit_name?t.unit_name:"main",r=t&&t.unit_type?t.unit_type:"feed";return a(e)?{unit_name:"right",unit_type:"sidebar"}:{unit_name:n,unit_type:r}}function f(e){var t,n=e&&"native"===e.type,o=e&&"linkout"===e.type&&e.url&&(e.url.startsWith("/")||r.primeOrder.some((function(t){return e.url.startsWith(t.link)}))),i=n||o,a=i?"web_internal_link":"web_external_link",c=null;i&&(c=e.url.includes("/entry/")?"buzz":"feed");try{t=i?e.url.includes("/entry/")?e.entry_id:new URL(e.url).pathname:e.url}catch(e){}return{contentType:c,contentId:t,type:a}}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(95)},function(e,t){function n(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,s,"next",e)}function s(e){n(a,o,i,c,s,"throw",e)}c(void 0)}))}}},,function(e,t){function n(e){return(n="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})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=e.apply(t,r);function c(e){n(a,o,i,c,s,"next",e)}function s(e){n(a,o,i,c,s,"throw",e)}c(void 0)}))}}},function(e,t){function n(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r=o(e,t);return n.dispatchEvent(r)}},function(e,t,n){"use strict";var r=function(){try{return window.sessionStorage.setItem("test","1"),window.sessionStorage.removeItem("test"),window.sessionStorage}catch(e){return null}}(),o=!!r;function i(){}var a=i,c=i,s=i,u=i,l=function(){return!1};o&&(c=function(e,t){try{r.setItem(e,(n=t,JSON.stringify(n)))}catch(e){}var n},s=function(e){r.removeItem(e)},u=function(){r.clear()},l=function(e){return void 0!==r.getItem(e)},(a=function(e){return function(e){if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e||void 0}}(r.getItem(e))})("lastPurge")<=1430758101108&&(u(),c("lastPurge",Date.now()))),t.a={enabled:o,get:a,set:c,remove:s,clear:u,has:l}},function(e,t,n){var r=n(69),o=n(67),i=n(70);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(96);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r,o=n(40);function i(){return r||(r=Object(o.a)("user/profile").then((function(e){return e.profile})).catch((function(){return null}))),r}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.findEditionIdFromHostname=t.ClientSafeConfig=void 0;const o=r(n(39));t.ClientSafeConfig=o.default;const i=n(74);Object.defineProperty(t,"findEditionIdFromHostname",{enumerable:!0,get:function(){return i.findEditionIdFromHostname}})},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},,,,,,function(e,t){function n(e,t){for(var n=0;n-1}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientSafeEditionMap=void 0;const o=r(n(75)),i=r(n(76)),a=r(n(77)),c=r(n(78)),s=r(n(79)),u=r(n(80)),l=r(n(81)),f=r(n(82)),d=r(n(83)),p=r(n(84)),h=r(n(85)),m=r(n(86)),v=r(n(87)),g=r(n(88)),y=r(n(89)),b=r(n(90));t.ClientSafeEditionMap={au:i.default,br:a.default,ca:c.default,es:s.default,fr:u.default,gr:l.default,in:f.default,it:d.default,jp:p.default,kr:h.default,mg:m.default,qc:v.default,spoilsuk:g.default,uk:y.default,us:b.default};const w=Object.keys(t.ClientSafeEditionMap);const _=Object.entries(t.ClientSafeEditionMap).reduce((e,[t,n])=>{const r={...o.default,...n};return Object.assign(e,{[t]:r})},{});t.default={isEditionId:function(e){return w.includes(e)},byEdition:_}},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(3),o=n.n(r),i=n(10),a=n.n(i),c=n(12),s=n.n(c),u=n(34),l=n.n(u),f=n(35),d=n.n(f),p=n(25),h=n.n(p),m=n(36),v=n.n(m),g=n(37),y=n.n(g),b=n(19),w=n.n(b),_=n(56),O=n.n(_),S=n(57);var x=function(e){v()(n,e);var t=function(e){function t(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}return function(){var n,r=w()(e);if(t()){var o=w()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y()(this,n)}}(n);function n(e,r){var o;return d()(this,n),o=t.call(this,"Mapi Error: ".concat(r.message)),Error.captureStackTrace(h()(o),n),o.name=o.constructor.name,o.resp=e,o.clientMessage=r.message,o}return l()(n)}(O()(Error)),E="production"===("object"===("undefined"==typeof window?"undefined":s()(window))&&window.HP&&window.HP.mapiEnv)?"mapi.huffpost.com":"staging.mapi.huffpost.com";function j(e){return k.apply(this,arguments)}function k(){return(k=a()(o.a.mark((function e(t){var n,r,i,a,c,s,u,l=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>1&&void 0!==l[1]?l[1]:{},r=l.length>2&&void 0!==l[2]?l[2]:"POST",t=0===t.indexOf("/")?t.slice(1):t,i=n.edition?n.edition:"us",a={credentials:"include",headers:{Accept:"application/json"}},n.body&&(a.method=r,a.headers["Content-Type"]="application/json",a.body=JSON.stringify(n.body)),c=Object(S.a)(Object.assign({device:"desktop"},n.queryParams)),e.next=9,fetch("https://".concat(E,"/mapi/v4/").concat(i,"/").concat(t,"?").concat(c),a);case 9:if(!(s=e.sent).ok){e.next=12;break}return e.abrupt("return",s.json());case 12:return e.prev=12,e.next=15,s.json();case 15:u=e.sent,e.next=20;break;case 18:e.prev=18,e.t0=e.catch(12);case 20:throw new x(s,u);case 21:case"end":return e.stop()}}),e,null,[[12,18]])})))).apply(this,arguments)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=document.getElementById("rr-experiment-data"),n=!!t&&JSON.parse(t.innerHTML),r=n?h({},e,{hp_rr_ad_test:n}):e;window.HP.params.abBackToHomeTest.doNotPublishEvent&&delete r.hp_back_to_home_test;var o=Object.keys(r).map((function(e){return"".concat(e,"|").concat(r[e].id,"|").concat(r[e].version,"|").concat(r[e].value,"|").concat(r[e].variant_id)}));m||console.log("ABEAGLE:",o),Object(d.a)("abeagleEvent",{experiment_id:o})},b=function(){var e=a()(o.a.mark((function e(){var t,n,r,i,a,c,s,u,l,d,p,h,b;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=g(),i=window.HUFFPOST.params.clientUUID,a=null===(t=window.HP.params.abeagle)||void 0===t?void 0:t.length,c=null===(n=window.HP.params.serverAbeagle)||void 0===n?void 0:n.length,m){e.next=15;break}if(s=new URLSearchParams(window.location.search),u=s.get("test"),l=s.get("v"),d={},!u||!l){e.next=15;break}return d[u]={id:0,version:2,resolved:!0,is_feature_flag:!1,value:"".concat(l),variant_id:0,payload:null},f.a.set("abeagleExperiments",d),y(d,i),console.log("ABeagle override set for test: ".concat(u," with variant: ").concat(l)),e.abrupt("return");case 15:if(!c||!r){e.next=18;break}return y(r),e.abrupt("return");case 18:if(!r){e.next=21;break}return y(r),e.abrupt("return");case 21:if(!c||a){e.next=24;break}return y(),e.abrupt("return");case 24:return p=new URLSearchParams({user_id:i,source:"huffpost_web",experiment_names:window.HP.params.abeagle.join(";")}),e.next=27,fetch("".concat(v,"?").concat(p),{method:"GET"});case 27:if(!(h=e.sent).ok){e.next=34;break}return e.next=31,h.json();case 31:b=e.sent,f.a.set("abeagleExperiments",b),y(b,i);case 34:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.waitForGlobal((function(){return window.HP&&window.HP.params&&window.HP.params.clientUUID&&window.HP.params.theme&&(!window.HP.params.isEntry||window.HP.params.abBackToHomeTest.ready)}),a()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b();case 1:case"end":return e.stop()}}),e)})))),t.a={getExperimentVariant:function(e){var t=g()[e];if(t)return t.value;console.error("ERROR: No ABeagle Experiment found with name:",e)}}},,,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n,r){var o=t&&t.prototype instanceof l?t:l,i=Object.create(o.prototype),a=new O(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return x()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===u)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=s(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var u={};function l(){}function f(){}function d(){}var p={};p[o]=function(){return this};var h=Object.getPrototypeOf,m=h&&h(h(S([])));m&&m!==t&&n.call(m,o)&&(p=m);var v=d.prototype=l.prototype=Object.create(p);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function y(e){var t;this._invoke=function(r,o){function i(){return new Promise((function(t,i){!function t(r,o,i,a){var c=s(e[r],e,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,a)}))}a(c.arg)}(r,o,t,i)}))}return t=t?t.then(i,i):i()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function S(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},,function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t{const r=[n.hostname,...Array.isArray(n.additional_hostnames)?n.additional_hostnames:[]].map(e=>[t,e]);return e.concat(r)},[]).sort(([e],[t])=>t.split("").reverse().join().localeCompare(e.split("").reverse().join()));t.findEditionIdFromHostname=function(e){const[t=null]=i.find(([,t])=>e.endsWith(t))||[];return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.com.au"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffpostbrasil.com"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.ca"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.es"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.fr"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.gr"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.in"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.it"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.jp"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.kr"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffpostmaghreb.com"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"quebec.huffingtonpost.ca"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"thespoils.huffpost.co.uk"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffingtonpost.co.uk"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={hostname:"huffpost.com",additional_hostnames:["huffingtonpost.com"]}},,function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(26);function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},,function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new S(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),i}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function f(){}function d(){}function p(){}var h={};c(h,o,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(x([])));v&&v!==t&&n.call(v,o)&&(h=v);var g=p.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,c){var s=u(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,c)}))}c(s.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function x(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}},function(e,t,n){var r=n(41);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}},function(e,t,n){var r=n(28),o=n(107);function i(t,n,a){return o()?e.exports=i=Reflect.construct:e.exports=i=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i},i.apply(null,arguments)}e.exports=i},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}},,function(e,t,n){"use strict";var r=n(18),o=n.n(r),i=n(150),a=n(0),c=function(e){var t=e.context_page_id,n=void 0===t?Object(a.g)("context_page_id"):t,r=e.context_page_type,o=void 0===r?Object(a.g)("context_page_type"):r,i=e.destination,c=void 0===i?Object(a.g)("destination"):i;return function(){return{context_page_id:String(n),context_page_type:o,destination:c}}},s=function(e){var t=e.item_name,n=void 0===t?Object(a.g)("item_name"):t,r=e.item_type,o=void 0===r?Object(a.g)("item_type"):r,i=e.position_in_subunit,c=e.position_in_unit;return function(){return{item_name:String(n),item_type:o,position_in_subunit:Object(a.c)(i),position_in_unit:Object(a.c)(c)}}},u=function(e){var t=e.subunit_name,n=void 0===t?"":t,r=e.subunit_type,o=void 0===r?"":r;return function(){return{subunit_name:Object(a.b)(n.toString()),subunit_type:o}}},l=function(e){var t=e.unit_name,n=void 0===t?Object(a.g)("unit_name"):t,r=e.unit_type,o=void 0===r?Object(a.g)("unit_type"):r;return function(){return{unit_type:o,unit_name:Object(a.b)(n)}}},f={flush:!0,required_layers:[function(e){var t=e.action_type,n=void 0===t?Object(a.g)("action_type"):t,r=e.action_value,o=void 0===r?Object(a.g)("action_value"):r;return function(){return{action_type:n,action_value:o.toString()}}},c,s,u,l],type:"web_content_action"},d=function(e){var t=e.data_source_algorithm,n=e.data_source_algorithm_version,r=e.data_source_name,o=void 0===r?"":r;return function(){return{data_source_algorithm:Object(a.a)(Object(a.e)(t)),data_source_algorithm_version:Object(a.a)(Object(a.e)(n)),data_source_name:decodeURIComponent(o)}}},p=function(e){var t=e.item_name,n=void 0===t?Object(a.g)("item_name"):t,r=e.target_content_id,o=void 0===r?n:r,i=e.target_content_type,c=void 0===i?Object(a.g)("target_content_type"):i;return function(){return{target_content_id:String(o),target_content_type:c}}},h={flush:!0,required_layers:[c,d,p,s,u,l],type:"web_internal_link"},m={flush:!0,required_layers:[c,function(e){var t=e.target_content_url,n=void 0===t?Object(a.g)("target_content_url"):t;return function(){return{target_content_url:n}}},s,u,l],type:"web_external_link"},v={required_layers:[c,d,p,s,u,l],type:"web_impression"},g={required_layers:[c,function(e){var t=e.total_duration,n=void 0===t?Object(a.g)("total_duration"):t,r=e.active_duration,o=void 0===r?Object(a.g)("active_duration"):r;return function(){return{total_duration:n,active_duration:o}}}],type:"web_time_spent"},y={required_layers:[c],type:"web_pageview"},b={required_layers:[c,function(e){var t=e.experiment_id,n=void 0===t?Object(a.g)("experiment_id"):t;return{experiment_id:Object(a.e)(n)}}],type:"web_ab_test"},w=function(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{},n=t.threshold,r=void 0===n?.5:n,o=t.visibility_time,i=void 0===o?1e3:o;if("undefined"==typeof window)return function(){};var a=new Map,c=new Map,s=function(e,t){e.forEach((function(e){if(a.has(e.target)){if(!e.isIntersecting)return clearTimeout(c.get(e.target)),void c.delete(e.target);if(!(c.has(e.target)||e.intersectionRatio1?n-1:0),o=1;o1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},o=Date.now(),i={active_duration:o-r,total_duration:o-n};i.total_duration>0&&e.apply(void 0,[{layers:[i,t]}].concat(u)),n=Date.now(),r=Date.now()},p=function(){if("hidden"===document.visibilityState){c=!0,d({time_spent_event_type:"page_visibility"}),cancelAnimationFrame(f)}else"visible"===document.visibilityState&&(r=Date.now(),setTimeout((function(){return c=!1}),2e3),m(i,a))},h=function(e){var o=e.detail;if(o.find((function(e){return t.includes(e.type)}))){var i=o[0];r=n;var a=E({},i);delete a.event_ts,delete a.event_uuid,delete a.type,delete a.source,a.time_spent_event_type="link_click",d(a)}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;function n(e){var t=Date.now()-i;if(Math.floor(t/1e3)>e&&!c){c=!0;d({time_spent_event_type:"heartbeat"}),setTimeout((function(){return c=!1}),1e3),i=Date.now(),e=10*Math.pow(2,Math.floor(o/2)),a=e,o++}cancelAnimationFrame(f),f=requestAnimationFrame((function(){return n(e)}))}i=e||Date.now(),n(t)};return m(),document.addEventListener("visibilitychange",p),window.addEventListener("cet-event",h),function(){cancelAnimationFrame(f),document.removeEventListener("visibilitychange",p),window.removeEventListener("cet-event",h)}};return function(){return s.apply(void 0,arguments)}},k=n(22),P=n(7);const L=()=>{const e="undefined"!=typeof navigator&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection);return e?e.effectiveType:""};var T=()=>()=>({connection_type:L()});var I=(e,{flush:t=!1,layers:n=[],sample_rate:r=.1,type:o})=>(...i)=>{e({flush:t,required_layers:[c,T],sample_rate:r,type:o},...n,...i)};var C,A,H,M,F=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},R=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},D=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},z=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},q=function(e,t,n){var r;return function(o){t.value>=0&&(o||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},N=-1,U=function(){return"hidden"===document.visibilityState?0:1/0},B=function(){D((function(e){var t=e.timeStamp;N=t}),!0)},K=function(){return N<0&&(N=U(),B(),z((function(){setTimeout((function(){N=U(),B()}),0)}))),{get firstHiddenTime(){return N}}},G=function(e,t){var n,r=K(),o=F("FCP"),i=function(e){"first-contentful-paint"===e.name&&(c&&c.disconnect(),e.startTime-1&&e(t)},o=F("CLS",0),i=0,a=[],c=function(e){if(!e.hadRecentInput){var t=a[0],r=a[a.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>o.value&&(o.value=i,o.entries=a,n())}},s=R("layout-shift",c);s&&(n=q(r,o,t),D((function(){s.takeRecords().map(c),n(!0)})),z((function(){i=0,V=-1,o=F("CLS",0),n=q(r,o,t)})))},Y={passive:!0,capture:!0},W=new Date,Z=function(e,t){C||(C=t,A=e,H=new Date,ee(removeEventListener),X())},X=function(){if(A>=0&&A1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Z(e,t),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,Y),removeEventListener("pointercancel",r,Y)};addEventListener("pointerup",n,Y),addEventListener("pointercancel",r,Y)}(t,e):Z(t,e)}},ee=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Q,Y)}))},te=function(e,t){var n,r=K(),o=F("FID"),i=function(e){e.startTime{let n="";try{for(;e&&9!==e.nodeType;){const r=e.id?"#"+e.id:e.nodeName.toLowerCase()+(e.className&&e.className.length?"."+Array.from(e.classList.values()).join("."):"");if(n.length+r.length>t-1)return n||r;if(n=n?`${r} > ${n}`:r,e.id)break;e=e.parentNode}}catch(e){}return n};var oe=e=>{$(({entries:t})=>{if(t.length)try{const n=[...t];n.sort((e,t)=>e&&e.value>t.value?-1:1),n.slice(0,3).forEach((t,n)=>{if(t&&t.sources&&t.sources.length){const r=t.sources.reduce((e,t)=>{if(!e.node)return!1;return e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t});e({metric_name:"largest-layout-shift-node-"+n,metric_type:"custom",metric_value:t.value,metric_metadata_type:"css-selector",metric_metadata_value:re(r.node)||""})}})}catch(e){}})};var ie=e=>{te((function(){if("PerformanceLongTaskTiming"in window){const t=new PerformanceObserver(n=>{const r=n.getEntries(),o=r.length,i=r.reduce((e,{duration:t})=>e+t-50,0);o&&(e({metric_name:"cumulative-longtask-count",metric_type:"custom",metric_value:o}),e({metric_name:"cumulative-blocking-time",metric_type:"custom",metric_value:i})),t.disconnect()});t.observe({type:"longtask",buffered:!0})}}))};var ae=(e,{ignore_pattern:t,limit:n=10}={})=>{te((function(){"__jsProfiler"in window&&window.scheduler.postTask(async()=>{performance.mark("__jsProfiler_start");const r=await window.__jsProfiler.stop();performance.measure("__jsProfiler","__jsProfiler_start");const o=new PerformanceObserver((async function(i){o.disconnect();const a=((e,t,{ignore_pattern:n="chunks/(?:framework|main|webpack)"}={})=>{performance.mark("getLongestRunningFrames_start");const r=[],o=[],i=new RegExp(n),a=t.samples.entries();for(const n of e){const e={};for(const[,r]of a)if(r.stackId&&r.timestamp>=n.startTime){if(r.timestamp>n.startTime+n.duration)break;let o=t.stacks[r.stackId];for(;"parentId"in o;)e[o.frameId]=(e[o.frameId]||0)+1,o=t.stacks[o.parentId]}Object.keys(e).length&&o.push([n,e])}o.sort((e,t)=>t[0].duration-e[0].duration);const c=(e,n)=>{if(n[1]<5)return e;if(e[1]>n[1])return e;const r=t.frames[n[0]];if(!("resourceId"in r))return e;const o=t.resources[r.resourceId];return i&&i.test(o)?e:n};for(const[e,n]of o){const[o]=Object.entries(n).reduce(c,[]);if(o){const n=t.frames[o],i=t.resources[n.resourceId];r.push([e,n,i])}}return performance.measure("getLongestRunningFrames","getLongestRunningFrames_start"),r})(i.getEntries(),r,{ignore_pattern:t});for(const[t,r,o]of a){if(!--n)break;e({metric_name:"longtask-longest-frame",metric_type:"custom",metric_value:t.duration,metric_metadata_type:"stacktrace",metric_metadata_value:`${o}:${r.line}:${r.column}`})}}));o.observe({type:"longtask",buffered:!0})},{priority:"background"})}))};var ce=(e,{layers:t=[],profiling:n={},sample_rate:r=.1}={})=>{const o={layers:t,sample_rate:r,type:"web_performance_metric"},i=I(e,{...o,flush:!0}),a=I(e,o),c=I(e,{...o,sample_rate:1});"__trackAbandons"in window&&document.removeEventListener("visibilitychange",window.__trackAbandons),oe(i),ie(a),ae(c,n)};var se=e=>{$(t=>{e({metric_name:"cumulative-layout-shift",metric_type:"web-vital",metric_value:t.value})})};var ue=e=>{G(t=>{e({metric_name:"first-contentful-paint",metric_type:"web-vital",metric_value:t.value})})};var le=e=>{te(t=>{e({metric_name:"first-input-delay",metric_type:"web-vital",metric_value:t.value})})};var fe=e=>{!function(e,t){var n,r=K(),o=F("LCP"),i=function(e){var t=e.startTime;t{e({metric_name:"largest-contentful-paint",metric_type:"web-vital",metric_value:t.value})})};var de=(e,{layers:t=[],sample_rate:n=.1}={})=>{const r={layers:t,sample_rate:n,type:"web_performance_metric"},o=I(e,r),i=I(e,{...r,flush:!0});se(i),ue(o),le(i),fe(i)};var pe=e=>{if("PerformanceNavigationTiming"in window){const t=()=>{const[t]=performance.getEntriesByType("navigation");e({timing_duration:t.duration,timing_name:t.name,timing_start_time:t.startTime,timing_type:t.entryType,resource_connect_end:t.connectEnd,resource_connect_start:t.connectStart,resource_decoded_body_size:void 0===t.decodedBodySize?null:t.decodedBodySize,resource_domain_lookup_end:t.domainLookupEnd,resource_domain_lookup_start:t.domainLookupStart,resource_encoded_body_size:void 0===t.encodedBodySize?null:t.encodedBodySize,resource_fetch_start:t.fetchStart,resource_initiator_type:t.initiatorType,resource_next_hop_protocol:void 0===t.nextHopProtocol?null:t.nextHopProtocol,resource_redirect_end:t.redirectEnd,resource_redirect_start:t.redirectStart,resource_request_start:t.requestStart,resource_response_end:t.responseEnd,resource_response_start:t.responseStart,resource_secure_connection_start:void 0===t.secureConnectionStart?null:t.secureConnectionStart,resource_transfer_size:void 0===t.transferSize?null:t.transferSize,resource_worker_start:void 0===t.workerStart?null:t.workerStart,navigation_dom_complete:t.domComplete,navigation_dom_content_loaded_event_end:t.domContentLoadedEventEnd,navigation_dom_content_loaded_event_start:t.domContentLoadedEventStart,navigation_dom_interactive:t.domInteractive,navigation_load_event_end:t.loadEventEnd,navigation_load_event_start:t.loadEventStart,navigation_redirect_count:t.redirectCount,navigation_type:t.type,navigation_unload_event_end:t.unloadEventEnd,navigation_unload_event_start:t.unloadEventStart})};"complete"===document.readyState?t():window.addEventListener("load",()=>requestAnimationFrame(t))}};var he=(e,{layers:t=[],sample_rate:n=.1}={})=>{pe(I(e,{layers:t,sample_rate:n,type:"web_performance_navigation_timing"}))};var me=(e,{layers:t=[],sample_rate:n=.1,profiling:r={}}={})=>{const o={layers:t,sample_rate:n};de(e,o),he(e,o),ce(e,{...o,profiling:r})},ve=window.HUFFPOST.cetEnabled||!1?Object(i.a)({env:window.HUFFPOST.trackingEnv,source:"web_huffpost",cross_domain_cookies:!1}):function(){return!1};window.HUFFPOST.content_action=f;var ge=window.HUFFPOST.tracking&&window.HUFFPOST.tracking.context_page_id||"",ye=window.HUFFPOST.tracking&&window.HUFFPOST.tracking.context_page_type||"",be=window.HUFFPOST.tracking&&window.HUFFPOST.tracking.page_edition||"",we={context_page_id:ge,context_page_type:ye,destination:"huffpost",page_edition:be};if(!document.body.classList.contains("cet-events-disabled")&&ge&&ye){var _e=w((function(e){var t=e.event.target.closest("a[data-vars-type], button[data-vars-type]"),n=t?t.closest(".js-card[data-vars-type]"):null;t=n||t;var r=Object(P.b)(t);if(r){var o;switch(r.position_in_unit=Object(P.c)(t,ye,r.unit_type,r.unit_name),Object.assign(r,Object(P.e)(t,r),window.HUFFPOST.tracking),r.type){case"web_content_action":o=f;break;case"web_internal_link":o=h;break;case"web_external_link":o=m;break;default:o=h}ve(o,r)}})),Oe=w((function(e){var t=e.event,n=t.target.closest(".vdb_player");if(!n)return null;var r=Object.assign(Object(P.b)(n),window.HUFFPOST.tracking),o=Object(P.a)(t.target);return o?(Object.assign(o,r),o.position_in_unit=Object(P.c)(n,ye,r.unit_type,r.unit_name),console.log(o),ve(h,o)):null}));_e(document.body);var Se=document.getElementById("zone-video");Se&&Oe(Se);var xe=_((function(e){ve(v,e)})),Ee=".js-card[data-vars-type], .js-entry-link[data-vars-type]";document.querySelectorAll(Ee).forEach((function(e){var t=Object(P.b)(e);t&&(t.position_in_unit=Object(P.c)(e,ye,t.unit_type,t.unit_name,Ee.split(",")),Object.assign(t,Object(P.e)(e,t),window.HUFFPOST.tracking,{type:"web_impression"})),xe(e,t)})),function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i=e}function h(){return r.a.get("cohort_start")||Math.min.apply(Math,i()(Object.keys(u("pv"))))||a}r.a.get("cohort_start")||r.a.set("cohort_start",h()),s().forEach((function(e){!function(e){var t=u(e);Object.keys(t).map(d).filter(p).forEach((function(e){delete t[e]})),l(e,t)}(e)}));var m={increment:function(e){f(e,1)},add:f,total:function(e){var t=u(e),n=0;return Object.keys(t).forEach((function(e){n+=t[e]})),n},cohorts:s,raw:u,allRaw:function(){return s().reduce((function(e,t){return e[t]=u(t),e}),{})},age:function(){return a-h()}};if(r.a.enabled){var v=Math.round((new Date).valueOf()/864e5);(r.a.get("lastCohortPhoneHome")||0)0,n=document.querySelector(".right-rail-sticky"),c=!!n,l=document.querySelector(".zone--ad-recirc"),d=function(){return window.pageYOffset>e.offsetHeight};t&&!e.dataset.dispatched?(Object(r.a)("ad-leaderboard-flex-start"),e.dataset.dispatched="dispatched",e.dataset.height=e.offsetHeight,window.HUFFPOST.Ads.isLeaderboardSticky=!0,e.classList.add("js-leaderboard-sticking"),!p&&c&&d()&&(n.style.transform="translateY(".concat(function(){var t=0;try{t=Math.abs(n.getBoundingClientRect().top)+30}catch(r){t=e.offsetHeight+n.offsetHeight+40}return"".concat(t,"px")}(),")")),setTimeout((function(){d()&&(f&&!u&&o||(e.style.transform="translateY(-".concat(e.offsetHeight+40,"px)"))),c&&(n.style.transform="initial"),window.HUFFPOST.Ads.isLeaderboardSticky=!1,setTimeout((function(){e.style.transform="initial",a&&(a.style.display="none"),f&&!u&&o||e.classList.remove("js-leaderboard-sticking"),Object(r.a)("ad-leaderboard-flex-done")}),1e3),l&&(l.style.visibility="visible")}),5e3)):e.dataset.dispatched&&window.HUFFPOST.Ads.isLeaderboardSticky&&e.offsetHeight!==parseInt(e.dataset.height,10)?(e.dataset.height=e.offsetHeight,i&&(i.dataset.height="".concat(e.offsetHeight,"px"))):e.dataset.dispatched||!o||u||s||i&&(i.style.height="40px")};setInterval((function(){document.querySelectorAll(".advertisement").forEach((function(e){var t=e.parentNode,n=e.offsetHeight>0;e.classList.toggle("treated",n),t&&/\badvertisement-holder\b/.test(t.className)&&t.classList.toggle("loaded",n),e.classList.contains("ad-leaderboard-flex")&&h(e)})),c&&h(c)}),50);var m=document.querySelector(".zone--more-in-life");m&&document.addEventListener("scroll",(function(){var e=m.getBoundingClientRect(),t=parseInt(window.getComputedStyle(m,":after").height,10);m.classList.toggle("sticky",e.top<0&&e.bottom>t),m.classList.toggle("sticky-bottom",e.top<0&&e.bottom<=t)})),setInterval((function(){document.querySelectorAll(".advertisement").forEach((function(e){var t=Math.max(e.height||e.offsetHeight);e.classList.toggle("treated",t>0)}))}),50),l&&d&&d.addEventListener("click",(function(){l.classList.remove("js-leaderboard-sticking"),l.classList.add("sticky-dismissed")}))},,function(e,t,n){"use strict";var r=n(12),o=n.n(r);function i(e,t){const n=e.match(t);return n&&n.length?n[0]:null}var a={getBuzzfeedSubdomainOrWildcard(e){const t=i(e,"(dev|stage|www).(buzzfeed|buzzfeednews).(com|io)$");return t||i(e,".?[a-z]+.[a-z]+$")},get(e,t=null){const n=e+"=";if("undefined"==typeof document)return t;const r=document.cookie.split(";");for(let e=0;e=3&&(t=t.substring(n.length+1)),t};function s(e,t,n){var r,o,i,a,c,s,u;for(this.version="1.0.1",this.minAlphabetLength=16,this.sepDiv=3.5,this.guardDiv=12,this.errorAlphabetLength="error: alphabet must contain at least X unique characters",this.errorAlphabetSpace="error: alphabet cannot contain spaces",this.alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",this.seps="cfhistuCFHISTU",this.minHashLength=parseInt(t,10)>0?t:0,this.salt="string"==typeof e?e:"","string"==typeof n&&(this.alphabet=n),r="",o=0,a=this.alphabet.length;o!==a;o++)-1===r.indexOf(this.alphabet[o])&&(r+=this.alphabet[o]);if(this.alphabet=r,this.alphabet.lengththis.sepDiv)&&(1===(c=Math.ceil(this.alphabet.length/this.sepDiv))&&c++,c>this.seps.length?(s=c-this.seps.length,this.seps+=this.alphabet.substr(0,s),this.alphabet=this.alphabet.substr(s)):this.seps=this.seps.substr(0,c)),this.alphabet=this.consistentShuffle(this.alphabet,this.salt),u=Math.ceil(this.alphabet.length/this.guardDiv),this.alphabet.length<3?(this.guards=this.seps.substr(0,u),this.seps=this.seps.substr(u)):(this.guards=this.alphabet.substr(0,u),this.alphabet=this.alphabet.substr(u))}s.prototype.encode=function(){var e,t,n="",r=Array.prototype.slice.call(arguments);if(!r.length)return n;for(r[0]instanceof Array&&(r=r[0]),e=0,t=r.length;e!==t;e++)if("number"!=typeof r[e]||r[e]%1!=0||r[e]<0)return n;return this._encode(r)},s.prototype.decode=function(e){return e.length&&"string"==typeof e?this._decode(e,this.alphabet):[]},s.prototype.encodeHex=function(e){var t,n,r;if(e=e.toString(),!/^[0-9a-fA-F]+$/.test(e))return"";for(t=0,n=(r=e.match(/[\w\W]{1,12}/g)).length;t!==n;t++)r[t]=parseInt("1"+r[t],16);return this.encode.apply(this,r)},s.prototype.decodeHex=function(e){var t,n,r=[],o=this.decode(e);for(t=0,n=o.length;t!==n;t++)r+=o[t].toString(16).substr(1);return r},s.prototype._encode=function(e){var t,n,r,o,i,a,c,s,u,l,f,d=this.alphabet,p=e.length,h=0;for(r=0,o=e.length;r!==o;r++)h+=e[r]%(r+100);for(n=t=d[h%d.length],r=0,o=e.length;r!==o;r++)i=e[r],a=n+this.salt+d,d=this.consistentShuffle(d,a.substr(0,d.length)),t+=c=this.hash(i,d),r+10&&(t=t.substr(f/2,this.minHashLength));return t},s.prototype._decode=function(e,t){var n,r,o,i,a=[],c=0,s=new RegExp("["+this.guards+"]","g"),u=e.replace(s," "),l=u.split(" ");if(3!==l.length&&2!==l.length||(c=1),void 0!==(u=l[c])[0]){for(n=u[0],u=u.substr(1),s=new RegExp("["+this.seps+"]","g"),c=0,r=(l=(u=u.replace(s," ")).split(" ")).length;c!==r;c++)o=l[c],i=n+this.salt+t,t=this.consistentShuffle(t,i.substr(0,t.length)),a.push(this.unhash(o,t));this._encode(a)!==e&&(a=[])}return a},s.prototype.consistentShuffle=function(e,t){var n,r,o,i,a,c;if(!t.length)return e;for(i=e.length-1,a=0,c=0;i>0;i--,a++)c+=n=t[a%=t.length].charCodeAt(0),o=e[r=(n+a+c)%i],e=(e=e.substr(0,r)+e[i]+e.substr(r+1)).substr(0,i)+o+e.substr(i+1);return e},s.prototype.hash=function(e,t){var n="",r=t.length;do{n=t[e%r]+n,e=parseInt(e/r,10)}while(e);return n},s.prototype.unhash=function(e,t){var n,r=0;for(n=0;n(e^(()=>{try{return crypto.getRandomValues(new Uint8Array(1))[0]}catch(e){return 255*Math.random()}})()&15>>e/4).toString(16)),f=e=>{if(0!==e.indexOf(".")){const t=/[0-9A-Za-z]+/.exec(e);return null!==t&&t[0]===e&&parseInt(e,36)}const t=e.substr(1,2);return((e,{salt:t=null}={})=>new s(t).decode(e)[0])(e.substr(3),{salt:t})},d=e=>{const t=parseInt(25*Math.random()+10,10).toString(36)+parseInt(25*Math.random()+10,10).toString(36);return`.${t}${((e,{salt:t=null,length:n=32}={})=>new s(t,n).encode(e))(e,{salt:t,length:0})}`},p=e=>{const{u:t,uuid:n}=decodeURIComponent(e).split("&").map(e=>e.split("=")).reduce((e,[t,n])=>({...e,[t]:n}),{});return{legacyIdentifier:f(t||""),identifier:n}},h=({legacy:e=!1}={})=>{const t={name:"bf_visit",days:1e4,domain:c()},n=a.get(t.name),{legacyIdentifier:r,identifier:o}=p(n),i=d(u);return e?r||(a.set({...t,value:encodeURIComponent(`u=${i}&uuid=${o||l}&v=2`)}),u):o||r?o||String(r):(a.set({...t,value:encodeURIComponent(`u=${i}&uuid=${l}&v=2`)}),l)};var m="object"===("undefined"==typeof window?"undefined":o()(window))&&window.HP&&"production"===window.HP.env;window.HUFFPOST.params.clientUUID=window.HUFFPOST.cetEnabled?h({env:m?"prod":"stage",legacy:!1}):" "},,function(e,t,n){"use strict";t.a=function(){var e,t,n,r=document.getElementById("zone-trending");if(r){window.addEventListener("resize",(t=1e3,(e=function(){var e=r.querySelector("#trending-topics-header");if(e){var t=e.offsetTop+e.offsetHeight;Array.prototype.forEach.call(r.children,(function(e){var n=e.querySelector("a");n&&(e.offsetTop>t?(n.setAttribute("tabIndex",-1),n.setAttribute("aria-hidden",!0)):(n.removeAttribute("tabIndex"),n.removeAttribute("aria-hidden")))}))}})(),function(){clearTimeout(n),n=setTimeout(e,t)}))}}},function(e,t){var n=["H1","H2","H3","H4","H5","H6"];function r(){var e=document.querySelectorAll(".entry #newsletter-bottom"),t=document.querySelector(".js-entry-content"),r=document.querySelector("#js-newsletter-placeholder");if(t&&e.length){var o,i,a=e[0];if(r)o=r;else o=function(e){return Array.prototype.slice.call(e.children).reduce((function(e,t){return t.classList.contains("cli-listicle")?e.concat(Array.prototype.slice.call(t.children)):(e.push(t),e)}),[])}(t).find((function(e,r){return i=t.children[r-1],e.offsetTop>=1e3&&function(e,t){return!!e&&((!e.lastChild||!n.includes(e.lastChild.nodeName))&&![e,t].some((function(e){return e.classList.contains("js-no-inject")})))}(i,e)}));o&&o.parentElement.insertBefore(a,o)}}window.addEventListener("hydration-complete",(function(){r(),function(){var e=document.querySelectorAll(".a-page__content #newsletter-bottom .newsletter"),t=document.querySelector("#zone-twilight .zone__content");if(t&&1===e.length){var n=e[0],r=t.children[4]||null;t.insertBefore(n,r)}}(),function(){var e=document.querySelectorAll(".feature .newsletter"),t=document.querySelector(".js-entry-content"),n=document.querySelector("#js-newsletter-placeholder");if(t&&1===e.length){var r=e[0],o=n;o&&o.parentElement.insertBefore(r,o)}}()}))},function(e,t){window.waitForGlobal((function(){return document&&document.cookie&&window&&window.HUFFPOST&&window.HUFFPOST.params&&window.HUFFPOST.params.brandedAPages}),(function(){["us","uk"].includes(window.HUFFPOST.params.edition)&!(window.HUFFPOST.params.isEntry?window.HUFFPOST.entry.modulousTags.includes("@sponsor"):window.HUFFPOST.params.brandedAPages.includes(window.HUFFPOST.params.slug))&document.cookie.indexOf("scroll0")>0&&(document.body.classList.add("scrolluser"),window.__SPOTIM_ADS_DISABLED__=!0,window.__SPOTIM_DISABLE_ADS__&&window.__SPOTIM_DISABLE_ADS__())}))},,,,,,,function(e,t){window.HUFFPOST.YouTubeIframeAPIReady=new Promise((function(e){window.onYouTubeIframeAPIReady=function(){return e()}}))},function(e,t){document.querySelector("body.entry")&&document.querySelector(".rail--left")&&document.addEventListener("scroll",(function(){var e=document.querySelector(".rail--left"),t=e.querySelector(".share-bar--side"),n=document.querySelector(".advertisement.ad-leaderboard-flex.treated"),r=document.querySelector(".entry-head-container"),o=document.body.classList.contains("video"),i=o?document.querySelector(".js-video-entry-content"):document.querySelector(".js-main-content-list");if(e&&t){var a=n?n.offsetHeight:0,c=o?0:.5*(a+r.offsetHeight),s=t.getBoundingClientRect(),u=i.getBoundingClientRect();window.pageYOffset>=c&&s.bottome.clientHeight?(e.querySelector(".js-open").addEventListener("click",o,{capture:!0,once:!0}),e.addEventListener("see-more-button",i,{capture:!0,once:!0})):e.classList.add("open")}))},function(e,t){window.__SPOTIM_SPOTLIGHT_GO_TO_COMMENTS__=function(){window.document.dispatchEvent(new Event("open-comments"))}},function(e,t,n){"use strict";var r=n(63);window.HP.params.isEntry&&window.HP.params.abeagle&&Array.isArray(window.HP.params.abeagle)&&window.HP.params.abeagle.includes("hp_back_to_home_test")&&(document.addEventListener("abeagleEvent",(function(){var e=document.querySelector(".body-wrap"),t=r.a.getExperimentVariant("hp_back_to_home_test");e.classList.add("ab-test__back-to-home--".concat(t))})),window.HP.params.abBackToHomeTest.ready=!0)},,,,,,,,function(e,t){var n=document.querySelector(".js-site-header-fixed"),r=document.querySelector(".right-rail-sticky"),o=r&&r.closest(".rail"),i=document.body.classList.contains("entry")?30:0,a=document.querySelector(".js-main-content-list"),c=document.querySelector(".js-main-content-list .cli-slideshow"),s=document.querySelector(".js-zone-twilight"),u=HP&&HP.params&&HP.params.features&&HP.params.features.rightRailSticky&&"us"!==HP.params.edition;r&&o&&u&&(document.addEventListener("scroll",(function(){var e,t,u=o.getBoundingClientRect();if(c){var l=c.getBoundingClientRect(),f=a.getBoundingClientRect();e=l.top,t=u.height-(l.top-f.top)}else if(a){var d=a.getBoundingClientRect();e=d.bottom,t=u.height-d.height}else if(s){e=s.getBoundingClientRect().bottom,t=0}var p=78;if(n){var h=n.getBoundingClientRect();p=h.top+h.height}var m=u.top<=p+i,v=e<=r.offsetHeight+p+i;r.classList.toggle("sticky",m&&!v),r.classList.toggle("sticky-bottom",v),r.style.top=v?"":"".concat(p+i,"px"),r.style.width="".concat(o.offsetWidth,"px"),r.style.bottom=v&&t?"".concat(t,"px"):""})),document.addEventListener("see-more",(function(){if(window.adsReloadAd){var e=r.querySelector(".ad-right_rail_flex")||r.querySelector(".ad-right_rail_300x250_lower");e&&window.adsReloadAd(e)}})))},function(e,t){var n=document.body.classList.contains("entry"),r=document.body.classList.contains("abRightRail--sticky"),o=document.querySelector(".right-rail-sticky");if(n&&o&&r){var i=o.querySelector(".ad-right-rail-lower.sticky.last"),a=document.getElementById("sticky-ad-template"),c=document.querySelector(".entry__content-list-container"),s=c.offsetTop,u=document.getElementById("spot_spotlight").offsetTop,l=new ResizeObserver((function(e){e.forEach((function(e){var t=e.target;t.parentElement.style.height="".concat(t.offsetHeight+600,"px")}))}));setTimeout((function(){for(var e=c.getBoundingClientRect().height,t=Math.floor((e+s-u)/1300)-1,n=0;n1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey="function"==typeof e.transformKey,this.shouldCloneArguments=this.canTransformKey||t,this.shouldUpdateOnAdd="function"==typeof e.onCacheAdd,this.shouldUpdateOnChange="function"==typeof e.onCacheChange,this.shouldUpdateOnHit="function"==typeof e.onCacheHit}return Object.defineProperty(e.prototype,"size",{get:function(){return this.keys.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snapshot",{get:function(){return{keys:v(this.keys),size:this.size,values:v(this.values)}},enumerable:!0,configurable:!0}),e.prototype._getKeyIndexFromMatchingKey=function(e){var t=this.options,n=t.isMatchingKey,r=t.maxSize,o=this.keys,i=o.length;if(!i)return-1;if(n(o[0],e))return 0;if(r>1)for(var a=1;a1){for(var c=0;c1){for(var i=0;i=c&&(r.length=o.length=c)},e.prototype.updateAsyncCache=function(e){var t=this,n=this.options,r=n.onCacheChange,o=n.onCacheHit,i=this.keys[0],a=this.values[0];this.values[0]=a.then((function(n){return t.shouldUpdateOnHit&&o(t,t.options,e),t.shouldUpdateOnChange&&r(t,t.options,e),n}),(function(e){var n=t.getKeyIndex(i);throw-1!==n&&(t.keys.splice(n,1),t.values.splice(n,1)),e}))},e}();var w=function e(t,n){if(void 0===n&&(n={}),function(e){return"function"==typeof e&&e.isMemoized}(t))return e(t.fn,y(t.options,n));if("function"!=typeof t)throw new TypeError("You must pass a function to `memoize`.");var r=n.isEqual,o=void 0===r?g:r,i=n.isMatchingKey,a=n.isPromise,c=void 0!==a&&a,s=n.maxSize,u=void 0===s?1:s,l=n.onCacheAdd,f=n.onCacheChange,d=n.onCacheHit,p=n.transformKey,m=y({isEqual:o,isMatchingKey:i,isPromise:c,maxSize:u,onCacheAdd:l,onCacheChange:f,onCacheHit:d,transformKey:p},function(e){var t={};for(var n in e)h[n]||(t[n]=e[n]);return t}(n)),w=new b(m),_=w.keys,O=w.values,S=w.canTransformKey,x=w.shouldCloneArguments,E=w.shouldUpdateOnAdd,j=w.shouldUpdateOnChange,k=w.shouldUpdateOnHit,P=function e(){var n=x?v(arguments):arguments;S&&(n=p(n));var r=_.length?w.getKeyIndex(n):-1;if(-1!==r)k&&d(w,m,e),r&&(w.orderByLru(_[r],O[r],r),j&&f(w,m,e));else{var o=t.apply(this,arguments),i=x?n:v(arguments);w.orderByLru(i,o,_.length),c&&w.updateAsyncCache(e),E&&l(w,m,e),j&&f(w,m,e)}return O[0]};return P.cache=w,P.fn=t,P.isMemoized=!0,P.options=m,P};function _(e){return(e+="").indexOf("#")>-1?e.substr(e.indexOf("#"),e.length):""}function O(e){return(e+="").indexOf("#")>-1?e.substr(0,e.indexOf("#")):e}function S(e){return e.indexOf("?")>-1}function x(e){return e=function(e){if(!S(e))return e;var t=_(e);return(e=O(e)).substr(0,e.indexOf("?"))+t}(e=O(e))}var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.location.hostname,n=["buzzfeed","buzzfeednews","tasty","huffpost","huffingtonpost"],r=t.split(".")[0];return r&&"stage"!==r&&-1===n.indexOf(r)&&t.split(".").length>=3&&(t=t.substring(r.length+1)),t},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"dev";return"dev"===e?"dev.buzzfeed.io":"prod"===e||"app-west"===e?"buzzfeed.com":"stage.buzzfeed.com"},k=n(14),P=n.n(k),L=n(15),T=n.n(L),I=function(e){return e.match(/^stage\./)?"https://".concat(e):"https://www.".concat(e)},C=function(){function e(t){var n=this,r=t.sourceOfTruthDomain,o=t.localDomain,i=t.namespace,a=t.env,c=void 0===a?"dev":a,s=t.updateInterval,u=void 0===s?3e5:s,l=t.iframeTimeout,f=void 0===l?3e3:l;T()(this,e),this.sourceOfTruthDomain=r,this.localDomain=o,this.env=c,this.namespace=i,this.iframeTimeout=f,this.cookies={},r!==o&&this.initIframe().then((function(){setInterval(n.updateFromIframe.bind(n),u)})).catch((function(){}))}return P()(e,[{key:"get",value:function(e){var t=this;return this.sourceOfTruthDomain===this.localDomain?Promise.resolve(c.a.get(e)):this.initIframe().then((function(){return t.cookies[e]||c.a.get(e)})).catch((function(){return c.a.get(e)}))}},{key:"set",value:function(e){var t=this,n=e.name,r=e.value,o=e.days,i=e.secureOnly,a=void 0===i||i;c.a.set({name:n,value:r,days:o,domain:this.localDomain}),this.sourceOfTruthDomain!==this.localDomain&&this.initIframe().then((function(){var e={namespace:t.namespace,msgType:"destination-sync-write",cookieName:n,cookieVal:r,expiresDays:o,secureOnly:a},i=I(t.sourceOfTruthDomain);t.iframe.contentWindow.postMessage(JSON.stringify(e),i)})).catch((function(){return c.a.set({name:n,value:r,days:o,domain:t.localDomain})}))}},{key:"cleanup",value:function(){if(this.boundOnMessage&&window.removeEventListener("message",this.boundOnMessage),this.iframe){var e=new ErrorEvent({message:"XDomainCookies were cleaned up before ready"});this.iframe.dispatchEvent(e),this.iframe.remove()}this.iframeReady=null}},{key:"initIframe",value:function(){var e=this;if(this.iframeReady)return this.iframeReady;var t,n=new Promise((function(t,n){e.boundOnMessage=function(n){e.onMessage(n,t)},window.addEventListener("message",e.boundOnMessage),e.createIframe(n)}));return this.iframeReady=Promise.race([(t=this.iframeTimeout,new Promise((function(e,n){var r={type:"timeout",msg:"".concat(t,"ms timeout exceeded")};setTimeout((function(){return n(r)}),t)}))),n]).catch((function(t){throw"prod"===e.env&&window.raven&&window.raven.captureException("timeout"===t.type?new Error("Destination Sync: ".concat(t.msg)):t),console.error(t),t})),this.iframeReady}},{key:"createIframe",value:function(e){var t="xdomaincookies-".concat(this.namespace),n=document.getElementById(t);if(n)return n.addEventListener("error",(function(t){e(t)})),this.iframe=n,void(this.iframe.dataset.loaded&&this.updateFromIframe());var r=JSON.stringify({namespace:this.namespace,windowOrigin:window.location.origin}),o=document.createElement("iframe");o.style.display="none",o.addEventListener("error",(function(t){e(t)})),o.id=t,o.src=function(e,t){return"".concat(I(e),"/").concat("destination-sync.html","#").concat(encodeURIComponent(t))}(this.sourceOfTruthDomain,r),this.iframe=o,document.body.appendChild(o)}},{key:"updateFromIframe",value:function(){var e={namespace:this.namespace,msgType:"destination-sync-read"},t=I(this.sourceOfTruthDomain);this.iframe.contentWindow.postMessage(JSON.stringify(e),t)}},{key:"onMessage",value:function(e,t){var n={};try{n=JSON.parse(e.data)}catch(e){}n.namespace===this.namespace&&("destination-sync-init"===n.msgType&&(this.iframe.dataset.loaded=!0),"destination-sync-init"!==n.msgType&&"destination-sync-read"!==n.msgType||(this.cookies=n.cookies),t())}}]),e}(),A=function(){function e(t){var n=t.cookieName,r=t.daysExpiry,o=t.env,i=t.namespace,a=t.sourceOfTruthDomain,c=t.throttleTimer,s=void 0===c?null:c,u=t.secureOnly,l=void 0===u||u,f=t.localDomain,d=void 0===f?E():f;T()(this,e),o="live"===o?"prod":o,this.xDomainCookies=new C({sourceOfTruthDomain:a||j(o),namespace:i,localDomain:d,env:o}),this.cookieName=n,this.daysExpiry=r,this.secureOnly=l,this.throttleTimer=s,this.inMemoryValue=null}return P()(e,[{key:"get",value:function(){var e=this;return this.throttle?Promise.resolve(this.inMemoryValue):this.xDomainCookies.get(this.cookieName).then((function(t){return e.inMemoryValue=t,e.resetThrottle(),t}))}},{key:"set",value:function(e){return this.inMemoryValue=e,this.xDomainCookies.set({name:this.cookieName,value:e,days:this.daysExpiry,secureOnly:this.secureOnly})}},{key:"resetThrottle",value:function(){var e=this;this.throttleTimer&&(this.throttle=setTimeout((function(){e.throttle=null}),this.throttleTimer))}}]),e}();function H(e,t,n){var r,o,i,a,c,s,u;for(this.version="1.0.1",this.minAlphabetLength=16,this.sepDiv=3.5,this.guardDiv=12,this.errorAlphabetLength="error: alphabet must contain at least X unique characters",this.errorAlphabetSpace="error: alphabet cannot contain spaces",this.alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",this.seps="cfhistuCFHISTU",this.minHashLength=parseInt(t,10)>0?t:0,this.salt="string"==typeof e?e:"","string"==typeof n&&(this.alphabet=n),r="",o=0,a=this.alphabet.length;o!==a;o++)-1===r.indexOf(this.alphabet[o])&&(r+=this.alphabet[o]);if(this.alphabet=r,this.alphabet.lengththis.sepDiv)&&(1===(c=Math.ceil(this.alphabet.length/this.sepDiv))&&c++,c>this.seps.length?(s=c-this.seps.length,this.seps+=this.alphabet.substr(0,s),this.alphabet=this.alphabet.substr(s)):this.seps=this.seps.substr(0,c)),this.alphabet=this.consistentShuffle(this.alphabet,this.salt),u=Math.ceil(this.alphabet.length/this.guardDiv),this.alphabet.length<3?(this.guards=this.seps.substr(0,u),this.seps=this.seps.substr(u)):(this.guards=this.alphabet.substr(0,u),this.alphabet=this.alphabet.substr(u))}H.prototype.encode=function(){var e,t,n="",r=Array.prototype.slice.call(arguments);if(!r.length)return n;for(r[0]instanceof Array&&(r=r[0]),e=0,t=r.length;e!==t;e++)if("number"!=typeof r[e]||r[e]%1!=0||r[e]<0)return n;return this._encode(r)},H.prototype.decode=function(e){return e.length&&"string"==typeof e?this._decode(e,this.alphabet):[]},H.prototype.encodeHex=function(e){var t,n,r;if(e=e.toString(),!/^[0-9a-fA-F]+$/.test(e))return"";for(t=0,n=(r=e.match(/[\w\W]{1,12}/g)).length;t!==n;t++)r[t]=parseInt("1"+r[t],16);return this.encode.apply(this,r)},H.prototype.decodeHex=function(e){var t,n,r=[],o=this.decode(e);for(t=0,n=o.length;t!==n;t++)r+=o[t].toString(16).substr(1);return r},H.prototype._encode=function(e){var t,n,r,o,i,a,c,s,u,l,f,d=this.alphabet,p=e.length,h=0;for(r=0,o=e.length;r!==o;r++)h+=e[r]%(r+100);for(n=t=d[h%d.length],r=0,o=e.length;r!==o;r++)i=e[r],a=n+this.salt+d,d=this.consistentShuffle(d,a.substr(0,d.length)),t+=c=this.hash(i,d),r+10&&(t=t.substr(f/2,this.minHashLength));return t},H.prototype._decode=function(e,t){var n,r,o,i,a=[],c=0,s=new RegExp("["+this.guards+"]","g"),u=e.replace(s," "),l=u.split(" ");if(3!==l.length&&2!==l.length||(c=1),void 0!==(u=l[c])[0]){for(n=u[0],u=u.substr(1),s=new RegExp("["+this.seps+"]","g"),c=0,r=(l=(u=u.replace(s," ")).split(" ")).length;c!==r;c++)o=l[c],i=n+this.salt+t,t=this.consistentShuffle(t,i.substr(0,t.length)),a.push(this.unhash(o,t));this._encode(a)!==e&&(a=[])}return a},H.prototype.consistentShuffle=function(e,t){var n,r,o,i,a,c;if(!t.length)return e;for(i=e.length-1,a=0,c=0;i>0;i--,a++)c+=n=t[a%=t.length].charCodeAt(0),o=e[r=(n+a+c)%i],e=(e=e.substr(0,r)+e[i]+e.substr(r+1)).substr(0,i)+o+e.substr(i+1);return e},H.prototype.hash=function(e,t){var n="",r=t.length;do{n=t[e%r]+n,e=parseInt(e/r,10)}while(e);return n},H.prototype.unhash=function(e,t){var n,r=0;for(n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.salt,r=void 0===n?null:n;return new H(r).decode(e)[0]}(e.substr(3),{salt:n})},q=function(e){var t=parseInt(25*Math.random()+10,10).toString(36)+parseInt(25*Math.random()+10,10).toString(36);return".".concat(t).concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.salt,r=void 0===n?null:n,o=t.length,i=void 0===o?32:o;return new H(r,i).encode(e)}(e,{salt:t,length:0}))},N=function(e){var t=decodeURIComponent(e).split("&").map((function(e){return e.split("=")})).reduce((function(e,t){var n=l()(t,2),r=n[0],o=n[1];return F(F({},e),{},d()({},r,o))}),{}),n=t.u,r=t.uuid;return{legacyIdentifier:z(n||""),identifier:r}},U=function(e){var t=e.env,n=e.legacy,r=void 0===n||n,o=new A({namespace:"bf-xdomain-tracking",cookieName:"bf_visit",daysExpiry:1e4,env:t});return o.get().then((function(e){var t=N(e),n=t.legacyIdentifier,i=t.identifier,a=q(R);return r?n||(o.set(encodeURIComponent("u=".concat(a,"&uuid=").concat(i||D,"&v=2"))),R):i||n?i||String(n):(o.set(encodeURIComponent("u=".concat(a,"&uuid=").concat(D,"&v=2"))),D)}))},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.legacy,n=void 0!==t&&t,r={name:"bf_visit",days:1e4,domain:E()},o=c.a.get(r.name),i=N(o),a=i.legacyIdentifier,s=i.identifier,u=q(R);return n?a||(c.a.set(F(F({},r),{},{value:encodeURIComponent("u=".concat(u,"&uuid=").concat(s||D,"&v=2"))})),R):s||a?s||String(a):(c.a.set(F(F({},r),{},{value:encodeURIComponent("u=".concat(u,"&uuid=").concat(D,"&v=2"))})),D)};function K(e){return e+"|expiration"}var G=function(){try{return localStorage.setItem("ls_test",!0),localStorage.removeItem("ls_test"),!0}catch(e){return!1}}(),J={set:function(e){G&&void 0!==e&&(localStorage.setItem(e.key,e.value),e.expires&&localStorage.setItem(K(e.key),Date.now()+e.expires))},get:function(e){return G?function(e){var t=localStorage.getItem(K(e));return t&&t<=Date.now()}(e)?(this.remove(e),null):localStorage.getItem(e):null},sessionSet:function(e){G&&void 0!==e&&sessionStorage.setItem(e.key,e.value)},sessionGet:function(e){return G?sessionStorage.getItem(e):null},remove:function(e){G&&(localStorage.removeItem(K(e)),localStorage.removeItem(e))},clear:function(){G&&localStorage.clear()}},V={dev:{tracking_url:"https://nsq-api-public.dev.buzzfeed.io",debug:!0},test:{tracking_url:"https://nsq-api-public.dev.buzzfeed.io",debug:!0},stage:{tracking_url:"https://pixiedust-stage.buzzfeed.com",debug:!0},prod:{tracking_url:"https://pixiedust.buzzfeed.com",debug:!1},"app-west":{tracking_url:"https://pixiedust.buzzfeed.com",debug:!1}},$=function(e){var t=J.get("cet-page_session_id");if(window.CLIENT_EVENT_TRACKING=window.CLIENT_EVENT_TRACKING||{},window.CLIENT_EVENT_TRACKING.current_page_session_url===e&&t)return{page_session_id:t,previous_page_session_id:J.get("pdv3-previous_page_session_id")||""};window.CLIENT_EVENT_TRACKING.current_page_session_url=e,t=Object(p.a)()||"00000000-0000-0000-0000-000000000000";var n=J.get("cet-page_session_id")||"";return J.set({key:"cet-page_session_id",value:t}),J.set({expires:18e5,key:"pdv3-previous_page_session_id",value:n}),{page_session_id:t,previous_page_session_id:n}};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t0&&void 0!==v[0]?v[0]:{},i=r.cross_domain_cookies,a=void 0===i||i,s=r.env,!a){e.next=11;break}return u=new A({env:s,namespace:"bf-xdomain-tracking",cookieName:n.name,daysExpiry:n.days,throttleTimer:18e4}),e.next=5,Promise.all([U({env:s,legacy:!1}),u.get()]);case 5:h=e.sent,m=l()(h,2),f=m[0],d=m[1],e.next=13;break;case 11:f=B(),d=c.a.get(n.name,"");case 13:return f=String(f),d=d&&"null"!==d?d:Object(p.a)(),a?u.set(d):c.a.set(W(W({},n),{},{value:d})),e.abrupt("return",W({client_uuid:f,client_session_id:d,random_user_uuid:c.a.get("user_uuid","unauthenticated"),referrer_uri:document.referrer},$(x(t))));case 17:case"end":return e.stop()}}),e)}))),{transformKey:JSON.stringify})}),{transformKey:function(e){return x(l()(e,1)[0].url)}}),X=function(){return function(){return{event_uri:document.URL,event_ts:Math.round(Date.now()/1e3),event_uuid:Object(p.a)()}}},Q=n(20),ee=n.n(Q),te=["track_amp"],ne=w((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.track_amp,n=void 0!==t&&t,r=ee()(e,te);return n?w((function(){return{amp_id:Object(s.d)(r)}}),{transformKey:JSON.stringify}):{}}),{transformKey:JSON.stringify}),re=function(e){var t=e.page_edition,n=void 0===t?Object(s.g)("page_edition"):t;return function(){return{mode:window.matchMedia("screen and (max-width:51.9rem)").matches?"mobile":"desktop",page_edition:n,viewport_size:{width:Number(window.screen.width),height:Number(window.screen.height)}}}},oe=function(e){var t=e.type,n=void 0===t?Object(s.g)("type"):t,r=e.source,o=void 0===r?Object(s.g)("source"):r;return function(){return{type:n,source:o}}};function ie(e){var t=e.env,n=void 0===t?"dev":t,r=function(e){var t,n=e.debug,r=e.tracking_url,o=[],i=function(){if(o.length&&"undefined"!=typeof window){var e=JSON.stringify(o),i=document.createEvent("CustomEvent");if(i.initCustomEvent("cet-event",!1,!1,o),dispatchEvent(i),n)window.fetch("".concat(r,"/events"),{method:"POST",body:e,keepalive:!0}).then((function(e){return e.json()})).then((function(e){e.errors&&e.debug&&(console.group("%c 🚨 Rejected client events 🚨","background-color: #250201; color: #ee8783; border: 1px solid #540b06"),e.debug.forEach((function(e){return console.table(e.validation)})),console.groupEnd())})).catch((function(){var t=JSON.parse(e);console.group("%cClient Event Tracking: %crun nsq_api_public to verify events","font-weight: bold;","color: gray; font-size: .5rem;"),t.forEach((function(e){console.groupCollapsed('"%c'.concat(e.type,'"'),"font-weight: bold; font-family: monospace;"),console.table(e),console.groupEnd()})),console.groupEnd()}));else{var a;if(navigator&&navigator.sendBeacon)a=navigator.sendBeacon("".concat(r,"/events"),e);else{var c=new XMLHttpRequest;c.open("POST","".concat(r,"/events"),!1),c.onerror=function(){},c.setRequestHeader("Accept","*/*"),c.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),a=c.send(e)}!a&&window.raven&&Math.random()<.1&&window.raven.captureException("Client Event Tracking: sendBeacon could not process a queue.")}clearTimeout(t),t=null,o=[]}};return[function(e){o.push(e),10===o.length&&i(),t||(t=setTimeout(i,200))},i]}(V[n]),o=l()(r,2),i=o[0],a=o[1];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.flush,o=void 0!==r&&r,c=Object(s.h)(e,{debug:V[n].debug});i(c),o&&a()}}var ae=n(58),ce=n.n(ae),se=["page_edition"];function ue(){var e="true"===c.a.get("is_bot");if(window.location.search.includes("e2e_test"))try{return{e2e_test:new URLSearchParams(window.location.search).get("e2e_test"),is_bot:!0}}catch(e){}return e?{is_bot:!0}:{}}var le=function(e){var t=e.amp_options,n=void 0===t?{}:t,r=e.cross_domain_cookies,i=void 0===r||r,c=e.env,u=e.source;if("undefined"==typeof window)return function(){};var l=ie({env:c});return function(){var e=a()(o.a.mark((function e(t){var r,a,f,d,p,h,m,v,g,y,b,w,_,O,S,x=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=t.flush,a=void 0!==r&&r,f=t.required_layers,d=void 0===f?[]:f,p=t.sample_rate,h=void 0===p?1:p,m=t.type,v=x.length,g=new Array(v>1?v-1:0),y=1;y