ced-ns.sascdn.com Open in urlscan Pro
2a02:26f0:480:e::210:f10b  Public Scan

URL: https://ced-ns.sascdn.com/diff/templates/ts/dist/banner/sas-banner-1.8.js
Submission: On September 18 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

(()=>{"use strict";var e={186:function(e,t,i){var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)"default"!==i&&Object.hasOwnProperty.call(e,i)&&n(t,e,i);return s(t,e),t},o=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(s,a){function o(e){try{d(n.next(e))}catch(e){a(e)}}function r(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,r)}d((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SasAd=void 0;const r=i(42),d=i(7322),l=i(1740),c=i(5162),h=a(i(1715)),u=i(6594),p=i(1740),f=i(3089);class g extends d.Global{constructor(e,t=!1){super(t),this.c=e,this.closed=!1,this.iCustomScriptExecuted=!1,this.animationSpeed={none:0,slow:2,medium:1.4,fast:.7},this.buttonSize={small:1,normal:1.5,big:2},this.lastClicked=0,this.ifrContainer=null,this.isRenderPixaSent=!1,this.isImpressionCounted=!1,this.realIframeId="",this.creativeDomain="creatives.sascdn.com",this.dsaObject=null,this.isCreativeInSafeFrame=!!this.c.creative.safeFrame&&this.c.creative.type===p.ECreativeType.Agency;let i=document.getElementById(e.tagId);if(!i){const e=window.sas.currentScript||document.currentScript;i=document.createElement("div"),i.id=this.c.tagId,e?e.insertAdjacentElement("afterend",i):document.body.appendChild(i)}i.appendChild(document.createComment("TagID")),this.adAttrValue=`ad-${this.c.insertionId}`,this.c.filePath&&(this.closeButtonUrl=this.c.filePath+"images/close-retina.png",this.closeButtonUrl2=this.c.filePath+"images/close_54x54.png",this.closeButtonUrl3=this.c.filePath+"images/close-without-padding.png",this.expandButtonUrl=this.c.filePath+"images/expand_54x54.png"),this.viewability=new c.Viewability,this.impressionsOnePx=new c.Viewability;let n=this.c.statisticTracking.rtbCreativeId;"0"===n&&(n=void 0);let s=this.c.statisticTracking.rtbDealId;if("0"===s&&(s=void 0),this.updateDebugData({"Creative ID":n||this.c.creative.id||null,"Deal ID":s,"Insertion ID":this.c.insertionId}),this.c.dsa)try{this.dsaObject=JSON.parse(this.c.dsa),this.isObjectEmpty(this.dsaObject)&&(this.dsaObject=null)}catch(e){this.log("DSA json parsing error")}}updateDebugData(e){var t,i,n;null===(n=null===(i=null===(t=window.sas)||void 0===t?void 0:t.debugMode)||void 0===i?void 0:i.addBanner)||void 0===n||n.call(i,{adSlot:document.getElementById(this.c.tagId),adInfo:e})}calculateDimensions(e,t,i,n){const s=this.getRatio(e,t),a=this.getParentWidth(i);let o=a;n&&(-1!==n.indexOf("px!")?o=Number(n.replace("px!","")):(o=-1!==n.indexOf("%")?Math.round(Number(n.replace("%",""))/100*a):Number(n.replace("px","")),o>a&&(o=a)));const r=Math.round(o/s);return this.log(`calculateDimensions, input: ${e}, ${t}, output: ${o}, ${r}`),{height:r,width:o}}whichTransitionEvent(){const e=this.d.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(const i in t)if(void 0!==e.style[i])return t[i]}addImage(e,t=!0){let i="";return""!==e.url&&(""!==e.oryginalClickUrl&&t&&(i+=`<a href="${e.clickUrl}"${"_blank"===e.clickTarget?' target="_blank"':""}>`),i+=`<img\n\t\t\t\tid="img_${e.id}"\n\t\t\t\tsrc="${e.url}"\n\t\t\t\twidth="${e.width}"\n\t\t\t\tstyle="border:0;display:block;margin:0"\n\t\t\t\theight="${e.height}"/>`,""!==e.oryginalClickUrl&&(i+="</a>")),i}addCreative(e,t,i=!1,n="",s=!0,a,o,r=!1,d=!0){var l,c;this.log("addCreative",e,t,i,n,s,r,d);let h=e.agencyCode;n&&!this.iCustomScriptExecuted&&(h+=n,this.iCustomScriptExecuted=!0);const f=0!==e.width||r?e.width:"100%",g=0!==e.height||r?e.height:"100%",m=this.c.tagId;if(e.type===p.ECreativeType.Agency){let n,s=this.w,r=this.d;const l=(null==s?void 0:s.$sf)&&!s.$sf.host;if(h=`\n        <style>\n          body {\n            padding:0;\n            margin:0 auto;\n          }\n        </style>\n        ${h}\n      `,e.safeFrame&&!l)if(this.realIframeId=t.id===this.c.tagId?`${t.id}_sf`:t.id,s.$sf)this.addSafeFrame(t.id,f,g,h,s,r,a,o);else{const e=document.createElement("script");e.onload=()=>this.addSafeFrame(t.id,f,g,h,s,r,a,o),e.src="//ced-ns.sascdn.com/safeframe/safeframe-api/base_host.js",r.head.appendChild(e)}else this.realIframeId=`${m}_iframe`,n=this.addElement("iframe",t,{src:"about:blank",width:f,height:g,frameBorder:"0",allow:"autoplay;fullscreen;",scrolling:"no",style:"display:block;margin:0",id:this.realIframeId}),s=n.contentWindow||n,r=n.contentWindow.document,r.open("text/html","replace"),r.write(`\n\t\t\t\t\t<!DOCTYPE html>\n\t\t\t\t\t<head>\n\t\t\t\t\t\t<script>var inDapIF = ${i}<\/script>\n\t\t\t\t\t\t<style>\n\t\t\t\t\t\t\t${d?`\n\t\t\t\t\t\t\t\thtml, body {\n\t\t\t\t\t\t\t\t\twidth: ${"number"==typeof f?f.toString()+"px":f};\n\t\t\t\t\t\t\t\t\theight: ${"number"==typeof g?g.toString()+"px":g};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t`:""}\n\t\t\t\t\t\t</style>\n\t\t\t\t\t</head>\n\t\t\t\t\t<body>\n\t\t\t\t\t\t${h}\n\t\t\t\t\t</body>\n\t\t\t\t\t</html>\n\t\t\t\t`),r.close(),this.ifrContainer=n,a&&(this.log("iframe ready"),a(s,r),this.sendRenderPixa()),o&&this.winReady((()=>{this.log("iframe load"),o(s,r,n)}),s,r);this.isRtb()&&new u.Eic({id:this.realIframeId,url:e.creativeClickCountPixelUrl})}else if(e.type===p.ECreativeType.HTML5){let i=0,n=e.url+(e.url.indexOf("?")<0?"?":"&")+"sasfid="+e.id;null===(l=e.clickUrlArray)||void 0===l||l.some((t=>{const s="&clicktag"+(i++?i:"")+"="+encodeURIComponent(t);if(new URL(e.url).host===this.creativeDomain&&(n+s).length>4500)return!0;n+=s})),this.addElement("iframe",t,{src:n,width:f,height:g,frameBorder:"0",allow:"autoplay;fullscreen;",scrolling:"no",marginheight:"0",marginwidth:"0",id:m+"_iframe"}),this.addEvent(this.w,"message",(t=>{if(!t.data||e.id!==Number(t.data))return;const i={clickUrls:e.clickUrlArray,isSmart:!0};t.source.postMessage(JSON.stringify(i),"*")})),this.sendRenderPixa()}else t.innerHTML=this.addImage(e),this.sendRenderPixa();if(e.type&&h){const e=null===(c=this.addElement("iframe",t,{src:"about:blank",frameBorder:0,allow:"autoplay;fullscreen;",scrolling:"no",style:"margin:0;width:1px;height:0px;visibility:hidden;position:absolute;top:0"}).contentWindow)||void 0===c?void 0:c.document;e&&(e.open("text/html","replace"),e.write(`\n\t\t\t\t<!DOCTYPE html>\n        <head></head>\n        <body style="padding:0;margin:0 auto">${h}</body>\n\t\t\t\t</html>\n        `),e.close())}}getPlacement(){var e;let t=this.d.getElementById(this.c.tagId);return this.friendlyIframe&&(this.friendlyIframe.setAttribute("style","width:1px; height:1px;position:absolute;"),this.friendlyIframe.setAttribute("allow","autoplay;fullscreen;"),t||(t=this.d.createElement("DIV"),t.setAttribute("id",this.c.tagId),null===(e=this.friendlyIframe.parentNode)||void 0===e||e.insertBefore(t,this.friendlyIframe))),this.log("adPlacement",t),t}stopEvent(e){return(e=e||window.event)&&(e.cancelBubble=!0,e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()),!1}createMultiBrowserCss(e){return`-moz-${e};-webkit-${e};-ms-${e};-o-${e};${e};`}executeCustomScripts(e,t,i,n){this.log("executeCustomScripts",e,t,i,n),h.executeCustomScripts(e,t,i,n,this.c.insertionId)}findPlaceForAd(e){this.log("findPlaceForAd",e);let t,i,n=[];const s=this.d.createElement("div");s.id="sas_intextContainer_"+this.c.insertionId,n=e.idNames.split(";"),""===n[n.length-1]&&n.splice(n.length-1,1);for(const a of n){switch(i=a.replace(/^\s+|\s+$/g,""),e.selectedPosition){case l.ESelectedPosition.ParagraphById:t=this.d.getElementById(i);break;case l.ESelectedPosition.ParagraphByClassName:t=this.d.getElementsByClassName(i),t.length&&(t=t[0]);break;case l.ESelectedPosition.ParagraphByItemProp:{const e=this.d.getElementsByTagName("*");for(let n=0,s=e.length;n<s;n++){const s=e[n];if(s.getAttribute("itemprop")===i){t=s;break}}break}case l.ESelectedPosition.SpecifiedElementById:t=this.d.getElementById(i);break;case l.ESelectedPosition.SpecifiedElementByClassName:t=this.d.getElementsByClassName(i),t.length&&(t=t[0])}if((e.selectedPosition===l.ESelectedPosition.SpecifiedElementById||e.selectedPosition===l.ESelectedPosition.SpecifiedElementByClassName)&&t&&t.tagName)return t;if(t&&t.tagName){const i=t.getElementsByTagName(e.paragraphType);if("automatic"===e.positionInParagraph){if(0!==i.length&&i.length<100)for(let e=i.length-1;e>=0;e--){const t=this.getElementVisibility(i[e]);if(this.log("checkElementVisibility for element number "+e,i[e],t),t>0&&t<100||0===e)return i[e].parentNode.insertBefore(s,i[e].nextSibling),s}}else if("specified paragraph"===e.positionInParagraph&&0!==e.paragraphNumber){if(0!==i.length&&i.length<100){for(let n=0;n<=i.length-1;n++)e.paragraphNumber>0&&n===e.paragraphNumber-1?i[n].parentNode.insertBefore(s,i[n].nextSibling):e.paragraphNumber>i.length&&t.appendChild(s);return s}}else{if("bottom"===e.positionInParagraph)return t.appendChild(s),s;if("top"===e.positionInParagraph)return t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s),s}}}return this.log("show anyway"),this.findPlaceForAdAuto()}getAdPlacement(e){let t=null;if(e)switch(e.selectedPosition){case l.ESelectedPosition.Automatic:t=this.findPlaceForAdAuto();break;case l.ESelectedPosition.AdPlacement:t=this.getPlacement();break;default:t=this.findPlaceForAd(e)}return t}getWholeText(e){let t="";const i=e.childNodes.length;for(let n=0;n<i;n++){const i=e.childNodes[n];8!==i.nodeType&&(t+=1!==i.nodeType?i.nodeValue:this.getWholeText(i))}return t}findPlaceForAdAuto(){this.log("findPlaceForAdAuto");const e=[],t=[],i=[],n=[],s=["SCRIPT","STYLE","TITLE","LABEL","HEADER","FOOTER","H1","H2","H3","LI","A","UL","OL","INPUT","TEXTAREA","FORM","FIGURE","NOSCRIPT","IFRAME"],a=["fixed","absolute"],o=this.d.body.getElementsByTagName("*"),r=this.d.body,d=this.d.documentElement,l=Math.max(r.scrollHeight,r.offsetHeight,d.clientHeight,d.scrollHeight,d.offsetHeight),c=this.d.createElement("div");c.id="sas_intextContainer_"+this.c.insertionId;for(const r of o){const o=Math.round(r.parentNode.childElementCount+r.parentNode.clientHeight+r.parentNode.clientHeight+r.parentNode.offsetTop);if(s.indexOf(r.tagName)>-1||o<=10)continue;let d;r.firstChild&&3===r.firstChild.nodeType&&r.firstChild.length>150&&r.parentNode.offsetTop>300&&(d={node:r.firstChild,length:r.firstChild.length,parent:r.parentNode,value:r.firstChild.data,parentOffset:r.parentNode.offsetTop},e[o]||(e[o]=[]),e[o].push(d)),r.clientWidth>=300&&r.clientHeight>100&&r.parentNode.clientHeight>1.5*r.clientHeight&&r.parentNode.offsetTop>300&&r.offsetTop<.75*l&&"hidden"!==this.w.getComputedStyle(r.parentNode,null).getPropertyValue("overflow")&&-1===a.indexOf(this.w.getComputedStyle(r.parentNode,null).getPropertyValue("position"))&&(d={node:r,parent:r.parentNode,parentWidth:r.parentNode.clientWidth,parentId:o,offsetTop:r.parentNode.offsetTop},t[o]||(t[o]=[]),t[o].push(d)),r.clientWidth>=300&&r.clientHeight>100&&r.offsetTop>.75*this.w.innerHeight&&r.offsetTop<Math.max(.5*l,this.w.innerHeight)&&-1===a.indexOf(this.w.getComputedStyle(r,null).getPropertyValue("position"))&&i.push(r),r.clientWidth>=300&&r.clientHeight>100&&r.getBoundingClientRect().top+this.w.scrollY>.5*this.w.innerHeight&&r.parentNode.clientHeight>1.5*r.clientHeight&&-1===a.indexOf(this.w.getComputedStyle(r,null).getPropertyValue("position"))&&n.push(r)}if(e.sort(((e,t)=>t.length-e.length)),this.log("article page",e),e[0]&&e[0].length>2){const t=e[0][0].parent,i=this.getWholeText(t).length;this.log("articleParentLength",i);const n=t.childNodes;let s=0,a=0;for(let e=0;e<n.length;e++)if(this.log("sum",s),s+=this.getWholeText(n[e]).length,s>i/3){this.log("break",s,i/3),a=e;break}return this.log("whichChild",a),this.log("articleChildren",n),t.insertBefore(c,n[a]),c}this.log("home page or short article",t),t.sort(((e,t)=>e[0].offsetTop-t[0].offsetTop||t[0].parentWidth-e[0].parentWidth)),this.log(t);for(const e of t)if(e&&e.length>1)return this.log("div collection with the same parent",t[e]),e[0].parent.insertBefore(c,e[1].node),c;this.log("other2",i);const h=i.length?i:n;return h.length?(h.sort(((e,t)=>t.clientWidth-e.clientWidth||e.offsetTop-t.offsetTop)),this.log("otherWrapper",h),h[0].insertBefore(c,h[0].firstChild),c):null}buildTestContent(e){var t;this.addCss(`\n\t\t\t#iframeMob_${this.c.insertionId}{\n\t\t\t\twidth:330px;\n\t\t\t\theight:580px;\n\t\t\t\tposition:absolute;\n\t\t\t\ttop:88px;\n\t\t\t\tleft:46px;\n\t\t\t}\n\t\t\t#iframeDiv_${this.c.insertionId}{\n\t\t\t\tmargin:20px auto 0;\n\t\t\t\tposition:relative;\n\t\t\t\twidth:416px;\n\t\t\t\theight:742px;\n\t\t\t\tbackground-image:url(http://gallery.smartadserver.com/demo_mobile/image/Phone_Hybrid.png);\n\t\t\t}\n\t\t\ttable img{\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t`);let i="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris vestibulum ullamcorper orci et e\n\t\tleifend. Morbi a magna ac dolor porta condimentum. ut, commodo a enim. Nulla ac dui vel odio rutrum rh tellu\n\t\ts. Quisque euismod mattis massa. Integer laoreet sapien quis eros eleifend auctor. Aenean faucibus augue nec\n\t\t dolor congue posuere. Aliquam et massa tellus. Sed commodo, orci dictum porta scelerisque, risus neque vulp\n\t\t utate enim, sit amet fermentum dui velit ac erat. Aenean faucibus augue nec dolor congue posuere. Aliquam e\n\t\t t massa tellus. Sed commodo, orci dictum porta scelerisque, risus neque vulputate enim, sit amet fermentum\n\t\t dui velit ac erat.";i=`<${e.paragraphType}>${i}</${e.paragraphType}>`;let n=`<div>${i}</div>`,s="";for(let e=0;e<4;e++)s+=i;i=s;let a,o="";for(let e=0;e<2;e++)o+=n;n=o,e.selectedPosition===l.ESelectedPosition.AdPlacement&&(e.selectedPosition=l.ESelectedPosition.SpecifiedElementById,e.idNames=this.c.tagId),a=e.selectedPosition===l.ESelectedPosition.ParagraphById||e.selectedPosition===l.ESelectedPosition.SpecifiedElementById?"id":"class";let r=[];r=e.idNames.split(";"),""===r[r.length-1]&&r.splice(r.length-1,1);let d='<img src="http://www.saspreview.com/images/preview-dog.png" width="330" /><h1>This is\n\t\t an example of article</h1>';e.selectedPosition===l.ESelectedPosition.SpecifiedElementById||e.selectedPosition===l.ESelectedPosition.SpecifiedElementByClassName?d+=`${n}<div ${a}="${r[0]}"></div>${n}`:d+=`<div ${a}="${r[0]}">${i}</div>`;const c=this.addElement("div",this.d.body,{id:"iframeDiv_"+this.c.insertionId}),h=this.addElement("iframe",c,{src:"about:blank",width:330,height:590,frameBorder:"0",allow:"autoplay;fullscreen;",scrolling:"yes",marginheight:"0",marginwidth:"0",id:"iframeMob_"+this.c.insertionId}),u=h.contentWindow||h,p=h.contentDocument||(null===(t=h.contentWindow)||void 0===t?void 0:t.document);p&&(p.open("text/html","replace"),p.write('<!DOCTYPE html><head></head><body style="padding:0;margin:0">'+d+"</body></html>"),p.close(),this.viewability.d=this.d=p),this.viewability.w=this.w=u}initViewability(e,t){this.viewability.init(e,{[this.c.creative.id]:{viewable:[this.prepareTrackingUrl(p.EViewableKey.Viewcount,this.c.sessionId)],undetermined:[this.prepareTrackingUrl(p.EViewableKey.ViewUndetermined,this.c.sessionId)]}},t),this.impressionsOnePx.init(e,{[this.c.creative.id]:{viewable:[this.prepareTrackingUrl(p.EViewableKey.ImpressionsOnePx,this.c.sessionId)]}},{area:this.impressionsOnePxArea})}getDataFromCustomScript(e){this.log("getDataFromCustomScript",e);const t=this.d.getElementById("sasCustomScript_"+this.c.insertionId),i=document.getElementById("sasCustomScript_"+this.c.insertionId),n=t||i;let s=null;if(this.c.isAsync&&n){s=(n.contentWindow||n)[e]}else s=window[e];return s}getParentWidth(e){for(this.log("getParentWidth");e&&e.parentNode;){if(e.parentElement&&e.parentElement.clientWidth>0)return e.parentElement.clientWidth;e=e.parentNode}return 0}getParentHeight(e){for(this.log("getParentHeight");e&&e.parentNode;){if(e.parentElement&&e.parentElement.clientHeight>0)return e.parentElement.clientHeight;e=e.parentNode}return 0}addVideoRedirect(e,t){const i=()=>{const{clickTarget:t,clickUrl:i}=e;"_blank"===t?this.w.open(i):this.w.location.href=i};if("ontouchstart"in this.w){let e,n;t.addEventListener("touchstart",(t=>{var i,s;e=null===(i=t.touches)||void 0===i?void 0:i[0].screenX,n=null===(s=t.touches)||void 0===s?void 0:s[0].screenY})),t.addEventListener("touchend",(t=>{var s,a;e===(null===(s=t.changedTouches)||void 0===s?void 0:s[0].screenX)&&n===(null===(a=t.changedTouches)||void 0===a?void 0:a[0].screenY)&&i()}))}else t.addEventListener("click",(()=>{i()}))}exitFullscreenOnEnd(e){e.addEventListener("ended",(()=>{try{e.webkitExitFullscreen()}catch(e){this.log("error in exit from fullscreen")}}),!1)}prepareTrackingUrl(e,t,i,n){const s=this.c.statisticTracking;let a=this.isAMPFrame?"&isAmp=":"";return a&&this.c.pgDomain&&(a+="&pgDomain="+this.c.pgDomain),this.c.baseUrl+"/track/action?sid="+this.c.sessionId+"&pid="+this.c.pageId+"&iid="+this.c.insertionId+"&fmtid="+this.c.formatId+"&cid="+(n||this.c.creative.id)+"&key="+e+a+this.validateParam("vit",s.videoIntegrationType)+this.validateParam("vct",s.videoClientTechnology)+this.validateParam("vrn",s.videoRevisionNumber)+(s.rtbbid?"&rtb=1&rtbbid="+s.rtbbid+"&rtbet="+s.rtbet+"&rtblt="+s.rtblt+"&rtbnid="+s.rtbnid+"&rtbh="+s.rtbh:"")+"&"+(i?("videoerror"===e||"viewerror"===e?"ec=":"num1=")+i+"&":"")+"ts="+t}getRatio(e,t){let i=1.78;return e&&t&&(i=Math.round(e/t*100)/100),i}sendRenderPixa(){this.isRenderPixaSent||(this.isRenderPixaSent=!0,this.tracking(this.prepareTrackingUrl("impressionsonrender",this.c.sessionId)))}addOba(e,t,i){this.log("addOba");const n=2===e?"top-left":"top-right";window.sas.utils.loadLinkCdn("diff/templates/js/adplayer/adplayer.css"),window.sas.utils.loadScriptCdn(["diff/templates/js/adplayer/adplayer.js","diff/templates/js/adplayer/latest/adplayer.sas.js"],{onLoad:()=>{this.w.$ADP&&(window.$ADP.sas.addOba(i,!1,n,this.c.sessionId,this.c.sessionId),t.style.width=this.c.creative.width+"px")}})}countImpression(e){this.log("countImpression"),this.isImpressionCounted||(this.isImpressionCounted=!0,this.tracking(e))}addPrivacyLink(e,t){const i=document.createElement("a");i.id="sas_privacy_"+this.c.insertionId,i.setAttribute("href",e),i.setAttribute("target","_blank"),i.setAttribute(r.NO_CLICK_COUNT_ATTRIBUTE_NAME,""),t.appendChild(i)}handleClickTrackers(e,t){e.addEventListener("click",(e=>{e.target.hasAttribute(r.NO_CLICK_COUNT_ATTRIBUTE_NAME)||this.trackArrayOfPixels(t)}))}loadCssFile(e){const t=document.createElement("link");t.href=e,t.rel="stylesheet",this.d.getElementsByTagName("head")[0].appendChild(t)}trackEvents(e){e.forEach((e=>{var t;if(this.isEventTrackerValid(e))if(1===e.method)this.tracking(e.url);else if(2===e.method){const i=document.createElement("script");i.src=e.url,null===(t=this.d.getElementById(this.c.tagId))||void 0===t||t.appendChild(i)}}))}prepareAdCloseButton(e,t,i){this.log("prepareAdCloseButton");const n=this.addElement("div",e,{id:`equativ_feedback_closeButton_${this.c.formatId}`,[r.NO_CLICK_COUNT_ATTRIBUTE_NAME]:""});return this.addElement("a",n,{class:"closeFeedback",[r.NO_CLICK_COUNT_ATTRIBUTE_NAME]:""}),t===l.EFeedbackMode.AllowClose&&i&&(n.onclick=()=>{i()}),n}prepareFeedbackButton(e,t,i){const n=this.addElement("div",e,{id:`equativ_feedback_button_${this.c.formatId}`,[r.NO_CLICK_COUNT_ATTRIBUTE_NAME]:""});if(t!==l.EFeedbackButtonType.Close){this.addElement("div",n,{id:`equativ_info_label_${this.c.formatId}`,[r.NO_CLICK_COUNT_ATTRIBUTE_NAME]:""}).innerHTML=`Ads powered by <img src="${this.c.filePath}images/e_orange.svg"/>`}this.addElement("img",n,{[r.NO_CLICK_COUNT_ATTRIBUTE_NAME]:"",src:`${this.c.filePath}images/${t===l.EFeedbackButtonType.Close?"close":"info"}.svg`});const s=`\n      div#equativ_feedback_button_${this.c.formatId} * {\n        box-sizing:content-box;\n        line-height:1;\n        width:initial;\n      }\n      div#equativ_feedback_button_${this.c.formatId} {\n        background-color:rgba(45, 45, 45, 0.6);\n        border-radius:70px;\n        display:flex;\n        cursor:pointer;\n        font:14px Inter,EquativInter;\n        height:auto;\n        padding:2px;\n        position:absolute;\n        top:0px;\n        right:${t===l.EFeedbackButtonType.InfoWithClose?"26px":"0px"};\n        margin:4px;\n        z-index:1;\n        width:initial;\n      }\n      div#equativ_info_label_${this.c.formatId} {\n        font-size:10px;\n        display:none;\n        color:#fff;\n      }\n      #equativ_feedback_button_${this.c.formatId} img {\n        border:0;\n        height:18px !important;\n        margin:0;\n        width:18px !important;\n      }\n      div#equativ_feedback_button_${this.c.formatId}:hover div#equativ_info_label_${this.c.formatId} {\n        display:flex;\n        align-items:center;\n        gap:3px;\n        padding-left:5px;\n      }\n      div#equativ_info_label_${this.c.formatId} > img {\n        height:14px;\n      }\n      `;return this.addCss(s,n),i&&(n.onclick=()=>{i()}),n}addNewFeedbackButton(e,t,i,n,s,a){var r,d,c;return o(this,void 0,void 0,(function*(){if(1===(null===(r=this.dsaObject)||void 0===r?void 0:r.adrender)||2===(null===(d=this.dsaObject)||void 0===d?void 0:d.pubrender))return;this.isCreativeInSafeFrame&&!1!==a&&(e=e.querySelector(".iab_sf")||e),e.clientWidth&&e.clientWidth<this.c.creative.width&&(t=!0),this.c.feedback=null!==(c=this.c.feedback)&&void 0!==c?c:{width:e.clientWidth<this.c.creative.width?e.clientWidth:0,height:e.clientHeight<this.c.creative.height?e.clientHeight:0},this.addCss(`@font-face {\n      font-family: EquativInter;\n      font-style: normal;\n      font-weight: 400;\n      src: url(${this.c.filePath}fonts/Inter-Basic.woff2) format('woff2');\n      unicode-range: U+0020-007E\n    }`);const o=i?l.EFeedbackMode.AllowClose:l.EFeedbackMode.Standard,h=this.prepareFeedbackButton(e,o===l.EFeedbackMode.AllowClose?l.EFeedbackButtonType.InfoWithClose:l.EFeedbackButtonType.Info);let u=!1;h.onclick=r=>{r.stopPropagation(),u||window.sas.utils.loadScriptCdn("/diff/templates/ts/dist/global/sas-feedback-1.0.js",{async:!0,onLoad:()=>{new window.AdFeedback(e,this.c,this.dsaObject,(()=>{this.addNewFeedbackButton(e,t,i,n,s,a),null==s||s("closed")}),o,n),h.remove(),null==s||s("shown")}}),u=!0}}))}addFeedbackButton(e,t,i,n){const s=this.addElement("div",e,{id:`equativ_feedback_${this.c.formatId}`},!0),a=i?l.EFeedbackMode.AllowClose:l.EFeedbackMode.Standard;i||(i=this.prepareAdCloseButton(s,l.EFeedbackMode.Standard));let o,r,d,c,h=!1;i.onclick=()=>{h||window.sas.utils.loadScriptCdn("/diff/templates/ts/dist/global/sas-feedback.js",{async:!0,onLoad:()=>{new window.AdFeedback(e,this.c,s,a,n),null==i||i.remove(),s.style.top="0px",a===l.EFeedbackMode.AllowClose&&this.prepareAdCloseButton(s,l.EFeedbackMode.AllowClose,n)}}),h=!0},a===l.EFeedbackMode.AllowClose?(o="0px",r="1px",d=this.isCreativeInSafeFrame?"4px":"-1px",c="absolute"):(o=(this.isCreativeInSafeFrame?"5px":"-25px")+" 5px 0 0",r="unset",d="unset",c="initial");const u=`\n      #equativ_feedback_${this.c.formatId} {\n        width: ${t?"100%":this.c.creative.width+"px"};\n        left: 0px;\n        position: relative;\n        top: ${this.isCreativeInSafeFrame?"0":"28px"};\n        font-size: 14px;\n        z-index: 1;\n      }\n      #equativ_feedback_closeButton_${this.c.formatId} {\n        position: ${c};\n        top: ${r};\n        right: ${d};\n        margin: ${o};\n        width: 15px;\n        height: 15px;\n        float: right;\n        cursor: pointer;\n      }\n      .closeFeedback {\n        position: relative;\n        opacity: 1;\n        width: 18px;\n        height: 18px !important;\n        cursor: pointer;\n        margin-left: 5px !important;\n      }\n      .closeFeedback:before, .closeFeedback:after {\n        position: absolute;\n        content: ' ';\n        height: 15px;\n        width: 2px;\n        background-color: #05b1f5;\n      }\n      .closeFeedback:before {\n        transform: rotate(45deg);\n      }\n      .closeFeedback:after {\n        transform: rotate(-45deg);\n      }\n    `;this.addCss(u,s)}addAutorefresh(e,t,i){let n,s;this.realIframeId?n=this.d.getElementById(this.realIframeId):s=h.findCommentNode(e,"TagID"),(new c.Viewability).init(e,{},{area:t.viewabilityThreshold,delay:t.duration,viewCallback:()=>n===this.d.getElementById(this.realIframeId)||s&&s===h.findCommentNode(e,"TagID")?new f.Autorefresh({container:e,duration:t.duration,refreshNb:t.refreshNb,keywordTargeting:t.keywordTargeting,tagId:this.c.tagId,cleanCallback:i}):void 0})}isRtb(){return!!this.c.statisticTracking.rtbbid}ifrLoadCallback(e,t,i,n,s){var a;this.isRtb()&&(void 0===this.c.creativeFeedback&&this.addFeedbackButton(this.isCreativeInSafeFrame?e.getElementsByClassName("iab_sf")[0]:e,t,i,n),(null===(a=this.c.autorefresh)||void 0===a?void 0:a.enable)&&this.addAutorefresh(e,this.c.autorefresh,s))}defineDynamicNamedFunc(e,t){if(this.log("defineDynamicNamedFunc"),"function"==typeof this.w[e])return;const i=(n=t,function(){n()});var n;Object.defineProperty(this.w,e,{value:i})}validateParam(e,t){return t?`&${e}=${t}`:""}isEventTrackerValid(e){return!!(e.event&&1===e.event&&e.method&&e.url)}addSafeFrame(e,t,i,n,s,a,o,r){let d=a.getElementById(e);d&&(e===this.c.tagId&&(e=this.c.tagId+"_sf",d=this.addElement("div",d,{id:e})),s.$sf_iOnLoadCallbacks=s.$sf_iOnLoadCallbacks||new Map,r&&s.$sf_iOnLoadCallbacks.set(e,r),new s.$sf.host.Config({renderFile:"//ced-ns.sascdn.com/safeframe/safeframe-api/frame.html",onEndPosRender:e=>{this.ifrContainer=d,this.log("iframe load");const t=s.$sf_iOnLoadCallbacks.get(e);t&&(t(s,a,d),s.$sf_iOnLoadCallbacks.delete(e))},onStartPosRender:()=>{o&&(this.log("iframe ready"),o(s,a),this.sendRenderPixa())}}),new s.$sf.host.PosConfig({id:e,w:t,h:i,dest:e}),s.$sf.host.render(new s.$sf.host.Position(e,n)))}}t.SasAd=g},3089:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Autorefresh=void 0;const n=i(42),s=i(7322);class a extends s.Global{constructor(e){var t;super(),this.conf=e,this.refreshNumberKey="refsh_no",this.refreshTimeKey="refsh_tm",this.logOn=!1,this.duration=e.duration,this.tagId=e.tagId,this.refreshNb=e.refreshNb,this.keywordTargeting=e.keywordTargeting,this.container=e.container,null===(t=window.sas_addCleanListener)||void 0===t||t.call(window,this.conf.tagId,(()=>{this.log("sas_addCleanListener autorefresh"),this.container.style.height=`${this.container.clientHeight}px`,window.setTimeout((()=>{this.container.style.height="auto"}),1e3),e.cleanCallback&&e.cleanCallback()})),this.refresh()}refresh(){var e,t;this.refreshNb>=n.AUTO_REFRESH_CAPPING?this.log("backup exit - capping limit"):(this.container.style.height="auto",this.log(`viewable ${this.duration} - refresh format`),this.keywordTargeting.indexOf(`${this.refreshNumberKey}=`)>-1?(this.log(`${this.refreshNumberKey} key already exists`),this.keywordTargeting=this.keywordTargeting.replace(`${this.refreshNumberKey}=${this.refreshNb}`,`${this.refreshNumberKey}=${++this.refreshNb}`)):(this.log(`no ${this.refreshNumberKey} key`),this.keywordTargeting+=`;${this.refreshNumberKey}=1;${this.refreshTimeKey}=${this.duration};`),this.log("new target",this.keywordTargeting),null===(t=(e=window.sas).refresh)||void 0===t||t.call(e,this.tagId,{target:this.keywordTargeting,autoRefresh:!0}))}}t.Autorefresh=a},42:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.feedbackDataDogConfiguration=t.webTechnicalLoggerConfiguration=t.AUTO_REFRESH_CAPPING=t.NO_CLICK_COUNT_ATTRIBUTE_NAME=t.AD_ATTRIBUTE_NAME=void 0,t.AD_ATTRIBUTE_NAME="data-eqt-ad",t.NO_CLICK_COUNT_ATTRIBUTE_NAME="data-exclude-click",t.AUTO_REFRESH_CAPPING=5,t.webTechnicalLoggerConfiguration={clientToken:"puba9e91125eb50a412ff48375869406de5",source:"videoOutstream",tags:"outstream",service:"videoOutstream",host:"FRONT-DDLOG-HOST",endpoint:"videoOutstream",minLogLevel:"error",samplingRate:{debug:1e4,info:1e3,warning:100,error:100}},t.feedbackDataDogConfiguration={clientToken:"puba9e91125eb50a412ff48375869406de5",source:"smartweblogger",tags:"adFeedback",service:"ad-display-feedback",host:"FRONT-DDLOG-HOST",endpoint:"adFeedback",minLogLevel:"error",samplingRate:{debug:1e4,info:1,warning:100,error:100}}},1740:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EFeedbackButtonType=t.EFeedbackMode=t.ESelectedPosition=t.EViewableKey=t.ECreativeType=t.ELabelPosition=t.ConnectionEffectiveType=void 0,function(e){e.SlowSecondGeneration="slow-2g",e.SecondGeneration="2g",e.ThirdGeneration="3g",e.FourthGeneration="4g"}(t.ConnectionEffectiveType||(t.ConnectionEffectiveType={})),function(e){e.Top="Top",e.Bottom="Bottom",e.TopOverlay="Top Overlay",e.BottomOverlay="Bottom Overlay"}(t.ELabelPosition||(t.ELabelPosition={})),function(e){e[e.Agency=0]="Agency",e[e.Image=1]="Image",e[e.HTML5=4]="HTML5"}(t.ECreativeType||(t.ECreativeType={})),function(e){e.Viewcount="viewcount",e.ImpressionsOnePx="impressionsonepx",e.ViewUndetermined="viewUndetermined"}(t.EViewableKey||(t.EViewableKey={})),function(e){e.AdPlacement="ad placement",e.Automatic="automatic",e.ParagraphById="paragraph by id",e.ParagraphByClassName="paragraph by class name",e.ParagraphByItemProp="paragraph by item prop",e.SpecifiedElementById="specified element by id",e.SpecifiedElementByClassName="specified element by class name"}(t.ESelectedPosition||(t.ESelectedPosition={})),function(e){e.Standard="standard",e.AllowClose="allowClose"}(t.EFeedbackMode||(t.EFeedbackMode={})),function(e){e.Info="info",e.Close="close",e.InfoWithClose="infoWithClose"}(t.EFeedbackButtonType||(t.EFeedbackButtonType={}))},6594:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Eic=void 0;const n=i(7322);class s extends n.Global{constructor(e){if(super(),this.conf=e,this.useTopWindow(),!this.isValidData(e))throw new Error("Equativ Iframe Clicks: wrong input data format");this.init()}isValidData(e){return!this.isObjectEmpty(e)&&this.isValidStringField(e.id)&&this.isValidStringField(e.url)}init(){if(this.log("init"),document.getElementById(this.conf.id))this.log(`element #${this.conf.id} has been found`),this.addListeners();else{const e=new MutationObserver((()=>{document.getElementById(this.conf.id)&&(this.log(`element #${this.conf.id} has been found`),this.addListeners(),e.disconnect())}));e.observe(document,{childList:!0,subtree:!0})}}addListeners(){if(this.log("addListeners"),this.w.focus(),!s.blurListeners.has(this.w)){const e=()=>this.logClick();this.w.addEventListener("blur",e),s.blurListeners.set(this.w,e)}this.isFirefox()||document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.w.focus()}))}logClick(){this.log("logClick"),setTimeout((()=>{var e;(null===(e=document.activeElement)||void 0===e?void 0:e.id)===this.conf.id&&(this.log("clicked"),(new Image).src=this.conf.url)}))}}t.Eic=s,s.blurListeners=new WeakMap,window.sas=window.sas||{},window.sas.eic=window.sas.eic||s},7322:function(e,t){var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(s,a){function o(e){try{d(n.next(e))}catch(e){a(e)}}function r(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,r)}d((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Global=void 0;t.Global=class{constructor(e=!1){if(this.d=document,this.w=window,this.logOn=!1,this.isReady=!1,this.impressionsOnePxArea=1e-4,this.getHiddenProp=()=>{const e=["webkit","moz","ms","o"];if("hidden"in this.d)return"hidden";for(const t of e)if(t+"Hidden"in document)return t+"Hidden";return null},this.visibilityHandler=()=>{(()=>{const e=this.getHiddenProp();return!!e&&this.d[e]})()?this.blurHandler():this.focusHanlder()},!e){let e;if(e=!!this.getIeVersion(navigator.userAgent)||window.frameElement,e&&void 0!==window.inDapIF&&window.inDapIF){this.log("FIF mode");const e=this.useTopWindow();this.friendlyIframe=e.currentFrame}}this.isAMPFrame=this.isAMP(),this.docReady((()=>this.isReady=!0))}useTopWindow(){const e=this.getTopWindow();return this.w=e.currentWindow,this.d=this.w.document,e}addElement(e,t,i,n=!1){const s=this.d.createElement(e);for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.setAttribute(e,String(i[e]));return n?t.insertBefore(s,t.firstElementChild):t.appendChild(s),s}addEvent(e,t,i){e&&t&&i&&(e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i))}addCss(e,t=this.d.getElementsByTagName("head")[0]){const i=this.d.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=e:i.appendChild(this.d.createTextNode(e)),t.appendChild(i)}log(...e){this.logOn&&console.log(e)}docReady(e,t=this.w,i=this.d){const n=()=>{this.log("ready"),i.removeEventListener("DOMContentLoaded",n,!1),t.removeEventListener("load",n,!1),e()};"complete"===i.readyState?setTimeout(e):(i.addEventListener("DOMContentLoaded",n,!1),t.addEventListener("load",n,!1))}winReady(e,t=this.w,i=this.d){const n=()=>{this.log("window loaded"),t.removeEventListener("load",n,!1),e()};t.addEventListener("load",n,!1)}tracking(e){if(e){(new Image).src=e}}isChild(e,t){if(t){let i=t.parentNode;for(;null!=i;){if(i===e)return!0;i=i.parentNode}}return!1}getElementVisibility(e){const t=e.getBoundingClientRect(),i=(t.right-t.left)*(t.bottom-t.top);if(0===i)return 0;const n=Math.max(0,Math.min(t.bottom,this.w.innerHeight)-Math.max(0,t.top)),s=Math.max(0,Math.min(t.right,this.w.innerWidth)-Math.max(0,t.left));return Math.round(n*s*100/i)}checkTabVisibility(e,t){this.focusHanlder=e,this.blurHandler=t;const i=this.getVisibilityEventName();i&&this.addEvent(this.d,i,this.visibilityHandler)}clearTabVisibilityHandler(){const e=this.getVisibilityEventName();e&&this.d.removeEventListener(e,this.visibilityHandler)}getVisibilityEventName(){let e="";const t=this.getHiddenProp();return t&&(e=t.replace(/[H|h]idden/,"")+"visibilitychange"),e}getIosVersion(){if(/iP(hone|od|ad)/.test(navigator.platform)){const e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(e)return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]}}isExternal(e,t){const i=this.getDomain(t);return-1===e.indexOf(i)}getDomain(e){let t=e;if(null!=e){const i=e.split(".").reverse();null!=i&&i.length>1&&(t=i[1]+"."+i[0])}return t}offsetTop(e){let t=0;do{isNaN(e.offsetTop)||(t+=e.offsetTop),e=e.offsetParent}while(e);return t}isString(e){return"string"==typeof e||e instanceof String}isObjectEmpty(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}isFirefox(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}isSafari(){const e=this.w.navigator.userAgent;return!!(e.indexOf("Safari")>0&&/iPad|iPhone|iPod/.test(e))}getPageHeight(){const e=this.d.body,t=this.d.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}getIeVersion(e){e=e||navigator.userAgent;const t=/\b(MSIE |Trident.*?rv:|Edge\/)(\d+)/.exec(e);return t?parseInt(t[2],10):void 0}offset(e){const t=e.getBoundingClientRect(),i=this.w.pageYOffset||this.d.documentElement.scrollTop;return{top:t.top+i,bottom:t.bottom+i,left:t.left,right:t.right}}triggerCustomEvent(e,t,i=null,n={width:void 0,height:void 0}){if(!e.length)return;let s;this.d.createEvent?(s=this.d.createEvent("HTMLEvents"),s.initEvent(e,!0,!0)):(s=this.d.createEventObject(),s.eventType=e),s.eventName=e,null!==i&&(s.videoDuration=i),void 0!==n.width&&void 0!==n.height&&(s.creativeSize=n),s.formatId=t,this.d.createEvent?this.w.dispatchEvent(s):this.w.fireEvent("on"+s.eventType,s)}getTopWindow(){let e=5,t=window,i=this.getIeVersion(navigator.userAgent)?null:window.frameElement;for(;e--;)try{t.parent&&t.parent.document&&(i=t.frameElement,t=t.parent,t===t.parent&&(e=0))}catch(e){this.log("getTopWindow error",e)}return{currentWindow:t,currentFrame:i}}isMobile(){return"ontouchstart"in this.w}getJson(e){return i(this,void 0,void 0,(function*(){const t=yield fetch(e);try{t.parsedBody=yield t.json()}catch(e){throw new Error("JSON parsing error, "+e)}if(!t.ok)throw new Error("Server responded with "+t.statusText);return t}))}isValidStringField(e){return Boolean(e)&&this.isString(e)}limitString(e,t){return e.length>t?e.substring(0,t-3)+"...":e}trackArrayOfPixels(e){for(const t of e)t&&this.tracking(t)}isAMP(){return this.w.context?"AMP-AD"===this.w.context.tagName:this.w.name.indexOf('"tagName":"AMP-AD"')>-1}}},133:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{readFromAmpContext(){try{this.consentData=JSON.parse(window.context.cachedFrameName_).consentSharedData}catch(e){}return this}mockApi(e){var t,i;if(null===(t=this.consentData)||void 0===t?void 0:t.consentString){const t=(null===(i=this.consentData.consentMetadata)||void 0===i?void 0:i.gdprApplies)||!1,n={tcString:this.consentData.consentString,gdprApplies:t,cmpStatus:"loaded",eventStatus:"tcloaded"},s={gdprApplies:t,cmpLoaded:!0,cmpStatus:"loaded",apiVersion:"2.0"};e.__tcfapi=function(e,t,i){switch(e){case"ping":i(s);break;case"addEventListener":i(n,!0);break;case"getTCData":i(n)}}}}}},1715:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.ESponsorLabelPosition=t.isSelectorValid=t.findCommentNode=t.setSponsorLinkPosition=t.calculateChildrenHeight=t.replaceUrlParams=t.executeCustomScripts=void 0,t.executeCustomScripts=function(e,t,i,n,s){var a;let o=e;for(const e of t)0!==e.type&&(o+=e.agencyCode);if(o.replace(/\r\n/gm,"")){const e=document.createElement("iframe");e.src="about:blank";const t="width:1px;height:0;visibility:hidden;display:block;border-width:0;";e.setAttribute("style",t),e.setAttribute("id",`sasCustomScript_${s}`),e.setAttribute("allow","autoplay;fullscreen;"),e.style.cssText=t,function(e,t){const i=document.getElementById(e);if("string"==typeof t){const e=document.createElement("div");e.innerHTML=t,t=e}null==i||i.appendChild(t)}(n,e);const i=null===(a=e.contentWindow)||void 0===a?void 0:a.document;i&&(i.open("text/html","replace"),i.write(`<!DOCTYPE html><head></head><body>${o}</body></html>`),i.close())}},t.replaceUrlParams=function(e,t){const i=new URL(e);for(const[e,n]of Object.entries(t))i.searchParams.has(e)&&i.searchParams.set(e,n);return i.toString()},t.calculateChildrenHeight=function(e){let t=0;return e.childNodes.forEach((e=>{t+=e.clientHeight||0})),t},t.setSponsorLinkPosition=function(e){let t;switch(e){case i.TopLeft:t="top:0;left:0";break;case i.TopRight:t="top:0;right:0";break;case i.BottomLeft:t="bottom:0;left:0";break;case i.BottomRight:t="bottom:0;right:0";break;default:t="top:0;left:0"}return t},t.findCommentNode=function(e,t){return Array.from(e.childNodes).find((e=>e.nodeType===Node.COMMENT_NODE&&e.nodeValue===t))},t.isSelectorValid=function(e){try{document.createDocumentFragment().querySelector(e)}catch(e){return!1}return!0},function(e){e.TopLeft="top left",e.TopRight="top right",e.BottomLeft="bottom left",e.BottomRight="bottom right"}(i=t.ESponsorLabelPosition||(t.ESponsorLabelPosition={}))},8208:function(e,t,i){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Banner=void 0;const s=i(186),a=i(1740),o=n(i(133));class r extends s.SasAd{constructor(e,t=!1){super(e,t),this.c=e}init(){var e;this.log("init"),this.isRtb()||this.countImpression(this.c.creative.creativeCountPixelUrl);let t=this.getPlacement();!this.isCreativeInSafeFrame&&this.c.creativeFeedback&&(t=this.addElement("div",t,{style:`margin:auto;max-width:min(100%,100vw);position:relative;width:${this.c.creative.width}px`})),this.addCreative(this.c.creative,t,!0,this.c.customScript,this.c.isAsync,(()=>this.initViewability(t)),(()=>{this.ifrLoadCallback(t),this.c.creativeFeedback&&this.addNewFeedbackButton(t)})),this.c.creative.type!==a.ECreativeType.Agency&&(this.initViewability(t),this.c.creative.type===a.ECreativeType.Image&&this.c.creativeFeedback&&this.addNewFeedbackButton(t)),this.c.oba&&this.addOba(this.c.oba,t,this.c.tagId);const i=null===(e=this.ifrContainer)||void 0===e?void 0:e.contentWindow;i&&!i.__tcfapi&&this.isAMP()&&this.c.creative.agencyCode.includes("googletag")&&(new o.default).readFromAmpContext().mockApi(i)}}t.Banner=r,window.Banner=r},885:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ViewabilityCore=void 0;const n=i(7322);class s extends n.Global{constructor(){super(),this.integration=0,this.resultLayer=null,this.playingCreativeId=null,this.pixels={},this.threshold=[],this.isIOCallbackCalled=!1,this.addEvent(this.d,"visibilitychange",(()=>{this.d.hidden?this.w.clearTimeout(this.ioTimeoutId):this.checkCurrentState()}))}videoHandler(e,t){const i=["complete","skip","AdSkipped","AdStopped"];i.concat(["pause","AdPaused","abort","emptied","ended","error","seeked","seeking"]).indexOf(e)>-1?this.playingCreativeId=null:["start","AdStarted","AdPlaying","resume","play","playing"].indexOf(e)>-1&&(this.playingCreativeId=t,void 0!==this.intersectionObserverCallback&&0!==Object.keys(this.pixels).length&&this.intersectionObserverCallback(this.lastIntersectionObserverEntry)),i.indexOf(e)>-1&&this.executePixels(t,"notviewable")}updateCreativePixels(e,t){return this.log("updateCreativePixels"),this.isIOCallbackCalled=!1,void 0!==this.intersectionObserverCallback&&this.intersectionObserverCallback(this.lastIntersectionObserverEntry),this.pixels[e]=t}start(e,t,i){this.log("start",e,t,i);if(e=this.checkElementStatus(e).element,this.pixels=t,!e)throw new Error(`Smart Viewability: passed element to measure is not valid and its value is "${e}"`);const n=this.mergeOptions(i,e);if(n.videoIntegration||(this.playingCreativeId=Object.keys(t)[0]?String(Object.keys(t)[0]):"1"),this.integration=n.videoIntegration||this.integration,n.logMessages&&(this.logOn=!0),n.testLayer&&(this.resultLayer=this.addInfoLayer()),i&&i.threshold){this.threshold=i.threshold;const e="lastSent",t="aboveCallback",n="belowCallback";this.threshold.forEach((i=>{i[e]=0,"function"!=typeof i[t]&&(i[t]=()=>console.log()),"function"!=typeof i[n]&&(i[n]=()=>console.log())}))}e.id||(e.id="sas_"+(new Date).getTime()+"rnd"),this.initIntersactionObserver(e,n),window.addEventListener("beforeunload",(()=>{this.executePixels(this.playingCreativeId,"notviewable")}))}checkCurrentState(){void 0===this.intersectionObserverCallback||this.isIOCallbackCalled||this.intersectionObserverCallback(this.lastIntersectionObserverEntry)}initIntersactionObserver(e,t){this.intersectionObserverCallback=i=>{this.lastIntersectionObserverEntry=i,i&&i.forEach((i=>{this.checkThreshold(100*i.intersectionRatio),void 0!==(null==t?void 0:t.area)&&100*i.intersectionRatio>=t.area&&this.playingCreativeId&&!this.d.hidden?this.ioTimeoutId=this.w.setTimeout((()=>{this.isIOCallbackCalled=!0,this.triggerViewableEvent(t),this.integration<2&&n.unobserve(e)}),1e3*(t.delay||0)):this.w.clearTimeout(this.ioTimeoutId)}))};const i={threshold:((null==t?void 0:t.area)||0)/100},n=new this.w.IntersectionObserver(this.intersectionObserverCallback,i);n.observe(e)}triggerViewableEvent(e){this.log(`Element visible more than ${e.area}% for ${e.delay} seconds`),this.executePixels(this.playingCreativeId,"viewable"),this.executeViewCallback(e),e.testLayer&&this.resultLayer&&(this.resultLayer.innerHTML="&#10004;")}executeViewCallback(e){e.viewCallback&&(e.viewCallback(),e.viewCallback=void 0,this.log("View callback function called"))}checkElementStatus(e){const t={measurable:!0,element:e};if(!e||window.self===window.top||this.w.self===this.w.top)return this.log("No iframe detected"),t;this.log("Iframe detected");const i=this.useTopWindow();t.element=null===i.currentFrame||i.currentFrame.parentNode===e.parentNode?e:i.currentFrame;return i.currentWindow.$sf&&i.currentWindow.$sf.ext?(this.log("SafeFrame detected"),t.element=t.element||e):void 0!==window.inDapIF&&window.inDapIF?(this.log("Friendly iframe detected"),t.element=e):i.currentWindow===window.top?this.log("Secured iframe detected"):this.isAMPFrame?this.log("AMP iframe detected"):this.log("Cross-domain iframe detected"),t}addInfoLayer(){const e=this.addElement("div",document.body,{id:`testLayer_${Math.round(1e5*Math.random())}`,style:"width:60px;height:30px;position:fixed;top:0;right:0;background-color:yellow;\n\t\t\tcolor:blue;font-size:20px;text-align:center;padding-top:5px;z-index:99999;"});return e.innerHTML="0%",e}checkThreshold(e){var t,i;const n="area",s="lastSent";for(const a of this.threshold)a[n]>e&&a[s]<=0?(null===(t=a.belowCallback)||void 0===t||t.call(a),a[s]=1):a[n]<=e&&a[s]>=0&&(null===(i=a.aboveCallback)||void 0===i||i.call(a),a[s]=-1)}calculateArea(e,t){return!this.isMobile()&&0===e.videoIntegration&&t.clientHeight*t.clientWidth>242500?30:50}mergeOptions(e,t){const i={area:null==e?void 0:e.area,testLayer:(null==e?void 0:e.testLayer)||!1,logMessages:(null==e?void 0:e.logMessages)||!1,videoIntegration:(null==e?void 0:e.videoIntegration)||0,threshold:(null==e?void 0:e.threshold)||[],viewCallback:null==e?void 0:e.viewCallback};return e&&e.delay?i.delay=e.delay:i.delay=i.videoIntegration?2:1,i.area||(i.area=this.calculateArea(i,t)),i}executePixels(e,t){if(null==e)return!1;let i=!1;return this.pixels[e]&&this.pixels[e][t]&&(this.trackArrayOfPixels(this.pixels[e][t]),i=!0,delete this.pixels[e],this.playingCreativeId=null),i}}t.ViewabilityCore=s},5162:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Viewability=void 0;const n=i(885);class s extends n.ViewabilityCore{constructor(){super()}init(e,t,i){this.log("init"),this.start(e,t,i)}}t.Viewability=s,window.Viewability=s}},t={};(function i(n){var s=t[n];if(void 0!==s)return s.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports})(8208)})();