(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=new Map;function f(e){d.clear();for(let t of e)d.set(t.name,{adapter:t.adapter,registration:t.registration})}function p(e){d.set(e.name,{adapter:e.adapter,registration:e.registration})}function m(e){d.delete(e)}function h(e){return d.has(e)}function g(e,t,n){let r=[];for(let[,{adapter:i,registration:a}]of d){if(a.onlyWithConsent&&!t)continue;let o=t?a.consentAlias:a.noConsentAlias,s=i.buildBid(o,e,n);s!=null&&r.push(s)}return r}function _(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}var v=o((()=>{}));function y(e,t,n){_(e,t),t.set(e,n)}var ee=o((()=>{v()}));function b(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}var te=o((()=>{}));function x(e,t,n){return e.set(b(e,t),n),n}var ne=o((()=>{te()}));function S(e,t){return e.get(b(e,t))}var re=o((()=>{te()}));function ie(){le=!0}function ae(){le&&(se=window.innerWidth,ce=window.innerHeight,le=!1)}function oe(){return ae(),se}var se,ce,le,ue=o((()=>{se=0,le=!0,window.addEventListener(`resize`,ie,{passive:!0}),window.addEventListener(`orientationchange`,ie,{passive:!0})}));function de(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function fe(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){de(a,r,i,o,s,`next`,e)}function s(e){de(a,r,i,o,s,`throw`,e)}o(void 0)})}}var pe=o((()=>{}));function me(e){return typeof e==`object`&&!!e}function he(){var e,t;if(navigator.userAgentData)return navigator.userAgentData.brands.some(e=>e.brand===`Chromium`||e.brand===`Google Chrome`);let n=!!window.chrome||`chrome`in window,r=typeof CSS<`u`&&((e=(t=CSS).supports)==null?void 0:e.call(t,`-webkit-app-region`,`drag`))||`queryLocalFonts`in window;return n||r}function ge(e){return!!new URLSearchParams(window.location.search).get(e)}function _e(e){return!!ve(e)||ge(e)}function ve(e){try{return window.localStorage.getItem(e)}catch(t){return console.error(`Error while getting ${e} from local storage`,t),null}}function ye(){let e=`direct`,t=document.referrer;if(!t)return e;try{let e=[`facebook.com`,`instagram.com`,`twitter.com`,`linkedin.com`,`reddit.com`,`tiktok.com`,`pinterest.com`,`tumblr.com`,`snapchat.com`,`weibo.com`,`wechat.com`,`t.co`],n=[`google.com`,`google.co.uk`,`google.de`,`google.fr`,`google.es`,`google.it`,`bing.com`,`yahoo.com`,`duckduckgo.com`,`baidu.com`,`yandex.com`,`yandex.ru`,`ecosia.org`,`startpage.com`],r=new URL(t).hostname.toLowerCase().replace(/^www\./,``),i=e=>r===e||r.endsWith(`.`+e);if(e.some(i))return`social`;if(n.some(i))return`organic`}catch(e){}return e}var be,xe=o((()=>{ue(),be={DESKTOP:`desktop`,MOBILE:`mobile`,TABLET:`tablet`}}));function Se(e){"@babel/helpers - typeof";return Se=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Se(e)}var Ce=o((()=>{}));function we(e,t){if(Se(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Se(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Te=o((()=>{Ce()}));function Ee(e){var t=we(e,`string`);return Se(t)==`symbol`?t:t+``}var De=o((()=>{Ce(),Te()}));function Oe(e,t,n){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=o((()=>{De()}));function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function C(e){for(var t=1;t{ke()}));xe();function je(e){return e!=null&&(!Array.isArray(e)||e.length>0)}function Me(e){if(je(e.override))return e.override;let t=e.getAdUnitSizes(e.divId);return je(t)?t:e.getAdUnitSizes(e.adUnitKey)}ee(),ne(),re(),w();var Ne=new WeakMap,Pe=new WeakMap,Fe=new WeakMap,Ie=new WeakMap,Le=new WeakMap,Re=class{constructor(e){y(this,Ne,void 0),y(this,Pe,void 0),y(this,Fe,void 0),y(this,Ie,void 0),y(this,Le,void 0),x(Ne,this,e.logger),x(Pe,this,e.fullNameAd),x(Ie,this,e.getAdUnitSizes),x(Le,this,e.videoLoaderConfig),x(Fe,this,{device:e.device,deviceForSSP:e.deviceForSSP,domain:e.domain,fullNameAd:e.fullNameAd,pageCategory:e.pageCategory,pageType:e.pageType,placementPrefix:e.fullNameAd?e.fullNameAd:e.slug+`/`,sellerId:e.sellerId,slug:e.slug})}buildAdUnitDefinition(e){var t;let n=e.adUnitKey,r=(t=e.overridePrebidAdUnitCode)==null?n:t,i=e.divId,a=e.adUnitPath,o=e.customSizes,s=Me({getAdUnitSizes:S(Ie,this),divId:i,adUnitKey:n,override:o}).slice(),c=s.indexOf(`fluid`);c>-1&&s.splice(c,1);let l=s.filter(e=>Array.isArray(e)&&e.length===2);if(!je(l))throw Error(`No numeric sizes found for adUnitKey: ${n}, divId: ${i}`);let u;if(a!=null&&u==null)try{let e=a.lastIndexOf(`/`);u=a.substring(e+1)}catch(e){console.error(e)}let d={code:r,pubstack:{adUnitName:u||r,adUnitPath:a||S(Pe,this)+r},mediaTypes:{banner:{sizes:l}},ortb2Imp:{ext:{data:{divId:n,placement:S(Pe,this)+n}}},bids:[]};try{let t=C(C({},S(Fe,this)),{},{sspParams:e.sspParams}),r=g(n,e.personalizedAds,t);for(let e of r)d.bids.push(e)}catch(e){S(Ne,this).error(e)}return S(Ne,this).debug(`Bid container for adUnit: ${n}`,d),d}buildVideoAdUnitDefinition(e,t,n){let r={code:e,ortb2Imp:{ext:{gpid:S(Fe,this).fullNameAd+e,data:{divId:e,placement:S(Fe,this).fullNameAd+e}}},mediaTypes:{video:{context:`instream`,playerSize:[640,480],mimes:[`application/javascript`,`application/vnd.apple.mpegurl`,`application/x-mpegurl`,`video/3gpp`,`video/mp4`,`video/mpeg`,`video/ogg`,`video/webm`,`video/x-m4v`,`video/ms-asf`,`video/x-ms-wmv`,`video/x-msvideo`],protocols:[2,3,5,6,7,8,11,12,13,14],boxingallowed:1,minduration:S(Le,this).minDuration,maxduration:S(Le,this).maxDuration,linearity:1,api:[1,2,7],playbackmethod:[1,2,3,4,5,6],startdelay:0,plcmt:t,skip:0,pos:1,delivery:[1,2]}},bids:[]};try{let t=g(e,n,S(Fe,this));for(let e of t)r.bids.push(e)}catch(e){S(Ne,this).error(e)}return S(Ne,this).debug(`Video bid container for adUnit: ${e}`,r),r}};ee(),ne(),re();var ze={useBaseGvlid:!0};function Be(e,t){for(let n of t)if(n.bidderAliases)for(let t of n.bidderAliases)!t.onlyWithConsent&&!t.onlyWithoutConsent&&e.aliasBidder(t.baseBidder,t.alias,ze);for(let n of t)if(n.bidderAliases)for(let t of n.bidderAliases)(t.onlyWithConsent||t.onlyWithoutConsent)&&(console.log(`Registering consent-conditional bidder alias: ${t.baseBidder} → ${t.alias}`),e.aliasBidder(t.baseBidder,t.alias,ze));for(let r of t){if(r.registration.onlyWithConsent)continue;let{noConsentAlias:t,consentAlias:i}=r.registration;if(t!==i){var n;let a=(n=r.registration.noConsentAliasBaseBidder)==null?i:n;e.aliasBidder(a,t,ze)}}}var Ve=new WeakMap,He=class{constructor(){y(this,Ve,{})}withBase(){return x(Ve,this,{standard:{storageAllowed:!0}}),this}withAdapterSettings(e,t){for(let n of e)n.bidderSettings&&(n.bidderSettings.cpmAdjustment&&(S(Ve,this)[n.bidderSettings.consentAlias]={bidCpmAdjustment:n.bidderSettings.cpmAdjustment}),!t&&n.bidderSettings.noConsentAlias&&n.bidderSettings.noConsentCpmAdjustment&&(S(Ve,this)[n.bidderSettings.noConsentAlias]={bidCpmAdjustment:n.bidderSettings.noConsentCpmAdjustment}));return this}build(){return S(Ve,this)}};pe();var Ue=1e3,We=new Set([`adUnitCode`,`browserType`,`domain`,`gptSlot`,`mediaType`,`personalizedAds`,`refreshNumber`,`size`]);function Ge(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ke(e){if(!Ge(e)||!Ge(e.schema))return!1;let{delimiter:t=`|`,fields:n}=e.schema;return typeof t!=`string`||!Array.isArray(n)||n.length===0||!n.every(e=>typeof e==`string`&&We.has(e))?!1:typeof e.default==`number`?!0:Ge(e.values)?Object.entries(e.values).some(([e,r])=>e.split(t).length===n.length&&typeof r==`number`):!1}function qe(e){if(!Ge(e)||!Ge(e.data)||e.floorMin!=null&&typeof e.floorMin!=`number`)return!1;let{data:t}=e;return t.floorsSchemaVersion===2?Array.isArray(t.modelGroups)&&t.modelGroups.length>0&&t.modelGroups.every(e=>Ge(e)&&typeof e.modelWeight==`number`&&Ke(e)):(t.floorsSchemaVersion==null||t.floorsSchemaVersion===1)&&Ke(t)}function Je(e){return Ye.apply(this,arguments)}function Ye(){return Ye=fe(function*({logger:e,request:t}){let{url:n}=t;try{let r=yield t.response;if(!r.ok)return e.warn(`Dynamic floors: ${n} answered ${r.status}, keeping the website floors`),null;let i=yield r.json();return qe(i)?(e.debug(`Dynamic floors: ${n} loaded in ${Math.round(performance.now()-t.startedAt)} ms`),i):(e.warn(`Dynamic floors: ${n} is not a valid floors config, keeping the website floors`),null)}catch(t){return e.warn(`Dynamic floors: ${n} could not be loaded, keeping the website floors`,t instanceof Error?t.message:String(t)),null}}),Ye.apply(this,arguments)}var Xe=`PREBID_NO_BIDS_CONFIGURED`,Ze=class extends Error{constructor(e){super(`No bids configured for ad unit ${e}`),this.code=Xe,this.name=`PrebidNoBidsConfiguredError`,this.adUnitKey=e}};function Qe(e){return e.trim().toLowerCase().replace(/^([a-z][a-z0-9+.-]*:)?\/\//,``).split(/[/?#:]/)[0].replace(/^www\./,``).replace(/\.$/,``)}function $e(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):typeof e==`string`?[e]:[]}function et(e,t){for(let n of $e(e)){let e=Qe(n);if(e===``)continue;let r=t.find(t=>e===t||e.endsWith(`.`+t));if(r!==void 0)return{domain:e,matchedEntry:r}}}function tt(e,t){for(let n of e.flatMap($e)){let e=n.trim().toUpperCase();if(e===``)continue;let r=t.find(t=>e===t||e.startsWith(t+`-`));if(r!==void 0)return{category:e,matchedEntry:r}}}function nt(e,t){var n;let r=(n=e.meta)==null?{}:n,i=et(r.advertiserDomains,t.domains);if(i)return{matchedEntry:i.matchedEntry,reason:ot,value:i.domain};if((r.cattax==null?it:Number(r.cattax))!==it)return;let a=tt([r.primaryCatId,r.secondaryCatIds],t.categories);if(a)return{matchedEntry:a.matchedEntry,reason:st,value:a.category}}function rt({getOrtb2:e,onReject:t}){let n,r,i={categories:[],domains:[]};return(a,o,s,c)=>{var l;let u=(l=e())==null?{}:l;(u.badv!==n||u.bcat!==r)&&(n=u.badv,r=u.bcat,i={categories:$e(u.bcat).map(e=>e.trim().toUpperCase()).filter(Boolean),domains:$e(u.badv).map(Qe).filter(Boolean)});let d=nt(s,i);if(d){t==null||t(s,d,o),c(d.reason);return}return a(o,s,c)}}var it,at,ot,st,ct=o((()=>{it=1,at=`engineBidBlocklist`,ot=`Adv domain is not allowed`,st=`Category is not allowed`})),lt,ut,dt=o((()=>{xe(),ut=class e{constructor({logKey:e,label:t}){this.isDebug=!1,this.label=`%cENGINE`,_e(e)&&(this.isDebug=!0),typeof t==`string`&&(this.label=`${this.label} ${t}`)}debug(t,...n){this.isDebug&&console.debug(this.label,e.logStyle,t,...n)}error(t,...n){console.trace(this.label,e.errorStyle,t,...n)}warn(t,...n){this.isDebug&&console.warn(this.label,e.warnStyle,t,...n)}},lt=ut,lt.logStyle=`background: #43A047; padding: 2px 4px;`,lt.errorStyle=`background: #E53935; padding: 2px 4px;`,lt.warnStyle=`background: #FB8C00; padding: 2px 4px;`}));ct(),xe(),dt(),ee(),ne(),w(),re();var ft={TCF:`tcf`,USP:`usp`};function pt(){return{buckets:[{precision:2,max:2,increment:.01},{precision:2,max:5,increment:.02},{precision:2,max:10,increment:.1},{precision:2,max:20,increment:.25}]}}function mt(){return{buckets:[{precision:2,max:2,increment:.02},{precision:2,max:10,increment:.05},{precision:2,max:20,increment:.1},{precision:2,max:30,increment:.25},{precision:2,max:70,increment:1}]}}var ht=`888.it,888casino.it,admiralbet.it,bet365.com,bet365.it,betfair.it,betflag.it,betimatic.com,betimatic.it,betsson.it,bonusquote.it,bwin.it,comparazione-quote.it,confrontabonuscasino.it,domusbet.it,eurobet.it,eurobet.live,giocodigitale.it,goldbet.it,goldbet.live,guidagiochi.it,instantcasino.com,leovegas.it,lottomatica.it,lottomatica.sport,netbet.it,oddschecker.com,planetwin365.it,pokerstars.it,quotebonus.com,quotebonus.net,quotecomparatore.com,sisal.it,sisalfunclub.it,snai.it,sportitaliabet.it,stanleybet.it,starcasino.it,starvegas.it,unibet.it,williamhill.it`.split(`,`),gt=new ut({logKey:`debug_pbjs`,label:`BID_BLOCKLIST`}),_t=new WeakMap,vt=new WeakMap,yt=class{constructor(){y(this,_t,{}),y(this,vt,{})}withBase({logPrebid:e,advertisersUrlBlocklist:t,iabCategoriesBlocklist:n,timeoutBuffer:r=400,sellerId:i,userSync:a}){let o=pt();x(vt,this,{amx:`USD`,appnexus:`USD`,pbserver:`USD`,ix:`USD`,ogury:`USD`,outbrain:`USD`,richaudience:`USD`,rtbhouse:`USD`,rubicon:`USD`,triplelift:`USD`});let s=[...new Set([...t==null?[]:t,...ht])];return s.length>50&>.warn(`badv has ${s.length} entries: sending the first 50 to bidders, enforcing all of them on bid responses`,{notSentToBidders:s.slice(50)}),x(_t,this,{debug:e,bidderSequence:`fixed`,enableSendAllBids:!1,targetingControls:{alwaysIncludeDeals:!0},enableTIDs:!0,auctionOptions:{yield:!0},ortb2:{bcat:[...new Set([`IAB7`,`IAB9-20`,`IAB11`,`IAB14-1`,`IAB15-1`,`IAB23`,`IAB25`,`IAB26`,...n||[]])],badv:s.slice(0,50),source:{schain:{ver:`1.0`,complete:1,nodes:[{asi:`talksmedia.it`,sid:i,hp:1}]}}},[at]:{badv:s},useBidCache:!0,eventHistoryTTL:120,minBidCacheTTL:60,minTargetedBidCacheTTL:300,cache:{url:`https://prebid-cache.pubtech.ai/cache`,ignoreBidderCacheKey:!0},instreamTracking:{enabled:!0,urlPattern:/(prebid-cache\.pubtech\.ai.*\/cache\.*)|(search\.spotxchange\.com\/ad\/vast\.html\?key=\.*)/},rubicon:{netRevenue:!1,singleRequest:!0},outbrain:{bidderUrl:`https://b1h.outbrain.com/api/bidder/prebid/bid/`,usersyncUrl:`https://b1sync.outbrain.com/usersync/prebid`},timeoutBuffer:r,userSync:C({syncDelay:3e3,syncsPerBidder:5,aliasSyncEnabled:!0,filterSettings:{image:{bidders:`*`,filter:`include`},iframe:{bidders:`*`,filter:`include`}},userIds:[{name:`unifiedId`,params:{partner:`slk72bj`},storage:{type:`cookie`,name:`pubtech-unifiedid`,expires:60}},{name:`pubCommonId`,storage:{type:`cookie`,name:`_pubCommonId`,expires:365,refreshInSeconds:604800}},{name:`criteo`},{name:`id5Id`,params:{partner:306},storage:{type:`html5`,name:`id5id`,expires:90,refreshInSeconds:8*3600}},{name:`amxId`,storage:{type:`html5`,name:`amxId`,expires:1}}]},a),priceGranularity:o,mediaTypePriceGranularity:{video:mt(),"video-outstream":o,banner:o,native:o},currency:{adServerCurrency:`EUR`,granularityMultiplier:1,conversionRateFile:`https://cdn.pubtech.ai/ssp/prebid/fixer.json`,bidderCurrencyDefault:S(vt,this),defaultRates:{USD:{EUR:.88}}},deviceAccess:!0}),this}withCustomGptSlotMatching(e){return e!=null&&Object.keys(e).length>0&&(S(_t,this).customGptSlotMatching=t=>n=>t.getSlotElementId()===n||t.getAdUnitPath()===n||e[t.getSlotElementId()]===n),this}withRealTimeData(e){return S(_t,this).realTimeData={dataProviders:[{name:`adagio`,params:{organizationId:`1098`,site:e}}]},this}withAdagioAnalytics(e,t){return window.IS_ADAGIO_ENABLED!==void 0&&e.enableAnalytics([{provider:`adagio`,options:{organizationId:`1098`,site:t}}]),this}withConsentManagement(e){return typeof e==`string`?(e===ft.USP&&(S(_t,this).consentManagement={usp:{cmpApi:`iab`,timeout:15e3}}),e===ft.TCF&&(S(_t,this).consentManagement={gdpr:{cmpApi:`iab`,allowAuctionWithoutConsent:!0,timeout:15e3,defaultGdprScope:!0}}),this):this}withFloors({customFloorModelGroups:e,customFloorModelVersion:t,customFloorValues:n,disableFloor:r,dynamicFloorsConfig:i,personalizedAds:a,refreshNumberCb:o}){if(!r){let r=`default_2`,s={"*|banner|*|*|*|true":.03,"*|banner|*|*|*|false":.02,"*|video|*|*|*|*":.8,"O_INTERSTITIAL|banner|*|chrome|*|true":.6,"O_INTERSTITIAL|banner|*|*|*|false":.1,"O_INTERSTITIAL|banner|*|notChrome|*|true":.6};typeof t==`string`&&t.trim()!==``&&(r=t),typeof n==`object`&&n&&(s=n);let c=()=>({fields:[`adUnitCode`,`mediaType`,`size`,`browserType`,`refreshNumber`,`personalizedAds`]}),l=e!=null&&e.length>0?{currency:`EUR`,floorsSchemaVersion:2,skipRate:10,modelGroups:e.map(({modelVersion:e,modelWeight:t,skipRate:n,values:r})=>C(C({modelVersion:e,modelWeight:t},n!=null&&{skipRate:n}),{},{schema:c(),values:C({},r)}))}:{currency:`EUR`,skipRate:10,modelVersion:r,schema:c(),values:s},u=i==null?l:C({skipRate:10},JSON.parse(JSON.stringify(i.data)));S(_t,this).floors=C(C({enforcement:{floorDeals:!1,bidAdjustment:!0}},(i==null?void 0:i.floorMin)!=null&&{floorMin:i.floorMin}),{},{data:u,additionalSchemaFields:{browserType:()=>he()?`chrome`:`notChrome`,refreshNumber:e=>typeof o==`function`?o(e.adUnitCode):`0`,personalizedAds:()=>String(a)}})}return this}withPrebidServer(e){return e&&(S(_t,this).s2sConfig={accountId:e,enabled:!0,adapter:`prebidServer`,endpoint:`https://prebid-server.pbstck.com/openrtb2/auction`,syncEndpoint:`https://prebid-server.pbstck.com/cookie_sync`,bidders:[`pubstack_server`]}),this}withNoConsentCurrencies(){return S(vt,this).NoConsentAmx=`USD`,S(vt,this).NoConsentAppnexus=`USD`,S(vt,this).NoConsentPbserver=`USD`,S(vt,this).NoConsentIx=`USD`,S(vt,this).NoConsentOgury=`USD`,S(vt,this).NoConsentOutbrain=`USD`,S(vt,this).NoConsentRichaudience=`USD`,S(vt,this).NoConsentRubicon=`USD`,S(vt,this).NoConsentTriplelift=`USD`,this}build(){return S(_t,this)}};function bt(e,t){_(e,t),t.add(e)}var xt=o((()=>{v()}));xe(),ue(),w(),xt(),ee(),ne(),re(),te();var St=[1e3,3e3,8e3],Ct=1e4,wt=new Set([`hidden`,`frozen`,`terminated`]);function Tt(){if(!(typeof AbortSignal>`u`||typeof AbortSignal.timeout!=`function`))return AbortSignal.timeout(Ct)}var Et=`prebid.org wrapper`;function Dt(e){let t={adIds:new Set,creativeIds:new Set,isPrebidCacheWrapper:!1};if(e==null||e.trim()===``)return t;let n=new DOMParser().parseFromString(e,`text/xml`);if(n.getElementsByTagName(`parsererror`).length>0)return t;let r=(e,t)=>{for(let i of Array.from(n.getElementsByTagName(e))){var r;let e=(r=i.getAttribute(`id`))==null?void 0:r.trim();e&&t.add(e)}};return r(`Ad`,t.adIds),r(`Creative`,t.creativeIds),t.isPrebidCacheWrapper=Array.from(n.getElementsByTagName(`AdSystem`)).some(e=>{var t;return((t=e.textContent)==null?void 0:t.trim())===Et}),t}function Ot(e,t){if(t.isPrebidCacheWrapper&&e.wrapperAdSystems.includes(Et))return!0;let n=[e.adId,...e.wrapperAdIds],r=[e.creativeId,...e.wrapperCreativeIds];return n.some(e=>e!=null&&t.adIds.has(e))||r.some(e=>e!=null&&t.creativeIds.has(e))}var kt=[`modelGroups`,`modelWeight`,`modelWeightSum`,`noFloorSignalBidders`];function At(e,t,n){var r;let i=e==null?void 0:e.data;if(i==null)return null;if(i.floorsSchemaVersion!==2)return t!=null&&i.modelVersion!==t?null:n?i:jt(i);let a=(r=i.modelGroups)==null?void 0:r.find(e=>e.modelVersion===t);if(a==null)return null;let o=C(C({},i),a);for(let e of kt)delete o[e];return o.skipRate==null&&(o.skipRate=typeof(e==null?void 0:e.skipRate)==`number`?e.skipRate:0),n?o:jt(o)}function jt(e){let t=C({},e);return delete t.values,t}var Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakSet,Ut=class{constructor(e){bt(this,Ht),y(this,Mt,void 0),y(this,Nt,void 0),y(this,Pt,void 0),y(this,Ft,void 0),y(this,It,void 0),y(this,Lt,void 0),y(this,Rt,void 0),y(this,zt,new Map),y(this,Bt,void 0),y(this,Vt,{dr:document.referrer,path:window.location.pathname,source:ye(),version:`0.11.0`,width:oe()}),x(Mt,this,e.contextManager),x(Nt,this,e.getPersonalizedAds),x(Pt,this,e.getRefreshCount),x(Ft,this,e.hasDynamicFloors),x(It,this,e.isCachedBidReusable),x(Lt,this,e.logger),x(Rt,this,e.pageLifecycleManager),x(Bt,this,e.websiteId),S(Rt,this).on(`stateChange`,e=>{wt.has(e)&&b(Ht,this,Xt).call(this)})}attach(e){e.onEvent(`auctionEnd`,t=>{var n;let r=t.auctionId,i=Array.from(new Set((n=t.adUnitCodes)==null?[]:n)),a=i.length>1,o={data:null,enforcement:null,additionalSchemaFields:[]};try{var s;let n=e.getConfig(`floors`),i=(s=t.adUnits)==null||(s=s.flatMap(e=>{var t;return(t=e.bids)==null?[]:t}).find(e=>{var t;return((t=e.floorData)==null?void 0:t.modelVersion)!=null}))==null||(s=s.floorData)==null?void 0:s.modelVersion,a=At(n,i,!S(Ft,this).call(this));a==null&&(n==null?void 0:n.data)!=null&&S(Lt,this).warn(`${r}: no configured floors model matches '${i}', sending no floor data`),o={data:a,enforcement:(n==null?void 0:n.enforcement)||null,additionalSchemaFields:Object.keys((n==null?void 0:n.additionalSchemaFields)||{})}}catch(e){S(Lt,this).warn(`${r}: error reading floors config for auction data`,e)}for(let n of i)try{var c,l,u,d,f,p,m;let i=[],s=[];for(let e of t.bidsReceived){if(e.adUnitCode!==n)continue;let t=b(Ht,this,Kt).call(this,{bidderCode:e.bidderCode});s.push(t),i.push({cpm:e.cpm,floorData:e.floorData,size:e.size,ssp:t,time:e.timeToRespond,timedOut:!1})}for(let e of t.noBids){if(e.adUnitCode!==n)continue;let t=b(Ht,this,Kt).call(this,{bidderCode:e.bidder});s.push(t),i.push({ssp:t,time:e.timeToRespond,timedOut:!1})}for(let e of t.bidderRequests){var h;if(!((h=e.bids)!=null&&h.some(e=>e.adUnitCode===n)))continue;let t=b(Ht,this,Kt).call(this,{bidderCode:e.bidderCode});s.includes(t)||i.push({ssp:t,timedOut:!0})}try{let t=e.getBidResponsesForAdUnitCode(n).bids;for(let e of t)e.auctionId===r||!S(It,this).call(this,e)||i.push({cached:!0,cpm:e.cpm,size:e.size,ssp:b(Ht,this,Kt).call(this,{bidderCode:e.bidderCode}),timedOut:!1})}catch(e){S(Lt,this).warn(`${n}: error reading cached bids for auction data`,e)}let g=(c=t.adUnits)==null?void 0:c.find(e=>e.code===n),_=g==null||(l=g.bids)==null||(l=l.find(e=>e.floorData!=null))==null?void 0:l.floorData,v={adunit:n,timestamp:t.auctionEnd,auctionId:r,bidRequests:i,dr:S(Vt,this).dr,floorConfig:o,path:S(Vt,this).path,sm:`openmarket`,source:S(Vt,this).source,type:`auction`,version:S(Vt,this).version,wId:S(Bt,this),width:S(Vt,this).width,metadata:{isBatchSelling:a,personalizedAds:S(Nt,this).call(this),refreshNumber:S(Pt,this).call(this,n),sizes:(u=(d=g==null||(f=g.mediaTypes)==null||(f=f.banner)==null?void 0:f.sizes)==null?g==null||(p=g.mediaTypes)==null||(p=p.video)==null?void 0:p.playerSize:d)==null?[]:u,browserType:he()?`chrome`:`notChrome`,floorSkipped:(_==null?void 0:_.skipped)===!0,floorSkippedReason:(m=_==null?void 0:_.skippedReason)==null?null:m}};b(Ht,this,qt).call(this,{data:v})}catch(e){S(Lt,this).warn(`${n}: error sending auction data`,e)}});let t=new Set;e.onEvent(`bidWon`,e=>{let n=e.adUnitCode;if(e.adId!=null&&t.has(e.adId))return;let r=null,i=null,a=[];try{let e=S(Mt,this).getCurrentContext();r=e.author,i=e.pageType,a=b(Ht,this,Gt).call(this,e.customTargeting)}catch(e){S(Lt,this).warn(`${n}: error reading the context for impression data`,e)}try{let o={adunit:n,timestamp:Date.now(),auctionId:e.latestTargetedAuctionId||e.auctionId,author:r,categories:a,cpm:e.cpm,dr:S(Vt,this).dr,generatedAuctionId:e.auctionId,netRevenue:e.netRevenue,path:S(Vt,this).path,pTitle:document.title,pType:i,size:e.size,sm:`openmarket`,source:S(Vt,this).source,ssp:b(Ht,this,Kt).call(this,{bidderCode:e.bidder}),type:`impression`,version:S(Vt,this).version,wId:S(Bt,this),width:S(Vt,this).width};b(Ht,this,qt).call(this,{data:o}),e.adId!=null&&t.add(e.adId)}catch(e){S(Lt,this).warn(`${n}: error sending impression data`,e)}})}createVideoImpressionReporter(e,t){let n=!1,r;return i=>{if(!n){if(r!=null||(r=Dt(e.vastXml)),!Ot(i,r)){t.debug(`${e.adUnitCode}: the impression is not from the Prebid bid's VAST, not reporting it`,{bidAdIds:[...r.adIds],bidCreativeIds:[...r.creativeIds],impression:i});return}n=!0,b(Ht,this,Wt).call(this,e)}}}};function Wt(e){let t=e.adUnitCode,n=e.bidder,r=e.latestTargetedAuctionId||e.auctionId;try{let i=S(Mt,this).getCurrentContext(),a=b(Ht,this,Gt).call(this,i.customTargeting),o={timestamp:Date.now(),adunit:t,auctionId:r,author:i.author,categories:a,cpm:e.cpm,dr:S(Vt,this).dr,generatedAuctionId:e.auctionId,netRevenue:e.netRevenue,path:S(Vt,this).path,pTitle:document.title,pType:i.pageType,size:e.size,sm:`openmarket`,source:S(Vt,this).source,ssp:b(Ht,this,Kt).call(this,{bidderCode:n}),type:`impression`,version:S(Vt,this).version,wId:S(Bt,this),width:S(Vt,this).width,metadata:{trigger:`ima_impression`}};b(Ht,this,qt).call(this,{data:o})}catch(e){S(Lt,this).warn(`${t}: error sending video impression data`,e)}}function Gt(e){let t=[e.article_section,e.article_tag],n=new Set;for(let e of t)if(!(e==null||e.trim()===``))for(let t of e.split(`,`)){let e=t.trim();e!==``&&n.add(e)}return Array.from(n)}function Kt({bidderCode:e}){switch(e){case`freewheelssp`:return`freewheel`;case`ix`:return`indexexchange`;case`pubstack_server`:return`pubstack`;case`smartadserver`:return`smart`;default:return e}}function qt({data:e}){let t=String(e.adunit),{type:n}=e,r=[`https://producer-ovh-node01.intelligence.pubtech.ai:8443/ad-data-raw/process?type=${e.type}`];for(let i of r)S(Lt,this).debug(`${t}: sending ${n} data`,e),b(Ht,this,Jt).call(this,{adunit:t,attempt:0,endpoint:i,payload:JSON.stringify(e),type:n})}function Jt(e){let{adunit:t,type:n}=e,r=r=>{r>=500?b(Ht,this,Yt).call(this,e,`status ${r}`):(r<200||r>=300)&&S(Lt,this).warn(`${t}: ${n} data rejected with status ${r}`)},i=()=>{b(Ht,this,Yt).call(this,e,`request failed`)};try{if(typeof fetch==`function`){fetch(e.endpoint,{body:e.payload,credentials:`omit`,keepalive:!0,method:`POST`,signal:Tt()}).then(e=>r(e.status),i);return}let t=new XMLHttpRequest;t.open(`POST`,e.endpoint),t.timeout=Ct,t.onload=()=>r(t.status),t.onerror=i,t.ontimeout=i,t.send(e.payload)}catch(e){S(Lt,this).warn(`${t}: error sending ${n} data`,e)}}function Yt(e,t){let{adunit:n,attempt:r,type:i}=e;if(r>=St.length){S(Lt,this).warn(`${n}: ${i} data dropped after ${r+1} attempts (${t})`);return}S(Lt,this).debug(`${n}: ${i} data failed (${t}), retrying`);let a=C(C({},e),{},{attempt:r+1}),o=setTimeout(()=>{S(zt,this).delete(a),b(Ht,this,Jt).call(this,a)},St[r]*(.5+Math.random()));S(zt,this).set(a,o),wt.has(S(Rt,this).getState())&&b(Ht,this,Xt).call(this)}function Xt(){for(let[e,t]of S(zt,this)){clearTimeout(t);let{adunit:n,type:r}=e;try{typeof navigator.sendBeacon==`function`&&navigator.sendBeacon(e.endpoint,e.payload)||S(Lt,this).warn(`${n}: ${r} data dropped, the beacon could not be queued`)}catch(e){S(Lt,this).warn(`${n}: error sending ${r} data via beacon`,e)}}S(zt,this).clear()}var Zt=`slot:onLoad`,Qt=`slot:renderEnded`,$t=`slot:responseReceived`;xe(),w(),xt(),ee(),re(),ne(),te(),pe();function en(e){return t=>new vn(C(C({},e),t))}var tn=new WeakMap,nn=new WeakMap,rn=new WeakMap,an=new WeakMap,on=new WeakMap,sn=new WeakMap,cn=new WeakMap,ln=new WeakMap,un=new WeakMap,dn=new WeakMap,fn=new WeakMap,pn=new WeakMap,mn=new WeakMap,hn=new WeakMap,gn=new WeakMap,_n=new WeakSet,vn=class{constructor(e){var t;if(bt(this,_n),y(this,tn,void 0),y(this,nn,new Map),y(this,rn,null),y(this,an,void 0),y(this,on,new Map),y(this,sn,new Map),y(this,cn,void 0),y(this,ln,void 0),y(this,un,void 0),y(this,dn,void 0),y(this,fn,void 0),y(this,pn,void 0),y(this,mn,void 0),y(this,hn,new Map),y(this,gn,e=>{var t;return e==null||e.trim()===``?`0`:String((t=S(hn,this).get(e))==null?0:t)}),!e.sellerId)throw Error(`PrebidAdapter: sellerId must be provided`);x(an,this,e.eventDispatcher),x(ln,this,{customFloorModelGroups:e.customFloorModelGroups,customFloorModelVersion:e.customFloorModelVersion,customFloorValues:e.customFloorValues,disableFloor:e.disableFloor}),x(un,this,e.logger),x(mn,this,e.personalizedAds),x(pn,this,e.sspAdapters),x(fn,this,new Ut({contextManager:e.contextManager,getPersonalizedAds:()=>S(mn,this),getRefreshCount:e=>{var t;return(t=S(hn,this).get(e))==null?0:t},hasDynamicFloors:()=>S(rn,this)!=null,isCachedBidReusable:e=>b(_n,this,bn).call(this,e),logger:S(un,this),pageLifecycleManager:e.pageLifecycleManager,websiteId:e.websiteId})),f(S(pn,this)),x(tn,this,new Re({device:e.device,deviceForSSP:e.deviceForSSP,domain:e.domain,fullNameAd:e.fullNameAd,getAdUnitSizes:e.sizeMappingRegistry.getAdUnitSizes,logger:S(un,this),pageCategory:e.pageCategory,pageType:e.pageType,sellerId:e.sellerId,slug:e.websiteSlug,videoLoaderConfig:(t=e.videoLoaderConfig)==null?{maxDuration:30,minDuration:1}:t}));let n=e.dynamicFloorsRequest!=null&&!e.disableFloor?b(_n,this,yn).call(this,e.dynamicFloorsRequest):void 0;x(dn,this,Promise.all([e.instance,n]).then(([t])=>{Be(t,S(pn,this));let r=_e(`debug_pbjs`),i=new yt().withBase(C(C({},e),{},{logPrebid:r})).withCustomGptSlotMatching(e.divIdToAdUnitKeyMapping).withRealTimeData(e.websiteSlug).withAdagioAnalytics(t,e.websiteSlug).withConsentManagement(e.consentManagementType).withFloors(C(C({},e),{},{dynamicFloorsConfig:S(rn,this),personalizedAds:S(mn,this),refreshNumberCb:S(gn,this)})).withPrebidServer(e.prebidServerAccountId).withNoConsentCurrencies().build();t.setConfig(C(C({},i),{},{bidCacheFilterFunction:e=>b(_n,this,bn).call(this,e)})),t.bidderSettings=new He().withBase().withAdapterSettings(S(pn,this),S(mn,this)).build(),e.consentReader&&e.consentReader.onConsentReleased({onConsentCallback:e=>{e.personalizedAds!==S(mn,this)&&(x(mn,this,e.personalizedAds),b(_n,this,Tn).call(this,t,e.personalizedAds))}});try{b(_n,this,Cn).call(this,t)}catch(e){S(un,this).warn(`Failed to track the floors outcome of the auctions`,e instanceof Error?e.message:String(e))}try{S(fn,this).attach(t)}catch(e){S(un,this).warn(`Failed to initialize real time bidding analytics`,e instanceof Error?e.message:String(e))}return t.processQueue(),n!=null&&S(un,this).debug(S(rn,this)==null?`Dynamic floors: Prebid configured with the website floors, the dynamic floors are not in`:`Dynamic floors: Prebid configured with the dynamic floors`),x(cn,this,t),t}))}removeAdUnit(e){S(nn,this).set(e,Date.now()),S(sn,this).delete(e),S(hn,this).delete(e),S(dn,this).then(t=>t.removeAdUnit(e))}removeUserSyncs(){S(dn,this).then(e=>{if(typeof e.removeUserSyncs!=`function`)return;let t=e.removeUserSyncs();S(un,this).debug(`Removed ${t} user sync iframes`)})}runAuction({adUnitKey:e,adUnitPath:t,customSizes:n,divId:r,overridePrebidAdUnitCode:i,refreshCount:a,sspParams:o}){var s=this;return fe(function*(){let c=yield S(dn,s);return new Promise((l,u)=>{let d=[e];c.removeAdUnit(i==null?e:i);let f=S(tn,s).buildAdUnitDefinition({adUnitKey:e,adUnitPath:t,customSizes:n,divId:r,overridePrebidAdUnitCode:i,personalizedAds:S(mn,s),sspParams:o});if(f.bids.length>0)c.addAdUnits(f),S(hn,s).set(f.code,a==null?0:a);else{u(new Ze(e));return}c.requestBids({adUnitCodes:[f.code],adUnits:[f],bidsBackHandler:()=>{l(d)}})})})()}runBatchAuction(e){var t=this;return fe(function*(){let n=yield S(dn,t);return new Promise((r,i)=>{let a=[],o=[];for(let r of e){var s;a.push(r.adUnitKey),n.removeAdUnit((s=r.overridePrebidAdUnitCode)==null?r.adUnitKey:s);try{let e=S(tn,t).buildAdUnitDefinition({adUnitKey:r.adUnitKey,adUnitPath:r.adUnitPath,customSizes:r.customSizes,divId:r.divId,overridePrebidAdUnitCode:r.overridePrebidAdUnitCode,personalizedAds:S(mn,t),sspParams:r.sspParams});if(e.bids.length>0){var c;n.addAdUnits(e),S(hn,t).set(e.code,(c=r.refreshCount)==null?0:c),o.push(e)}}catch(e){S(un,t).error(`Error building ad unit definition for ${r.adUnitKey}`,e)}}if(o.length===0){i(Error(`Prebid: No bids configured for any of the batch slots`));return}n.requestBids({adUnitCodes:o.map(e=>e.code),adUnits:o,bidsBackHandler:()=>{r(a)}})})})()}getAllWinningBids(){var e=this;return fe(function*(){return(yield S(dn,e)).getAllWinningBids()})()}getHighestCpmBids(e){var t=this;return fe(function*(){return(yield S(dn,t)).getHighestCpmBids(e)})()}renderWinningBid(e,t,n){var r=this;return fe(function*(){let i=yield S(dn,r),a=!1,o=i.getHighestCpmBids(n);if(o.length>0){let s=o[0],c=e.getElementById(s.adUnitCode);if(c===null)throw Error(`Div with id ${s.adUnitCode} not found for rendering the winning bid`);t!==s.adUnitCode&&S(un,r).warn(`Div id provided for rendering (${t}) does not match the adUnitCode of the winning bid (${s.adUnitCode}). Rendering into the div with id ${s.adUnitCode}.`),c.innerHTML=``,c.setAttribute(`data-hb-query-id`,s.adId),c.removeAttribute(`style`);let l={EVENT_NAME:$t,divId:t,adUnitKey:n,isEmpty:s===null,adProvider:`prebid`};S(an,r).dispatch(l);let u=e.createElement(`div`);u.setAttribute(`style`,`display: flex; justify-content: center; align-items: center;`);let d=`ifrm_`+s.adUnitCode,f=s.adId,p=e.createElement(`iframe`);p.setAttribute(`id`,d),p.setAttribute(`scrolling`,`no`),p.setAttribute(`style`,`border:0`),p.setAttribute(`marginwidth`,`0`),p.setAttribute(`marginheight`,`0`),p.setAttribute(`height`,`0`),p.setAttribute(`width`,`0`),p.addEventListener(`load`,()=>{S(an,r).dispatch({EVENT_NAME:Zt,adUnitKey:n,adProvider:`prebid`,isEmpty:!1})},{once:!0}),u.appendChild(p),c.appendChild(u);let m=e.getElementById(d);if(m instanceof HTMLIFrameElement&&m.contentWindow!=null){let e=m.contentWindow.document;i.renderAd(e,f),a=!0}else throw Error(`Iframe with id ${d} not found in the DOM after appending it for rendering the winning bid`)}let s={EVENT_NAME:Qt,divId:t,adUnitKey:n,adProvider:`prebid`,isEmpty:!a};return S(an,r).dispatch(s),a})()}setTargetingForGPT(e){var t=this;return fe(function*(){(yield S(dn,t)).setTargetingForGPTAsync(e)})()}isSSPConfigured(e){return h(e)}addSSP(e){p(e)}removeSSP(e){m(e)}buildVideoVast(e,t,n){var r=this;return fe(function*(){let i=yield S(dn,r),{adUnitKey:a,placement:o,vast:s}=e;i.removeAdUnit(a);let c=S(tn,r).buildVideoAdUnitDefinition(a,o,S(mn,r));if(c.bids.length===0){n.debug(`No bid found`),t(s);return}i.addAdUnits(c),i.requestBids({timeout:3e3,adUnitCodes:[a],adUnits:[c],bidsBackHandler:()=>{let e;try{e=i.adServers.gam.buildVideoUrl({adUnit:c,url:s}),n.debug(`Video URL built successfully`)}catch(e){n.debug(`Error while building video URL`,e),t(s);return}let o;try{var l;let e=(l=i.getHighestCpmBids(c.code))==null?void 0:l[0];e&&(n.debug(`== ${a} == Winning bid:`,e),o=S(fn,r).createVideoImpressionReporter(e,n),i.markWinningBidAsUsed({adId:e.adId,events:!1,analytics:!1}))}catch(e){n.warn(`${a}: error preparing the video impression report`,e)}t(e,o)}})})()}};function yn(e){let t=Je({logger:S(un,this),request:e}).then(e=>{e!=null&&(x(rn,this,e),S(cn,this)!=null&&(S(un,this).debug(`Dynamic floors: in after the Prebid configuration, applied from the next auction`),b(_n,this,En).call(this,S(cn,this),S(mn,this))))}),n=new Promise(e=>{setTimeout(e,Ue)});return Promise.race([t,n])}function bn(e){return b(_n,this,xn).call(this,e)&&b(_n,this,Sn).call(this,e)}function xn(e){let t=S(nn,this).get(e.adUnitCode);return t==null||e.requestTimestamp>=t}function Sn(e){return!S(on,this).has(e.auctionId)||S(sn,this).get(e.adUnitCode)===!0}function Cn(e){e.onEvent(`auctionInit`,e=>{var t,n,r;let i=(t=((n=e.adUnits)==null?[]:n).flatMap(e=>{var t;return(t=e.bids)==null?[]:t}).find(e=>e.floorData!=null))==null?void 0:t.floorData,a=(i==null?void 0:i.skipped)===!0,o=(r=e.adUnitCodes)==null?[]:r;a&&S(on,this).set(e.auctionId,{adUnitCodes:o,isEnded:!1});for(let e of o)S(sn,this).set(e,a)}),e.onEvent(`auctionEnd`,t=>{let n=S(on,this).get(t.auctionId);n!=null&&(n.isEnded=!0),b(_n,this,wn).call(this,e)})}function wn(e){let t=new Map,n=n=>{let r=t.get(n);return r==null&&(r=e.getBidResponsesForAdUnitCode(n).bids,t.set(n,r)),r};for(let[e,{adUnitCodes:t,isEnded:r}]of S(on,this))r&&(t.some(t=>n(t).some(t=>t.auctionId===e))||S(on,this).delete(e))}function Tn(e,t){b(_n,this,En).call(this,e,t),e.bidderSettings=new He().withBase().withAdapterSettings(S(pn,this),t).build()}function En(e,t){if(S(ln,this).disableFloor)return;let n=new yt().withFloors(C(C({},S(ln,this)),{},{dynamicFloorsConfig:S(rn,this),personalizedAds:t,refreshNumberCb:S(gn,this)})).build();e.setConfig(n)}function Dn(e,t,n=1){let r=parseFloat(e);return isNaN(r)&&(r=``),{low:r===``?``:On(e,Mn,n),med:r===``?``:On(e,Nn,n),high:r===``?``:On(e,Pn,n),auto:r===``?``:On(e,In,n),dense:r===``?``:On(e,Fn,n),custom:r===``?``:On(e,t,n)}}function On(e,t,n){let r=``;if(!kn(t))return r;let i=t.buckets.reduce((e,t)=>e.max>t.max?e:t,{max:0}),a=0,o=t.buckets.find(t=>{if(e>i.max*n){let e=t.precision;e===void 0&&(e=jn),r=(t.max*n).toFixed(e)}else if(e<=t.max*n&&e>=a*n)return t.min=a,t;else a=t.max});return o&&(r=An(e,o,n)),r}function kn(e){if(Bi(e)||!e.buckets||!Array.isArray(e.buckets))return!1;let t=!0;return e.buckets.forEach(e=>{(!e.max||!e.increment)&&(t=!1)}),t}function An(e,t,n){let r=t.precision===void 0?jn:t.precision,i=t.increment*n,a=t.min*n,o=Math.floor,s=E.getConfig(`cpmRoundingFunction`);typeof s==`function`&&(o=s);let c=Math.pow(10,r+2),l=(e*c-a*c)/(i*c),u,d;try{u=o(l)*i+a}catch(e){d=!0}return(d||typeof u!=`number`)&&(H(`Invalid rounding function passed in config`),u=Math.floor(l)*i+a),u=Number(u.toFixed(10)),u.toFixed(r)}var jn,Mn,Nn,Pn,Fn,In,Ln=o((()=>{W(),D(),jn=2,Mn={buckets:[{max:5,increment:.5}]},Nn={buckets:[{max:20,increment:.1}]},Pn={buckets:[{max:20,increment:.01}]},Fn={buckets:[{max:3,increment:.01},{max:8,increment:.05},{max:20,increment:.5}]},In={buckets:[{max:5,increment:.05},{max:10,increment:.1},{max:20,increment:.5}]}})),Rn,zn,T,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr=o((()=>{Rn={PL_CODE:`code`,PL_SIZE:`sizes`,PL_BIDS:`bids`,BD_BIDDER:`bidder`,BD_ID:`paramsd`,BD_PL_ID:`placementId`,ADSERVER_TARGETING:`adserverTargeting`,BD_SETTING_STANDARD:`standard`},zn=`pbjs_debug`,T={AUCTION_INIT:`auctionInit`,AUCTION_TIMEOUT:`auctionTimeout`,AUCTION_END:`auctionEnd`,BID_ADJUSTMENT:`bidAdjustment`,BID_TIMEOUT:`bidTimeout`,BID_REQUESTED:`bidRequested`,BID_RESPONSE:`bidResponse`,BID_ACCEPTED:`bidAccepted`,BID_REJECTED:`bidRejected`,NO_BID:`noBid`,BID_WON:`bidWon`,BIDDER_DONE:`bidderDone`,BIDDER_ERROR:`bidderError`,SET_TARGETING:`setTargeting`,BEFORE_REQUEST_BIDS:`beforeRequestBids`,BEFORE_BIDDER_HTTP:`beforeBidderHttp`,REQUEST_BIDS:`requestBids`,AD_RENDER_FAILED:`adRenderFailed`,AD_RENDER_SUCCEEDED:`adRenderSucceeded`,TCF2_ENFORCEMENT:`tcf2Enforcement`,AUCTION_DEBUG:`auctionDebug`,BID_VIEWABLE:`bidViewable`,STALE_RENDER:`staleRender`,EXPIRED_RENDER:`expiredRender`,BILLABLE_EVENT:`billableEvent`,PBS_ANALYTICS:`pbsAnalytics`,BEFORE_PBS_HTTP:`beforePBSHttp`,BROWSI_INIT:`browsiInit`,BROWSI_DATA:`browsiData`,BROWSER_INTERVENTION:`browserIntervention`},Bn={PREVENT_WRITING_ON_MAIN_DOCUMENT:`preventWritingOnMainDocument`,NO_AD:`noAd`,EXCEPTION:`exception`,CANNOT_FIND_AD:`cannotFindAd`,MISSING_DOC_OR_ADID:`missingDocOrAdid`},Vn={bidWon:`adUnitCode`},Hn={LOW:`low`,MEDIUM:`medium`,HIGH:`high`,AUTO:`auto`,DENSE:`dense`,CUSTOM:`custom`},Un={BIDDER:`hb_bidder`,AD_ID:`hb_adid`,PRICE_BUCKET:`hb_pb`,SIZE:`hb_size`,DEAL:`hb_deal`,SOURCE:`hb_source`,FORMAT:`hb_format`,UUID:`hb_uuid`,CACHE_ID:`hb_cache_id`,CACHE_HOST:`hb_cache_host`,ADOMAIN:`hb_adomain`,ACAT:`hb_acat`,CRID:`hb_crid`,DSP:`hb_dsp`,VERSION:`hb_ver`},Wn={BIDDER:`hb_bidder`,AD_ID:`hb_adid`,PRICE_BUCKET:`hb_pb`,SIZE:`hb_size`,DEAL:`hb_deal`,FORMAT:`hb_format`,UUID:`hb_uuid`,CACHE_HOST:`hb_cache_host`,VERSION:`hb_ver`},Gn={title:`hb_native_title`,body:`hb_native_body`,body2:`hb_native_body2`,privacyLink:`hb_native_privacy`,privacyIcon:`hb_native_privicon`,sponsoredBy:`hb_native_brand`,image:`hb_native_image`,icon:`hb_native_icon`,clickUrl:`hb_native_linkurl`,displayUrl:`hb_native_displayurl`,cta:`hb_native_cta`,rating:`hb_native_rating`,address:`hb_native_address`,downloads:`hb_native_downloads`,likes:`hb_native_likes`,phone:`hb_native_phone`,price:`hb_native_price`,salePrice:`hb_native_saleprice`,video:`hb_native_video`,rendererUrl:`hb_renderer_url`,adTemplate:`hb_adTemplate`},Kn={SRC:`s2s`,DEFAULT_ENDPOINT:`https://prebid.adnxs.com/pbs/v1/openrtb2/auction`,SYNCED_BIDDERS_KEY:`pbjsSyncs`},qn={BID_TARGETING_SET:`targetingSet`,RENDERED:`rendered`,BID_REJECTED:`bidRejected`},Jn={INVALID:`Bid has missing or invalid properties`,INVALID_REQUEST_ID:`Invalid request ID`,BIDDER_DISALLOWED:`Bidder code is not allowed by allowedAlternateBidderCodes / allowUnknownBidderCodes`,FLOOR_NOT_MET:`Bid does not meet price floor`,CANNOT_CONVERT_CURRENCY:`Unable to convert currency`,DSA_REQUIRED:`Bid does not provide required DSA transparency info`,DSA_MISMATCH:`Bid indicates inappropriate DSA rendering method`,PRICE_TOO_HIGH:`Bid price exceeds maximum value`},Yn={body:`desc`,body2:`desc2`,sponsoredBy:`sponsored`,cta:`ctatext`,rating:`rating`,address:`address`,downloads:`downloads`,likes:`likes`,phone:`phone`,price:`price`,salePrice:`saleprice`,displayUrl:`displayurl`},Xn={sponsored:1,desc:2,rating:3,likes:4,downloads:5,price:6,saleprice:7,phone:8,address:9,desc2:10,displayurl:11,ctatext:12},Zn={ICON:1,MAIN:3},Qn=[`privacyIcon`,`clickUrl`,`adTemplate`,`rendererUrl`,`type`],$n={REQUEST:`Prebid Request`,RESPONSE:`Prebid Response`,NATIVE:`Prebid Native`,EVENT:`Prebid Event`,INTERVENTION:`Prebid Intervention`},er=`__pb_locator__`}));function nr(e,t=!0){let n=t?{priceGranularity:_r.MEDIUM,customPriceBucket:{},mediaTypePriceGranularity:{},bidderSequence:gr,auctionOptions:{}}:{},r=(()=>{let e=[`suppressStaleRender`,`suppressExpiredRender`,`legacyRender`,`rejectUnknownMediaTypes`,`rejectInvalidMediaTypes`,`yield`],t=[`secondaryBidders`],n={viewabilityMeasurement:[`observer`,`boundingBox`]},r=[].concat(e,t,Object.keys(n));return function(i){if(!I(i))return H(`Auction Options must be an object`),!1;for(let a of Object.keys(i)){if(!r.includes(a))return H(`Auction Options given an incorrect param: ${a}`),!1;if(t.includes(a)){if(!L(i[a]))return H(`Auction Options ${a} must be of type Array`),!1;if(!i[a].every(P))return H(`Auction Options ${a} must be only string`),!1}else if(e.includes(a)){if(!zr(i[a]))return H(`Auction Options ${a} must be of type boolean`),!1}else if(n.hasOwnProperty(a)&&!n[a].includes(i[a]))return H(`Auction Options ${a} must be one of: ${n[a].join(`, `)}`),!1}return!0}})();function i(e){return n[e]}function a(t,r){n.hasOwnProperty(t)||Object.defineProperty(e,t,{enumerable:!0}),n[t]=r}return Object.defineProperties(e,Object.fromEntries(Object.entries({publisherDomain:{set(e){e!=null&&H(`publisherDomain is deprecated and has no effect since v7 - use pageUrl instead`),a(`publisherDomain`,e)}},priceGranularity:{set(e){s(e)&&(typeof e==`string`?a(`priceGranularity`,o(e)?e:_r.MEDIUM):I(e)&&(a(`customPriceBucket`,e),a(`priceGranularity`,_r.CUSTOM),Xa(`Using custom price granularity`)))}},customPriceBucket:{},mediaTypePriceGranularity:{set(e){e!=null&&a(`mediaTypePriceGranularity`,Object.keys(e).reduce((t,n)=>(s(e[n])?typeof e[n]==`string`?t[n]=o(e[n])?e[n]:i(`priceGranularity`):I(e[n])&&(t[n]=e[n],Xa(`Using custom price granularity for ${n}`)):H(`Invalid price granularity for media type: ${n}`),t),{}))}},bidderSequence:{set(e){hr[e]?a(`bidderSequence`,e):H(`Invalid order: ${e}. Bidder Sequence was not set.`)}},auctionOptions:{set(e){r(e)&&a(`auctionOptions`,e)}}}).map(([e,t])=>[e,Object.assign({get:i.bind(null,e),set:a.bind(null,e),enumerable:n.hasOwnProperty(e),configurable:!n.hasOwnProperty(e)},t)]))),e;function o(e){return Object.keys(_r).find(t=>e===_r[t])}function s(e){if(!e)return U("Prebid Error: no value passed to `setPriceGranularity()`"),!1;if(typeof e==`string`)o(e)||H("Prebid Warning: setPriceGranularity was called with invalid setting, using `medium` as default.");else if(I(e)&&!kn(e))return U("Invalid custom price value passed to `setPriceGranularity()`"),!1;return!0}}function rr(){let e=[],t,n,r,i=null;function a(){t={};let e=nr({debug:ir,bidderTimeout:ar,enableSendAllBids:or,useBidCache:cr,deviceAccess:lr,disableAjaxTimeout:sr,maxNestedIframes:ur,maxBid:dr,userSync:{topics:fr}});n&&g(Object.keys(n).reduce((t,r)=>(n[r]!==e[r]&&(t[r]=e[r]||{}),t),{})),n=e,r={}}function o(){if(i&&r&&I(r[i])){let e=r[i],t=new Set([...Object.keys(n),...Object.keys(e)]),a={};for(let r of t){let t=n[r],i=e[r];a[r]=i===void 0?t:t===void 0?i:I(i)?B({},t,i):i}return a}return C({},n)}function s(){let e=o();return Object.defineProperty(e,"ortb2",{get:function(){throw Error(`invalid access to 'ortb2' config - use request parameters instead`)}}),e}let[c,l]=[o,s].map(e=>function(...t){if(t.length<=1&&typeof t[0]!=`function`){let n=t[0];return n?j(e(),n):o()}return h(...t)}),[u,d]=[l,c].map(e=>function(...t){let n=e(...t);return n&&typeof n==`object`&&(n=M(n)),n});function f(){return r}function p(e){if(!I(e)){U(`setConfig options must be an object`);return}let r=Object.keys(e),i={};r.forEach(r=>{let a=e[r];I(t[r])&&I(a)&&(a=Object.assign({},t[r],a));try{i[r]=n[r]=a}catch(e){H(`Cannot set config for property ${r} : `,e)}}),g(i)}function m(e){if(!I(t)){U(`defaults must be an object`);return}Object.assign(t,e),Object.assign(n,e)}function h(t,n,r={}){let i=n;if(typeof t!=`string`&&(i=t,t=vr,r=n||{}),typeof i!=`function`){U(`listener must be a function`);return}let a={topic:t,callback:i};return e.push(a),r.init&&i(t===vr?l():{[t]:l(t)}),function(){e.splice(e.indexOf(a),1)}}function g(t){let n=Object.keys(t);e.filter(e=>n.includes(e.topic)).forEach(e=>{e.callback({[e.topic]:t[e.topic]})}),e.filter(e=>e.topic===vr).forEach(e=>e.callback(t))}function _(e,t=!1){try{n(e),e.bidders.forEach(n=>{r[n]||(r[n]=nr({},!1)),Object.keys(e.config).forEach(i=>{let a=e.config[i],o=r[n][i];if(I(a)&&(o==null||I(o))){let e=t?B:Object.assign;r[n][i]=e({},o||{},a)}else r[n][i]=a})})}catch(e){U(e)}function n(e){if(!I(e))throw Error(`setBidderConfig bidder options must be an object`);if(!(Array.isArray(e.bidders)&&e.bidders.length))throw Error(`setBidderConfig bidder options must contain a bidders list with at least 1 bidder`);if(!I(e.config))throw Error(`setBidderConfig bidder options must contain a config object`)}}function v(e){if(!I(e)){U(`mergeConfig input must be an object`);return}let t=B(o(),e);return p(Object.keys(e).reduce((e,n)=>(Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]),e),{})),t}function y(e){return _(e,!0)}function ee(e,t){i=e;try{return t()}finally{x()}}function b(e){return function(t){return function(...n){if(typeof t==`function`)return ee(e,t.bind(this,...n));H(`config.callbackWithBidder callback is not a function`)}}}function te(){return i}function x(){i=null}return a(),{getCurrentBidder:te,resetBidder:x,getConfig:l,getAnyConfig:c,readConfig:u,readAnyConfig:d,setConfig:p,mergeConfig:v,setDefaults:m,resetConfig:a,runWithBidder:ee,callbackWithBidder:b,setBidderConfig:_,getBidderConfig:f,mergeBidderConfig:y}}var ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,E,D=o((()=>{Ln(),W(),tr(),w(),ir=zi(zn).toUpperCase()===`TRUE`,ar=3e3,or=!0,sr=!1,cr=!1,lr=!0,ur=10,dr=5e3,fr={},pr=`random`,mr=`fixed`,hr={},hr[pr]=!0,hr[mr]=!0,gr=pr,_r={LOW:`low`,MEDIUM:`medium`,HIGH:`high`,AUTO:`auto`,DENSE:`dense`,CUSTOM:`custom`},vr=`*`,E=rr()})),yr,br=o((()=>{yr={pbGlobal:`pubtech_pbjs`,defineGlobal:!0,features:{NATIVE:!0,VIDEO:!0,UID2_CSTG:!0,GREEDY:!1,AUDIO:!0,LOG_NON_ERROR:!0,LOG_ERROR:!0},distUrlBase:`https://cdn.jsdelivr.net/npm/prebid.js@11.41.0/dist/chunks/`,skipCalls:{}}}));function xr(){return yr.pbGlobal}function Sr(){return yr.defineGlobal}function Cr(){return yr.distUrlBase}var wr=o((()=>{br()}));function Tr(){return Dr}function O(e){Dr.installedModules.push(e)}var Er,Dr,k=o((()=>{wr(),Er=Sr()?window:{},Dr=Er[xr()]=Er[xr()]||{},Dr.cmd=Dr.cmd||[],Dr.que=Dr.que||[],Dr.installedModules=Dr.installedModules||[],Er===window&&(Er._pbjsGlobals=Er._pbjsGlobals||[],Er._pbjsGlobals.push(xr()))}));function Or(e=0){return new A(t=>{Nr(t,e)})}function kr(e=0){let t=window.scheduler;if(typeof(t==null?void 0:t.postTask)==`function`)try{return A.resolve(t.postTask(()=>{},{priority:`user-blocking`,delay:e})).catch(()=>{})}catch(e){}return Or(e)}function Ar({promiseFactory:e=e=>new A(e)}={}){function t(e){return t=>e(t)}let n,r;return{promise:e((e,t)=>{n=e,r=t}),resolve:t(n),reject:t(r)}}var jr,Mr,Nr,A,Pr=o((()=>{k(),Nr=(jr=Tr().setTimeout)==null?setTimeout:jr,A=(Mr=Tr().Promise)==null?Promise:Mr}));function j(e,t,n,r,i){for(t=t.split?t.split(`.`):t,r=0;r{}));function Ir(e){var t,n,r;if(Array.isArray(e)){for(n=Array(t=e.length);t--;)n[t]=(r=e[t])&&typeof r==`object`?Ir(r):r;return n}if(Object.prototype.toString.call(e)===`[object Object]`){for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:Ir(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=(r=e[t])&&typeof r==`object`?Ir(r):r;return n}return e}var Lr=o((()=>{}));function M(e){return Ir(e)||{}}function Rr(e,t){return t.filter(t=>e[t]).reduce((t,n)=>Object.assign(t,{[n]:e[n]}),{})}function N(e){return typeof e==`function`}function P(e){return typeof e==`string`}function F(e){return typeof e==`number`}function I(e){return Vr.call(e)===`[object Object]`}function zr(e){return typeof e==`boolean`}function Br(e,t){return L(e)&&(!t||e.length===t)&&e.every(e=>R(e))}var Vr,L,R,Hr=o((()=>{Lr(),Vr=Object.prototype.toString,L=Array.isArray.bind(Array),R=Number.isInteger.bind(Number)}));function Ur(){return!!E.getConfig(`debug`)}var Wr=o((()=>{D()}));function Gr(e){Xr=e}function Kr(e,t=!1){var n;let r=(n=window.console)==null?void 0:n[e],i=`${Yr[e]}:`;return function(...n){typeof r==`function`&&Ur()&&r.apply(console,Jr(n,i)),t&&Zr(T.AUCTION_DEBUG,{type:Yr[e],arguments:n})}}function qr(e){function t(t){return function(...n){t(e,...n)}}return{logError:t(ti),logWarn:t(ei),logMessage:t(Qr),logInfo:t($r)}}function Jr(e,t){e=[].slice.call(e);let n=E.getCurrentBidder();return t&&e.unshift(t),n&&e.unshift(r(`#aaa`)),e.unshift(r(`#3b88c3`)),e.unshift(`%cPrebid`+(n?`%c${n}`:``)),e;function r(e){return`display: inline-block; color: #fff; background: ${e}; padding: 1px 4px; border-radius: 3px;`}}var Yr,Xr,Zr,Qr,$r,ei,ti,ni=o((()=>{D(),Wr(),tr(),Yr={log:`MESSAGE`,info:`INFO`,warn:`WARNING`,error:`ERROR`},Zr=(e,...t)=>{Xr!=null&&Xr(e,...t)},Qr=Kr(`log`),$r=Kr(`info`),ei=Kr(`warn`,!0),ti=Kr(`error`,!0)}));function z(e,t,n){t.split&&(t=t.split(`.`));for(var r=0,i=t.length,a=e,o,s;r{}));function ii(e,t){let n={},r={},i=[];Object.entries(t).forEach(([t,a])=>{if(typeof a==`object`&&a){let r=new ii(()=>{var n;return(n=e())==null?void 0:n[t]},a);n[t]=r.obj,i.push(r.reset)}else a===!0&&Object.defineProperty(n,t,{get(){if(!r.hasOwnProperty(t)){var n;r[t]=(n=e())==null?void 0:n[t]}return r[t]}})}),this.obj=n,this.reset=function(){i.forEach(e=>e()),r={}}}var ai=o((()=>{}));function oi(){ui.winDimensions.reset()}function si(e){var t,n,r,i;let a=e==null?Ii()?$a.getWindowTop():$a.getWindowSelf():e,o=(t=(n=a==null?void 0:a.screen)==null?(r=$a.getWindowSelf())==null?void 0:r.screen:n)==null?(i=window)==null?void 0:i.screen:t,s=Number(o==null?void 0:o.width),c=Number(o==null?void 0:o.height);if(!(!Number.isFinite(s)||!Number.isFinite(c)))return c>=s?`portrait`:`landscape`}var ci,li,ui,di,fi=o((()=>{W(),ai(),ci=20,li=new ii(()=>Ii()?$a.getWindowTop():$a.getWindowSelf(),{innerHeight:!0,innerWidth:!0,screen:{width:!0,height:!0},visualViewport:{width:!0,height:!0},document:{documentElement:{clientWidth:!0,clientHeight:!0,scrollTop:!0,scrollLeft:!0},body:{scrollTop:!0,scrollLeft:!0,clientWidth:!0,clientHeight:!0}}}),ui={winDimensions:li},di=(()=>{let e;return function(){return(!e||Date.now()-e>ci)&&(ui.winDimensions.reset(),e=Date.now()),ui.winDimensions.obj}})()}));function pi(e){return mi.apply(this,arguments)}function mi(){return mi=fe(function*(e){typeof e!=`string`&&(e=JSON.stringify(e));let t=new TextEncoder().encode(e),n=new Blob([t]).stream().pipeThrough(new window.CompressionStream(`gzip`)),r=yield(yield new Response(n).blob()).arrayBuffer();return new Uint8Array(r)}),mi.apply(this,arguments)}var hi,gi=o((()=>{pe(),hi=function(){let e=fe(function*(){try{if(window.CompressionStream===void 0||window.DecompressionStream===void 0)return!1;let e=`prebid-gzip-probe`,t=yield pi(e),n=new Blob([t]).stream().pipeThrough(new window.DecompressionStream(`gzip`));return(yield new Response(n).text())===e}catch(e){return!1}})();return()=>e}()})),_i=c({_each:()=>Hi,_map:()=>Wi,binarySearch:()=>Ga,buildUrl:()=>Fa,canAccessWindowTop:()=>Ii,checkCookieSupport:()=>Ca,cleanObj:()=>Aa,compareCodeAndSlot:()=>so,compressDataWithGZip:()=>pi,contains:()=>Ui,convertObjectToArray:()=>Ua,createIframe:()=>no,createInvisibleIframe:()=>Ri,createTrackPixelHtml:()=>ea,cyrb53Hash:()=>Ra,debugTurnedOn:()=>Qa,deepAccess:()=>j,deepClone:()=>M,deepEqual:()=>Ia,deepSetValue:()=>z,delayExecution:()=>wa,encodeMacroURI:()=>ta,extractDomainFromHost:()=>Ja,flatten:()=>ra,formatQS:()=>Na,generateUUID:()=>bi,getBidIdParameter:()=>Si,getBidRequest:()=>ia,getBidderCodes:()=>oa,getDefinedParams:()=>Rr,getDocument:()=>Fi,getDomLoadingDuration:()=>xa,getFallbackWindow:()=>Li,getParameterByName:()=>zi,getPerformanceNow:()=>ba,getPrebidInternal:()=>vi,getSafeframeGeometry:()=>fa,getScreenOrientation:()=>si,getUniqueIdentifierStr:()=>yi,getUnixTimestampFromNow:()=>Ha,getUserConfiguredParams:()=>Da,getValue:()=>aa,getWinDimensions:()=>di,getWindowLocation:()=>Pi,getWindowSelf:()=>Ni,getWindowTop:()=>Mi,groupBy:()=>Ta,hasDeviceAccess:()=>Sa,hasNonSerializableProperty:()=>Ka,inIframe:()=>ua,insertElement:()=>Gi,insertHtmlIntoIframe:()=>Zi,insertUserSyncIframe:()=>Qi,internal:()=>$a,isAdUnitCodeMatchingSlot:()=>Oa,isApnGetTagDefined:()=>ca,isArray:()=>L,isArrayOfNums:()=>Br,isBoolean:()=>zr,isChromeIOSBrowser:()=>ha,isEmpty:()=>Bi,isEmptyStr:()=>Vi,isFirefoxBrowser:()=>ma,isFn:()=>N,isGptPubadsDefined:()=>sa,isGzipCompressionSupported:()=>hi,isInteger:()=>R,isNumber:()=>F,isPlainObject:()=>I,isSafariBrowser:()=>pa,isSafeFrameWindow:()=>da,isStr:()=>P,isValidMediaTypes:()=>Ea,logError:()=>U,logInfo:()=>V,logMessage:()=>Xa,logWarn:()=>H,memoize:()=>Va,mergeDeep:()=>B,parseGPTSingleSizeArray:()=>Oi,parseGPTSingleSizeArrayToRtbSize:()=>Ai,parseQS:()=>Ma,parseQueryStringParameters:()=>Ci,parseSizesInput:()=>Ei,parseUrl:()=>Pa,pick:()=>ja,politeInsertUserSyncIframe:()=>Ji,politeTriggerPixel:()=>qi,prefixLog:()=>Za,removeUserSyncIframes:()=>$i,replaceAuctionPrice:()=>_a,replaceClickThrough:()=>va,replaceMacros:()=>ga,resetWinDimensions:()=>oi,runBackgroundTask:()=>Xi,safeJSONEncode:()=>Ba,safeJSONParse:()=>za,setOnAny:()=>qa,setScriptAttributes:()=>Wa,shuffle:()=>la,sizeTupleToRtbSize:()=>ki,sizeTupleToSizeString:()=>Di,sizesToSizeTuples:()=>Ti,sortByHighestCpm:()=>oo,timestamp:()=>ya,transformAdServerTargetingObj:()=>wi,triggerNurlWithCpm:()=>Ya,triggerPixel:()=>Yi,uniques:()=>na,unsupportedBidderMessage:()=>ka,waitForElementToLoad:()=>Ki});function vi(){return eo}function yi(){return to()+Math.random().toString(16).substring(2)}function bi(e){return e?(e^xi()>>e/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,bi)}function xi(){return window&&window.crypto&&window.crypto.getRandomValues?window.crypto.getRandomValues(new Uint8Array(1))[0]%16:Math.random()*16}function Si(e,t){return(t==null?void 0:t[e])||``}function Ci(e){let t=``;for(var n in e)e.hasOwnProperty(n)&&(t+=n+`=`+encodeURIComponent(e[n])+`&`);return t=t.replace(/&$/,``),t}function wi(e){return e&&Object.getOwnPropertyNames(e).length>0?Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join(`&`):``}function Ti(e){return typeof e==`string`?e.split(/\s*,\s*/).map(e=>e.match(/^(\d+)x(\d+)$/i)).filter(e=>e).map(([e,t,n])=>[parseInt(t,10),parseInt(n,10)]):Array.isArray(e)?ji(e)?[e]:e.filter(ji):[]}function Ei(e){return Ti(e).map(Di)}function Di(e){return e[0]+`x`+e[1]}function Oi(e){if(ji(e))return Di(e)}function ki(e){return{w:e[0],h:e[1]}}function Ai(e){if(ji(e))return ki(e)}function ji(e){return L(e)&&e.length===2&&!isNaN(e[0])&&!isNaN(e[1])}function Mi(){return window.top}function Ni(){return window.self}function Pi(){return window.location}function Fi(){return document}function Ii(){try{if($a.getWindowTop().location.href)return!0}catch(e){return!1}}function Li(e){return e||(Ii()?$a.getWindowTop():$a.getWindowSelf())}function Ri(){return no(document,{id:yi(),width:0,height:0,src:`about:blank`},{display:`none`,height:`0px`,width:`0px`,border:`0px`})}function zi(e){return Ma(Pi().search)[e]||``}function Bi(e){return e?L(e)||P(e)?!(e.length>0):Object.keys(e).length<=0:!0}function Vi(e){return P(e)&&(!e||e.length===0)}function Hi(e,t){if(N(e==null?void 0:e.forEach))return e.forEach(t,this);Object.entries(e||{}).forEach(([e,n])=>t.call(this,n,e))}function Ui(e,t){return N(e==null?void 0:e.includes)&&e.includes(t)}function Wi(e,t){return N(e==null?void 0:e.map)?e.map(t):Object.entries(e||{}).map(([n,r])=>t(r,n,e))}function Gi(e,t,n,r){t=t||document;let i;i=n?t.getElementsByTagName(n):t.getElementsByTagName(`head`);try{if(i=i.length?i:t.getElementsByTagName(`body`),i.length){i=i[0];let t=r?null:i.firstChild;return i.insertBefore(e,t)}}catch(e){}}function Ki(e,t){let n=null;return new A(r=>{let i=function(){e.removeEventListener(`load`,i),e.removeEventListener(`error`,i),n!=null&&window.clearTimeout(n),r()};e.addEventListener(`load`,i),e.addEventListener(`error`,i),t!=null&&(n=window.setTimeout(i,t))})}function qi(e,t=`include`){Xi(()=>{if(window.fetch&&window.Request)try{let n=new Request(e,{method:`GET`,mode:`no-cors`,credentials:t,keepalive:!0});window.fetch(n).catch(()=>{t!==`omit`&&Yi(e)});return}catch(e){}t!==`omit`&&Yi(e)})}function Ji(e,t,n,r){Xi(()=>Qi(e,t,n,r))}function Yi(e,t,n){let r=new Image;t&&$a.isFn(t)&&Ki(r,n).then(t),r.src=e}function Xi(e){let t=window.scheduler;if(t!=null&&t.postTask){t.postTask(e,{priority:`background`}).catch(()=>e());return}if(typeof window.requestIdleCallback==`function`){window.requestIdleCallback(()=>e(),{timeout:2e3});return}e()}function Zi(e){if(!e)return;let t=Ri();$a.insertElement(t,document,`body`),(t=>{t.open(),t.write(e),t.close()})(t.contentWindow.document)}function Qi(e,t,n,r){if(!e)return;let i=no(document,{sandbox:`allow-scripts allow-same-origin`,src:e},{width:`0px`,height:`0px`,display:`none`});ro.set(i,$a.isFn(r)?r:null),t&&$a.isFn(t)&&Ki(i,n).then(t),$a.insertElement(i,document,`html`,!0)}function $i(){let e=Array.from(document.querySelectorAll(`iframe`)).filter(e=>ro.has(e));return e.forEach(e=>{var t;let n=ro.get(e);ro.delete(e);try{n==null||n()}catch(e){U(`Error cleaning up user sync iframe`,e)}(t=e.parentNode)==null||t.removeChild(e)}),e.length}function ea(e,t=encodeURI){if(!e)return``;let n=t(e),r=`
`;return r+=`
`,r}function ta(e){let t=``,n=0;for(let r of e.matchAll(ao))t+=encodeURI(e.slice(n,r.index))+"${"+r[1].replace(io,encodeURIComponent)+`}`,n=r.index+r[0].length;return t+encodeURI(e.slice(n))}function na(e,t,n){return n.indexOf(e)===t}function ra(e,t){return e.concat(t)}function ia(e,t){if(e)return t.flatMap(e=>e.bids).find(t=>[`bidId`,`adId`,`bid_id`].some(n=>t[n]===e))}function aa(e,t){return e[t]}function oa(e){return e.map(e=>e.bids.map(e=>e.bidder).reduce(ra,[])).reduce(ra,[]).filter(e=>e!==void 0).filter(na)}function sa(){if(window.googletag&&N(window.googletag.pubads)&&N(window.googletag.pubads().getSlots))return!0}function ca(){if(window.apntag&&N(window.apntag.getTag))return!0}function la(e){let t=e.length;for(;t>0;){let n=Math.floor(Math.random()*t);t--;let r=e[t];e[t]=e[n],e[n]=r}return e}function ua(){try{return $a.getWindowSelf()!==$a.getWindowTop()}catch(e){return!0}}function da(){if(!ua())return!1;let e=$a.getWindowSelf();return!!(e.$sf&&e.$sf.ext)}function fa(){try{let e=Ni();return typeof e.$sf.ext.geom==`function`?e.$sf.ext.geom():void 0}catch(e){U(`Error getting SafeFrame geometry`,e);return}}function pa(){return/^((?!chrome|chromium|android|crios|fxios).)*safari/i.test(navigator.userAgent)}function ma(){return/firefox|fxios/i.test(navigator.userAgent)}function ha(){return/crios|crmo/i.test(navigator.userAgent)}function ga(e,t){if(e)return Object.entries(t).reduce((e,[t,n])=>e.replace(RegExp(`\\$\\{`+t+`\\}`,`g`),n||``),e)}function _a(e,t){return ga(e,{AUCTION_PRICE:t})}function va(e,t){if(!(!e||!t||typeof t!=`string`))return e.replace(/\${CLICKTHROUGH}/g,t)}function ya(){return new Date().getTime()}function ba(){return window.performance&&window.performance.now&&window.performance.now()||0}function xa(e){var t;let n=-1;e=e||Ni();let r=e.performance;if((t=e.performance)!=null&&t.timing&&e.performance.timing.navigationStart>0){let e=r.timing.domLoading-r.timing.navigationStart;e>0&&(n=e)}return n}function Sa(){return E.getConfig(`deviceAccess`)!==!1}function Ca(){if(window.navigator.cookieEnabled||document.cookie.length)return!0}function wa(e,t){if(t<1)throw Error(`numRequiredCalls must be a positive number. Got ${t}`);let n=0;return function(){n++,n===t&&e.apply(this,arguments)}}function Ta(e,t){return e.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function Ea(e){let t=[`banner`,`native`,`video`,`audio`];return Object.keys(e).every(e=>t.includes(e))?e.video&&e.video.context?[`instream`,`outstream`].includes(e.video.context):!0:!1}function Da(e,t,n){return e.filter(e=>e.code===t).flatMap(e=>e.bids).filter(e=>e.bidder===n).map(e=>e.params||{})}function Oa(e){let t=E.getConfig(`customGptSlotMatching`),n=N(t)&&t(e);return N(n)?n:t=>so(e,t)}function ka(e,t){let n=Object.keys(e.mediaTypes||{banner:`banner`}).join(`, `);return` ${e.code} is a ${n} ad unit containing bidders that don't support ${n}: ${t}. This bidder won't fetch demand. `}function Aa(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>t!==void 0))}function ja(e,t){return typeof e==`object`?t.reduce((n,r,i)=>{if(typeof r==`function`)return n;let a=r,o=r.match(/^(.+?)\sas\s(.+?)$/i);o&&(r=o[1],a=o[2]);let s=e[r];return typeof t[i+1]==`function`&&(s=t[i+1](s,n)),s!==void 0&&(n[a]=s),n},{}):{}}function Ma(e){return e?e.replace(/^\?/,``).split(`&`).reduce((e,t)=>{let[n,r]=t.split(`=`);return/\[\]$/.test(n)?(n=n.replace(`[]`,``),e[n]=e[n]||[],e[n].push(r)):e[n]=r||``,e},{}):{}}function Na(e){return Object.keys(e).map(t=>Array.isArray(e[t])?e[t].map(e=>`${t}[]=${e}`).join(`&`):`${t}=${e[t]}`).join(`&`)}function Pa(e,t){let n=document.createElement(`a`);t&&`noDecodeWholeURL`in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);let r=t&&`decodeSearchAsString`in t&&t.decodeSearchAsString;return{href:n.href,protocol:(n.protocol||``).replace(/:$/,``),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,`/`),search:r?n.search:$a.parseQS(n.search||``),hash:(n.hash||``).replace(/^#/,``),host:n.host||window.location.host}}function Fa(e){return(e.protocol||`http`)+`://`+(e.host||e.hostname+(e.port?`:${e.port}`:``))+(e.pathname||``)+(e.search?`?${$a.formatQS(e.search||``)}`:``)+(e.hash?`#${e.hash}`:``)}function Ia(e,t,{checkTypes:n=!1}={}){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r&&i){if(e.length!==t.length)return!1;for(let r=0;r{e[i].some(e=>Ia(e,t))||e[i].push(t)}):e[i]=[...a]:e[i]=a}}function Ra(e,t=0){let n=function(e,t){if(N(Math.imul))return Math.imul(e,t);t|=0;var n=(e&4194303)*t;return e&4290772992&&(n+=(e&4290772992)*t|0),n|0},r=3735928559^t,i=1103547991^t;for(let t=0,a;t>>16,2246822507)^n(i^i>>>13,3266489909),i=n(i^i>>>16,2246822507)^n(r^r>>>13,3266489909),(4294967296*(2097151&i)+(r>>>0)).toString()}function za(e){try{return JSON.parse(e)}catch(e){}}function Ba(e){try{return JSON.stringify(e)}catch(e){return``}}function Va(e,t=function(e){return e}){let n=new Map,r=function(){let r=t.apply(this,arguments);return n.has(r)||n.set(r,e.apply(this,arguments)),n.get(r)};return r.clear=n.clear.bind(n),r}function Ha(e=0,t=`d`){if([`m`,`d`].indexOf(t)<0)return Date.now();let n=t===`m`?e*60*1e3:e*24*60*60*1e3;return Date.now()+(e&&e>0?n:0)}function Ua(e){return Object.keys(e).map(t=>({[t]:e[t]}))}function Wa(e,t){Object.entries(t).forEach(([t,n])=>e.setAttribute(t,n))}function Ga(e,t,n=e=>e){let r=0,i=e.length&&e.length-1,a=n(t);for(;i-r>1;){let t=r+Math.round((i-r)/2);a>n(e[t])?r=t:i=t}for(;e.length>r&&a>n(e[r]);)r++;return r}function Ka(e,t=new Set){for(let n in e){let r=e[n],i=typeof r;if(r===void 0||i===`function`||i===`symbol`||r instanceof RegExp||r instanceof Map||r instanceof Set||r instanceof Date||r!==null&&i===`object`&&Object.prototype.hasOwnProperty.call(r,`toJSON`)||r!==null&&i===`object`&&r.constructor===Object&&(t.has(r)||(t.add(r),Ka(r,t))))return!0}return!1}function qa(e,t){for(let n=0,r;n0){t=n[0];for(let e=1;et.length&&(t=n[e])}}catch(e){t=null}return t}function Ya(e,t){P(e.nurl)&&e.nurl!==``&&(e.nurl=e.nurl.replace(/\${AUCTION_PRICE}/,t),qi(e.nurl))}var V,H,U,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,W=o((()=>{D(),Pr(),Fr(),Hr(),ni(),Wr(),ri(),Hr(),fi(),gi(),V=$r,H=ei,U=ti,Xa=Qr,Za=qr,Qa=Ur,$a={checkCookieSupport:Ca,getWindowSelf:Ni,getWindowTop:Mi,canAccessWindowTop:Ii,getWindowLocation:Pi,insertUserSyncIframe:Qi,insertElement:Gi,isFn:N,triggerPixel:Yi,logError:U,logWarn:H,logMessage:Xa,logInfo:V,parseQS:Ma,formatQS:Na,deepEqual:Ia,runBackgroundTask:Xi},eo={},to=function(){var e=0;return function(){return e++,e}}(),no=(()=>{let e={border:`0px`,hspace:`0`,vspace:`0`,marginWidth:`0`,marginHeight:`0`,scrolling:`no`,frameBorder:`0`,allowtransparency:`true`};return(t,n,r={})=>{let i=t.createElement(`iframe`);return Object.assign(i,Object.assign({},e,n)),Object.assign(i.style,r),i}})(),ro=new WeakMap,io=/["<>`\t\n\v\f\r ]/g,ao=/\$\{([^}#$&+,/:;=?@]+)\}/g,oo=(e,t)=>t.cpm-e.cpm,so=(e,t)=>e.getAdUnitPath()===t||e.getSlotElementId()===t}));function co({getMeta:e=(e,t)=>({generatedAt:t}),hashFields:t}={}){let n,r,i,a,o,s,c,l,u,d;function f(){i=Ar(),n=!1,o=null,s=!1,a=null,r=!0,c=null,l=null,u=!1,d=[]}function p(e){return e&&t?t.map(t=>e[t]):e}function m(e){return!Ia(p(o),p(e))}function h(){r&&d.forEach(e=>e(o))}function g(e){r=m(e),o=e,u=!1,l=null,s=!0,i.resolve(e),h()}function _(e){r=m(null),o=null,s=!0,l=e,u=!0,i.reject(e),h()}return f(),{reset:f,get generatedTime(){return a},enable(){n=!0},get enabled(){return n},get ready(){return s},get promise(){return s?u?A.reject(l):A.resolve(o):(n||g(null),i.promise)},setConsentData(e,t=ya()){a=t,g(e)},getConsentData(){return n?o:null},getConsentMeta(){if(a!=null&&o!=null)return e(o,a)},error:_,get hash(){return r&&(c=Ra(JSON.stringify(p(o))),r=!1),c},onChange(e){d.push(e)}}}function lo(){let e={},t={},n={};return{register(r,i,a){a&&((e[i]=e[i]||{})[r]=a,t.hasOwnProperty(i)?t[i]!==a&&(t[i]=n):t[i]=a)},get(r){let i={modules:e[r]||{}};return t.hasOwnProperty(r)&&t[r]!==n&&(i.gvlid=t[r]),i}}}function uo(e=xo){let t=Object.entries(e);function n(e){return function(){return Object.fromEntries(t.map(([t,n])=>[t,n[e]()]))}}let r=n(`getConsentData`),i=n(`reset`),a;function o(){a=[],Object.values(e).forEach(e=>e.onChange(()=>{a.forEach(e=>e(r()))}))}return o(),{getConsentData:r,onChange(e){a.push(e)},get promise(){return A.all(t.map(([e,t])=>t.promise.then(t=>[e,t]))).then(e=>Object.fromEntries(e))},get hash(){return Ra(t.map(([e,t])=>t.hash).join(`:`))},getConsentMeta:n(`getConsentMeta`),reset(){i(),o()}}}var fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,G=o((()=>{W(),Pr(),D(),fo=Symbol(`VENDORLESS_GVLID`),po=`gdpr`,mo=`coppa`,ho=co(),go=co({getMeta(e,t){if(e.vendorData)return{gdprApplies:e.gdprApplies,consentStringSize:P(e.vendorData.tcString)?e.vendorData.tcString.length:0,generatedAt:t,apiVersion:e.apiVersion}},hashFields:[`gdprApplies`,`consentString`,`addtlConsent`]}),_o=co({hashFields:[`applicableSections`,`gppString`]}),vo=(()=>{let e=(e=>Object.assign(e,{getCoppa(){return e.getConsentData()},reset(){}}))(co({getMeta(e,t){return e}}));return e.enable(),e.setConsentData(!!E.getConfig(`coppa`)),E.getConfig(`coppa`,t=>{e.setConsentData(typeof t.coppa==`object`&&Bi(t.coppa)?!1:!!t.coppa)}),e})(),yo=lo(),bo=lo(),xo={[po]:go,usp:ho,gpp:_o,[mo]:vo},So=uo(),Co={}}));G(),W();function wo(){return Ii()?Mi():Ni()}var To=function(){let e=wo();return e.ADAGIO=e.ADAGIO||{},e.ADAGIO.pageviewId=e.ADAGIO.pageviewId||bi(),e.ADAGIO.adUnits=e.ADAGIO.adUnits||{},e.ADAGIO.pbjsAdUnits=e.ADAGIO.pbjsAdUnits||[],e.ADAGIO.queue=e.ADAGIO.queue||[],e.ADAGIO.versions=e.ADAGIO.versions||{},e.ADAGIO.versions.pbjs=`11.41.0`,e.ADAGIO.windows=e.ADAGIO.windows||[],e.ADAGIO.isSafeFrameWindow=da(),e.ADAGIO}(),K,q,J,Eo,Do,Oo=o((()=>{K=`native`,q=`video`,J=`banner`,Eo=`audio`,Do=[K,q,J,Eo]})),ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo=o((()=>{ko=`accessDevice`,Ao=`syncUser`,jo=`enrichUfpd`,Mo=`enrichEids`,No=`fetchBids`,Po=`reportAnalytics`,Fo=`transmitEids`,Io=`transmitUfpd`,Lo=`transmitPreciseGeo`,Ro=`transmitTid`,zo=`accessRequestCredentials`}));function Vo(e){return`/g,`]]]]>`)}]]>`}function Ho(e){return String(e).replace(/&/g,`&`).replace(/{})),Wo=s(((e,t)=>{s.SYNC=1,s.ASYNC=2,s.QUEUE=4;var n=`fun-hooks`,r=Object.freeze({ready:0}),i=new WeakMap;function a(e,t){return Array.prototype.slice.call(e,t)}function o(e){for(var t;t=e.shift();)t()}function s(e){var t={},c=[];e=Object.assign({},r,e);function l(e,t){if(typeof e==`function`)return m.call(null,`sync`,e,t);if(typeof e==`string`&&typeof t==`function`)return m.apply(null,arguments);if(typeof e==`object`)return d.apply(null,arguments)}var u;e.ready?l.ready=function(){u=!0,o(c)}:u=!0;function d(e,t,n){var r=!0;t===void 0&&(t=Object.getOwnPropertyNames(e).filter(e=>!e.match(/^_/)),r=!1);var i={},a=[`constructor`];do t.forEach(function(t){var r=t.match(/(?:(sync|async):)?(.+)/),o=r[1]||`sync`,s=r[2];if(!i[s]&&typeof e[s]==`function`&&a.indexOf(s)===-1){var c=e[s];i[s]=e[s]=m(o,c,n?[n,s]:void 0)}}),e=Object.getPrototypeOf(e);while(r&&e);return i}function f(e){var r=Array.isArray(e)?e:e.split(`.`);return r.reduce(function(t,i,a){var o=t[i],s=!1;return o||(a===r.length-1?(u||c.push(function(){s||console.warn(n+`: referenced '`+e+`' but it was never created`)}),t[i]=p(function(e){t[i]=e,s=!0})):t[i]={})},t)}function p(e){var t=[],n=[],r=function(){},a={before:function(e,n){return o.call(this,t,`before`,e,n)},after:function(e,t){return o.call(this,n,`after`,e,t)},getHooks:function(e){var r=t.concat(n);typeof e==`object`&&(r=r.filter(function(t){return Object.keys(e).every(function(n){return t[n]===e[n]})}));try{Object.assign(r,{remove:function(){return r.forEach(function(e){e.remove()}),this}})}catch(e){console.error("error adding `remove` to array, did you modify Array.prototype?")}return r},removeAll:function(){return this.getHooks().remove()}};return i.set(a.after,{install:function(i,a,o){this.type=i,r=o,o(t,n),e&&e(a)}}),a;function o(e,i,a,o){var s={hook:a,type:i,priority:o||10,remove:function(){var i=e.indexOf(s);i!==-1&&(e.splice(i,1),r(t,n))}};return e.push(s),e.sort(function(e,t){return t.priority-e.priority}),r(t,n),this}}function m(t,r,o){var l=r.after&&i.get(r.after);if(l){if(l.type!==t)throw n+`: recreated hookable with different type`;return r}var d=o?f(o):p(),m,h={get:function(e,t){return d[t]||Reflect.get.apply(Reflect,arguments)}};u||c.push(v);var g=new Proxy(r,h);return i.get(g.after).install(t,g,_),g;function _(e,n){var r=[],i;e.length||n.length?(e.forEach(o),i=r.push(void 0)-1,n.forEach(o),m=function(e,n,o){var s=r.slice(),c=0,l,u=t===`async`&&typeof o[o.length-1]==`function`&&o.pop();function d(e){t===`sync`?l=e:u&&u.apply(null,arguments)}function f(e){if(s[c]){var r=a(arguments);return f.bail=d,r.unshift(f),s[c++].apply(n,r)}t===`sync`?l=e:u&&u.apply(null,arguments)}return s[i]=function(){var r=a(arguments,1);t===`async`&&u&&(delete f.bail,r.push(f));var i=e.apply(n,r);t===`sync`&&f(i)},f.apply(null,o),l}):m=void 0,v();function o(e){r.push(e.hook)}}function v(){u||t===`sync`&&!(e.ready&s.SYNC)||t===`async`&&!(e.ready&s.ASYNC)?h.apply=m:t===`sync`||!(e.ready&s.QUEUE)?h.apply=function(){throw n+`: hooked function not ready`}:h.apply=function(){var e=arguments;c.push(function(){g.apply(e[1],e[2])})}}}return l.get=f,l}t.exports=s}));function Go(e,t,{postInstallAllowed:n=!1}={}){Y(`async`,function(r){r.forEach(e=>t(...e)),n&&($o[e]=t)},e)([])}function Ko(e,...t){let n=$o[e];if(n)return n(...t);Qo(e).before((e,n)=>{n.push(t),e(n)})}function qo(e,t){return Object.defineProperties(t,Object.fromEntries([`before`,`after`,`getHooks`,`removeAll`].map(t=>[t,{get:()=>e[t]}]))),t}function Jo(e){return qo(e,function(...t){return t.push(function(){}),e.apply(this,t)})}var Yo,Y,Xo,Zo,Qo,$o,es=o((()=>{Yo=u(Wo()),Pr(),Y=(0,Yo.default)({ready:Yo.default.SYNC|Yo.default.ASYNC|Yo.default.QUEUE}),Xo=Ar(),Y.ready=(()=>{let e=Y.ready;return function(){try{return e.apply(Y)}finally{Xo.resolve()}}})(),Zo=Xo.promise,Qo=Y.get,$o={}}));function ts(e){return!!(e!=null&&e.renderer||e!=null&&e.safeRenderer)}function ns(e){var t;let n=e==null||(t=e.mediaTypes)==null?void 0:t.video;if(n!=null){if(n.plcmt==null){var r,i;n.context===`outstream`||[2,3,4].includes(n.placement)?n.plcmt=4:!((r=n.playbackmethod)==null||(i=r.some)==null)&&i.call(r,e=>[2,6].includes(e))&&(n.plcmt=2)}let t=Br(n.playerSize,2)?n.playerSize:Array.isArray(n.playerSize)&&Br(n.playerSize[0])?n.playerSize[0]:null,a=F(n.w)&&F(n.h)?[n.w,n.h]:null,o=!1;t==null?a!=null&&(n.playerSize==null?n.playerSize=[a]:o=!0):[`w`,`h`].forEach((e,r)=>{n[e]!=null&&n[e]!==t[r]?o=!0:n[e]=t[r]}),o&&H(`Ad unit "${e.code} has conflicting playerSize and w/h`,e)}}function rs(e,{index:t=X.index}={}){var n;let r=(n=t.getMediaTypes(e))==null?void 0:n.video,i=r&&(r==null?void 0:r.context),a=r&&(r==null?void 0:r.useCacheKey),o=t.getAdUnit(e);return cs(e,o,r,i,a)}var is,as,os,ss,cs,ls=o((()=>{W(),D(),es(),Ou(),wr(),is=`outstream`,as=`instream`,os=[[`mimes`,e=>Array.isArray(e)&&e.length>0&&e.every(e=>typeof e==`string`)],[`minduration`,R],[`maxduration`,R],[`startdelay`,R],[`maxseq`,R],[`poddur`,R],[`protocols`,Br],[`w`,R],[`h`,R],[`podid`,P],[`podseq`,R],[`rqddurs`,Br],[`placement`,R],[`plcmt`,R],[`linearity`,R],[`skip`,e=>[1,0].includes(e)],[`skipmin`,R],[`skipafter`,R],[`sequence`,R],[`slotinpod`,R],[`mincpmpersec`,F],[`battr`,Br],[`maxextended`,R],[`minbitrate`,R],[`maxbitrate`,R],[`boxingallowed`,R],[`playbackmethod`,Br],[`playbackend`,R],[`delivery`,Br],[`pos`,R],[`api`,Br],[`companiontype`,Br],[`poddedupe`,Br]],ss=new Map(os),cs=Y(`sync`,function(e,t,n,r,i){if(n&&(i||r!==`outstream`)){let{url:t,useLocal:n,allowVastXmlOnly:r}=E.getConfig(`cache`)||{};return!t&&!n&&e.vastXml&&!e.vastUrl?r===!0?(H(`This bid contains only vastXml, and caching is disabled. Proceeding because cache.allowVastXmlOnly is enabled.`),!0):(U(` This bid contains only vastXml and will not work when a prebid cache url is not specified. Try enabling either prebid cache with ${xr()}.setConfig({ cache: {url: "..."} }); or local cache with ${xr()}.setConfig({ cache: { useLocal: true }}); `),!1):!!(e.vastUrl||e.vastXml)}return r===`outstream`&&!i?ts(e)||ts(t)||ts(n):!0},`checkVideoBidSetup`)})),us,ds,fs,ps,ms=o((()=>{us=`prebid`,ds=`bidder`,fs=`userId`,ps=`analytics`}));function hs(e,t){var n,r,i;let a=!(t==null||(n=t.impression)==null)&&n.length?t.impression.map(e=>`${Vo(e)}`).join(``):``,o=!(t==null||(r=t.error)==null)&&r.length?t.error.map(e=>`${Vo(e)}`).join(``):``,s=``;return!(t==null||(i=t.trackingEvents)==null)&&i.length&&(s=`${t.trackingEvents.map(({event:e,url:t})=>`${Vo(t)}`).join(``)}`),`prebid.org wrapper`+Vo(e)+``+a+o+``+s+``}function gs(e,{index:t=X.index}={}){let n=e.vastXml,r=t.getAuction(e),i={type:`xml`,value:n,ttlseconds:Number(e.ttl)+Ss};return E.getConfig(`cache.vasttrack`)&&(i.bidder=e.bidder,i.bidid=e.requestId,i.aid=e.auctionId),r!=null&&(i.timestamp=r.getAuctionStart()),typeof e.customCacheKey==`string`&&e.customCacheKey!==``&&(i.key=e.customCacheKey),i}function _s(e){return{success:function(t){let n;try{n=JSON.parse(t).responses}catch(t){e(t,[]);return}n?e(null,n):e(Error(`The cache server didn't respond with a responses property.`),[])},error:function(t,n){e(Error(`Error storing video ad in the cache: ${t}: ${JSON.stringify(n)}`),[])}}}function vs(e,t,n=e=>Em(us,`cache`,e)){let r={puts:e.map(e=>gs(e))};n(E.getConfig(`cache.timeout`))(E.getConfig(`cache.url`),_s(t),JSON.stringify(r),{contentType:`text/plain`,withCredentials:!0})}function ys(e,t){return`${e}?uuid=${t}`}function bs({bidResponse:e,auctionInstance:t,afterBidAdded:n,videoMediaType:r}){var i,a;Ts(e);let o=r&&(r==null?void 0:r.context),s=r&&(r==null?void 0:r.useCacheKey),{useLocal:c,url:l,ignoreBidderCacheKey:u}=E.getConfig(`cache`)||{},d=(i=e.safeRenderer)!=null&&i.url?e.safeRenderer.requiresVastUrl:(a=e.renderer)==null?void 0:a.requiresVastUrl,f=e.mediaType===`video`&&o===`outstream`&&d===!0&&!e.vastUrl;if(f&&(!e.vastXml||!c&&!l)){U(`Video renderer requires vastUrl, but this bid has no VAST XML or video cache is disabled`),n();return}let p=(c||l)&&(s||o!==`outstream`||f),m=!e.videoCacheKey||u;if(p&&m){Ns(t,e,n,r);return}if(p&&!m&&!e.vastUrl){U(`videoCacheKey specified but not required vastUrl for video bid`),n();return}Hl(t,e),n()}function xs(e){let t=e.map(e=>e.bidResponse);function n(e){U(`Failed to save to the video cache: ${e}. Video bids will be discarded:`,t)}let r=E.getConfig(`cache.url`);Ds.store(t,function(t,i){t?n(t):e.length===i.length?i.forEach((t,n)=>{let{auctionInstance:i,bidResponse:a,afterBidAdded:o}=e[n];t.uuid===``?H(`Supplied video cache key was already in use by Prebid Cache; caching attempt was rejected. Video bid must be discarded.`):(a.cacheUrl=r,Es(a,ys(r,t.uuid),t.uuid),Hl(i,a),o())}):U(`expected ${e.length} cache IDs, got ${i.length} instead`)})}var Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps=o((()=>{jm(),D(),Ou(),W(),Uo(),Cu(),es(),ls(),ms(),Ss=15,Cs=new Map,ws=e=>{let t=e.vastXml,n=URL.createObjectURL(new Blob([t],{type:`text/xml`}));Es(e,n),Cs.set(e.videoCacheKey,n)},Ts=Y(`sync`,function(e){!e.vastXml&&e.vastUrl&&(e.vastXml=hs(e.vastUrl,e.vastTrackers))},`updateVast`),Es=(e,t,n)=>{e.videoCacheKey=n||bi(),e.vastUrl||(e.vastUrl=t)},Ds={store:vs},E.getConfig(`cache`,({cache:e})=>{Os=typeof e.batchSize==`number`&&e.batchSize>0?e.batchSize:1,ks=typeof e.batchTimeout==`number`&&e.batchTimeout>0?e.batchTimeout:0,e.useLocal&&!As&&(As=X.onExpiry(e=>{e.getBidsReceived().forEach(e=>{let t=Cs.get(e.videoCacheKey);t&&t.startsWith(`blob`)&&URL.revokeObjectURL(t),Cs.delete(e.videoCacheKey)})}))}),js=(e=setTimeout,t=xs)=>{let n=[[]],r=!1,i=e=>e();return function(a,o,s){let c=ks>0?e:i;n[n.length-1].length>=Os&&n.push([]),n[n.length-1].push({auctionInstance:a,bidResponse:o,afterBidAdded:s}),r||(r=!0,c(()=>{n.forEach(t),n=[[]],r=!1},ks))}},Ms=js(),Ns=Y(`async`,function(e,t,n,r){E.getConfig(`cache.useLocal`)?(ws(t),Hl(e,t),n()):Ms(e,t,n)},`callPrebidCache`)}));function Fs(e){return function(t,n,r){let i={[Ls]:t,[Rs]:n,[Is]:`${t}.${n}`};return t===`bidder`&&(i[zs]=e(n)),Ks(Object.assign(i,r))}}var Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs=o((()=>{ms(),es(),Is=`component`,Ls=`componentType`,Rs=`componentName`,zs=`adapterCode`,Bs=`storageType`,Vs=`storageKey`,Hs=`write`,Us=`configName`,Ws=`syncType`,Gs=`_config`,Ks=Y(`sync`,e=>e)}));function Js(e=Za(`Activity control:`)){let t={};function n(e){return t[e]=t[e]||[],t[e]}function r(t,n,r,i){let a;try{a=r(i)}catch(r){e.logError(`Exception in rule ${n} for '${t}'`,r),a={allow:!1,reason:r}}return a&&Object.assign({activity:t,name:n,component:i.component},a)}let i={};function a({activity:t,name:n,allow:r,reason:a,component:o}){let s=`${n} ${r?`allowed`:`denied`} '${t}' for '${o}'${a?`:`:``}`,c=i.hasOwnProperty(s);if(c&&clearTimeout(i[s]),i[s]=setTimeout(()=>delete i[s],1e3),!c){let t=[s];a&&t.push(a),(r?e.logInfo:e.logWarn).apply(e,t)}}return[function(e,t,r,i=10){let a=n(e),o=a.findIndex(([e])=>i=0&&a.splice(e,1)}},function(e,t){let i,o;for(let[s,c,l]of n(e)){if(i!==s&&o)break;i=s;let n=r(e,c,l,t);if(n)if(n.allow)o=n;else return a(n),!1}return o&&a(o),!0}]}var Ys,Xs,Zs=o((()=>{W(),qs(),[Ys,Xs]=Js()}));function Qs(e,t,n){return!t||!n||!e?(U(`cannot load external script without url, moduleType, or moduleCode`),!1):!!Xs(`loadExternalScript`,lm(t,n))}function $s(e,t,n,r,i,a){if(!Qs(e,t,n))return;let o=typeof r==`function`||typeof(r==null?void 0:r.success)==`function`||typeof(r==null?void 0:r.error)==`function`;function s(e,t){if(t==null)if(typeof e==`function`)e();else{var n;(n=e.success)==null||n.call(e)}else{var r;(r=e.error)==null||r.call(e,t)}}i||(i=document);let c=f(i,e);if(c)return o&&(c.loaded?s(r,c.error):c.callbacks.push(r)),c.tag;let l=nc.get(i)||{},u={error:null,loaded:!1,tag:null,callbacks:[]};return l[e]=u,nc.set(i,l),o&&u.callbacks.push(r),H(`module ${n} is loading external JavaScript`),d(e,function(){u.loaded=!0;try{for(let e=0;e{Bo(),um(),Zs(),W(),pe(),nc=new WeakMap,rc=Va(function(e){return new Promise((t,n)=>{let r=document.createElement(`link`);r.rel=`preload`,r.as=`script`,r.href=e,r.onload=()=>t(),r.onerror=n,Gi(r)})}),ec.clear=rc.clear}));function ac(e){return!!(e&&(e.url||e.renderNow))}function oc(e,t,n){let r=null;e.config&&e.config.documentResolver&&(r=e.config.documentResolver(t,document,n)),r||(r=document),e.documentContext=r,e.render(t,e.documentContext)}function sc(e){var t;let n=cc.adUnits.find(t=>t.code===e);if(!n)return!1;let r=n==null?void 0:n.renderer,i=!!(r&&r.url&&r.render),a=n==null||(t=n.mediaTypes)==null||(t=t.video)==null?void 0:t.renderer,o=!!(a&&a.url&&a.render);return!!(i&&r.backupOnly!==!0||o&&a.backupOnly!==!0)}var cc,lc,uc,dc=o((()=>{ic(),W(),k(),ms(),ke(),cc=Tr(),lc=`outstream`,uc=class e{constructor(e){Oe(this,`url`,void 0),Oe(this,`config`,void 0),Oe(this,`handlers`,void 0),Oe(this,`id`,void 0),Oe(this,`renderNow`,void 0),Oe(this,`requiresVastUrl`,void 0),Oe(this,`adUnitCode`,void 0),Oe(this,`loaded`,void 0),Oe(this,`cmd`,void 0),Oe(this,`push`,void 0),Oe(this,`callback`,void 0),Oe(this,`render`,void 0),Oe(this,`documentContext`,void 0),Oe(this,`_render`,void 0);let{url:t,config:n,id:r,callback:i,loaded:a,adUnitCode:o,renderNow:s,requiresVastUrl:c}=e;this.url=t,this.config=n,this.handlers={},this.id=r,this.renderNow=s,this.requiresVastUrl=c,this.adUnitCode=o,this.loaded=a,this.cmd=[],this.push=e=>{if(typeof e!=`function`){U(`Commands given to Renderer.push must be wrapped in a function`);return}this.loaded?e():this.cmd.push(e)},this.callback=i||(()=>{this.loaded=!0,this.process()}),this.render=(...e)=>{let n=()=>{this._render?this._render(...e):H(`No render function was provided, please use .setRender on the renderer`)};sc(o)?(H(`External Js not loaded by Renderer since renderer url and callback is already defined on adUnit ${o}`),n()):s?n():(this.cmd.unshift(n),$s(t,us,lc,this.callback,this.documentContext))}}static install(t){let{url:n,config:r,id:i,callback:a,loaded:o,adUnitCode:s,renderNow:c,requiresVastUrl:l}=t;return new e({url:n,config:r,id:i,callback:a,loaded:o,adUnitCode:s,renderNow:c,requiresVastUrl:l})}getConfig(){return this.config}setRender(e){this._render=e}setEventHandlers(e){this.handlers=e}handleVideoEvent({id:e,eventName:t}){typeof this.handlers[t]==`function`&&this.handlers[t](),Xa(`Prebid Renderer event for id ${e} type ${t}`)}process(){for(;this.cmd.length>0;)try{this.cmd.shift()()}catch(e){U(`Error processing Renderer command on ad unit '${this.adUnitCode}':`,e)}}}}));function fc(e){return e==null?this.defaultScope:e}var pc,mc,hc,gc=o((()=>{W(),k(),tr(),xt(),ke(),te(),pc=new WeakSet,mc=class{constructor(e,t){bt(this,pc),Oe(this,`getSettings`,void 0),Oe(this,`defaultScope`,void 0),this.getSettings=e,this.defaultScope=t}get(e,t){let n=this.getOwn(e,t);return n===void 0&&(n=this.getOwn(null,t)),n}getOwn(e,t){return e=b(pc,this,fc).call(this,e),j(this.getSettings(),`${e}.${t}`)}getScopes(){return Object.keys(this.getSettings()).filter(e=>e!==this.defaultScope)}settingsFor(e){return B({},this.ownSettingsFor(null),this.ownSettingsFor(e))}ownSettingsFor(e){return e=b(pc,this,fc).call(this,e),this.getSettings()[e]||{}}},hc=new mc(()=>Tr().bidderSettings||{},Rn.BD_SETTING_STANDARD)}));function _c({moduleName:e,moduleType:t,advertiseKeys:n=!0}={},{isAllowed:r=Xs}={}){function i(i,a,o,s){let c=e,l=E.getCurrentBidder();l&&t===`bidder`&&Z.aliasRegistry[l]===e&&(c=l);let u={[Bs]:a,[Hs]:s};return n&&o!=null&&(u[Vs]=o),i({valid:r(ko,lm(t,c,u))})}function a(e,t,n,r,a){if(a&&typeof a==`function`)wc.push(function(){a(i(e,t,n,r))});else return i(e,t,n,r)}let o=function(e,t,n,r,i,o){return a(function(a){if(a&&a.valid){let a=i&&i!==``?` ;domain=${encodeURIComponent(i)}`:``,o=n&&n!==``?` ;expires=${n}`:``,s=(r==null?void 0:r.toLowerCase())===`none`?`; Secure`:``;document.cookie=`${e}=${encodeURIComponent(t)}${o}; path=/${a}${r?`; SameSite=${r}`:``}${s}`}},Cc,e,!0,o)},s=function(e,t){return a(function(t){if(t&&t.valid){let t=window.document.cookie.match(`(^|;)\\s*`+e+`\\s*=\\s*([^;]*)\\s*(;|$)`);return t?decodeURIComponent(t[2]):null}return null},Cc,e,!1,t)},c=function(e){return a(function(e){return e&&e.valid?Ca()&&Tc():!1},Cc,null,!1,e)};function l(e){let t=e.charAt(0).toUpperCase()+e.substring(1),n=()=>window[e],r=function(t){return a(function(t){if(t&&t.valid)try{return!!n()}catch(t){U(`${e} api disabled`)}return!1},Sc,null,!1,t)};return{[`has${t}`]:r,[`${e}IsEnabled`](e){return a(function(e){if(e&&e.valid)try{return n().setItem(`prebid.cookieTest`,`1`),n().getItem(`prebid.cookieTest`)===`1`}catch(e){}finally{try{n().removeItem(`prebid.cookieTest`)}catch(e){}}return!1},Sc,null,!1,e)},[`setDataIn${t}`](e,t,i){return a(function(i){i&&i.valid&&r()&&n().setItem(e,t)},Sc,e,!0,i)},[`getDataFrom${t}`](e,t){return a(function(t){return t&&t.valid&&r()?n().getItem(e):null},Sc,e,!1,t)},[`removeDataFrom${t}`](e,t){return a(function(t){t&&t.valid&&r()&&n().removeItem(e)},Sc,e,!0,t)}}}return C(C(C({setCookie:o,getCookie:s,cookiesAreEnabled:c},l(`localStorage`)),l(`sessionStorage`)),{},{findSimilarCookies:function(e,t){return a(function(t){if(t&&t.valid){let t=[];if(Sa()){let n=document.cookie.split(`;`);for(;n.length;){let r=n.pop(),i=r.indexOf(`=`);i=i<0?r.length:i,decodeURIComponent(r.slice(0,i).replace(/^\s+/,``)).indexOf(e)>=0&&t.push(decodeURIComponent(r.slice(i+1)))}}return t}},Cc,e,!1,t)}})}function vc({moduleType:e,moduleName:t,bidderCode:n}={}){function r(){throw Error(`Invalid invocation for getStorageManager: must set either bidderCode, or moduleType + moduleName`)}return n?((e&&e!==`bidder`||t)&&r(),e=ds,t=n):(!t||!e)&&r(),_c({moduleType:e,moduleName:t})}function yc(e){return _c({moduleName:e,moduleType:us})}function bc(){if(!Sa())return{allow:!1}}function xc(e,t=hc){if(e.componentType!==`bidder`)return;let n=t.get(e[zs],`storageAllowed`);if(!n||n===!0)n=!!n;else{let t=e[Bs];n=Array.isArray(n)?n.some(e=>e===t):n===t}if(!n)return{allow:n}}var Sc,Cc,wc,Tc,Ec,Dc=o((()=>{W(),gc(),ms(),Zs(),qs(),Bo(),D(),es(),cm(),um(),w(),Sc=`html5`,Cc=`cookie`,wc=[],Tc=(()=>{let e=yc(`storage`);return Va(function(t,n=e){let r=new Date(ya()+10*1e3).toUTCString(),i=`_rdc${Date.now()}`,a=`writeable`;return n.setCookie(i,a,r,`Lax`,t),n.getCookie(i)===a?(n.setCookie(i,``,`Thu, 01 Jan 1970 00:00:01 GMT`,void 0,t),!0):!1})})(),Ys(ko,`deviceAccess config`,bc),Ys(zo,`deviceAccess config`,bc),Ys(ko,`bidderSettings.*.storageAllowed`,xc),Ec=Y(`sync`,(e,t)=>{})}));function Oc(){return!pa()&&!ma()&&!ha()&&jc.cookiesAreEnabled()}function kc(e){let t={},n=s(),r=new Set,i={},a={image:!0,iframe:!1},o=e.config;E.getConfig(`userSync`,e=>{if(e.userSync){let t=e.userSync.filterSettings;I(t)&&!t.image&&!t.all&&(e.userSync.filterSettings.image={bidders:`*`,filter:`include`})}o=Object.assign(o,e.userSync)}),e.regRule(Ao,`userSync config`,e=>{if(!o.syncEnabled)return{allow:!1,reason:`syncs are disabled`};if(e.componentType===`bidder`){let n=e[Ws],r=e[Rs];if(!t.canBidderRegisterSync(n,r))return{allow:!1,reason:`${n} syncs are not enabled for ${r}`}}});function s(){return{image:[],iframe:[]}}function c(){if(!(!o.syncEnabled||!e.browserSupportsCookies)){try{d(),u()}catch(e){return U(`Error firing user syncs`,e)}n=s()}}function l(e,t){la(e).forEach(t)}function u(){a.image&&l(n.image,e=>{let[t,n]=e;Xa(`Invoking image pixel user sync for bidder: ${t}`),o.usePoliteSync?qi(n):Yi(n)})}function d(){a.iframe&&l(n.iframe,e=>{let[t,r,i]=e;Xa(`Invoking iframe user sync for bidder: ${t}`),o.usePoliteSync?Ji(r,void 0,void 0,i):Qi(r,void 0,void 0,i),f(n,t)})}function f(e,t){e.image=e.image.filter(e=>e[0]!==t)}function p(e,t){return e[t]?e[t]+=1:e[t]=1,e}t.registerSync=(t,a,s,c)=>{if(r.has(a))return Xa(`already fired syncs for "${a}", ignoring registerSync call`);if(!o.syncEnabled||!L(n[t]))return H(`User sync type "${t}" not supported`);if(!a)return H(`Bidder is required for registering sync`);if(o.syncsPerBidder!==0&&Number(i[a])>=o.syncsPerBidder)return H(`Number of user syncs exceeded for "${a}"`);e.isAllowed(`syncUser`,lm(`bidder`,a,{syncType:t,syncUrl:s}))&&(n[t].push([a,s,c]),i=p(i,a))},t.bidderDone=r.add.bind(r);function m(e,t){let n=o.filterSettings;if(h(n,e)){a[e]=!0;let r=n.all?n.all:n[e],i=r.bidders===`*`?[t]:r.bidders;return{include:(e,t)=>!e.includes(t),exclude:(e,t)=>e.includes(t)}[r.filter||`include`](i,t)}return!a[e]}function h(e,t){if(e.all&&e[t])return H(`Detected presence of the "filterSettings.all" and "filterSettings.${t}" in userSync config. You cannot mix "all" with "iframe/image" configs; they are mutually exclusive.`),!1;let n=e.all?e.all:e[t],r=e.all?`all`:t;if(!n)return!1;let i=n.filter,a=n.bidders;return i&&i!==`include`&&i!==`exclude`?(H(`UserSync "filterSettings.${r}.filter" setting '${i}' is not a valid option; use either 'include' or 'exclude'.`),!1):a!==`*`&&!(Array.isArray(a)&&a.length>0&&a.every(e=>P(e)&&e!==`*`))?(H(`Detected an invalid setup in userSync "filterSettings.${r}.bidders"; use either '*' (to represent all bidders) or an array of bidders.`),!1):!0}return t.syncUsers=(e=0)=>{if(e)return setTimeout(c,Number(e));c()},t.triggerUserSyncs=()=>{o.enableOverride&&t.syncUsers()},t.removeUserSyncs=()=>$i(),t.canBidderRegisterSync=(e,t)=>!(o.filterSettings&&m(e,t)),t}var Ac,jc,Mc,Nc=o((()=>{W(),D(),Dc(),Zs(),Bo(),qs(),ms(),um(),Ac={syncEnabled:!0,filterSettings:{image:{bidders:`*`,filter:`include`}},syncsPerBidder:5,syncDelay:3e3,auctionDelay:500,usePoliteSync:!1},E.setDefaults({userSync:M(Ac)}),jc=yc(`usersync`),Mc=kc(Object.defineProperties({config:E.getConfig(`userSync`),isAllowed:Xs,regRule:Ys},{browserSupportsCookies:{get:function(){return Oc()}}}))}));function Pc(){if(document.hidden)Ic=Date.now();else{var e;Lc+=Date.now()-((e=Ic)==null?0:e),Ic=null,Rc.forEach(({callback:e,startTime:t,setTimerId:n})=>n(Fc(e,Lc-t)())),Rc=[]}}function Fc(e,t){let n=Lc,r=setTimeout(()=>{Lc===n&&Ic==null?e():Ic==null?r=Fc(e,Lc-n)():Rc.push({callback:e,startTime:n,setTimerId(e){r=e}})},t);return()=>r}var Ic,Lc,Rc,zc=o((()=>{Ic=null,Lc=0,Rc=[],document.addEventListener(`visibilitychange`,Pc)}));function Bc({startTime:e=ya,ttl:t=()=>null,monotonic:n=!1,slack:r=5e3}={}){let i=new Map,a=[],o=[],s=n?e=>o.push(e):e=>o.splice(Ga(o,e,e=>e.expiry),0,e),c,l;function u(){if(l&&clearTimeout(l()),o.length>0){let e=ya();c=Math.max(e,o[0].expiry+r),l=Fc(()=>{let e=ya(),t=0;for(let n of o){if(n.expiry>e)break;a.forEach(e=>{try{e(n.item)}catch(e){U(e)}}),i.delete(n.item),t++}o.splice(0,t),l=null,u()},c-e)}else l=null}function d(n){let i={},a=f,o;function d(){a===f&&i.start!=null&&i.delta!=null&&(o=i.start+i.delta,s(h),(l==null||c>o+r)&&u())}let[p,m]=Object.entries({start:e,delta:t}).map(([e,t])=>{let r;return function(){let a=r={};A.resolve(t(n)).then(t=>{a===r&&(i[e]=t,d())})}}),h={item:n,refresh:m,get expiry(){return o}};return p(),m(),h}let f={};return{[Symbol.iterator]:()=>i.keys(),add(e){!i.has(e)&&i.set(e,d(e))},has(e){return i.has(e)},delete(e){let t=i.get(e);if(t){for(let e=0;e{let t=a.indexOf(e);t>=0&&a.splice(t,1)}}}}var Vc=o((()=>{Pr(),W(),zc()})),Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il=o((()=>{W(),tr(),Vc(),D(),ni(),Hc=`eventHistoryTTL`,Uc=null,Wc=Bc({monotonic:!0,ttl:()=>Uc}),E.getConfig(Hc,e=>{let t=Uc,n=e==null?void 0:e[Hc];Uc=typeof n==`number`?n*1e3:null,t!==Uc&&Wc.refresh()}),Gc=Object.values(T),Kc=Vn,qc=0,Jc=new WeakMap,Yc=function(){let e={};function t(t,n){Xa(`Emitting event for: `+t);let r=n[0]||{},i=r[Kc[t]],a=e[t]||{que:[]};var o=Object.keys(a);let s=[],c={eventType:t,args:r,id:i,elapsedTime:ba(),sequence:qc++};Wc.add(c),i&&o.includes(i)&&s.push(...a[i].que),s.push(...a.que),(s||[]).forEach(function(e){if(e)try{e(c,...n)}catch(e){U(`Error executing handler:`,`events.js`,e,t)}})}function n(e){return Gc.includes(e)}function r(t,r,i){if(n(t)){let n=e[t]||{que:[]};i?(n[i]=n[i]||{que:[]},n[i].que.push(r)):n.que.push(r),e[t]=n}else U(`Wrong event name : `+t+` Valid event names :`+Gc)}return{has:n,listen:r,on:function(e,t,n){let i=Jc.has(t)?Jc.get(t):(e,...n)=>t(...n);Jc.set(t,i),r(e,i,n)},emit:function(e,...n){t(e,n)},off:function(t,n,r){var i,a;n!=null&&Jc.has(n)&&(n=Jc.get(n));let o=e[t];if(Bi(o)||Bi(o.que)&&Bi(o[r])||r&&(Bi(o[r])||Bi(o[r].que)))return;let s=e=>e.filter(e=>e!==n);r&&((i=o[r].que)==null?void 0:i.length)>0?o[r].que=s(o[r].que):((a=o.que)==null?void 0:a.length)>0&&(o.que=s(o.que)),e[t]=o},get:function(){return e},addEvents:function(e){Gc=Gc.concat(e)},getEvents:function(){return Wc.toArray().map(e=>Object.assign({},e))}}}(),Gr(Yc.emit.bind(Yc)),{on:Xc,off:Zc,get:Qc,getEvents:$c,emit:el,addEvents:tl,has:nl,listen:rl}=Yc}));function al(e,t,n){return function(...r){t&&t();try{return e.apply(this,r)}finally{n&&n()}}}function ol({now:e=fl,mkNode:t=cl,mkTimer:n=sl,mkRenamer:r=e=>e,nodes:i=pl}={}){return function(){function a(o,s=e=>({forEach(t){t(e)}})){s=r(s);function c(e){return function(t){return o.dfWalk({visit(n,r){let i=r[e];if(i.hasOwnProperty(t))return i[t]}})}}let l=c(`timestamps`);function u(e,t){let n=s(e);o.dfWalk({follow(e,t){return t.propagate&&(!e||!e.stopPropagation)},visit(e,r){n.forEach(n=>{e==null?r.metrics[n]=t:(r.groups.hasOwnProperty(n)||(r.groups[n]=[]),r.groups[n].push(t))})}})}function d(t){o.timestamps[t]=e()}function f(t,n){let r=l(t),i=r==null?null:e()-r;return n!=null&&u(n,i),i}function p(e,t,n){let r=l(e),i=l(t),a=r!=null&&i!=null?i-r:null;return n!=null&&u(n,a),a}function m(t){return n(e,e=>u(t,e))}function h(e,t){return m(e).stopAfter(t)()}function g(e,t,n){let r=m(e);return n(function(e){let t=r.stopBefore(e);return t.bail=e.bail&&r.stopBefore(e.bail),t.stopTiming=r,t.untimed=e,t}(t))}function _(){let e={};return o.dfWalk({visit(t,n){let r=(t,n)=>{Object.prototype.hasOwnProperty.call(e,t)||(e[t]=n)};Object.entries(n.metrics).forEach(([e,t])=>r(e,t)),(!t||t.includeGroups)&&Object.entries(n.groups).forEach(([e,t])=>r(e,t))}}),e}function v({propagate:e=!0,stopPropagation:n=!1,includeGroups:r=!1}={}){return a(t([[o,{propagate:e,stopPropagation:n,includeGroups:r}]]),s)}function y(e,{propagate:t=!0,stopPropagation:n=!1,includeGroups:r=!1}={}){let a=i.get(e);a!=null&&a.addParent(o,{propagate:t,stopPropagation:n,includeGroups:r})}function ee(e){return a(o,e)}function b(){return a(o.newSibling(),s)}let te={startTiming:m,measureTime:h,measureHookTime:g,checkpoint:d,timeSince:f,timeBetween:p,setMetric:u,getMetrics:_,fork:v,join:y,newMetrics:b,renameWith:ee,toJSON(){return _()}};return i.set(te,o),te}return a(t([]))}}function sl(e,t){let n=e(),r=!1;function i(){r||(t(e()-n),r=!0)}return i.stopBefore=e=>al(e,i),i.stopAfter=e=>al(e,null,i),i}function cl(e){return{metrics:{},timestamps:{},groups:{},addParent(t,n){e.push([t,n])},newSibling(){return cl(e.slice())},dfWalk({visit:t,follow:n=()=>!0,visited:r=new Set,inEdge:i}={}){let a;if(!r.has(this)){if(r.add(this),a=t(i,this),a!=null)return a;for(let[o,s]of e)if(n(i,s)&&(a=o.dfWalk({visit:t,follow:n,visited:r,inEdge:s}),a!=null))return a}}}}function ll(e){return hl&&e||ml}function ul(e,t){return function(n,r){return(i,...a)=>ll(t.apply(this,a)).measureHookTime(e+n,i,e=>r.call(this,e,...a))}}var dl,fl,pl,ml,hl,gl,_l,vl,yl=o((()=>{D(),dl=`performanceMetrics`,fl=window.performance&&window.performance.now?()=>window.performance.now():()=>Date.now(),pl=new WeakMap,ml=(()=>{let e=function(){},t=()=>({}),n={forEach:e},r=()=>null;r.stopBefore=e=>e,r.stopAfter=e=>e;let i=Object.defineProperties({dfWalk:e,newSibling:()=>i,addParent:e},Object.fromEntries([`metrics`,`timestamps`,`groups`].map(e=>[e,{get:t}])));return ol({now:()=>0,mkNode:()=>i,mkRenamer:()=>()=>n,mkTimer:()=>r,nodes:{get:e,set:e}})()})(),hl=!0,E.getConfig(dl,e=>{hl=!!e[dl]}),gl=(()=>{let e=ol();return function(){return hl?e():ml}})(),_l=ul(`requestBids.`,e=>e.metrics),vl=ul(`addBidResponse.`,(e,t)=>t.metrics)}));function bl(e,t,n,r){let i=e==null?void 0:e.adapterCode,a=(e==null?void 0:e.bidderCode)||(r==null?void 0:r.bidder),o=t.get(e==null?void 0:e.adapterCode,`adjustAlternateBids`);return t.getOwn(a,n)||t.get(o?i:a,n)}function xl(e,t,n,{index:r=X.index,bs:i=hc}={}){n=n||r.getBidRequest(t);let a=bl(t,i,`bidCpmAdjustment`,n);if(a&&typeof a==`function`)try{return a(e,Object.assign({},t),n)}catch(e){U(`Error during bid adjustment`,e)}return e}var Sl=o((()=>{Ou(),gc(),W()}));function Cl(e){return e.ttl-(e.hasOwnProperty(`ttlBuffer`)?e.ttlBuffer:Al)}function wl(){return jl}function Tl(e){let t=jl;return t==null&&Ml==null?null:(e==null?void 0:e.status)===qn.BID_TARGETING_SET&&typeof Ml==`number`?Ml:t}function El(){Nl.forEach(e=>e(jl))}function Dl(e){Nl.push(e)}var Ol,kl,Al,jl,Ml,Nl,Pl=o((()=>{D(),W(),tr(),Ol=`minBidCacheTTL`,kl=`minTargetedBidCacheTTL`,Al=1,jl=null,Ml=null,Nl=[],E.getConfig(`ttlBuffer`,e=>{typeof e.ttlBuffer==`number`?Al=e.ttlBuffer:U(`Invalid value for ttlBuffer`,e.ttlBuffer)}),E.getConfig(Ol,e=>{let t=jl;jl=e==null?void 0:e[Ol],jl=typeof jl==`number`?jl:null,t!==jl&&El()}),E.getConfig(kl,e=>{let t=Ml;Ml=e==null?void 0:e[kl],Ml=typeof Ml==`number`?Ml:null,t!==Ml&&El()})}));function Fl(e){let t=e.slice();return t.bids=t,t}var Il=o((()=>{}));function Ll(e,t,n={}){var r;let i=(r=n.bs)==null?hc:r,a=Object.assign({},e),o=e.cpm,s=bl(e,i,`bidDesirabilityAdjustment`,t);if(typeof s!=`function`)return o;try{return s(o,a,t)}catch(e){return U(`Error during bid desirability adjustment`,e),o}}function Rl(e,t){return t.desirability&&e.desirability?t.desirability-e.desirability:t.cpm-e.cpm}var zl=o((()=>{gc(),W(),Sl()}));function Bl({adUnits:e,adUnitCodes:t,callback:n,cbTimeout:r,labels:i,auctionId:a,ortb2Fragments:o,metrics:s}){s=ll(s);let c=e,l=i,u=t,d=a||bi(),f=r,p=new Set,m=Ar(),h=Ar(),g=[],_=n,v=[],y=Bc({startTime:e=>e.responseTimestamp,ttl:e=>{let t=Tl(e);return t==null?null:Math.max(t,e.ttl)*1e3}}),ee=[],b=[],te,x,ne,S,re=[];function ie(e){v=v.concat(e)}function ae(e){y.add(e)}function oe(e){g=g.concat(e)}function se(e){ee=ee.concat(e)}function ce(e){re=re.concat(e)}function le(){return{auctionId:d,timestamp:te,auctionEnd:x,auctionStatus:S,adUnits:c,adUnitCodes:u,labels:l,bidderRequests:v,noBids:ee,bidsReceived:y.toArray(),bidsRejected:g,winningBids:b,timeout:f,metrics:s,seatNonBids:re}}function ue(){ne=setTimeout(()=>de(!0),f)}function de(t){if(t?el(T.AUCTION_TIMEOUT,le()):clearTimeout(ne),x===void 0){let n=[];t&&(Xa(`Auction ${d} timedOut`),n=v.filter(e=>!p.has(e.bidderRequestId)).flatMap(e=>e.bids),n.length&&el(T.BID_TIMEOUT,n)),S=ou,x=Date.now(),s.checkpoint(`auctionEnd`),s.timeBetween(`requestBids`,`auctionEnd`,`requestBids.total`),s.timeBetween(`callBids`,`auctionEnd`,`requestBids.callBids`),m.resolve(),el(T.AUCTION_END,le()),gu(c,a,function(){try{if(_!=null){let e=y.toArray().filter(e=>u.includes(e.adUnitCode)).reduce(tu,{});_.apply(du,[e,t,d]),_=null}}catch(e){U(`Error executing bidsBackHandler`,null,e)}finally{var r;n.length&&Z.callTimedOutBidders(e,n,f);let t=(r=E.getConfig(`userSync`))==null?{}:r;t.enableOverride||ru(t.syncDelay)}})}}function fe(){E.resetBidder(),V(`Bids Received for Auction with id: ${d}`,y.toArray()),S=ou,de(!1)}function pe(e){p.add(e)}function me(){S=iu,te=Date.now();let e=s.measureTime(`requestBids.makeRequests`,()=>Z.makeBidRequests(c,te,d,f,l,o,s));V(`Bids Requested for Auction with id: ${d}`,e),s.checkpoint(`callBids`),e.length<1?(H(`No valid bid requests returned for auction`),fe()):hu.call({dispatch:he,context:this},e)}function he(e){e.forEach(e=>{ie(e)});let t={},n={bidRequests:e,run:()=>{fu(this),ue(),S=au,el(T.AUCTION_INIT,le());let n=Vl(fe,this);Z.callBids(c,e,n.addBidResponse,n.adapterDone,{request(e,n){i(cu,n),i(t,e),lu[e]||(lu[e]={SRA:!0,origin:n}),t[e]>1&&(lu[e].SRA=!1)},done(e){cu[e]--,uu[0]&&r(uu[0])&&uu.shift()}},f,pe,o),h.resolve()}};r(n)||(H(`queueing auction due to limited endpoint capacity`),uu.push(n));function r(e){let t=!0,n=E.getConfig(`maxRequestsPerOrigin`)||su;return e.bidRequests.some(e=>{let r=1,i=e.src!==void 0&&e.src===Kn.SRC?`s2s`:e.bidderCode;return e.alwaysHasCapacity&&!E.getConfig(`forceMaxRequestsPerOrigin`)?!1:(lu[i]&&(lu[i].SRA===!1&&(r=Math.min(e.bids.length,n)),cu[lu[i].origin]+r>n&&(t=!1)),!t)}),t&&e.run(),t}function i(e,t){e[t]===void 0?e[t]=1:e[t]++}}function ge(t){b=b.concat(t),Z.callBidWonBidder(t.adapterCode||t.bidder,t,e),t.deferBilling||Z.triggerBilling(t)}function _e(e){Z.callSetTargetingBidder(e.adapterCode||e.bidder,e),y.refresh()}return{addBidReceived:ae,addBidRejected:oe,addNoBid:se,addSeatNonBids:ce,callBids:me,addWinningBid:ge,setBidTargeting:_e,getWinningBids:()=>b,getAuctionStart:()=>te,getAuctionEnd:()=>x,getTimeout:()=>f,getAuctionId:()=>d,getAuctionStatus:()=>S,getAdUnits:()=>c,getAdUnitCodes:()=>u,getBidRequests:()=>v,getBidsReceived:()=>y.toArray(),getNoBids:()=>ee,getNonBids:()=>re,getFPD:()=>o,getMetrics:()=>s,refreshBidTTLs:()=>y.refresh(),end:m.promise,requestsDone:h.promise,getProperties:le}}function Vl(e,t,{index:n=X.index}={}){let r=0,i=!1,a=new Set,o={};function s(){r--,i&&r===0&&e()}function c(e,t,n){return o[t.requestId]=!0,Gl(t,e),r++,n(s)}function l(e,r){c(e,r,e=>{let i=Kl(r);el(T.BID_ACCEPTED,i),i.mediaType===`video`||i.mediaType===`audio`?Ul(t,i,e):(Hd(i)&&ef(i,n.getAdUnit(i)),Hl(t,i),e())})}function u(e,n,r){return c(e,n,e=>{n.rejectionReason=r,H(`Bid from ${n.bidder||`unknown bidder`} was rejected: ${r}`,n),el(T.BID_REJECTED,n),t.addBidRejected(n),e()})}function d(){let n=this,s=t.getBidRequests(),c=E.getConfig(`auctionOptions`);if(a.add(n),c&&!Bi(c)){let e=c.secondaryBidders;e&&!s.every(t=>e.includes(t.bidderCode))&&(s=s.filter(t=>!e.includes(t.bidderCode)))}i=s.every(e=>a.has(e)),n.bids.forEach(e=>{o[e.bidId]||(Wl(e),t.addNoBid(e),el(T.NO_BID,e))}),i&&r===0&&e()}return{addBidResponse:function(){function e(e,t){pu.call({dispatch:l},e,t,(()=>{let n=!1;return r=>{n||(u(e,t,r),n=!0)}})())}return e.reject=u,e}(),adapterDone:function(){mu(A.resolve()).finally(()=>d.call(this))}}}function Hl(e,t){ql(t),ll(t.metrics).timeSince(`addBidResponse`,`addBidResponse.total`),e.addBidReceived(t),el(T.BID_RESPONSE,t)}function Ul(e,t,n,{index:r=X.index}={}){var i;bs({bidResponse:t,auctionInstance:e,afterBidAdded:n,videoMediaType:(i=r.getMediaTypes({requestId:t.originalRequestId||t.requestId,adUnitId:t.adUnitId}))==null?void 0:i.video})}function Wl(e,{index:t=X.index}={}){let n=t.getBidderRequest(e),r=n&&n.start||e.requestTimestamp;Object.assign(e,{responseTimestamp:e.responseTimestamp||ya(),requestTimestamp:e.requestTimestamp||r}),e.timeToRespond=e.responseTimestamp-e.requestTimestamp}function Gl(e,t,{index:n=X.index}={}){let r=n.getAdUnit(e);Wl(e,{index:n}),Object.assign(e,{cpm:parseFloat(e.cpm)||0,bidder:e.bidder||e.bidderCode,adUnitCode:t}),(r==null?void 0:r.ttlBuffer)!=null&&(e.ttlBuffer=r.ttlBuffer)}function Kl(e,{index:t=X.index}={}){var n,r;el(T.BID_ADJUSTMENT,e);let i=t.getAdUnit(e);e.instl=(i==null||(n=i.ortb2Imp)==null?void 0:n.instl)===1,e.element=i==null?void 0:i.element;let a=t.getBidRequest(e),o=(a==null?void 0:a.renderer)||(i==null?void 0:i.renderer),s=(a==null?void 0:a.safeRenderer)||(i==null?void 0:i.safeRenderer),c=e.mediaType,l=t.getMediaTypes(e),u=l&&l[c],d=u&&u.renderer,f=u&&u.safeRenderer,p=null;d&&d.render&&!(d.backupOnly===!0&&e.renderer)?p=d:o&&o.render&&!(o.backupOnly===!0&&e.renderer)&&(p=o);let m=null;f&&f!=null&&f.url&&!((d==null?void 0:d.backupOnly)===!0&&e.safeRenderer)?m=f:s&&s!=null&&s.url&&!((d==null?void 0:d.backupOnly)===!0&&e.safeRenderer)&&(m=s),m!=null&&(e.safeRenderer=m),(r=E.getConfig(`allowTopWindowRenderers`))==null||r?p&&(e.renderer=uc.install({url:p.url,config:p.options,renderNow:p.url==null,requiresVastUrl:p.requiresVastUrl}),e.renderer.setRender(p.render)):e.renderer=null;let h=Jl(e.mediaType,l,E.getConfig(`mediaTypePriceGranularity`)),g=Dn(e.cpm,typeof h==`object`?h:E.getConfig(`customPriceBucket`),E.getConfig(`currency.granularityMultiplier`));return e.pbLg=g.low,e.pbMg=g.med,e.pbHg=g.high,e.pbAg=g.auto,e.pbDg=g.dense,e.pbCg=g.custom,e}function ql(e){let t,n=hc.get(e.bidderCode,`allowZeroCpmBids`)===!0?e.cpm>=0:e.cpm>0;e.bidderCode&&(n||e.dealId)&&(t=Ql(e.bidderCode,e)),e.adserverTargeting=Object.assign(e.adserverTargeting||{},t)}function Jl(e,t,n){if(e&&n){if(e===`video`){var r,i;let e=(r=t==null||(i=t.video)==null?void 0:i.context)==null?`instream`:r;if(n[`video-${e}`])return n[`${q}-${e}`]}return n[e]}}function Yl(e,t){return{key:e,val:typeof t==`function`?function(e,n){return t(e,n)}:function(e){return e[t]}}}function Xl(){return[Yl(Un.BIDDER,`bidderCode`),Yl(Un.AD_ID,`adId`),Yl(Un.PRICE_BUCKET,vu()),Yl(Un.SIZE,`size`),Yl(Un.DEAL,`dealId`),Yl(Un.SOURCE,`source`),Yl(Un.FORMAT,`mediaType`),Yl(Un.ADOMAIN,bu()),Yl(Un.ACAT,Su()),Yl(Un.DSP,xu()),Yl(Un.CRID,yu())]}function Zl(e,t){let n=Object.assign({},hc.settingsFor(null));if(n[Rn.ADSERVER_TARGETING]||(n[Rn.ADSERVER_TARGETING]=Xl()),e===`video`){let e=n[Rn.ADSERVER_TARGETING].slice();n[Rn.ADSERVER_TARGETING]=e,[Un.UUID,Un.CACHE_ID].forEach(t=>{e.find(e=>e.key===t)===void 0&&e.push(Yl(t,`videoCacheKey`))}),E.getConfig(`cache.url`)&&(!t||hc.get(t,`sendStandardTargeting`)!==!1)&&e.find(e=>e.key===Un.CACHE_HOST)===void 0&&e.push(Yl(Un.CACHE_HOST,function(e){var t;return e.cacheUrl?Pa(e.cacheUrl).hostname:(t=e.adserverTargeting)==null?void 0:t[Un.CACHE_HOST]}))}return n}function Ql(e,t,{index:n=X.index}={}){if(!t)return{};let r=n.getBidRequest(t);var i={};return $l(i,Zl(t.mediaType,e),t,r),e&&hc.getOwn(e,Rn.ADSERVER_TARGETING)&&($l(i,hc.ownSettingsFor(e),t,r),t.sendStandardTargeting=hc.get(e,`sendStandardTargeting`)),i}function $l(e,t,n,r){var i=t[Rn.ADSERVER_TARGETING];return n.size=n.getSize(),(i||[]).forEach(function(i){var a=i.key,o=i.val;if(e[a]&&H(`The key: `+a+` is being overwritten`),N(o))try{o=o(n,r)}catch(e){U(`bidmanager`,`ERROR`,e)}(t.suppressEmptyKeys!==void 0&&t.suppressEmptyKeys===!0||a===Un.DEAL||a===Un.ACAT||a===Un.DSP||a===Un.CRID)&&(Vi(o)||o==null)?V(`suppressing empty key '`+a+`' from adserver targeting`):e[a]=o}),e}function eu(e){let t=X.index.getBidRequest(e),n=xl(e.cpm,e,t);n>=0&&(e.cpm=n),e.desirability=Ll(e,t)}function tu(e,t){return e[t.adUnitCode]||(e[t.adUnitCode]=Fl([])),e[t.adUnitCode].push(t),e}function nu(e){let t=E.getConfig(`maxBid`);return!t||!e.cpm||t>=Number(e.cpm)}var ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu=o((()=>{W(),Ln(),Sf(),Ps(),dc(),D(),Nc(),es(),Oo(),Ou(),gc(),il(),cm(),tr(),Pr(),yl(),Sl(),k(),Vc(),Pl(),Zs(),Bo(),ms(),Il(),zl(),{syncUsers:ru}=Mc,iu=`started`,au=`inProgress`,ou=`completed`,Xc(T.BID_ADJUSTMENT,function(e){eu(e)}),su=4,cu={},lu={},uu=[],du=Tr(),fu=Y(`sync`,e=>{}),pu=Jo(Y(`async`,function(e,t,n){nu(t)?Xs(`acceptBid`,rm(`bidder`,t.bidder||t.bidderCode,{bid:t,ortb2:X.index.getOrtb2(t),adUnit:X.index.getAdUnit(t)}))?this.dispatch.call(null,e,t):n(Jn.BIDDER_DISALLOWED):n(Jn.PRICE_TOO_HIGH)},`addBidResponse`)),mu=Y(`sync`,e=>e,`responsesReady`),hu=Y(`sync`,function(e){this.dispatch.call(this.context,e)},`addBidderRequests`),gu=Y(`async`,function(e,t,n){n&&n()},`bidsBackCallback`),_u=(e,{index:t=X.index}={})=>{let n=Jl(e.mediaType,t.getMediaTypes(e),E.getConfig(`mediaTypePriceGranularity`));return typeof e.mediaType==`string`&&n?typeof n==`string`?n:`custom`:E.getConfig(`priceGranularity`)},vu=e=>t=>{let n=e||_u(t);if(n===Hn.AUTO)return t.pbAg;if(n===Hn.DENSE)return t.pbDg;if(n===Hn.LOW)return t.pbLg;if(n===Hn.MEDIUM)return t.pbMg;if(n===Hn.HIGH)return t.pbHg;if(n===Hn.CUSTOM)return t.pbCg},yu=()=>e=>e.creativeId?e.creativeId:``,bu=()=>e=>e.meta&&e.meta.advertiserDomains&&e.meta.advertiserDomains.length>0?[e.meta.advertiserDomains].flat()[0]:``,xu=()=>e=>{var t,n;return e.meta&&(e.meta.networkId||e.meta.networkName)?(e==null||(t=e.meta)==null?void 0:t.networkName)||(e==null||(n=e.meta)==null?void 0:n.networkId):``},Su=()=>e=>{var t;let n=e==null||(t=e.meta)==null?void 0:t.primaryCatId;return Array.isArray(n)?n[0]||``:n||``}})),wu,Tu,Eu=o((()=>{ee(),ne(),re(),wu=new WeakMap,Tu=class{constructor(e){y(this,wu,void 0),x(wu,this,e)}getAuction({auctionId:e}){if(e!=null)return S(wu,this).call(this).find(t=>t.getAuctionId()===e)}getAdUnit({adUnitId:e}){if(e!=null)return S(wu,this).call(this).flatMap(e=>e.getAdUnits()).find(t=>t.adUnitId===e)}getMediaTypes({adUnitId:e,requestId:t}){if(t!=null){let n=this.getBidRequest({requestId:t});if(n!=null&&(e==null||n.adUnitId===e))return n.mediaTypes}else if(e!=null){let t=this.getAdUnit({adUnitId:e});if(t!=null)return t.mediaTypes}}getBidderRequest({requestId:e,bidderRequestId:t}){if(e!=null||t!=null){let n=S(wu,this).call(this).flatMap(e=>e.getBidRequests());return t!=null&&(n=n.filter(e=>e.bidderRequestId===t)),e==null?n[0]:n.find(t=>t.bids&&t.bids.find(t=>t.bidId===e)!=null)}}getBidRequest({requestId:e}){if(e!=null)return S(wu,this).call(this).flatMap(e=>e.getBidRequests()).flatMap(e=>e.bids).find(t=>t&&t.bidId===e)}getOrtb2(e){var t,n;return((t=this.getBidderRequest(e))==null?void 0:t.ortb2)||((n=this.getAuction(e))==null||(n=n.getFPD())==null?void 0:n.global)}}}));function Du(){let e=Bc({startTime:e=>e.end.then(()=>e.getAuctionEnd()),ttl:e=>e.end.then(()=>{let t=e.getBidsReceived();if(t.length===0){let e=wl();return e==null?null:e*1e3}let n=t.map(e=>{let t=Tl(e);return t==null?null:Math.max(t,e.ttl)});return n.some(e=>e==null)?null:Math.max(...n)*1e3})});Dl(()=>{for(let t of e)t.refreshBidTTLs();e.refresh()});let t={onExpiry:e.onExpiry};function n(t){for(let n of e)if(n.getAuctionId()===t)return n}let r=new Map;Xc(T.PBS_ANALYTICS,t=>{if(t.seatnonbid!=null){let n=new Set(r.get(t.auctionId));for(let r of e)r.getAuctionId()===t.auctionId&&n.add(r);n.forEach(e=>e.addSeatNonBids(t.seatnonbid))}}),t.addWinningBid=function(e){let t=ll(e.metrics);t.checkpoint(`bidWon`),t.timeBetween(`auctionEnd`,`bidWon`,`adserver.pending`),t.timeBetween(`requestBids`,`bidWon`,`adserver.e2e`);let r=n(e.auctionId);r?r.addWinningBid(e):H(`Auction not found when adding winning bid`)},Object.entries({getAllWinningBids:{name:`getWinningBids`},getBidsRequested:{name:`getBidRequests`},getNoBids:{},getAdUnits:{},getBidsReceived:{pre(e){return e.getAuctionStatus()===ou}},getAdUnitCodes:{post:na}}).forEach(([n,{name:r=n,pre:i,post:a}])=>{let o=i==null?e=>e[r]():e=>i(e)?e[r]():[],s=a==null?e=>e:e=>e.filter(a);t[n]=()=>s(e.toArray().flatMap(o))});function i(){return e.toArray().flatMap(e=>e.getBidsReceived())}t.getAllBidsForAdUnitCode=function(e){return i().filter(t=>t&&t.adUnitCode===e)},t.createAuction=function(e){let t=Bl(e);a(t);let n=t.getAuctionId();return r.has(n)||r.set(n,new Set),r.get(n).add(t),t.end.then(()=>{let e=r.get(n);e!=null&&(e.delete(t),e.size===0&&r.delete(n))}),t},t.findBidByAdId=function(e){return i().find(t=>t.adId===e)},t.getStandardBidderAdServerTargeting=function(){return Zl()[Rn.ADSERVER_TARGETING]},t.setStatusForBids=function(r,i){let a=t.findBidByAdId(r);if(a&&(a.status=i),a&&i===qn.BID_TARGETING_SET){let t=n(a.auctionId);t&&(t.setBidTargeting(a),e.refresh())}},t.getLastAuctionId=function(){let t=e.toArray();return t.length&&t[t.length-1].getAuctionId()},t.clearAllAuctions=function(){e.clear()},t.getAuctions=function(){return e.toArray()};function a(t){e.add(t)}return t.index=new Tu(()=>e.toArray()),t}var X,Ou=o((()=>{W(),Cu(),Eu(),tr(),il(),yl(),Vc(),Pl(),X=Du()})),ku,Au=o((()=>{ku='(()=>{const e="Prebid Event",t="browserIntervention",n="noAd";window.render=function({ad:r,adUrl:o,width:i,height:s,instl:d},{mkFrame:a,sendMessage:l},c){if(function(e,t,n){const r=n?.defaultView||window;if("ReportingObserver"in r)try{new r.ReportingObserver(t=>{e(t[0])},{buffered:!0,types:t}).observe()}catch(e){}}(n=>{l(e,{event:t,intervention:n})},["intervention"]),!r&&!o){const e=new Error("Missing ad markup or URL");throw e.reason=n,e}{if(null==s){const e=c.document?.body;[e,e?.parentElement].filter(e=>null!=e?.style).forEach(e=>{e.style.height="100%"})}const e=c.document,t={width:i??"100%",height:s??"100%"};if(o&&!r?t.src=o:t.srcdoc=r,e.body.appendChild(a(e,t)),d&&c.frameElement){const e=c.frameElement.style;e.width=i?`${i}px`:"100vw",e.height=s?`${s}px`:"100vh";const t=c.parent?.document?.querySelector("div#creative"),n=c.parent?.document?.querySelector("div#ad_position_box"),r=t&&c.parent?.getComputedStyle?.(t),o=n&&c.parent?.getComputedStyle?.(n);t?.parentElement===n&&r?.marginTop&&"0px"!==r?.marginTop&&o&&"flex-start"===o?.alignItems&&(t.style.marginTop="0px",n.style.alignItems="center")}}}})();'})),ju,Mu=o((()=>{ju=`window.render=function(e,{mkFrame:n},r){const{safeRenderer:t,...o}=e,i=e.width,d=e.height,c=e.instl;if(null==d){const e=r.document&&r.document.body,n=e&&e.parentElement;e&&e.style&&(e.style.height="100%"),n&&n.style&&(n.style.height="100%")}const a=r.document,l={width:null!=i?i:"100%",height:null!=d?d:"100%"};if(c&&r.frameElement){const e=r.frameElement.style;e.width=i?String(i)+"px":"100vw",e.height=d?String(d)+"px":"100vh"}return"string"!=typeof t.url||""===t.url?Promise.reject(new Error("Prebid SafeRenderer: missing data.safeRenderer.url")):new Promise(function(e,r){const i=n(a,{width:l.width,height:l.height});i.onload=function(){try{const n=i.contentWindow,d=n.document,c=d.createElement("script");c.src=t.url,c.onload=function(){try{const r=n.pbRenderInFrame;if("function"!=typeof r)throw new Error("Prebid SafeRenderer: safeRenderer.url script must define window.pbRenderInFrame as a function.");r.call(n,{config:t.config,...o}),e()}catch(e){r(e)}},c.onerror=function(){r(new Error("Prebid SafeRenderer: failed to load script from safeRenderer.url"))},(d.head||d.body).appendChild(c)}catch(e){r(e)}},i.onerror=function(){r(new Error("Prebid SafeRenderer: iframe failed to load"))},a.body.appendChild(i)})};`})),Nu,Pu,Fu,Iu=o((()=>{Pr(),W(),Au(),Mu(),es(),Vd(),Nu=Y(`sync`,function(e){return ku}),Pu=function(e){return Ed(e)?ju:Nu(e)},Fu=function(){let e={};return function(t){let n=Pu(t);return e.hasOwnProperty(n)||(e[n]=new A(e=>{let r=Ri();r.srcdoc=`