(function(){var w={},J=function(Y){var V={};var X={architecture:"sua_arch",bitness:"sua_bit",platformVersion:"sua_pf_vr",platform:"sua_pf_br",mobile:"sua_mob",brands:"sua_br",fullVersionList:"sua_br",model:"sua_model"};function W(Z){Z=Z||[];Z.forEach(function(aa){aa.version=aa.version.split?aa.version.split("."):aa.version});return JSON.stringify(Z)}Object.keys(w).forEach(function(Z){switch(Z){case"architecture":case"bitness":case"platform":case"model":V[X[Z]]=w[Z];break;case"platformVersion":V[X[Z]]=(w[Z]||"").replaceAll(".",",");break;case"mobile":V[X[Z]]=w[Z]===true?1:0;break;case"fullVersionList":V[X[Z]]=W(w[Z]);break;case"brands":if(!V[Z]){V[X[Z]]=W(w[Z])}break}});if(Y===false){return V}var U=[];Object.keys(V).forEach(function(Z){U.push(Z+"="+(Z==="sua_pf_vr"?V[Z]:encodeURIComponent(V[Z])))});return(U.join("&"))},E=function(){if(window.navigator&&window.navigator.userAgentData){if(window.navigator.userAgentData.brands){w.brands=window.navigator.userAgentData.brands;w.mobile=window.navigator.userAgentData.mobile;w.platform=window.navigator.userAgentData.platform}function U(){if(window.navigator.userAgentData.getHighEntropyValues){var V=navigator.userAgentData.getHighEntropyValues(["architecture","model","bitness","platformVersion","fullVersionList"]).then(function(W){w=W})}}U()}};E();var L=window,c=function(V){var U={70328:""};return(U.hasOwnProperty(V))},F=function(V){var U={70328:""};return(U.hasOwnProperty(V))},x=function(V){var U={70328:""};return(U.hasOwnProperty(V))},z=true,S=function(V){var U=z?"s://sshowads":"://showads";return"http"+U+".pubmatic.com/AdServer/AdServerServlet?operId=201&rs=2&"},O=function(){var V="",U=document.domain;if(U&&U!==""){try{V=(document.URL==decodeURIComponent(document.URL))?document.URL:decodeURIComponent(document.URL)}catch(W){V=document.URL}V=(V.indexOf("http")===0)?V:""}return V.substr(0,512)},N=console.log.bind(console,"PubMatic:"),r=function(U){return typeof U==="function"},l=function(){return"https:"},A=(function(){try{return L.localStorage&&r(L.localStorage.getItem)&&r(L.localStorage.setItem)}catch(U){return false}})(),P="PubMatic",B="PubMatic_USP",k="PubMatic_GPP",d=function(U,X){var W=L.document.createElement("script");W.type="text/javascript";W.src=U;W.async=true;if(r(X)){W.onload=W.onreadystatechange=X}var V=L.document.getElementsByTagName("script")[0];V&&V.parentNode&&r(V.parentNode.appendChild)&&V.parentNode.appendChild(W)},a=((L.__cmp||L.__tcfapi)?1:0),Q=function(Y,X){var V=0,U=Y.length,W=false;for(;V((new Date()).getTime()-(24*60*60*1000))){W.c=U.c;W.g=U.g}else{}}}}return W},b=function(V){var U;if(!A){return}try{U=L.localStorage.getItem(P)}catch(W){}if(U&&typeof U==="string"&&U!=="null"){try{U=JSON.parse(U)}catch(W){U={}}if(U.hasOwnProperty(V)){delete U[V];try{L.localStorage.setItem(P,JSON.stringify(U))}catch(W){}}}},R=function(W,X){var U=1;function ad(){var ae={};function af(){if(ae.usPrivacy){W(ae)}else{}}return{consentDataCallback:function(ag,ah){if(ah&&ag.uspString){ae.usPrivacy=ag.uspString}af()}}}var V=ad();var ac={};try{window.__uspapi("getUSPData",U,V.consentDataCallback)}catch(ab){var aa=window;var Z;while(!Z){try{if(aa.frames.__uspapiLocator){Z=aa}}catch(ab){}if(aa===window.top){break}aa=aa.parent}if(!Z){return X("USP CMP not found.")}Y("getUSPData",Z,V.consentDataCallback)}function Y(ag,af,ai){window.__uspapi=function(al,aj,an){var ak=Math.random()+"";var am={__uspapiCall:{command:al,version:aj,callId:ak}};ac[ak]=an;af.postMessage(am,"*")};window.addEventListener("message",ae,false);window.__uspapi(ag,U,ah);function ae(ak){var aj=ak&&ak.data&&ak.data.__uspapiReturn;if(aj&&aj.callId){if(typeof ac[aj.callId]!=="undefined"){ac[aj.callId](aj.returnValue,aj.success);delete ac[aj.callId]}}}function ah(aj,ak){window.removeEventListener("message",ae,false);ai(aj,ak)}}},q=function(V,X){function W(Z){var Y=!!(Z&&Z.usPrivacy);if(!Y){return}p(V,"c",Z.usPrivacy);if(X){X("USP")}}function U(){if(X){X("USP")}}R(W,U);setTimeout(function(){U("USP: Failed to retrieve user consent data from CMP, failure callback calling..")},100)},p=function(X,U,W){var V;if(!A){return}try{V=L.localStorage.getItem(B)}catch(Y){}if(V&&typeof V==="string"&&V!=="null"){try{V=JSON.parse(V)}catch(Y){V={}}}else{V={}}if(V){if(!V.hasOwnProperty(X)){V[X]={}}V[X].t=(new Date()).getTime();V[X][U]=W}try{L.localStorage.setItem(B,JSON.stringify(V))}catch(Y){}},t=function(X){var W={c:""};if(!A){return W}var V;try{V=L.localStorage.getItem(B)}catch(Y){}if(V&&typeof V==="string"&&V!=="null"){try{V=JSON.parse(V)}catch(Y){V={}}if(V.hasOwnProperty(X)){var U=V[X];if(U&&U.c&&U.t){if(U.t&&parseInt(U.t)>((new Date()).getTime()-(24*60*60*1000))){W.c=U.c}else{}}}}return W},T=function(){return["sectionChange","signalStatus"]},u=function(U){if(U&&U.signalStatus==="ready"){return true}else{return false}},o=function(U,V){var ab="__gpp";var aa={};function W(ae,af){if(!af){V(ae,af)}else{if(ae&&u(ae.pingData)&&T().includes(ae.eventName)){U(ae.pingData,af)}}}function ac(){window[ab]("addEventListener",W)}if(window[ab]){if(typeof window[ab]==="function"){ac()}else{setTimeout(function(){if(typeof window[ab]==="function"){ac()}},500)}}else{if(window!==top){var Y=window;var ad;while(!ad){try{if(Y.frames.__gppLocator){ad=Y}}catch(Z){}if(Y===window.top){break}Y=Y.parent}X("addEventListener",ad,W)}else{setTimeout(function(){if(typeof window[ab]==="function"){ac()}},500)}}function X(ag,ai,aj){window.__gpp=function(an,ap,ak,al){if(!ai){ah();return V({msg:"GPP: CMP not found"},false)}var am=Math.random()+"";var ao={__gppCall:{command:an,parameter:ak,version:al,callId:am}};aa[am]=ap;ai.postMessage(ao,"*")};window.addEventListener("message",af,false);window.__gpp(ag,ae,null,"1.1");function af(al){var ak={};try{ak=(typeof al.data==="string")?JSON.parse(al.data):al.data}catch(an){}if(ak&&ak.__gppReturn&&ak.__gppReturn.callId){var am=ak.__gppReturn;if(typeof aa[am.callId]==="function"){aa[am.callId](am.returnValue,am.success);aa[am.callId]=null}}}function ah(){window.removeEventListener("message",af,false)}function ae(ak,al){ah();aj(ak,al)}}},v=function(Y,ac){var V=76;var U=false;function X(ad){if(!ad){return ad}return ad.reduceRight(function(ae,af){return Object.assign(af,ae)},{})}function W(ae,ad){return ae.reduce(function(ag,af){return(ag&&ag[af]!==undefined)?ag[af]:undefined},ad)}function aa(ad){if(ad&&ad.VendorConsent&&ad.VendorConsent.length&&ad.VendorConsent.includes(V)){return true}else{return false}}function ab(af){if(af&&af.gppString){var ae=af.applicableSections;if(ae&&ae.length&&ae.indexOf(2)!==-1){var ad=X(W(["parsedSections","tcfeuv2"],af));if(aa(ad)){M(Y,"GPP",af.gppString,af.applicableSections)}else{e(Y)}}else{M(Y,"GPP",af.gppString,af.applicableSections)}}if(ac&&!U){U=true;ac("GPP")}}function Z(){if(U){return}if(ac){U=true;ac("GPP")}}o(ab,Z);setTimeout(function(){Z("GPP: Failed to retrieve user consent data from CMP, failure callback calling..")},500)},K=function(U){var V={consentKey:"c",additionalKey:"g"};if(U==="GPP"){V.consentKey="gpp";V.additionalKey="gpp_sid"}return V},M=function(Z,U,Y,V){var W;var X=K(U);if(!A){return}try{W=L.localStorage.getItem(k)}catch(aa){}if(W&&typeof W==="string"&&W!=="null"){try{W=JSON.parse(W)}catch(aa){W={}}}else{W={}}if(W){if(!W.hasOwnProperty(Z)){W[Z]={}}W[Z].t=(new Date()).getTime();W[Z][X.consentKey]=encodeURIComponent(Y);W[Z][X.additionalKey]=V}try{L.localStorage.setItem(k,JSON.stringify(W))}catch(aa){}},h=function(Z,U){var X=K(U);var Y={};Y[X.consentKey]="";if(!A){return Y}var W;try{W=L.localStorage.getItem(k)}catch(aa){}if(W&&typeof W==="string"&&W!=="null"){try{W=JSON.parse(W)}catch(aa){W={}}if(W.hasOwnProperty(Z)){var V=W[Z];if(V&&V[X.consentKey]&&V.t){if(V.t&&parseInt(V.t)>((new Date()).getTime()-(24*60*60*1000))){Y[X.consentKey]=V[X.consentKey];if(typeof V[X.additionalKey]==="object"&&V[X.additionalKey].length){Y[X.additionalKey]=V[X.additionalKey].join(",")}else{Y[X.additionalKey]=V[X.additionalKey]}}else{}}}}return Y},e=function(V){if(!A){return}var U;try{U=L.localStorage.getItem(k)}catch(W){}if(U&&typeof U==="string"&&U!=="null"){try{U=JSON.parse(U)}catch(W){U={}}if(U.hasOwnProperty(V)){delete U[V];try{L.localStorage.setItem(k,JSON.stringify(U))}catch(W){}}}},C=function(Z,Y){var aa,X,V,U={};U.av="0",U.ap="-1x-1";try{document.write("");aa=document.getElementById("t_"+Z);if(aa){if(typeof aa.getBoundingClientRect==="function"){X=aa.getBoundingClientRect();V=window.innerHeight||document.body.clientHeight;U.av=(X.top<\/script>')},m=function(){var U=f.LRID,V;if(U==0){}else{V=f.AL[U];g.showAd({pubId:V.pubId,siteId:V.siteId,adId:V.adId,width:V.width,height:V.height,kadNetwork:f.LNID})}},g=window.PubMatic||(window.PubMatic={}),f=g.Mobile||(g.Mobile={iGAC:false,CCTU:null,CCTF:null,CCTFA:[],PCT:null,PW:null,AL:{},LS:{},CIDs:[],ECPM:0,ACPM:0,LNID:null,OID:null,LRID:0});g.showAd=g.showAd||function(U){var V=new G(U);if(V.rid){f.AL[V.rid]=V}};window.processPubMaticBid=window.processPubMaticBid||function(U){var V,X,ab,aa=f.AL,W=U.PubMatic_Bid,Z=U.meta_data;if(Z&&W){if(W.creative_tag&&W.tracking_url){V=aa[Z.rid]||false;if(V){f.LNID=W.network_id||null;f.OID=W.oid||null;V.CTU=W.click_tracking_url||null;V.LPU=W.landing_page||null;if(W.campaign_id){f.CIDs.push(W.campaign_id)}f.ECPM=W.ecpm||0;f.ACPM=W.acpm||0;try{document.write(''+W.creative_tag+"");y(W.tracking_url)}catch(Y){}X=document.getElementById(V.rid);if(V.CTU&&X&&typeof document.addEventListener==="function"){ab=function(ag){var ae=this,af=aa[ae.id],ai,ac=af.CTU;if(af&&!af.iCTS&&ac){if(x(af.pubId)&&c(af.pubId)&&af.CCTF&&F(af.pubId)){ag.preventDefault();ag.stopPropagation()}function ah(){if(!af.iCTS){var ad=document.createElement("script");ad.setAttribute("src",z?ac.replace("http://","https://"):ac);ad.setAttribute("type","text/javascript");function aj(){if(c(af.pubId)&&af.CCTF){if(typeof af.CCTF=="function"){try{if(F(af.pubId)){af.CCTFA.unshift(af.LPU?af.LPU:"")}af.CCTF.apply(window,af.CCTFA)}catch(ak){}}}}ad.addEventListener("load",aj,true);ad.addEventListener("error",aj,true);ae.appendChild(ad);af.iCTS=true}}if(af.CCTU){ai=document.createElement("script");ai.setAttribute("src",z?af.CCTU.replace("http://","https://"):af.CCTU);ai.setAttribute("type","text/javascript");ai.addEventListener("load",ah,true);ai.addEventListener("error",ah,true);document.body.appendChild(ai)}else{ah()}}};if(V.kadNetwork&&f.PCT&&f.PW){f.PW.removeEventListener("click",f.PCT,true)}X.addEventListener("click",ab,true);f.PCT=ab;f.PW=X}}}}};g.AHT=window.PubMatic_AHT||0;if(g.AHT==2){g.AHT=window.PubMatic_AHT=0;m()}})();