!function(){"use strict";var e="pulsembed",t=-1===location.protocol.indexOf("http")?"https:":location.protocol,n=t+"//pulsembed.eu",a=function(e){if(e.contentWindow){var t=e.getBoundingClientRect(),a=void 0!==window.innerHeight?window.innerHeight:document.documentElement.clientHeight,o=t.top,r=0,i=0;0-o>0&&(i=0-o);var d=0;(r=t.height?t.height:t.bottom-t.top)+o-0-a>0&&(d=r+o-0-a);var s=0;r-(i+d)>0&&(s=r-(i+d));var l=0;0!==r&&(l=s/r),e.contentWindow.postMessage(JSON.stringify({vis:l}),n)}},o=[],r=function(e){var r=e.getAttribute("data-src");if(r){r=t+"//"+r.split("//")[1];var i=(e.getAttribute("data-height-hint")||"").trim();i=""===i?"1px":i;var d=e.getAttribute("data-sandbox")||"standard";e.removeAttribute("data-src"),e.removeAttribute("data-height-hint"),e.removeAttribute("data-sandbox"),e.removeAttribute("data-run-module");var s=(""+Math.random()).substr(2);e.setAttribute("data-id",s),e.style.position="relative",e.style.display="block",e.style.height=0,e.style.padding=0,e.style.overflow="hidden",e.style["padding-bottom"]=i,e.embedId=e.getAttribute("data-embed-id")||"",e.providerName=e.getAttribute("data-provider-name")||"";var l=document.createElement("iframe");l.src=r,l.setAttribute("frameborder",0),"standard"===d?l.setAttribute("sandbox","allow-forms allow-scripts allow-same-origin allow-popups"):"distrusted"===d&&l.setAttribute("sandbox","allow-forms allow-scripts allow-same-origin"),l.setAttribute("webkitallowfullscreen","webkitallowfullscreen"),l.setAttribute("mozallowfullscreen","mozallowfullscreen"),l.setAttribute("allowfullscreen","allowfullscreen"),l.setAttribute("allow","autoplay"),l.style.position="absolute",l.style.top="0",l.style.bottom="0",l.style.left="0",l.style.width="100%",l.style.height="100%",l.style.border="none",l.onload=function(){!function(e){if("undefined"!=typeof onetAds){var t={DV:onetAds.dv,target:onetAds.target,du:onetAds.du,dr:onetAds.dr};e.contentWindow.postMessage(JSON.stringify({adsAndStats:t,url:window.location}),n)}}(l),a(l)},o.push({iframe:l,wrapper:e}),e.appendChild(l)}},i=function(t){var a=t.data||{};if(a[e]){for(var r,i=0;i0;l--){var u=s.item(l-1);u!==r.iframe&&r.wrapper.removeChild(u)}}else if(a.getConfigFor){var c={default:{}};"undefined"!=typeof pulse2EmbedConfig&&pulse2EmbedConfig&&(c=pulse2EmbedConfig);var f=function(e,t){var n,a={};e.default&&(a.default=e.default),e[t]&&(a[t]=e[t]);try{n=JSON.stringify({pulse2EmbedConfig:{config:a,url:window.location}})}catch(e){n="{}"}return n}(c,a.getConfigFor);r.iframe.contentWindow.postMessage(f,n)}else if(a.addClass){1;var m=a.addClass;"string"==typeof m&&-1===r.wrapper.className.indexOf(m)&&(r.wrapper.className+=" "+m)}else if(a.scrollingIframe){var p=a.scrollingIframe;1,"string"==typeof p&&-1!==["yes","no","auto"].indexOf(p)&&(r.iframe.scrolling=p)}else if(a.expand){if(a.expand.src&&a.expand.style){var w=document.getElementsByTagName("body")[0],v=document.createElement("iframe");v.setAttribute("src",""+a.expand.src),v.setAttribute("style",""+a.expand.style),v.setAttribute("allowfullscreen",""),v.setAttribute("id","pulsEmbedExpand"),w.appendChild(v),document.getElementsByTagName("html")[0].style.overflow="hidden"}}else if(a.dleBroadcast){1,a.dleBroadcast.id=r.wrapper.embedId||a.dleBroadcast.id||"",a.dleBroadcast.provider=r.wrapper.providerName||a.dleBroadcast.provider||"";for(var g=0;g=t?setTimeout(e,0):v[t].push(e))};window[e]=h;var y=w();document.addEventListener?(y<2&&document.addEventListener("DOMContentLoaded",g,!1),y<3&&window.addEventListener("load",g,!1)):y<3&&document.attachEvent("onreadystatechange",g),g(),h()}();