[\\s\\S]*?","gi");(e=(t=e).replace(r,""))!==t;);return e.replace(/e.minDistanceForSwipe:"x"===e.validAxis&&(t=n>e.minDistanceForSwipe),{isHorizontal:r/g),o="var p = []; with(o) {\n",i=!1;r.forEach(function(e){i?"="==e[0]?o+=" p.push("+e.replace(/^=\s*|\s*$/g,"")+");\n":o+=" "+e+"\n":e&&(o+=" p.push('"+e.replace(/'/g,"\\'").split(/\r?\n/g).join("\\n');\n p.push('")+"');\n"),i=!i}),o+='} return p.join("");';try{n=new Function("o",o)}catch(e){r=new Error("Cannot parse template! (see `template` property)");throw r.template=o,r}}return t?n(t):n}function flash(){var e=document.createElement("div");e.style.background="white",e.style.opacity=.005,e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.width="100%",e.style.height="100%",e.style.zIndex=2147483647,document.body.appendChild(e),setTimeout(function(){e.parentNode.removeChild(e)},0)}function crc32(e){"use strict";for(var t=-1,n=0,r=[0,-227835133,-516198153,324072436,-946170081,904991772,648144872,-724933397,-1965467441,2024987596,1809983544,-1719030981,1296289744,-1087877933,-1401372889,1578318884,274646895,-499825556,-244992104,51262619,-675000208,632279923,922689671,-996891772,-1702387808,1760304291,2075979607,-1982370732,1562183871,-1351185476,-1138329528,1313733451,549293790,-757723683,-1048117719,871202090,-416867903,357341890,102525238,-193467851,-1436232175,1477399826,1264559846,-1187764763,1845379342,-1617575411,-1933233671,2125378298,820201905,-1031222606,-774358714,598981189,-143008082,85089709,373468761,-467063462,-1170599554,1213305469,1526817161,-1452612982,2107672161,-1882520222,-1667500394,1861252501,1098587580,-1290756417,-1606390453,1378610760,-2032039261,1955203488,1742404180,-1783531177,-878557837,969524848,714683780,-655182201,205050476,-28094097,-318528869,526918040,1361435347,-1555146288,-1340167644,1114974503,-1765847604,1691668175,2005155131,-2047885768,-604208612,697762079,986182379,-928222744,476452099,-301099520,-44210700,255256311,1640403810,-1817374623,-2130844779,1922457750,-1503918979,1412925310,1197962378,-1257441399,-350237779,427051182,170179418,-129025959,746937522,-554770511,-843174843,1070968646,1905808397,-2081171698,-1868356358,1657317369,-1241332974,1147748369,1463399397,-1521340186,-79622974,153784257,444234805,-401473738,1021025245,-827320098,-572462294,797665321,-2097792136,1889384571,1674398607,-1851340660,1164749927,-1224265884,-1537745776,1446797203,137323447,-96149324,-384560320,461344835,-810158936,1037989803,781091935,-588970148,-1834419177,1623424788,1939049696,-2114449437,1429367560,-1487280117,-1274471425,1180866812,410100952,-367384613,-112536529,186734380,-538233913,763408580,1053836080,-860110797,-1572096602,1344288421,1131464017,-1323612590,1708204729,-1749376582,-2065018290,1988219213,680717673,-621187478,-911630946,1002577565,-284657034,493091189,238226049,-61306494,-1307217207,1082061258,1395524158,-1589280451,1972364758,-2015074603,-1800104671,1725896226,952904198,-894981883,-638100751,731699698,-11092711,222117402,510512622,-335130899,-1014159676,837199303,582374963,-790768336,68661723,-159632680,-450051796,390545967,1230274059,-1153434360,-1469116676,1510247935,-1899042540,2091215383,1878366691,-1650582816,-741088853,565732008,854102364,-1065151905,340358836,-433916489,-177076669,119113024,1493875044,-1419691417,-1204696685,1247431312,-1634718085,1828433272,2141937292,-1916740209,-483350502,291187481,34330861,-262120466,615137029,-691946490,-980332558,939183345,1776939221,-1685949482,-1999470558,2058945313,-1368168502,1545135305,1330124605,-1121741762,-210866315,17165430,307568514,-532767615,888469610,-962626711,-707819363,665062302,2042050490,-1948470087,-1735637171,1793573966,-1104306011,1279665062,1595330642,-1384295599],n=0;n>>8^r[255&(t^e.charCodeAt(n))];return(-1^t)>>>0}function isArray(e){return"[object Array]"===Object.prototype.toString.call(e)}function isDefAndNotNull(e){return null!=e}function updateQueryStringParameter(e,t,n){t=encodeURIComponent(t),n=encodeURIComponent(n);var r=new RegExp("([?|&])"+t+"=.*?(&|$)","i");return separator=-1!==e.indexOf("?")?"&":"?",e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+separator+t+"="+n}function fetchShortenedUrl(r,e,t){t=t||noop;var n,o=!1,i=fetchShortenedUrl.inProgress,a=fetchShortenedUrl.cache;function c(t,n){i[r].forEach(function(e){e[t](n)}),delete i[r]}"http"==!r.slice(0,4)?t():a[r]?defer(function(){e(a[r])},0,"fetchShortenedUrl defer success callback"):(i[r]||(i[r]=[],o=!0),i[r].push({success:e,error:t}),o&&(t=(creative.runtimeParams.secure?creative.cachedApiUrl:creative.insecureCachedApiUrl)+"shortenedUrls/",o={url:r,fields:"shortUrlKey"},n={cbName:"shortener_"+btoa(to_utf8(r)).replace(/\//g,"$").replace(/\+/g,"_").replace(/=/g,"")},loadJSONP(t+"?"+buildQuery(o),n,function(e){e=creative.shareUrl+e.shortUrlKey;c("success",a[r]=e)},function(){requestCreateShortenedUrl(r,c)})))}function requestCreateShortenedUrl(t,n){var e=(creative.runtimeParams.secure?creative.apiUrl:creative.insecureApiUrl)+"shortenedUrls/",r=fetchShortenedUrl.cache,o=new XMLHttpRequest;o.open("POST",e),o.setRequestHeader("Content-Type","application/json; charset=utf-8"),o.onreadystatechange=function(){var e;4===o.readyState&&(201===o.status?(e=JSON.parse(o.responseText),e=creative.shareUrl+e.shortUrlKey,r[t]=e,n("success",e)):n("error"))},o.send(JSON.stringify({url:t}))}function isMediaPlaying(e){try{return 0=this.left&&t.x<=this.right&&t.y>=this.top&&t.y<=this.bottom:t instanceof CRect?t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom:void 0},CRect.prototype.map=function(t,i){var e=i.width/t.width,o=i.height/t.height;return new CRect((this.left-t.left)*e+i.left,(this.top-t.top)*o+i.top,this.width*e,this.height*o)},CRect.prototype.equals=function(t){return t&&this.left==t.left&&this.top==t.top&&this.right==t.right&&this.bottom==t.bottom},CRect.prototype.toString=function(){return"CRect: "+JSON.stringify(this)};;
window.CeltraDeviceInfo={},function(o){function s(e,n){this.os=new t(e.osName,e.osVersion),this.browser=new r(e.browserName,e.browserVersion,n),this.engine=new i(e.browserRenderingEngine,e.browserRenderingEngineVersion),this.deviceType=new a(e.deviceType,e.mobileDevice),this.vendor=e.vendor||"",this.model=e.model||"",this.userAgent=n}function t(e,n){this.name=e||"",this.version=n||"0"}function r(e,n,t){this.name=e||"",this.version=n||"0",this.userAgent=t}function i(e,n){this.name=e||"",this.version=n||"0"}function a(e,n){this.hardwareType=e||"",this.mobile=n||""}function h(e,n){var t,r,i;if(!e)return!0;if(0===n.length)i=r=null;else if(1===n.length)r=n[0],i=n[0];else{if(2!==n.length)throw"Invalid number of arguments";r=n[0],i=n[1]}function o(e){return parseInt(e.replace(/\D/g,""),10)}for(e=e.split(".").map(o),r=r?r.split(".").map(o):[],i=i?i.split(".").map(o):[],t=Math.max(r.length,i.length)-e.length;0<=t;t--)e.push(0);function s(e,n){for(var t=0;tn[t])return 1}return 0}return!(-1===s(e,r)||1===s(e,i))}t.prototype.android=function(){return"Android"===this.name&&h(this.version,arguments)},t.prototype.osx=function(){return"OSX"===this.name&&h(this.version,arguments)},t.prototype.ios=function(){return"IOS"===this.name&&h(this.version,arguments)},t.prototype.windows=function(){return"Windows"===this.name&&h(this.version,arguments)},t.prototype.windowsPhone=function(){return"WindowsPhone"===this.name&&h(this.version,arguments)},t.prototype.linux=function(){return"Linux"===this.name},r.prototype.safari=function(){return"Safari"===this.name&&h(this.version,arguments)},r.prototype.chrome=function(){return 0===this.name.indexOf("Chrom")&&h(this.version,arguments)},r.prototype.ie=function(){return 0===this.name.indexOf("Internet Explorer")&&h(this.version,arguments)},r.prototype.android=function(){return"Android Browser"===this.name&&h(this.version,arguments)},r.prototype.samsung=function(){return"Samsung Browser"===this.name&&h(this.version,arguments)},r.prototype.opera=function(){return 0===this.name.indexOf("Opera")&&h(this.version,arguments)},r.prototype.silk=function(){return"Amazon Silk"===this.name&&h(this.version,arguments)},r.prototype.firefox=function(){return 0===this.name.indexOf("Firefox")&&h(this.version,arguments)},r.prototype.edge=function(){return"Edge"===this.name&&h(this.version,arguments)},r.prototype.miui=function(){return"MIUI Browser"===this.name&&h(this.version,arguments)},r.prototype.webView=function(){var e,n,t=null;return"iP"===(o.navigator.platform||"").substr(0,2)?(e=-1!==(e=this.userAgent).indexOf("Safari")&&-1!==e.indexOf("Version"),n=!/constructor/i.test(o.HTMLElement),e&&!o.navigator.standalone?t="iOS Safari or Safari Controller":(n||o.indexedDB)&&o.statusbar.visible?(o.webkit&&o.webkit.messageHandlers||n||o.indexedDB)&&(t="WKWebView"):t="UIWebView"):/^.*\/\d\.\d \(.*wv\).*/.test(this.userAgent)&&(t="AndroidWebView"),t},r.prototype.facebookApp=function(){var e=this.userAgent;return-1t[n])return 1}return 0}return!(-1===a(e,i)||1===a(e,r))}}(window);;
!function(n){var e=n.navigator.userAgent,r=function(){var e=n;try{for(;void 0!==e.parent.location.href&&e.parent.document!==e.document;)e=e.parent}catch(e){}return e}(),t=/rv:.*Gecko\//.test(e),i=/MSIE|Trident\//.test(e),o=/WebKit/.test(e),a=/^-?([mM]oz|[wW]eb[kK]it|[mM]s)-?/,l={},s=[],f=o?"webkit":i?"ms":t?"Moz":"",u=(e=e.match(/AppleWebKit\/(\d+)/))&&~~e[1]<540,c=["transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","perspective","perspective-origin"],m=d();function d(){return r.getComputedStyle(r.document.body,null)}function p(e,t,i){if(!e)throw new Error("No element specified!");if(E(t)){if(!(t in e.style)&&p.BREAK_ON_ERROR)throw new Error("Invalid CSS attribute "+t);if(void 0===i)return e.style[t];e.style[t]=i}else{if(-1==s.indexOf(t)&&y(t),void 0===i)return e.style[l[t]];e.style[l[t]]=i}}function w(e,t){if(!e)throw new Error("No element specified!");var i,e=e.ownerDocument.defaultView.getComputedStyle(e,null);if(u&&-1=TrackingCenter.eventCountLimit},TrackingCenter.prototype._createTrackingEvent=function(e){return e=JSON.parse(JSON.stringify(e)),extend({sessionId:this._sessionId,accountId:this._accountId,stream:"adEvents",instantiation:this._instantiation,index:this._eventIndex++,clientTimestamp:new Date/1e3},e)},TrackingCenter.prototype._addEventPendingToQueues=function(e){e=this._resolvePixelsAndEventsForQueue([e]);this.isTrackingLimitReached()&&e.events.push(this._createTrackingEvent({name:"eventLimitReached"})),e.events.forEach(function(e){Logger("tracking").log("Queuing event "+JSON.stringify(e))}),e.pixels.forEach(function(e){Logger("tracking").log("Queuing pixel "+JSON.stringify(e))}),this._pendingEvents=this._pendingEvents.concat(e.events),this._pendingPixels=this._pendingPixels.concat(e.pixels)},TrackingCenter.prototype.track=function(e,t){this.trackNoLaterThan(e,0,t)},TrackingCenter.prototype.trackNoLaterThan=function(e,t,n){var i,s,r;this.isTrackingLimitReached()?console.warn("Tracking limit reached: "+TrackingCenter.eventCountLimit+" events."):(i=t,parseInt(i,10)!==i?t=1500:t<0&&(t=0),n=n||noop,"live"!==this._purpose?(i=this._createTrackingEvent(e),Logger("tracking").log("Ignoring non-live event "+JSON.stringify(i)),defer(n)):(s=null,this._addEventPendingToQueues(e),r=this.windowForPixels,this.once("trackingQueueEmptied",function(){s&&(r.clearTimeout(s),s=null),n()}.bind(this)),s=this._useBatching?r.setTimeout(this._flushPixels,t):r.setTimeout(this.flush,t)))},TrackingCenter.prototype._resolvePixelsAndEventsForQueue=function(e){var o=this;return function e(t,n,i){var s,r;return 0==t.length?{events:n,pixels:i}:(s=t[0],s=o._createTrackingEvent(s),r=o._trackers.urlsAndEventsFor(s),e(t.slice(1).concat(r.events||[]),n.concat(s),i.concat(r.urls||[])))}(e,[],[])},TrackingCenter.prototype._fireBeacon=function(e,t){this.windowForPixels.navigator.sendBeacon(e),t()},TrackingCenter.prototype._firePixel=function(e,t){function n(){i.onload=i.onerror=null,t()}var i=this.windowForPixels.document.createElement("img");i.onload=i.onerror=n;try{i.src=e}catch(e){n()}},TrackingCenter.prototype._decrementWaiting=function(){0=this.win.innerWidth||t.clientY<=0||t.clientY>=this.win.innerHeight)&&this.cancelInteraction()},TouchEventSimulator.prototype.handleDragStart=function(t){return t.preventDefault(),!1},TouchEventSimulator.prototype.handlePointerDown=function(t){0==t.button&&(this.touch={identifier:0,target:t.target},this.updateTouchCoordinates(t),this.fireTouchEvent("touchstart",t))},TouchEventSimulator.prototype.handlePointerMove=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchmove",t))},TouchEventSimulator.prototype.handlePointerUp=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchend",t))},TouchEventSimulator.prototype.handlePointerCancel=function(t){this.touch&&0==t.button&&(this.updateTouchCoordinates(t),this.fireTouchEvent("touchcancel",t),this.touch=null)},TouchEventSimulator.prototype.fireTouchEvent=function(t,e){var n=this.doc.createEvent("HTMLEvents");n.initEvent(t,!0,!0),"touchend"==t||"touchcancel"==t?(n.touches=n.targetTouches=[],n.changedTouches=[this.touch]):n.touches=n.targetTouches=n.changedTouches=[this.touch],e.target.dispatchEvent(n)},TouchEventSimulator.prototype.cancelInteraction=function(){this.touch&&(this.fireTouchEvent("touchcancel",this.touch),this.touch=null)};;
function AggregatorTracking(t){this._trackingCenter=t}AggregatorTracking.prototype.trackAggregator=function(t,r,g){"object"==typeof r&&(g=r,r=void 0),this._trackingCenter.track({name:"aggregator",metric:t,value:r=void 0!==r?r:1,customDimensions:g=g||{}})},AggregatorTracking.prototype.trackAggregatorTime=function(t,r,g){this.trackAggregator(t,Math.round(r),g)},AggregatorTracking.prototype.trackAggregatorUsingTimer=function(t,r){var g=new Date;return function(){this.trackAggregatorTime(t,new Date-g,r)}.bind(this)},AggregatorTracking.prototype.trackAggregatorMagicTriplet=function(r,g,e){this.trackAggregator(r+"Attempts",g);var a=new Date;return function(){var t=new Date-a;(!e||t=this._targetTime?(this.pause(),this.value=this._targetValue,defer(this._callback||noop),this._startValue=null,this._startTime=null,this._targetValue=null,this._targetTime=null,this._callback=null):this.value=Math.pow(i/this._targetTime,this.options.exp)*e+this._startValue};;
function ViewportManager(t){this.container=t.container,this.width=this.originalWidth=t.width||0,this.height=this.originalHeight=t.height||0,this.iframe=this.container.ownerDocument.defaultView.frameElement,this.init()}extend(ViewportManager.prototype,EventEmitter),ViewportManager.prototype.init=function(){this.container.style.overflow="hidden",this.container.style.position="absolute",this.container.style.left=this.container.style.top=0,this.iframe.style.display="block",this.update()},ViewportManager.prototype.update=function(){this.container.style.width=this.width+"px",this.container.style.height=this.height+"px",this.iframe.style.width=this.width+"px",this.iframe.style.height=this.height+"px",this.iframe.width=this.width,this.iframe.height=this.height},ViewportManager.prototype.setSize=function(t,i){this.width=t,this.height=i,this.update()};;
function Placement(t){this.root=null,this.width={value:100,unit:"%"},this.height={value:100,unit:"%"},this.left={value:0,unit:"px"},this.top={value:0,unit:"px"},this.borders={left:0,right:0,top:0,bottom:0},this._positioning=t||"container",this.origin={horizontal:"left",vertical:"top"},this._usesFixedPositioning=!1,this._minWidth={value:0,unit:"px"},this._minHeight={value:0,unit:"px"},this.touchEventSimulator=null,this.overflow=!1,this._visible=!1,this.isSticky=!1,this.bypassSizing=!1,this.bypassPositioning=!1}extend(Placement.prototype,EventEmitter),Placement.ZINDEX_MAX=2147483647,Placement.prototype.getRootWindow=function(){return this.root.ownerDocument.defaultView},Placement.prototype.attachTo=function(t,e){throw new Error("Placement.attachTo not implemented")},Placement.prototype.getContainer=function(){throw new Error("Placement.getContainer not implemented")},Placement.prototype.getContentWindow=function(){return this.getContainer().ownerDocument.defaultView},Object.defineProperty(Placement.prototype,"creative",{get:function(){return this.getContainer().ownerDocument.defaultView.creative}}),Object.defineProperty(Placement.prototype,"positioning",{get:function(){return this._positioning},set:function(t){this._positioning=t,this.update()}}),Object.defineProperty(Placement.prototype,"visible",{get:function(){return this._visible}}),Object.defineProperty(Placement.prototype,"_canUseFixedPositioning",{get:function(){return this.usesFixedPositioning&&this.supportsFixedPositioning},enumerable:!1}),Placement.prototype.setMinimumSize=function(t,e){t=this._parseLength(t),e=this._parseLength(e);this._minWidth.value=t.value,this._minWidth.unit=t.unit,this._minHeight.value=e.value,this._minHeight.unit=e.unit,this._visible&&this.update()},Placement.prototype.setSize=function(t,e,o){var i,t=this._parseLength(t),e=this._parseLength(e),s=this.getViewportGeometry(),n=extend({},this._minWidth),r=extend({},this._minHeight);o||(this.width={value:t.value,unit:t.unit},this.height={value:e.value,unit:e.unit}),this._visible&&(o="screen"==this.positioning?(i=s.width,s.height):("page"==this.positioning?(i=this.root.ownerDocument.documentElement.offsetWidth,this.root.ownerDocument.documentElement):(i=this.root.parentNode.offsetWidth,this.root.parentNode)).offsetHeight,"%"==t.unit&&(t.value=Math.round(t.value*i/100),t.unit="px"),"%"==e.unit&&(e.value=Math.round(e.value*o/100),e.unit="px"),"%"==n.unit&&(n.value=Math.round(n.value*i/100),n.unit="px"),"%"==r.unit&&(r.value=Math.round(r.value*o/100),r.unit="px"),this.bypassSizing||(this.root.style.width=Math.max(t.value,n.value)+t.unit,this.root.style.height=Math.max(e.value,r.value)+e.unit),this.emit("resized"))},Placement.prototype.getBaseOffset=function(){var t=this.root.ownerDocument.createElement("div"),e=this.root.parentNode,o=(t.style.left=0,t.style.top=0,t.style.position="absolute",t.style.setProperty("display","block","important"),e.appendChild(t),offset(t));return e.removeChild(t),o},Placement.prototype.applyCustomPubClasses=function(){var t=this._getPubClasses();this._usePubClasses=0',IframePlacement.prototype.setSize=function(){IframePlacement.uber.setSize.apply(this,arguments),this._syncIframeSize()},IframePlacement.prototype.show=function(){IframePlacement.uber.show.apply(this,arguments),this._syncIframeSize()},IframePlacement.prototype._syncIframeSize=function(){this._visible&&this.vm&&(this.root.offsetWidth!=this.vm.width||this.root.offsetHeight!=this.vm.height)&&this.vm.setSize(0|this.root.offsetWidth,0|this.root.offsetHeight)},IframePlacement.prototype.startSyncingIframeSize=function(){this._syncInterval=this._setInterval(this._syncIframeSize,100)},IframePlacement.prototype.stopSyncingIframeSize=function(){this._syncInterval&&this._clearInterval(this._syncInterval),this._syncInterval=null},IframePlacement.prototype.getContainer=function(){if(this.root)return this.querySelector("#viewport");throw new Error("Root node not attached to document yet!")},IframePlacement.prototype._setInterval=function(t,e){return this.windowVarsByRef.adapter.getTopWindow().setInterval(t,e)},IframePlacement.prototype._clearInterval=function(t,e){return this.windowVarsByRef.adapter.getTopWindow().clearInterval(t,e)},IframePlacement.prototype.attachTo=function(t,r){this.root=t.ownerDocument.createElement("div"),this.root.style.overflow="hidden",addClass(this.root,"notranslate"),this.hide(),t.appendChild(this.root),this.startSyncingIframeSize(),this.frame=t.ownerDocument.createElement("iframe"),this.frame.style.border="0px",this.frame.setAttribute("frameborder","0"),this.frame.setAttribute("scrolling","no"),this.frame.setAttribute("allowFullScreen",""),this.root.appendChild(this.frame),defer(function(){if(!this.frame.contentWindow)throw new Error("Can't access contentWindow of an iframe, skip placement initialization.");for(var t in this.frame.contentDocument.open(),this.windowVarsByRef)this.frame.contentWindow[t]=this.windowVarsByRef[t];var e="";for(t in this.windowVarsByCopy)e+="window."+t+" = "+JSON.stringify(this.windowVarsByCopy[t])+";\n";this.frame.contentDocument.write(IframePlacement.baseHTML);var n=this.frame.contentDocument.createElement("script");n.textContent=e+";\n"+this.unitScript,this.frame.contentDocument.body.appendChild(n),attach(this.frame,"load",function(){this.setupFrame(),r&&defer(r,void 0,void 0,useAsap())}.bind(this)),this.frame.contentDocument.close()}.bind(this),void 0,void 0,useAsap())},IframePlacement.prototype.destroy=function(){this.stopSyncingIframeSize(),IframePlacement.uber.destroy.apply(this,arguments)},IframePlacement.prototype.createElement=function(t){return this.frame.contentDocument.createElement(t)},IframePlacement.prototype.querySelector=function(t){return this.frame.contentDocument?this.frame.contentDocument.querySelector(t):null},IframePlacement.prototype.querySelectorAll=function(t){return this.frame.contentDocument?this.frame.contentDocument.querySelectorAll(t):[]},IframePlacement.prototype._getViewportElement=function(){return this.querySelector("#viewport")},IframePlacement.prototype.hidePlacementFromScreenReader=function(){this.frame.tabIndex=-1,this.frame.setAttribute("aria-hidden","true")},IframePlacement.prototype.setupFrame=function(){var t=this.frame.contentDocument.createElement("script");t.textContent="window.touchEventSimulator = new TouchEventSimulator(document);window.touchEventSimulator.init();function __parseJSON(s){return JSON.parse(s);}",this.frame.contentDocument.querySelector("head").appendChild(t),this.touchEventSimulator=this.frame.contentWindow.touchEventSimulator,this.vm=new ViewportManager({container:this._getViewportElement()})};;
function DivPlacement(t){Placement.apply(this,arguments)}inherit(DivPlacement,Placement),DivPlacement.prototype.attachTo=function(t,e){this.root=t.ownerDocument.createElement("div"),this.root.style.overflow="hidden",addClass(this.root,"notranslate"),this.hide(),t.appendChild(this.root),this.touchEventSimulator=new TouchEventSimulator(this.root),this.touchEventSimulator.init(),e&&defer(e,0,"DivPlacement.attachTo defer callback",useAsap())},DivPlacement.prototype.destroy=function(){DivPlacement.uber.destroy.apply(this,arguments),this.touchEventSimulator.stop(),this.touchEventSimulator=null},DivPlacement.prototype.getContainer=function(){return this.root},DivPlacement.prototype.createElement=function(t){return this.root.ownerDocument.createElement(t)},DivPlacement.prototype.querySelector=function(t){return this.root.querySelector(t)},DivPlacement.prototype.querySelectorAll=function(t){return this.root.querySelectorAll(t)},DivPlacement.prototype._getViewportElement=function(){return this.root};;
function StickyPlacement(t,i,e,s,o){IframePlacement.apply(this,arguments),this.stickyOptions=o,this._handleDismissTouchEnd=this._handleDismissTouchEnd.bind(this),this.origin.horizontal="center",this.origin.vertical=this.stickyOptions.stickiness,this.usesFixedPositioning=!0,this._originalDocumentPadding=null}inherit(StickyPlacement,IframePlacement),StickyPlacement.create=function(t,i,e,s,o){i=new StickyPlacement(i,"",e,s,o);return i.root=t.parentNode,i.root.style.display="none",i.startSyncingIframeSize(),i.frame=t,i.setupFrame(),addClass(i.root,"notranslate"),i},StickyPlacement.prototype.setPosition=StickyPlacement.prototype.setZIndex=noop,StickyPlacement.prototype.show=function(){IframePlacement.prototype.show.apply(this,arguments),IframePlacement.prototype.setZIndex.call(this,-20),this.enableDocumentPadding(),this.update()},StickyPlacement.prototype.hide=function(){IframePlacement.prototype.hide.apply(this,arguments),this.disableDocumentPadding()},StickyPlacement.prototype.attachTo=function(){StickyPlacement.uber.attachTo.apply(this,arguments),addClass(this.root,"celtra-placement-sticky")},StickyPlacement.prototype.populate=function(t,i){this.stickyOptions.showDismissButton&&this.once("populated",this.createDismissButton.bind(this)),IframePlacement.prototype.populate.apply(this,arguments)},StickyPlacement.prototype.update=function(t,i){this.root&&this.root.parentNode&&(IframePlacement.prototype.setSize.call(this,this.width.value+this.width.unit,this.height.value+this.height.unit,!0),IframePlacement.prototype.setPosition.call(this,0,0,!0,i),defer(t))},StickyPlacement.prototype.createDismissButton=function(){var viewport=this.getViewportGeometry();with(this.root.style.overflow="visible",this._dismissButton=this.root.ownerDocument.createElement("img"),this._dismissButton.src=this.stickyOptions.baseUrl+"runner/clazzes/CreativeUnit/close-up.svg",this._dismissButton.style)switch(position="absolute",left="auto",right="6px",width="32px",height="32px",zIndex=10,this.stickyOptions.stickiness){case"top":top="auto",bottom="-16px";break;case"bottom":top="-16px",bottom="auto"}deviceInfo.deviceType.mobileDevice()?attach(this._dismissButton,"touchend",this._handleDismissTouchEnd,!1):attach(this._dismissButton,"click",this._handleDismissTouchEnd,!1),this.root.appendChild(this._dismissButton)},StickyPlacement.prototype._handleDismissTouchEnd=function(t){t.preventDefault(),t.stopPropagation(),this.disableDocumentPadding(),(this.stickyOptions.dismissCallback||noop)()},StickyPlacement.prototype.enableDocumentPadding=function(){var t=this.getRootWindow(),i=t.document.documentElement;this._originalDocumentPadding||(this._originalDocumentPadding=t.getComputedStyle(i)["padding-"+this.stickyOptions.stickiness]),i.style["padding-"+this.stickyOptions.stickiness]=this.root.offsetHeight+"px"},StickyPlacement.prototype.disableDocumentPadding=function(){this.getRootWindow().document.documentElement.style["padding-"+this.stickyOptions.stickiness]=this._originalDocumentPadding,this._originalDocumentPadding=null},StickyPlacement.prototype.hideStickyCloseButton=function(){this._dismissButton.style.display="none"},StickyPlacement.prototype.showStickyCloseButton=function(){this._dismissButton.style.display="block"};;
function Format(e,t){this.adapter=e,this.state=null,this.units=t,this.observesViewability=!0,this.observingViewability=function(e){return this.observesViewability&&this.adapter.viewabilityMeasurable["viewable"+e]}.bind(this),this._observesViewableTime=!1,this.observingViewableTime=this.observingViewableTime.bind(this),this.observationAbilities={observingViewability:this.observingViewability,observingViewableTime:this.observingViewableTime},this._allowNonNativeRAFForViewableTime="1"==this.adapter.runtimeParams._allowNonNativeRAFForViewableTime,"Accessibility"in window&&(this._accessibility=new Accessibility),this.adapter.nesting&&this.adapter.nesting.hostileIframe&&this.needsAccessToHostPage()&&this.adapter.trackingCenter.track({name:"userError",userErrorId:"nonFriendlyIFrame"})}extend(Format.prototype,EventEmitter),Object.defineProperty(Format.prototype,"placements",{get:function(){return this.adapter.placements},enumerable:!0}),Format.prototype.observingViewableTime=function(){var e=this.adapter;return this._observesViewableTime&&!!this.observingViewability("00")&&e.raf.environment&&(e.raf.isNative||this._allowNonNativeRAFForViewableTime)&&(e.supportsContainerViewability||e.canMeasureViewportPlacementGeometry)},Format.prototype.transitionTo=function(e,t,i){throw new Error("transitionTo not implemented")},Format.prototype.destroy=function(){for(var e in this.placements)this.adapter.destroyPlacement(e),delete this.placements[e];this.adapter._stopObservingEnvironment(),this.adViewableTimeObserver&&this.adViewableTimeObserver.stop()},Format.prototype.hacks={},Format.prototype._attachInViewToOrderedPlacements=function(e,t,i){var r=i||t;e._outerPlacement=r,this.adapter.canMeasureViewportPlacementGeometry&&(r.inView||(r.inView=new PlacementInView(this.adapter,r)),i&&!t.inView&&(t.inView=new PlacementInView(this.adapter,t,i.inView)),e.inView||(e.inView=new InViewObject(e,t.inView)))},Format.prototype.connectPlacementEventsToUnitBehavior=function(t,i){this.adapter.on("orientationchange",function(){t.update(noop,this.adapter.adBehavior.crossScreenSticky)}.bind(this)),t.on("resized",function(){var e;!t._visible||(e=t.getPlacementGeometry()).width<2&&e.height<2||i.setAvailableSize(e.width,e.height)}.bind(this)),t.on("shown",function(){var e=t.getPlacementGeometry();i.setAvailableSize(e.width,e.height),i.enterRenderTree()}),t.on("hidden",function(){i.exitRenderTree()})},Format.prototype._trackViewportPlacementGeometry=function(e){var t=this.adapter.getTopWindow(),e=e.getGlobalGeometry(t),t=getViewportGeometry(t,"win"),e=CRect.adopt(e),t=(e.left+=t.left,e.top+=t.top,{name:"viewportPlacementGeometry",pageDimensions:this.adapter.getPageDimensions(),viewportPositionRect:t,firstPlacementPositionRect:e});this.adapter.trackingCenter.trackNoLaterThan(t)},Format.prototype.setupViewableTimeObserver=function(){var e,t;this._observesViewableTime="0"!==this.adapter.runtimeParams._trackViewableTime,this.observingViewableTime()&&(e=this.adapter,t=new AdViewableTimeTracker(e.trackingCenter,e.raf.environment,e.getTopWindow()),e.canMeasureViewportPlacementGeometry?this.adViewableTimeObserver=new AdViewableInViewObjectObserver(t):this.adViewableTimeObserver=new AdViewableUnitObserver(t),this.adViewableTimeObserver.registerAdapter(e))},Format.IGNORABLES=["INPUT","TEXTAREA","SELECT"],Format.isElementIgnorable=function(e){return-1=i.ratio)?(t=function(){this.removeListener(s),n(i)}.bind(this),"Core"==r?t():this._inTimer[r]||(this._inTimer[r]=this.win.setTimeout(t,i.time))):this._inTimer[r]&&(this.win.clearTimeout(this._inTimer[r]),this._inTimer[r]=null)}.bind(this);return this.addListener(s),s},UnitViewabilityObserver.prototype.waitForViewableCore=function(e){return this.waitForViewable("Core",e)},UnitViewabilityObserver.prototype.waitForViewableIAB=function(e){return this.waitForViewable("IAB",e)},UnitViewabilityObserver.prototype.waitForVideoViewableIAB=function(e){return this.waitForViewable("IABvideo",e)},UnitViewabilityObserver.prototype.waitForVideoViewableFB=function(e){return this.waitForViewable("FBvideo",e)},UnitViewabilityObserver.LARGE_AD_PIXEL_COUNT=242500,UnitViewabilityObserver.selectCriterion=function(e,t){switch(e){case"IAB":return t&&t.width*t.height>UnitViewabilityObserver.LARGE_AD_PIXEL_COUNT?this.criteria.IABlargeAd:this.criteria.IABsmallAd;case"Core":case"IABvideo":case"FBvideo":return this.criteria[e];default:throw new Error("Unknown viewability criterion.")}},UnitViewabilityObserver.criteria={Core:{name:"Core",ratio:0,time:0},IABsmallAd:{name:"50/1",ratio:.5,time:1e3},IABlargeAd:{name:"30/1",ratio:.3,time:1e3},IABvideo:{name:"50/2",ratio:.5,time:2e3},FBvideo:{name:"50/3",ratio:.5,time:3e3}};;
function PlacementInView(t,e,i){this._init(),this.adapter=t,this.placement=e,this.node=e.getContainer(),this.inViewParent=i,this.outerRectInView=CRect.ZERO,this._lastScrollTime=0,this._isTouchDown=!1,this._autoSwitchObserverRunningState=this._autoSwitchObserverRunningState.bind(this),this.destroy=this.destroy.bind(this),this._onScroll=this._onScroll.bind(this),this._onTouchStart=this._onTouchStart.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this.hacks={wrongBoundingRectWhileScrolling:deviceInfo.os.ios()&&this.placement.isSticky},this.inViewParent||(this._tick=this._tick.bind(this),this._timestepInterval=200,this._lastRunTime=0,this.adapter.on("containerViewableChange",this._autoSwitchObserverRunningState)),e.on("destroyed",this.destroy),this._autoSwitchObserverRunningState(),e.on("shown",this._autoSwitchObserverRunningState),e.on("hidden",this._autoSwitchObserverRunningState),this.hacks.wrongBoundingRectWhileScrolling&&(this.adapter.getTopWindow().addEventListener("scroll",this._onScroll,!0),this.adapter.getTopWindow().addEventListener("touchstart",this._onTouchStart,!0),this.adapter.getTopWindow().addEventListener("touchend",this._onTouchEnd,!0))}inherit(PlacementInView,InViewObject),PlacementInView.prototype._onScroll=function(){this._lastScrollTime=Date.now()},PlacementInView.prototype._onTouchStart=function(){this._isTouchDown=!0},PlacementInView.prototype._onTouchEnd=function(){this._isTouchDown=!1},PlacementInView.prototype._autoSwitchObserverRunningState=function(){var t=this.placement.visible&&this.adapter.containerIsViewable;t&&!this.active?this.start():!t&&this.active&&(this.stop(),this.rectInView=CRect.ZERO,this.outerRectInView=CRect.ZERO,this.areaInView=0,this.emit("rectInViewChanged",this.rectInView),this.emit("outerRectInViewChanged",this.outerRectInView),Logger("InViewObject").debug(this.placement.constructor.name+", rectInViewChanged: "+this.rectInView.toString()),this.emit("areaInViewRatioChanged",this.areaInView),Logger("InViewObject").debug(this.placement.constructor.name+", areaInViewRatioChanged: "+this.areaInView))},PlacementInView.prototype.getNode=function(){return this.placement.getContainer()},PlacementInView.prototype.getOuterRectInView=function(){return this.outerRectInView},PlacementInView.prototype.getParentRect=function(){return this.inViewParent?this.inViewParent.getOuterRectInView():this.adapter.getViewportRect()},PlacementInView.prototype.computeRectInView=function(){var t,e,i,n;this.hacks.wrongBoundingRectWhileScrolling&&(Date.now()-this._lastScrollTime<100||this._isTouchDown)||(t=this.getNode(),n=this.adapter.getPlacementRect(this.placement),t=t?CRect.adopt(t.getBoundingClientRect()):CRect.ZERO,i=this.getParentRect(),n=(i=(e=this.adapter.getPlacementRect(this.placement)).intersect(i)).zero()?CRect.ZERO:i.map(n,t),this._computeMaxPossibleDimensions(e,this.getParentMaxPossDims()),this.rectInView.equals(n)||(this.rectInView=n,this.emit("rectInViewChanged",n),Logger("InViewObject").debug(this.placement.constructor.name+", rectInViewChanged: "+this.rectInView.toString())),this.outerRectInView.equals(i)||(this.outerRectInView=i,this.emit("outerRectInViewChanged",i),Logger("InViewObject").debug(this.placement.constructor.name+", placementRectInViewChanged: "+this.outerRectInView.toString())))},PlacementInView.prototype.destroy=function(){this.hacks.wrongBoundingRectWhileScrolling&&(this.adapter.getTopWindow().removeEventListener("scroll",this._onScroll,!0),this.adapter.getTopWindow().removeEventListener("touchstart",this._onTouchStart,!0),this.adapter.getTopWindow().removeEventListener("touchend",this._onTouchEnd,!0)),this.stop(),this.adapter.off("containerViewableChange",this._autoSwitchObserverRunningState)},PlacementInView.prototype._start=function(){this.inViewParent?this.inViewParent.on("outerRectInViewChanged",this.computeRectInView):this.adapter.Ticker.frame(this._tick,"update")},PlacementInView.prototype._stop=function(){this.inViewParent?this.inViewParent.off("outerRectInViewChanged",this.computeRectInView):this.adapter.Ticker.removeFrame(this._tick,"update")},PlacementInView.prototype._tick=function(){var t=Date.now();t-this._lastRunTime>this._timestepInterval&&(this.computeRectInView(),this._lastRunTime=t)};;
function Tapper(T,m){var C="undefined"!=typeof creative&&creative.adapter||adapter;function w(t){for(var e=t,a=null;1!=e.nodeType;)e=e.parentNode;for(;e&&1==e.nodeType&&e.tagName;){var n=e.tagName.toLowerCase();if(hasClass(e,"touchable")||"a"===n&&e.href||"button"===n||"img"===n||"input"===n&&e.type&&"button"===e.type.toLowerCase()){a=e;break}e=e.parentNode}return a}function k(t,e){t=t.ownerDocument.createEvent("MouseEvents");t.initEvent("tap",!0,!0),e.dispatchEvent(t)}(m=m||C.useNativeClickForTapDetection)&&(attach(T,"click",function(t){t=w(t.target);t&&k(T,t)},!C.nativeClickEmittedOnSwipe),C.useNativeClickForTapDetection)||attach(T,"touchstart",function(t){var a,n,c,o,r,i,u,h,s,d,l,v,p,e,f,g=w(t.target);g&&(c=!1,celtra.iframe()&&(n=(a=function(){var t=C.getTopWindow();return[t.scrollX,t.scrollY,t.innerWidth,t.innerHeight]})(),c=!0),o=t.targetTouches[0].clientX-10,r=t.targetTouches[0].clientX+10,i=t.targetTouches[0].clientY-10,u=t.targetTouches[0].clientY+10,addClass(g,"touched"),l=d=s=h=!1,v=new Date,p=function(t){var e;h||s||(e=t.targetTouches[0].clientX,t=t.targetTouches[0].clientY,h=c&&n.toString()!=a().toString(),((s=!(o<=e&&e<=r&&i<=t&&t<=u))||h?removeClass:addClass)(g,"touched"))},e=function(t){var e;l||(l=!0,detach(T,"touchmove",p,!1),detach(T,"touchend",arguments.callee,!1),hasClass(g,"touched")&&(e=200 "+e+")");this.destroy()}this.state=e},BannerFormat.prototype.destroy=function(){this.adapter.Ticker.removeFrame(this._tick,"update"),BannerFormat.uber.destroy.apply(this)},BannerFormat.prototype._tick=function(){this.placements.banner.root.ownerDocument.defaultView?this.placements.banner._visible&&this.units.banner.updateRxState(this.placements.banner.root):this.destroy()};;
function SDKAdapter(e,t,i,n,r,o,a,s,d,p){function h(e){return this.experiments&&this.experiments.get&&this.experiments.get(e)}function c(e,t){return"1"===t||e&&"treatment"===e.chosenVariant&&"0"!==t}this.runtimeParams=e,this.trackingCenter=t,this.aggregatorTracking=i,this.experiments=n,this.useAsap=c(h("DeferWithAsap"),e._useAsap),this._renderBeforeDomReady=c(h("RenderBeforeDomReady"),e._renderImmediately),this.macros=a,this.perf=p,defer.perf=p,this.ampDetected=!1,this.ampNestingLevel="",this.safeFrameDetected=!1,this.scriptElement=script,this.scriptElement.parentNode.celtra||(this.scriptElement.parentNode.celtra={loaded:!1,viewabilityObservee:null}),this.domApi=this.scriptElement.parentNode.celtra,this.adapterWindow=window,this.tagWindow=this.scriptElement.ownerDocument.defaultView,this.nesting=getWindowNesting(this.tagWindow),this.tagElement=this.scriptElement.parentNode,this.hostElement=this.tagElement,this.storeOpenedOverrideUrls=o,this.urlOpenedOverrideUrls=r,this.urlOpenedUrlAppendage=s,this.clickThroughDestinationUrl=d,this.useNativeClickForTapDetection=!0,this.nativeClickEmittedOnSwipe=deviceInfo.deviceType.desktop()||deviceInfo.os.ios(),this.preventIABFriendlyIFrameBusting=!1,this.providesCloseButton=!1,this.enableCustomStateTransitions=!1,this.adBehavior={interstitial:!1,expandable:!1,expanded:!1,sticky:!1,crossScreenSticky:!1,attachInlinePlacementToViewport:!1,scrollable:!1,subpixelScrollable:!1},this.activeGeometryBaseline={placement:"banner",unit:"banner"},this.isRxAvailable=!1,this.viewabilityMeasurable={viewable00:!1,viewable501:!1},this.canMeasureViewportPlacementGeometry=!1,this.canMeasureViewportPlacementGeometryRelativeToPage=!1,this.canMeasureContainerAreaInViewRatio=!1,this.supportsContainerViewability=!1,this.supportsContainerInitialViewability=!1,this.useFSVP=!0,void 0!==this.runtimeParams.topLayerZIndex&&(t=parseInt(this.runtimeParams.topLayerZIndex,10),!isNaN(t)&&20e.height?"landscape":i():i()},SDKAdapter.prototype.collectAndTrackData=function(e,t){if("function"!=typeof e)throw new Error("The dataCollector param was not a function.");if(void 0===t)throw new Error("The eventName param was not defined.");var i=1e3;defer(function(){try{e(function(e){e.name=t,this.trackingCenter.trackNoLaterThan(e,i)}.bind(this))}catch(e){this.trackingCenter.trackNoLaterThan({name:t,error:e.message+"\n"+e.stack},i)}}.bind(this),void 0,void 0,this.useAsap)},SDKAdapter.prototype._createViewportElement=function(){var e=document.createElement("div");return e.id="viewport",e.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible;",this.tagWindow.document.body.appendChild(e),e},SDKAdapter.prototype.getViewportGeometry=function(e){return getViewportGeometry(this.getTopWindow(),e)},SDKAdapter.prototype._getViewportElement=function(){return this.viewport},SDKAdapter.prototype.listenForExpandErrors=function(){},SDKAdapter.prototype.enableScroll=function(){},SDKAdapter.prototype.disableScroll=function(){};;
function BrowserAdapter(e,t,i){BrowserAdapter.uberConstructor.apply(this,arguments),this.isSingleOccupant=!1,this.hasDeadZones=ios("7"),this.isRxAvailable=!0,this.canOpenUrlInSameWindow=!0,this.on("ready",this.onReadyCallback.bind(this)),this.commentsExtensionsEnabled=1==this.runtimeParams.standalonePreview||1==this.runtimeParams.campaignExplorer,this.isPreview="1"==this.runtimeParams.mobilePreview||"1"==this.runtimeParams.standalonePreview}inherit(BrowserAdapter,SDKAdapter),Object.defineProperty(BrowserAdapter.prototype,"assumeScrollSupported",{get:function(){return this.getTopWindow().document.body.scrollHeight>this.getTopWindow().innerHeight&&!this.nesting.hostileIframe}}),BrowserAdapter.prototype.onReadyCallback=function(){this._setupMouseLeaveObserver(),defer(this.emits("displayed"),void 0,"BrowserAdapter emits displayed on ready",this.useAsap)},BrowserAdapter.prototype._setupMouseLeaveObserver=function(){var o;deviceInfo.deviceType.desktop()||("ontouchstart"in(o=this.getTopWindow())||navigator.msMaxTouchPoints||attach(o.document,"mouseout",function(e){e=e||o.event;var t=o.document.documentElement,i=Math.max(t.clientWidth,o.innerWidth||0),t=Math.max(t.clientHeight,o.innerHeight||0),r=e.clientX||e.pageX,n=e.clientY||e.pageY;e.toElement&&"HTML"!==e.toElement.tagName||!(r<1||i-1t?l():r.requestAnimationFrame(e)}),defer(l,t)},BrowserAdapter.prototype._createContainerViewabilityObserver=function(){var t=this,i=this.getTopWindow().document,r={isSupported:!1,propertyName:"",eventName:"",isVisible:function(){return!this.isSupported||!i[this.propertyName]},init:function(){["webkit","moz","ms",""].forEach(function(e){var t=e?e+"Hidden":"hidden";t in i&&(this.isSupported=!0,this.propertyName=t,this.eventName=e+"visibilitychange")},this)}},e=(r.init(),this.useAsap),n={isViewable:!1,start:function(){r.isVisible()&&defer(o,void 0,"BrowserAdapter observer start",e),r.isSupported&&i.addEventListener(r.eventName,o)},stop:function(){r.isSupported&&i.removeEventListener(r.eventName,o)}},o=function(){var e=this.isViewable;this.isViewable=r.isVisible(),e!=this.isViewable&&t.emit("containerViewableChange",this.isViewable)}.bind(n);return n},BrowserAdapter.prototype._downsizePlacements=function(){for(var e in this.placements)"screen"!==this.placements[e].positioning||this.placements[e].preventDownsizeHack||this.placements[e].setSize(1,1,!0)},BrowserAdapter.prototype._getUnitViewabilityObserver=function(e,t){var i=-1!==["newGeometryWithSampling","newGeometryWithoutSampling"].indexOf(this.experiments.get("UseNewUnitViewabilityLogic")&&this.experiments.get("UseNewUnitViewabilityLogic").chosenVariant),r="IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype;return this._unitViewabilityObserver||(this._unitViewabilityObserver=new UnitViewabilityObserver(this,e,t,i&&r)),this._unitViewabilityObserver},BrowserAdapter.prototype.waitForViewableCore=function(e,t,i){return this._getUnitViewabilityObserver(e,t).waitForViewableCore(i)},BrowserAdapter.prototype.waitForViewableIAB=function(e,t,i){return this._getUnitViewabilityObserver(e,t).waitForViewableIAB(i)},BrowserAdapter.prototype.removeViewabilityListener=function(e,t,i){this._getUnitViewabilityObserver(e,t).removeListener(i)},BrowserAdapter.prototype._getActivePlacementOrUnitGeometry=function(){var e,t=this.placements[this.activeGeometryBaseline.placement];if(!t)return null;t.visible?e=t.getPlacementGeometry():(t.root.style.visibility="hidden",t.root.style.display="block",e=t.getPlacementGeometry(),t.root.style.display="none",t.root.style.visibility="");t=t.creative&&t.creative.unitSizes&&t.creative.unitSizes[this.activeGeometryBaseline.unit];return 0===e.height&&t&&(e.height=t.height),0===e.width&&t&&(e.width=t.width),e},BrowserAdapter.prototype._getWindowForPreviewMessaging=function(){return this.adBehavior.requiresTopWindowParentForPreviewMessaging?this.getTopWindow().parent:this.getTopWindow()},BrowserAdapter.prototype._disableScrollHandler=function(e){-1==["INPUT","TEXTAREA","SELECT"].indexOf(e.target.tagName)&&e.preventDefault()};;
function MobileWebAdapter(e,t,i,n){if(MobileWebAdapter.uberConstructor.apply(this,arguments),this.isMobileWebAdapter=!0,this.isInlineWebPlacement=!(this.isSingleOccupant||this.nesting.hostileIframe||this.nesting.friendlyIframe&&!this.nesting.iabFriendlyIframe),this.muteSoundIfVideoStartedOnTouchStartEvent=android(),this.unitScript=unitScript,this.requiredDeviceType=requiredDeviceType,this.trackingCenter=t,this.aggregatorTracking=i,this.__CELTRA.stickyPresent&&this.runtimeParams.sticky)return t.track({name:"userError",userErrorId:"multipleStickyAds"}),defer(this.dismiss.bind(this));if(this.runtimeParams.sticky&&(this.__CELTRA.stickyPresent=!0),this.hacks.needsConstantFlashing=kindleSilk("1")||/\bHTC.One.S\b/.test(navigator.userAgent),this.hacks.requiresHidingInputsAndLinks=android()&&(/HTC/g.test(navigator.userAgent)||"hiding"==this.runtimeParams.focusableHighlightFix),this.hacks.fixFocusablesHighlighting=android("4.0"),this.hacks.requiresWrappingPlacementWithComments=windows("10"),this.hacks.useDefaultProtocolForSaveCalendar=deviceInfo.os.ios()&&deviceInfo.browser.safari()&&!deviceInfo.browser.facebookApp(),this.providesCloseButton=!1,this.enableCustomStateTransitions=!(/Windowshop/.test(navigator.userAgent)&&kindle()),this.preventIABFriendlyIFrameBusting="1"===this.runtimeParams.preventIFrameBusting&&("undefined"!=typeof BannerFormat||"undefined"!=typeof CrossScreenBannerFormat||"undefined"!=typeof ExpandableBannerFormat||"undefined"!=typeof CrossScreenExpandableFormat),this.nesting.iframe&&!this.nesting.iabFriendlyIframe||(this.viewabilityMeasurable={viewable00:!0,viewable501:this.visibilityApiIsSupported},this.canMeasureViewportPlacementGeometry=!0,this.supportsContainerViewability=!0,this.supportsContainerInitialViewability=!0),this.nesting.iframe&&!this.nesting.iabFriendlyIframe||this.runtimeParams.sticky||(this.canMeasureViewportPlacementGeometryRelativeToPage=!0),this.win=this.tagWindow,this.nesting.iabFriendlyIframe){var r=this.tagWindow;try{for(;r!==r.parent&&getWindowNesting(r.parent).iabFriendlyIframe;)r=r.parent}catch(e){}this.iabWin=r,this.readIABIFrameHeight=function(){var e=this.tagWindow.frameElement,e=e.style.height||e.getAttribute("height")||"0",t=parseInt(e,10),i="%"===e.slice(-1)?"%":"px";return{value:t,unit:i,toString:function(){return t+i}}},this.preventIABFriendlyIFrameBusting||(this.win=this.iabWin.parent,this.hostElement=this.win.document.createElement("div"),this.iabWin.frameElement.parentNode.insertBefore(this.hostElement,this.iabWin.frameElement.nextSibling))}addClass(this.hostElement,"celtra-ad-inline-host"),this.hacks.requiresWrappingPlacementWithComments&&(this.hostElement.parentNode.insertBefore(this.win.document.createComment("ie10hack"),this.hostElement),this.hostElement.parentNode.insertBefore(this.win.document.createComment("ie10hack"),this.hostElement.nextSibling)),this._parentPageHighlightStyle=null,this._downsizePlacements=this._downsizePlacements.bind(this),this._updatePlacements=this._updatePlacements.bind(this),this._topListenerAttached=!1,this._hasBeenViewable=!1,this.useFSVP=!(this.nesting.hostileIframe&&!deviceInfo.os.ios()&&!this.adBehavior.interstitial),this.restoreScrollOnCollapse=!deviceInfo.deviceType.desktop(),this.hostElement.activeAdapter||((this.hostElement.activeAdapter=this).supportsSticky=!0,this.on("documentReady",function(){this.hacks.needsConstantFlashing&&this.getTopWindow().setInterval(function(){for(var e in this.placements)this.placements[e]._flash()}.bind(this),200),this.adBehavior.adWillHideIframe||this.preventIABFriendlyIFrameBusting||this.hideIABFriendlyIframe(),this.useFSVP&&"undefined"!=typeof FullscreenVideoPlayer&&FullscreenVideoPlayer.init({baseUrl:(this.runtimeParams.secure?urls.staticUrl:urls.insecureStaticUrl)+"runner/FullscreenVideoPlayer/"}),this.emit("ready")}.bind(this)),this.trackViewableAreaRatio=this.trackViewableAreaRatio.bind(this),this._viewableAreaRatio=0,this.useFixedPositioningForInterstitial=deviceInfo.os.ios()||deviceInfo.deviceType.desktop())}inherit(MobileWebAdapter,BrowserAdapter),MobileWebAdapter.prototype.hideIABFriendlyIframe=function(){this.adBehavior.interstitial||this.nesting.iabFriendlyIframe&&(this.iabWin.frameElement.style.display="none")},MobileWebAdapter.prototype.setMinimumSize=function(e,t){this.hostElement.style.minWidth=e+"px",this.runtimeParams.sticky||(this.hostElement.style.minHeight=t+"px")},MobileWebAdapter.prototype.setIABFriendlyIframeSize=function(e,t,i){this.nesting.iabFriendlyIframe&&this.iabWin&&this.preventIABFriendlyIFrameBusting&&(null!==e&&(this.iabWin.frameElement.style.minWidth=e+"px"),null!==t&&(this.iabWin.frameElement.style.minHeight=t+"px"),this.iabWin.frameElement.style.width="100%",e=this.readIABIFrameHeight(),i&&"px"===e.unit&&e.value>=t?this.iabWin.frameElement.style.height=e.toString():this.iabWin.frameElement.style.height="100%")},MobileWebAdapter.prototype._createViewportListener=function(){var e;return android()||kindleSilk()?((e=new ViewportObserver(this.getTopWindow())).on("keyboardShown",this._onKeyboardShown),e.on("keyboardHidden",this._onKeyboardHidden),this.on("_rawOrientationChange",this._downsizePlacements)):(e=MobileWebAdapter.uber._createViewportListener.apply(this),ios("8",null)&&(e._resizeHandler=deferred(e._resizeHandler),e._scrollHandler=deferred(e._scrollHandler))),e},MobileWebAdapter.prototype.createPlacement=function(e,t){var i,n,r={trackingCenter:this.trackingCenter,aggregatorTracking:this.aggregatorTracking,experiments:this.experiments,adapter:this,console:console,runtimeParams:this.runtimeParams,celtraDeviceInfoRuntimeParams:this.runtimeParams.deviceInfo,nextFrame:this.nextFrame,cancelFrame:this.cancelFrame,Ticker:this.Ticker,macros:this.macros,perf:this.perf},s={urls:urls,urlOpenedOverrideUrls:this.urlOpenedOverrideUrls,storeOpenedOverrideUrls:this.storeOpenedOverrideUrls,urlOpenedUrlAppendage:this.urlOpenedUrlAppendage,clickThroughDestinationUrl:this.clickThroughDestinationUrl},a=null;switch(this._initialInnerDims={height:adapter.getTopWindow().innerHeight,width:adapter.getTopWindow().innerWidth},e.type){case"unit":a=-1<["top","bottom"].indexOf(runtimeParams.sticky)&&"static"==e.positioning?(e.positioning="screen",e.attachment="body",i={stickiness:runtimeParams.sticky,showDismissButton:"1"==runtimeParams.showDismissButton||"1"==runtimeParams.showStickyCloseButton,baseUrl:runtimeParams.secure?urls.staticUrl:urls.insecureStaticUrl,dismissCallback:function(){this.placements.banner.creative.units.banner.trackCreativeDismissed(),this.dismiss()}.bind(this)},new StickyPlacement(e.positioning,this.unitScript,r,s,i)):new IframePlacement(e.positioning,this.unitScript,r,s);break;case"layer":a=new DivPlacement(e.positioning);break;default:throw new Error("I can't do that, Dave.")}a.root&&a.root.parentNode||(n="node"==e.attachment?e.parentNode:"placement"==e.attachment?e.placement.root:"inline"==e.attachment?this.isInlineWebPlacement||!this.adBehavior.attachInlinePlacementToViewport?this.hostElement:(this.viewport||(this.viewport=this._createViewportElement()),this.viewport):(this.adBehavior.interstitial&&this.nesting.friendlyIframe&&!this.nesting.iabFriendlyIframe&&"1"==this.runtimeParams._nobust?this.tagWindow:this.getTopWindow()).document.body,a.attachTo(n,function(){defer(function(){t&&t(a),a instanceof IframePlacement&&this._reportingObserver&&this._reportingObserver.createChildObserverAndStartObserving(a.getContentWindow())}.bind(this),void 0,void 0,o)}.bind(this))),(ios()||kindleSilk())&&a.once("populated",function(){!(a instanceof IframePlacement)&&(a instanceof IframePlacement||this._topListenerAttached)||(a.getContainer().ownerDocument.addEventListener("focus",this._onKeyboardShown,!0),a.getContainer().ownerDocument.addEventListener("blur",this._onKeyboardHidden,!0),this._topListenerAttached=!0)}.bind(this));var o=this.useAsap},MobileWebAdapter.prototype.getTopWindow=function(){return this.nesting.hostileIframe?this.tagWindow:SDKAdapter.prototype.getTopWindow.apply(this)},MobileWebAdapter.prototype.expand=function(e,t){this._stopAllMedia(),this.nesting.hostileIframe?(this._tryOpenInNewWindow(this.placements.banner.creative.wrapRedirectPageUrl(this.getModalUrl())),e&&e()):(this.animateExpansion=""!=t.animation&&this.enableCustomStateTransitions,this._preExpandScroll={x:this.win.scrollX,y:this.win.scrollY},this.waitForHook("beforeExpand",function(){this._enableClickShield(),defer(function(){this.emit("stateChange","expanded")}.bind(this)),e&&e()}.bind(this)))},MobileWebAdapter.prototype.collapse=function(e){this._stopAllMedia(),this.waitForHook("beforeCollapse",function(){this.restoreScrollOnCollapse&&this._preExpandScroll&&this.win.scrollTo(this._preExpandScroll.x,this._preExpandScroll.y),this._enableClickShield(),defer(function(){this.emit("stateChange","default")}.bind(this)),e&&e()}.bind(this))},MobileWebAdapter.prototype.dismiss=function(e,t){this._stopAllMedia();var i={};t&&Object.keys(t).forEach(function(e){i[e]=t[e]}),this.waitForHook("beforeDismiss",function(){this.Ticker.stop(),this._stopObservingEnvironment(),this.emit("stateChange","dismissed"),this.trackingCenter.flush(),this.hostElement&&this.hostElement.parentNode&&(this._enableClickShield(),this.hostElement.parentNode.removeChild(this.hostElement)),this.__CELTRA.stickyPresent&&(this.runtimeParams.sticky||this.adBehavior.sticky)&&(this.__CELTRA.stickyPresent=!1),(e||noop)()}.bind(this),i)},MobileWebAdapter.prototype.resize=function(e,t){var i={};t&&Object.keys(t).forEach(function(e){i[e]=t[e]}),this._enableClickShield(),this.waitForHook("beforeResize",e,i)},MobileWebAdapter.prototype._onReportReceived=function(e){switch(e){case"heavyAdCPUIntervention":case"heavyAdNetworkIntervention":this.isPreview?this._getWindowForPreviewMessaging().postMessage({name:"heavyAdIntervention",type:e,adBehavior:{placementGeometry:this._getActivePlacementOrUnitGeometry(),positioning:this.adBehavior.interstitial?"interstitial":this.runtimeParams.sticky||"inline"}},"*"):(this.trackingCenter.track({name:"userError",userErrorId:e}),this.trackingCenter.flushWithBeacon()),this.dismiss();break;default:console.warn("Received unknown report!")}},MobileWebAdapter.prototype.playVideoInPlayer=function(e,t,i){this.useFSVP?FullscreenVideoPlayer.play(e,t,i):(this.openBrowserSameWindowInHostileIFrame(t.file.getUrl()),i(!0))},MobileWebAdapter.prototype.callPhone=function(e){var t;/Chrome/.test(navigator.userAgent)||deviceInfo.os.ios("9",null)?((t=document.createElement("a")).href="tel:"+encodeURIComponent(e),t.addEventListener("click",function(e){t.parentNode.removeChild(t)}),deviceInfo.browser.safari()&&this.nesting.hostileIframe&&(t.target="_top"),this.getTopWindow().document.body.appendChild(t),t.click()):MobileWebAdapter.uber.callPhone.apply(this,arguments)},MobileWebAdapter.prototype._openInSameWindow=function(e){this.nesting.hostileIframe?this.openBrowserSameWindowInHostileIFrame(e):this.getTopWindow().location.href=e},MobileWebAdapter.prototype.getApp=function(e){this.openBrowser(e)},MobileWebAdapter.prototype.canSaveImage=function(){return!(!desktop()&&!android())},MobileWebAdapter.prototype.saveImage=function(e,t,i){this.openBrowser(e+"?transform=download&name="+t),i()},MobileWebAdapter.prototype.getVideoCapabilities=function(){return{videoElement:this.scriptElement.getRootNode().getElementById("celtra-video-slot")}},MobileWebAdapter.prototype.startObscuringContent=function(){this.hacks.fixFocusablesHighlighting&&(this._parentPageHighlightStyle&&this.stopObscuringContent(),this._parentPageHighlightStyle=this.getTopWindow().document.createElement("style"),this._parentPageHighlightStyle.textContent="a, input, textarea, select { -webkit-tap-highlight-color: rgba(255, 0, 0, 0) !important; }input, textarea, select { visibility: hidden !important; }",this.getTopWindow().document.querySelector("head").appendChild(this._parentPageHighlightStyle))},MobileWebAdapter.prototype.stopObscuringContent=function(){this.hacks.fixFocusablesHighlighting&&(this._parentPageHighlightStyle&&this._parentPageHighlightStyle.parentNode&&this._parentPageHighlightStyle.parentNode.removeChild(this._parentPageHighlightStyle),this._parentPageHighlightStyle=null)},MobileWebAdapter.prototype._stopObservingEnvironment=function(){this._unitViewabilityObserver&&this._unitViewabilityObserver.stop(),MobileWebAdapter.uber._stopObservingEnvironment.apply(this,arguments)},MobileWebAdapter.prototype.waitForViewableIAB=function(e,t,i){this._getUnitViewabilityObserver(e,t).waitForViewableIAB(i),this.experiments.get("TrackViewableAreaChange")&&this._setupViewableAreaChangeObserver()},MobileWebAdapter.prototype.trackViewableAreaRatio=function(){var e={name:"viewableAreaRatio",ratio:this._viewableAreaRatio};this.trackingCenter.track(e)},MobileWebAdapter.prototype._setupViewableAreaChangeObserver=function(){var i=!1,n=this.getTopWindow(),r=!0,s=0,a=0,o=0,h=function(){var e={name:"largestViewableAreaRatio",ratio:a=s};this.trackingCenter.track(e)}.bind(this),e=function(e,t){this._viewableAreaRatio=e,s=this.heightCutoff)),this._keyboardShown}.bind(this);null!==i.width||e()?i.width==t.width&&(i.height-this.heightCutoff>t.height?(this.keyboardShown=!0,this.emit("keyboardShown")):(this.keyboardShown=!1,this.emit("keyboardHidden")),this._resizeCallback(),this._viewportUpdateCallback(),this.updateDimensions()):(this._resizeCallback(),this._viewportUpdateCallback())},ViewportObserver.prototype.updateDimensions=function(){var t=this.dimensions[this.orientation],i=this.getViewportGeometry();t.left=i.left,t.top=i.top,t.width=(null===t.width?i:t).width,t.height=Math.max(i.height,t.height)},ViewportObserver.prototype.getViewportGeometry=function(){return getViewportGeometry(this.win,"win")};;
Logger.initFromRuntimeParams(runtimeParams);
var urls = {"creativeUrl":"https://ads.celtra.com/compiled/24f26b4c/","apiUrl":"https://hub.celtra.com/api/","cachedApiUrl":"https://cache-ssl.celtra.com/api/","staticUrl":"https://cache-ssl.celtra.com/api/static/vb06cfc8c62/","qrUrl":"https://qr.celtra.com/api/","insecureCreativeUrl":"http://ads.celtra.com/compiled/24f26b4c/","insecureApiUrl":"http://hub.celtra.com/api/","insecureCachedApiUrl":"http://cache.celtra.com/api/","insecureStaticUrl":"http://cache.celtra.com/api/static/vb06cfc8c62/","insecureQrUrl":"http://qr.celtra.com/api/","trackingUrl":"https://track.celtra.com/","insecureTrackingUrl":"http://track.celtra.com/","geoUrl":"https://geo.celtra.com/","insecureGeoUrl":"http://geo.celtra.com/","customAudiencesUrl":"https://audiences.celtra.com","insecureCustomAudiencesUrl":"http://audiences.celtra.com","shareUrl":"https://hub-user.celtra.com/share/","insecureShareUrl":"http://hub-user.celtra.com/share/"};
urls.resourceUrl = runtimeParams.secure ? urls.staticUrl : urls.insecureStaticUrl;
var shouldBatchTrackers = !!'';
var trackingCenter = new TrackingCenter(
runtimeParams.sessionId,
runtimeParams.accountId,
runtimeParams.purpose,
runtimeParams.secure ? urls.trackingUrl : urls.insecureTrackingUrl,
trackers,
runtimeParams._batchTrackers === '1' || shouldBatchTrackers
);
if (runtimeParams.fallbackSdkUsed === '1') {
trackingCenter.track({
name : 'fallbackSdkUsed',
sdk : 'MobileWeb'
});
}
var aggregatorTracking = new AggregatorTracking(trackingCenter);
var experiments = new Experiments(runtimeParams.variantChoices, trackingCenter);
var trackingLoadingTimesExperiment = experiments.get('TrackingLoadingTimes');
var perf = new PerformanceTracker(trackingCenter, experiments);
if (runtimeParams.clientTimestamp) {
// Do it manually instead of using var p = perf.start() + p.end() pattern because we want to log
// times from before PerformanceTracker is available
perf.collect({
name: 'redirectDownload',
type: 'interval',
id: null,
startTime: parseFloat(runtimeParams.clientTimestamp) * 1000,
endTime: runtimeParams.redirectJsClientTimestamp * 1000,
args: []
});
}
perf.collect({
name: 'payloadDownload',
type: 'interval',
id: null,
startTime: runtimeParams.redirectJsClientTimestamp * 1000,
endTime: runtimeParams.payloadJsClientTimestamp * 1000,
args: []
});
var unitName = 'banner';
var requiredDeviceType = 'Phone';
perf.collect({
name: 'payLoadDownloadedToAdapter.new',
type: 'interval',
id: null,
startTime: runtimeParams.payloadJsClientTimestamp * 1000,
endTime: Date.now(),
args: []
});
var perfAdapterNew = perf.start('Adapter.new');
var adapter = new MobileWebAdapter(runtimeParams, trackingCenter, aggregatorTracking, experiments, urlOpenedOverrideUrls, storeOpenedOverrideUrls, macros, urlOpenedUrlAppendage, clickThroughDestinationUrl, perf);
perfAdapterNew.end();
trackingCenter.windowForPixels = adapter.getTopWindow();
var perfFormatNew = perf.start('Format.new');
var format = new BannerFormat(adapter, {"banner":{"size":null,"layouts":[{"orientation":"independent","minSize":{"width":0,"height":0},"unitSize":{"width":300,"height":250},"designTimeSize":{"width":300,"height":250},"unitAlignment":{"horizontal":"center","vertical":"center"}}]}});
perfFormatNew.end();