
        (function(config) {
            var ConfigWrapper=function(){"use strict";function e(e){function t(e,t){var i,n,r=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),o=r.length;for(i=0;i<o;i+=1){if(n=r[i],!(n in e))return null;e=e[n]}return e}this.get=function(i,n){var r,o=n;return 0===arguments.length?JSON.parse(JSON.stringify(e)):(1===arguments.length&&(o=null),r=t(e,i),null==r&&(r=o),r?JSON.parse(JSON.stringify(r)):r)}}return e}();!function(e,t){"use strict";function i(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var n={callback:e,args:t};return f[p]=n,h(p),p++}function n(e){delete f[e]}function r(e){var i=e.callback,n=e.args;switch(n.length){case 0:i();break;case 1:i(n[0]);break;case 2:i(n[0],n[1]);break;case 3:i(n[0],n[1],n[2]);break;default:i.apply(t,n)}}function o(e){if(m)setTimeout(o,0,e);else{var t=f[e];if(t){m=!0;try{r(t)}finally{n(e),m=!1}}}}function a(){h=function(e){process.nextTick(function(){o(e)})}}function s(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}function l(){var t="setImmediate$"+Math.random()+"$",i=function(i){i.source===e&&"string"==typeof i.data&&0===i.data.indexOf(t)&&o(+i.data.slice(t.length))};e.addEventListener?e.addEventListener("message",i,!1):e.attachEvent("onmessage",i),h=function(i){e.postMessage(t+i,"*")}}function c(){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data;o(t)},h=function(t){e.port2.postMessage(t)}}function u(){var e=y.documentElement;h=function(t){var i=y.createElement("script");i.onreadystatechange=function(){o(t),i.onreadystatechange=null,e.removeChild(i),i=null},e.appendChild(i)}}function d(){h=function(e){setTimeout(o,0,e)}}if(!e.setImmediate){var h,p=1,f={},m=!1,y=e.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,"[object process]"==={}.toString.call(e.process)?a():s()?l():e.MessageChannel?c():y&&"onreadystatechange"in y.createElement("script")?u():d(),g.setImmediate=i,g.clearImmediate=n}}("undefined"==typeof self?"undefined"==typeof global?this:global:self);var EventEmitter=function(){"use strict";function e(){this.listeners={}}var t=function(e,t,i){null!=e[t]&&i>=0&&e[t].length>i&&(e[t][i]=null)},i=function(e,t){null!=e[t]&&(e[t]=null)};return e.prototype.emit=function(e,t){null!=this.listeners[e]&&this.listeners[e].forEach(function(e){null!=e&&window.setImmediate(function(){e(t)})})},e.prototype.emitSync=function(e,t){null!=this.listeners[e]&&this.listeners[e].forEach(function(e){null!=e&&e(t)})},e.prototype.on=function(e,t){return this.listeners[e]?this.listeners[e].push(t):this.listeners[e]=[t],this.listeners[e].length-1},e.prototype.once=function(e,t){var i=this.on(e,function(n){this.listeners[e][i]&&(this.off(e,i),t(n))}.bind(this));return i},e.prototype.off=function(){switch(arguments.length){case 0:this.listeners={};break;case 1:i(this.listeners,arguments[0]);break;default:t(this.listeners,arguments[0],arguments[1])}},e}(),utils=function(){"use strict";var e={};return e.canAccessTopWindow=function(){return e.canAccessWindow(window.top)},e.canAccessWindow=function(e){var t;try{return t=e.location.href,!!t}catch(i){return!1}},e}(),inDapIF,wnd,doc,injectorPlayerEmitter;config=new ConfigWrapper(config),inDapIF=window!==window.top&&utils.canAccessTopWindow(),wnd=function(e){"use strict";var t=config.get("format_family"),i=config.get("enable_intext_animation",!0),n=!("banner"===t||"display"===t||"gallery"===t||"native"===t&&!i);return inDapIF&&n?e.top:e}(window),doc=wnd.document,injectorPlayerEmitter=new EventEmitter;var cssTpl="",cssLoader=function(e){"use strict";var t={};return t.loadStyle=function(t,i,n){var r=e;n&&(r+=n);var o=r.replace(new RegExp("namespace","g"),i),a=t.createElement("style");if(a.id="vr-"+i,!t.getElementsByTagName("head").length){var s=t.createElement("head");t.documentElement.insertBefore(s,t.body)}if(t.getElementsByTagName("head")[0].appendChild(a),a.styleSheet)a.styleSheet.disabled||(a.styleSheet.cssText=o);else try{a.innerHTML=o}catch(l){a.innerText=o}return"vr-"+i},t}(cssTpl),ajax=function(){"use strict";var e={},t=function(e,t,i,n){var r=!0,o={UNSET:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=[200,201,202,204,206,304,1223],s=function(){try{return new XDomainRequest}catch(e){r=!1}try{return new XMLHttpRequest}catch(e){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null},l=s(),c=t?"POST":"GET";l&&(l.open(c,e,!0),r?(l.onload=function(){i&&i(l.responseText)},l.onprogress=function(){},l.ontimeout=function(){},l.onerror=function(){n&&n()}):l.onreadystatechange=function(){l.readyState===o.DONE&&(a.indexOf(l.status)>-1?i&&i(l.responseText):n&&n())},"withCredentials"in l&&(l.withCredentials=!0),t&&l.setRequestHeader("Content-type","application/json"),l.send(t))};return e.get=function(e,i,n){return t(e,null,i,n)},e.post=function(e,i,n,r){var o=i?JSON.stringify(i):"{}";return t(e,o,n,r)},e}(),Log;Log=function(){"use strict";function e(e){this.prefix="["+(e||"VR-LOG")+"]"}return e.prototype.debug=function(){},e.prototype.info=function(){},e.prototype.warn=function(){},e.prototype.error=function(){},e}();var TemplateLoader=function(){"use strict";var e={};return e.render=function(e,t){var i=e;return Object.keys(t).forEach(function(e){var n=new RegExp("{{"+e+"}}","g");i=i.replace(n,t[e])}),i},e}(),PlayerDependencies={player:{debug:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.js","//cdn.polyfill.io/v2/polyfill.js?flags=gated","//imasdk.googleapis.com/js/sdkloader/ima3_debug.js"],default:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js","//cdn.polyfill.io/v2/polyfill.min.js?unknown=polyfill&flags=gated","//imasdk.googleapis.com/js/sdkloader/ima3.js"]},mobi:{debug:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.js","//cdn.polyfill.io/v2/polyfill.js?flags=gated"],default:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js","//cdn.polyfill.io/v2/polyfill.min.js?unknown=polyfill&flags=gated"]},banner:{debug:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.js","//cdn.polyfill.io/v2/polyfill.js?flags=gated"],default:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js","//cdn.polyfill.io/v2/polyfill.min.js?unknown=polyfill&flags=gated"]},strip:{debug:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.js","//cdn.polyfill.io/v2/polyfill.js?flags=gated"],default:["//ajax.googleapis.com/ajax/libs/jquery/1.12.1/jquery.min.js","//cdn.polyfill.io/v2/polyfill.min.js?unknown=polyfill&flags=gated"]},sentry:"//cdn.ravenjs.com/3.17.0/raven.min.js"},MaxInstancesError=function(){"use strict";function e(e){this.message=e}return e.prototype=new Error,e}(),DuplicateInjectorError=function(){"use strict";function e(e){this.message=e}return e.prototype=new Error,e}(),ViewabilityUnavailableError=function(){"use strict";function e(e){this.message=e}return e.prototype=new Error,e}(),ViewabilityClassNotFoundError=function(){"use strict";function e(e){this.message=e}return e.prototype=new Error,e}(),DuplicatedViewabilityImplementationError=function(){"use strict";function e(e){this.message=e}return e.prototype=new Error,e}(),Constants={ADUNIT_REQUEST_ERRORS:{SCRIPT_NOT_FOUND:30001,LOCATION_INLINE_ERROR:30002,LOCATION_AUTO_ERROR:30003,LOCATION_BY_ID_ERROR:30004,LOCATION_BY_SELECTOR_ERROR:30005,SCRIPT_IN_HEAD:30006}};utils=function(e,t,i){"use strict";try{new CustomEvent("?"),i.CustomEvent=CustomEvent}catch(n){i.CustomEvent=function(e,i){function n(n,o){var a=t.createEvent(e);return null!==n?r.call(a,n,(o||(o=i)).bubbles,o.cancelable,o.detail):a.initCustomEvent=r,a}function r(t,i,n,r){this["init"+e](t,i,n,r),"detail"in this||(this.detail=r)}return n}(e.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}return i.matchMedia=function(i){if(e.matchMedia)return e.matchMedia(i);var n=e.styleMedia||e.media;if(!n){var r=t.createElement("style"),o=t.getElementsByTagName("script")[0],a=null;r.type="text/css",r.id="matchmediajs-test",o.parentNode.insertBefore(r,o),a="getComputedStyle"in e&&e.getComputedStyle(r,null)||r.currentStyle,n={matchMedium:function(e){var t="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return r.styleSheet?r.styleSheet.cssText=t:r.textContent=t,"1px"===a.width}}}return{matches:n.matchMedium(i||"all"),media:i||"all"}},i.sessionStorage=function(){var t=!0;try{if(e.sessionStorage.setItem("VR_TEST_SESSIONSTORAGE","test"),"test"!==e.sessionStorage.getItem("VR_TEST_SESSIONSTORAGE"))throw new Error("sessionStorage unavailable")}catch(i){e.VR_sessionStorageFallback=e.VR_sessionStorageFallback||{},t=!1}return t?e.sessionStorage:{setItem:function(t,i){e.VR_sessionStorageFallback[t]=i},getItem:function(t){return e.VR_sessionStorageFallback[t]||null},removeItem:function(t){try{delete e.VR_sessionStorageFallback[t]}catch(i){}},clear:function(){e.VR_sessionStorageFallback={}}}},i}(wnd,doc,utils||{}),utils=function(e,t,i){"use strict";var n={BE:!0,BG:!0,CZ:!0,DK:!0,DE:!0,EE:!0,IE:!0,EL:!0,ES:!0,FR:!0,HR:!0,IT:!0,CY:!0,LV:!0,LT:!0,LU:!0,HU:!0,MT:!0,NL:!0,AT:!0,PL:!0,PT:!0,RO:!0,SI:!0,SK:!0,FI:!0,SE:!0,UK:!0};return i.urlEncode=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+"="+encodeURIComponent(e[i]));return t.join("&")},i.getViewportSize=function(e){var t="inner",i=e;return"innerWidth"in e||(t="client",i=i.document.documentElement||i.document.body),{width:i[t+"Width"],height:i[t+"Height"]}},i.getScreenSize=function(e){return{width:e.screen.width,height:e.screen.height}},i.getPageSize=function(e){return{width:e.document.body.scrollWidth,height:e.document.body.scrollHeight}},i.setCookie=function(e,i,n){var r=(new Date).valueOf(),o=new Date(864e5+r);o.setHours(0,0,0,0),n=n||o;var a=Math.floor((n-r)/1e3),s=e+"="+i+";path=/;max-age="+a+";expires="+n.toUTCString();return t.cookie=s,s},i.getCookie=function(i){i=e.encodeURIComponent(i),i=i.replace(/[\-\.\+\*]/g,"\\$&");var n=new RegExp("(?:(?:^|.*;)\\s*"+i+"\\s*\\=\\s*([^;]*).*$)|^.*$"),r=t.cookie.replace(n,"$1");return""!==r?e.decodeURIComponent(r):null},i.deleteCookie=function(e){t.cookie=e+"=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},i.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},i.extend=function(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[e].hasOwnProperty(t)&&(arguments[0][t]=arguments[e][t]);return arguments[0]},i.filter=function(e,t){for(var i=[],n=0;n<e.length;n++){var r=e[n];t(r)&&i.push(r)}return i},i.classNamePrefix=function(e,t){for(var i=0,n=t.length;i<n;i++)t[i]=e+"-"+t[i];return t.join(" ")},i.addEventListener=function(e,t,i,n){var r=!1;e.addEventListener?(n&&detect.isPassiveListenersSupported()&&(r={passive:!0}),e.addEventListener(t,i,r)):e.attachEvent&&e.attachEvent("on"+t,i)},i.removeEventListener=function(e,t,i,n){var r=!1;e.removeEventListener?(n&&detect.isPassiveListenersSupported()&&(r={passive:!0}),e.removeEventListener(t,i,r)):e.detachEvent&&e.detachEvent("on"+t,i)},i.bind=function(e,t){return function(){return e.apply(t,Array.prototype.slice.call(arguments))}},i.hashCode=function(e){var t,i,n,r=0;if(0===e.length)return r;for(t=0,n=e.length;t<n;t++)i=e.charCodeAt(t),r=(r<<5)-r+i,r|=0;return r},i.pad=function(e,t){for(var i=String(e);i.length<(t||2);)i="0"+i;return i},i.throwException=function(e){setTimeout(function(){throw e},0)},i.getCustomCss=function(e){var t=e.getAttribute("data-custom-style"),i="";if(t){var n=document.getElementById(t);n?i=n.innerHTML:this.throwException("Couldn't find the custom style tag "+t)}return i},i.onDOMContentLoaded=function(e,n){var r=n||"complete";t.readyState===r||"complete"===t.readyState?e():i.addEventListener(t,"readystatechange",function(){t.readyState===r&&e()})},i.trackRequestEvent=function(e,t){var i=t||"ok",n=7,r=config.get("scheme")+"://"+config.get("endpoint_host")+"/track/?session_id="+config.get("sid")+"&request_session_id="+config.get("sid")+"&label="+e+"&ver="+n+"&reason="+i+"&type=event&category=request_session",o=new Image;o.onload=function(){},o.src=r},i.trackUrl=function(e){var t=new Image;t.onload=function(){},t.src=e},i.loadPlayerIframe=function(e,t,n,r,o,a){var s=n.get("sentry",null),l=n.get("player.mobi"),c="banner"===n.get("format_family"),u=n.get("player.script"),d=c?templates.banner:templates.player,h=a||injectorPlayerEmitter;ajax.get(t,function(t){var i,r=JSON.parse(t),a=e.elem.contentWindow||e.elem,s=n.get("is_preview"),l=n.get("is_test");return r.error?(h.emit("cmd::fallback"),void h.emit("event::loadPlayerError")):(o&&o(r),i="instream"===n.get("format_family")&&(s||l)?null:viralize.__VR&&viralize.__VR.vptimpl,void(a.onPlayerReady?a.onPlayerReady(r,h,i):(a.config=r,a.injectorPlayerEmitter=h,a.vpt=i)))});var p=l?"mobi":c?"banner":"player",f=TemplateLoader.render(d,{scripts:function(){var e=PlayerDependencies[p],t=n.get("debug",!1)?e.debug.slice():e["default"].slice();return s&&t.unshift(PlayerDependencies.sentry),t.push(u),t.reduce(function(e,t){return/https?:/i.test(location.protocol)||/^https?/i.test(t)||(t=n.get("scheme")+":"+t),e+'<script type="text/javascript" src="'+t+'"></script>'},"")},ecgEndpoint:n.get("scheme")+"://"+n.get("endpoint_host")+"/track/",sentryConfig:function(){return s?JSON.stringify({dsn:s.dsn,sampleRate:s.sample_rate}):null}});h.once("cmd::dmp_user_data",function(e){r&&r(e.data)}),i.loadFriendlyIframeWithTemplate(e,f)},i.loadFriendlyIframeWithTemplate=function(e,t){var i=e.elem||e,n=i.contentDocument||i.contentWindow.document;n.open("text/html","replace"),n.write(t),n.close()},i.isUrl=function(e){var t=/(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},i.getOrigin=function(e){return i.isUrl(e.location.origin)?e.location.origin:config.get("scheme")+"://"+t.domain},i.isInUE=function(e){return n[e]||!1},i}(wnd,doc,utils||{}),utils=function(e,t,i){"use strict";function n(e){return this instanceof n?void(this.elem=e):new n(e)}return n.create=function(e,i){var r=new n(t.createElement(e));if(i)for(var o in i)r.attr(o,i[o]);return r},n.get=function(e){var i=t.querySelector(e);return null!==i&&(i=new n(i)),i},n.getById=function(e){var i=t.getElementById(e);return null!==i&&(i=new n(i)),i},n.getAll=function(e){for(var i=t.querySelectorAll(e),r=[],o=0;o<i.length;o++)r[o]=new n(i[o]);return r},n.remove=function(e){var i=t.getElementById(e);null!==i&&i.parentNode&&i.parentNode.removeChild(i)},n.removeByClass=function(e){for(var i=t.getElementsByClassName(e),n=i.length-1;n>=0;n--){var r=i[n];r.parentNode.removeChild(r)}},n.insertHTMLBefore=function(e,t,n){if(""===n)return null;var r=i.Element.create("ins",{id:t});r.elem.innerHTML=n,e.parentNode.insertBefore(r.elem,e);for(var o=r.elem.getElementsByTagName("script"),a=0;a<o.length;a++){for(var s=document.createElement("script"),l=o[a].attributes,c=0;c<l.length;c++)s.setAttribute(l[c].nodeName,l[c].value);o[a].innerHTML&&(s.text=o[a].innerHTML),o[a].parentNode.replaceChild(s,o[a])}return this},n.prototype.remove=function(){this.elem.parentNode.removeChild(this.elem)},n.prototype.attr=function(e,t){return this.elem.setAttribute(e,t),this},n.prototype.appendTo=function(e){return e.appendChild(this.elem),this},n.prototype.append=function(e){return e.nextSibling?e.parentNode.insertBefore(this.elem,e.nextSibling):e.parentNode.appendChild(this.elem),this},n.prototype.prepend=function(e){return e.parentNode.insertBefore(this.elem,e),this},n.prototype.text=function(e){return void 0===e?"textContent"in this.elem?this.elem.textContent:this.elem.innerText:("textContent"in this.elem?this.elem.textContent=e:this.elem.innerText=e,this)},n.prototype.offset=function(){var i=this.elem.getBoundingClientRect(),n=t.body,r=t.documentElement,o=e.pageYOffset||r.scrollTop||n.scrollTop,a=e.pageXOffset||r.scrollLeft||n.scrollLeft,s=r.clientTop||n.clientTop||0,l=r.clientLeft||n.clientLeft||0,c=i.top+o-s,u=i.left+a-l;return{top:Math.round(c),left:Math.round(u)}},n.prototype.hasClass=function(e){return new RegExp(" "+e+" ").test(" "+this.elem.className+" ")},n.prototype.addClass=function(e){return this.hasClass(e)||(this.elem.className+=(this.elem.className.length?" ":"")+e),this},n.prototype.removeClass=function(e){return this.hasClass(e)&&(this.elem.className=this.elem.className.replace(e,"").replace(/\s+$/g,"")),this},n.prototype.hide=function(){return this.elem.style.display="none",this},n.prototype.show=function(){return this.elem.style.visibility="visible",this},i.Element=n,i}(wnd,doc,utils||{});var ViewabilityFactory=function(){"use strict";var e={},t={};return e.publishingPlatform={STANDARD:"standard",ACCELERATED_MOBILE_PAGE:"amp",FACEBOOK_INSTANT_ARTICLES:"fbia",APPLE_NEWS:"an",OEMBED:"oembed"},e.register=function(e,i){var n=t[e];if(n)throw new DuplicatedViewabilityImplementationError(n+" is already registered for the platform "+e);t[e]=i},e.getInstance=function(i,n,r,o,a){var s=i||e.publishingPlatform.STANDARD,l=t[s];if(!l)throw new ViewabilityClassNotFoundError("No viewabilityClass registered for the platform "+i);return new l(n,r,o,a)},e}(),Viewability=function(e){"use strict";function t(e,t,i,n){this.reasons={OUT_OF_VIEWPORT:0,HIDDEN:1,NOT_IN_FOCUS:2,TOO_SMALL:3,IN_VIEWPORT:4},this.elem=e,this.wnd=t,this.forceViewability=i,this.onViewabilityChange=n}return t.prototype.start=function(){if(this.isViewabilityUnavailable())throw new ViewabilityUnavailableError;this.stop(),this.attachListeners(e.bind(this.notifier,this)),this.notifier()},t.prototype.stop=function(){this.detachListeners()},t.prototype.notifier=function(){this.onViewabilityChange(this.computeViewability())},t}(utils),viewabilityPercentageCalculator=function(e,t){"use strict";var i=e.getBoundingClientRect(),n=i.width*i.height,r=Math.ceil(Math.max(0,i.left)),o=Math.ceil(Math.min(t.width,i.right)),a=Math.ceil(Math.max(0,i.top)),s=Math.ceil(Math.min(t.height,i.bottom)),l=(o-r)*(s-a),c=Math.floor(l/n*100);return c},IntersectionViewabilityObserver=function(e,t){"use strict";function i(e,t){this.callback=null,this.intersectionObserver=null,this.intersectionData=null,this.elem=t,this.wnd=e}return i.prototype.start=function(e){var t=this,i={root:null,rootMargin:"0px",threshold:this.createIntersectionObserverThresholds()};this.callback=e,this.intersectionObserver=new IntersectionObserver(function(e){0!==e.length&&(t.intersectionData=t.parseIntersectionData(e),t.callback())},i),this.intersectionObserver.observe(this.elem)},i.prototype.createIntersectionObserverThresholds=function(){var e,t,i=100,n=[];for(t=0;t<=i;t+=1)e=t/i,n.push(e);return n},i.prototype.parseIntersectionData=function(e){var t=e[e.length-1];return Math.min(100,Math.round(100*t.intersectionRatio))},i.prototype.stop=function(){this.intersectionObserver&&(this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver.unobserve&&this.intersectionObserver.unobserve(this.elem),this.intersectionObserver=null)},i.prototype.computeViewabilityPercentage=function(){var i,n=t.getViewportSize(this.wnd);return this.intersectionObserver.takeRecords&&(i=this.intersectionObserver.takeRecords(),i.length>0&&(this.intersectionData=this.parseIntersectionData(i))),null!=this.intersectionData?this.intersectionData:e(this.elem,n)},i}(viewabilityPercentageCalculator,utils),MutationViewabilityObserver=function(e,t){"use strict";function i(e,t){this.callback=null,this.viewabilityObserver=null,this.elem=t,this.wnd=e}return i.prototype.start=function(e){function i(e){var t,i;for(i=0;i<e.length;i+=1)if(t=e[i],t.target.contains(this.elem))return void this.callback()}this.callback=e,this.viewabilityObserver=new this.wnd.MutationObserver(t.bind(i,this)),this.viewabilityObserver.observe(this.wnd.document.body,{attributes:!0,subtree:!0})},i.prototype.stop=function(){this.viewabilityObserver&&(this.viewabilityObserver.disconnect(),this.viewabilityObserver=null)},i.prototype.computeViewabilityPercentage=function(){var i=t.getViewportSize(this.wnd);return e(this.elem,i)},i}(viewabilityPercentageCalculator,utils),PollingViewabilityObserver=function(e,t){"use strict";function i(e,t){this.callback=null,this.viewabilityLoopTimer=null,this.elem=t,this.wnd=e,this.loopInterval=250}return i.prototype.start=function(e){function t(){i.callback(),i.viewabilityLoopTimer=i.wnd.setTimeout(t,i.loopInterval)}var i=this;this.callback=e,t()},i.prototype.stop=function(){this.viewabilityLoopTimer&&(this.wnd.clearTimeout(this.viewabilityLoopTimer),this.viewabilityLoopTimer=null)},i.prototype.computeViewabilityPercentage=function(){var i=t.getViewportSize(this.wnd);return e(this.elem,i)},i}(viewabilityPercentageCalculator,utils),StandardViewability=function(e,t,i,n,r){"use strict";function o(e,t,o,a){Viewability.call(this,e,t,o,a),this.callback=null,this.windowEvents=["focus","blur","check","checkAndNotify"],this.documentEvents=["visibilitychange","mozvisibilitychange","msvisibilitychange","webkitvisibilitychange"],this.hiddenProperty=function(){var e,t=["hidden","mozHidden","webkitHidden","msHidden","oHidden"],i=null;for(e=0;e<t.length;e++)if(i=t[e],i in document)return i;return i}(),this.minElementArea=1,this.ancestors=this.getElementAncestors(),this.viewabilityObserver=null,window.IntersectionObserver?this.viewabilityObserver=new r(this.wnd,this.elem):(this.windowEvents=this.windowEvents.concat(["scroll","resize"]),window.MutationObserver?this.viewabilityObserver=new n(this.wnd,this.elem):this.viewabilityObserver=new i(this.wnd,this.elem))}return o.prototype=Object.create(Viewability.prototype),o.prototype.constructor=o,o.prototype.getElementAncestors=function(){for(var e=[],t=this.elem;t;)e.unshift(t),t=t.parentNode;return e},o.prototype.isViewabilityUnavailable=function(){return!window.IntersectionObserver&&this.isInIframe()},o.prototype.isInIframe=function(){var e,t;if(this.wnd.top!==this.wnd.self)return!0;for(e=this.wnd.top.document.getElementsByTagName("iframe"),t=0;t<e.length;t+=1)if(e[t]===this.elem)return!1;return!0},o.prototype.computeViewability=function(){var e=this.inFocus(),t=this.computeViewabilityReason(e),i={reason:t,focus:e};return!this.forceViewability()||t!==this.reasons.OUT_OF_VIEWPORT&&t!==this.reasons.IN_VIEWPORT?t!==this.reasons.IN_VIEWPORT?(i.perc=0,i):(i.perc=this.viewabilityObserver.computeViewabilityPercentage(),i):(i.perc=100,i)},o.prototype.computeViewabilityReason=function(e){var i,n,r=this.elem,o=t.getViewportSize(this.wnd),a=r.getBoundingClientRect(),s=a.width*a.height,l=this.ancestors;if("none"===r.style.display||"hidden"===r.style.visibility)return this.reasons.HIDDEN;for(i=0;i<l.length;i+=1)if(n=l[i].style,n&&("none"===n.display||"hidden"===n.visibility))return this.reasons.HIDDEN;return e?a.bottom<=0||a.right<=0||a.top>=o.height||a.left>=o.width?this.reasons.OUT_OF_VIEWPORT:s<this.minElementArea?this.reasons.TOO_SMALL:this.reasons.IN_VIEWPORT:this.reasons.NOT_IN_FOCUS},o.prototype.inFocus=function(){var e=this.wnd.document[this.hiddenProperty];return void 0!==e?!e:"function"!=typeof this.wnd.document.hasFocus||this.wnd.document.hasFocus()},o.prototype.attachListeners=function(e){var i;for(this.callback=e,i=0;i<this.windowEvents.length;i+=1)t.addEventListener(this.wnd,this.windowEvents[i],e,!0);for(i=0;i<this.documentEvents.length;i+=1)t.addEventListener(this.wnd.document,this.documentEvents[i],e,!0);this.viewabilityObserver.start(e)},o.prototype.detachListeners=function(){var e;for(e=0;e<this.windowEvents.length;e+=1)t.removeEventListener(this.wnd,this.windowEvents[e],this.callback,!0);for(e=0;e<this.documentEvents.length;e+=1)t.removeEventListener(this.wnd.document,this.documentEvents[e],this.callback,!0);this.viewabilityObserver.stop()},e.register(e.publishingPlatform.STANDARD,o),e.register(e.publishingPlatform.APPLE_NEWS,o),e.register(e.publishingPlatform.OEMBED,o),o}(ViewabilityFactory,utils,PollingViewabilityObserver,MutationViewabilityObserver,IntersectionViewabilityObserver),AmpViewability=function(e){"use strict";function t(e,t,i,n){Viewability.call(this,e,t,i,n),this.detachWiewabilityObserver=null,this.currentViewability=null}return t.prototype=Object.create(Viewability.prototype),t.prototype.constructor=t,t.prototype.isViewabilityUnavailable=function(){return!1},t.prototype.computeViewability=function(){var e=!window.context.hidden,t=this.computeViewabilityReason(e),i={reason:t,focus:e};return t!==this.reasons.IN_VIEWPORT?(i.perc=0,i):(i.perc=this.currentViewability?Math.min(100,Math.round(100*this.currentViewability.intersectionRatio)):0,i)},t.prototype.computeViewabilityReason=function(e){var t=this.currentViewability.boundingClientRect,i=t.width*t.height;return e?this.currentViewability<=0?this.reasons.OUT_OF_VIEWPORT:i<this.minElementArea?this.reasons.TOO_SMALL:this.reasons.IN_VIEWPORT:this.reasons.NOT_IN_FOCUS},t.prototype.attachListeners=function(e){var t=this;this.detachWiewabilityObserver=window.context.observeIntersection(function(i){t.currentViewability=i[i.length-1],e()})},t.prototype.detachListeners=function(){this.detachWiewabilityObserver&&this.detachWiewabilityObserver()},e.register(e.publishingPlatform.ACCELERATED_MOBILE_PAGE,t),t}(ViewabilityFactory),FBiaViewability=function(e,t){"use strict";function i(e,i,n,r){Viewability.call(this,e,i,n,r),this.boundedListener=t.bind(this.receiveMessage,this),this.callback=null}var n={enters_viewport:1,center_enters_viewport:100,center_exits_viewport:49,exits_viewport:-1};return i.prototype=Object.create(Viewability.prototype),i.prototype.constructor=i,i.prototype.isViewabilityUnavailable=function(){return!1},i.prototype.computeViewability=function(){return{reason:this.wnd.viewabilityPerc>0?this.reasons.IN_VIEWPORT:this.reasons.OUT_OF_VIEWPORT,focus:!0,perc:this.wnd.viewabilityPerc}},i.prototype.attachListeners=function(e){this.wnd.viewabilityPerc=n[this.wnd.lastViewabilityMessage],this.callback=e,this.wnd.addEventListener("message",this.boundedListener)},i.prototype.detachListeners=function(){this.wnd.removeEventListener("message",this.boundedListener)},i.prototype.receiveMessage=function(e){n[e.data]&&(this.wnd.viewabilityPerc=n[e.data],this.callback&&this.callback())},e.register(e.publishingPlatform.FACEBOOK_INSTANT_ARTICLES,i),i}(ViewabilityFactory,utils),IABViewability=function(){"use strict";function e(e,t,i){var n=i||2;this.viewability=e,this.callback=t,this.iabViewabilityTimeout=null,this.counter=8,this.loopInterval=n/this.counter*1e3}return e.prototype.start=function(){function e(){var n=t.viewability.computeViewability();n.perc>=50?(i-=1,0===i?t.callback():t.iabViewabilityTimeout=window.setTimeout(e,t.loopInterval)):(i=t.counter,t.iabViewabilityTimeout=window.setTimeout(e,t.loopInterval))}var t=this,i=this.counter;if(this.stop(),this.viewability.isViewabilityUnavailable())throw new ViewabilityUnavailableError;this.iabViewabilityTimeout=window.setTimeout(e,t.loopInterval)},e.prototype.stop=function(){window.clearTimeout(this.iabViewabilityTimeout)},e}(),detect=function(e){"use strict";var t={};return t.detectAutoplay=function(){var t,i=[/mobile/i,/android/i,/(iphone|ipad|ipod)/i,/silk-accelerated/i];for(t=0;t<i.length;t++)if(e.navigator&&e.navigator.userAgent&&e.navigator.userAgent.match(i[t]))return!1;return!0},t.detectMobile=function(){return navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i)},t.detectiOS=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},t.detectAndroidVersion=function(){var e=navigator.userAgent.toLowerCase(),t=e.match(/android\s([0-9\.]*)/);return t[1]},t.isPassiveListenersSupported=function(){var e,t=!1;try{e=Object.defineProperty({},"passive",{get:function(){t=!0}}),window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(i){}return t},t}(wnd),viralize=function(e,t){"use strict";var i=inDapIF?window.top:e;i.__VR=i.__VR||{},i.__VR.widgets=i.__VR.widgets||[],i.__VR.customScripts=i.__VR.customScripts||{},i.__VR.injInstances=i.__VR.injInstances||{},i.__VR.dataLayers=i.__VR.dataLayers||{};var n="((https?:)?//)?{endpoint_host}/.*[?&]",r="kxviralize_segs",o="_kxviralize_segs",a="VR-DMP-COLLECT",s="VR-INJECTOR-INSTANCES-MAP",l={},c={};return c.__VR=i.__VR,c.findScript=function(e,t){var i=document.getElementsByTagName("script"),r=null,o=null,a=null;"undefined"!=typeof t&&null!==t&&(o=n+"zid="+t,o=o.replace("{endpoint_host}",e),a=new RegExp(o,"gi"));for(var s=function(e){return!e.hasAttribute("data-injected")&&!!(null!==e.getAttribute("data-wid")||a&&a.test(e.getAttribute("src")))},l=i.length;l--;)if(s(i[l])){r=i[l];break}return r},c.findIframe=function(){return window.frameElement},c.findAutoplay=function(){for(var e=0;e<c.__VR.widgets.length;e++)if(c.__VR.widgets[e].config&&("onload"===c.__VR.widgets[e].config.get("autoplay")||"auto"===c.__VR.widgets[e].config.get("autoplay")))return c.__VR.widgets[e];return!1},c.generateSuffixId=function(){return Math.random().toString(32).substr(2)},c.markAsInjected=function(e){e.hasAttribute("data-injected")||e.setAttribute("data-injected",!0)},c.register=function(e){var t={},i=utils.sessionStorage().getItem(s);null!=i&&(t=JSON.parse(utils.sessionStorage().getItem(s)));var n=t[e.injectorName]||c.__VR.injInstances[e.injectorName]||{count:0,instances:{}},r=n.count,o=e.config.get("max_family_instances",0),a=e.config.get("sid");if(o>0&&r>=o)throw new MaxInstancesError("Sorry, but the "+e.injectorName+" format can be used at most "+o+" times.");if(n.instances[a])throw new DuplicateInjectorError("Duplicated injector for sid: "+a);n.instances[a]=!0,n.count++,t[e.injectorName]=n,c.__VR.injInstances[e.injectorName]=n,utils.sessionStorage().setItem(s,JSON.stringify(t)),c.__VR.widgets.push(e)},c.unRegister=function(e){var t={},i=utils.sessionStorage().getItem(s);null!=i&&(t=JSON.parse(utils.sessionStorage().getItem(s)));var n=t[e.injectorName]||c.__VR.injInstances[e.injectorName]||{count:0,instances:{}},r=e.config.get("sid");n.count>0&&(n.count-=1),t[e.injectorName]=n,c.__VR.injInstances[e.injectorName]=n,utils.sessionStorage().setItem(s,JSON.stringify(t));for(var o=0;o<c.__VR.widgets.length;o++)c.__VR.widgets[o].config.get("sid")===r&&c.__VR.widgets.splice(o,1)},c.replaceInjector=function(e){for(var i=t.createElement("script"),n=e.attributes,r=0;r<n.length;r++)"data-injected"!==n[r].nodeName&&i.setAttribute(n[r].nodeName,n[r].value);i.src=i.src+"&cb="+(new Date).getTime();var o=e.parentNode;o.insertBefore(i,e),o.removeChild(e)},c.createIframe=function(e,i,n){var r=i?i+"px":"100%",o=n?n+"px":"100%",a={allowfullscreen:!0,webkitallowfullscreen:t.webkitFullscreenEnabled,mozallowfullscreen:t.mozFullScreenEnabled},s=utils.Element.create("iframe",{id:e,src:"about:blank",scrolling:"no",frameborder:0,marginheight:0,marginwidth:0,allow:"autoplay; fullscreen"});for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&a[l]&&s.attr(l,a[l]);return s.elem.style.width=r,s.elem.style.height=o,s},c.createPageId=function(t){function i(){var e,t=52,i="",n=(new Date).getTime();for(n=utils.pad(n.toString(16),12),e=0;e<t;e+=1)i+=Math.round(Math.random()).toString();return i=parseInt(i,2).toString(16),n+i}var n,r=c.getPublishingPlatform(t),o=e.navigator?e.navigator:null,a=t.get("publisher"),s=t.get("page_url"),l=o?o.userAgent||"":"",u=utils.hashCode(a+s+l),d=utils.pad((16777215&u).toString(16),6),h=0;return r===ViewabilityFactory.publishingPlatform.ACCELERATED_MOBILE_PAGE?e.context.computeInMasterFrame(e,"VR-PAGEID-PREFIX",function(e){e(i())},function(e){n=e}):n=i(),n+d+h},c.getPublishingPlatform=function(t){var i=t.get("pub_platform","");try{return e.context&&e.context.observeIntersection?ViewabilityFactory.publishingPlatform.ACCELERATED_MOBILE_PAGE:i===ViewabilityFactory.publishingPlatform.FACEBOOK_INSTANT_ARTICLES?ViewabilityFactory.publishingPlatform.FACEBOOK_INSTANT_ARTICLES:i===ViewabilityFactory.publishingPlatform.OEMBED?ViewabilityFactory.publishingPlatform.OEMBED:""}catch(n){
return""}},c.createSrc=function(i,n,r,o,a){var s,l={};return s=c.__VR.pageId=c.__VR.pageId||c.createPageId(o),a=a||{},a.player_size||(a.player_size={width:0,height:0}),l.player_session=JSON.stringify({page_id:s,screen:utils.getScreenSize(e),page:utils.getPageSize(e),viewport:utils.getViewportSize(e),player_size:{width:Math.round(a.player_size.width),height:Math.round(a.player_size.height)},semantic_data:a.semantic_data}),t.referrer&&(l.r=t.referrer),a.cid&&(l.cid=a.cid),a.sound&&(l.sound=a.sound),a.gallery_init&&(l.gallery_init=a.gallery_init),a.sessionCounter>0&&(l.sc=a.sessionCounter),a.pub_platform&&(l.pub_platform=a.pub_platform),a.activation&&(l.activation=a.activation),a.cs&&(l.cs=a.cs),null!=a.gdpr&&(l.gdpr=a.gdpr),a.cmp&&(l.cmp=a.cmp),i+"/"+n+"/?"+r+"&"+utils.urlEncode(l)},c.createPlayerSrc=function(e,t){var i=e.get("is_preview"),n=e.get("is_test"),r=i?"preview":n?"test":"player",o=t||{};return c.createSrc(e.get("scheme")+"://"+e.get("endpoint_host"),r,e.get("base_query"),e,o)},c.findInjectionElem=function(e,t){var i={script:"",iframe:""};return i.iframe=c.findIframe(),i.script=document.currentScript||c.findScript(e,t),null===i.script&&utils.trackRequestEvent("adunit_request_error",Constants.ADUNIT_REQUEST_ERRORS.SCRIPT_NOT_FOUND),i},c.isInHead=function(e){for(var t=e.parentNode;null!=t;){if("head"===t.nodeName.toLowerCase())return!0;t=t.parentNode}return!1},c.setElementRemovedListener=function(e,t,i){function n(e,t){for(var i=t;null!=i;){if(e===i)return!0;i=i.parentNode}return!1}var r={childList:!0,subtree:!0};this.unsetElementRemovedListener();try{l=new MutationObserver(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var r=0;r<e.removedNodes.length;r++)n(e.removedNodes[r],t)&&i()})}),l.observe(e,r)}catch(o){}},c.unsetElementRemovedListener=function(){l.disconnect&&(l.disconnect(),l={})},c.addPluginsForNotBlacklisted=function(e,t,i){var n={179:!0,358:!0,711:!0};null!=i&&null!=n[i]||c.addCustomScripts(e,null,t)},c.addCustomScripts=function(e,i,n){function r(e){var t=e;return n&&Object.keys(n).forEach(function(e){t=t.split("{"+e+"}").join(n[e])}),t}function o(e){var i=t.createElement("script");i.setAttribute("id",l+e.id),i.src=r(e.src),i.setAttribute("async",""),i=t.body.appendChild(i)}function a(e){utils.Element.insertHTMLBefore(s,l+e.id,r(e.content))}var s,l="";i&&(l=i+"-"),s=t.createElement("placeholder"),t.body.appendChild(s);for(var u=0;u<e.length;u++)c.__VR.customScripts[e[u].id]||(e[u].src?o(e[u]):e[u].content&&a(e[u]),c.__VR.customScripts[e[u].id]=!0);t.body.removeChild(s)},c.getInjectionPoint=function(i,n,r,o){for(var a=utils.Element.getAll(i),s=parseInt((r-n)/o)||1,l=function(e){return function(t){return 0!==t.offset().top&&t.text().length>e}},c=[],u=!1,d=r;d>=n;d-=s)if(c=utils.filter(a,utils.bind(l(d),this)),c.length>0){u=!0;break}if(u){var h=e.innerHeight;void 0===h&&(h=t.documentElement.clientHeight),c=utils.filter(c,function(e){return e.offset().top>h});var p=c.sort(function(e,t){return e.offset().top-t.offset().top});return p[0]?p[~~(p.length/2)]:null}return null},c.searchPlayerLocation=function(t,i,n){var r,o,a,s=new RegExp(/^id-.*/),l=new RegExp(/^sel-.*/),u=t.length,d="article p",h=10,p=100,f=20,m={auto:Constants.ADUNIT_REQUEST_ERRORS.LOCATION_AUTO_ERROR,inline:Constants.ADUNIT_REQUEST_ERRORS.LOCATION_INLINE_ERROR,idSelector:Constants.ADUNIT_REQUEST_ERRORS.LOCATION_BY_ID_ERROR,querySelector:Constants.ADUNIT_REQUEST_ERRORS.LOCATION_BY_SELECTOR_ERROR};for(a=0;a<u;a+=1){if(r=t[a],"inline"===r)return!n||""!==i&&i||utils.trackRequestEvent("adunit_request_error",m.inline),i;if("auto"===r?o=c.getInjectionPoint(d,h,p,f):s.test(r)?(o=utils.Element.getById(r.slice(3)),r="idSelector"):l.test(r)&&(o=utils.Element.get(e.decodeURIComponent(r.slice(4))),r="querySelector"),o)return o.elem}return n&&utils.trackRequestEvent("adunit_request_error",m[r]),null},c.sendDmpData=function(t,i,n){c.readDmpUserSegments(r,function(e){c.setCookieSyncPixel(t,e)},n),c.__VR.dataLayers.dmp=c.__VR.dataLayers.dmp||{collected:!1,data:{}},c.__VR.dataLayers.dmp.collected||(c.__VR.dataLayers.dmp.collected=!0,c.__VR.dataLayers.dmp.data=i||{},e.dispatchEvent(new utils.CustomEvent(a)))},c.readDmpUserSegments=function(e,t,i){var n=250,r=function(e){function t(e){var t,i,n,r=e.length;for(i=0;i<r;i++){for(t=e[i],n=i-1;n>-1&&e[n]>t;n--)e[n+1]=e[n];e[n+1]=t}return e}return e?t(e.split(",")).join(","):""},a=r(i),s=localStorage.getItem(o),l=0,c=2,u=function(){var i,d=localStorage.getItem(o)!==s;d?(l+=1,i=r(localStorage.getItem(e)),i!==a?t(i):l<c&&setTimeout(u,n)):setTimeout(u,n)};setTimeout(u,n)},c.setCookieSyncPixel=function(e,t){var i=window.encodeURIComponent(t),n=e+"/u-segment/?seg="+i,r=new Image;r.onload=function(){},r.src=n},c.construbCMPPostMessageStub=function(e){for(var t,i,n,r,o,a,s,l=window;!t;){try{l.frames.__cmpLocator&&(t=l)}catch(c){}if(l===window.top)break;l=l.parent}return i={},e.__cmp=function(e,o,a){return t?(n=Math.random().toString(32).substr(2),r={__cmpCall:{command:e,parameter:o,callId:n}},i[n]=a,void t.postMessage(r,"*")):void a({msg:"CMP not found"},!1)},s=function(t){try{o="string"==typeof t.data?JSON.parse(t.data):t.data,o.__cmpReturn&&(utils.removeEventListener(e,"message",s),a=o.__cmpReturn,i[a.callId]&&(i[a.callId](a.returnValue,a.success),i[a.callId]=null))}catch(n){}},utils.addEventListener(e,"message",s),function(){utils.removeEventListener(e,"message",s)}},c.readCMPData=function(e,t){var i,n,r=utils.canAccessTopWindow(),o=r?window.top:window,a=e.get("country"),s=e.get("gdpr");return s?void t(s.cmp,s.gdpr?1:0,s.cs):(r||(n=c.construbCMPPostMessageStub(o)),o.__cmp?(i=setTimeout(function(){i=null,n&&n(),t("timeout",utils.isInUE(a)?1:0,"")},2e3),void o.__cmp("getConsentData",null,function(e,n){if(i){if(clearTimeout(i),n)return void t("available",e.gdprApplies?1:0,e.consentData);t("error",utils.isInUE(a)?1:0,"")}})):void t("unavailable",utils.isInUE(a)?1:0,""))},c.setupVPT=function(e){var t,i,n={EVENTS:e.EVENTS,ALL_ZID:e.ALL_ZID,queue:e.queue,on:e.on,once:e.once,off:e.off};i=window,utils.canAccessTopWindow()&&(i=window.top),null!=i.vpt?"[object Array]"===Object.prototype.toString.call(i.vpt.queue)&&(t=i.vpt.queue,i.vpt=n,c.__VR.vptimpl=e,t.forEach(function(e){e()})):(i.vpt=n,c.__VR.vptimpl=e)},c}(wnd,doc);!function(){"use strict";var e={},t={},i="DELETED",n=function(e,t){var i=e+";"+t,n=Math.random().toString(32).substr(2);return i+";"+n},r=function(t,n,r){null!=e[t]&&null!=e[t][n]&&null!=e[t][n][r]&&(e[t][n][r]=i)},o=function(t,i){null!=e[t]&&null!=e[t][i]&&Object.keys(e[t][i]).forEach(function(e){r(t,i,e)})},a=function(e){var i={event:t.EVENTS.ALL,zid:t.ALL_ZID};return"object"!=typeof e?i.event=e:(i.event=e.event||i.event,i.zid=e.zid||i.zid),i},s=function(e,t){Object.keys(t).forEach(function(i){e.push(t[i])})},l=function(i,n){var r=[],o=t.ALL_ZID,a=t.EVENTS.ALL;return e[o]&&e[o][a]&&s(r,e[o][a]),n!==o&&e[n]&&e[n][a]&&s(r,e[n][a]),i!==a&&(e[o]&&e[o][i]&&s(r,e[o][i]),e[n]&&e[n][i]&&s(r,e[n][i])),r};t.emit=function(e,t,n){var r=l(e,t),o={event:e,zid:t,data:n,timestamp:(new Date).getTime()};r.forEach(function(e){e!==i&&window.setImmediate(function(){e(o)})})},t.on=function(t,i){var r=a(t),o=n(r.zid,r.event);for(e[r.zid]||(e[r.zid]={}),e[r.zid][r.event]||(e[r.zid][r.event]={});null!=e[r.zid][r.event][o];)o=n(r.zid,r.event);return e[r.zid][r.event][o]=i,o},t.once=function(n,r){var o=a(n),s=t.on(o,function(n){e[o.zid][o.event][s]!==i&&(t.off(o,s),r(n))});return s},t.off=function(e,t){var i=a(e);null!=t?r(i.zid,i.event,t):o(i.zid,i.event)},t.EVENTS={ALL:"VPT-EVENT::*",AD_IMPRESSION:"VPT-EVENT::AD_IMPRESSION",COLLAPSE:"VPT-EVENT::COLLAPSE",ACTIVATION:"VPT-EVENT::ACTIVATION",START:"VPT-EVENT::START",FIRST_QUARTILE:"VPT-EVENT::FIRST_QUARTILE",MID_POINT:"VPT-EVENT::MID_POINT",THIRD_QUARTILE:"VPT-EVENT::THIRD_POINT",COMPLETE:"VPT-EVENT::COMPLETE",ERROR:"VPT-EVENT::ERROR",CLICK:"VPT-EVENT::CLICK",SKIP:"VPT-EVENT::SKIP"},t.ALL_ZID="VPT-ZID::*",t.queue={push:function(e){setTimeout(e,0)}},viralize.setupVPT(t)}();var Banner=function(e,t,i,n,r,o,a,s,l,c){"use strict";var u=function(){return this instanceof u?(this.log=new Log("Banner"),this.width=n.get("width"),this.height=n.get("height"),this.injectorName="banner",this.suffixId=o.generateSuffixId(),this.detectedPlatform=o.getPublishingPlatform(n),this.computedPlayerConf=null,this.script=null,this.injectionElem=null,this.currentDisplayedSlot={iframe:null,wrapperElement:null,startViewabilityCallBackId:null,startIABViewabilityCallBackId:null,stopViewabilityCallBackId:null,stopIABViewabilityCallBackId:null,injectorPlayerEmitter:null},this.newPlayerLoadingSlot={iframe:null,wrapperElement:null,startViewabilityCallBackId:null,startIABViewabilityCallBackId:null,stopViewabilityCallBackId:null,stopIABViewabilityCallBackId:null,injectorPlayerEmitter:null},this.config=n,this.bannerRefreshTimeout=2e4,this.refreshIfFirstNotFill=!1,this.maxNumberOfImpressions=10,this.maxNumberOfRetries=10,this.somethingFill=!1,this.numberOfImpressions=0,void(this.numberOfRetries=0)):new u};return u.prototype.performFallback=function(){o.unRegister(this);var e="viralize-fallback-"+this.suffixId,t=a.Element.insertHTMLBefore(this.script,e,n.get("fallback_body"));this.currentDisplayedSlot.iframe&&this.currentDisplayedSlot.iframe.hide(),this.newPlayerLoadingSlot.iframe&&this.newPlayerLoadingSlot.iframe.hide(),this.currentDisplayedSlot&&this.currentDisplayedSlot.injectorPlayerEmitter&&this.currentDisplayedSlot.injectorPlayerEmitter.off(),this.newPlayerLoadingSlot&&this.newPlayerLoadingSlot.injectorPlayerEmitter&&this.newPlayerLoadingSlot.injectorPlayerEmitter.off(),t&&a.trackRequestEvent("adunit_response_fallback")},u.prototype.cleanViewability=function(e){null!=e.startViewabilityCallBackId&&e.injectorPlayerEmitter.off("cmd::startViewability",e.startViewabilityCallBackId),null!=e.startIABViewabilityCallBackId&&e.injectorPlayerEmitter.off("cmd::startIABViewability",e.startIABViewabilityCallBackId),null!=e.stopViewabilityCallBackId&&e.injectorPlayerEmitter.off("cmd::stopViewability",e.stopViewabilityCallBackId),null!=e.stopIABViewabilityCallBackId&&e.injectorPlayerEmitter.off("cmd::stopIABViewability",e.stopIABViewabilityCallBackId),e.startViewabilityCallBackId=null,e.startIABViewabilityCallBackId=null,e.stopViewabilityCallBackId=null,e.stopIABViewabilityCallBackId=null},u.prototype.setupViewability=function(t){this.cleanViewability(t);var i=s.getInstance(this.detectedPlatform,t.iframe.elem,e,function(){return!1},a.bind(function(e){t.injectorPlayerEmitter.emit("inj::viewability",e)},this)),n=new l(i,a.bind(function(){t.injectorPlayerEmitter.emit("inj::viewable")},this),1);t.startViewabilityCallBackId=t.injectorPlayerEmitter.on("cmd::startViewability",a.bind(function(){try{i.start(),t.injectorPlayerEmitter.emit("inj::viewabilityAvailable")}catch(e){t.injectorPlayerEmitter.emit("inj::viewabilityNotAvailable")}},this)),t.startIABViewabilityCallBackId=t.injectorPlayerEmitter.on("cmd::startIABViewability",function(){try{n.start()}catch(e){}}),t.stopViewabilityCallBackId=t.injectorPlayerEmitter.on("cmd::stopViewability",function(){i.stop()}),t.stopIABViewabilityCallBackId=t.injectorPlayerEmitter.on("cmd::stopIABViewability",function(){n.stop()})},u.prototype.removeGoogleBidders=function(e){for(var t=[],i=0;i<e.banneradns.length;i++)"google"!==e.banneradns[i].bidder.bidder.toLowerCase()&&t.push(e.banneradns[i]);e.banneradns=t},u.prototype.createBannerSlot=function(e,t){var i=o.createIframe("vr-"+this.suffixId+"-banner-"+e,this.width,this.height),n=a.Element.create("div");n.attr("id",a.classNamePrefix(this.cssNamespace,["wrapper"])+"-"+e),i.appendTo(n.elem),t.iframe=i,t.wrapperElement=n},u.prototype.loadPlayer=function(e,t,i){var r,s=this.numberOfRetries+1;this.computedPlayerConf.sessionCounter=s,r=o.createPlayerSrc(n,this.computedPlayerConf),e.injectorPlayerEmitter&&e.injectorPlayerEmitter.off(),e.injectorPlayerEmitter=i,a.loadPlayerIframe(e.iframe,r,n,function(e){o.sendDmpData(n.get("scheme")+"://"+n.get("endpoint_host"),e,n.get("dmp_segments"))},t,e.injectorPlayerEmitter),this.setupViewability(e)},u.prototype.removePlayer=function(e){if(o.unsetElementRemovedListener(),this.cleanViewability(this.newPlayerLoadingSlot),null!=e.elem){var i=e.elem.contentDocument||e.elem.contentWindow.document;if(null!=i.documentElement){i.removeChild(i.documentElement);var n=e.elem.contentWindow||e.elem;null!=n&&(n.onPlayerReady=void 0,n.config=void 0,n.injectorPlayerEmitter=void 0,n.vpt=void 0),o.setElementRemovedListener(t.body,this.injectionPoint,function(){throw new Error("Player removed by an external script")})}}},u.prototype.refreshLoop=function(e){if(e.success===!0){this.somethingFill=!0,this.numberOfImpressions+=1,this.removePlayer(this.currentDisplayedSlot.iframe);var t=this.currentDisplayedSlot;this.currentDisplayedSlot=this.newPlayerLoadingSlot,this.newPlayerLoadingSlot=t,this.newPlayerLoadingSlot.iframe.hide(),this.currentDisplayedSlot.iframe.elem.style.display="block"}else this.removePlayer(this.newPlayerLoadingSlot.iframe);if(!this.refreshIfFirstNotFill&&!this.somethingFill)return void this.performFallback();if(1!=e.success||"GOOGLE"!=e.type)return this.numberOfRetries+=1,this.numberOfRetries>=this.maxNumberOfRetries||this.numberOfImpressions>=this.maxNumberOfImpressions?void(this.somethingFill||this.performFallback()):void setTimeout(a.bind(function(){var e=new EventEmitter;e.on("inj::adFillBanner",a.bind(this.refreshLoop,this)),this.loadPlayer(this.newPlayerLoadingSlot,this.removeGoogleBidders,e)},this),this.bannerRefreshTimeout)},u.prototype.setupRefresh=function(){var e=new EventEmitter;e.on("inj::adFillBanner",a.bind(this.refreshLoop,this)),this.loadPlayer(this.newPlayerLoadingSlot,null,e)},u.prototype.inject=function(){var i=n.get("zid"),l=n.get("endpoint_host"),c=o.findInjectionElem(l,i),u=this.script=c.script;if(null===u)return null;o.markAsInjected(u),this.injectionElem=u;var d=a.getCustomCss(u)||n.get("custom_style");this.cssNamespace=r.loadStyle(e.document,this.suffixId,d),this.createBannerSlot("main",this.newPlayerLoadingSlot),this.createBannerSlot("secondary",this.currentDisplayedSlot),this.script.style.display="none";var h=n.get("pub_platform","");h===s.publishingPlatform.OEMBED&&this.detectedPlatform!==s.publishingPlatform.OEMBED?h+="-"+this.detectedPlatform:h=this.detectedPlatform;var p=a.bind(function(e){try{o.register(this)}catch(i){return i instanceof DuplicateInjectorError&&o.replaceInjector(this.script),null}if(o.isInHead(e))throw a.trackRequestEvent("adunit_request_error",Constants.ADUNIT_REQUEST_ERRORS.SCRIPT_IN_HEAD),new Error('You are trying to put the player into the head.Please check the script location or the "location" parameter');e.parentNode.insertBefore(this.newPlayerLoadingSlot.iframe.elem,e),e.parentNode.insertBefore(this.currentDisplayedSlot.iframe.elem,e),this.currentDisplayedSlot.iframe.hide(),o.setElementRemovedListener(t.body,e,function(){throw new Error("Player removed by an external script")}),o.readCMPData(n,a.bind(function(e,t,i){var r;this.computedPlayerConf={player_size:{width:this.width,height:this.height},pub_platform:h,cs:i,gdpr:t,cmp:e,sessionCounter:null},this.setupRefresh(),r={gdpr_consent:i,gdpr:t,country:n.get("country")},o.addPluginsForNotBlacklisted(n.get("plugins",[]),r,n.get("publisher"))},this))},this),f=n.get("location",["inline"]),m=o.searchPlayerLocation([f[0]],this.injectionElem,!1);m?p(m):a.onDOMContentLoaded(a.bind(function(){m=o.searchPlayerLocation(f,this.injectionElem,!0),p(m)},this))},u}(wnd,doc,inDapIF,config,cssLoader,viralize,utils,ViewabilityFactory,IABViewability,detect),templates={banner:'<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset="UTF-8">\n        <meta name="viewport" content="width=device-width, initial-scale=1">\n        {{scripts}}\n        <script type="text/javascript">\n            Ecg(window, "ecg", "{{ecgEndpoint}}");\n            ecg("create");\n        </script>\n        <title>Viralize Display Banner</title>\n    </head>\n    <body>\n        <iframe\n            id="prebid-ad-slot"\n            frameborder="0"\n            scrolling="no"\n            marginheight="0"\n            marginwidth="0"\n            topmargin="0"\n            leftmargin="0"\n            allowtransparency="true"\n            width="0"\n            height="0"\n        ></iframe>\n        <iframe\n            id="google-ad-slot"\n            frameborder="0"\n            scrolling="no"\n            marginheight="0"\n            marginwidth="0"\n            topmargin="0"\n            leftmargin="0"\n            allowtransparency="true"\n            width="0"\n            height="0"\n        ></iframe>\n        <script type="text/javascript">\n            // As we need to sandbox google script, we cannot use templateloader features\n            // so we need to load google gpt script manually here\n            var gptScript = document.createElement(\'script\');\n            gptScript.src = \'//www.googletagservices.com/tag/js/gpt.js\';\n            var googleIframe = document.getElementById(\'google-ad-slot\');\n            var targetDoc = (googleIframe.contentDocument || googleIframe.contentWindow.document);\n            if (!targetDoc.body) {\n                targetDoc.body = document.createElement(\'body\');\n            }\n            targetDoc.body.appendChild(gptScript);\n        </script>\n        <script type="text/javascript">\n            function onPlayerReady (config, injectorPlayerEmitter, vpt) {\n                window.config = config;\n                window.injectorPlayerEmitter = injectorPlayerEmitter;\n\n                if (vpt != null) {\n                    window.vpt = vpt;\n                }\n\n                var user_data = config.user_data || {};\n                var sentryConfig = {{sentryConfig}};\n                var banner = new Banner(config, sentryConfig);\n                injectorPlayerEmitter.emit("cmd::dmp_user_data", user_data);\n            }\n\n            if (window.config && window.injectorPlayerEmitter) {\n                // window.vpt could be undefined, and this is the expected behaviour\n                // for format without the api (as vpaid)\n                onPlayerReady(window.config, window.injectorPlayerEmitter, window.vpt);\n            } else {\n                window.onPlayerReady = onPlayerReady;\n            }\n        </script>\n    </body>\n</html>\n'};!function(e){"use strict";var t=new e;t.inject()}(Banner);
        })({"pub_platform": null, "height": 250, "is_test": false, "player": {"mobi": false, "script": "https://static.viralize.tv/viralize_player_banner.min.3ef1f17e.js"}, "fallback_body": "", "plugins": [{"content": "<img src=\"//ads.stickyadstv.com/auto-user-sync\" style=\"display:none;\" width=\"1\" height=\"1\">", "id": "1"}], "width": 300, "endpoint_host": "ads.viralize.tv", "zid": "AACwJy0pu2lgke_M", "experiment": null, "location": ["inline"], "sid": "01e9544293b79e80080ebbda4e00a3c1", "scheme": "https", "gdpr": null, "is_preview": false, "format_family": "banner", "dmp_segments": "", "publisher": "3651", "country": "PT", "sentry": {"dsn": "https://1aec9d790bc84140bb25fdb76f019171@sentry.viralize.com/6", "sample_rate": 0.05}, "base_query": "dp3=1&dp1=0.15&ahd=1&activation=&zid=AACwJy0pu2lgke_M&u=https%3A%2F%2Fwww.gonews.it%2F2019%2F02%2F11%2Fla-scuola-santanna-palazzo-madama%2F&sid=01e9544293b79e80080ebbda4e00a3c1", "page_url": "https://www.gonews.it/2019/02/11/la-scuola-santanna-palazzo-madama/"});
        