window.aps=window.aps||{}; if(aps.cmd){throw new Error("loadAds.js already loaded") }aps.cfg=aps.cfg||{}; aps.cfg.version="23.11.11.1"; console.log("juice "+aps.cfg.version);(function(){aps.sitesWithoutCallback=["www.greenstate.com","datebook.sfchronicle.com","education.seattlepi.com","healthyeating.sfgate.com","homeguides.sfgate.com","livehealthy.chron.com","preview.houstonchronicle.com","pyme.lavoztx.com","smallbusiness.chron.com","work.chron.com","www.beaumontenterprise.com","www.bigrapidsnews.com","www.chron.com","www.countytimes.com","www.ctinsider.com","www.ctpost.com","www.darientimes.com","www.expressnews.com","www.greenwichtime.com","www.houstonchronicle.com","www.lakecountystar.com","www.lmtonline.com","www.manisteenews.com","www.michigansthumb.com","www.middletownpress.com","www.milfordmirror.com","www.mrt.com","www.myjournalcourier.com","www.myplainview.com","www.mysanantonio.com","www.ncadvertiser.com","www.newstimes.com","www.nhregister.com","www.ourmidland.com","www.recordpatriot.com","www.registercitizen.com","www.seattlepi.com","www.sfchronicle.com","www.sfgate.com","www.sheltonherald.com","www.stamfordadvocate.com","www.theheraldreview.com","www.thehour.com","www.theintelligencer.com","www.theridgefieldpress.com","www.thetelegraph.com","www.timesunion.com","www.trumbulltimes.com","www.yourconroenews.com","www.wiltonbulletin.com"]; ["m.","s.","ftp.","origin."].forEach(function(a){if(document.location.hostname.startsWith(a)){var b=document.location.hostname.replace(a,"www."); if(aps.sitesWithoutCallback.includes(b)){aps.sitesWithoutCallback.push(document.location.hostname) }}}); window.debugSGA=window.debugSGA||false; window.APSpageUrl=window.APSpageUrl||""; window.devices={DESKTOP:1,MOBILE:2,TABLET:3}; window.prebid_source={CLIENT:1,SERVER:2,SERVER_COMPATIBLE:3}; window.sizeLimitation={NONE:0,LOOSE:1,STRICT:2}; aps.cfg.host=document.location.hostname||window.location.hostname; aps.cfg.subdom=aps.cfg.host.split("."); aps.cfg.subdom.length-=2; aps.cfg.begin=new Date().valueOf(); aps.cfg.logToConsole=aps.cfg.logToConsole||false; aps.cfg.allAds=[]; aps.cfg.is={}; aps.cfg.multi={}; aps.cfg.multiAds=[]; aps.cmd=[]; aps.juiceLog=[]; aps.events=[]; aps.event={}; aps.logtype={}; aps.implementSRA=true; aps.o={}; aps.fn=aps.fn||{}; aps.cfg.leafsSites=["education.seattlepi.com","healthyeating.sfgate.com","homeguides.sfgate.com","livehealthy.chron.com","pyme.lavoztx.com","smallbusiness.chron.com","work.chron.com"]; aps.cfg.inFrame=window!=top.window; aps.cfg.networkCode="36117602"; window.JuicePageUrl=document.location.href.replace("/?","?").replace("%3F","?").replace("%3D","=").replace("%26","&"); window.googletag=window.googletag||{}; googletag.cmd=googletag.cmd||[]; window.pbjs=window.pbjs||{}; pbjs.que=pbjs.que||[]; pbjs.bidderSettings=pbjs.bidderSettings||{}; window.HDN=window.HDN||{}; HDN.dataLayer=HDN.dataLayer||{}; HDN.dataLayer.ads=HDN.dataLayer.ads||{}; HDN.dataLayer.content=HDN.dataLayer.content||{}; HDN.dataLayer.href=HDN.dataLayer.href||{}; HDN.dataLayer.identity=HDN.dataLayer.identity||{}; HDN.dataLayer.presentation=HDN.dataLayer.presentation||{}; HDN.dataLayer.sharing=HDN.dataLayer.sharing||{}; HDN.dataLayer.source=HDN.dataLayer.source||{}; HDN.dataLayer.paywall=HDN.dataLayer.paywall||{}; window.loadAd_UrlLocation=window.loadAd_UrlLocation||"https://aps.hearstnp.com/" })();(function(){aps.o.kvp=function(a){this.key=a; this.value=[] }; aps.o.baseAd=function(a,e,b,d,c){this.code=a; this.width=e; this.height=b; this.sizeMappings=d; this.kvps=c; if(aps.cfg.allAds){aps.cfg.allAds[a]=this }}; aps.o.gamAd=function(a,h,c,g,e){this.code=a; this.width=h; this.height=c; this.sizeMappings=g; this.lowerCode=this.code.toLowerCase(); aps.fn.checkMultiType=function(i){var j=i.code.split("-")[0]; if(!aps.cfg.multiAds[j]){i.multiAd=false; i.multiType=null }else{i.multiAd=true; i.multiType=j }i.MultiCalled=false; aps.cfg.multi.enabled=true }(this); if(!aps.fn.toBeDisplayed(this)){aps.fn.logSkip(this.code,"will not show on this device"); this.exclude=true }if(!aps.fn.shouldPlaceAd(a)){aps.fn.logSkip(this.code,"excluded by query string"); this.exclude=true }if(!aps.fn.filterRevenueProfileAds(this.code)&&!this.multiAd){aps.fn.logSkip(this.code,"not included in revenueProfile"); this.exclude=true }if(!this.exclude){this.a9={}; this.a9.bids=[]; this.pb={}; this.pb.bids=[]; this.gam=null; this.rm=false; this.kvps=e||[]; this.interstitial=(this.code=="GO300"||(aps.cfg.page.device==devices.MOBILE&&this.code=="S300"))?true:false; this.exclude=false; this.state=null; this.video=(this.lowerCode.indexOf("video")>-1)?true:false; this.companion_units=false; this.doNotRefresh=(this.code=="Crown"||this.code=="exit"||this.code.startsWith("SSHOW"))?true:false; this.viewability=-1; this.refreshable=false; this.impressionViewable=false; this.advertiserId=null; this.advertiser=null; this.lineitemId=null; this.creativeId=null; this.isEmpty=null; this.position=null; this.renderedSize=null; this.googleFrame=null; this.isBounceX=false; this.isDynamic=false; this.isLoading=false; this.mediaType="banner"; this.supportsNative=this.code.startsWith("NTV")?true:false; this.renderCount=1; this.renderedAt=null; this.viewableAt=null; this.sizes=aps.fn.setAdSize(this); this.stringSizes=[]; this.scrollDepth=0; if(aps.cfg.is.leafsSite){var f=this.code.split("-"); this.scrollDepth=(f.length==1)?0:f[1] }this.getPage=function(){return aps.cfg.page.allPages[this.scrollDepth] }; this.getDataLayerInterstitial=function(i){if(!aps.cfg.dfp.dataLayerInterstials){var j=""; try{j=HDN.dataLayer.revenueProfiles.profiles.nonsub.interstitials.value }catch(k){}aps.cfg.dfp.dataLayerInterstials=j.split(",")||[] }if(["BGS_REC_IN","EEinsert"].includes(i.code)||aps.cfg.dfp.dataLayerInterstials.indexOf(i.code)>-1){i.interstitial=true; i.refreshable=true; i.impressionViewable=true }}(this); for(var d=0; d-1){return }aps.fn.logInfo("*SKIP "+aps.fn.fixLen(adcode,10)+" "+reason); aps.alreadyLogged.push(adcode+":"+reason) }; aps.fn.domLoaded=function(){aps.fn.setPerformanceMetrics("DomLoaded","DomLoaded"); aps.cfg.domIsLoaded=true; aps.fireEvent(aps.event.on_dom_loaded) }; aps.fn.dumpLogWindow=function(){var logs=aps.juiceLog; var html=""; for(var i=0; i'+time+" : "+logs[i].m+""; html+=msg }var w=window.open("","wnd"); w.document.body.innerHTML=html }; aps.fn.formatDateTime=function(timeStamp){var h=(timeStamp.getHours()<10?"0":"")+timeStamp.getHours(); var m=(timeStamp.getMinutes()<10?"0":"")+timeStamp.getMinutes(); var s=(timeStamp.getSeconds()<10?"0":"")+timeStamp.getSeconds(); var ms=timeStamp.getMilliseconds(); return h+":"+m+":"+s+": "+ms }; aps.fn.getCookie=function(cname){var name=cname+"="; var ca=document.cookie.split(";"); for(var i=0; i-1){aps.fn.logSkip(ad.code,"is in do not serve array"); return sizes }ad.sizeMappings=ad.sizeMappings||[]; for(var j=0; japs.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){var adSize=map[1]+"x"+map[2]; if(availables.indexOf(adSize)>-1){sizes.push([parseInt(map[1]),parseInt(map[2])]) }}}return sizes }; aps.fn.getBlogOmniType=function(){var abOmniPagename; var abOmniChannel; var abOmniHier1; var abOmniServer=aps.cfg.host; var abOmniSSL1; var abOmniSSL2; var abOmniSSL3; var abOmniSSL4; var abOmniBlogType; var abOmniTitle=""; var abOmniID=""; var abOmniContentType="Blogs"; var abOmniAuthor=""; var abOmniQuery=""; var abOmniDomain; var abOmniBlogName=""; var abOmniHeadline=""; var abOmniFullURL=document.URL.toLowerCase(); var abOmniBlobUX=""; var abBlogCat=new Object; abBlogCat.SuperCategory=""; abBlogCat.Category=""; abBlogCat.AuthorType="reader"; abBlogCat.Usage="blog"; abBlogCat.Section=""; abBlogCat.Voice=""; var abStrRelativePath; var abStrPageURL=""; var abStrBlogPath; var abStrPagePath; var abBoolIs404=false; this.toProperCase=function toProperCase(pc){if(pc!="undefined"){if(pc.length>1){return pc.toLowerCase().replace(/^(.)|\s(.)/g,function($1){return $1.toUpperCase() }) }}}; if(typeof(omni_blogID)!="undefined"){abOmniID=omni_blogID }if(typeof(omni_blogauthor)!="undefined"){abOmniAuthor=toProperCase(omni_blogauthor) }if(typeof(omni_blogauthortype)!="undefined"){abBlogCat.AuthorType=omni_blogauthortype }if(typeof(omni_blogposttitle)!="undefined"){abBoolIs404=(omni_blogposttitle.toLowerCase()=="page not found"); abOmniTitle=omni_blogposttitle; if(abOmniTitle.charAt(abOmniTitle.length-1)==" "){abOmniTitle=abOmniTitle.substr(0,abOmniTitle.length-1) }}if(typeof(omni_blogname)!="undefined"){abOmniBlogName=omni_blogname }if(typeof(omni_blogcategory2)!="undefined"){abBlogCat.Category=omni_blogcategory2 }if(abBlogCat.Category.length>0){if(typeof(omni_blogcategory)!="undefined"){abBlogCat.SuperCategory=omni_blogcategory }}else{if(typeof(omni_blogcategory)!="undefined"){abBlogCat.Category=omni_blogcategory }}if(typeof(omni_blogusage)!="undefined"){abBlogCat.Usage=omni_blogusage }if(typeof(omni_section)!="undefined"){abBlogCat.Section=omni_section }if(typeof(omni_voices)!="undefined"){abBlogCat.Voice=omni_voices }this.abParseURL=function(){var strFullURL=abOmniFullURL; if(strFullURL.indexOf("#")>-1){strFullURL=strFullURL.split("#")[0] }var intQStart=strFullURL.indexOf("?")+1; var intRelPathStart=strFullURL.indexOf(".com")+5; abOmniDomain=strFullURL.substr(0,intRelPathStart); if(intQStart>0){abOmniQuery=strFullURL.substring(intQStart); abStrRelativePath=strFullURL.substring(0,intQStart-1) }else{abStrRelativePath=strFullURL }abStrPageURL=abStrRelativePath; abStrRelativePath=abStrRelativePath.substr(intRelPathStart); if(abStrRelativePath.charAt(abStrRelativePath.length-1)=="/"){abStrRelativePath=abStrRelativePath.substr(0,abStrRelativePath.length-1) }var arrayTemp=new Array(); arrayTemp=abStrRelativePath.split("/"); abStrBlogPath=arrayTemp[0]; abStrPagePath=arrayTemp[arrayTemp.length-1]; if(abStrBlogPath==abStrPagePath){abStrPagePath="index" }if(top.document.location.hostname=="insidescoopsf.sfgate.com"){abStrBlogPath="insidescoop" }return abStrBlogPath+":"+abStrPagePath }; this.abAssignSections=function(){if(abBlogCat.SuperCategory.length>0){abOmniChannel=abBlogCat.SuperCategory; abOmniSSL1=abBlogCat.SuperCategory; abOmniSSL2=abOmniSSL1+":"+abBlogCat.Category; abOmniSSL3=abOmniSSL2+":blogs"; abOmniSSL4=abOmniSSL3+":"+abOmniBlogName.toLowerCase() }else{abOmniChannel=abBlogCat.Category; abOmniSSL1=abBlogCat.Category; abOmniSSL2=abOmniSSL1+":blogs"; abOmniSSL3=abOmniSSL2+":"+abOmniBlogName.toLowerCase(); abOmniSSL4=abOmniSSL3; if(abBlogCat.Voice.length>0){abOmniSSL4=abOmniSSL4+":"+abBlogCat.Voice.toLowerCase() }}abOmniHier1=abOmniSSL4.replace(/:/g,",") }; abOmniPagename="Blogs-"+abParseURL(); if(abBlogCat.Category==""){abCategorizeBlog(abStrBlogPath,abBlogCat) }abAssignSections(); if(abOmniTitle==""||abOmniTitle==abOmniBlogName){abOmniTitle="Blog index page" }if(abBlogCat.Section.length>0){abOmniBlogName=abOmniBlogName+":"+abBlogCat.Section }abOmniTitle=abOmniBlogName+":"+abOmniTitle; abOmniID=abOmniBlogName+"--"+abOmniID; abOmniBlogType=abBlogCat.AuthorType; abOmniBlogName=abOmniBlogName+"("+abBlogCat.AuthorType+")"; abOmniTitle=abOmniTitle+"("+abBlogCat.AuthorType+")"; abOmniTitle=abOmniTitle.replace(/'/g,""); abOmniHeadline=abOmniTitle; if(abOmniAuthor){if(abOmniAuthor.indexOf(",")!=-1){abOmniAuthor=abOmniAuthor.substring(0,abOmniAuthor.indexOf(",")) }}if(abBoolIs404){return"undefined" }else{return abOmniContentType }}; aps.fn.getDictionnaryKey=function(dictionnary,value,destination){var BreakException={}; var retValue=destination; try{Object.entries(dictionnary).forEach(function(line){if(line[1].includes(value)){retValue=line[0]; throw BreakException }}) }catch(e){if(e!==BreakException){throw e }}return retValue }; aps.fn.toBeDisplayed=function(ad){var willDisplay=false; var widthfound=30000; for(var j=0; japs.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){if(parseInt(map[1])>0&&parseInt(map[2])>0){willDisplay=true }}}return willDisplay }; aps.fn.getQueryParameterByName=function(key){if(aps.qeueryStringObj==null){aps.qeueryStringObj=aps.fn.queryStringToJSON() }var qobj=aps.qeueryStringObj; var keyToUse=key.replace("[]",""); if(!qobj.hasOwnProperty(keyToUse)){return null }if(key.indexOf("[]")==-1){return qobj[keyToUse] }if(typeof qobj[keyToUse]==="string"){var retval=[]; retval.push(qobj[keyToUse]); return retval }return qobj[keyToUse] }; aps.fn.queryStringToJSON=function(){var str=location.search.slice(1); var pairs=str.split("&"); var result={}; pairs.forEach(function(pair){pair=pair.split("="); var name=pair[0]; var value=pair[1]; if(name.length){if(result[name]!==undefined){if(!result[name].push){result[name]=[result[name]] }result[name].push(value||"") }else{result[name]=value||"" }}}); return(result) }; aps.fn.desktopOrMobile=function(desktopValue,mobileValue){return(aps.cfg.bid.current_device==devices.DESKTOP)?desktopValue:mobileValue }; aps.fn.addPageKvp=function(key,value,overwrite){aps.cfg.page.checkPage(); aps.cfg.page.current.addPageKvp(key,value,overwrite) }; aps.fn.getFilteredHref=function(href){var loc=href||document.location.href; return loc.replace("https://","").replace("http://","").replace("%3F","?").replace("%3D","=").replace("%26","&").split("#")[0].substring(0,300)||"" }; aps.fn.insertScript=function(url,async,type,id){var a=document.createElement("script"); a.src=url; if(type){a.type=type }if(id){a.id=id }a.async=async; var tgt=document.getElementsByTagName("script")[0]; tgt.parentNode.insertBefore(a,tgt) }; aps.fn.readRevenueProfile=function(){aps.cfg.revenueProfile=[]; try{if(aps.cfg.is.platypus||HDN.dataLayer.content.designTemplate.indexOf("dynamic_two_column.tpl")>-1){var revProfile=Object.entries(HDN.dataLayer.revenueProfiles.profiles); for(var rp in revProfile){var subscriptions=revProfile[rp][1]; Object.entries(subscriptions).forEach(function(obj){if(obj[0].indexOf("column")==0){var ads=obj[1]; Object.entries(obj[1]).forEach(function(adtype){if(adtype[1].render){aps.cfg.revenueProfile.push(adtype[1].id) }}) }}) }if(aps.cfg.page.current.domain=="timesunion.com"){aps.cfg.revenueProfile.push("LNlogo") }if(aps.cfg.revenueProfile.includes("Crown")&&aps.cfg.useExit){aps.cfg.revenueProfile.push("exit") }if(aps.cfg.revenueProfile.length==0){aps.cfg.serveAds=false }}}catch(e){}}; aps.fn.filterRevenueProfileAds=function(code){if(typeof aps.cfg.revenueProfile=="undefined"){aps.fn.readRevenueProfile() }if(aps.cfg.revenueProfile.length>0&&aps.cfg.revenueProfile.indexOf(code)==-1){return false }else{return true }}; aps.fn.isValidBid=function(adDef,bidder,wrapper){aps.cfg.bid.isValid=aps.cfg.bid.isValid||[]; var encode=adDef.code+bidder+wrapper; if(aps.cfg.bid.isValid[encode]!=undefined){return aps.cfg.bid.isValid[encode] }aps.cfg.bid.isValid[encode]=true; aps.cfg.bid.excludedBids.forEach(function(rule){try{if(eval(rule[0])){aps.fn.logSkip(adDef.code,rule[1]); aps.cfg.bid.isValid[encode]=false }}catch(e){return false }}); return aps.cfg.bid.isValid[encode] }; aps.fn.shouldRunThirdParty=function(modulecode){return true }; aps.fn.stripAndPreserveQueryStringVars=function(qstring,preserveList){if(typeof(qstring)=="undefined"){return"" }var pairs=qstring.split("&"); var result=[]; pairs.forEach(function(pair){pair=pair.split("="); if(preserveList.indexOf(pair[0])!=-1){result.push(pair[0]+"="+pair[1]) }}); if(result.length>0){return"?"+result.join("&") }return"" }; aps.fn.setPageTargettedUrl=function(page,kvpName,fullUrl,preserveQueryParms){var urlPieces=fullUrl.split("?"); var kvpUrl=""; if(preserveQueryParms.length==0){kvpUrl=urlPieces[0] }else{kvpUrl=urlPieces[0]+aps.fn.stripAndPreserveQueryStringVars(urlPieces[1],preserveQueryParms) }page.addPageKvp(kvpName,kvpUrl) }; aps.fn.setPrebidDefault=function(){return{count:0,hasNative:false,hasVideo:false,isPositionless:false,isSizeless:false,params:{},run:prebid_source.CLIENT,singleUse:false,splitBySize:false,} }; aps.fn.checkKvps=function(kvps){var ok=true; try{kvps.forEach(function(kvp){if(typeof kvp.key!="string"||typeof kvp.value!="string"){ok=false }}) }catch(ex){ok=false }return ok }; aps.fn.waitForDefinedTags=function(func){if(!aps.cfg.serveAds){return }if(aps.cfg.adDefinitionLoaded){eval(func)() }else{aps.alreadyWaiting=aps.alreadyWaiting||false; aps.waitingForDefinedTags=aps.waitingForDefinedTags||[]; if(aps.waitingForDefinedTags.indexOf(func)>-1){return }aps.waitingForDefinedTags.push(func); if(!aps.cfg.adDefinitionLoaded){aps.registerEvent(aps.event.on_ad_definition_loaded,function(){eval(func)() }); if(!aps.alreadyWaiting){aps.fn.setPerformanceMetrics(null,"waiting for Ad Definition"); aps.alreadyWaiting=true }}}}; aps.fn.setupResponsiveMappings=function(slot,ad){var arSizeMappings=aps.fn.generateSizeMappings(ad); slot.defineSizeMapping(arSizeMappings) }; aps.fn.generateSizeMappings=function(ad){var arSizeMappings=[]; if(ad.sizeMappings!=undefined&&ad.sizeMappings.length>0){var arFixedMappings=[]; var arViewports=[]; var viewPortIDX={}; for(var i=0; i=0; i--){var frame=aps.cfg.dfp.celtra.divs[i]; var pFrame=frame.parentElement; if(frame.style.display==="none"){if(pFrame.children.length>1){pFrame.style.position="relative"; frame.style.position="absolute"; frame.style.width="100%"; frame.style.height="100%"; frame.style.left="0" }frame.style.display="block"; aps.fn.logInfo(pFrame.parentElement.id+": fixing Celtra display"); aps.cfg.dfp.celtra.divs.splice(i,1) }}if(aps.cfg.dfp.celtra.divs.length>0){setTimeout(function(){aps.fn.monitofCeltraIframe(c+1) },1000) }}; aps.fn.maxLen=function(str,max){var ret=String(str); if(ret.length<=max){return ret }return''+String(ret).substring(0,max-5)+"(...)" }; aps.fn.dumpObject=function(keep){if(!keep){aps.aps.search="" }aps.aps.current=aps.aps.current||["aps","cfg"]; aps.aps.search=aps.aps.search||""; aps.aps.div.innerHTML=""; var html=""; for(var i=1; i<=aps.aps.current.length; i++){html+=''+aps.aps.current.slice(i-1,i)+" " }aps.aps.div.innerHTML='
'+html+'
j<
'; var js=document.getElementById("juiceSearch"); js.addEventListener("input",function(e){if(e.target.value.length>2){aps.aps.search=e.target.value; aps.fn.dumpObject(true) }if(e.target.value.length==0){aps.aps.search=""; aps.fn.dumpObject(true) }}); var o=window; for(var i=0; inothing" }try{obj.sort() }catch(e){}var t=document.createElement("table"); t.style="border:solid 1px black;cellspacing:0;padding:0;vertical-align:top;width:100%"; cont.appendChild(t); var bgcolor="white"; obj.forEach(function(conf){if(aps.aps.search!=""&&!conf[0].includes(aps.aps.search)){return }bgcolor=(bgcolor=="white")?"whiteSmoke":"white"; var tr=document.createElement("tr"); tr.style="background-color:"+bgcolor; t.appendChild(tr); var col1w=200; var col2w=290; if(aps.aps.width<500){col1w=aps.aps.width*0.4; col2w=aps.aps.width*0.6 }var td=document.createElement("td"); td.innerHTML=aps.fn.maxLen(conf[0],30); td.style="width:"+col1w+"px;vertical-align:top;overflow-x:hidden"; var td2=document.createElement("td"); td2.style="width:"+col2w+"px;white-space:normal"; if(typeof conf[1]=="function"){td2.innerHTML="function" }else{if(Array.isArray(conf[1])){if(typeof conf[1][0]=="undefined"||typeof conf[1][0]=="object"){var obj=Object.entries(conf[1]); td2.innerHTML="["; var arrToPush=[]; arrToPush=arrToPush.concat(aps.aps.current); arrToPush.push(conf[0]); if(conf[1].length==0&&Object.entries(conf[1]).length==0){td2.innerHTML="[]" }else{td.innerHTML=''+aps.fn.maxLen(conf[0],35)+""; obj.forEach(function(ent){var arrToPush=[]; arrToPush=arrToPush.concat(aps.aps.current); arrToPush.push(conf[0]); arrToPush.push(ent[0]); td2.innerHTML+='"'+ent[0]+'", ' }); td2.innerHTML+="]" }}else{td2.innerHTML=JSON.stringify(conf[1]).replaceAll(",",", ") }}else{if(typeof conf[1]=="object"){if(conf[1]==null){td2.innerHTML="null" }else{if(Object.entries(conf[1]).length==0){try{td2.innerHTML=JSON.stringify(conf[1]) }catch(e){td2.innerHTML="Blocked" }}else{var arrToPush=[]; arrToPush=arrToPush.concat(aps.aps.current); arrToPush.push(conf[0]); td.innerHTML=''+aps.fn.maxLen(conf[0],35)+""; td2.innerHTML='click to open object' }}}else{td2.innerHTML=aps.fn.maxLen(conf[1],35) }}}tr.appendChild(td); tr.appendChild(td2) }) }; aps.fn.toggleAps=function(){if(aps.aps.div.style.left==-(aps.aps.width-5)+"px"){aps.aps.div.style.left="-15px"; aps.aps.content.style.display="block"; aps.fn.dumpObject() }else{aps.aps.div.style.left=-(aps.aps.width-5)+"px"; aps.aps.content.style.display="none"; aps.aps.div.innerHTML=""; var html=""; aps.aps.div.innerHTML='
j>
' }}; aps.fn.tagAd=function(ad){if(!aps.cfg.logToConsole){return }var div=document.getElementById(ad.code+"dbg"); if(!div){div=document.createElement("div"); div.id=ad.code+"dbg"; div.setAttribute("onmouseover","aps.fn.showAdDetails(this)"); var ori=document.getElementById(ad.code); ori.style.position="relative"; var left=0; if(ori.clientWidth&&ori.clientWidth>aps.pageWidth){left=30 }var style="top:0px;left:"+left+"px;min-height:50px;line-height:12pt;text-align:left; inline-block; color: #fff; background:rgba(255,138,69,70%); padding: 1px 4px; border-radius: 3px;position:absolute;font-family:Source Sans Pro Regular,Sans Serif, Arial,system-ui;font-size:10pt;min-width:80px;z-index:2900"; div.style=style; ad.div.appendChild(div) }if(!aps.cfg.infoDiv){aps.aps=aps.aps||{}; aps.aps.top=200; aps.aps.width=(window.innerWidth<510)?window.innerWidth:510; aps.aps.div=document.createElement("div"); aps.aps.div.style="position:fixed;left:-"+(aps.aps.width-5)+"px;top:"+(aps.aps.top)+"px;width:"+(aps.aps.width+16)+"px;height:25px;border:black 1px solid;border-radius:5px;background:rgba(255,138,69,100%);z-index:3000"; document.body.insertBefore(aps.aps.div,document.body.firstChild); aps.aps.title=document.createElement("div"); aps.aps.title.innerHTML=""; aps.aps.title.style="width:100%"; aps.aps.div.appendChild(aps.aps.title); aps.aps.toggle=document.createElement("div"); aps.aps.toggle.style="float:right;width:15px;font-family:cursive;"; aps.aps.toggle.innerHTML="j>"; aps.aps.toggle.onclick=aps.fn.toggleAps; aps.aps.title.appendChild(aps.aps.toggle); aps.aps.content=document.createElement("div"); aps.aps.content.style="overflow-y:scroll;display:none;position:fixed;left:5px;top:"+(aps.aps.top+20)+"px;width:"+(aps.aps.width-5)+"px;height:500px;border:black 1px solid;border-radius:5px;background:white;z-index:3000"; document.body.insertBefore(aps.aps.content,document.body.firstChild); var infoDiv=document.createElement("div"); infoDiv.id="infoDiv"; infoDiv.style="position:absolute;display:none;width:406px;height:366px;overflow:hide;z-index;3000;background-color:rgba(255,138,69,100%);border-radius: 3px;font-family:Source Sans Pro Regular,Sans Serif, Arial;padding:3px 3px 3px 3px;font-size:10pt"; infoDiv.style.zIndex=3000; document.body.insertBefore(infoDiv,document.body.firstChild); aps.cfg.infoDiv=infoDiv; var infoDivClick=document.createElement("div"); infoDivClick.style="position.absolute;top:0px;float:right;font-family:Source Sans Pro Regular,Sans Serif, Arial;font-size:10pt;color:white;"; infoDivClick.innerHTML="Click to close"; infoDiv.appendChild(infoDivClick); var titleDiv=document.createElement("div"); titleDiv.id="infoDivTitle"; titleDiv.title="Click to close"; titleDiv.style="height:40px;width:400px;text-align:left;position:relativefont-family:Source Sans Pro Regular,Sans Serif, Arial;font-size:12pt"; titleDiv.setAttribute("onclick","aps.fn.hideAdDetails()"); infoDiv.appendChild(titleDiv); var detailsDiv=document.createElement("div"); detailsDiv.id="infoDivDetails"; detailsDiv.style="overflow-y:scroll;width:400px;height:300px;oveflow:scroll;font-size:10pt;font-family:Source Sans Pro Regular,Sans Serif, Arial;line-height:normal;padding:3px;position:relative;background-color:white;color:black;"; infoDiv.appendChild(detailsDiv) }var inner=ad.code+"
SD: "+ad.scrollDepth; if(ad.advertiser){inner+="
"+ad.advertiser }div.innerHTML=inner; if(aps.cfg.infoDivDisplaying==ad.code){aps.fn.setAdDetails(ad.code) }}; aps.fn.setAdDetails=function(id){if(!aps.cfg.logToConsole){return }var ad=aps.cfg.ads[id]; document.getElementById("infoDivTitle").innerHTML="

"+id+"

"; if(aps.cfg.inFrame){aps.cfg.infoDiv.style.height=ad.div.offsetHeight; document.getElementById("infoDivTitle").innerHTML=id; document.getElementById("infoDivTitle").style.height="auto"; document.getElementById("infoDiv").style.height=ad.div.offsetHeight+"px"; document.getElementById("infoDivDetails").style.height=ad.div.offsetHeight-21+"px" }var inner="Misc
"; inner+="AdUnit: "+ad.getPage().adUnit+"
"; inner+="Advertiser: "+ad.advertiser+"
"; inner+="SizeMappings: "+ad.sizeMappings.join(", ")+"
"; inner+="Sizes: "+ad.stringSizes.join(", ")+"
"; inner+="Page Width: "+aps.pageWidth+"
"; inner+="Current Device: "; switch(current_device){case devices.DESKTOP:inner+="Desktop"; break; case devices.TABLER:inner+="Tablet"; break; case devices.MOBILE:inner+="Mobile"; break }inner+="
"; inner+="
"; if(ad.render){if(!ad.render.responseInfo){return }inner+="Response Info
"; var orderId=ad.render.responseInfo.campaignId; var lineItemId=ad.render.responseInfo.lineItemId||ad.render.responseInfo.sourceAgnosticLineItemId; Object.entries(ad.render.responseInfo).forEach(function(item){var link=item[1]; if(item[1]!=null){switch(item[0]){case"creativeId":link=""+item[1]+""; break; case"sourceAgnosticCreativeId":link=""+item[1]+""; break; case"lineItemId":link=""+item[1]+""; break; case"sourceAgnosticLineItemId":link=""+item[1]+""; break; case"campaignId":link=""+item[1]+""; break }}inner+=item[0]+": "+link+"
" }); inner+="
"; inner+="Targeting
"; Object.entries(ad.render.targetingMap).forEach(function(item){var value=Array.isArray(item[1])?item[1].join(", "):item[1].replace(",",", "); inner+=item[0]+": "+value+"
" }); inner+="
"; inner+="Page Targeting
"; Object.entries(ad.render.request.pageTargeting).forEach(function(item){var value=Array.isArray(item[1])?item[1].join(", "):item[1].replace(",",", "); inner+=item[0]+": "+value+"
" }) }document.getElementById("infoDivDetails").innerHTML=inner }; aps.fn.showAdDetails=function(adinfo){var theAd=adinfo.id.replace("dbg",""); if(aps.cfg.infoDivDisplaying==theAd){return }aps.cfg.infoDiv.style.display="block"; aps.cfg.infoDiv.style.top=event.pageY+15+"px"; aps.cfg.infoDiv.style.left=event.pageX+15+"px"; aps.cfg.infoDivDisplaying=theAd; aps.fn.setAdDetails(theAd) }; aps.fn.hideAdDetails=function(ad){if(aps.cfg.infoDiv){aps.cfg.infoDiv.style.display="none" }aps.cfg.infoDivDisplaying="" }; aps.fn.refreshAds=function(adcodes){var refreshable=[]; adcodes.forEach(function(id){var adDef=aps.cfg.ads[id]; if(adDef.state=="firstLoad"){aps.fn.logInfo("refreshAds: first load of "+adDef.code); adDef.state="displayed"; refreshable.push(adDef.code) }else{if(adDef.state=="forcedRefresh"){aps.fn.logInfo("refreshAds: forced refresh of "+adDef.code); adDef.state="displayed"; refreshable.push(adDef.code) }else{if(adDef.doNotRefresh){aps.fn.logSkip(adDef.code,"DoNotRefresh") }else{if(aps.cfg.dfp.celtraAds.indexOf(adDef.code)>-1){aps.fn.logSkip(adDef.code,"Celtra ad") }else{if(!aps.cfg.is.leafsSite&&adDef.isLoading==true){aps.fn.logSkip(adDef.code,"Last request not completed") }else{if(!aps.cfg.is.leafsSite&&!adDef.refreshable){aps.fn.logSkip(adDef.code,"Not refreshable") }else{if(!aps.cfg.is.leafsSite&&adDef.renderCount<=1){aps.fn.logSkip(adDef.code,"Not rendered") }else{if(!aps.cfg.is.leafsSite&&aps.cfg.refreshViewableOnly&&!adDef.impressionViewable){aps.fn.logSkip(adDef.code,"Not viewable") }else{if(adDef.code=="Crown"){aps.fn.logSkip(adDef.code,"Not refreshing Crown"); adDef.exclude=true }else{if(aps.page_type2=="article"&&["www.expressnews.com","www.houstonchronicle.com","www.sfchronicle.com"].includes(aps.cfg.host)&&((current_device==devices.MOBILE&&adDef.code!="MAD")||(!["A300","B300","S300"].includes(adDef.code)&&!adDef.code.startsWith("rb")))){aps.fn.logSkip(adDef.code,"refreshAds: not refreshing masthead ads on premium site "); adDef.exclude=true }else{if(aps.cfg.ivm&&adDef.div.dataset.inview=="false"){aps.fn.logSkip(adDef.code,"only refreshing in view ads") }else{aps.fn.logInfo("refreshAds: refreshing "+adDef.code); refreshable.push(adDef.code) }}}}}}}}}}}}); if(refreshable.length<=0){aps.fn.logInfo("refreshAds: No ads are in refreshable state - skipping refresh"); return }aps.fn.logInfo("refreshAds: refreshing ad slots "+refreshable); aps.cfg.queuedAds=aps.cfg.queuedAds.concat(refreshable); aps.fn.requestAds() }; aps.fn.requestAds=function(){if(!aps.cfg.readyToCallGAM){aps.fn.waitToCallGAM(); return }var requests=[]; var req; var missing=[]; aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(id){return !["Inline","RB"].includes(id) }); var arr=[]; aps.cfg.queuedAds.forEach(function(id){if(!arr.includes(id)){arr.push(id) }}); aps.cfg.queuedAds=arr; aps.cfg.toRemoveFromQue=[]; aps.cfg.queuedAds.forEach(function(id){var ad=aps.cfg.ads[id]; if(!ad){return }if(ad.code=="exit"){var pg=ad.getPage(); if(pg.requestNo<2){return }if(!pg.exitRequested){pg.exitRequested=true }else{return }}if(!requests[ad.scrollDepth]){req=new aps.o.req(aps.cfg.page.allPages[ad.scrollDepth]); requests[ad.scrollDepth]=req }if(!ad.div){ad.div=document.getElementById(ad.code); if(!ad.div){ad.retries=ad.retries||0; ad.retries++; if(ad.retries>20){aps.fn.logInfo("Enough retries loading "+ad.code); aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(code){return code!=ad.code }); return }missing.push(ad.code); aps.cfg.missingDivs.push(ad.code); return }}if(aps.cfg.is.platypus&&!["Crown","exit"].includes(ad.code)&&ad.div.dataset&&ad.div.dataset.inview&&ad.div.dataset.inview!="true"){aps.fn.logInfo(ad.code+" not in view - removing from queue"); ad.state="cancelled"; aps.cfg.toRemoveFromQue.push(ad.code); return }if(!ad.gam){var allGSlots=googletag.pubads().getSlots(); var thisSlot=allGSlots.filter(function(gslot){return gslot.getSlotElementId()==id }); if(thisSlot.length>0){ad.gam=thisSlot[0] }else{if(ad.supportsNative){ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,["fluid"],ad.code) }else{if(aps.cfg.is.kfsComicsWidget||aps.cfg.is.kfsPuzzleWidget){ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,ad.sizes,ad.code) }else{ad.gam=googletag.defineSlot("/"+aps.cfg.networkCode+"/"+ad.getPage().adUnit,[ad.width,ad.height],ad.code) }}}if(ad.gam){googletag.display(ad.code); ad.kvps.forEach(function(kvp){ad.gam.setTargeting(kvp.key,kvp.value) }) }}if(ad.gam){ad.gam.clearTargeting("frsh"); ad.gam.setTargeting("frsh",ad.renderCount); ad.gam.clearTargeting("i"); ad.gam.setTargeting("i",""+aps.cfg.dfp.requests.length); if(["Crown"].includes(ad.code)){ad.gam.setCollapseEmptyDiv(true,true) }else{if(aps.cfg.is.platypus){ad.gam.setCollapseEmptyDiv(false) }}aps.fn.setupResponsiveMappings(ad.gam,ad); ad.gam.addService(googletag.pubads()) }if(ad.gam&&ad.div){if(req.ads.length0){aps.logInfo("*GAM* Not requesting "+missing+" div(s) not on the page") }requests.forEach(function(request,index){if(request.ads.length==0&&aps.cfg.dfp.requests.length==0){aps.cfg.waitingForAds=aps.cfg.waitingForAds||new Date().valueOf(); var thisTime=new Date().valueOf(); if(thisTime>aps.cfg.waitingForAds+15000){aps.logInfo("*GAM* Page not ready - no ads to request - enough waiting"); aps.cfg.queuedAds=[] }else{aps.logInfo("*GAM* Page not ready - no ads to request"); setTimeout(aps.fn.requestAds,100) }return }if(!aps.cfg.is.platypus){if(aps.cfg.bid.enabled&&((aps.cfg.bid.a9.enabled&&!request.page.a9BidsReceived)||!request.page.pbBidsReceived)){aps.logInfo("Bids not received for page "+request.page.scrollDepth); request.gams=[]; request.ads=[] }}if(request.gams.length>0){if(request.page.datalayer.content.isSensitive){aps.logInfo("Don't serve ad on "+request.page.href+" - tragedy flag"); return }request.page.addPageKvp("scrollpage",""+request.page.scrollDepth,true); aps.fireEvent(aps.event.on_before_request_ads,request); request.pageTargeting={}; var pagetm=googletag.pubads().getTargetingKeys(); pagetm.forEach(function(key){request.pageTargeting[key]=googletag.pubads().getTargeting(key) }); request.ads.forEach(function(adId){aps.cfg.ads[adId].state="requested"; var div=aps.cfg.ads[adId].div; if(div&&div.clientHeight>0&&adId!="MAD"){div.style.minHeight=div.clientHeight+"px" }}); aps.fn.logInfo("*GAM* requesting for page "+index+" : "+request.ads); if(aps.cfg.dfp.batchSRA.enabled||request.page.page_type2=="article"){googletag.pubads().refresh(request.gams,{changeCorrelator:false}) }else{googletag.pubads().refresh(request.gams) }if(!aps.cfg.logToConsole){request={ads:request.ads,page:{requestNo:request.page.requestNo}} }aps.cfg.dfp.requests.push(request); request.page.requestNo++ }aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(id){return !request.ads.includes(id) }); aps.cfg.queuedAds=aps.cfg.queuedAds.filter(function(id){return !aps.cfg.toRemoveFromQue.includes(id) }); if(aps.cfg.queuedAds.length>0){if(Object.entries(aps.cfg.ads).filter(function(ad){return ad[1].renderCount>1 }).length>0&&(HDN.dataLayer.ads.loaded||!aps.cfg.is.wcm)){var divs=[]; for(var i=aps.cfg.queuedAds.length-1; i>=0; i--){if(!aps.cfg.ads[aps.cfg.queuedAds[1]]){aps.logInfo("Ad not defined:"+aps.cfg.queuedAds[1]); aps.cfg.queuedAds.splice(i,1) }else{if(!aps.cfg.ads[aps.cfg.queuedAds[i]].div){divs.push(aps.cfg.queuedAds[i]); aps.cfg.queuedAds.splice(i,1) }}}if(divs.length>0){aps.fn.logInfo("*GAM* "+divs+" removed from queue, still not on page") }}if(aps.cfg.queuedAds.length>0){setTimeout(aps.fn.requestAds,500) }}}); if(aps.cfg.dfp.batchSRA.enabled){aps.cfg.dfp.batchSRA.waitingNext=true; if(aps.cfg.dfp.batchSRA.auto){aps.fn.logInfo("BatchSRA : waiting to next step in "+aps.cfg.dfp.batchSRA.delay+" ms"); setTimeout(aps.fn.displayNextBatch,aps.cfg.dfp.batchSRA.delay) }}}; aps.fn.waitToCallGAM=function(){if(aps.cfg.readyToCallGAM){aps.fn.requestAds(); return }if(!googletag.apiReady||aps.cfg.waitingForRichie||(!aps.cfg.tregReady&&aps.cfg.waitForTreg)||(aps.cfg.bid.a9.enabled&&!aps.cfg.bid.a9.received)||(aps.cfg.bid.enabled&&!aps.cfg.bid.pb.received)){if(aps.cfg.waitingSince){var now=new Date().valueOf(); if(now-aps.cfg.waitingSince>=5000){var info={version:aps.cfg.version,pbBids:{enabled:aps.cfg.bid.enabled,received:aps.cfg.bid.pb.received},a9Bids:{enabled:aps.cfg.bid.a9.enabled,received:aps.cfg.bid.a9.received},DOM:document.readyState,apiReady:googletag.apiReady,richie:{is:aps.cfg.is.richie,waiting:aps.cfg.waitingForRichie},treg:{waiting:aps.cfg.waitForTreg,ready:aps.cfg.tregReady},platypus:{is:aps.cfg.is.platypus},}; aps.logInfo(["Waiting for 5 seconds.",info]); if(googletag.apiReady){aps.cfg.readyToCallGAM=true; aps.fn.requestAds() }else{aps.cfg.forcedGam=aps.cfg.forcedGam||false; if(!aps.cfg.forcedGam){aps.fn.logInfo("Force loading gpt.js"); aps.fn.insertScript("https://securepubads.g.doubleclick.net/tag/js/gpt.js",true,"text/javascript","gdfp"); aps.cfg.forcedGam=true }setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Not ready to call GAM"); setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Not ready to call GAM"); aps.cfg.waitingSince=aps.cfg.waitingSince||new Date().valueOf(); setTimeout(aps.fn.waitToCallGAM,100) }}else{aps.logInfo("Ready to call GAM"); aps.cfg.readyToCallGAM=true; aps.fn.requestAds() }}; aps.fn.sendLog=function(param,force){if(!aps.cfg.gaLog&&!force){return }var i=document.createElement("img"); i.src="https://aps.hearstnp.com/log?v"+aps.cfg.version+"&"+param; i.style="display:none"; document.head.appendChild(i) } })();(function(){aps.event.on_dom_loaded=10; aps.event.on_before_request_ads=20; aps.event.on_get_bids=30; aps.event.on_request_new_video_ads=40; aps.event.on_ad_definition_loaded=50; aps.event.on_define_bid_data=60; aps.event.on_initial_bid_request=70; aps.event.on_timer=80; aps.event.on_timer10=81; aps.event.on_timer60=82; aps.event.on_new_page=90; aps.event.on_first_load=100; aps.event.on_new_div=110; aps.event.on_request_bid=120; aps.event.on_check_include_ad=130; aps.event.on_render_ad=140; aps.event.on_define_adUnit=150; aps.event.on_before_define_adUnit=160; var a=0; aps.cfg.timer=setInterval(function(){a++; aps.fireEvent(aps.event.on_timer,{now:new Date().valueOf(),count:a}); if(a%60==0){aps.fireEvent(aps.event.on_timer60,{now:new Date().valueOf(),count:a}) }},1000); aps.logtype.info=0; aps.logtype.warning=1; aps.logtype.error=2; aps.registerEvent=function(c,b){var d=aps.events[c]; aps.events[c]=function(e){d&&d(e); b(e) } }; aps.fireEvent=function(b,c){aps.events[b]&&aps.events[b](c) } })();(function(){aps.cfg.fastly={}; var b=aps.fn.getCookie("hnpde"); if(b&&b!=""){try{b=atob(b); aps.cfg.fastly=JSON.parse(b); if(aps.cfg.fastly.ipc_id.length==0){aps.cfg.fastly.ipc_id="null" }if(!aps.cfg.fastly.f_id){aps.cfg.fastly.f_id="null" }aps.cfg.fastly.f_kb=aps.cfg.fastly.f_kb.toString() }catch(a){}}if(aps.cfg.fastly.hnp_na){throw new Error("Don't serve ads to friendly bots") }if(aps.cfg.fastly.ipc_id){aps.registerEvent(aps.event.on_before_request_ads,function(c){c.page.addPageKvp("hpx_ipc",aps.cfg.fastly.ipc_id,true); c.page.addPageKvp("hpx_fid",aps.cfg.fastly.f_id,true); c.page.addPageKvp("hpx_kb",aps.cfg.fastly.f_kb,true) }) }})();(function(){aps.cfg.is.wcm=(HDN&&HDN.dataLayer&&HDN.dataLayer.content&&typeof HDN.dataLayer.content.designTemplate!="undefined")?true:false; aps.cfg.is.authorPage=(aps.cfg.is.wcm&&document.location.pathname.startsWith("/author/"))?true:false; aps.cfg.is.datebookSF=aps.cfg.host=="datebook.sfchronicle.com"; aps.cfg.is.eedition=aps.cfg.host.indexOf("olivesoftware.com")>0; aps.cfg.is.faceBookInstantArticle=(window.JuicePageUrl.indexOf("juicemode=fbinstant")!==-1); aps.cfg.is.leafsSite=aps.cfg.leafsSites.includes(aps.cfg.host); aps.cfg.is.obits=aps.cfg.host=="obituaries.lmtonline.com"||(aps.cfg.host.indexOf("legacy.com")>-1||(top.location!=location&&document.referrer=="https://www.legacy.com/")); aps.cfg.is.premium=(HDN&&HDN.dataLayer&&typeof HDN.dataLayer.paywall!=="undefined"&&typeof HDN.dataLayer.paywall.premiumStatus!=="undefined"&&HDN.dataLayer.paywall.premiumStatus==="isPremium")?true:false; aps.cfg.is.premiumSite=["expressnews.com","houstonchronicle.com","sfchronicle.com"].some(function(a){return aps.cfg.host.endsWith(a) })&&aps.cfg.host.split(".").some(function(a){return["www","cmf"].includes(a) }); aps.cfg.is.qa=(aps.cfg.subdom.some(function(b){return["preview-dev","cmf","web","web1","web2","web3","qa","dev","w"].includes(b) })||loadAd_UrlLocation=="https://aps-staging.hearstnp.com/")?true:false; aps.cfg.is.previewHC=aps.cfg.host=="preview.houstonchronicle.com"; aps.cfg.is.projectPage=(document.location.pathname.startsWith("/projects")||aps.cfg.host.startsWith("projects."))?true:false; aps.cfg.is.richie=APSpageUrl.indexOf("staging.richie")==0||APSpageUrl.indexOf("richie")==0||APSpageUrl.indexOf("papp")==0; aps.cfg.is.wp=typeof(window.wp_content)=="object"; aps.cfg.is.kfs=(window.juice&&window.juice.kfs&&typeof(window.juice.kfs)=="string")||false; aps.cfg.is.kfsComicsWidget=(window.juice&&juice.kfs&&juice.kfs=="comicsWidget")||aps.cfg.host.startsWith("v7.comicskingdom")||false; aps.cfg.is.kfsPuzzleWidget=(window.juice&&juice.kfs&&juice.kfs=="puzzleWidget")||false; aps.cfg.is.kfsWidget=aps.cfg.is.kfsComicsWidget||aps.cfg.is.kfsPuzzleWidget; aps.cfg.is.platypus=(HDN&&HDN.dataLayer&&HDN.dataLayer.ads&&HDN.dataLayer.ads.isPlatypus)?true:false; aps.cfg.is.greenstate=(document.location.hostname.indexOf("greenstate.com")>-1); aps.cfg.is.storystudio=aps.cfg.host.startsWith("storystudio"); aps.cfg.is.realmpage=(document.location.pathname.startsWith("/realm/")); aps.cfg.is.subscription=(document.location.hostname.startsWith("subscription.")) })();(function(){aps.pageWidth=window.screen.width||top.window.innerWidth||window.width||-1; if(aps.cfg.is.kfsComicsWidget||aps.cfg.is.kfsPuzzleWidget){aps.pageWidth=window.innerWidth||window.screen.width||window.width||-1 }if(navigator.userAgent.indexOf("iPad")>-1){window.current_device=devices.TABLET }else{if(navigator.userAgent.indexOf("iPhone")>-1){window.current_device=devices.MOBILE }else{if(navigator.userAgent.indexOf("Android")>-1){window.current_device=devices.MOBILE }else{if(document.querySelectorAll("meta[name=viewport]").length>0){try{var d; var c=document.querySelectorAll("meta[name=viewport]")[0].content.split(","); for(var b=0; b1){f=1 }this.levelTwo.value=(a.path.length>0)?a.path[f]:"homepage"; this.levelTwo.forced=true }else{if(aps.cfg.is.kfsPuzzleWidget){this.levelOne.value="kfs-puzzleswidget"; this.levelOne.forced=true }else{if(aps.cfg.is.kfsComicsWidget){this.levelOne.value="kfs-comicswidget"; this.levelOne.forced=true }}var d=new URL(document.referrer||"https://www.kingfeatures.com"); this.levelTwo.value=d.hostname.split(".").slice(-2).join("."); this.levelTwo.forced=true }}if(aps.cfg.is.qa&&aps.cfg.is.wcm&&!aps.cfg.is.platypus){if(!this.levelOne.forced){this.levelOne.value="hnp-hearstdemosite"; this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value="hearstdemozone"; this.levelTwo.forced=true }}if(aps.cfg.is.leafsSite){if(aps.cfg.host=="pyme.lavoztx.com"){if(!this.levelOne.forced){this.levelOne.value="hnp-chron.com"; this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value="La_Voz"; this.levelTwo.forced=true }}if(!this.levelOne.forced){this.levelOne.value="hnp-"+aps.cfg.host.split(".").slice(-2).join("."); this.levelOne.forced=true }if(!this.levelTwo.forced){this.levelTwo.value=(document.location.pathname=="/")?"channel_leaf":"article_leaf"; this.levelTwo.forced=true }}if(!this.levelTwo.forced&&!a.isSubDomain&&a.path.length==0){this.levelTwo.value="Homepage"; this.levelTwo.forced=true }aps.fireEvent(aps.event.on_before_define_adUnit,this); if(!this.levelTwo.forced){switch(a.datalayer.content.designTemplate){case"design/article/dynamic_two_column.tpl":this.levelTwo.value="article_dtc"; this.levelTwo.forced=true; break; case"design/article/dynamic_one_column.tpl":this.levelTwo.value="article_doc"; this.levelTwo.forced=true; break; case"design/slideshow/dynamic_two_column.tpl":this.levelTwo.value="article_list"; this.levelTwo.forced=true; break; case"design/channel/dynamic_two_column.tpl":this.levelTwo.value="channel_wcm"; this.levelTwo.forced=true; break; default:if(a.datalayer.content.designTemplate&&a.datalayer.content.designTemplate.indexOf("channel")>-1){this.levelTwo.value="channel_old"; this.levelTwo.forced=true }else{this.levelTwo.value="article_old"; this.levelTwo.forced=true }}}this.levelOne.value=this.levelOne.value.replace("hnp-theintelligencer.com","theintelligencer"); var e=this.levelOne.value+"/"+this.levelTwo.value; if(e.endsWith("/")){e=e.substring(0,e.length-1) }if(this.queryStringOverwritten||aps.sitesWithoutCallback.includes(a.hostname)||aps.cfg.is.kfs){this.adUnit=e; aps.fn.logInfo("*AdUnit: setting adUnit to : "+this.adUnit) }this.newValue=e; return e }}; aps.fireEvent(aps.event.on_define_adUnit,{page:a,adUnit:b}); a.adUnit=b.getNewValue() }() }) })();(function(){aps.registerEvent(aps.event.on_new_page,function(a){a.sectionPath=[]; a.setSectionPath=function(){if(aps.cfg.is.datebookSF){a.sectionPath=["entertainment","datebook"] }else{if(aps.cfg.is.previewHC){a.sectionPath=["entertainment","preview"] }else{if(aps.cfg.is.authorPage){a.sectionPath=a.path }else{if(aps.cfg.is.leafsSite){a.sectionPath=[aps.cfg.host.split(".")[0]]; a.addPageKvp("category","third_party"); a.addPageKvp("custom","demandmedia") }else{if(a.datalayer.content.sectionPath){a.sectionPath=a.datalayer.content.sectionPath; if(a.domain=="greenstate.com"&&a.path.length>0){a.sectionPath.push(a.path[0]) }if(a.sectionPath.length>0&&typeof a.sectionPath[0].title=="string"){var c=[]; Object.entries(a.sectionPath).forEach(function(d){c.push(d[1].title.toLowerCase()) }); a.sectionPath=c }}else{if(window.juice){if(window.juice.definedTags&&window.juice.definedTags.sectionPath){a.sectionPath=juice.definedTags.sectionPath }else{if(window.juice.is&&["wehaa","ipublish"].includes(window.juice.is)){a.sectionPath.push("real_estate") }}}}}}}}if(a.sectionPath.length<2&&a.datalayer.content.sectionPath&&a.datalayer.content.sectionPath.length==0){if(a.path.length==0){a.sectionPath.push("homepage") }else{a.path.forEach(function(d){if(d!="category"&&a.sectionPath.length<4){a.sectionPath.push(d) }}) }}if(a.sectionPath){for(var b=0; b]/g,""); a.sectionPath[b]=a.sectionPath[b].replace(/\s\+\s|\s\&\s|\+|\&/g,"-and-"); a.sectionPath[b]=a.sectionPath[b].replace(/[\(\)\[\],]/g,"|") }}if(a.sectionPath.length>0){aps.fn.logInfo("section Path: "+a.sectionPath); for(var b=0; b-1); aps.cfg.ads=[]; aps.cfg.adtest={}; aps.cfg.adMap=aps.cfg.adMap||[]; aps.cfg.adtestparam=""; aps.cfg.domIsLoaded=false; aps.cfg.infiniteScroll=HDN.dataLayer.presentation.infiniteScrollEnabled; aps.cfg.missingDivs=[]; aps.cfg.disablePersonalisation=false; aps.cfg.doNotSell=HDN&&HDN.dataLayer&&HDN.dataLayer.privacy&&HDN.dataLayer.privacy.ccpaDoNotSell||false; aps.cfg.juiceCustom=false; aps.cfg.logToConsole=aps.cfg.logToConsole||(window.debugSGA)?true:(window.location.search.indexOf("console=1")!==-1)?true:false; var a=aps.fn.getCookie("console"); if(a!=undefined&&a=="1"){aps.cfg.logToConsole=true }aps.cfg.nlpCat=[]; aps.cfg.dfp={celtra:{},dynamicAds:[],phd:{enabled:false,},rnd:{},celtraAds:[],googleSlots:[],adsNotShowing:[],refreshes:0,undefinedAds:[],waiting:[],isWaiting:false,dataLayerInterstitialRefreshables:["Flex1","A300","TMP300_3","MAD"],viewability:[],rendered:{timer:null,que:[]},requests:[],maxAdsPerRequest:10,}; aps.cfg.bid={a9:{adUnits:[],enabled:true,config:{},apstag:{},enableOptimization:false,initCalled:false,videoAdUnits:[],partners:[],received:false,},pb:{config:{},data:{},adUnits:[],adUnitIds:[],videoAdUnits:[],s2sBidders:[],bidders:[],biddersCount:0,biddersDone:[],biddersPriority:["triplelift","criteo","concert","ix","kargo"],enableOptimization:false,dataProviders:[],settings:{},moveToS2SOnMax:["rubicon","appnexus","pubmatic"],notSupportingGDPR:[],shuffleMoveToS2SOnMax:true,received:false,},adSizes:[[160,600],[300,50],[300,250],[300,600],[320,50],[320,100],[325,508],[325,204],[336,280],[501,501],[620,366],[728,90],[970,90],[970,250]],domains:["beaumontenterprise.com","bigrapidsnews.com","chron.com","comicskingdom.com","comicskingdom.net","ctinsider.com","ctpost.com","darientimes.com","expressnews.com","greenstate.com","greenwichtime.com","houstonchronicle.com","lakecountystar.com","lmtonline.com","kingfeatures.com","manisteenews.com","michigansthumb.com","middletownpress.com","milfordmirror.com","mrt.com","myjournalcourier.com","myplainview.com","mysanantonio.com","ncadvertiser.com","newstimes.com","nhregister.com","ourmidland.com","recordpatriot.com","registercitizen.com","seattlepi.com","sfchronicle.com","sfgate.com","sheltonherald.com","southeasttexas.com","stamfordadvocate.com","theheraldreview.com","thehour.com","theintelligencer.com","theridgefieldpress.com","thetelegraph.com","timesunion.com","trumbulltimes.com","weekand.com","wiltonbulletin.com","workand.com","yourconroenews.com"],bids:[],detectAllBids:true,disableNative:true,disableMobile:false,disabledOnMobile:[],enableOptimization:true,enabled:(window.location.search.indexOf("pb=0")!==-1)?false:true,enableGDPR:false,excludedDomains:["gametimect.com","olivesoftware.com"],lessBidder:0,current_domain:"",current_device:current_device,showTargeting:true,showType:false,maxClientSideBidders:(current_device==devices.DESKTOP)?7:6,excludedBids:[['wrapper=="pb" && aps.cfg.page.current.domain=="chron.com" && adDef.code == "A951" && ["home page","channel"].includes(aps.cfg.page.current.page_type2)',"no bid on A951 for page_type2 home_page or channel on chron.com"],['wrapper=="pb" && aps.cfg.page.current.page_type2 != "article" && adDef.code.startsWith("CONCERT")',"no bid on CONCERTx ads for page_type2 not article"],['bidder == "criteo" && adDef.code.startsWith("NTV")',"no bid on NTV ads for criteo"],['bidder=="triplelift" && ["Flex1","B728","TMP300_3"].includes(adDef.code)',"no bid on Flex1, B728 or TMP300_3 for triplelift"],['adDef.code == "A951" && document.location.href.startsWith("https://www.sfgate.com/realestate/")',"no bid on A951 on sfgate realestate"],['bidder == "kargo" && adDef.code == "MAD" && ["expressnews.com","houstonchronicle.com","sfchronicle.com"].includes(aps.cfg.page.current.domain)',"no bid on MAD on Premium sites for Kargo"],['bidder == "kargo" && adDef.code == "Flex1"',"no bid on Flex1 for Kargo"],['adDef.code == "DTBK_AP951"',"no bid on DTBK_AP951, direct sales only."],],}; if(!aps.cfg.is.leafsSite){aps.cfg.bid.excludedBids.push(["adDef.code == adDef.multiType","no bid for stub multi slots"]) }aps.cfg.vid={mode:"apv",tagUrl:"",enabled:false,}; aps.cfg.gaLog=(Math.floor(Math.random()*100)<=5); aps.cfg.excludeModules=[]; aps.cfg.waitingGoogle=false; aps.cfg.preventCeltraAdsToRefresh=true; aps.cfg.queuedAds=[]; aps.cfg.serveAds=true; aps.cfg.readyToCallGAM=false; aps.cfg.refreshViewableOnly=true; aps.cfg.videoAdTag=null; aps.cfg.limitAdSize=sizeLimitation.NONE; var d=aps.cfg.abtestvar||[]; aps.cfg.abtestvar=window.HDN&&HDN.dataLayer&&HDN.dataLayer.abtest&&HDN.dataLayer.abtest.experimentId||aps.abtest||aps.npabtest||[]; if(d.length>0){aps.cfg.abtestvar=aps.cfg.abtestvar.concat(d) }if(aps.cfg.logToConsole){var b=new Date(); b.setTime(b.getTime()+(1000*24*60*60*1000)); var c="; expires="+b.toGMTString(); document.cookie="console=1"+c+"; path=/" }if(window.location.search.indexOf("console=0")!==-1){var b=new Date(); b.setTime(b.getTime()+(60*1000)); var c="; expires="+b.toGMTString(); document.cookie="console=0"+c+"; path=/"; aps.cfg.logToConsole=false }aps.cfg.source="Prod"; if(window.loadAd_UrlLocation.indexOf("dev.")>-1||aps.cfg.is.qa||aps.cfg.host.split(".")[0].startsWith("web")||aps.cfg.host=="127.0.0.1"||aps.cfg.host=="localhost"){aps.cfg.source="QA" }if(aps.cfg.source=="QA"){aps.cfg.gaLog=false }aps.registerEvent(aps.event.on_new_page,function(e){if(document.location.pathname.indexOf("/sponsored/")!==-1){aps.fn.logInfo("*Disabling bidders - sponsored content"); aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }if(aps.cfg.bid.excludedDomains.includes(e.domain)){aps.fn.logInfo("*Disabling bidders - excluded domains"); aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }if(aps.cfg.is.realmpage||aps.cfg.is.storystudio||aps.cfg.is.obits||aps.cfg.is.subscription||aps.cfg.host=="webcache.googleusercontent.com"){aps.fn.logInfo("Not Serving Ads"); aps.sitesWithoutCallback.push(aps.cfg.host); aps.cfg.serveAds=false; aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false; aps.cfg.logToConsole=false }if(aps.cfg.is.projectPage||aps.cfg.is.kfs||aps.cfg.is.eedition||aps.cfg.is.authorPage||aps.cfg.host.startsWith("v7.comicskingdom.com")){aps.sitesWithoutCallback.push(aps.cfg.host) }if(aps.cfg.is.qa&&aps.cfg.is.wcm){aps.sitesWithoutCallback.push(aps.cfg.host) }}) })();(function(){if(aps.cfg.abtestvar.includes("ENG15462_V1")){aps.registerEvent(aps.event.on_new_page,function(b){aps.cfg.allAds.Crown.sizeMappings=aps.cfg.allAds.Crown.sizeMappings.filter(function(c){return !c.endsWith("001x002") }); var a=document.createElement("div"); a.id="exit"; a.style="display:none;width:0px;height:0px;overflow:hidden"; document.body.appendChild(a); aps.cfg.useExit=true }); aps.registerEvent(aps.event.on_render_ad,function(a){if(aps.cfg.ads.exit.renderCount==1&&a.ad.getPage().requestNo>=2){aps.cfg.queuedAds.push("exit"); aps.fn.requestAds() }}) }})();(function(){aps.cfg.waitingForRichie=aps.cfg.waitingForRichie||false; if(APSpageUrl){if(aps.cfg.is.richie){googletag.cmd.push(function(){try{googletag.pubads().set("page_url",JuicePageUrl); aps.fn.logInfo("Richie app: Setting page_url to "+JuicePageUrl) }catch(b){}}); aps.fn.logInfo("Richie app: disabling modules"); if(document.location.href.indexOf("?appId=")==-1){aps.cfg.bid.enabled=false; aps.cfg.bid.a9.enabled=false }aps.cfg.excludeModules=["nlp","ab_testing","blueconic","PublisherProvidedId","permutive"]; if(typeof mraid=="undefined"){aps.fn.logInfo("mraid not present, not waiting for Richie"); aps.cfg.waitingForRichie=false }else{aps.cfg.waitingForRichie=true; aps.fn.logInfo("Richie app: enabling viewable trigger"); function a(b){if(b){aps.cfg.waitingForRichie=false; aps.fn.logInfo("Richie app: viewable triggered") }}mraid.addEventListener("viewableChange",a) }}}})();(function(){aps.cfg.multi=aps.cfg.multi||{}; aps.cfg.multi.enabled=aps.cfg.multi.enabled||false; aps.cfg.multi.availableTypes={}; if(aps.cfg.is.wcm){aps.cfg.multiAds["Inline"]=aps.cfg.allAds["Inline"]; aps.cfg.multiAds["LIST"]=aps.cfg.allAds["LIST"]; aps.cfg.multiAds["RB"]=aps.cfg.allAds["RB"]; aps.cfg.multiAds["SSHOW"]=aps.cfg.allAds["SSHOW"]; aps.cfg.multiAds["Box"]=aps.cfg.allAds["Box"] }else{if(aps.cfg.is.leafsSite){aps.cfg.multiAds["A728"]=aps.cfg.allAds["A728"]; aps.cfg.multiAds["A300"]=aps.cfg.allAds["A300"]; aps.cfg.multiAds["B300"]=aps.cfg.allAds["B300"]; aps.cfg.multiAds["S300"]=aps.cfg.allAds["S300"]; aps.cfg.multiAds["Leaf1"]=aps.cfg.allAds["Leaf1"]; aps.cfg.multiAds["Leaf2"]=aps.cfg.allAds["Leaf2"]; aps.cfg.multiAds["Leaf3"]=aps.cfg.allAds["Leaf3"]; aps.cfg.multiAds["Leaf4"]=aps.cfg.allAds["Leaf4"]; aps.cfg.multiAds["MAD"]=aps.cfg.allAds["MAD"] }else{if(aps.cfg.is.greenstate){aps.cfg.multiAds["Inline"]=aps.cfg.allAds["Inline"]; aps.cfg.multiAds["RB"]=aps.cfg.allAds["RB"]; aps.cfg.multiAds["AP300"]=aps.cfg.allAds["AP300"] }}}aps.registerEvent(aps.event.on_ad_definition_loaded,function(){if(!aps.cfg.serveAds){return }aps.cfg.multi.createMultiAds(); Object.entries(aps.cfg.multiAds).forEach(function(d){if((!aps.cfg.juiceDirect&&!aps.cfg.juiceCustom)||aps.cfg.adMap.includes(d[0])){if(aps.cfg.ads[d[0]]){aps.cfg.bid.prefetch.checkMultiAd(aps.cfg.ads[d[0]]) }}}); var b=["Crown","Flex1"]; var c=aps.cfg.adMap.filter(function(d){return !b.includes(d) }); var a=aps.cfg.adMap.filter(function(d){return b.includes(d) }); aps.cfg.adMap=a.concat(c); aps.cfg.adMap.forEach(function(e){var d=aps.cfg.ads[e]; if(!d){aps.logInfo(e+" not found!"); aps.cfg.adMap=aps.cfg.adMap.filter(function(f){return f!=e }); return }d.checkForInclude={addAdSlot:false,stop:false}; aps.fireEvent(aps.event.on_check_include_ad,d); if(!d.checkForInclude.stop){d.checkForInclude.addAdSlot=true }if(d.checkForInclude.addAdSlot){aps.cfg.queuedAds.push(e) }}) }); aps.registerEvent(aps.event.on_render_ad,function(a){if(!aps.cfg.bid.enabled){return }aps.cfg.bid.prefetch.checkMultiAd(a.ad) }); aps.cfg.multi.createMultiAds=function(){Object.entries(aps.cfg.multiAds).forEach(function(c){var b=aps.cfg.multiAds[c[0]]; if((!aps.cfg.juiceDirect&&!aps.cfg.JuiceCustom)||aps.cfg.adMap.includes(c[0])){var a=aps.cfg.ads[b.code]||new aps.o.gamAd(b.code,b.width,b.height,b.sizeMappings); aps.cfg.multi.availableTypes[b.code]=a }}) }; aps.cloneAdMulti=function(c){if(aps.cfg.ads[c]){return }var a=c.split("-")[0]; var b=aps.cfg.ads[a]; if(b.code==undefined){return }var d=new aps.o.gamAd(c,b.width,b.height,b.sizeMappings); d.batchRequest="" }; aps.showLIST=function(b){if((JSON.stringify(b)=="[null]"||JSON.stringify(b)=="[]")&&!aps.cfg.dfp.isWaiting){aps.fn.logInfo("showLIST: Called with empty array"); return }aps.cfg.multi.enabled=true; var a=[]; b.forEach(function(f){var e=""; var g=f.id.split("-"); var d=true; if(g.length==1){aps.fn.logInfo("showLIST: Base ad "+g[0]+" won't be re-created"); d=false }e=g[0]; if(aps.cfg.multi.availableTypes[e]==undefined){aps.fn.logInfo("showLIST: This type of LIST ad is not supported"); d=false }if(d){var c=aps.cfg.ads[f.id]; if(!c){aps.cloneAdMulti(f.id); aps.fireEvent(aps.event.on_define_bid_data,aps.cfg.ads[f.id]); c=aps.cfg.ads[f.id] }if(!c.div){c.div=f; aps.fireEvent(aps.event.on_new_div,f) }a.push(f.id) }}); aps.cfg.lazyLoadingForced=aps.cfg.lazyLoadingForced||false; if(aps.cfg.lazyLoadingForced||(b.length>5&&aps.cfg.queuedAds.length>0)){if(!aps.cfg.lazyLoadingForced){aps.cfg.ivm.options.rootMargin="200px 0px 1000px 0px"; aps.cfg.ivm.options.delayBeforeDelete=3000; aps.cfg.lazyLoadingForced=true; aps.fn.logInfo("showLIST: LazyLoading of ads forced"); aps.fn.logInfo("*IVM* delayBeforeDelete : 3000"); aps.fn.logInfo("*IVM* rootMargin : "+aps.cfg.ivm.options.rootMargin); aps.cfg.bid.prefetch.allBidsOnRefresh=true; aps.cfg.bid.prefetch.delay=3000; aps.cfg.bid.excludedBidders=[]; if(aps.cfg.bid.excludedBidders.length>0){aps.cfg.bid.excludedBids.push(["aps.cfg.bid.excludedBidders.includes(bidder)","triplelift excluded, too many ads"]); aps.cfg.bid.pb.bidders=aps.cfg.bid.pb.bidders.filter(function(c){return !aps.cfg.bid.excludedBidders.includes(c) }); aps.cfg.bid.pb.biddersCount=aps.cfg.bid.pb.bidders.length; aps.cfg.bid.excludedBidders.forEach(function(c){aps.cfg.bid.pb.data[c]={extra:aps.cfg.bid.pb.data[c].extra} }); Object.entries(aps.cfg.ads).forEach(function(c){c[1].pb.bids=c[1].pb.bids.filter(function(d){return !aps.cfg.bid.excludedBidders.includes(d.bidder) }) }) }}aps.fn.logInfo("showLIST: Ready MULTI slots: "+a) }else{aps.fn.logInfo("showLIST: Calling MULTI slots: "+a); a.forEach(function(c){aps.cfg.queuedAds.push(c) }) }setTimeout(aps.fn.waitToCallGAM,200) } })();(function(){if(aps.cfg.is.wcm||aps.cfg.is.kfs||aps.cfg.is.platypus||aps.cfg.is.greenstate||aps.cfg.is.eedition){aps.fn.logInfo("IVM Enabling In-View ad Management"); aps.cfg.ivm={autoRefresh:{enabled:false,inViewOnly:true,viewableDelay:25000,},observed:[],observer:null,delayBeforeDelete:5000,options:{root:null,rootMargin:"200px 0px 1000px 0px",thresholds:0,},appendToObserver:function(a){if(!a||a.id==""||a.id=="NTV7ARD"){return }if(!aps.cfg.ivm.observed.includes(a.id)){aps.cfg.ivm.observed.push(a.id); aps.cfg.ivm.observer.observe(a); aps.logInfo("*IVM* observing "+a.id) }},callback:function(a){a.forEach(function(c){var b=aps.cfg.ads[c.target.id]; if(!b){return }if(b.div==null){b.div=document.getElementById(b.code) }var d=c.isIntersecting; var e=b.getPage(); b.div.dataset.inview=d; if(b.doNotRefresh){return }if(c.isIntersecting){aps.fn.tagAd(b); aps.fn.logInfo("*IVM* "+b.code+" in view"); if(b.state=="toDelete"){b.state="displayed" }else{if((b.state==null&&aps.cfg.lazyLoadingForced)||b.state=="cancelled"){b.state="firstLoad"; aps.fn.logInfo("*IVM* "+b.code+" loading"); b.impressionViewable=true; aps.fn.refreshAds([b.code]) }else{if(b.state=="deleted"||b.state=="reloading"){b.state="reloading"; aps.fn.logInfo("*IVM* "+b.code+" reloading"); b.impressionViewable=true; aps.fn.refreshAds([b.code]) }}}}else{if(b.renderCount>1){aps.fn.logInfo("*IVM* "+b.code+" out of view"); if(aps.cfg.ivm.delayBeforeDelete>0){b.state="toDelete"; b.ivm=new Date().valueOf() }}}}) }}; if(aps.cfg.is.platypus){if(aps.cfg.host=="www.sfgate.com"){aps.cfg.ivm.delayBeforeDelete=5000 }else{aps.cfg.ivm.delayBeforeDelete=120000 }}if(window.juice&&window.juice.ivm){if(window.juice.ivm.rootMargin){aps.cfg.ivm.options.rootMargin=window.juice.ivm.rootMargin }if(window.juice.ivm.autoRefresh){aps.cfg.ivm.autoRefresh=window.juice.autoRefresh }}aps.cfg.ivm.observer=new IntersectionObserver(aps.cfg.ivm.callback,aps.cfg.ivm.options); if(window.juice&&juice.definedTags&&juice.definedTags.ads){juice.definedTags.ads.forEach(function(a){var b=document.getElementById(a.code); if(b){aps.cfg.ivm.appendToObserver(b) }}) }if(aps.cfg.is.greenstate){aps.cfg.ivm.autoRefresh.enabled=true; aps.cfg.lazyLoadingForced=true }aps.registerEvent(aps.event.on_before_request_ads,function(a){a.ads.forEach(function(c){var b=document.getElementById(c); aps.cfg.ivm.appendToObserver(b) }) }); aps.registerEvent(aps.event.on_new_div,function(a){aps.cfg.ivm.appendToObserver(a) }); aps.registerEvent(aps.event.on_timer,function(d){var c=new Date().valueOf(); var e=document.visibilityState=="visible"; if(!e&&aps.cfg.ivm.tabHasFocus){aps.fn.logInfo("*IVM* tab has lost focus") }if(e&&!aps.cfg.ivm.tabHasFocus){aps.fn.logInfo("*IVM* tab has focus") }aps.cfg.ivm.tabHasFocus=e; var b=c-aps.cfg.ivm.delayBeforeDelete; var a=[]; Object.entries(aps.cfg.ads).forEach(function(h){var f=h[1]; if(f.state=="toDelete"){if(f.ivm=(f.viewableAt+aps.cfg.ivm.autoRefresh.viewableDelay)){i=true }}}if(i&&f.state!="reloading"){f.state="reloading"; f.impressionViewable=true; f.renderedAt=null; f.viewableAt=null; a.push(f.code) }}}}); if(a.length>0){aps.fn.logInfo("*IVM* auto refresh "+a); aps.fn.refreshAds(a) }}) }})();(function(){if(aps.cfg.is.kfs){aps.cfg.lazyLoadingForced=true; aps.cfg.ivm.autoRefresh.enabled=true; aps.cfg.ivm.delayBeforeDelete=-1; aps.cfg.excludeModules.push("criteo","ix"); if(aps.cfg.is.kfsComicsWidget||aps.cfg.is.kfsPuzzleWidget){aps.cfg.excludeModules.push("optimeraRTD") }if(typeof window.juice=="undefined"){window.juice={}; window.juice.definedTags={ads:[{code:"cmn-leaderboard"},{code:"cmn-leaderboard_2"},{code:"cmn-feed-inline_0"},{code:"cmn-aside_0"},{code:"cmn-tile-square"},{code:"side-by-side_ad-left_varying-1"},{code:"side-by-side_ad-right_varying-1"},{code:"side-by-side_ad-left_varying-2"},{code:"side-by-side_ad-right_varying-2"},{code:"inline-ad-slot-404"},{code:"inline-ad-slot-1"},{code:"inline-ad-slot-2"},{code:"inline-ad-slot-3"},{code:"mad"},]} }aps.fn.defineBaseAds=function(){aps.cfg.allAds=[]; new aps.o.baseAd("cmn-leaderboard",728,90,["0996x728x90","0996x970x90","0996x970x250","0996x620x366","0996x336x280","0996x320x100","0001x336x280","0001x325x204","0001x325x508","0001x320x100","0001x300x250"]); new aps.o.baseAd("cmn-leaderboard_2",728,90,["0996x728x90","0996x970x90","0996x970x250","0996x620x366","0996x336x280","0996x320x100","0001x336x280","0001x325x204","0001x325x508","0001x320x100","0001x300x250"]); new aps.o.baseAd("cmn-feed-inline_0",300,250,["0001x300x250"]); new aps.o.baseAd("cmn-aside_0",300,250,["0001x300x250"]); new aps.o.baseAd("cmn-tile-square",300,250,["0001x300x250"]); new aps.o.baseAd("side-by-side_ad-left_varying-1",300,250,["0001x300x250"]); new aps.o.baseAd("side-by-side_ad-right_varying-1",300,250,["0650x300x250"]); new aps.o.baseAd("side-by-side_ad-left_varying-2",300,250,["0001x300x250"]); new aps.o.baseAd("side-by-side_ad-right_varying-2",300,250,["0650x300x250"]); if(window.current_device==devices.MOBILE){new aps.o.baseAd("mad",320,50,["0001x320x50","0001x300x50","0650x000x000"]) }if(juice.definedTags&&juice.definedTags.ads){Object.entries(juice.definedTags.ads).forEach(function(b){if(b[1].code.startsWith("inline-ad-slot-")){new aps.o.baseAd(b[1].code,300,250,["0001x300x250"]) }else{var c=b[1].code; var f=b[1].width||aps.cfg.allAds[c].width; var d=b[1].height||aps.cfg.allAds[c].height; var e=b[1].sizeMappings||aps.cfg.allAds[c].sizeMappings; new aps.o.baseAd(b[1].code,f,d,e) }}) }}; aps.fn.defineBaseAds(); if(aps.cfg.is.kfsWidget){aps.cfg.bid.pb.data.pubmatic={"970x250":{"atf":{"publisherId":"157076","adSlot":"kingfeatures.com_970x90_AD@970x90"},},"728x90":{"atf":{"publisherId":"157076","adSlot":"kingfeatures.com_728x90_AD@728x90"},},"320x50":{"mad":{"publisherId":"157076","adSlot":"kingfeatures.com_320x50_MM@320x50"},},"300x250":{"atf":{"publisherId":"157076","adSlot":aps.fn.desktopOrMobile("kingfeatures.com_300x250_AD@300x250","kingfeatures.com_300x250_AM@300x250")},},}; aps.cfg.bid.pb.data.pubmatic.extra=aps.fn.setPrebidDefault(); aps.cfg.bid.pb.data.pubmatic.extra.run=prebid_source.SERVER_COMPATIBLE }if(aps.cfg.is.kfs&&!aps.cfg.is.kfsWidget&&window.current_device!==devices.MOBILE){new aps.o.baseAd("oop",1,1,["0001x001x001"]); var a=document.createElement("div"); a.id="oop"; a.width="1px"; a.height="1px"; document.body.appendChild(a) }window.addEventListener("hnp_spaNewPage",function(b){aps.pageWidth=window.innerWidth||window.screen.width||window.width||-1; Object.entries(aps.cfg.ads).forEach(function(c){if(aps.cfg.ivm.observed.includes(c[0])){aps.cfg.ivm.observer.unobserve(c[1].div); c[1].div.innerHTML="" }if(c[1].gam){googletag.destroySlots([c[1].gam]) }}); aps.cfg.ivm.observed=[]; aps.fn.hideAdDetails(); aps.fn.startFirstPage(); delete window.definedTags; aps.cfg.adMap=[]; aps.cfg.ads=[]; delete aps.page; aps.cfg.adDefinitionLoaded=false; aps.fn.defineBaseAds(); aps.fn.defineDefaultAds(); aps.page=definedTags; aps.cfg.adDefinitionLoaded=true; aps.fireEvent(aps.event.on_ad_definition_loaded,{}) }) }})();(function(){if(aps.cfg.is.greenstate){aps.registerEvent(aps.event.on_timer,function(){Object.entries(aps.cfg.multiAds).forEach(function(c){var d=document.querySelectorAll('[id^="'+c[0]+'"]'); d.forEach(function(e){if(e.id.endsWith("dbg")){return }if(aps.cfg.ivm.observed.includes(e.id)){return }hearstPlaceAd(e.id) }) }); if(!aps.cfg.ivm.observed.includes("AP300")){var b=document.getElementById("AP300--1"); if(b){b.id="AP300"; hearstPlaceAd("AP300") }}if(!aps.cfg.ivm.observed.includes("MAD")){var a=document.getElementById("AGS_MAD"); if(a){a.id="MAD"; hearstPlaceAd("MAD") }}}); aps.registerEvent(aps.event.on_define_adUnit,function(b){var c=b.page; var a=b.adUnit; a.levelTwo.value="Homepage"; if(c.path.length>0){if(c.path.length==1){a.levelTwo.value="channel" }else{a.levelTwo.value="article" }}a.levelTwo.forced=true }); aps.registerEvent(aps.event.on_new_page,function(a){a.datalayer.content.keyNlpCategories=["cannabis"]; if(a.path.length==0){a.page_type2="homepage" }else{if(a.path.length==1){a.page_type2="channel" }else{a.page_type2="article" }if(["news","explained","lifestyle","perspective","health","food-drink","travel","arts"].includes(a.path[0])){a.sectionPath.push(a.path[0]); a.addPageKvp("section3",a.path[0]) }}a.addPageKvp("page_type2",a.page_type2,true) }) }})();(function(){if(aps.cfg.is.platypus){aps.pageWidth=window.innerWidth; window.current_device=(aps.pageWidth<768)?devices.MOBILE:devices.DESKTOP; aps.cfg.lazyLoadingForced=true; var a=2; if(aps.cfg.abtestvar.includes("ENG13594_V1")){aps.logInfo("ENG13594 - enabling autoRefresh"); aps.cfg.ivm.autoRefresh.enabled=true; aps.cfg.ivm.autoRefresh.viewableDelay=30000 }aps.cfg.platScreenSize=window.HDN.dataLayer.ads.screenSize; aps.fn.setPlatAds=function(){var b=document.querySelectorAll('[data-block-type="ad"]'); if(b.length>0){aps.cfg.platypusAdUnit=b[0].dataset.unit.split("/")[1]; if(document.location.pathname=="/"){aps.cfg.platypusAdUnit="homepage" }}b.forEach(function(c){if(c.dataset[aps.cfg.platScreenSize+"Id"]){c.id=c.dataset[aps.cfg.platScreenSize+"Id"] }aps.cfg.ivm.appendToObserver(c) }) }; aps.fn.setPlatAds(); aps.registerEvent(aps.event.on_before_define_adUnit,function(b){b.levelTwo.value=aps.cfg.platypusAdUnit; b.levelTwo.forced=true }); window.addEventListener("hnp_spaNewPage",function(c){Object.entries(aps.cfg.ads).forEach(function(d){if(aps.cfg.ivm.observed.includes(d[0])){aps.cfg.ivm.observer.unobserve(d[1].div); d[1].div.innerHTML="" }if(d[1].gam){googletag.destroySlots([d[1].gam]) }}); aps.cfg.ivm.observed=[]; aps.fn.hideAdDetails(); googletag.cmd.push(function(){googletag.setAdIframeTitle("3rd party ad content page "+a++) }); aps.cfg.allAds=[]; delete window.definedTags; aps.cfg.adMap=[]; aps.cfg.ads=[]; delete aps.page; aps.cfg.adDefinitionLoaded=false; aps.cfg.juiceMdUrlHash=HDN.dataLayer.visit.urlHash; delete aps.cfg.revenueProfile; aps.fn.defineBaseAds(); var b=document.querySelectorAll('[data-block-type="ad"]'); if(b.length>0){aps.cfg.platypusAdUnit=b[0].dataset.unit.split("/")[1]; if(document.location.pathname=="/"){aps.cfg.platypusAdUnit="homepage" }}aps.fn.startFirstPage(); aps.fn.setPlatAds(); aps.fn.defineDefaultAds(); aps.page=definedTags; aps.cfg.adDefinitionLoaded=true; aps.fireEvent(aps.event.on_ad_definition_loaded,{}) }) }})();(function(){aps.fn.getHDNnlpWithId=function(e,g,d){var f=[]; try{var a=e.datalayer.content["keyNlp"+g]; for(var c=0; c0){b=b.concat("a_"+e) }e=aps.fn.getHDNnlpWithId(d,"ConsumerGood","g"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Event","e"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Location","l"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Organization","o"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Person","p"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"Unknown","u"); if(e.length>0){b=b.concat(e) }e=aps.fn.getHDNnlpWithId(d,"WorkOfArt","w"); if(e.length>0){b=b.concat(e) }d.addPageKvp("nlp_entities",b) }catch(c){aps.fn.logInfo("nlp_categories: exception") }}) })();(function(){aps.hash=aps.hash||{}; aps.codec=aps.codec||{}; aps.bitArray={bitSlice:function(b,d,c){b=aps.bitArray._shiftRight(b.slice(d/32),32-(d&31)).slice(1); return(c===undefined)?b:aps.bitArray.clamp(b,c-d) },extract:function(b,d,c){var f,e=Math.floor((-d-c)&31); if((d+c-1^d)&-32){f=(b[d/32|0]<<(32-e))^(b[d/32+1|0]>>>e) }else{f=b[d/32|0]>>>e }return f&((1<0&&d){b[c-1]=aps.bitArray.partial(d,b[c-1]&2147483648>>(d-1),1) }return b },partial:function(b,c,a){if(b===32){return c }return(a?c|0:c<<(32-b))+b*1099511627776 },getPartial:function(a){return Math.round(a/1099511627776)||32 },equal:function(c,d){if(aps.bitArray.bitLength(c)!==aps.bitArray.bitLength(d)){return false }var f=0,e; for(e=0; e=32; g-=32){f.push(c); c=0 }if(g===0){return f.concat(b) }for(d=0; d>>g); c=b[d]<<(32-g) }e=b.length?b[b.length-1]:0; h=aps.bitArray.getPartial(e); f.push(aps.bitArray.partial(g+h&31,(g+h>32)?c:f.pop(),1)); return f },_xor4:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]] },byteswapM:function(b){var c,e,d=65280; for(c=0; c>>24)|((e>>>8)&d)|((e&d)<<8)|(e<<24) }return b }}; aps.codec.hex={fromBits:function(a){var c="",b; for(b=0; b>>8>>>8>>>8); e<<=8 }return decodeURIComponent(escape(d)) },toBits:function(c){c=unescape(encodeURIComponent(c)); var b=[],a,d=0; for(a=0; a9007199254740991){throw ("Cannot hash more than 2^53 - 1 bits") }if(typeof Uint32Array!=="undefined"){var d=new Uint32Array(a); var g=0; for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(d.subarray(16*g,16*(g+1))); g+=1 }a.splice(0,16*g) }else{for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(a.splice(0,16)) }}return this },finalize:function(){var d,a=this._buffer,c=this._h; a=aps.bitArray.concat(a,[aps.bitArray.partial(1,1)]); for(d=a.length+2; d&15; d++){a.push(0) }a.push(Math.floor(this._length/4294967296)); a.push(this._length|0); while(a.length){this._block(a.splice(0,16)) }this.reset(); return c },_init:[],_key:[],_precompute:function(){var c=0,e=2,a,d; function b(f){return(f-Math.floor(f))*4294967296|0 }for(; c<64; e++){d=true; for(a=2; a*a<=e; a++){if(e%a===0){d=false; break }}if(d){if(c<8){this._init[c]=b(Math.pow(e,1/2)) }this._key[c]=b(Math.pow(e,1/3)); c++ }}},_block:function(t){var q,s,c,d,e=this._h,r=this._key,f=e[0],g=e[1],j=e[2],l=e[3],m=e[4],n=e[5],o=e[6],p=e[7]; for(q=0; q<64; q++){if(q<16){s=t[q] }else{c=t[(q+1)&15]; d=t[(q+14)&15]; s=t[q&15]=((c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t[q&15]+t[(q+9)&15])|0 }s=(s+p+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(o^m&(n^o))+r[q]); p=o; o=n; n=m; m=l+s|0; l=j; j=g; g=f; f=(s+((g&j)^(l&(g^j)))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10))|0 }e[0]=e[0]+f|0; e[1]=e[1]+g|0; e[2]=e[2]+j|0; e[3]=e[3]+l|0; e[4]=e[4]+m|0; e[5]=e[5]+n|0; e[6]=e[6]+o|0; e[7]=e[7]+p|0 }} })();(function(){if(!aps.cfg.serveAds){return }if(!aps.cfg.is.platypus){aps.fn.setPerformanceMetrics("GoogleLoadingStart","loading google"); aps.fn.insertScript("txt/f.txt",true,"text/javascript","gdfp") }aps.cfg.ppid=""; var a=aps.fn.getCookie("BCSessionID"); if(a!=""){aps.cfg.ppid=aps.codec.hex.fromBits(aps.hash.sha256.hash(a)); aps.fn.logInfo("PublisherProvidedId: "+a+" hash: "+aps.cfg.ppid) }else{aps.fn.logInfo("PublisherProvidedId: BCSessionID not detected") }googletag.cmd.push(function(){aps.fn.setPerformanceMetrics("GoogleLoaded","google ready"); googletag.pubads().collapseEmptyDivs(false); googletag.pubads().enableSingleRequest(); googletag.pubads().disableInitialLoad(); googletag.pubads().setPrivacySettings({childDirectedTreatment:false}); googletag.pubads().set("page_url",document.location.href); googletag.enableServices(); try{var c=JSON.parse(aps.fn.getCookie("location_data")); if(c.is_eu){aps.cfg.disablePersonalisation=true }}catch(b){}if(aps.cfg.disablePersonalisation){aps.fn.logInfo("disabling personalizedAds"); googletag.pubads().setRequestNonPersonalizedAds(1) }if(aps.cfg.ppid!=""){googletag.pubads().setPublisherProvidedId(aps.cfg.ppid) }googletag.pubads().addEventListener("slotRenderEnded",function(d){if(typeof d.slot.getSlotId!="undefined"){if(typeof d.slot.getSlotId().getDomId!="undefined"){aps.fn.onRender(d) }}}); googletag.pubads().addEventListener("impressionViewable",function(f){if(typeof f.slot.getSlotId!="undefined"){var e=f.slot.getSlotId().getDomId(); if(typeof(e)!="undefined"){aps.fn.setPerformanceMetrics("FirstAdViewable","*VIEW "+e); var d=aps.cfg.ads[e]; if(d){d.impressionViewable=true; d.viewableAt=new Date().valueOf() }}}}); aps.fn.requestAds() }); window.hearstGetVideoAdTagSize=function(b){var f=""; if(b.sizeMappings!=undefined&&b.sizeMappings.length>0){var e=[]; for(var d=0; d1&&parseInt(c[2],10)>4){e.push(parseInt(c[1],10)+"x"+parseInt(c[2],10)) }}f="?sz="+e.join("%7C") }else{f="?sz="+encodeURIComponent(b.width+"x"+b.height) }return f }; window.hearstGetVideoAdTag=function(c){if(aps.cfg.videoAdTag==null){aps.cfg.videoAdTag={width:1,height:4,code:"Video_MOS",rm:false,interstitial:false,sizeMappings:["001x400x300","001x640x360","001x640x480","001x001x004"],video:true,companion_units:null,kvps:[],} }var b=aps.cfg.videoAdTag; if(typeof(b)=="undefined"){aps.fn.logInfo("hearstGetVideoAdTag called with non-defined ad slot "+c+" : ignoring "); return null }if(b.video==false){aps.fn.logInfo("hearstGetVideoAdTag called non video defined ad slot "+c); return null }var g=hearstGetVideoAdTagSize(b); var h="https://pubads.g.doubleclick.net/gampad/ads"; h+=g; h+="&iu=/"+encodeURIComponent(aps.cfg.networkCode+"/"+aps.cfg.page.current.adUnit); h+="&url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); h+="&impl=s"; h+="&gdfp_req=1"; h+="&env=vp"; h+="&output=xml_vast3"; h+="&page_type="+aps.cfg.page.current.page_type2; h+="&unviewed_position_start=1"; h+="&description_url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); h+="&vpos=preroll"; h+="&ad_safe=medium"; if(b.companion_units!=null&&b.companion_units!=""){h+="&ciu_szs="+encodeURIComponent(b.companion_units) }else{h+="&ciu_szs=" }var d=""; d+="distributor_domain="; if(aps.cfg.page.current.domain.indexOf("m.")==0){d+=aps.cfg.page.current.domain.substr(2) }else{d+=aps.cfg.page.current.domain }d+="&page_type2="+aps.cfg.page.current.page_type2; d+="&pageurl="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); d+="&referrer="+encodeURIComponent(document.referrer); d+="&urlhash="+aps.cfg.juiceMdUrlHash; d+="&pw=__player-width__&ph=__player-height__"; d+=(aps.cfg.vid.tagUrl=="")?"":"&"+aps.cfg.vid.tagUrl; for(var e=0; e0){aps.fn.logInfo("npabtest : "+aps.cfg.abtestvar); aps.cfg.abtestvar.forEach(function(a){aps.cfg.page.addBaseKvp("ab",a); aps.cfg.page.addBaseKvp("hnpab",a); if(a=="ENG10993_C"){aps.cfg.bid.enableOptimization=false }}) }else{aps.fn.logInfo("npabtest not detected.") }aps.cfg.page.addBaseKvp("v",aps.cfg.version) }; aps.fn.startFirstPage() })();(function(){aps.cfg.thirdp={"permutive":0,"tmt":0,"a9":0,"identityhub":0,"prebid":0,}; var setAll=-1; if(aps.cfg.page.current.queryParameter["jtp[*]"]==1){setAll=1 }if(aps.cfg.page.current.queryParameter["jtp[*]"]==0){setAll=0 }Object.entries(aps.cfg.thirdp).forEach(function(entry){if(setAll>-1){aps.cfg.thirdp[entry[0]]=setAll }if(aps.cfg.page.current.queryParameter["jtp["+entry[0]+"]"]){aps.cfg.thirdp[entry[0]]=eval(aps.cfg.page.current.queryParameter["jtp["+entry[0]+"]"]) }}); if(aps.cfg.thirdp.prebid){aps.cfg.page.current.pbBidsReceived=1 }if(aps.cfg.thirdp.a9){aps.cfg.page.current.a9BidsReceived=1 }})();(function(){if(!aps.cfg.serveAds){return }if(aps.cfg.thirdp.permutive){return }if(aps.cfg.is.eedition){return }if(!aps.fn.shouldRunThirdParty("permutive")){return }aps.cfg.permutive=aps.cfg.permutive||{}; aps.cfg.permutive.excludedFrom=["www.sfgate.com/partner/transparensee","www.mysanantonio.com/partner/transparensee","www.timesunion.com/partner/transparensee","https://realestate.timesunion.com/"]; aps.cfg.permutive.setPermutiveValue=function(page,arrToTest){var retValue=null; if(!arrToTest.length){arrToTest=[arrToTest] }for(var i=0; i0){window.permutive.identify(page.permutive.UserIds) }permutive.addon("web",page.permutive.config); if(aps.cfg.doNotSell){permutive.consent({"opt_in":false}) }aps.fn.insertScript("https://"+page.permutive.organization_id+".edge.permutive.app/"+page.permutive.workspace_id+"-web.js",true); aps.fn.logInfo("Permutive: Loading") }; aps.fn.setPermutiveValues(aps.cfg.page.current); aps.registerEvent(aps.event.on_new_page,function(page){aps.fn.setPermutiveValues(page) }); aps.registerEvent(aps.event.on_before_request_ads,function(request){request.page.permutive.ids=googletag.pubads().getTargeting("permutive"); if(request.page.permutive.ids.length===0){try{request.page.permutive.ids=JSON.parse(localStorage.getItem("_pdfps")) }catch(e){request.page.permutive.ids=[] }request.page.permutive.ids=request.page.permutive.ids||[]; if(request.page.permutive.ids.length>request.page.permutive.maxItems){aps.fn.logInfo("Permutive: "+request.page.permutive.ids.length+" audiences found"); if(request.page.domain!="stamfordadvocate.com"){request.page.permutive.ids=request.page.permutive.ids.slice(0,request.page.permutive.maxItems) }}aps.fn.logInfo("Permutive (from local storage)") }else{request.page.permutive.ids=request.page.permutive.ids||[]; if(request.page.permutive.ids.length>request.page.permutive.maxItems){aps.fn.logInfo("Permutive: "+request.page.permutive.ids.length+" audiences found"); if(request.page.domain!="stamfordadvocate.com"){request.page.permutive.ids=request.page.permutive.ids.slice(0,request.page.permutive.maxItems) }}}var permutiveKvp=request.page.kvps.filter(function(kvp){return kvp.key=="permutive" })[0]; if(permutiveKvp){permutiveKvp.value=[] }request.page.addPageKvp("permutive",request.page.permutive.ids,true) }) })();(function(){if(!aps.cfg.bid.enabled){return }aps.cfg.bid.prefetch={enabled:true,delay:10000,allBidsOnRefresh:false,que:[],refreshTimeout:2500,timeout:2500,timeoutPadding:10*1000,multiAdsToPrefetch:4,version:1.4,a9:{adUnits:[],enabled:true,},pb:{adUnits:[],bidCount:[],biddersDone:[],calledBidders:[],clientSideBidders:[],enabled:true,},checkMultiAd:function(a){if(!a.multiAd||aps.cfg.infiniteScroll){return }if(aps.cfg.is.wcm||aps.cfg.is.greenstate){var b=(parseInt(a.code.split("-")[1])+1)||1; var c=b+aps.cfg.bid.prefetch.multiAdsToPrefetch; if(aps.page_type2=="slideshow list view"){c=b+10 }for(var d=b; d1000 }); c.forEach(function(f){var d=aps.cfg.ads[f.code]; var e=document.getElementById(f.code); if(e.firstChild&&e.firstChild.name&&e.firstChild.name.startsWith("google")){e=e.firstChild }var g=e.getClientRects(); if(g.length>0){d.renderedSize=Math.round(g[0].width)+"x"+Math.round(g[0].height); f.renderedSize=d.renderedSize; f.advertiser=d.advertiser; f.sizes=d.stringSizes.join(",") }f.done=true }) }); aps.registerEvent(aps.event.on_new_div,function(b){var a=aps.cfg.ads[b.id]; var c=0; a.div=b; if(aps.cfg.is.wcm){if(b.dataset&&b.dataset.scrolldepth){c=b.dataset.scrolldepth }a.scrollDepth=c }aps.logInfo("*DIV* New div : "+b.id+" scrollDepth: "+c) }) })();(function(){try{aps.cfg.adtestparam=aps.cfg.page.current.queryParameter["adtest"]; if(aps.cfg.adtestparam){aps.page_kvps=aps.page_kvps||[]; aps.cfg.adtestparam=decodeURI(aps.cfg.adtestparam).split("|"); for(var d=0; d1){aps.fn.logSkip(f,"ad already displayed - aps.placeAd"); return }c.push(f); aps.cfg.dfp.waiting.push(f); aps.cfg.dfp.isWaiting=true; d=true }); aps.fn.logInfo("aps.placeAd: called with values: "+b.join(",")); if(c.length==0){aps.fn.logInfo("aps.placeAd: No ad to proceed"); return }aps.fn.logInfo("aps.placeAd: processing: "+c.join(",")); aps.waitStartStep("lazyload") }; if(aps.cfg.dfp.lazyload.enabled){aps.fn.logInfo("lazyloading: enabled"); aps.registerEvent(aps.event.on_check_include_ad,function(a){var c=aps.cfg.adMap.filter(function(d){return !aps.cfg.dfp.lazyload.firstLoad.includes(d) }); var b=aps.cfg.dfp.lazyload.firstLoad.filter(function(d){return aps.cfg.adMap.includes(d) }); aps.cfg.adMap=b.concat(c); aps.cfg.queuedAds=aps.cfg.queuedAds.concat(b) }) }})();(function(){aps.cfg.dfp.batchSRA={delay:3000,enabled:(window.location.search.indexOf("batchsra=1")!==-1||aps.cfg.host.toLowerCase()=="sfinsider.sfgate.com")?true:false,auto:false,waitingNext:false,hasScrolled:false,userInteractFor:1,atfFirst:true,completed:false,}; if(HDN.dataLayer.ads.adMode=="batch"){aps.cfg.dfp.batchSRA.enabled=true; aps.logInfo("BatchSRA enabled") }if(aps.cfg.dfp.batchSRA.enabled){aps.fn.onScroll=function(){if(!aps.cfg.dfp.batchSRA.waitingNext||aps.cfg.dfp.batchSRA.hasScrolled){return }aps.fn.logInfo("Batch SRA : Scrolled"); aps.cfg.dfp.batchSRA.auto=true; aps.cfg.dfp.batchSRA.hasScrolled=true; aps.cfg.dfp.batchSRA.waitingNext=false; aps.fn.displayNextBatch() }; aps.fn.logInfo("Batch SRA : listening to Scroll event"); if(window.addEventListener){window.addEventListener("scroll",aps.fn.onScroll,false); window.addEventListener("click",aps.fn.onScroll,false) }else{if(window.attachEvent){window.attachEvent("onscroll",aps.fn.onScroll); window.attachEvent("onclick",aps.fn.onScroll) }}aps.registerEvent(aps.event.on_check_include_ad,function(a){a.checkForInclude.stop=true; if(a.position=="atf"||a.position=="mad"){a.checkForInclude.addAdSlot=true }}); aps.fn.displayNextBatch=function(){if(aps.cfg.dfp.batchSRA.completed){return }var a=Object.entries(aps.cfg.ads).filter(function(b){return b[1].renderCount==1 }).map(function(b){return b[0] }); if(a.length>0){aps.cfg.queuedAds=aps.cfg.queuedAds.concat(a); aps.fn.requestAds() }aps.cfg.dfp.batchSRA.completed } }})();(function(){if(aps.cfg.is.leafsSite){if(document.cookie.split(";").filter(function(a){return a.indexOf("region=EU")>=0 }).length==1){aps.fn.logInfo("region EU detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true; if(document.location.href.indexOf("gdpr=true")>-1){aps.cfg.bid.enableGDPR=true }}}else{if(document.location.href.indexOf("?is_eu=1")>-1){aps.fn.logInfo("region EU (test) detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true }}})();(function(){if(!aps.cfg.serveAds){return }if(aps.cfg.thirdp.tmt){return }if(aps.cfg.is.leafsSite){return }var d={"beaumontenterprise.com":"75e9ad4b5f1f1f3de38dea085cc34f079b9d8243999d3b30d70a543f2c3ae813","sfgate.com":"1cbbeea35302b334c17ec7de41048b19077c3452b8825fa3017876cf49d877c2","chron.com":"b8d94fd702b39f91830ea26eb261a1dd7eb3f9d18e86f88c83f7a317f3115379","mysanantonio.com":"3c81fd9605d796d254c7bdc62001ec2c520515c7c306b66b713a4421f7343766","seattlepi.com":"a3e9f57e66bb33f8f8995e6866a7eace83bca9720ee52bb2d8ab18fb8dddae94","sfchronicle.com":"a5e03e178aaf9b41b3fc69428362339bd7ba9a606118acee43f6169a1f7f9847","houstonchronicle.com":"48a6940997d234b7add9af8ed2b41694654edaeb6e7b5827579702d25182700b","expressnews.com":"d65ba7cd6a96847162fb556c3a5dc7b7e66de309481ec4e558b4e9dc40515858","timesunion.com":"f999472effec7a1ef427ab8ed55df47b4d250f60f376ce71f7293b353026f514","ctpost.com":"1118fad26ca4bcdf2a99fdee52724e3c512a258c149cbd8e6c4084c13040e86a","stamfordadvocate.com":"2df4f16391dbd310915a08bd62897dde4902fe30a7c29dcb2b80ba04345df633","nhregister.com":"2370d2dc32ab1b0d0894de8f024e2764a55756c723edb12fa7d7b6b221922fba","newstimes.com":"68fab42777221c69e8d127d9ba7a8b29e0ba95aae66e6166eb070c330ac04c0f","greenwichtime.com":"4a6fb4d137bab5bdc207d09d4b1acfc191dbad1e9e0e3190ca676d3730195d06","thehour.com":"049118934d099a757a2987317f05327a8ccd5a7c1501feaf8e4639fadbdb8936","ctinsider.com":"21b81f81bd7fa576db043ec887848073bbc6eafc46d9f8bec5240163093e2d46","registercitizen.com":"3377ba9d7d5061bf618f4ae6d3900e0067f913f99748fc366b7cb1542e6a96b2","middletownpress.com":"4f1f32e75691195dd027c417eed6c56d8a37e7ed729eb57c8ecd8abf8d5f420b","thetelegraph.com":"bf557221a53f15d39c7bce3aeed56dd6c13e57b3eba48f8e4fd2d54af42f0122","ourmidland.com":"37af6c3aa88542ced759eb5a9c478617d1b50eeae32789a669e3facca42eb56a","myjournalcourier.com":"5497becf77524b62bee5a589030b1e2163d34a60b7d960cdc976afc12b64d623","michigansthumb.com":"601647fe4d84d12a565e709dc7e944d38db91923d65d9bb6865788234f41893d","theintelligencer.com":"aadf36ee0d8d0f2765013057eb1bad1a552f9377dfc4b532d9b698df9a655884","manisteenews.com":"a2031afbd2e08a959fa777db882a99b7cc56d1dbff61d9d2d56c20a89c6d8b7e","bigrapidsnews.com":"7c907dba0dac340d4f0b3879a3d1699f0bf19e2a95b06945aa3b31cfde002c09","recordpatriot.com":"d4c71cee77592309f10e62ab4ce1a4d995719a82a77932eee5fc18a7948e2f41","lakecountystar.com":"2a7c7fb608092db498480edf2068123ffcd679d5ce9e8819760338386e1350e4","theheraldreview.com":"1655d53ab46f5391a09e189a8cf86f8e22098886ea6a2ae727b112087a05cbd0","yourconroenews.com":"aa3912f9cfd7f1fafd025dbd846d2383acce1b3574061b2c9508d43d5cc653da","lmtonline.com":"ffd0921bb88989b2dc6bac92611425966d93e8be7cf154e95fd27ae95db26375","mrt.com":"08621a723e4a1cd4ba4c25f46ce953173b9b3cffad4ec0bfb9b0e5d22bc22bc8","myplainview.com":"b49696bc422c346e4f4282e32cfc324d782f32b9c9d0fec6751d29dc0862bf61","theridgefieldpress.com":"053f373cd281b81bb04913797ec13da4438c7cc4596fc29e382ce5a1a93ce32d","ncadvertiser.com":"eaff3ad2730aea1b010a2434dad485aef8e1a473f8977f048e5888c27a0a8b15","fairfieldcitizenonline.com":"ddbcce19fd54ba6f20d8e3bedb35cfea7887e9579c34d38307b3f3fa3f659ab0","wiltonbulletin.com":"7ef8a69225bec566b6a15690bd94081ed7898400ff9a8c68ac05ee924c2c2ce3","darientimes.com":"f0790e5c63dd390570f98d8b20ad18ee2666f8184dc03434de1c60fb823ff71c","trumbulltimes.com":"909616d5d05133cda02800bf40834036448deeea436efebe0d39fcb3f3f4bec8","sheltonherald.com":"2ea54058f6365a6a2bcb4ecda879ff406900d5b274c1e1ed6e2f0e746ad5068f","milfordmirror.com":"0f7190eb184e8a5af5171a9ea07a792b5a193725ebdb8a2c55a30ff187802fef","southeasttexas.com":"1ca0a738d5cf7bb8ce1434d5522573d7f6894098e4706151b2882420b6bb6c62","gametimect.com":"c5a3ed040f3b98d6d9877a09dc7f00f3ba126d6f10836272b84a07be9ced5df7","shorelinetimes.com":"91a7025281ac9294e20e8cdd7b9c5d6414f44d887193db48097942a2404a9d1d","countytimes.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","westhartfordnews.com":"5de2ce5445b39d5609215833a7fa6410f027135902d458f6751d115c11c33634","dolphin-news.com":"041a5d17decdae44358ae2eca8065b501b5a4936882e2188a3d41470b64eb47d","ctpostchronicle.com":"645700f07ec80b72131b2a6fc97f8f43da5820ce68bd559b0b507dfdf08f9f6a","ctbulletin.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","greenstate.com":"412163cc8d602f027626c2ffab24515bd8f6ff426d0d4096330b64d8e7681e03","canyonnews.com":"593c0a648b760954871854fb60be6dfc252fd7387de8bcb568ebf2cd5449f3d8","sellitlaredo.com":"a86e9a199fadcfd738a0fa46b3fa9381cbb92bdc9b7a75b7fa222e143eaac6b9","comicskingdom.com":"5bf6a1e0d11973210ea5c35cfa0df62607e66f86c41d8b2a69030b0575fd89ce","weekand.com":"1f219ce7e5d1e402d2ff47ffc3f1d841e9749a13c4e7daa4320056eceda56f04",}; var b=d[aps.cfg.current_domain]||""; if(b!=""){aps.fn.logInfo("The Media Trust: Loading"); var a=document.getElementsByTagName("script")[0]; var c=document.createElement("script"); c.async=1; c.src="https://scripts.webcontentassessor.com/scripts/"+b; a.parentNode.insertBefore(c,a); window.addEventListener("tmt_blockedAd",function(h){var f=aps.cfg.ads[h.detail]; aps.fn.logInfo("*TMT* "+f.code+" blocked"); f.state="forcedRefresh"; f.addAdKvp("hnp","tmt_refreshed"); aps.fn.refreshAds([f.code]); try{var i=""; var j=f.gam.getResponseInformation(); Object.entries(j).forEach(function(e){i+="&"+e[0]+"="+e[1] }); aps.fn.sendLog("tmt=1&href="+window.location.href+"&tmt=1"+i,true) }catch(g){}}) }})();(function(){aps.fn.onRender=function(c){if(aps.cfg.noRefresh&&aps.cfg.noRefresh.triggered){return }var f={}; var g=c.slot||null; f.slot=g; f.divid=g.getSlotElementId(); f.ad=aps.cfg.ads[f.divid]; if(f.divid&&f.divid.startsWith("browsi")){return }if(f.ad){aps.cfg.adRendered=true; f.targetingMap=g.getTargetingMap(); f.responseInfo=g.getResponseInformation(); f.emptyAd=c.isEmpty; f.adsize=c.size||null; f.request=aps.cfg.dfp.requests[f.targetingMap.i]; f.bidInfo=""; g.currentBids=g.currentBids||[]; f.originalBid=(g.currentBids.length>0)?JSON.parse(JSON.stringify(g.currentBids[0])):null; f.winningBid=null; f.lineitemId=c.lineItemId||null; if(f.lineitemId==null&&f.responseInfo){if(f.responseInfo.lineItemId==null&&f.responseInfo.yieldGroupIds!=null){f.lineitemId=f.responseInfo.yieldGroupIds[0] }}f.ad.state=(f.emptyAd)?"empty":"displayed"; f.ad.renderCount++; f.ad.renderedAt=new Date().valueOf(); f.ad.isLoading=false; f.ad.refreshable=true; f.ad.advertiserId=c.advertiserId; f.ad.size=f.adsize; f.ad.lineItemId=c.lineItemId; f.ad.creativeId=c.creativeId; f.ad.isEmpty=f.emptyAd; f.html=""; if(f.ad.code=="Crown"&&f.ad.advertiserId==4958539431){f.ad.div.style="display:none" }if(f.ad.creativeId){f.html=g.getHtml() }f.adType="banner"; if(f.targetingMap.hb_format){f.adType=f.targetingMap.hb_format[0] }if(f.adType=="native"&&f.html.indexOf("pbNativeTagData")==-1){f.adType="banner" }if(f.ad.kvps.includes("hnp")){g.clearTargeting("hnp") }var a=f.ad.kvps.filter(function(e){return(e.key=="customblank") }); var d=(a.length>0&&a[0].value.includes("blank_refresh"))||false; if(f.emptyAd){if(!["Crown","LNLogo","EEinsert","exit"].includes(f.divid)&&!d){f.ad.addAdKvp("customblank","blank_refresh"); aps.cfg.queuedAds.push(f.divid); aps.fn.logInfo("*BLANK* "+f.divid+" - blank ad served. Refreshing"); aps.fn.requestAds() }if(d&&f.divid.dataset&&f.divid.dataset.slug=="Advertisement"){aps.fn.logInfo(f.divid+" - slot empty: hiding div"); f.divid.style.display="none" }}f.advertiser=(f.responseInfo&&f.responseInfo.advertiserId!=null)?"Direct Ad":"No Ad"; if(f.advertiser!="No Ad"){if(aps.cfg.advertisers[f.responseInfo.advertiserId]){f.advertiser=aps.cfg.advertisers[f.responseInfo.advertiserId] }if(c.yieldGroupIds!=null){f.advertiser="exb/"+f.advertiser; try{if(typeof(companyIds[0])!="undefined"){f.advertiser="ExB/"+aps.cfg.advertisers[companyIds[0]] }}catch(b){}}}if(aps.cfg.infoDivDisplaying==f.ad.code){aps.fn.setAdDetails(f.ad.code) }f.ad.advertiser=f.advertiser; if(aps.cfg.logToConsole){f.ad.render=f }aps.fireEvent(aps.event.on_render_ad,f); aps.fn.tagAd(f.ad); aps.fn.logInfo("*IMP* "+aps.fn.fixLen(f.ad.code,10)+" "+aps.fn.fixLen(f.advertiser,14)+" lineitem: "+aps.fn.fixLen(f.lineitemId,12)+f.bidInfo) }}; aps.registerEvent(aps.event.on_render_ad,function(c){if(c.ad.advertiserId==4594233306){var a=document.getElementById(c.ad.code).firstChild; var b=a.style.cssText||""; b=(b=="")?"flex-grow:1":"flex-grow:1; "+b; a.setAttribute("style",b) }}); aps.registerEvent(aps.event.on_render_ad,function(a){if(a.html.indexOf("HNP-RM-NoRefresh")>-1){aps.fn.logInfo(a.ad.code+": NoRefresh detected"); a.ad.refreshable=false; a.ad.doNotRefresh=true }}); aps.registerEvent(aps.event.on_render_ad,function(e){if(e.html.indexOf("celtra")>-1){if(aps.cfg.preventCeltraAdsToRefresh){var a=e.ad; if(aps.cfg.dfp.celtraAds.indexOf(a.code)==-1){aps.cfg.dfp.celtraAds.push(a.code); aps.fn.logInfo(a.code+": Celtra ad detected") }e.ad.refreshable=false; e.ad.doNotRefresh=true; if(e.ad.code=="Crown"||e.ad.code=="Flex1"){if(aps.fn.getQueryParameterByName("plainceltra")==null){aps.cfg.dfp.celtra.preventMonitorIframe=aps.cfg.dfp.celtra.preventMonitorIframe||false; aps.cfg.dfp.celtra.checkMonitorIframe=aps.cfg.dfp.celtra.checkMonitorIframe||false; if(!aps.cfg.dfp.celtra.checkMonitorIframe){aps.cfg.dfp.celtra.checkMonitorIframe=true; aps.page.kvps.forEach(function(f){if(f.key=="testpage"&&f.value=="NYC_AdTech_CeltraViewTest"){aps.cfg.dfp.celtra.preventMonitorIframe=true }}) }if(aps.cfg.dfp.celtra.preventMonitorIframe){aps.fn.logInfo("Not loading CeltraIframeFix"); return }aps.cfg.dfp.celtra.divs=aps.cfg.dfp.celtra.divs||[]; aps.cfg.dfp.celtra.monitorIframe=aps.cfg.dfp.celtra.monitorIframe||false; var c=document.getElementById("google_ads_iframe_"+e.slot.getSlotId().getId()); aps.cfg.dfp.celtra.divs.push(c); if(!aps.cfg.dfp.celtra.monitorIframe){aps.cfg.dfp.celtra.monitorIframe=true; c.addEventListener("load",function(f){aps.fn.monitofCeltraIframe(0) }) }}if(aps.cfg.dfp.celtraAds.indexOf("Flex1")==-1){aps.cfg.dfp.celtraAds.push("Flex1"); aps.fn.logInfo("Flex1 also disabled (Celtra on Crown)") }if(aps.cfg.dfp.celtraAds.indexOf("Crown")==-1){aps.cfg.dfp.celtraAds.push("Crown"); aps.fn.logInfo("Crown also disabled (Celtra on Flex1)") }}}if(e.ad.code=="Flex1"&¤t_device==devices.DESKTOP){var b=document.getElementById(e.ad.code); var d=b.querySelectorAll("div[id^='google']")[0]; if(!d.style){d.style={cssText:"width:100%"} }else{d.style.cssText+=";width:100%" }}}}); aps.registerEvent(aps.event.on_render_ad,function(b){if(b.divid=="MAD"){if(b.adsize&&(b.adsize[0]!=320||b.adsize[1]!=50)){aps.fn.logInfo("Fixing: MAD having wrong size: "+b.adsize); var a=document.getElementById("MAD").firstChild; a.style.width="320px"; a.style.height="50px" }aps.cfg.ads["MAD"].impressionTimer=aps.cfg.ads["MAD"].impressionTimer||null; if(aps.cfg.ads["MAD"].impressionTimer==null){aps.cfg.ads["MAD"].impressionTimer=setTimeout(function(){aps.fn.logInfo("Forcing MAD viewability"); aps.cfg.ads["MAD"].impressionTimer=null; aps.cfg.ads["MAD"].impressionViewable=true },30000) }}}) })();(function(){if(aps.cfg.current_domain!="sfgate.com"&&!aps.cfg.iPhone){return }})();(function(){aps.specifiedAdSlots={}; aps.usingSelectiveAdSlotLoading=false; aps.selectiveAdSlotCookieName="Ju13ceSelectiveAdsList"; aps.fn.shouldPlaceAd=function(c){if(!aps.usingSelectiveAdSlotLoading){return true }return(typeof(aps.specifiedAdSlots[c])!="undefined") }; var b=aps.fn.getQueryParameterByName("sadslot[]"); if(b!=null){aps.usingSelectiveAdSlotLoading=true; for(var a=0; a-1){return false }if(!aps.usingSelective3rdLoading){return true }return(typeof(aps.specified3rdParties[c])!="undefined") }; aps.add3rdToSelectiveLoadingList=function(c){aps.specified3rdParties[c]=true }; var a=aps.fn.getQueryParameterByName("sad3rd[]"); if(a!=null){aps.usingSelective3rdLoading=true; for(var b=0; b-1||aps.cfg.bid.disableMobile)){aps.cfg.bid.a9.enabled=false }if(aps.cfg.disablePersonalisation&&!aps.cfg.bid.enableGDPR){aps.cfg.bid.a9.enabled=false }if(!aps.cfg.bid.enabled||!aps.cfg.bid.a9.enabled){aps.fn.logInfo("A9 disabled"); return }aps.fn.insertScript("https://c.amazon-adsystem.com/aax2/apstag.js",1); !function(d,b,f,i,j,c,e){if(b[d]){return }function h(a,g){b[d]._Q.push([a,g]) }b[d]={init:function(){h("i",arguments) },fetchBids:function(){h("f",arguments) },setDisplayBids:function(){},targetingKeys:function(){return[] },dpa:function(){h("di",arguments) },rpa:function(){h("ri",arguments) },upa:function(){h("ui",arguments) },_Q:[]} }("apstag",window); aps.cfg.bid.a9.config.pubID="3070"; aps.cfg.bid.a9.config.adServer="googletag"; aps.cfg.bid.a9.config.bidTimeout=aps.cfg.bid.prefetch.refreshTimeout; aps.cfg.bid.a9.config.deals=true; aps.cfg.bid.a9.useHashedEmail=true; if(aps.cfg.is.kfsComicsWidget||aps.cfg.is.kfsPuzzleWidget){aps.cfg.bid.a9.config.pubID="5135" }aps.cfg.bid.a9.partners={"1y9xr0g":"amobee","1ayvuv4":"appnexus","1ginqio":"conversant","2kotmo":"districtm","j80glc":"dmx","1eaqzgg":"gumgum","yrdq0w":"index","t7ludc":"magnite","1gqg3k":"oath","bgbtvk":"openX","1m2fm68":"pubmatic","kbyu4g":"pulsepoint","1r28b28":"sharethgough","e87rpc":"simpli.fi","16j2cqo":"triplelift","rjoa2o":"undertone","1gqg3k":"verizon mkt","lfx7nx":"verizon","t7ludc":"rubicon","1iqkhkw":"yieldmo",}; aps.cfg.bid.a9.validSections={"":"home page","Homepage":"home page","news":"news","entertainment":"entertainment","sports":"sports","burningman":"burningman","realestate":"real estate","obituaries":"obituaries","bayarea":"local news","seen-events":"seen","neighborhood":"local news","food":"food","lifestyle":"living","life":"living","business":"business","local":"local news","ontheblock":"real estate","politics":"news","homestyle":"real estate","living":"living","california-wildfires":"local news","seen-saratoga":"seen","comics-and-games":"entertainment","technology":"technology","education":"education","seen":"seen","expensive-san-francisco":"local news","2018":"local news","2019":"local news","weather":"local news","national":"news","homes":"real estate","photogallery":"news","style":"living","search":"other","science":"news","houseoftheweek":"real estate","music":"entertainment","sfhistory":"local news","nation":"news","readmore":"other","49ers":"sports","portal":"subsciption","crime":"local news","client":"entertainment","warriors":"sports","chris-mcginnis":"travel","raiders":"sports","chronicle_vault":"entertainment","art":"entertainment","real-estate":"real estate","insidescoop":"food","mommyfiles":"living","seattlenews":"local news","beer":"food","access.aspx?product=newedition&from=http:":"subsciption","travel":"travel","giants":"sports","galleries":"news","home":"real estate","opinion":"local news","jobs":"jobs","houston":"local news","education_clone_6643_20180713151626":"local news","dearabby":"entertainment","beauty":"living","outdoors":"travel","subscribe-new-offers":"subsciption","earthquakes":"local news","cars":"autos","chronicle-history":"local news","capitol":"local news","tablehopping":"food","photos":"news","latestnews":"news","mlb":"sports","horoscope":"entertainment","new-haven":"local news","fiesta":"local news","collegesports":"sports","blogs":"other","preps":"sports","auto":"autos","originalpets":"living","lifestyles":"living","athletics":"sports","weird":"news","wine":"food","games":"entertainment","comics":"entertainment","columns":"local news","getaways":"travel","us":"news","rodeo":"entertainment",}; aps.cfg.bid.a9.getSection=function(a){var b=""; if(aps.cfg.bid.a9.validSections[a.path[0]]==undefined){b="other" }else{b=aps.cfg.bid.a9.validSections[a.path[0]] }switch(a.hostname){case"education.seattlepi.com":b="Education"; break; case"healthyeating.sfgate.com":b="Healthy Eating"; break; case"homeguides.sfgate.com":b="Home Guides"; break; case"livehealthy.chron.com":b="Live Healthy"; break; case"pyme.lavoztx.com":b="Pyme"; break; case"smallbusiness.chron.com":b="Small Business"; break; case"work.chron.com":b="Work"; break }return b }; aps.cfg.bid.a9.configSlot=function(a){var c={sizes:[]}; if(a.exclude){return c }if(!aps.fn.isValidBid(a,"","a9")){return c }a.sizes=a.sizes||[]; if(a.mediaType=="native"){return c }if(a.sizes.length==0){aps.fn.logSkip(a.code,"no size available to bidders (a9)"); return c }if(a.video){return c }var b={}; b.slotID=a.code; b.slotName="/"+aps.cfg.networkCode+"/"+aps.cfg.page.current.adUnit+"/"+b.slotID; b.sizes=a.sizes; if(!aps.cfg.is.qa){b.floor={value:5,currency:"USD"} }return b }; aps.registerEvent(aps.event.on_define_bid_data,function(a){if(a.code=="Crown"){return }var b=aps.cfg.bid.a9.configSlot(a); if(b.sizes.length>0){if(!aps.cfg.bid.prefetch.a9.adUnits.includes(a.code)){aps.cfg.bid.prefetch.a9.adUnits.push(a.code) }a.a9=b }}); aps.registerEvent(aps.event.on_request_bid,function(a){a.pages.forEach(function(g){var c=g.a9.ads.filter(function(j){return j.slotID }); var b=g.a9.adIds; if(aps.cfg.bid.prefetch.allBidsOnRefresh){if(c.length>24){var d=[]; var i=[]; var f=[]; var e=[]; Object.entries(aps.cfg.ads).forEach(function(j){if(j[1].renderedAt==null){f.push(j[1]) }}); Object.entries(aps.cfg.ads).forEach(function(j){if(j[1].renderedAt!=null){d.push(j[1]) }}); d=d.sort(function(j,k){return k.renderedAt-j.renderedAt }); d.forEach(function(j){if(j.multiAd){if(!e.includes(j.multiType)){var l=parseInt(j.code.split("-")[1]); if(l>1){l=l-1 }for(var k=0; k<6; k++){i.push(j.multiType+"-"+(l+k)) }e.push(j.multiType) }}else{i.push(j.code) }}); f.forEach(function(j){if(j.multiAd){if(!e.includes(j.multiType)){var l=parseInt(j.code.split("-")[1]||1); if(l>1){l=l-1 }for(var k=0; k<6; k++){i.push(j.multiType+"-"+(l+k)) }e.push(j.multiType) }}else{i.push(j.code) }}); if(i.length>25){i=i.slice(0,25) }c=c.filter(function(j){return i.includes(j.slotID) }); b=b.filter(function(j){return i.includes(j) }) }}else{if(a.slotIds){c=c.filter(function(j){return a.slotIds.includes(j.slotID) }); b=b.filter(function(j){return a.slotIds.includes(j) }) }}if(c.length>0){aps.fn.setPerformanceMetrics("A9BidsRequested","calling a9 for page "+g.scrollDepth+" ads: "+b); apstag.init(g.a9.config); if(aps.cfg.bid.a9.useHashedEmail&&!aps.cfg.bid.prefetch.requested){aps.cfg.emailHash=HDN.dataLayer.identity.emailHashed||null; if(!aps.cfg.emailHash&&window.treg&&treg.identity&&treg.identity.emailHash){aps.cfg.emailHash=treg.identity.emailHash }if(aps.cfg.doNotSell){var h={optOut:true}; apstag.upa(h) }else{if(aps.cfg.emailHash){var h={hashedRecords:[{type:"email",record:aps.cfg.emailHash}],gdpr:{enabled:true,consent:"1---"}}; apstag.rpa(h) }}if(!aps.cfg.emailHash&&!aps.cfg.tregReady&&!aps.cfg.doNotSell){aps.cfg.bid.prefetch.requested=false }else{aps.cfg.bid.prefetch.requested=true }}apstag.fetchBids({slots:c,timeout:aps.cfg.bid.prefetch.timeout,},function(j){aps.cfg.bid.a9.handleDisplayBids(j,g) }); setTimeout(function(){aps.cfg.bid.a9.received=true; g.a9BidsReceived=true },aps.cfg.bid.prefetch.timeout) }}) }); aps.cfg.bid.a9.handleDisplayBids=function(a,b){a.forEach(function(d){var g=(d.targeting)?d.targeting.amznbid:d.amznbid; var f=(d.targeting)?d.targeting.amznp:d.amznp; var e=aps.cfg.bid.a9.partners[f]||"a9"; var c=aps.cfg.ads[d.slotID]; aps.fn.logInfo("*BID* "+c.code+" "+e+" "+g) }); aps.cfg.bid.a9.received=true; b.a9BidsReceived=true; aps.fn.logInfo("A9 bids received") } })();(function(){aps.registerEvent(aps.event.on_before_request_ads,function(c){var a=!1; if(aps.cfg.page.current.domain=="expressnews.com"||aps.cfg.page.current.domain=="houstonchronicle.com"){try{if(GetCookie("hrstctok")!=null){a=1 }}catch(b){}}else{if(aps.cfg.page.current.domain=="sfchronicle.com"){try{if(JSON.parse(sessionStorage.getItem("sync-subscriberPlans-status"))["hasActivePlans"]==true){a=1 }}catch(b){}}}if(a){aps.cfg.page.addBaseKvp("category","premuser") }}) })();(function(){var a=""; switch(aps.cfg.page.current.domain){case"houstonchronicle.com":case"chron.com":a="hou"; break; case"expressnews.com":case"mysanantonio.com.com":a="sa"; break; case"sfchronicle.com":case"sfgate.com":a="sf"; break; case"timesunion.com":a="tu"; break; default:return; break }aps.registerEvent(aps.event.on_before_request_ads,function(h){var d=false; var l=false; var j=[]; try{if(typeof(localStorage)!=undefined){var f=JSON.parse(localStorage.getItem("hnp_subs")); var b=1; var e=null; if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){e=f[g]; if(e.hasOwnProperty("sub_status_"+b)){var i=a; if(e["sub_status_"+b]=="Active"){i=i+"_a_" }else{i=i+"_ex_" }i=i+e["sub_product_"+b]+"_"; i=i+e["sub_product_code_"+b]; j.push(i) }}b++ }}}}catch(c){}var k=a+"_na"; if(j.length>=1){k=j.join(",") }aps.fn.addPageKvp("swgt",k) }) })();!function(){aps.fn.createHash=function(Q,S){function U(c,d){return c<>>32-d }function W(h,i){var j,k,l,m,n; return l=2147483648&h,m=2147483648&i,j=1073741824&h,k=1073741824&i,n=(1073741823&h)+(1073741823&i),j&k?2147483648^n^l^m:j|k?1073741824&n?3221225472^n^l^m:1073741824^n^l^m:n^l^m }function Y(d,e,f){return d&e|~d&f }function aa(d,e,f){return d&f|e&~f }function ac(d,e,f){return d^e^f }function ae(d,e,f){return e^(d|~f) }function ag(c,d,e,k,l,m,n){return c=W(c,W(W(Y(d,e,k),l),n)),W(U(c,m),d) }function ai(c,d,f,k,l,m,n){return c=W(c,W(W(aa(d,f,k),l),n)),W(U(c,m),d) }function ak(c,d,g,k,l,m,n){return c=W(c,W(W(ac(d,g,k),l),n)),W(U(c,m),d) }function am(c,d,h,k,l,m,n){return c=W(c,W(W(ae(d,h,k),l),n)),W(U(c,m),d) }function ao(j){for(var k,l=j.length,m=l+8,n=(m-m%64)/64,o=16*(n+1),p=Array(o-1),q=0,r=0; l>r; ){k=(r-r%4)/4,q=r%4*8,p[k]=p[k]|j.charCodeAt(r)<>>29,p }function aq(f){var g,h,i="",j=""; for(h=0; 3>=h; h++){g=f>>>8*h&255,j="0"+g.toString(16),i+=j.substr(j.length-2,2) }return i }function at(e){e=e.replace(/\r\n/g,"\n"); for(var f="",g=0; gh?f+=String.fromCharCode(h):h>127&&2048>h?(f+=String.fromCharCode(h>>6|192),f+=String.fromCharCode(63&h|128)):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128),f+=String.fromCharCode(63&h|128)) }return f }void 0===S&&(S=""),void 0===Q&&(Q=10000000000*Math.random()+"||"+window.location.href+"||"+(new Date).getTime()+"||"+S); var av,ax,ay,az,aA,aB,aC,aD,aE,aF=Array(),aG=7,R=12,T=17,V=22,X=5,Z=9,ab=14,ad=20,af=4,ah=11,aj=16,al=23,an=6,ap=10,ar=15,au=21; for(Q=at(Q),aF=ao(Q),aB=1732584193,aC=4023233417,aD=2562383102,aE=271733878,av=0; av0){aps.cfg.page.addPageKvp("bc_audiences",b[0]["value"]) }else{aps.fn.logInfo("Empty blueconic segment detected") }}catch(c){aps.fn.logInfo("error parsing blueconic data") }}else{aps.fn.logInfo("Blueconic segments not detected") }}) }})();(function () { if(!aps.cfg.serveAds) return; if(aps.cfg.thirdp.prebid) return; /* prebid.js v8.19.0 Updated: 2023-10-12 Modules: appnexusBidAdapter, concertBidAdapter, criteoBidAdapter, ixBidAdapter, kargoBidAdapter, openxBidAdapter, prebidServerBidAdapter, pubmaticBidAdapter, rubiconBidAdapter, tripleliftBidAdapter, consentManagement, consentManagementGpp, consentManagementUsp, enrichmentFpdModule, gdprEnforcement, gptPreAuction, rtdModule, optimeraRtdProvider, permutiveRtdProvider, userId, criteoIdSystem, id5IdSystem, unifiedIdSystem, identityLinkIdSystem, lotamePanoramaIdSystem, quantcastIdSystem */ if(window.pbjs&&window.pbjs.libLoaded)try{window.pbjs.getConfig("debug")&&console.warn("Attempted to load a copy of Prebid.js that clashes with the existing 'pbjs' instance. Load aborted.")}catch(e){}else (function(){ !function(){var n,e={5706:function(n,e,t){t.d(e,{Pd:function(){return s},Th:function(){return d},_U:function(){return f}});var r=t(5730),i=t(4358),o=t(265),a=t(4614),u=(0,t(8640).R)(),c="outstream";function d(n){var e=this,t=n.url,o=n.config,a=n.id,u=n.callback,d=n.loaded,s=n.adUnitCode,f=n.renderNow;this.url=t,this.config=o,this.handlers={},this.id=a,this.renderNow=f,this.loaded=d,this.cmd=[],this.push=function(n){"function"==typeof n?e.loaded?n.call():e.cmd.push(n):(0,i.H)("Commands given to Renderer.push must be wrapped in a function")},this.callback=u||function(){e.loaded=!0,e.process()},this.render=function(){var n=this,e=arguments,o=function(){n._render?n._render.apply(n,e):(0,i.yN)("No render function was provided, please use .setRender on the renderer")};l(s)?((0,i.yN)("External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ".concat(s)),o()):f?o():(this.cmd.unshift(o),(0,r.B)(t,c,this.callback,this.documentContext))}.bind(this)}function s(n){return!(!n||!n.url&&!n.renderNow)}function f(n,e,t){var r=null;n.config&&n.config.documentResolver&&(r=n.config.documentResolver(e,document,t)),r||(r=document),n.documentContext=r,n.render(e,n.documentContext)}function l(n){var e=u.adUnits,t=(0,a.sE)(e,(function(e){return e.code===n}));if(!t)return!1;var r=(0,o.Z)(t,"renderer"),i=!!(r&&r.url&&r.render),c=(0,o.Z)(t,"mediaTypes.video.renderer"),d=!!(c&&c.url&&c.render);return!!(i&&!0!==r.backupOnly||d&&!0!==c.backupOnly)}d.install=function(n){return new d({url:n.url,config:n.config,id:n.id,callback:n.callback,loaded:n.loaded,adUnitCode:n.adUnitCode,renderNow:n.renderNow})},d.prototype.getConfig=function(){return this.config},d.prototype.setRender=function(n){this._render=n},d.prototype.setEventHandlers=function(n){this.handlers=n},d.prototype.handleVideoEvent=function(n){var e=n.id,t=n.eventName;"function"==typeof this.handlers[t]&&this.handlers[t](),(0,i.ji)("Prebid Renderer event for id ".concat(e," type ").concat(t))},d.prototype.process=function(){for(;this.cmd.length>0;)try{this.cmd.shift().call()}catch(n){(0,i.H)("Error processing Renderer command: ",n)}}},4947:function(n,e,t){t.d(e,{EL:function(){return a},Jt:function(){return l},K$:function(){return i},S1:function(){return r},S5:function(){return o},UE:function(){return u},e:function(){return d},g0:function(){return f},oK:function(){return s},x$:function(){return c}});var r="accessDevice",i="syncUser",o="enrichUfpd",a="enrichEids",u="fetchBids",c="reportAnalytics",d="transmitEids",s="transmitUfpd",f="transmitPreciseGeo",l="transmitTid"},286:function(n,e,t){t.d(e,{T:function(){return i}});var r=t(6104),i=(0,t(6310).Oj)((function(n){return r.ZP.resolveAlias(n)}))},9633:function(n,e,t){t.d(e,{UL:function(){return i},XG:function(){return a},_U:function(){return u},wu:function(){return r},y2:function(){return o}});var r="prebid",i="bidder",o="userId",a="rtd",u="analytics"},6310:function(n,e,t){t.d(e,{$k:function(){return u},Hw:function(){return v},IV:function(){return g},JR:function(){return a},Ki:function(){return d},Oj:function(){return p},Qf:function(){return f},Ww:function(){return h},bL:function(){return s},bp:function(){return c},cx:function(){return l}});var r=t(4942),i=t(9633),o=t(2797),a="component",u=a+"Type",c=a+"Name",d="adapterCode",s="storageType",f="configName",l="syncType",g="syncUrl",v="_config";function p(n){return function(e,t,o){var s,f=(s={},(0,r.Z)(s,u,e),(0,r.Z)(s,c,t),(0,r.Z)(s,a,"".concat(e,".").concat(t)),s);return e===i.UL&&(f[d]=n(t)),h(Object.assign(f,o))}}var h=(0,o.z3)("sync",(function(n){return n}))},1087:function(n,e,t){t.d(e,{$8:function(){return f},Db:function(){return p},Mp:function(){return w},RD:function(){return h},ZZ:function(){return l},a:function(){return y},hb:function(){return A},js:function(){return m}});var r=t(1002),i=t(3324),o=t(265),a=t(3193),u=t(571),c=t(4947);function d(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return s(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){u=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function s(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t0?e.join("."):null,t]}))})),function(e,t){for(var r=[],a=arguments.length,u=new Array(a>2?a-2:0),c=2;c1?e-1:0),r=1;r0)}function m(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.xD;return function(t){return!e(n,t)}}function b(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.xD;return[{name:c.e,paths:["userId","userIdAsEids"],applies:m(c.e,n)},{name:c.Jt,paths:["ortb2Imp.ext.tid"],applies:m(c.Jt,n)}].map(v)}function w(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.xD;return[{name:c.oK,paths:f,applies:m(c.oK,n)},{name:c.e,paths:l,applies:m(c.e,n)},{name:c.g0,paths:g,applies:m(c.g0,n),get:function(n){return Math.round(100*(n+Number.EPSILON))/100}},{name:c.Jt,paths:["source.tid"],applies:m(c.Jt,n)}].map(v)}var A=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.xD,e=p(w(n)),t=p(b(n));return function(n){var r={};return{ortb2:function(t){return e(r,t,n),t},bidRequest:function(e){return t(r,e,n),e}}}}();(0,u.oB)(c.Jt,"enableTIDs config",(function(){if(!a.vc.getConfig("enableTIDs"))return{allow:!1,reason:"TIDs are disabled"}}))},571:function(n,e,t){t.d(e,{oB:function(){return s},xD:function(){return f}});var r=t(3324),i=t(4358),o=t(6310);function a(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return u(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){c=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw o}}}}function u(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&void 0!==arguments[0]?arguments[0]:(0,i.qp)("Activity control:"),e={};function t(n){return e[n]=e[n]||[]}function u(e,t,r,i){var a;try{a=r(i)}catch(r){n.logError("Exception in rule ".concat(t," for '").concat(e,"'"),r),a={allow:!1,reason:r}}return a&&Object.assign({activity:e,name:t,component:i[o.JR]},a)}var c={},d=1e3;function s(e){var t=e.activity,r=e.name,i=e.allow,o=e.reason,a=e.component,u="".concat(r," ").concat(i?"allowed":"denied"," '").concat(t,"' for '").concat(a,"'").concat(o?":":""),s=c.hasOwnProperty(u);if(s&&clearTimeout(c[u]),c[u]=setTimeout((function(){return delete c[u]}),d),!s){var f=[u];o&&f.push(o),(i?n.logInfo:n.logWarn).apply(n,f)}}return[function(n,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=t(n),u=a.findIndex((function(n){var e=(0,r.Z)(n,1)[0];return o=0&&a.splice(n,1)}},function(n,e){var i,o,c,d=a(t(n));try{for(d.s();!(c=d.n()).done;){var f=(0,r.Z)(c.value,3),l=f[0],g=f[1],v=f[2];if(i!==l&&o)break;i=l;var p=u(n,g,v,e);if(p){if(!p.allow)return s(p),!1;o=p}}}catch(n){d.e(n)}finally{d.f()}return o&&s(o),!0}]}(),d=(0,r.Z)(c,2),s=d[0],f=d[1]},875:function(n,e,t){t.d(e,{f:function(){return a}});var r=t(265),i={};function o(n,e,t){var r=function(n,e){var t=i[n]=i[n]||{bidders:{}};return e?t.bidders[e]=t.bidders[e]||{}:t}(n,t);return r[e]=(r[e]||0)+1,r[e]}var a={incrementRequestsCounter:function(n){return o(n,"requestsCounter")},incrementBidderRequestsCounter:function(n,e){return o(n,"requestsCounter",e)},incrementBidderWinsCounter:function(n,e){return o(n,"winsCounter",e)},getRequestsCounter:function(n){return(0,r.Z)(i,"".concat(n,".requestsCounter"))||0},getBidderRequestsCounter:function(n,e){return(0,r.Z)(i,"".concat(n,".bidders.").concat(e,".requestsCounter"))||0},getBidderWinsCounter:function(n,e){return(0,r.Z)(i,"".concat(n,".bidders.").concat(e,".winsCounter"))||0}}},8525:function(n,e,t){function r(n){var e=n;return{callBids:function(){},setBidderCode:function(n){e=n},getBidderCode:function(){return e}}}t.d(e,{Z:function(){return r}})},6104:function(n,e,t){t.d(e,{O6:function(){return q},uV:function(){return z}});var r=t(9062),i=t(3324),o=t(4942),a=t(4358),u=t(265),c=t(59),d=t(4699),s=t(8928),f=t(3193),l=t(2797),g=t(4614),v=t(875),p=t(5102),h=t(4516),y=t(2021),m=t(5644),b=t(9128),w=t(1176),A=t(9633),C=t(571),T=t(4947),E=t(6310),O=t(1087);function k(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function I(n){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:{},r=t.getS2SBidders,i=void 0===r?z:r;if(null==e)return n;var o=i(e);return n.filter((function(n){return o.has(n.bidder)}))}),"filterBidsForAdUnit");function M(n,e){var t=(0,a.I8)(n),r=!1;return t.forEach((function(n){var t=n.bids.filter((function(n){var t;return n.module===j&&(null===(t=n.params)||void 0===t?void 0:t.configName)===e.configName}));1===t.length?(n.s2sBid=t[0],r=!0,n.ortb2Imp=(0,a.Ee)({},n.s2sBid.ortb2Imp,n.ortb2Imp)):t.length>1&&(0,a.yN)('Multiple "module" bids for the same s2s configuration; all will be ignored',t),n.bids=H(n.bids,e).map((function(n){return n.bid_id=(0,a._d)(),n}))})),{adUnits:t=t.filter((function(n){return 0!==n.bids.length||null!=n.s2sBid})),hasModuleBids:r}}function F(n){var e=(0,a.I8)(n);return e.forEach((function(n){n.bids=H(n.bids,null)})),e=e.filter((function(n){return 0!==n.bids.length}))}var W=(0,l.z3)("sync",(function(n,e){return n}),"setupAdUnitMediaTypes");function z(n){(0,a.kJ)(n)||(n=[n]);var e=new Set([null]);return n.filter((function(n){return n&&n.enabled})).flatMap((function(n){return n.bidders})).forEach((function(n){return e.add(n)})),e}var L=(0,l.z3)("sync",(function(n,e){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.getS2SBidders,u=void 0===i?z:i,c=u(e);return(0,a.pP)(n).reduce((function(n,e){return n[c.has(e)?S:B].push(e),n}),(t={},(0,o.Z)(t,B,[]),(0,o.Z)(t,S,[]),t))}),"partitionBidders");function K(n,e){var t=P[n],r=(null==t?void 0:t.getSpec)&&t.getSpec();if(r&&r[e]&&"function"==typeof r[e])return[r,r[e]]}function G(n,e,t,r){try{(0,a.PN)("Invoking ".concat(n,".").concat(e));for(var i=arguments.length,o=new Array(i>4?i-4:0),u=4;u5&&void 0!==arguments[5]?arguments[5]:{},u=arguments.length>6?arguments[6]:void 0;u=(0,b.Bf)(u),y.j8(m.FP.BEFORE_REQUEST_BIDS,n),(0,c.Fb)(n),n.forEach((function(n){(0,a.PO)(n.mediaTypes)||(n.mediaTypes={}),n.bids=n.bids.filter((function(n){return!n.bidder||U.isAllowed(T.UE,D(A.UL,n.bidder))}))})),n=W(n,i);var d=L(n,Z),s=d[B],l=d[S];f.vc.getConfig("bidderSequence")===f.FD&&(s=(0,a.TV)(s));var v=(0,p.nH)(),w=[],C=o.global||{},E=o.bidder||{};function O(n,e){var r=U.redact(null!=e?e:D(A.UL,n.bidderCode)),i=Object.freeze(r.ortb2((0,a.Ee)({source:{tid:t}},C,E[n.bidderCode])));return n.ortb2=i,n.bids=n.bids.map((function(n){return n.ortb2=i,r.bidRequest(n)})),n}Z.forEach((function(r){var i=q(r);if(r&&r.enabled&&U.isAllowed(T.UE,i)){var o=M(n,r),c=o.adUnits,d=o.hasModuleBids,s=(0,a.DO)();(0===l.length&&d?[null]:l).forEach((function(n){var o=(0,a._d)(),d=u.fork(),f=O({bidderCode:n,auctionId:t,bidderRequestId:o,uniquePbsTid:s,bids:x({bidderCode:n,auctionId:t,bidderRequestId:o,adUnits:(0,a.I8)(c),src:m.os.YZ,metrics:d}),auctionStart:e,timeout:r.timeout,src:m.os.YZ,refererInfo:v,metrics:d},i);0!==f.bids.length&&w.push(f)})),c.forEach((function(n){var e=n.bids.filter((function(n){return(0,g.sE)(w,(function(e){return(0,g.sE)(e.bids,(function(e){return e.bidId===n.bid_id}))}))}));n.bids=e})),w.forEach((function(n){void 0===n.adUnitsS2SCopy&&(n.adUnitsS2SCopy=c.filter((function(n){return n.bids.length>0||null!=n.s2sBid})))}))}}));var k=F(n);return s.forEach((function(n){var o=(0,a._d)(),c=u.fork(),d=O({bidderCode:n,auctionId:t,bidderRequestId:o,bids:x({bidderCode:n,auctionId:t,bidderRequestId:o,adUnits:(0,a.I8)(k),labels:i,src:"client",metrics:c}),auctionStart:e,timeout:r,refererInfo:v,metrics:c}),s=P[n];s||(0,a.H)("Trying to make a request for bidder that does not exist: ".concat(n)),s&&d.bids&&0!==d.bids.length&&w.push(d)})),w.forEach((function(n){h.rp.getConsentData()&&(n.gdprConsent=h.rp.getConsentData()),h.nX.getConsentData()&&(n.uspConsent=h.nX.getConsentData()),h.TJ.getConsentData()&&(n.gppConsent=h.TJ.getConsentData())})),w}),"makeBidRequests"),R.callBids=function(n,e,t,r,o,u,c){var d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{};if(e.length){var l=e.reduce((function(n,e){return n[Number(void 0!==e.src&&e.src===m.os.YZ)].push(e),n}),[[],[]]),g=(0,i.Z)(l,2),v=g[0],p=g[1],h=[];p.forEach((function(n){for(var e=-1,t=0;t0?C.join(", "):'No bidder specified, using "ortb2Imp" definition(s) only')),v.forEach((function(n){y.j8(m.FP.BID_REQUESTED,I(I({},n),{},{tid:n.auctionId}))})),f.callBids(w,p,t,(function(){return A.forEach((function(n){return n()}))}),e)}}else(0,a.H)("missing "+n.adapter);b++}})),v.forEach((function(n){n.start=(0,a.AB)();var e=P[n.bidderCode];f.vc.runWithBidder(n.bidderCode,(function(){(0,a.ji)("CALLING BIDDER"),y.j8(m.FP.BID_REQUESTED,n)}));var i=(0,s.OI)(u,o?{request:o.request.bind(null,n.bidderCode),done:o.done}:void 0),d=r.bind(n);try{f.vc.runWithBidder(n.bidderCode,e.callBids.bind(e,n,t,d,i,(function(){return c(n.bidderRequestId)}),f.vc.callbackWithBidder(n.bidderCode)))}catch(e){(0,a.H)("".concat(n.bidderCode," Bid Adapter emitted an uncaught error when parsing their bidRequest"),{e:e,bidRequest:n}),d()}}))}else(0,a.yN)("callBids executed with no bidRequests. Were they filtered by labels or sizing?")},R.videoAdapters=[],R.registerBidAdapter=function(n,e){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.supportedMediaTypes,o=void 0===i?[]:i;n&&e?"function"==typeof n.callBids?(P[e]=n,h.qh.register(A.UL,e,null===(t=n.getSpec)||void 0===t?void 0:t.call(n).gvlid),(0,g.q9)(o,"video")&&R.videoAdapters.push(e),(0,g.q9)(o,"native")&&c.Sg.push(e)):(0,a.H)("Bidder adaptor error for bidder code: "+e+"bidder must implement a callBids() function"):(0,a.H)("bidAdapter or bidderCode not specified")},R.aliasBidAdapter=function(n,e,t){if(void 0===P[e]){var r=P[n];if(void 0===r){var i=[];Z.forEach((function(t){if(t.bidders&&t.bidders.length){var r=t&&t.bidders;t&&(0,g.q9)(r,e)?N[e]=n:i.push(n)}})),i.forEach((function(n){(0,a.H)('bidderCode "'+n+'" is not an existing bidder.',"adapterManager.aliasBidAdapter")}))}else try{var o,u=function(n){var e=[];return(0,g.q9)(R.videoAdapters,n)&&e.push("video"),(0,g.q9)(c.Sg,n)&&e.push("native"),e}(n);if(r.constructor.prototype!=Object.prototype)(o=new r.constructor).setBidderCode(e);else{var s=r.getSpec(),f=t&&t.gvlid;null!=s.gvlid&&null==f&&(0,a.yN)("Alias '".concat(e,"' will NOT re-use the GVL ID of the original adapter ('").concat(s.code,"', gvlid: ").concat(s.gvlid,"). Functionality that requires TCF consent may not work as expected."));var l=t&&t.skipPbsAliasing;o=(0,d.PZ)(Object.assign({},s,{code:e,gvlid:f,skipPbsAliasing:l})),N[e]=n}R.registerBidAdapter(o,e,{supportedMediaTypes:u})}catch(e){(0,a.H)(n+" bidder does not currently support aliasing.","adapterManager.aliasBidAdapter")}}else(0,a.ji)('alias name "'+e+'" has been already specified.')},R.resolveAlias=function(n){for(var e,t=n;N[t]&&(!e||!e.has(t));)t=N[t],(e=e||new Set).add(t);return t},R.registerAnalyticsAdapter=function(n){var e=n.adapter,t=n.code,r=n.gvlid;e&&t?"function"==typeof e.enableAnalytics?(e.code=t,_[t]={adapter:e,gvlid:r},h.qh.register(A._U,t,r)):(0,a.H)('Prebid Error: Analytics adaptor error for analytics "'.concat(t,'"\n analytics adapter must implement an enableAnalytics() function')):(0,a.H)("Prebid Error: analyticsAdapter or analyticsCode not specified")},R.enableAnalytics=function(n){(0,a.kJ)(n)||(n=[n]),n.forEach((function(n){var e=_[n.provider];e&&e.adapter?U.isAllowed(T.x$,D(A._U,n.provider,(0,o.Z)({},E.Hw,n)))&&e.adapter.enableAnalytics(n):(0,a.H)("Prebid Error: no analytics adapter found in registry for '".concat(n.provider,"'."))}))},R.getBidAdapter=function(n){return P[n]},R.getAnalyticsAdapter=function(n){return _[n]},R.callTimedOutBidders=function(n,e,t){e=e.map((function(e){return e.params=(0,a.S0)(n,e.adUnitCode,e.bidder),e.timeout=t,e})),e=(0,a.vM)(e,"bidder"),Object.keys(e).forEach((function(n){J(n,"onTimeout",e[n])}))},R.callBidWonBidder=function(n,e,t){e.params=(0,a.S0)(t,e.adUnitCode,e.bidder),v.f.incrementBidderWinsCounter(e.adUnitCode,e.bidder),J(n,"onBidWon",e)},R.callBidBillableBidder=function(n){J(n.bidder,"onBidBillable",n)},R.callSetTargetingBidder=function(n,e){J(n,"onSetTargeting",e)},R.callBidViewableBidder=function(n,e){J(n,"onBidViewable",e)},R.callBidderError=function(n,e,t){J(n,"onBidderError",{error:e,bidderRequest:t})},R.callDataDeletionRequest=(0,l.z3)("sync",(function(){for(var n=arguments.length,e=new Array(n),t=0;t2&&void 0!==arguments[2]?arguments[2]:{},r=t.index,o=void 0===r?y.K.index:r;if((e.width||0===parseInt(e.width,10))&&(e.height||0===parseInt(e.height,10)))return e.width=parseInt(e.width,10),e.height=parseInt(e.height,10),!0;var a=o.getBidRequest(e),u=o.getMediaTypes(e),c=a&&a.sizes||u&&u.banner&&u.banner.sizes,d=(0,p.sF)(c);if(1===d.length){var s=d[0].split("x"),f=(0,i.Z)(s,2),l=f[0],g=f[1];return e.width=parseInt(l,10),e.height=parseInt(g,10),!0}return!1}function R(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.index,i=void 0===r?y.K.index:r;function o(){var n=Object.keys(e);return E.every((function(t){return(0,v.q9)(n,t)&&!(0,v.q9)([void 0,null],e[t])}))}function a(n){return"Invalid bid from ".concat(e.bidderCode,". Ignoring bid: ").concat(n)}return n?e?o()?"native"!==e.mediaType||(0,s.r4)(e,{index:i})?"video"!==e.mediaType||(0,f.Dn)(e,{index:i})?!("banner"===e.mediaType&&!U(n,e,{index:i}))||((0,p.H)(a("Banner bids require a width and height")),!1):((0,p.H)(a("Video bid does not have required vastUrl or renderer property")),!1):((0,p.H)(a("Native bid missing some required properties.")),!1):((0,p.H)(a("Bidder ".concat(e.bidderCode," is missing required params. Check http://prebid.org/dev-docs/bidder-adapter-1.html for list of params."))),!1):((0,p.yN)("Some adapter tried to add an undefined bid for ".concat(n,".")),!1):((0,p.yN)("No adUnitCode was supplied to addBidResponse."),!1)}function P(n){return(0,b.Bf)(n.metrics).renameWith((function(e){return["adapter.client.".concat(e),"adapters.client.".concat(n.bidderCode,".").concat(e)]}))}},5730:function(n,e,t){t.d(e,{B:function(){return u}});var r=t(4614),i=t(4358),o=new WeakMap,a=["debugging","adloox","criteo","outstream","adagio","spotx","browsi","brandmetrics","justtag","tncId","akamaidap","ftrackId","inskin","hadron","medianet","improvedigital","aaxBlockmeter","confiant","arcspan","airgrid","clean.io","a1Media","geoedge","qortex"];function u(n,e,t,u,c){if(e&&n){if((0,r.q9)(a,e)){u||(u=document);var d=l(u,n);if(d)return t&&"function"==typeof t&&(d.loaded?t():d.callbacks.push(t)),d.tag;var s=o.get(u)||{},f={loaded:!1,tag:null,callbacks:[]};return s[n]=f,o.set(u,s),t&&"function"==typeof t&&f.callbacks.push(t),(0,i.yN)("module ".concat(e," is loading external JavaScript")),function(e,t,r,o){r||(r=document);var a=r.createElement("script");a.type="text/javascript",a.async=!0;var u=l(r,n);u&&(u.tag=a);a.readyState?a.onreadystatechange=function(){"loaded"!==a.readyState&&"complete"!==a.readyState||(a.onreadystatechange=null,t())}:a.onload=function(){t()};a.src=e,o&&(0,i.D9)(a,o);return(0,i.jC)(a,r),a}(n,(function(){f.loaded=!0;try{for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=t.method||(e?d:c);if(r===c&&e){var i=(0,a.en)(n,t);Object.assign(i.search,e),n=(0,a.Q2)(i)}var o=new Headers(t.customHeaders);o.set(s,t.contentType||"text/plain");var f={method:r,headers:o};return r!==c&&e&&(f.body=e),t.withCredentials&&(f.credentials="include"),t.browsingTopics&&isSecureContext&&(f.browsingTopics=!0),u.makeRequest(n,f)}function l(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.request,r=e.done,i=function(e,t){var r,i,a;null==n||null!=(null===(r=t)||void 0===r?void 0:r.signal)||o.vc.getConfig("disableAjaxTimeout")||(a=u.timeout(n,e),t=Object.assign({signal:a.signal},t));var c=u.fetch(e,t);return null!=(null===(i=a)||void 0===i?void 0:i.done)&&(c=c.finally(a.done)),c};return null==t&&null==r||(i=function(n){return function(e,i){var o=new URL(null==(null==e?void 0:e.url)?e:e.url,document.location).origin,a=n(e,i);return t&&t(o),r&&(a=a.finally((function(){return r(o)}))),a}}(i)),i}function g(n,e){var t=n.status,r=n.statusText,i=void 0===r?"":r,o=n.headers,u=n.url,c=0;function d(n){if(0===c)try{var t,r;c=(new DOMParser).parseFromString(e,null==o||null===(t=o.get(s))||void 0===t||null===(r=t.split(";"))||void 0===r?void 0:r[0])}catch(e){c=null,n&&n(e)}return c}return{readyState:XMLHttpRequest.DONE,status:t,statusText:i,responseText:e,response:e,responseType:"",responseURL:u,get responseXML(){return d(a.H)},getResponseHeader:function(n){return null!=o&&o.has(n)?o.get(n):null},toJSON:function(){return Object.assign({responseXML:d()},this)}}}function v(n,e){var t="object"===(0,i.Z)(e)&&null!=e?e:{success:"function"==typeof e?e:function(){return null},error:function(n,e){return(0,a.H)("Network error",n,e)}},o=t.success,u=t.error;n.then((function(n){return n.text().then((function(e){return[n,e]}))})).then((function(n){var e=(0,r.Z)(n,2),t=e[0],i=e[1],a=g(t,i);t.ok||304===t.status?o(i,a):u(t.statusText,a)}),(function(){return u("",g({status:0},""))}))}function p(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.request,r=e.done,i=l(n,{request:t,done:r});return function(n,e,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};v(i(f(n,t,r)),e)}}var h=p();l()},1176:function(n,e,t){t.d(e,{K:function(){return cn}});var r=t(3324),i=t(9062),o=t(4358),a=t(1002),u=t(265),c=t(6463),d=t(59),s=t(8928),f=t(3193);function l(n,e){var t=e?""):"";return'\n \n \n prebid.org wrapper\n \n ").concat(t,"\n \n \n \n ")}function g(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.index,r=void 0===t?cn.index:t,i=n.vastXml?n.vastXml:l(n.vastUrl,n.vastImpUrl),o=r.getAuction(n),a=Number(n.ttl)+15,u={type:"xml",value:i,ttlseconds:a};return f.vc.getConfig("cache.vasttrack")&&(u.bidder=n.bidder,u.bidid=n.requestId,u.aid=n.auctionId),null!=o&&(u.timestamp=o.getAuctionStart()),"string"==typeof n.customCacheKey&&""!==n.customCacheKey&&(u.key=n.customCacheKey),u}function v(n){return{success:function(e){var t;try{t=JSON.parse(e).responses}catch(e){return void n(e,[])}t?n(null,t):n(new Error("The cache server didn't respond with a responses property."),[])},error:function(e,t){n(new Error("Error storing video ad in the cache: ".concat(e,": ").concat(JSON.stringify(t))),[])}}}var p=t(5706),h=t(1974),y=t(2797),m=t(4614),b=t(154),w=t(4679),A=t(5975),C=t(2021),T=t(6104),E=t(5644),O=t(8792),k=t(9128);var I=t(8640),j=h.k_.syncUsers,B="completed";C.on(E.FP.BID_ADJUSTMENT,(function(n){!function(n){var e=function(n,e,t){var r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i.index,u=void 0===a?cn.index:a,c=i.bs,d=void 0===c?A.S:c;t=t||u.getBidRequest(e);var s=null==e?void 0:e.adapterCode,f=(null==e?void 0:e.bidderCode)||(null===(r=t)||void 0===r?void 0:r.bidder),l=d.get(null==e?void 0:e.adapterCode,"adjustAlternateBids"),g=d.getOwn(f,"bidCpmAdjustment")||d.get(l?s:f,"bidCpmAdjustment");if(g&&"function"==typeof g)try{return g(n,Object.assign({},e),t)}catch(n){(0,o.H)("Error during bid adjustment",n)}return n}(n.cpm,n);e>=0&&(n.cpm=e)}(n)}));var S={},U={},R=[],P=(0,I.R)();function N(n){var e=n.adUnits,t=n.adUnitCodes,r=n.callback,i=n.cbTimeout,u=n.labels,c=n.auctionId,d=n.ortb2Fragments,s=n.metrics;s=(0,k.Bf)(s);var l,g,v,p,h=e,y=u,b=t,A=c||(0,o.DO)(),I=i,N=new Set,M=(0,O.P)(),F=[],z=r,L=[],K=[],V=[],Q=[],$=[];function Y(){return{auctionId:A,timestamp:l,auctionEnd:g,auctionStatus:p,adUnits:h,adUnitCodes:b,labels:y,bidderRequests:L,noBids:V,bidsReceived:K,bidsRejected:F,winningBids:Q,timeout:I,metrics:s,seatNonBids:$}}function X(n){if(n||clearTimeout(v),void 0===g){var t=[];n&&((0,o.ji)("Auction ".concat(A," timedOut")),(t=L.filter((function(n){return!N.has(n.bidderRequestId)})).flatMap((function(n){return n.bids}))).length&&C.j8(E.FP.BID_TIMEOUT,t)),p=B,g=Date.now(),s.checkpoint("auctionEnd"),s.timeBetween("requestBids","auctionEnd","requestBids.total"),s.timeBetween("callBids","auctionEnd","requestBids.callBids"),M.resolve(),C.j8(E.FP.AUCTION_END,Y()),q(h,(function(){try{if(null!=z){var r=K.filter((function(n){return b.includes(n.adUnitCode)})).reduce(nn,{});z.apply(P,[r,n,A]),z=null}}catch(n){(0,o.H)("Error executing bidsBackHandler",null,n)}finally{t.length&&T.ZP.callTimedOutBidders(e,t,I);var i=f.vc.getConfig("userSync")||{};i.enableOverride||j(i.syncDelay)}}))}}function en(){f.vc.resetBidder(),(0,o.PN)("Bids Received for Auction with id: ".concat(A),K),p=B,X(!1)}function tn(n){N.add(n)}function rn(n){var e=this;n.forEach((function(n){var e;e=n,L=L.concat(e)}));var t={},r={bidRequests:n,run:function(){v=setTimeout((function(){return X(!0)}),I),p="inProgress",C.j8(E.FP.AUCTION_INIT,Y());var r=function(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).index,r=(void 0===t&&cn.index,0),i=!1,u=new Set,c={};function d(){r--,i&&0===r&&n()}function s(n,e,t){return c[e.requestId]=!0,G(e,n),r++,t(d)}function l(n,t){s(n,t,(function(n){var r=J(t);r.mediaType===w.pX?H(e,r,n):(null!=r.native&&"object"===(0,a.Z)(r.native)&&W(r),x(e,r),n())}))}function g(n,t,r){return s(n,t,(function(n){t.rejectionReason=r,(0,o.yN)("Bid from ".concat(t.bidder||"unknown bidder"," was rejected: ").concat(r),t),C.j8(E.FP.BID_REJECTED,t),e.addBidRejected(t),n()}))}function v(){var t=this,a=e.getBidRequests(),d=f.vc.getConfig("auctionOptions");if(u.add(t),d&&!(0,o.xb)(d)){var s=d.secondaryBidders;s&&!a.every((function(n){return(0,m.q9)(s,n.bidderCode)}))&&(a=a.filter((function(n){return!(0,m.q9)(s,n.bidderCode)})))}i=a.every((function(n){return u.has(n)})),t.bids.forEach((function(n){c[n.bidId]||(e.addNoBid(n),C.j8(E.FP.NO_BID,n))})),i&&0===r&&n()}return{addBidResponse:function(){function n(n,e){var t;Z.call({dispatch:l},n,e,(t=!1,function(r){t||(g(n,e,r),t=!0)}))}return n.reject=g,n}(),adapterDone:function(){var n=this;_(O.Z.resolve()).finally((function(){return v.call(n)}))}}}(en,e);T.ZP.callBids(h,n,r.addBidResponse,r.adapterDone,{request:function(n,e){u(S,e),u(t,n),U[n]||(U[n]={SRA:!0,origin:e}),t[n]>1&&(U[n].SRA=!1)},done:function(n){S[n]--,R[0]&&i(R[0])&&R.shift()}},I,tn,d)}};function i(n){var e=!0,t=f.vc.getConfig("maxRequestsPerOrigin")||4;return n.bidRequests.some((function(n){var r=1,i=void 0!==n.src&&n.src===E.os.YZ?"s2s":n.bidderCode;return U[i]&&(!1===U[i].SRA&&(r=Math.min(n.bids.length,t)),S[U[i].origin]+r>t&&(e=!1)),!e})),e&&n.run(),e}function u(n,e){void 0===n[e]?n[e]=1:n[e]++}i(r)||((0,o.yN)("queueing auction due to limited endpoint capacity"),R.push(r))}return C.on(E.FP.SEAT_NON_BID,(function(n){var e;n.auctionId===A&&(e=n.seatnonbid,$=$.concat(e))})),{addBidReceived:function(n){K=K.concat(n)},addBidRejected:function(n){F=F.concat(n)},addNoBid:function(n){V=V.concat(n)},callBids:function(){p="started",l=Date.now();var n=s.measureTime("requestBids.makeRequests",(function(){return T.ZP.makeBidRequests(h,l,A,I,y,d,s)}));(0,o.PN)("Bids Requested for Auction with id: ".concat(A),n),s.checkpoint("callBids"),n.length<1?((0,o.yN)("No valid bid requests returned for auction"),en()):D.call({dispatch:rn,context:this},n)},addWinningBid:function(n){var t=e.find((function(e){return e.transactionId===n.transactionId}));Q=Q.concat(n),T.ZP.callBidWonBidder(n.adapterCode||n.bidder,n,e),t&&!t.deferBilling&&T.ZP.callBidBillableBidder(n)},setBidTargeting:function(n){T.ZP.callSetTargetingBidder(n.adapterCode||n.bidder,n)},getWinningBids:function(){return Q},getAuctionStart:function(){return l},getAuctionEnd:function(){return g},getTimeout:function(){return I},getAuctionId:function(){return A},getAuctionStatus:function(){return p},getAdUnits:function(){return h},getAdUnitCodes:function(){return b},getBidRequests:function(){return L},getBidsReceived:function(){return K},getNoBids:function(){return V},getNonBids:function(){return $},getFPD:function(){return d},getMetrics:function(){return s},end:M.promise}}var Z=(0,y.z3)("sync",(function(n,e,t){this.dispatch.call(null,n,e)}),"addBidResponse"),_=(0,y.z3)("sync",(function(n){return n}),"responsesReady"),D=(0,y.z3)("sync",(function(n){this.dispatch.call(this.context,n)}),"addBidderRequests"),q=(0,y.z3)("async",(function(n,e){e&&e()}),"bidsBackCallback");function x(n,e){!function(n){var e,t=!0===A.S.get(n.bidderCode,"allowZeroCpmBids")?n.cpm>=0:n.cpm>0;n.bidderCode&&(t||n.dealId)&&(e=function(n,e){var t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).index,r=void 0===t?cn.index:t;if(!e)return{};var i=r.getBidRequest(e),o={},a=Y(e.mediaType,n);X(o,a,e,i),n&&A.S.getOwn(n,E.k2.xn)&&(X(o,A.S.ownSettingsFor(n),e,i),e.sendStandardTargeting=A.S.get(n,"sendStandardTargeting"));e.native&&(o=Object.assign({},o,(0,d.Ur)(e)));return o}(n.bidderCode,n));n.adserverTargeting=Object.assign(n.adserverTargeting||{},e)}(e),(0,k.Bf)(e.metrics).timeSince("addBidResponse","addBidResponse.total"),n.addBidReceived(e),C.j8(E.FP.BID_RESPONSE,e)}function H(n,e,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.index,a=void 0===i?cn.index:i,c=!0,d=(0,u.Z)(a.getMediaTypes({requestId:e.originalRequestId||e.requestId,transactionId:e.transactionId}),"video"),s=d&&(0,u.Z)(d,"context"),l=d&&(0,u.Z)(d,"useCacheKey");f.vc.getConfig("cache.url")&&(l||s!==b.gZ)&&(!e.videoCacheKey||f.vc.getConfig("cache.ignoreBidderCacheKey")?(c=!1,K(n,e,t,d)):e.vastUrl||((0,o.H)("videoCacheKey specified but not required vastUrl for video bid"),c=!1)),c&&(x(n,e),t())}var M,F,W=function(n){var e,t,r=null===(e=cn.index.getAdUnit(n))||void 0===e?void 0:e.nativeOrtbRequest,i=null===(t=n.native)||void 0===t?void 0:t.ortb;if(r&&i){var o=(0,d.zq)(i,r);Object.assign(n.native,o)}},z=function(n){!function(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.OI,r={puts:n.map(g)};t(f.vc.getConfig("cache.timeout"))(f.vc.getConfig("cache.url"),v(e),JSON.stringify(r),{contentType:"text/plain",withCredentials:!0})}(n.map((function(n){return n.bidResponse})),(function(e,t){t.forEach((function(t,r){var i,a=n[r],u=a.auctionInstance,c=a.bidResponse,d=a.afterBidAdded;e?(0,o.yN)("Failed to save to the video cache: ".concat(e,". Video bid must be discarded.")):""===t.uuid?(0,o.yN)("Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded."):(c.videoCacheKey=t.uuid,c.vastUrl||(c.vastUrl=(i=c.videoCacheKey,"".concat(f.vc.getConfig("cache.url"),"?uuid=").concat(i))),x(u,c),d())}))}))};f.vc.getConfig("cache",(function(n){M="number"==typeof n.cache.batchSize&&n.cache.batchSize>0?n.cache.batchSize:1,F="number"==typeof n.cache.batchTimeout&&n.cache.batchTimeout>0?n.cache.batchTimeout:0}));var L=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:setTimeout,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z,t=[[]],r=!1,i=function(n){return n()};return function(o,a,u){var c=F>0?n:i;t[t.length-1].length>=M&&t.push([]),t[t.length-1].push({auctionInstance:o,bidResponse:a,afterBidAdded:u}),r||(r=!0,c((function(){t.forEach(e),t=[[]],r=!1}),F))}}(),K=(0,y.z3)("async",(function(n,e,t,r){L(n,e,t)}),"callPrebidCache");function G(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.index,i=void 0===r?cn.index:r,a=i.getBidderRequest(n),u=i.getAdUnit(n),c=a&&a.start||n.requestTimestamp;Object.assign(n,{responseTimestamp:n.responseTimestamp||(0,o.AB)(),requestTimestamp:n.requestTimestamp||c,cpm:parseFloat(n.cpm)||0,bidder:n.bidder||n.bidderCode,adUnitCode:e}),null!=(null==u?void 0:u.ttlBuffer)&&(n.ttlBuffer=u.ttlBuffer),n.timeToRespond=n.responseTimestamp-n.requestTimestamp}function J(n){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.index,i=void 0===r?cn.index:r;C.j8(E.FP.BID_ADJUSTMENT,n);var o=(null===(e=i.getBidRequest(n))||void 0===e?void 0:e.renderer)||i.getAdUnit(n).renderer,u=n.mediaType,d=i.getMediaTypes(n),s=d&&d[u],l=s&&s.renderer,g=null;l&&l.url&&l.render&&(!0!==l.backupOnly||!n.renderer)?g=l:o&&o.url&&o.render&&(!0!==o.backupOnly||!n.renderer)&&(g=o),g&&(n.renderer=p.Th.install({url:g.url,config:g.options}),n.renderer.setRender(g.render));var v=V(n.mediaType,d,f.vc.getConfig("mediaTypePriceGranularity")),h=(0,c.D)(n.cpm,"object"===(0,a.Z)(v)?v:f.vc.getConfig("customPriceBucket"),f.vc.getConfig("currency.granularityMultiplier"));return n.pbLg=h.low,n.pbMg=h.med,n.pbHg=h.high,n.pbAg=h.auto,n.pbDg=h.dense,n.pbCg=h.custom,n}function V(n,e,t){if(n&&t){if(n===w.pX){var r=(0,u.Z)(e,"".concat(w.pX,".context"),"instream");if(t["".concat(w.pX,"-").concat(r)])return t["".concat(w.pX,"-").concat(r)]}return t[n]}}var Q=function(n){return function(e){var t=n||function(n){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).index,t=void 0===e?cn.index:e,r=V(n.mediaType,t.getMediaTypes(n),f.vc.getConfig("mediaTypePriceGranularity"));return"string"==typeof n.mediaType&&r?"string"==typeof r?r:"custom":f.vc.getConfig("priceGranularity")}(e);return t===E.Ql.B7?e.pbAg:t===E.Ql.uN?e.pbDg:t===E.Ql.yE?e.pbLg:t===E.Ql.M2?e.pbMg:t===E.Ql.lj?e.pbHg:t===E.Ql.qN?e.pbCg:void 0}};function $(n,e){return{key:n,val:"function"==typeof e?function(n,t){return e(n,t)}:function(n){return(0,o.NA)(n,e)}}}function Y(n,e){var t=E.TD,r=Object.assign({},A.S.settingsFor(null));if(r[E.k2.xn]||(r[E.k2.xn]=function(){var n=E.TD;return[$(n.BIDDER,"bidderCode"),$(n.AD_ID,"adId"),$(n.PRICE_BUCKET,Q()),$(n.SIZE,"size"),$(n.DEAL,"dealId"),$(n.SOURCE,"source"),$(n.FORMAT,"mediaType"),$(n.ADOMAIN,(function(n){return n.meta&&n.meta.advertiserDomains&&n.meta.advertiserDomains.length>0?[n.meta.advertiserDomains].flat()[0]:""})),$(n.ACAT,(function(n){return n.meta&&n.meta.primaryCatId?n.meta.primaryCatId:""})),$(n.DSP,(function(n){return n.meta&&(n.meta.networkId||n.meta.networkName)?(0,u.Z)(n,"meta.networkName")||(0,u.Z)(n,"meta.networkId"):""})),$(n.CRID,(function(n){return n.creativeId?n.creativeId:""}))]}()),"video"===n){var i=r[E.k2.xn].slice();if(r[E.k2.xn]=i,[t.UUID,t.CACHE_ID].forEach((function(n){void 0===(0,m.sE)(i,(function(e){return e.key===n}))&&i.push($(n,"videoCacheKey"))})),f.vc.getConfig("cache.url")&&(!e||!1!==A.S.get(e,"sendStandardTargeting"))){var a=(0,o.en)(f.vc.getConfig("cache.url"));void 0===(0,m.sE)(i,(function(n){return n.key===t.CACHE_HOST}))&&i.push($(t.CACHE_HOST,(function(n){return(0,u.Z)(n,"adserverTargeting.".concat(t.CACHE_HOST))?n.adserverTargeting[t.CACHE_HOST]:a.hostname})))}}return r}function X(n,e,t,r){var i=e[E.k2.xn];return t.size=t.getSize(),(i||[]).forEach((function(i){var a=i.key,u=i.val;if(n[a]&&(0,o.yN)("The key: "+a+" is being overwritten"),(0,o.LQ)(u))try{u=u(t,r)}catch(n){(0,o.H)("bidmanager","ERROR",n)}(void 0===e.suppressEmptyKeys||!0!==e.suppressEmptyKeys)&&a!==E.TD.DEAL&&a!==E.TD.ACAT&&a!==E.TD.DSP&&a!==E.TD.CRID||!(0,o.jH)(u)&&null!=u?n[a]=u:(0,o.PN)("suppressing empty key '"+a+"' from adserver targeting")})),n}function nn(n,e){return n[e.adUnitCode]||(n[e.adUnitCode]={bids:[]}),n[e.adUnitCode].bids.push(e),n}function en(n){Object.assign(this,{getAuction:function(e){var t=e.auctionId;if(null!=t)return n().find((function(n){return n.getAuctionId()===t}))},getAdUnit:function(e){var t=e.transactionId;if(null!=t)return n().flatMap((function(n){return n.getAdUnits()})).find((function(n){return n.transactionId===t}))},getMediaTypes:function(n){var e=n.transactionId,t=n.requestId;if(null!=t){var r=this.getBidRequest({requestId:t});if(null!=r&&(null==e||r.transactionId===e))return r.mediaTypes}else if(null!=e){var i=this.getAdUnit({transactionId:e});if(null!=i)return i.mediaTypes}},getBidderRequest:function(e){var t=e.requestId,r=e.bidderRequestId;if(null!=t||null!=r){var i=n().flatMap((function(n){return n.getBidRequests()}));return null!=r&&(i=i.filter((function(n){return n.bidderRequestId===r}))),null==t?i[0]:i.find((function(n){return n.bids&&null!=n.bids.find((function(n){return n.bidId===t}))}))}},getBidRequest:function(e){var t=e.requestId;if(null!=t)return n().flatMap((function(n){return n.getBidRequests()})).flatMap((function(n){return n.bids})).find((function(n){return n&&n.bidId===t}))}})}var tn=t(613),rn=t(8833);function on(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return an(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return an(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){u=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function an(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t1&&void 0!==arguments[1]?arguments[1]:{},t=e.src,i=void 0===t?"client":t,o=e.bidder,a=void 0===o?"":o,u=e.bidId,c=e.transactionId,d=e.auctionId,s=i,f=n||0;function l(){switch(f){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}this.bidderCode=a,this.width=0,this.height=0,this.statusMessage=l(),this.adId=(0,r._d)(),this.requestId=u,this.transactionId=c,this.auctionId=d,this.mediaType="banner",this.source=s,this.getStatusCode=function(){return f},this.getSize=function(){return this.width+"x"+this.height},this.getIdentifiers=function(){return{src:this.source,bidder:this.bidderCode,bidId:this.requestId,transactionId:this.transactionId,auctionId:this.auctionId}}}function o(n,e){return new i(n,e)}},3193:function(n,e,t){t.d(e,{FD:function(){return g},vc:function(){return m}});var r=t(4942),i=t(1002),o=t(3324),a=t(6463),u=t(4614),c=t(4358),d=t(265),s=t(5644);function f(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}var l="TRUE"===(0,c.ak)(s.f).toUpperCase(),g="random",v={};v[g]=!0,v.fixed=!0;var p=g,h={LOW:"low",MEDIUM:"medium",HIGH:"high",AUTO:"auto",DENSE:"dense",CUSTOM:"custom"},y="*";var m=function(){var n,e,t,s=[],g=null;function m(){function r(n){return d[n].val}function i(n,e){d[n].val=e}n={};var d={publisherDomain:{set:function(n){null!=n&&(0,c.yN)("publisherDomain is deprecated and has no effect since v7 - use pageUrl instead"),i("publisherDomain",n)}},priceGranularity:{val:h.MEDIUM,set:function(n){g(n)&&("string"==typeof n?i("priceGranularity",f(n)?n:h.MEDIUM):(0,c.PO)(n)&&(i("customPriceBucket",n),i("priceGranularity",h.CUSTOM),(0,c.ji)("Using custom price granularity")))}},customPriceBucket:{val:{},set:function(){}},mediaTypePriceGranularity:{val:{},set:function(n){null!=n&&i("mediaTypePriceGranularity",Object.keys(n).reduce((function(e,t){return g(n[t])?"string"==typeof n?e[t]=f(n[t])?n[t]:r("priceGranularity"):(0,c.PO)(n)&&(e[t]=n[t],(0,c.ji)("Using custom price granularity for ".concat(t))):(0,c.yN)("Invalid price granularity for media type: ".concat(t)),e}),{}))}},bidderSequence:{val:p,set:function(n){v[n]?i("bidderSequence",n):(0,c.yN)("Invalid order: ".concat(n,". Bidder Sequence was not set."))}},auctionOptions:{val:{},set:function(n){(function(n){if(!(0,c.PO)(n))return(0,c.yN)("Auction Options must be an object"),!1;for(var e=0,t=Object.keys(n);e2&&void 0!==arguments[2]?arguments[2]:{},i=e;if("string"!=typeof n&&(i=n,n=y,t=e||{}),"function"==typeof i){var o={topic:n,callback:i};return s.push(o),t.init&&i(n===y?T():(0,r.Z)({},n,T(n))),function(){s.splice(s.indexOf(o),1)}}(0,c.H)("listener must be a function")}function S(n){var e=Object.keys(n);s.filter((function(n){return(0,u.q9)(e,n.topic)})).forEach((function(e){e.callback((0,r.Z)({},e.topic,n[e.topic]))})),s.filter((function(n){return n.topic===y})).forEach((function(e){return e.callback(n)}))}function U(n){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{r(n),n.bidders.forEach((function(r){t[r]||(t[r]={}),Object.keys(n.config).forEach((function(i){var o=n.config[i];if((0,c.PO)(o)){var a=e?c.Ee:Object.assign;t[r][i]=a({},t[r][i]||{},o)}else t[r][i]=o}))}))}catch(n){(0,c.H)(n)}function r(n){if(!(0,c.PO)(n))throw"setBidderConfig bidder options must be an object";if(!Array.isArray(n.bidders)||!n.bidders.length)throw"setBidderConfig bidder options must contain a bidders list with at least 1 bidder";if(!(0,c.PO)(n.config))throw"setBidderConfig bidder options must contain a config object"}}function R(n,e){g=n;try{return e()}finally{P()}}function P(){g=null}return m(),{getCurrentBidder:function(){return g},resetBidder:P,getConfig:T,getAnyConfig:C,readConfig:k,readAnyConfig:I,setConfig:j,mergeConfig:function(n){if((0,c.PO)(n)){var e=(0,c.Ee)(b(),n);return j(function(n){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:(0,g.AB)();this.generatedTime=e,(0,l.Z)(this,O,!0),b(this,I,B).call(this,n)}},{key:"getConsentData",value:function(){return(0,f.Z)(this,C)}},{key:"hash",get:function(){var n=this;return(0,f.Z)(this,O)&&((0,l.Z)(this,k,(0,g._R)(JSON.stringify((0,f.Z)(this,C)&&this.hashFields?this.hashFields.map((function(e){return(0,f.Z)(n,C)[e]})):(0,f.Z)(this,C)))),(0,l.Z)(this,O,!1)),(0,f.Z)(this,k)}}]),n}();function B(n){(0,l.Z)(this,E,!0),(0,l.Z)(this,C,n),(0,f.Z)(this,T).resolve(n)}var S=function(n){(0,o.Z)(t,n);var e=h(t);function t(){return(0,c.Z)(this,t),e.apply(this,arguments)}return(0,d.Z)(t,[{key:"getConsentMeta",value:function(){var n=this.getConsentData();if(n&&this.generatedTime)return{usp:n,generatedAt:this.generatedTime}}}]),t}(j),U=function(n){(0,o.Z)(t,n);var e=h(t);function t(){var n;(0,c.Z)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:M;function e(e){return function(){return Object.fromEntries(n.map((function(n){var t=(0,r.Z)(n,2);return[t[0],t[1][e]()]})))}}return n=Object.entries(n),Object.assign({get promise(){return v.Z.all(n.map((function(n){var e=(0,r.Z)(n,2),t=e[0];return e[1].promise.then((function(n){return[t,n]}))}))).then((function(n){return Object.fromEntries(n)}))},get hash(){return(0,g._R)(n.map((function(n){var e=(0,r.Z)(n,2);e[0];return e[1].hash})).join(":"))}},Object.fromEntries(["getConsentData","getConsentMeta","reset"].map((function(n){return[n,e(n)]}))))}()},6463:function(n,e,t){t.d(e,{D:function(){return f},t:function(){return g}});var r=t(4614),i=t(4358),o=t(3193),a={buckets:[{max:5,increment:.5}]},u={buckets:[{max:20,increment:.1}]},c={buckets:[{max:20,increment:.01}]},d={buckets:[{max:3,increment:.01},{max:8,increment:.05},{max:20,increment:.5}]},s={buckets:[{max:5,increment:.05},{max:10,increment:.1},{max:20,increment:.5}]};function f(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=parseFloat(n);return isNaN(r)&&(r=""),{low:""===r?"":l(n,a,t),med:""===r?"":l(n,u,t),high:""===r?"":l(n,c,t),auto:""===r?"":l(n,s,t),dense:""===r?"":l(n,d,t),custom:""===r?"":l(n,e,t)}}function l(n,e,t){var a="";if(!g(e))return a;var u=e.buckets.reduce((function(n,e){return n.max>e.max?n:e}),{max:0}),c=0,d=(0,r.sE)(e.buckets,(function(e){if(n>u.max*t){var r=e.precision;void 0===r&&(r=2),a=(e.max*t).toFixed(r)}else{if(n<=e.max*t&&n>=c*t)return e.min=c,e;c=e.max}}));return d&&(a=function(n,e,t){var r=void 0!==e.precision?e.precision:2,a=e.increment*t,u=e.min*t,c=Math.floor,d=o.vc.getConfig("cpmRoundingFunction");"function"==typeof d&&(c=d);var s,f,l=Math.pow(10,r+2),g=(n*l-u*l)/(a*l);try{s=c(g)*a+u}catch(n){f=!0}(f||"number"!=typeof s)&&((0,i.yN)("Invalid rounding function passed in config"),s=Math.floor(g)*a+u);return(s=Number(s.toFixed(10))).toFixed(r)}(n,d,t)),a}function g(n){if((0,i.xb)(n)||!n.buckets||!Array.isArray(n.buckets))return!1;var e=!0;return n.buckets.forEach((function(n){n.max&&n.increment||(e=!1)})),e}},2021:function(n,e,t){t.d(e,{S1:function(){return h},j8:function(){return m},on:function(){return p},vw:function(){return y}});var r=t(4358),i=t(5644),o=t(613),a=t(3193),u="eventHistoryTTL",c=null,d=(0,o.Z)({monotonic:!0,ttl:function(){return c}});a.vc.getConfig(u,(function(n){var e,t=c;n=null===(e=n)||void 0===e?void 0:e[u],t!==(c="number"==typeof n?1e3*n:null)&&d.refresh()}));var s=Array.prototype.slice,f=Array.prototype.push,l=Object.values(i.FP),g=i.aI,v=function(){var n={},e={};function t(e,t){r.ji("Emitting event for: "+e);var i=t[0]||{},o=i[g[e]],a=n[e]||{que:[]},u=Object.keys(a),c=[];d.add({eventType:e,args:i,id:o,elapsedTime:r.bd()}),o&&u.includes(o)&&f.apply(c,a[o].que),f.apply(c,a.que),(c||[]).forEach((function(n){if(n)try{n.apply(null,t)}catch(n){r.H("Error executing handler:","events.js",n)}}))}return e.on=function(e,t,i){if(function(n){return l.includes(n)}(e)){var o=n[e]||{que:[]};i?(o[i]=o[i]||{que:[]},o[i].que.push(t)):o.que.push(t),n[e]=o}else r.H("Wrong event name : "+e+" Valid event names :"+l)},e.emit=function(n){var e=s.call(arguments,1);t(n,e)},e.off=function(e,t,i){var o=n[e];r.xb(o)||r.xb(o.que)&&r.xb(o[i])||i&&(r.xb(o[i])||r.xb(o[i].que))||(i?(o[i].que||[]).forEach((function(n){var e=o[i].que;n===t&&e.splice(e.indexOf(n),1)})):(o.que||[]).forEach((function(n){var e=o.que;n===t&&e.splice(e.indexOf(n),1)})),n[e]=o)},e.get=function(){return n},e.addEvents=function(n){l=l.concat(n)},e.getEvents=function(){return d.toArray().map((function(n){return Object.assign({},n)}))},e}();r.u2(v.emit.bind(v));var p=v.on,h=v.off,y=(v.get,v.getEvents),m=v.emit;v.addEvents},4078:function(n,e,t){t.d(e,{S:function(){return A}});var r=t(3324),i=t(2797),o=t(5102),a=t(8196),u=t(4358),c=t(6475),d=t(3193),s=t(8792),f=["architecture","bitness","model","platformVersion","fullVersionList"],l=["brands","mobile","platform"],g=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(n=window.navigator)||void 0===n?void 0:n.userAgentData,t=e&&l.some((function(n){return void 0!==e[n]}))?Object.freeze(p(1,e)):null;return function(){return t}}(),v=function(){var n,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null===(n=window.navigator)||void 0===n?void 0:n.userAgentData,t={},r=new WeakMap;return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;if(!r.has(n)){var i=Array.from(n);i.sort(),r.set(n,i.join("|"))}var o=r.get(n);if(!t.hasOwnProperty(o))try{t[o]=e.getHighEntropyValues(n).then((function(n){return(0,u.xb)(n)?null:Object.freeze(p(2,n))})).catch((function(){return null}))}catch(n){t[o]=s.Z.resolve(null)}return t[o]}}();function p(n,e){function t(n,e){var t={brand:n};return(0,u.d8)(e)&&!(0,u.jH)(e)&&(t.version=e.split(".")),t}var r={source:n};return e.platform&&(r.platform=t(e.platform,e.platformVersion)),(e.fullVersionList||e.brands)&&(r.browsers=(e.fullVersionList||e.brands).map((function(n){return t(n.brand,n.version)}))),void 0!==e.mobile&&(r.mobile=e.mobile?1:0),["model","bitness","architecture"].forEach((function(n){var t=e[n];(0,u.d8)(t)&&(r[n]=t)})),r}var h=t(3790);function y(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return m(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return m(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){u=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function m(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&(t[i]=(0,u.Ee)({},a,t[i]))})),i&&(0,c.N)(t,"device.sua",Object.assign({},i,t.device.sua)),t=w(t);var a,s=y(h.Iq);try{for(s.s();!(a=s.n()).done;){var f=a.value;if((0,h.Qg)(t,f)){t[f]=(0,u.Ee)({},O(t,o),t[f]);break}}}catch(n){s.e(n)}finally{s.f()}return t}));var e}));function C(n){try{return n(b.getWindowTop())}catch(e){return n(b.getWindowSelf())}}function T(n){return(0,u.iG)(n,Object.keys(n))}var E={site:function(n,e){if(!h.Iq.filter((function(n){return"site"!==n})).some(h.Qg.bind(null,n)))return T({page:e.page,ref:e.ref})},device:function(){return C((function(n){return{w:n.innerWidth||n.document.documentElement.clientWidth||n.document.body.clientWidth,h:n.innerHeight||n.document.documentElement.clientHeight||n.document.body.clientHeight,dnt:(0,u.oV)()?1:0,ua:n.navigator.userAgent,language:n.navigator.language.split("-").shift()}}))},regs:function(){var n={};C((function(n){return n.navigator.globalPrivacyControl}))&&(0,c.N)(n,"ext.gpc",1);var e=d.vc.getConfig("coppa");return"boolean"==typeof e&&(n.coppa=e?1:0),n}};function O(n,e){var t,r,i,a=(0,o.hh)(e.page,{noLeadingWww:!0});return T({domain:a,keywords:null===(t=C((function(n){return n.document.querySelector("meta[name='keywords']")})))||void 0===t||null===(r=t.content)||void 0===r||null===(i=r.replace)||void 0===i?void 0:i.call(r,/\s/g,""),publisher:T({domain:b.findRootDomain(a)})})}},3790:function(n,e,t){t.d(e,{A_:function(){return o},Iq:function(){return i},Qg:function(){return a}});var r=t(4358),i=["dooh","app","site"];function o(n){return function(e){return i.reduce((function(t,i){return a(e,i)&&(null!=t?((0,r.yN)("".concat(n," specifies both '").concat(t,"' and '").concat(i,"'; dropping the latter.")),delete e[i]):t=i),t}),null),e}}function a(n,e){return null!=n[e]&&Object.keys(n[e]).length>0}},8196:function(n,e,t){t.d(e,{W:function(){return o}});var r=t(4358),i=(0,t(5164).eA)("fpdEnrichment"),o=(0,r.HP)((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.host;if(!i.cookiesAreEnabled())return n;var e,t,o=n.split(".");if(2===o.length)return n;var a=-2,u="_rdc".concat(Date.now()),c="writeable";do{e=o.slice(a).join(".");var d=new Date((0,r.AB)()+1e4).toUTCString();i.setCookie(u,c,d,"Lax",e,void 0);var s=i.getCookie(u,void 0);s===c?(t=!1,i.setCookie(u,"","Thu, 01 Jan 1970 00:00:01 GMT",void 0,e,void 0)):(a+=-1,t=Math.abs(a)<=o.length)}while(t);return e}))},2797:function(n,e,t){t.d(e,{Bx:function(){return g},Cd:function(){return d},IF:function(){return v},bA:function(){return l},v5:function(){return s},z3:function(){return u}});var r=t(9062),i=t(1432),o=t.n(i),a=t(8792),u=o()({ready:o().SYNC|o().ASYNC|o().QUEUE}),c=(0,a.P)();u.ready=function(){var n=u.ready;return function(){try{return n.apply(u,arguments)}finally{c.resolve()}}}();var d=c.promise,s=u.get;var f={};function l(n,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.postInstallAllowed,o=void 0!==i&&i;u("async",(function(t){t.forEach((function(n){return e.apply(void 0,(0,r.Z)(n))})),o&&(f[n]=e)}),n)([])}function g(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return a=n.done,n},e:function(n){u=!0,o=n},f:function(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function g(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t0&&(o.img.ext={aspectratios:s})}else(0,u.H)("image.aspect_ratios was passed, but it's empty:",r.aspect_ratios);else(0,u.H)("image.aspect_ratios was passed, but it's not a an array:",r.aspect_ratios);r.sizes&&(2===r.sizes.length&&(0,u.U)(r.sizes[0])&&(0,u.U)(r.sizes[1])?(o.img.w=r.sizes[0],o.img.h=r.sizes[1],delete o.img.hmin,delete o.img.wmin):(0,u.H)("image.sizes was passed, but its value is not an array of integers:",r.sizes))}else"title"===t?o.title={len:r.len||140}:"ext"===t&&(o.ext=r,delete o.required);e.assets.push(o)}else e.privacy=1;else(0,u.H)("Unrecognized native asset code: ".concat(t,". Asset will be ignored."));return e}(n.nativeParams))}))}function S(n){var e=n.assets;if(!Array.isArray(e)||0===e.length)return(0,u.H)("assets in mediaTypes.native.ortb is not an array, or it's empty. Assets: ",e),!1;var t=e.map((function(n){return n.id}));return e.length!==new Set(t).size||t.some((function(n){return n!==parseInt(n,10)}))?((0,u.H)("each asset object must have 'id' property, it must be unique and it must be an integer"),!1):n.hasOwnProperty("eventtrackers")&&!Array.isArray(n.eventtrackers)?((0,u.H)("ortb.eventtrackers is not an array. Eventtrackers: ",n.eventtrackers),!1):e.every((function(n){return function(n){if(!(0,u.PO)(n))return(0,u.H)("asset must be an object. Provided asset: ",n),!1;if(n.img){if(!(0,u.hj)(n.img.w)&&!(0,u.hj)(n.img.wmin))return(0,u.H)("for img asset there must be 'w' or 'wmin' property"),!1;if(!(0,u.hj)(n.img.h)&&!(0,u.hj)(n.img.hmin))return(0,u.H)("for img asset there must be 'h' or 'hmin' property"),!1}else if(n.title){if(!(0,u.hj)(n.title.len))return(0,u.H)("for title asset there must be 'len' property defined"),!1}else if(n.data){if(!(0,u.hj)(n.data.type))return(0,u.H)("for data asset 'type' property must be a number"),!1}else if(n.video&&!(Array.isArray(n.video.mimes)&&Array.isArray(n.video.protocols)&&(0,u.hj)(n.video.minduration)&&(0,u.hj)(n.video.maxduration)))return(0,u.H)("video asset is not properly configured"),!1;return!0}(n)}))}function U(n){var e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.index,i=void 0===r?d.K.index:r,o=i.getAdUnit(n);if(!o)return!1;var a=o.nativeOrtbRequest,u=(null===(e=n.native)||void 0===e?void 0:e.ortb)||z(n.native,a);return R(u,a)}function R(n,e){if(!(0,a.Z)(n,"link.url"))return(0,u.H)("native response doesn't have 'link' property. Ortb response: ",n),!1;var t=e.assets.filter((function(n){return 1===n.required})).map((function(n){return n.id})),r=n.assets.map((function(n){return n.id})),i=t.every((function(n){return(0,c.q9)(r,n)}));return i||(0,u.H)("didn't receive a bid with all required assets. Required ids: ".concat(t,", but received ids in response: ").concat(r)),i}function P(n,e){var t=e.native.ortb||W(e.native);return"click"===n.action?function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).fetchURL,r=void 0===t?u.hq:t;if(e){var i,o=(n.assets||[]).filter((function(n){return n.link})).reduce((function(n,e){return n[e.id]=e.link,n}),{}),a=(null===(i=n.link)||void 0===i?void 0:i.clicktrackers)||[],c=o[e],d=a;c&&(d=c.clicktrackers||[]),d.forEach((function(n){return r(n)}))}else{var s;((null===(s=n.link)||void 0===s?void 0:s.clicktrackers)||[]).forEach((function(n){return r(n)}))}}(t,null==n?void 0:n.assetId):function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.runMarkup,r=void 0===t?function(n){return(0,u.$8)(n)}:t,i=e.fetchURL,o=void 0===i?u.hq:i,a=(n.eventtrackers||[]).filter((function(n){return n.event===I})).reduce((function(n,e){return k.hasOwnProperty(e.method)&&n[k[e.method]].push(e.url),n}),{img:[],js:[]}),c=a.img,d=a.js;n.imptrackers&&(c=c.concat(n.imptrackers));c.forEach((function(n){return o(n)})),d=d.map((function(n){return'