(function(){try{function initApstag(){return!!window.apstag&&(window.apstag.init({pubID:"",adServer:"googletag",bidTimeout:1e3}),!0)}function appendAdAndFetch(browsiGrid,conf,pbjsBids,slotImpressionCount){var ad=document.createElement("div");setStyle(ad,conf.id,conf.grid),browsiGrid.appendChild(ad),fetchBids("",conf.adUnit,ad,"",pbjsBids,slotImpressionCount)}function fetchBids(pubId,adunitId,element,sizes,pbjsBids,slotImpressionCount){var adUnitPath="/"+pubId+"/"+adunitId,slot=window.googletag.defineSlot(adUnitPath,sizes,element.id).addService(googletag.pubads()).setCollapseEmptyDiv(!0);Promise.all([pbjsHandler(adUnitPath,element.id,sizes,pbjsBids),apstagHandler(adUnitPath,element.id,sizes)]).then(()=>{"".forEach(function(t){slot.setTargeting(t.key,t.value)}),googletag.pubads().addEventListener("slotRenderEnded",event=>{if(event.slot.getSlotElementId()===element.id&&0==slotImpressionCount&&slotImpressionCount++,!event.isEmpty&&event.slot.getSlotElementId()===element.id&&refreshRate&&0{pbjsInstance=pbjsInstance||{},pbjsInstance.que=pbjsInstance.que||[],pbjsInstance.que.push(function(){pbjsInstance.addAdUnits(adUnitConfig),pbjsInstance.requestBids({adUnitCodes:[unitCode],bidsBackHandler:function(){return pbjsInstance.setTargetingForGPTAsync(),resolve()}})})})}async function apstagHandler(adUnit,unitCode,sizes){return new Promise(function(resolve){window.apstag.fetchBids({slots:[{slotID:unitCode,slotName:adUnit,sizes:sizes.filter(function(size){return"fluid"!=size})}]},function(){return window.apstag.setDisplayBids(),resolve()})})}function setStyle(element,slotId,gridNum){element.className=slotId,element.id=slotId,element.style.display="grid",element.style.gridColumn=gridNum}function getPbjsBidsPerAdUnit(adunit,pbjsInstance){if(pbjsInstance&&pbjsInstance.adUnits&&adunit){var bids,adConfig=pbjsInstance.adUnits.find(function(au){return-1{pbjsInstance.que.push(function(){pbjsInstance.requestBids({adUnitCodes:[unitCode],bidsBackHandler:function(){return pbjsInstance.setTargetingForGPTAsync(unitCode),resolve()}})})})}function refreshAd(unitCode,slot,adUnit,sizes){Promise.all([pbjsRefreshHandler(unitCode),apstagHandler(adUnit,unitCode,sizes)]).then(()=>{"".forEach(function(t){slot.setTargeting(t.key,t.value)}),slot.setTargeting("browsiRefresh",!0),googletag.pubads().refresh([slot],{changeCorrelator:!1})})}function refreshAdHandler(ad,refreshRate,event,adUnit,sizes){var timeout,observer=new IntersectionObserver((entries,observer)=>{var out=!1,entry=entries[0];.5<=entry.intersectionRatio?(out=!1,timeout=setTimeout(()=>{out||(refreshAd(ad.id,event.slot,adUnit,sizes),observer.unobserve(entry.target),observer.disconnect())},refreshRate)):(out=!0,clearTimeout(timeout))},{threshold:[0,.5]});observer.observe(ad)}var refreshRate="";refreshRate=+refreshRate;var leftConf={id:"_leftAd",adUnit:"",grid:1,timeout:0},rightConf={id:"_rightAd",adUnit:"",grid:2,timeout:0},pbjsInstance=window[""],pbjsBidsLeftAd=getPbjsBidsPerAdUnit(leftConf.adUnit,pbjsInstance),pbjsBidsRightAd=getPbjsBidsPerAdUnit(rightConf.adUnit,pbjsInstance),browsiContainer=document.querySelector("#"),browsiWrapper=browsiContainer.parentElement;browsiContainer.style.left=0,browsiContainer.style.right=0,browsiContainer.style.padding="0 1rem";var browsiGrid=document.createElement("div");browsiGrid.style.display="grid",browsiGrid.style.gridColumn="span 2",function(){return window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],!!window.apstagLOADED||initApstag()}()&&window.googletag.cmd.push(()=>{appendAdAndFetch(browsiGrid,leftConf,pbjsBidsLeftAd,0),appendAdAndFetch(browsiGrid,rightConf,pbjsBidsRightAd,0),browsiContainer.appendChild(browsiGrid)})}catch(e){console.warn("[BROWSI]: ",e.message)}})();