static.criteo.net
Open in
urlscan Pro
2a02:2638:3::3
Public Scan
URL:
https://static.criteo.net/js/ld/publishertag.prebid.157.js
Submission: On October 16 via api from IT — Scanned from FR
Submission: On October 16 via api from IT — Scanned from FR
Form analysis
0 forms found in the DOMText Content
// Hash: P/ebMh/W85U7Fm33cxDgNBg56Q9hOKTFF9e+w+auLMCVOyYF9huDQ9WvSm899Eptk9dMHQfh30+tCcn+Ym0/3uvKjqO7Hy0JvV7ZSWx8BTUMmhOR/g56Yt6G7cH6flZEzGmvMfm5AFRbssod8O+1qZabkeyUlmfJ2wgkFP98ULs= !function(F){var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};function t(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var w=function(){return(w=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function L(e,t){for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(n,e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(n[i],e[n[i]])}function B(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(o<3?r(s):3<o?r(t,i,s):r(t,i))||s);3<o&&s&&Object.defineProperty(t,i,s)}function N(e,t){}function W(e,t){"object"==typeof Reflect&&"function"==typeof Reflect.metadata&&Reflect.metadata(e,t)}function H(e,s,a,c){new(a=a||Promise)(function(i,t){function n(e){try{o(c.next(e))}catch(e){t(e)}}function r(e){try{o(c.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?i(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,r)}o((c=c.apply(e,s||[])).next())})}function q(n,r){var o,s,a,c={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};function e(i){return function(e){var t=[i,e];if(o)throw new TypeError("Generator is already executing.");for(;c;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return c.label++,{value:t[1],done:!1};case 5:c.label++,s=t[1],t=[0];continue;case 7:t=c.ops.pop(),c.trys.pop();continue;default:if(!(a=0<(a=c.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){c=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))c.label=t[1];else if(6===t[0]&&c.label<a[1])c.label=a[1],a=t;else{if(!(a&&c.label<a[2])){a[2]&&c.ops.pop(),c.trys.pop();continue}c.label=a[2],c.ops.push(t)}}t=r.call(n,c)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}e(0),e(1),e(2)}function G(e,t){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}function r(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function z(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}function V(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(z(arguments[t]))}function j(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;for(var n=Array(e),r=0,t=0;t<i;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)n[r]=o[s]}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function K(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=i.apply(e,t||[]),r=[];function o(e){n[e]&&(e,0)}function s(e,t){try{(i=n[e](t)).value instanceof d?Promise.resolve(i.value.v).then(a,c):l(r[0][2],i)}catch(e){l(r[0][3],e)}var i}function a(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}o("next"),o("throw"),o("return"),Symbol.asyncIterator}function X(i){var e;function t(e,t){e,i[e]}t("next"),t("throw",function(e){throw e}),t("return"),Symbol.iterator}function J(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator];function i(e){e,t[e]}e?e.call(t):(t="function"==typeof r?r(t):t[Symbol.iterator](),i("next"),i("throw"),i("return"),Symbol.asyncIterator)}function Y(e,t){Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t}function Q(e){if(!e||!e.__esModule){if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(t,e[t]);0}}function $(e){e&&e.__esModule}function Z(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");t.get(e)}function ee(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");t.set(e,i)}var te=(()=>{function i(){this.allowedPixelLoaded=!1,this.blockedPixelFailed=!1}return i.prototype.isAdBlocked=function(e){var t=this;this.createPixel(i.allowedPixelUrl,function(){(t.allowedPixelLoaded=!0)===t.blockedPixelFailed&&e(!0)},function(){}),this.createPixel(i.blockedPixelUrl,function(){e(!1)},function(){(t.blockedPixelFailed=!0)===t.allowedPixelLoaded&&e(!0)})},i.prototype.createPixel=function(e,t,i){var n=document.createElement("img");n.src=e,n.height=1,n.width=1,n.style.display="none",n.onload=t,n.onerror=i},i.allowedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=1",i.blockedPixelUrl="https://static.criteo.net/images/pixel.gif?ch=2",i})(),ie=(()=>{function t(e){this.timerEnabled=!0,this.timerStarted=!1,this.localStorageHelper=e}return t.create=function(e){return new t(e)},t.prototype.adBlockFlagEnabled=function(){return null!==this.localStorageHelper.getItem(t.ADBLOCK_FLAG_KEY)},t.prototype.enableAdBlockFlag=function(){this.localStorageHelper.setItem(t.ADBLOCK_FLAG_KEY,"1",t.ADBLOCK_FLAG_LIFETIME)},t.prototype.disableAdBlockFlag=function(){this.localStorageHelper.removeItem(t.ADBLOCK_FLAG_KEY)},t.prototype.setAdBlockFlagTimer=function(e){var t=this;this.adBlockFlagEnabled()||!this.timerEnabled||this.timerStarted||(this.timerStarted=!0,setTimeout(function(){t.timerEnabled&&(t.refreshAdblockFlag(),t.timerEnabled=!1)},e))},t.prototype.disableAdBlockFlagTimer=function(){this.timerEnabled=!1,this.adBlockFlagEnabled()&&this.refreshAdblockFlag()},t.prototype.refreshAdblockFlag=function(){var t=this;(new te).isAdBlocked(function(e){e?t.enableAdBlockFlag():t.disableAdBlockFlag()})},t.ADBLOCK_FLAG_KEY="criteo_adblock_flag",t.ADBLOCK_FLAG_LIFETIME=864e5,t})();function ne(){(window.criteo_pubtag_prebid_157||window.criteo_pubtag).context.getIdfs()}function re(e){(window.criteo_pubtag_prebid_157||window.criteo_pubtag).context.setIdfs(e)}function oe(e){(window.criteo_pubtag_prebid_157||window.criteo_pubtag).context.ceh=e}var se=function(){};function o(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}var ae=(i=>{function e(e){var t=i.call(this)||this;return t.document=e,t}return t(e,i),e.prototype.ResizeFrame=function(e,t){var i;this.document.defaultView&&this.document.defaultView.frameElement&&((i=this.document.defaultView.frameElement).width=e.toString(),i.height=t.toString())},e.prototype.Write=function(e){this.document.open(),this.document.write(e),this.document.close()},e.prototype.LoadScript=function(e){this.Write("<script type='text/javascript' src='"+o(e)+"'><\/script>")},e})(se),e=(()=>{function e(e){this.name=e}return e.prototype.eval=function(e){},e})(),i=(i=>{function n(e){var t=i.call(this,n.NAME)||this;return t.callback=e,t}return t(n,i),n.prototype.eval=function(e){this.callback&&this.callback.apply(this)},n.NAME="genericEvent",n})(e),s=(()=>{function e(e,t,i,n,r,o,s,a){this.id=this.generateRandomId(),this.slotId=e,this.impressionId=t,this.cpm=i,this.width=n,this.height=r,this.zoneId=o,this.dealCode=s,this.useSafeframe=null!=a&&a}return e.prototype.generateRandomId=function(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,6)},e})(),v=(l=>{function e(e,t,i,n,r,o,s,a,c){e=l.call(this,e,t,i,n,r,o,a,c)||this;return e.displayUrl=s,e}return t(e,l),e.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new i(function(){return e.LoadScript(t.displayUrl)})},e.prototype.GenerateMessage=function(){return{displayUrl:this.displayUrl}},e})(s),ce=(l=>{function e(e,t,i,n,r,o,s,a,c){e=l.call(this,e,t,i,n,r,o,a,c)||this;return e.creative=s,e}return t(e,l),e.prototype.GenerateEvent=function(e){var t=this;return e.ResizeFrame(this.width,this.height),new i(function(){return e.Write(t.creative)})},e.prototype.GenerateMessage=function(){return{creative:this.creative}},e})(s),c,le=((e=>{e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Debug=2]="Debug"})(c=c||{}),["color: #fff;","background: #ff8f1c;","display: inline-block;","padding: 1px 4px;","border-radius: 3px;"].join(" ")),C=(()=>{function n(){}return n.Log=function(e,t){var i;n.LOGLEVEL<e||(e=c[e].toUpperCase(),i=0<(i=window.navigator.userAgent).indexOf("MSIE ")||0<i.indexOf("Trident/"),window.console&&(i?console.log("[PubTag] ".concat(e,": %O"),t):console.log("%cPubTag",le,"".concat(e,": %O"),t)))},n.Debug=function(e){n.Log(c.Debug,e)},n.Warning=function(e){n.Log(c.Warning,e)},n.Error=function(e){n.Log(c.Error,e)},n.LOGLEVEL=c.Error,n})();function l(e){C.LOGLEVEL=e}var de=(l=>{function e(e,t,i,n,r,o,s,a,c){e=l.call(this,e,t,i,n,r,o,c)||this;return e.nativeCallback=s,e.nativePayload=a,e}return t(e,l),e.prototype.GenerateEvent=function(e){var t=this;return"function"!=typeof this.nativeCallback?(C.Error("'nativeCallback' parameter is not a function in placements object"),new i(void 0)):"object"!=typeof this.nativePayload?(C.Error("'nativePayload' parameter is not an object in placements object"),new i(void 0)):new i(function(){return t.nativeCallback(t.nativePayload)})},e.prototype.GenerateMessage=function(){return{nativePayload:this.nativePayload}},e})(s);function a(e,t){if(e){var i;try{i=eval("(function(){return ".concat(e,"})()"))}catch(e){return void C.Error("Error evaluating the function: "+e)}"function"!=typeof i?C.Error("The passed value is not a function"):i.apply(i,t)}else C.Error("Cannot execute an empty function")}var ue=(u=>{function e(e,t,i,n,r,o,s,a,c,l,d){e=u.call(this,e,t,i,n,r,o,a)||this;return e.videoCallback=s,e.vastUrl=c,e.vastXml=l,e.videoPlayerFunction=d,e}return t(e,u),e.prototype.GenerateEvent=function(e){var t=this;return void 0===this.videoCallback?(a(this.videoPlayerFunction,[{slotid:this.impressionId,vastUrl:this.vastUrl,vastXml:this.vastXml}]),new i(void 0)):"function"!=typeof this.videoCallback?(C.Error("'videoCallback' parameter is not a function in video object"),new i(void 0)):new i(function(){return t.videoCallback(t.GenerateMessage())})},e.prototype.GenerateMessage=function(){return{vastUrl:this.vastUrl,vastXml:this.vastXml,slotid:this.impressionId,cpm:this.cpm}},e})(s);function pe(e,t,i,n,r,o,s,a,c,l,d,u,p,h,f){if(u)return new ue(e,t,i,n,r,o,p,d,c,l,f);if(void 0!==s&&void 0!==a)return new de(e,t,i,n,r,o,s,a,d);if(void 0!==l&&0!==l.indexOf("<script"))return new ce(e,t,i,n,r,o,l,d,h);if(void 0!==l&&0===l.indexOf("<script")){u=new RegExp("(?<=src='|\")(.*)(?='|\")"),p=l.match(u);if(null!==p&&0<p.length)return new v(e,t,i,n,r,o,p[0],d,h)}return void 0!==c?new v(e,t,i,n,r,o,c,d,h):void 0}var _=(()=>{function e(e){this.elapsed=0,this.isTimeout=!1,this.adapterStartElapsed=0,this.cdbCallStartElapsed=0,this.cdbCallEndElapsed=0,this.adapterEndElapsed=0,this.slotIdsMatchedByCache=[],this.events=[],this.metricsManager=e}return e.prototype.getMetricsManager=function(){return this.metricsManager},e.prototype.withElapsed=function(e){return this.elapsed=Math.round(e),this},e.prototype.withIsTimeout=function(e){return(this.isTimeout=e)&&this.events.push({eventId:"CdbCallTimeout"}),this},e.prototype.withAdapterStartElapsed=function(e){return this.adapterStartElapsed=Math.round(e),this.events.push({eventId:"AdapterBidStart",elapsed:this.adapterStartElapsed}),this},e.prototype.withCdbCallStartElapsed=function(e){return this.cdbCallStartElapsed=Math.round(e),this.events.push({eventId:"CdbCallStart",elapsed:this.cdbCallStartElapsed}),this},e.prototype.withCdbCallEndElapsed=function(e){return this.cdbCallEndElapsed=Math.round(e),this.events.push({eventId:"CdbCallEnd",elapsed:this.cdbCallEndElapsed}),this},e.prototype.withAdapterEndElapsed=function(e){return this.adapterEndElapsed=Math.round(e),this.events.push({eventId:"AdapterBidEnd",elapsed:this.adapterEndElapsed}),this},e.prototype.withAdapterTimeout=function(e){return this.adapterTimeout=e&&Math.round(e),this},e.prototype.withTimeToFirstByte=function(e){return this.timeToFirstByte=e&&Math.round(e),this.timeToFirstByte&&this.events.push({eventId:"TimeToFirstByte",elapsed:this.timeToFirstByte}),this},e.prototype.withConnectionEstablishmentTime=function(e){return this.connectionEstablishmentTime=e&&Math.round(e),this.connectionEstablishmentTime&&this.events.push({eventId:"TcpConnectionElapsedTime",elapsed:this.connectionEstablishmentTime}),this},e.prototype.withDomainLookupTime=function(e){return this.domainLookupTime=e&&Math.round(e),this.domainLookupTime&&this.events.push({eventId:"DomainLookupElapsedTime",elapsed:this.domainLookupTime}),this},e.prototype.buildEvents=function(e){if(this.events.length)return e={requestId:e,events:this.events},void 0!==this.adapterTimeout&&this.adapterEndElapsed>this.adapterTimeout&&e.events.push({eventId:"AdapterTimeout"}),e},e.prototype.clear=function(){this.events=[]},e})(),he=(()=>{function e(){}return e.generateCacheBuster=function(){return Math.floor(99999999999*Math.random())},e})(),E;function fe(e){return"amp"!==e.toLowerCase()?E.Unspecified:E.AMP}(e=>{e[e.Unspecified=0]="Unspecified",e[e.AMP=1]="AMP"})(E=E||{});var u=157,ve=184,me=275,ge=334,I=(()=>{function s(e){this.auditMode=e=void 0===e?!1:e}return s.prototype.buildUrl=function(e,t,i,n,r){void 0===i&&(i=E.Unspecified);var o=s.CRITEO_BIDDER_URL+this.getHandlerPath(e,t);return o+="?ptv="+u,!0===t.isAdBlocked&&(o+="&abp=1"),o=this.appendCommonParameters(o,e,n,r),o=(o+=t.isOptOut?"&optout=1":"")+(t.bundle?"&bundle="+t.bundle:""),i!==E.Unspecified&&(o+="&im="+i),o=(o+="&cb="+String(he.generateCacheBuster()))+t.getContextFlags()},s.prototype.buildErrorUrl=function(){return s.CRITEO_BIDDER_URL+s.CRITEO_ERROR_HANDLER},s.prototype.buildCsmEventsUrl=function(){return s.CRITEO_BIDDER_URL+s.CRITEO_CSM_EVENTS_HANDLER},s.prototype.buildCsmCountersUrl=function(){return s.CRITEO_BIDDER_URL+s.CRITEO_CSM_COUNTERS_HANDLER},s.prototype.appendCommonParameters=function(e,t,i,n){return e+="&profileId="+String(t),void 0!==i&&(e+="&av="+String(i)),void 0!==n&&(e+="&wv="+encodeURIComponent(n)),e},s.prototype.getHandlerPath=function(e,t){var i;if(this.auditMode)return s.CRITEO_BIDDER_AUDIT_HANDLER;if(e==ge&&void 0!==t.slotsExt)for(var n in t.slotsExt){n=t.slotsExt[n];if(void 0!==(null==(i=null==n?void 0:n.data)?void 0:i.gtin))return s.CRITEO_COMMERCE_EXPERIENCE_3_HANDLER;if(void 0!==(null==(i=null==n?void 0:n.data)?void 0:i.keyword))return s.CRITEO_COMMERCE_EXPERIENCE_4_HANDLER}return s.CRITEO_BIDDER_HANDLER},s.CRITEO_BIDDER_URL="https://bidder.criteo.com/",s.CRITEO_BIDDER_HANDLER="cdb",s.CRITEO_COMMERCE_EXPERIENCE_3_HANDLER="experiences/2023-10/dynamic-buttons",s.CRITEO_COMMERCE_EXPERIENCE_4_HANDLER="experiences/2023-10/product-recommendation",s.CRITEO_CSM_EVENTS_HANDLER="csm/events",s.CRITEO_CSM_COUNTERS_HANDLER="csm/counters",s.CRITEO_ERROR_HANDLER="error",s.CRITEO_BIDDER_AUDIT_HANDLER="prebid/audit",s})(),p=(()=>{function e(){this.urlBuilder=new I}return e.prototype.sendEventsToBeacon=function(e,t){navigator.sendBeacon&&e&&navigator.sendBeacon(t,JSON.stringify(e))},e})(),S=(i=>{function e(e){var t=i.call(this)||this;return t.localStorageHelper=e,t}return t(e,i),e.prototype.getLocalStorageKeyCount=function(){return this.localStorageHelper.getAllItemsByPrefix("criteo_").length+this.localStorageHelper.getAllItemsByPrefix("cto_").length},e.prototype.sendEvents=function(e,t){this.sendEventsToBeacon(e.buildEvents(t),this.urlBuilder.buildCsmEventsUrl()),e.clear()},e})(p),m=(()=>{function d(){}return d.tryInsertPlaceholder=function(e,t,i){var n,r=document.getElementById(e);return null===r?(C.Warning("Unable to insert ad placeholder : impression id "+e+" not found."),!1):(r.appendChild(this.createPlaceholder()),!(t||!this.isVisible(r))||(this.removePlaceholder(e,i),null!==(t=r.parentElement)&&(n=this.createClone(r),t.insertBefore(n,r),n.appendChild(this.createPlaceholder()),this.isVisible(n)?(i[e]=n,!0):(C.Warning("Ad placeholder created but not visible : can't render."),t.removeChild(n),!1))))},d.isVisible=function(e){return 0!==e.offsetWidth&&0!==e.offsetHeight&&0!==e.getClientRects().length},d.createClone=function(e){var t=e.cloneNode(!1);return t.id=this.generateRandomId(),t.className="","none"===t.style.display&&t.style.removeProperty("display"),"SPAN"===t.tagName&&(t.style.display="block"),e.style.display="none",t},d.generateRandomId=function(){for(var e="1234567890abcdefghijklmnopqrstuvwxyz",t="",i=0;i<20;i++){var n=Math.floor(Math.random()*e.length);t+=e.charAt(n)}return t},d.createPlaceholder=function(){var e=document.createElement("div");return e.style.width="1px",e.style.height="1px",e.style.display="block",e.className=d.PLACEHOLDER_NAME,e},d.removePlaceholder=function(e,t){t=t[e],void 0!==t&&null!==t.parentNode&&t.parentNode.removeChild(t),t=document.getElementById(e);if(null!==t)for(var i=0,n=t.getElementsByClassName(d.PLACEHOLDER_NAME);i<n.length;i++){var r=n[i];null!==r.parentNode&&r.parentNode.removeChild(r)}},d.insertAdIFrame=function(e,t){var i,t=t[e];if(void 0!==t)i=t;else{t=document.getElementById(e);if(null===t)return null;i=t}for(var n=0,r=i.getElementsByClassName(d.PLACEHOLDER_NAME);n<r.length;n++){for(var o=r[n],s=0,a=o.childNodes;s<a.length;s++){var c=a[s];null!==c.parentNode&&c.parentNode.removeChild(c)}var l=this.createAdIFrame();return o.appendChild(l),o.style.width="",o.style.height="",o.style.display="",l}return null},d.createAdIFrame=function(){var e=document.createElement("iframe");return e.scrolling="no",e.marginWidth="0",e.marginHeight="0",e.frameBorder="0",e.style.border="0",e.style.verticalAlign="bottom",e},d.removePlaceholders=function(e,t,i){for(var n=0,r=e;n<r.length;n++){var o=r[n].impId;-1===t.indexOf(o)&&d.removePlaceholder(o,i)}},d.tryInsertPlaceholders=function(e,t,i){for(var n=[],r=0,o=e;r<o.length;r++){var s=o[r],a=s.impId;d.tryInsertPlaceholder(a,t,i)&&n.push(s)}return n},d.PLACEHOLDER_NAME="criteo_placeholder",d})(),ye=(()=>{function t(e,t,i,n,r,o,s,a,c,l,d,u,p,h,f,v,m,g,y,b,w,C){this.slots=e,this.context=t,this.urlBuilder=i,this.profileId=n,this.integrationMode=r||E.Unspecified,this.networkId=o,this.adapterVersion=s,this.privacyWrapper=a,this.wrapperVersion=c,this.viewportComputer=l,this.adapterTimeout=d,this.clientRequestId=u,this.userIds=p,this.auctionStart=h,this.source=f,this.regs=v,this.bcat=m,this.badv=g,this.bapp=y,this.fledgeEnabled=b||!1,this.publisherId=w,this.accountId=C}return t.prototype.isValid=function(){return 0<this.slots.length},t.prototype.getRequest=function(){for(var e=[],t=0,i=this.slots;t<i.length;t++){var n,r=i[t],o={slotid:r.slotId,impid:r.impId};if(void 0!==r.zoneId&&(o.zoneid=r.zoneId),void 0===r.nativeCallback&&!r.native||(o.native=!0),void 0!==r.transactionId&&(o.transactionid=r.transactionId),void 0!==r.publisherSubId&&(o.publishersubid=r.publisherSubId),void 0!==r.sizes){for(var s=[],a=0,c=r.sizes;a<c.length;a++){var l=c[a];s.push(l.width+"x"+l.height)}o.sizes=s}void 0!==r.video&&(n={context:r.video.context,playersizes:this.parsePlayerSizes(r.video.playersize),mimes:r.video.mimes,protocols:r.video.protocols,maxduration:r.video.maxduration,api:r.video.api,skip:r.video.skip,placement:r.video.placement,playbackmethod:r.video.playbackmethod,minduration:r.video.minduration,startdelay:r.video.startdelay,plcmt:r.video.plcmt,w:r.video.w,h:r.video.h,linearity:r.video.linearity,skipmin:r.video.skipmin,skipafter:r.video.skipafter,minbitrate:r.video.minbitrate,maxbitrate:r.video.maxbitrate,delivery:r.video.delivery,pos:r.video.pos,playbackend:r.video.playbackend,adPodDurationSec:r.video.adPodDurationSec,durationRangeSec:r.video.durationRangeSec},o.video=n),void 0!==this.viewportComputer&&void 0!==(n=this.viewportComputer.getSlotPosition(r))&&(o.position={top:n.top,left:n.left}),void 0!==r.ext&&(o.ext=r.ext),void 0!==r.rwdd&&(o.rwdd=r.rwdd),!this.fledgeEnabled&&null!=(r=o.ext)&&r.ae&&delete o.ext.ae,e.push(o)}var d=w(w({},this.context.getUser()),{ceh:this.context.ceh,uspOptout:this.context.ccpaOptout}),u=this.context.getSite(),p=this.context.getApp(),h=this.context.getDevice(),u=(void 0!==this.publisherId&&(void 0!==u?(u.publisher=u.publisher||{},u.publisher.id=this.publisherId):void 0!==p?(p.publisher=p.publisher||{},p.publisher.id=this.publisherId):u={publisher:{id:this.publisherId}}),this.context.getUserExtWithContextualData(),this.context.getPublisherExt(),{publisher:{url:this.context.highestAccessibleUrl},slots:e,user:d,site:u,bcat:this.bcat,badv:this.badv,bapp:this.bapp,app:p,device:h});return void 0!==this.networkId&&(u.publisher.networkid=this.networkId),void 0!==this.accountId&&(u.publisher.id=this.accountId),this.privacyWrapper&&(this.privacyWrapper.gdprConsent&&(u.gdprConsent=this.privacyWrapper.gdprConsent),this.privacyWrapper.ccpaIabConsent&&(d.uspIab=this.privacyWrapper.ccpaIabConsent.uspString),this.privacyWrapper.gppConsent)&&(void 0===this.regs&&(this.regs={}),this.regs.gpp=this.privacyWrapper.gppConsent.gpp,this.regs.gpp_sid=this.privacyWrapper.gppConsent.gppSid),void 0!==this.viewportComputer&&(p=this.viewportComputer.getViewport(),u.viewport={width:p.width,height:p.height,scrollTop:p.scrollTop,scrollLeft:p.scrollLeft}),void 0!==this.adapterTimeout&&(u.tmax=this.adapterTimeout),void 0!==this.auctionStart&&(u.auctionStart=this.auctionStart),void 0!==this.clientRequestId&&(u.id=this.clientRequestId),void 0!==this.userIds&&(u.eids=this.userIds),void 0!==this.source&&(u.source=this.source),void 0!==this.regs&&(u.regs=this.regs),u},t.parsePlayerSize=function(e){return e[0]+"x"+e[1]},t.prototype.parsePlayerSizes=function(e){return e&&(Array.isArray(e[0])?e.map(function(e){return t.parsePlayerSize(e)}):[t.parsePlayerSize(e)])},t.prototype.getUrl=function(){return this.urlBuilder.buildUrl(this.profileId,this.context,this.integrationMode,this.adapterVersion,this.wrapperVersion)},t})();function be(e){var t={slots:void 0,time_to_next_call:0};return void 0!==e.exd&&(void 0!==e.exd.time_to_next_call&&(t.time_to_next_call=e.exd.time_to_next_call),t.slots=e.exd.slots,delete e.exd),t}function T(){var i=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"===e?t:3&t|8).toString(16)})}var we=function(e,t,i,n,r,o,s,a,c,l,d,u){this.slotId=null!=u?u:T().replace(/-/g,""),this.impId=e,this.zoneId=t,this.native=i,this.nativeCallback=n,this.transactionId=r,this.sizes=o,this.publisherSubId=s,this.mediaTypes=a,this.video=c,this.ext=l,this.rwdd=d},Ce=function(e,t,i,n,r,o,s,a,c,l,d,u,p,h,f,v,m,g,y,b,w,C,_,E,I){this.context=e,this.playersize=t,this.mimes=i,this.protocols=n,this.maxduration=r,this.api=o,this.skip=s,this.placement=a,this.playbackmethod=c,this.minduration=l,this.startdelay=d,this.videoCallback=u,this.plcmt=p,this.w=h,this.h=f,this.linearity=v,this.skipmin=m,this.skipafter=g,this.minbitrate=y,this.maxbitrate=b,this.delivery=w,this.pos=C,this.playbackend=_,this.adPodDurationSec=E,this.durationRangeSec=I},h=(()=>{function i(e){(e=void 0===e?!0:e)&&window.performance&&window.performance.now?this.now=window.performance.now.bind(window.performance):Date.now?this.now=Date.now:this.now=function(){return(new Date).getTime()}}return i.CreateRunning=function(){var e=new i;return e.start(),e},i.CreateWithStartTime=function(e){var t=new i(!1);return t.startTime=e,t},i.TimeSincePageLoad=function(){if(window.performance){if(window.performance.now)return window.performance.now();if(window.performance.timing&&window.performance.timing.navigationStart)return(new Date).getTime()-performance.timing.navigationStart}return 0},i.prototype.start=function(){this.startTime=this.now()},i.prototype.elapsed=function(){return this.now()-this.startTime},i})();function _e(e){if(window.performance&&window.performance.getEntries)for(var t=window.performance.getEntries(),i=t.length-1;0<=i;--i){var n=t[i];if(n.name===e&&n.duration)return Math.round(n.duration)}}var Ee=(()=>{function t(e,t,i){this.builder=e,this.timer=void 0!==t?h.CreateWithStartTime(t):h.CreateRunning();e=this.timer.elapsed();this.builder.withAdapterStartElapsed(e),void 0!==i&&this.builder.withAdapterTimeout(i)}return t.prototype.sendRequest=function(e){this.url=e,this.sendTime=h.CreateRunning(),this.builder.withCdbCallStartElapsed(this.timer.elapsed())},t.prototype.requestReceived=function(e){void 0===e&&(e=!1),this.builder.withElapsed(_e(this.url)||this.sendTime.elapsed()),this.builder.withCdbCallEndElapsed(this.timer.elapsed()),this.builder.withIsTimeout(e)},t.prototype.finish=function(){this.builder.withAdapterEndElapsed(this.timer.elapsed());var e=t.getLastCdbTiming();void 0!==e&&(this.builder.withTimeToFirstByte(t.computeTimeToFirstByte(e)),this.builder.withConnectionEstablishmentTime(t.computeConnectionEstablishmentTime(e)),this.builder.withDomainLookupTime(t.computeDomainLookupTime(e)))},t.getLastCdbTiming=function(){var e;return void 0!==window.performance&&void 0!==window.performance.getEntriesByType&&"function"==typeof window.performance.getEntriesByType&&void 0!==(e=window.performance.getEntriesByType("resource"))&&void 0!==(e=e.filter(function(e){return 0<=e.name.indexOf("cdb")}))&&0<e.length?e[e.length-1]:void 0},t.computeTimeToFirstByte=function(e){var t=e.responseStart,e=e.requestStart;if(void 0!==t&&void 0!==e)return t-e},t.computeConnectionEstablishmentTime=function(e){e=e.connectEnd-e.connectStart;return isNaN(e)?void 0:e},t.computeDomainLookupTime=function(e){e=e.domainLookupEnd-e.domainLookupStart;return isNaN(e)?void 0:e},t})(),f=(()=>{function e(e,t){this.width=e,this.height=t}return e.prototype.toString=function(){return"".concat(this.width,"x").concat(this.height)},e})();function Ie(e){var t="number"==typeof window.PREBID_TIMEOUT?window.PREBID_TIMEOUT:void 0;return e&&t?Math.min(e,t):e||t||void 0}var Se=function(e,t){this.top=e,this.left=t},Te=function(e,t,i,n){this.width=e,this.height=t,this.scrollTop=i,this.scrollLeft=n},g=(()=>{function e(){}return e.getHighestAccessibleWindow=function(e){var t=e,i=!1;try{for(;t.parent.document!==t.document;){if(!t.parent.document){i=!0;break}t=t.parent}}catch(e){i=!0}return{topFrame:t,err:i}},e.getHighestAccessibleUrl=function(e){var t,i=e.topFrame;if(!e.err)return i.location.href;try{var n=null==(t=i.top)?void 0:t.location.href;if(n)return n}catch(e){}try{var r=i.location.ancestorOrigins;if(r)return r[r.length-1]}catch(e){}return i.document.referrer},e.inIframe=function(){try{return window.self!==window.top}catch(e){return!0}},e})(),Pe=(()=>{function e(){}return e.prototype.getViewport=function(){var e=g.getHighestAccessibleWindow(window).topFrame,t=e.document,i=e.innerWidth||t.documentElement.clientWidth,e=e.innerHeight||t.documentElement.clientHeight,n=t.documentElement.scrollTop||t.body&&t.body.scrollTop||0,t=t.documentElement.scrollLeft||t.body&&t.body.scrollLeft||0;return new Te(i,e,n,t)},e.prototype.getSlotPosition=function(e){var e=e.impId,e=document.getElementById(e);if(null!==e)return e=e.getBoundingClientRect(),new Se(e.top,e.left)},e})();function Ae(e){try{return e.localStorage}catch(e){}}var xe=(()=>{function e(e,t){this.EXPIRE_SUFFIX="_expires",this.CHECK_STORAGE_KEY="criteo_localstorage_check",this.localStorage=Ae(e||window),this.localStorageEnabled=this.checkLocalStorage(t)}return e.prototype.checkLocalStorage=function(e){if(!this.localStorage)return!1;var t=this.CHECK_STORAGE_KEY;try{return this.checkTcfPurposeOne(e)?(this.localStorage.setItem(t,t),this.localStorage.removeItem(t),!0):(C.Debug("Purpose One not granted"),!1)}catch(e){return!1}},e.prototype.checkTcfPurposeOne=function(e){return!(e&&e.gdprConsent&&e.gdprConsent.purposes)||!0===e.gdprConsent.purposes[1]},e.prototype.removeItem=function(e){this.localStorageEnabled&&(this.localStorage.removeItem(e),this.localStorage.removeItem(e+this.EXPIRE_SUFFIX))},e.prototype.getItem=function(e,t){var i,n;return this.localStorageEnabled?(i=(new Date).getTime(),-1!==(n=(n=this.localStorage.getItem(e+this.EXPIRE_SUFFIX))?parseInt(n,10):-1)&&n<i||t&&(-1===n||t<n-i)?(this.removeItem(e),null):this.localStorage.getItem(e)):null},e.prototype.setItem=function(e,t,i){if(this.localStorageEnabled)try{var n;this.localStorage.setItem(e,t),i&&(n=(new Date).getTime()+i,this.localStorage.setItem(e+this.EXPIRE_SUFFIX,n.toString()))}catch(e){}},e.prototype.getAllItemsByPrefix=function(e){var t=[];if(this.localStorageEnabled)for(var i in localStorage)0===i.indexOf(e)&&t.push(i);return t},e})(),y=(()=>{function s(e,t,i,n){void 0===n&&(n=!0),this.url=e,this.data=t,this.contentType=i,this.withCredentials=n}return s.prototype.send=function(e,t,i,n){var r=void 0!==this.data?"POST":"GET",o=this.getXMLHttpRequest(r,e,t,i,n);void 0!==o?o.send(this.data):void 0!==(o=this.getXDomainRequest(r,e,t,i,n))&&o.send(this.data)},s.prototype.getXMLHttpRequest=function(e,t,i,n,r){var o=new XMLHttpRequest;if("withCredentials"in o)return o.open(e,this.url,!0),o.timeout=r||s.LOCAL_PASSBACK_TIMEOUT,this.contentType?o.setRequestHeader("Content-type",this.contentType):"POST"===e&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.withCredentials=this.withCredentials,o.onload=function(){4===o.readyState&&200===o.status?t(o.responseText):i(o.readyState,o.status)},o.onerror=function(){i(void 0,void 0)},n&&(o.ontimeout=n),o},s.prototype.getXDomainRequest=function(e,t,i,n,r){var o;if("undefined"!=typeof XDomainRequest)return(o=new XDomainRequest).timeout=r||s.LOCAL_PASSBACK_TIMEOUT,o.open(e,this.url),o.onload=function(){void 0!==o.responseText?t(o.responseText):i(void 0,void 0)},o.onerror&&(o.onerror=function(){i(void 0,void 0)}),o.ontimeout&&n&&(o.ontimeout=n),o},s.LOCAL_PASSBACK_TIMEOUT=3e4,s})();function Re(e){try{return JSON.parse(e)}catch(e){}}var De=(()=>{function n(e,t,i){void 0===i&&(i=!1),this.pixelSyncEndpoint="https://ssp-sync.criteo.com/user-sync/pixels",this.pixelSyncTimeout=2e3,this.errorReporter=t,this.onPixelsRetrieved=e,this.debug=i}return n.prototype.retrievePixels=function(e,t){var i=this;new y(this.getUserSyncUrl(e,t)).send(function(e){e&&((e=n.parseUserSyncResponse(e))?i.onPixelsRetrieved(e):i.errorReporter.log("Error","Unable to parse response from user sync"))},function(e,t){C.Warning("User Sync Pixel endpoint error; readyState ".concat(e,"; requestStatus ").concat(t))},function(){C.Warning("User Sync Pixel endpoint timeout")},this.pixelSyncTimeout)},n.prototype.getUserSyncUrl=function(e,t){var i=null==e?void 0:e.gdprConsent,e=null==e?void 0:e.gppConsent,n=[];return null!=i&&i.consentData&&n.push("gdpr=".concat(i.consentData)),null!=i&&i.gdprApplies&&n.push("gdprapplies=".concat(i.gdprApplies)),null!=e&&e.gpp&&n.push("gpp=".concat(e.gpp)),null!=e&&e.gppSid&&e.gppSid.forEach(function(e){n.push("gpp_sid=".concat(e))}),null!=t&&t.country_code&&n.push("countrycode=".concat(t.country_code)),this.debug&&n.push("debug=1"),this.pixelSyncEndpoint+(n.length?"?"+n.join("&"):"")},n.parseUserSyncResponse=function(e){e=Re(e);if(e)return"pixels"in e?Array.isArray(e.pixels)?e.pixels=e.pixels.filter(function(t){try{return new URL(t),!0}catch(e){return C.Warning("Failed to parse User Sync Pixel URL: ".concat(t)),!1}}):(C.Warning("pixels field in user sync response is not an array: ".concat(e.pixels)),e.pixels=[]):e.pixels=[],e;C.Warning("Failed to parse user sync pixel JSON payload")},n})(),ke=(()=>{function s(){}return s.execUserSync=function(e,t,i,n){new De(s.appendUserSyncPixels,e,n=void 0===n?!1:n).retrievePixels(t,i)},s.getOrCreateTagContainer=function(){var e=document.getElementById(s.tagElementName);return e||((e=document.createElement("div")).setAttribute("id",s.tagElementName),e.style.display="none",document.body.appendChild(e),e)},s.appendUserSyncPixels=function(e){if(e.pixels.length)for(var t=s.getOrCreateTagContainer(),i=0,n=e.pixels;i<n.length;i++){var r=n[i],o=new Image;o.src=r,o.alt="",t.appendChild(o)}},s.tagElementName="criteoUserSyncTagsContainer",s})(),Oe=function(e,t,i,n){this.coppa=e,this.gpp=t,this.gpp_sid=i,this.ext=n},Me=280,Ue=5e3,P,Fe=((e=>{e.Native="native",e.Banner="banner",e.Video="video"})(P=P||{}),(()=>{function e(){}return e.prototype.interpretResponse=function(e,t){return[]},e.prototype.handleBidWon=function(){},e.prototype.handleBidTimeout=function(){},e.prototype.handleSetTargeting=function(){},e})()),Le=(()=>{function b(e,t,i,n,r,o){this.utilMethods=o;for(var s,a,c,l,o=window.criteo_pubtag_prebid_157||window.criteo_pubtag,d=(this.clientRequestId=T(),this.privacies={},n.gdprConsent&&(this.privacies.gdprConsent={},void 0!==n.gdprConsent.consentString&&(this.privacies.gdprConsent.consentData=n.gdprConsent.consentString),void 0!==n.gdprConsent.gdprApplies&&(this.privacies.gdprConsent.gdprApplies=!!n.gdprConsent.gdprApplies),this.privacies.gdprConsent.version=n.gdprConsent.apiVersion),this.privacies.ccpaIabConsent={uspString:n.uspConsent},this.regs=new Oe(n.coppa,null==(d=null==(d=n.ortb2)?void 0:d.regs)?void 0:d.gpp,null==(d=null==(d=n.ortb2)?void 0:d.regs)?void 0:d.gpp_sid,null==(d=null==(d=n.ortb2)?void 0:d.regs)?void 0:d.ext),new xe(void 0,this.privacies)),u=(this.timeout=Ie(n.timeout),this.metricsManager=new S(d),this.metricBuilder=new _(this.metricsManager),this.timer=new Ee(this.metricBuilder,n.start,this.timeout),new Pe),p=(this.adBlockFlagManager=ie.create(d),this.adBlockFlagManager.adBlockFlagEnabled()&&(e=Me,o.context.isAdBlocked=!0),this.auctionId=n.auctionId,this.bidRequests=i,(window.Criteo_prebid_157||window.Criteo).prebid_adapters=(window.Criteo_prebid_157||window.Criteo).prebid_adapters||{},((window.Criteo_prebid_157||window.Criteo).prebid_adapters[this.auctionId]=this).slots=[],!0),h=0,f=i;h<f.length;h++){(y=f[h]).bidId&&((window.Criteo_prebid_157||window.Criteo).prebid_adapters[y.bidId]=this);var v=void 0,m=(y.fpd&&y.fpd.context&&(v=y.fpd.context),null!=(m=y.ortb2Imp)&&m.ext&&(null!=v&&v.data&&y.ortb2Imp.ext.data&&(v.data=w(w({},v.data),y.ortb2Imp.ext.data)),v=w(w({},y.ortb2Imp.ext),v)),y.params.ext&&(null!=v&&v.data&&y.params.ext.data&&(v.data=w(w({},v.data),y.params.ext.data)),v=w(w({},y.params.ext),v)),null!=(m=y.nativeOrtbRequest)&&m.assets&&(v=w({assets:y.nativeOrtbRequest.assets},v)),p=this.hasValidNativeParams(y),b.isPrebid3OrAbove(r)),v=this.enrichSlotWithFloors(v,y);this.slots.push(new we(y.adUnitCode,y.params.zoneId,void 0!==y.params.nativeCallback||void 0!==(null==(s=null==y?void 0:y.mediaTypes)?void 0:s.native),y.params.nativeCallback,y.transactionId,this.getSizes(y,m),y.params.publisherSubId,y.mediaTypes,b.getVideoInfoFromBidRequest(y),v,null==(s=y.ortb2Imp)?void 0:s.rwdd,y.bidId)),a=y.params.networkId||a,c=y.schain||c,oe(n.ceh),y.params.integrationMode&&(l=fe(y.params.integrationMode))}p||C.Warning("All native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, privacyLink, privacyIcon)");var g,y,d=new I(!1),i=(0<i.length&&(y=i[0]).userIdAsEids&&0<y.userIdAsEids.length&&(g=y.userIdAsEids),null!=(i=n.ortb2)&&i.user&&o.context.setUser(n.ortb2.user),null!=(i=n.ortb2)&&i.site&&o.context.setSite(n.ortb2.site),null!=(i=n.ortb2)&&i.app&&o.context.setApp(n.ortb2.app),null!=(i=n.ortb2)&&i.device&&o.context.setDevice(n.ortb2.device),{tid:null==(i=null==(i=n.ortb2)?void 0:i.source)?void 0:i.tid,ext:c?{schain:c}:void 0});this.requestBuilder=new ye(this.slots,o.context,d,e,l,a,t,{ccpaIabConsent:this.privacies.ccpaIabConsent,gdprConsent:this.privacies.gdprConsent},r,u,this.timeout,this.clientRequestId,g,n.start,i,this.regs,null==(o=n.ortb2)?void 0:o.bcat,null==(d=n.ortb2)?void 0:d.badv,null==(e=n.ortb2)?void 0:e.bapp,n.fledgeEnabled),this.url=this.requestBuilder.getUrl(),this.fledgeEnabled=!!n.fledgeEnabled}return b.prototype.hasValidNativeParams=function(e){return!(e.nativeParams&&(e.nativeParams.image&&(!0!==e.nativeParams.image.sendId||!0===e.nativeParams.image.sendTargetingKeys)||e.nativeParams.icon&&(!0!==e.nativeParams.icon.sendId||!0===e.nativeParams.icon.sendTargetingKeys)||e.nativeParams.clickUrl&&(!0!==e.nativeParams.clickUrl.sendId||!0===e.nativeParams.clickUrl.sendTargetingKeys)||e.nativeParams.displayUrl&&(!0!==e.nativeParams.displayUrl.sendId||!0===e.nativeParams.displayUrl.sendTargetingKeys)||e.nativeParams.privacyLink&&(!0!==e.nativeParams.privacyLink.sendId||!0===e.nativeParams.privacyLink.sendTargetingKeys)||e.nativeParams.privacyIcon&&(!0!==e.nativeParams.privacyIcon.sendId||!0===e.nativeParams.privacyIcon.sendTargetingKeys)))},b.prototype.buildCdbUrl=function(){return this.url},b.prototype.buildCdbRequest=function(){var e;if(this.requestBuilder.isValid())return e=Math.min((this.timeout||Ue)+1e3,Ue),this.adBlockFlagManager.setAdBlockFlagTimer(e),this.timer.sendRequest(this.url),this.requestBuilder.getRequest();C.Debug("Request ignored because it doesnt contain any slot")},b.GetAllAdapters=function(){return(window.Criteo_prebid_157||window.Criteo).prebid_adapters},b.GetAdapter=function(e){if("string"==typeof e)return new Fe;for(var t=b.GetAllAdapters(),i=0,n=e.bidRequests;i<n.length;i++){var r=n[i];if(null!=r&&r.bidId&&t&&r.bidId in t)return t[r.bidId]}e=e.bidRequests[0].auctionId;return t&&e in t?t[e]:void 0},b.isPrebid3OrAbove=function(e){return null!=e&&(e=parseInt(e,10),!isNaN(e))&&3<=e},b.createCriteoNativeAdWithCallback=function(e,t,i){e=o(e);return window.criteo_prebid_native_slots=window.criteo_prebid_native_slots||{},window.criteo_prebid_native_slots[e]={callback:i,payload:t},'<script type="text/javascript">\n var win = window;\n for (var i = 0; i < 10; ++i) {\n win = win.parent;\n if (win.criteo_prebid_native_slots) {\n var responseSlot = win.criteo_prebid_native_slots["'.concat(e,'"];\n responseSlot.callback(responseSlot.payload);\n break;\n }\n }\n <\/script>')},b.createPrebidNativeAd=function(e){return{sendTargetingKeys:!1,title:e.products[0].title,body:e.products[0].description,sponsoredBy:e.advertiser.description,icon:e.advertiser.logo,image:e.products[0].image,clickUrl:e.products[0].click_url,privacyLink:e.privacy.optout_click_url,privacyIcon:e.privacy.optout_image_url,cta:e.products[0].call_to_action,price:e.products[0].price,impressionTrackers:e.impression_pixels.map(function(e){return e.url})}},b.prototype.getBidRequestForSlot=function(e){for(var t,i,n=0,r=this.bidRequests;n<r.length;n++){var o=r[n];if(o.adUnitCode===e.impid){if(o.params.zoneId&&parseInt(o.params.zoneId,10)===e.zoneid)return o;if(e.native){if(null!=(t=o.mediaTypes)&&t.native||o.nativeParams)return o}else if(e.video){if(null!=(t=o.mediaTypes)&&t.video)return o}else if(null!=(i=o.mediaTypes)&&i.banner)return o}}},b.prototype.getSlotForAdUnitCode=function(e){for(var t=0,i=this.slots;t<i.length;t++){var n=i[t];if(n&&n.impId===e)return n}},b.getVideoInfoFromBidRequest=function(e){var t;if(b.hasVideoMediaType(e))return new Ce(e.mediaTypes.video.context,e.mediaTypes.video.playerSize,e.mediaTypes.video.mimes,e.mediaTypes.video.protocols,e.mediaTypes.video.maxduration,e.mediaTypes.video.api,e.mediaTypes.video.skip||(null==(t=e.params.video)?void 0:t.skip)||0,e.mediaTypes.video.placement||(null==(t=e.params.video)?void 0:t.placement),e.mediaTypes.video.playbackmethod||(null==(t=e.params.video)?void 0:t.playbackmethod),e.mediaTypes.video.minduration||(null==(t=e.params.video)?void 0:t.minduration),e.mediaTypes.video.startdelay||(null==(t=e.params.video)?void 0:t.startdelay)||0,void 0,e.mediaTypes.video.plcmt,e.mediaTypes.video.w,e.mediaTypes.video.h,e.mediaTypes.video.linearity,e.mediaTypes.video.skipmin,e.mediaTypes.video.skipafter,e.mediaTypes.video.minbitrate,e.mediaTypes.video.maxbitrate,e.mediaTypes.video.delivery,e.mediaTypes.video.pos,e.mediaTypes.video.playbackend,e.mediaTypes.video.adPodDurationSec,e.mediaTypes.video.durationRangeSec)},b.hasVideoMediaType=function(e){return 0<(null==(e=null==(e=null==(e=null==e?void 0:e.mediaTypes)?void 0:e.video)?void 0:e.playerSize)?void 0:e.length)},b.prototype.interpretResponse=function(e,t){var i=window.criteo_pubtag_prebid_157||window.criteo_pubtag,n=(this.timer.requestReceived(),this.adBlockFlagManager.disableAdBlockFlagTimer(),be(e)),r={};if(void 0!==n.slots)for(var o=0,s=n.slots;o<s.length;o++)r[(f=s[o]).imp_id]=f;var a=[],c=[];if(e.slots&&Array.isArray(e.slots))for(var l=0,d=e.slots;l<d.length;l++){var u,p,h,f=d[l],v=this.getBidRequestForSlot(f);v?!0===i.context.isAdBlocked?void 0!==(p=pe(f.slotid,f.impid,f.cpm,f.width,f.height,f.zoneid,v.params.nativeCallback,f.native,f.displayurl,f.creative,f.deal,null==(p=r[f.slotid])?void 0:p.enable_safeframe))&&m.tryInsertPlaceholder(v.adUnitCode,!0,i.context.cloneByImpressionId)&&null!=(u=m.insertAdIFrame(v.adUnitCode,i.context.cloneByImpressionId))&&(u=new ae(u.contentDocument),p.GenerateEvent(u).eval(window.criteo_pubtag_prebid_157)):(u=v.bidId,h=f.ttl||r[f.slotid]&&r[f.slotid].ttl||60,p={requestId:u,cpm:f.cpm,currency:f.currency,netRevenue:!0,ttl:h,creativeId:f.creativecode||u,width:f.width,height:f.height,dealId:f.deal},null!=(h=null==(h=e.ext)?void 0:h.paf)&&h.transmission&&null!=(h=null==(h=f.ext)?void 0:h.paf)&&h.content_id&&(h={content_id:f.ext.paf.content_id,transmission:e.ext.paf.transmission},p.meta=w(w({},p.meta),{paf:h})),null!=(h=null==(h=f.ext)?void 0:h.meta)&&h.networkName&&(p.meta=w(w({},p.meta),{networkName:f.ext.meta.networkName})),f.adomain&&(p.meta=w(w({},p.meta),{advertiserDomains:f.adomain})),null!=(h=f.ext)&&h.dsa&&(p.meta=w(w({},p.meta),{dsa:f.ext.dsa})),f.native?v.params.nativeCallback?p.ad=b.createCriteoNativeAdWithCallback(u,f.native,v.params.nativeCallback):(p.native=b.createPrebidNativeAd(f.native),p.mediaType=P.Native):f.video?(p.vastUrl=f.displayurl,p.mediaType=P.Video,"outstream"===(null==(v=null==(h=v.mediaTypes)?void 0:h.video)?void 0:v.context)&&(null!=(h=this.utilMethods)&&h.createOutstreamVideoRenderer&&(p.renderer=null==(v=this.utilMethods)?void 0:v.createOutstreamVideoRenderer(f)),p.renderer=null!=(h=p.renderer)?h:this.createOutstreamVideoRenderer(f))):p.ad=f.creative,a.push(p)):C.Error("Unable to bid request for slot "+f)}return this.fledgeEnabled&&e.ext&&Array.isArray(null==(n=e.ext)?void 0:n.igi)&&e.ext.igi.forEach(function(e){Array.isArray(e.igs)&&e.igs.forEach(function(e){c.push(e)})}),this.timer.finish(),this.metricsManager.sendEvents(this.metricBuilder,this.clientRequestId),!0===e.user_sync&&ke.execUserSync(i.context.remoteLogging,this.privacies,e),c.length?{bids:a,fledgeAuctionConfigs:c}:a},b.prototype.handleBidWon=function(){},b.prototype.handleBidTimeout=function(){this.timer.requestReceived(!0),this.timer.finish(),this.metricsManager.sendEvents(this.metricBuilder,this.clientRequestId)},b.prototype.handleSetTargeting=function(){},b.prototype.onDataDeletionRequest=function(e){var t=(window.criteo_pubtag_prebid_157||window.criteo_pubtag).context,i=t.bundle;t.identityHelper.deleteCriteoUid(),i&&fetch("https://privacy.criteo.com/api/privacy/datadeletionrequest",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publisherUserId:i})})},b.prototype.getBannerSizes=function(e,t){var i;return(null==(i=null==(i=e.mediaTypes)?void 0:i.banner)?void 0:i.sizes)||(t?e.sizes:[])||[]},b.prototype.getNativeSizes=function(e){return(null==(e=null==(e=null==(e=e.mediaTypes)?void 0:e.native)?void 0:e.image)?void 0:e.sizes)||[]},b.prototype.getSizes=function(e,t){t=this.getBannerSizes(e,!t).map(function(e){return new f(e[0],e[1])}),e=this.getNativeSizes(e).map(function(e){return new f(e[0],e[1])});return t.concat(e).filter(function(e,t,i){return i.indexOf(e)===t})},b.prototype.createOutstreamVideoRenderer=function(i){if(void 0!==i.video_callback)return{url:"#",render:function(e,t){a(i.video_callback,[{slotid:i.impid,vastUrl:i.displayurl,vastXml:i.creative,documentContext:t}])},config:{documentResolver:function(e,t,i){return null!=i?i:t}}}},b.prototype.parseSizes=function(e){try{if(e)return 2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]?[new f(e[0],e[1])]:(e||[]).map(function(e){return new f(e[0],e[1])})}catch(e){C.Debug("Could not parse size"+e)}return[]},b.prototype.pickAvailableGetFloorFunc=function(t){if(t.getFloor)return t.getFloor;if(t.params.bidFloor&&t.params.bidFloorCur)try{var i=parseFloat(t.params.bidFloor);return function(e){return{currency:t.params.bidFloorCur,floor:i}}}catch(e){}},b.prototype.enrichSlotWithFloors=function(e,t){var i,n,r,o,s,a,c;try{var l={},d=this.pickAvailableGetFloorFunc(t);void 0!==d&&(null!=(i=t.mediaTypes)&&i.banner&&(l.banner={},this.parseSizes(null==(r=null==(n=t.mediaTypes)?void 0:n.banner)?void 0:r.sizes).forEach(function(e){void 0!==d&&(l.banner[e.toString()]=d.call(t,{size:[e.width,e.height],mediaType:P.Banner}))})),null!=(o=t.mediaTypes)&&o.video&&(l.video={},this.parseSizes(null==(a=null==(s=t.mediaTypes)?void 0:s.video)?void 0:a.playerSize).forEach(function(e){void 0!==d&&(l.video[e.toString()]=d.call(t,{size:[e.width,e.height],mediaType:P.Video}))})),null!=(c=t.mediaTypes)&&c.native&&(l.native={},l.native["*"]=d.call(t,{size:"*",mediaType:P.Native})),Object.keys(l).length)&&(e=w(w({},e),{floors:l}))}catch(e){C.Debug("Could not parse floors from Prebid: "+e)}return e},b})();function b(e){try{return JSON.parse(e)}catch(e){}}var Be=1,A=(()=>{function e(e,t,i){void 0===i&&(i=function(e){}),this.uspapiCallbacks={},this.currentWindow=e,this.timeout=t.uspApiTimeout,this.logger=i}return e.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__uspapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},e.prototype.hasCallerFunctionInWindow=function(){return"function"==typeof this.currentWindow.__uspapi},e.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInWindow()||void 0!==this.getCMPFrame()},e.prototype.retrieveConsent=function(i){var n=this,r=!1,o=window.setTimeout(function(){r=!0,n.logger("Timeout: Unable to resolve CCPA consent after ".concat(n.timeout,"ms")),i(void 0)},this.timeout);this.executeCommand("getUSPData",Be,function(e,t){r||(clearTimeout(o),t?(n.logger("CCPA consent retrieved"),n.processResponseData(e,i)):(n.logger("Error retrieving CCPA consent data from CMP"),i(void 0)))})},e.prototype.processResponseData=function(e,t){e?t(e):(this.logger("Unable to read CCPA consent data from CMP"),t(void 0))},e.prototype.executeCommand=function(e,t,i){var n,r=this;this.hasCallerFunctionInWindow()||(this.logger("No CCPA CMP defined on current frame"),n=this.getCMPFrame(),this.currentWindow.__uspapi=function(e,t,i){n?(t={__uspapiCall:{command:e,parameter:t,callId:e=Math.random().toString(10)}},r.uspapiCallbacks[e]=i,n.postMessage(t,"*")):(r.logger("CCPA CMP not found in any frame"),i({msg:"CCPA CMP not found in any frame"},!1))},this.currentWindow.addEventListener("message",function(e){var e="string"==typeof e.data?b(e.data):e.data;e&&e.__uspapiReturn&&e.__uspapiReturn.callId&&e.__uspapiReturn.returnValue&&(e=e.__uspapiReturn,r.uspapiCallbacks)&&r.uspapiCallbacks[e.callId]&&(r.uspapiCallbacks[e.callId](e.returnValue,e.success),delete r.uspapiCallbacks[e.callId])},!1)),this.currentWindow.__uspapi(e,t,i)},e.prototype.hasUserOptOut=function(e){return!(!e||!e.uspString||"1YNY"===e.uspString.toUpperCase()||"1YNN"===e.uspString.toUpperCase()||"1YN-"===e.uspString.toUpperCase()||"1-N-"===e.uspString.toUpperCase()||"1-NN"===e.uspString.toUpperCase()||"1-NY"===e.uspString.toUpperCase()||"1---"===e.uspString)},e})(),x=(()=>{function e(e,t,i){void 0===i&&(i=function(e){}),this.tcfv1ConsentProvider=e,this.tcfv2ConsentProvider=t,this.logger=i}return e.prototype.getReadyToRetrieveProvider=function(){return this.tcfv2ConsentProvider.hasCallerFunctionInFrame()?this.tcfv2ConsentProvider:this.tcfv1ConsentProvider.hasCallerFunctionInFrame()?this.tcfv1ConsentProvider:void 0!==this.tcfv2ConsentProvider.getCMPFrame()?this.tcfv2ConsentProvider:void 0!==this.tcfv1ConsentProvider.getCMPFrame()?this.tcfv1ConsentProvider:void 0},e.prototype.retrieveConsentForPassback=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),t===this.tcfv1ConsentProvider?this.tcfv1ConsentProvider.retrieveConsentForPassback(e):t===this.tcfv2ConsentProvider&&this.tcfv2ConsentProvider.retrieveConsent(e)},e.prototype.retrieveConsent=function(e){var t=this.getReadyToRetrieveProvider();void 0===t&&(this.logger("No compatible GDPR privacy provider found"),e(void 0)),null!=t&&t.retrieveConsent(e)},e.prototype.readyToRetrieve=function(){return this.tcfv2ConsentProvider.readyToRetrieve()||this.tcfv1ConsentProvider.readyToRetrieve()},e})(),Ne=91,We=(()=>{function e(e,t,i){void 0===i&&(i=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=i}return e.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__cmpLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},e.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__cmp},e.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},e.prototype.pingWithTimeout=function(n,e,t,i){function r(e,t){o.logger(t),clearTimeout(e),i()}var o=this;return window.setTimeout(function(){var i=window.setTimeout(function(){r(n,"Timeout: Unable to get ping return after ".concat(e,"ms"))},e);o.executeCommand("ping",null,function(e,t){clearTimeout(i),t?(o.logger("GDPR CMP ping returned"),!0!==e.cmpLoaded&&r(n,"GDPR ping returned cmpLoaded which is not true"),o.logger("GDPR ping returned cmpLoaded which is true")):r(n,"Error sending ping to GDPR CMP")})},t)},e.prototype.retrieveConsent=function(e){this.executeRetrieveConsent("getConsentData",null,e)},e.prototype.retrieveConsentForPassback=function(e){this.executeRetrieveConsent("getVendorConsents",[Ne],e)},e.prototype.executeRetrieveConsent=function(e,t,i){var n=this,r=!1,o=window.setTimeout(function(){r=!0,n.logger("Timeout: Unable to resolve GDPR consent after ".concat(n.timeout,"ms")),i(void 0)},this.timeout),s=!1!==this.cmpAutoDetect?this.pingWithTimeout(o,this.pingTimeout,this.pingDelay,function(){r=!0,n.logger("Timeout: Unable to ping GDPR API after ".concat(n.pingTimeout,"ms")),i(void 0)}):void 0;this.executeCommand(e,t,function(e,t){clearTimeout(s),r||(clearTimeout(o),t?(n.logger("GDPR consent retrieved"),n.processConsentData(e,i)):(n.logger("Error retrieving GDPR consent data from CMP"),i(void 0)))})},e.prototype.processConsentData=function(e,t){var i;e?(i={},"undefined"===e.consentData&&(e.consentData=""),i.consentData=void 0!==e.consentData?e.consentData:"",void 0!==e.gdprApplies&&(i.gdprApplies=!!e.gdprApplies),t(i)):(this.logger("Unable to read GDPR consent data from CMP"),t(void 0))},e.prototype.executeCommand=function(e,t,i){var n,r=this;this.hasCallerFunctionInFrame()||(this.logger("No GDPR CMP defined on current frame"),n=this.getCMPFrame(),this.currentWindow.__cmp=function(e,t,i){n?(t={__cmpCall:{command:e,parameter:t,callId:e=Math.random().toString(10)}},r.cmpCallbacks[e]=i,n.postMessage(t,"*")):(r.logger("GDPR CMP not found in any frame"),i({msg:"GDPR CMP not found in any frame"},!1))},this.currentWindow.addEventListener("message",function(e){var e="string"==typeof e.data?b(e.data):e.data;e&&e.__cmpReturn&&e.__cmpReturn.callId&&e.__cmpReturn.returnValue&&(e=e.__cmpReturn,r.cmpCallbacks)&&r.cmpCallbacks[e.callId]&&(r.cmpCallbacks[e.callId](e.returnValue,e.success),delete r.cmpCallbacks[e.callId])},!1)),this.currentWindow.__cmp(e,t,i)},e})(),R=2,D,He=((e=>{e.LOADED="tcloaded",e.UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"})(D=D||{}),(()=>{function e(e,t,i){void 0===i&&(i=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.cmpAutoDetect=t.cmpAutoDetect,this.logger=i}return e.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{t.frames.__tcfapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},e.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__tcfapi},e.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},e.prototype.pingWithTimeout=function(i,e,t,n){function r(e,t){o.logger(t),clearTimeout(e),n()}var o=this;return window.setTimeout(function(){var t=window.setTimeout(function(){r(i,"Timeout: Unable to get TCFv2 ping return after ".concat(e,"ms"))},e);o.executeCommand("ping",R,function(e){clearTimeout(t),o.logger("TCFv2 CMP ping returned in ms"),"error"===e.cmpStatus?r(i,"Error status on ping to TCFv2 CMP"):!0!==e.cmpLoaded?r(i,"TCFv2 ping returned cmpLoaded = false"):o.logger("TCFv2 ping returned cmpLoaded = true")})},t)},e.prototype.retrieveConsent=function(i){var n,r,o=this,s=!1,a=window.setTimeout(function(){s=!0,r===D.UI_SHOWN?(o.logger("Timeout: User hasn't confirm their consent settings after ".concat(o.timeout,"ms")),i(n)):(o.logger("Timeout: Unable to resolve TCFv2 consent after ".concat(o.timeout,"ms")),i(void 0))},this.timeout),c=!1!==this.cmpAutoDetect?this.pingWithTimeout(a,this.pingTimeout,this.pingDelay,function(){s=!0,o.logger("Timeout: Unable to ping TCFv2 API after ".concat(o.pingTimeout,"ms")),i(void 0)}):void 0;this.executeCommand("addEventListener",R,function(e,t){clearTimeout(c),s||((r=e.eventStatus)!==D.UI_SHOWN&&clearTimeout(a),t?(o.logger("TCFv2 consent retrieved in ms"),e||(o.logger("Unable to read GDPR consent data from CMP"),i(void 0)),n=o.processResponseData(e),(!1===e.gdprApplies&&void 0===r||r===D.LOADED||r===D.USER_ACTION_COMPLETE)&&i(n)):(o.logger("Error retrieving TCFv2 consent data from CMP"),i(void 0)))})},e.prototype.processResponseData=function(e){var t,i={};return"undefined"===e.tcString&&(e.tcString=""),i.consentData=void 0!==e.tcString?e.tcString:"",void 0!==e.gdprApplies&&(i.gdprApplies=!!e.gdprApplies),i.version=e.tcfPolicyVersion||R,i.purposes=null==(t=null==e?void 0:e.purpose)?void 0:t.consents,i.vendorConsents=null==(t=null==e?void 0:e.vendor)?void 0:t.consents,i},e.prototype.executeCommand=function(e,t,i,n){var r,o=this;this.hasCallerFunctionInFrame()||(this.logger("No TCFv2 CMP defined on current frame"),r=this.getCMPFrame(),this.currentWindow.__tcfapi=function(e,t,i,n){r?(t={__tcfapiCall:{command:e,version:t,parameter:n,callId:e=Math.random().toString(10)}},o.cmpCallbacks[e]=i,r.postMessage(t,"*")):(o.logger("TCFv2 CMP not found in any frame"),i({msg:"TCFv2 CMP not found in any frame"},!1))},this.currentWindow.addEventListener("message",function(e){var e="string"==typeof e.data?b(e.data):e.data;e&&e.__tcfapiReturn&&e.__tcfapiReturn.callId&&e.__tcfapiReturn.returnValue&&(e=e.__tcfapiReturn,o.cmpCallbacks)&&o.cmpCallbacks[e.callId]&&"function"==typeof o.cmpCallbacks[e.callId]&&(o.cmpCallbacks[e.callId](e.returnValue,e.success),e.returnValue.eventStatus!==D.UI_SHOWN)&&delete o.cmpCallbacks[e.callId]},!1)),this.currentWindow.__tcfapi(e,t,i,n)},e})()),qe="1.0",Ge="1.1",k=(()=>{function e(e,t,i){void 0===i&&(i=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.gppTimeout,this.pingTimeout=t.gppPingTimeout,this.pingDelay=t.gppPingDelay,this.logger=i}return e.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,i=0;i<10;++i){try{void 0!==t&&t.frames.__gppLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},e.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__gpp},e.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},e.prototype.retrieveConsent=function(i){function n(e,t){r.logger(t),clearTimeout(e),o=!0,r.logger("Timeout: Unable to ping GPP after ".concat(r.pingTimeout,"ms")),i(void 0)}var r=this,o=!1,s=window.setTimeout(function(){o=!0,r.logger("Timeout: Unable to resolve GPP consent after ".concat(r.timeout,"ms")),i(void 0)},this.timeout);window.setTimeout(function(){var t=window.setTimeout(function(){n(s,"Timeout: Unable to get GPP ping return after ".concat(r.pingTimeout,"ms"))},r.pingTimeout);r.executeCommand("ping",function(e){clearTimeout(t),r.logger("GPP CMP ping has responsed"),e.gppVersion===qe?(r.logger("Detected GPP CMP 1.0"),"error"===e.cmpStatus?n(s,"Error status on ping to GPP CMP"):"loaded"===e.cmpStatus?(r.logger("GPP ping returned cmpStatus = loaded"),r.executeCommand("getGPPData",function(e,t){o||(clearTimeout(s),t?(r.logger("GPP consent retrieved"),r.processResponseData(e,i)):(r.logger("Error retrieving GPP consent data from CMP"),i(void 0)))})):n(s,"GPP ping returned cmpStatus != loaded")):e.gppVersion===Ge?(r.logger("Detected GPP CMP 1.1"),"ready"===e.signalStatus?(clearTimeout(s),r.logger("GPP consent retrieved"),r.processResponseData(e,i)):r.executeCommand("addEventListener",function(e,t){o||"signalStatus"===e.eventName&&"ready"===e.pingData.signalStatus&&(clearTimeout(s),r.logger("GPP consent retrieved"),r.processResponseData(e.pingData,i))})):n(s,"Unknown GPP version "+e.gppVersion)})},this.pingDelay)},e.prototype.processResponseData=function(e,t){var i;e?(i={},void 0!==e.gppString&&(i.gpp=e.gppString),void 0!==e.applicableSections&&(i.gppSid=e.applicableSections),t(i)):(this.logger("Unable to read GPP consent data from CMP"),t(void 0))},e.prototype.executeCommand=function(e,t,i){var n,r=this;this.hasCallerFunctionInFrame()||(this.logger("No GPP CMP defined on current frame"),n=this.getCMPFrame(),this.currentWindow.__gpp=function(e,t,i){n?(i={__gppCall:{command:e,parameter:i,callId:e=Math.random().toString(10)}},r.cmpCallbacks[e]=t,n.postMessage(i,"*")):(r.logger("GPP CMP not found in any frame"),t({msg:"GPP CMP not found in any frame"},!1))},this.currentWindow.addEventListener("message",function(e){var e="string"==typeof e.data?b(e.data):e.data;e&&e.__gppReturn&&e.__gppReturn.callId&&e.__gppReturn.returnValue&&(e=e.__gppReturn,r.cmpCallbacks)&&r.cmpCallbacks[e.callId]&&"function"==typeof r.cmpCallbacks[e.callId]&&(r.cmpCallbacks[e.callId](e.returnValue,e.success),delete r.cmpCallbacks[e.callId])},!1)),this.currentWindow.__gpp(e,t,i)},e})();function ze(e){return{uspApiTimeout:parseInt("50",10),tcfTimeout:parseInt("10000",10),tcfPingTimeout:Math.min(parseInt("10000",10),parseInt("50",10)),tcfPingDelay:Math.min(parseInt("10000",10),parseInt("1000",10)),gppTimeout:parseInt("10000",10),gppPingTimeout:Math.min(parseInt("10000",10),parseInt("50",10)),gppPingDelay:Math.min(parseInt("10000",10),parseInt("1000",10)),cmpAutoDetect:null==e?void 0:e.cmpAutoDetect}}var Ve=(()=>{function e(e){this.publicTopTlds=["co.id","co.il","co.jp","co.kr","co.nz","co.th","co.uk","com.au","com.br","com.mx","com.my","com.pl","com.sg","com.tr","com.vn"],this.cookiesEnabled=this.checkTcfPurposeOne(e)}return e.prototype.checkTcfPurposeOne=function(e){return!(e&&null!=e&&e.gdprConsent&&e.gdprConsent.purposes)||!0===e.gdprConsent.purposes[1]},e.prototype.setCookie=function(e,t,i,n,r){void 0===r&&(r=!1);var o=n||document,s=o.location.hostname,a=new Date,c=(a.setTime(a.getTime()+60*i*60*1e3),"expires="+a.toUTCString());if(r)for(var l=s.split("."),d=1;d<l.length;++d){var u=l.slice(l.length-d-1,l.length).join(".");if(!(-1<this.publicTopTlds.indexOf(u)))try{this.setCookieString(e,t,c,u,o);var p=this.getCookie(e,n);if(p&&p===t)return u}catch(e){}}else this.setCookieString(e,t,c,void 0,o);return s},e.prototype.deleteCookie=function(e,t,i){this.setCookie(e,"",0,t,i=void 0===i?!1:i)},e.prototype.getCookie=function(e,t){if(this.cookiesEnabled)for(var i=0,n=(t||document).cookie.split(";");i<n.length;i++){var r=n[i],o=r.substr(0,r.indexOf("=")).replace(/^\s+|\s+$/g,""),r=r.substr(r.indexOf("=")+1);if(o===e)return decodeURIComponent(r)}},e.prototype.setCookieString=function(e,t,i,n,r){this.cookiesEnabled&&(e=e+"="+encodeURIComponent(t)+";"+i+";",n&&""!==n&&(e+="domain=."+n+";"),r.cookie=e+"path=/")},e})(),je=(()=>{function e(e,t,i,n,r){this.initializing=!1,this.initialized=!1,this.postInitiliazeServicesCallbacks=[],this.topFrame=e||window;e=ze(r),this.ccpaConsentProvider=t||new A(window,e,C.Warning),r=new We(window,e,C.Warning),t=new He(window,e,C.Warning);this.tcfCompatibleConsentProvider=i||new x(r,t,C.Warning),this.gppConsentProvider=n||new k(window,e,C.Warning),this.initializeServices()}return e.prototype.initializeServices=function(){var i=this;this.initializing=!0,this.retrievePrivacyConsent(function(e){var t={localStorageHelper:new xe(i.topFrame,e),privacies:e,ccpaConsentProvider:i.ccpaConsentProvider,gppConsentProvider:i.gppConsentProvider,cookieHelper:new Ve(e)};i.services=t,i.initialized=!0,i.initializing=!1,i.postInitiliazeServicesCallbacks.forEach(function(e){e(t)})})},e.prototype.getServicesAsync=function(e){this.initialized?e(this.services):(this.postInitiliazeServicesCallbacks.push(e),this.initializing||this.initializeServices())},e.prototype.retrievePrivacyConsent=function(t){var e=this.tcfCompatibleConsentProvider.readyToRetrieve(),i=this.ccpaConsentProvider.readyToRetrieve(),n=this.gppConsentProvider.readyToRetrieve(),r=(e||i||n||t(void 0),[]),o=(e&&r.push(x),i&&r.push(A),n&&r.push(k),{});e&&this.tcfCompatibleConsentProvider.retrieveConsent(function(e){o.gdprConsent=e,r.splice(r.indexOf(x),1),0===r.length&&t(o)}),i&&this.ccpaConsentProvider.retrieveConsent(function(e){o.ccpaIabConsent=e,r.splice(r.indexOf(A),1),0===r.length&&t(o)}),n&&this.gppConsentProvider.retrieveConsent(function(e){o.gppConsent=e,r.splice(r.indexOf(k),1),0===r.length&&t(o)})},e})(),Ke=(m=>{function g(e,t,i,n,r,o,s,a,c,l,d,u,p,h,f){var v=m.call(this,g.NAME)||this;return v.profileId=e,v.urlBuilder=t,v.slots=i,v.callbackSuccess=n,v.callbackError=r,v.callbackTimeout=o,v.serviceProvider=s,v.timeout=c,v.networkId=l,v.integrationMode=d,v.adapterVersion=u,v.viewportComputer=p,v.metricsManager=a,v.publisherId=h,v.accountId=f,v.metricsManager&&(v.metricBuilder=new _(v.metricsManager)),v}return t(g,m),g.prototype.getMetricBuilder=function(){return this.metricBuilder},g.prototype.eval=function(e){this.evalWithTimeout(e,void 0)},g.prototype.evalWithTimeout=function(t,i){var n=this;(this.serviceProvider||new je).getServicesAsync(function(e){n.metricsManager||(n.metricsManager=new S(e.localStorageHelper)),n.metricBuilder||(n.metricBuilder=new _(n.metricsManager)),n.innerEval(t,n.metricBuilder,e.privacies,i)})},g.prototype.innerEval=function(n,r,o,e){var s=this,a=T(),t=g.getCriteoAdapterBidRequest(),i=g.getRequestAuctionStart(t),e=e||Ie(t&&t.timeout),c=new Ee(r,i,e),t=new ye(this.slots,n.context,this.urlBuilder,this.profileId,this.integrationMode,this.networkId,this.adapterVersion,o,void 0,this.viewportComputer,e,a,n.context.userIds,Math.round(new Date/1e3),void 0,void 0,void 0,void 0,void 0,void 0,this.publisherId,this.accountId);t.isValid()&&"undefined"!=typeof JSON?(i=t.getRequest(),e=JSON.stringify(w(w({},i),n.context.ortb2Request)),i=t.getUrl(),t=new y(i,e,"application/x-www-form-urlencoded"),c.sendRequest(i),t.send(function(e){try{c.requestReceived();var t=Re(e)||{},i=be(t);void 0!==s.callbackSuccess&&s.callbackSuccess(JSON.stringify(t),i),c.finish(),!0===t.user_sync&&ke.execUserSync(n.context.remoteLogging,o,t),r.getMetricsManager().sendEvents(r,a)}catch(e){s.reportAsyncRequestException(n,"onSuccess",e)}n.context.remoteLogging.sendErrorReport(s.urlBuilder,a),s.metricBuilder=void 0},function(e,t){try{c.requestReceived(),void 0!==s.callbackError&&s.callbackError(e,t),c.finish(),r.getMetricsManager().sendEvents(r,a)}catch(e){s.reportAsyncRequestException(n,"onError",e)}n.context.remoteLogging.sendErrorReport(s.urlBuilder,a),s.metricBuilder=void 0},function(){try{c.requestReceived(!0),void 0!==s.callbackTimeout&&s.callbackTimeout(),c.finish(),r.getMetricsManager().sendEvents(r,a)}catch(e){s.reportAsyncRequestException(n,"onTimeout",e)}n.context.remoteLogging.sendErrorReport(s.urlBuilder,a),s.metricBuilder=void 0},this.timeout)):(C.Debug("Request ignored because it doesnt contain any slot"),this.callbackError(void 0,void 0))},g.prototype.reportAsyncRequestException=function(e,t,i){i=i.stack||i.toString();e.context.remoteLogging.log("Exception","Exception caught in AsyncRequest ".concat(t," callback:\n").concat(i)),C.Error("Error ".concat(t,":\n\t").concat(i))},g.getCriteoAdapterBidRequest=function(){try{return window.pbjs._bidsRequested.find(function(e){return"criteo"===e.bidderCode})}catch(e){}},g.getRequestAuctionStart=function(e){return e&&e.auctionStart},g.NAME="directbidding",g})(e),Xe=(g=>{function y(e,t,i,n,r,o,s,a,c,l,d,u,p,h,f){var v=g.call(this,y.NAME)||this,m=Math.max(10*(c||3e3),3e3);return v.directBiddingEvent=new Ke(e,t,i,function(e,t){return v.onSuccess(e,t)},function(e,t){return v.onError(e,t)},function(){return v.onHttpTimeout()},a,s,m,l,d,u,p,h,f),v.slots=i,v.callbackSuccess=n,v.callbackError=r,v.callbackTimeout=o,v.timeout=0===c?0:c||3e3,v.hasTimeouted=!1,v.hasResponded=!1,v}return t(y,g),y.prototype.eval=function(e){var t=this;setTimeout(function(){return t.onTimeout()},this.timeout),this.directBiddingEvent.evalWithTimeout(e,this.timeout)},y.prototype.onSuccess=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackSuccess(e,t)},y.prototype.onError=function(e,t){this.hasResponded=!0,this.hasTimeouted||this.callbackError(e,t)},y.prototype.onHttpTimeout=function(){this.hasResponded=!0,this.hasTimeouted||this.callbackTimeout()},y.prototype.onTimeout=function(){this.hasResponded||(this.hasTimeouted=!0,this.callbackTimeout())},y.prototype.getMetricBuilder=function(){return this.directBiddingEvent.getMetricBuilder()},y.NAME="directbidding",y})(e);function Je(t){var i="criteo_fast_bid";null===t.getItem(i,864e5)&&new y("https://static.criteo.net/js/ld/publishertag.prebid.157.js",void 0,void 0,!1).send(function(e){t.setItem(i,e,864e5)},function(e,t){C.Error("Could not update FastBid"+(t?" (".concat(t,")"):""))})}function Ye(e){function t(){try{return n.apply(this,arguments)}catch(e){C.Error("Exception caught: "+e.toString())}}var i,n=e;for(i in t.prototype=n.prototype,n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t}function Qe(e){for(var t in e){var i;t in e&&("function"==typeof(i=e[t])?e[t]=Ye(i):"object"==typeof i&&(e[t]=Qe(i)))}return e}function $e(e){var t={push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(void 0!==e)for(var i=0,n=e;i<n.length;i++){var r=n[i];"function"==typeof r&&Ye(r)()}}};return e&&Array.isArray(e)&&t.push.apply(t,e),t}var Ze="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function et(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function tt(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}function it(e,t){return e(t={exports:{}},t.exports),t.exports}function nt(e){e&&e.default}var rt=it(function(e,t){var i;i=function(){function c(e){return"function"==typeof e}var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},n=0,t=void 0,r=void 0,s=function(e,t){u[n]=e,u[n+1]=t,2===(n+=2)&&(r?r(p):F())};var e="undefined"!=typeof window?window:void 0,o=e||{},o=o.MutationObserver||o.WebKitMutationObserver,a="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),l="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var u=new Array(1e3);function p(){for(var e=0;e<n;e+=2)(0,u[e])(u[e+1]),u[e]=void 0,u[e+1]=void 0;n=0}function h(){try{var e=Function("return this")().require("vertx");return void 0!==(t=e.runOnLoop||e.runOnContext)?function(){t(p)}:d()}catch(e){return d()}}var f,v,m,F=void 0;function g(e,t){var i,n=this,r=new this.constructor(w),o=(void 0===r[b]&&k(r),n._state);return o?(i=arguments[o-1],s(function(){return R(o,r,i,n._result)})):A(n,r,e,t),r}function y(e){var t;return e&&"object"==typeof e&&e.constructor===this?e:(S(t=new this(w),e),t)}var F=a?function(){return process.nextTick(p)}:o?(v=0,a=new o(p),m=document.createTextNode(""),a.observe(m,{characterData:!0}),function(){m.data=v=++v%2}):l?((f=new MessageChannel).port1.onmessage=p,function(){return f.port2.postMessage(0)}):(void 0===e&&"function"==typeof et?h:d)(),b=Math.random().toString(36).substring(2);function w(){}var C=void 0,_=1,E=2;function L(e,n,r){s(function(t){var i=!1,e=((e,t,i,n)=>{try{e.call(t,i,n)}catch(e){return e}})(r,n,function(e){i||(i=!0,(n!==e?S:T)(t,e))},function(e){i||(i=!0,P(t,e))},t._label);!i&&e&&(i=!0,P(t,e))},e)}function I(e,t,i){var n,r;t.constructor===e.constructor&&i===g&&t.constructor.resolve===y?(n=e,(r=t)._state===_?T(n,r._result):r._state===E?P(n,r._result):A(r,void 0,function(e){return S(n,e)},function(e){return P(n,e)})):void 0!==i&&c(i)?L(e,t,i):T(e,t)}function S(t,e){if(t===e)P(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof e,null===e||"object"!=i&&"function"!=i)T(t,e);else{i=void 0;try{i=e.then}catch(e){return void P(t,e)}I(t,e,i)}var i}function B(e){e._onerror&&e._onerror(e._result),x(e)}function T(e,t){e._state===C&&(e._result=t,e._state=_,0!==e._subscribers.length)&&s(x,e)}function P(e,t){e._state===C&&(e._state=E,e._result=t,s(B,e))}function A(e,t,i,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+_]=i,r[o+E]=n,0===o&&e._state&&s(x,e)}function x(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n,r=void 0,o=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?R(i,n,r,o):r(o);e._subscribers.length=0}}function R(e,t,i,n){var r=c(i),o=void 0,s=void 0,a=!0;if(r){try{o=i(n)}catch(e){a=!1,s=e}if(t===o)return void P(t,new TypeError("A promises callback cannot return that same promise."))}else o=n;t._state===C&&(r&&a?S(t,o):!1===a?P(t,s):e===_?T(t,o):e===E&&P(t,o))}var D=0;function k(e){e[b]=D++,e._state=void 0,e._result=void 0,e._subscribers=[]}O.prototype._enumerate=function(e){for(var t=0;this._state===C&&t<e.length;t++)this._eachEntry(e[t],t)},O.prototype._eachEntry=function(t,e){var i=this._instanceConstructor,n=i.resolve;if(n===y){var r,o=void 0,s=void 0,a=!1;try{o=t.then}catch(e){a=!0,s=e}o===g&&t._state!==C?this._settledAt(t._state,e,t._result):"function"!=typeof o?(this._remaining--,this._result[e]=t):i===M?(r=new i(w),a?P(r,s):I(r,t,o),this._willSettleAt(r,e)):this._willSettleAt(new i(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},O.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===C&&(this._remaining--,e===E?P(n,i):this._result[t]=i),0===this._remaining&&T(n,this._result)},O.prototype._willSettleAt=function(e,t){var i=this;A(e,void 0,function(e){return i._settledAt(_,t,e)},function(e){return i._settledAt(E,t,e)})};var N=O;function O(e,t){this._instanceConstructor=e,this.promise=new e(w),this.promise[b]||k(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0!==this.length&&(this.length=this.length||0,this._enumerate(t),0!==this._remaining)||T(this.promise,this._result)):P(this.promise,new Error("Array Methods must be provided an Array"))}U.prototype.catch=function(e){return this.then(null,e)},U.prototype.finally=function(t){var i=this.constructor;return c(t)?this.then(function(e){return i.resolve(t()).then(function(){return e})},function(e){return i.resolve(t()).then(function(){throw e})}):this.then(t,t)};var M=U;function U(e){if(this[b]=D++,this._result=this._state=void 0,this._subscribers=[],w!==e){if("function"!=typeof e)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof U))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");var t=this;try{e(function(e){S(t,e)},function(e){P(t,e)})}catch(e){P(t,e)}}}return M.prototype.then=g,M.all=function(e){return new N(this,e).promise},M.race=function(r){var o=this;return i(r)?new o(function(e,t){for(var i=r.length,n=0;n<i;n++)o.resolve(r[n]).then(e,t)}):new o(function(e,t){return t(new TypeError("You must pass an array to race."))})},M.resolve=y,M.reject=function(e){var t=new this(w);return P(t,e),t},M._setScheduler=function(e){r=e},M._setAsap=function(e){s=e},M._asap=s,M.polyfill=function(){var e=void 0;if(void 0!==Ze)e=Ze;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=M},M.Promise=M},e.exports=i()}),ot=rt.polyfill,st=(()=>{function e(){}return e.LoadPolyfills=function(){e.DefineIsArray(),e.DefineIndexOf(),e.DefineFilter(),e.DefinePromise()},e.DefinePromise=function(){window.Promise||ot()},e.DefineIsArray=function(){Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)})},e.DefineIndexOf=function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){if(void 0===t&&(t=0),void 0===this)throw new TypeError("'this' is null or not defined");var i=this.length;if(0!==i&&!(i<=t))for(var n=Math.max(0<=t?t:i-Math.abs(t),0);n<i;){if(n in this&&this[n]===e)return n;n++}return-1})},e.DefineFilter=function(){Array.prototype.filter||(Array.prototype.filter=function(e){if(void 0===this)throw new TypeError;var t=this.length;if("function"!=typeof e)throw new TypeError;for(var i,n=[],r=2<=arguments.length?arguments[1]:void 0,o=0;o<t;o++)o in this&&(i=this[o],e.call(r,i,o,this))&&n.push(i);return n})},e})(),at=function(e,t){this.errorType=e,this.messages=t},ct=function(e,t,i){this.environment=e,this.errors=t,this.requestId=i},lt=(()=>{function e(e){this.messages={},this.environment=e}return e.prototype.withMessage=function(e,t){return e in this.messages||(this.messages[e]=new Array),this.messages[e].push(t),this},e.prototype.withRequestId=function(e){return this.requestId=e,this},e.prototype.build=function(){var e,t=Array();for(e in this.messages)null!=e&&t.push(new at(e,this.messages[e]));return new ct(this.environment,t,this.requestId)},e})(),dt=(()=>{function i(e){void 0===e&&(e=!1),this.builder=new lt(i.environment),this.shouldSend=!1,this.debug=e}return i.prototype.reportPending=function(){return this.shouldSend},i.prototype.sendErrorReport=function(e,t){this.shouldSend&&(void 0!==t&&this.builder.withRequestId(t),t=this.builder.build(),e=e.buildErrorUrl(),e+=this.debug?"?debug=1":"",t=JSON.stringify(t),navigator.sendBeacon&&navigator.sendBeacon(e,t),this.shouldSend=!1,this.builder=new lt(i.environment))},i.prototype.log=function(e,t){this.shouldSend=!0,this.builder.withMessage(e,t)},i.environment="PublisherTag Version ".concat(u),i})(),O;function ut(t,i){try{return decodeURIComponent(t)}catch(e){return void 0!==i?i:t}}function pt(e){var t=document.createElement("a");return t.href=e,{protocol:t.protocol,host:t.host,hostname:t.hostname,pathname:"/"===t.pathname[0]?t.pathname.slice(1):t.pathname,search:t.search,href:t.href}}function ht(e,t){var i=document.createElement("a"),e=(t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?i.href=e:i.href=decodeURIComponent(e),t&&"decodeSearchAsString"in t&&t.decodeSearchAsString);i.href,(i.protocol||"").replace(/:$/,""),i.hostname,i.port,i.pathname.replace(/^(?!\/)/,"/"),e?i.search:mt(i.search||""),(i.hash||"").replace(/^#/,""),i.host||window.location.host}function ft(t){return Object.keys(t).map(function(e){return"".concat(e,"=").concat(t[e])}).join("&")}function vt(e){e.protocol,e.host||(e.hostname,e.port&&":".concat(e.port)),e.search&&"?".concat(ft(e.search||"")),e.hash&&"#".concat(e.hash)}function mt(e){return e?e.replace(/^\?/,"").split("&").reduce(function(e,t){var t=t.split("="),i=t[0],t=t[1];return/\[\]$/.test(i)||(e[i]=t||""),e},{}):{}}function gt(e){var t={},e=e.split("?");if(1<e.length)for(var i=0,n=e[1].split("&");i<n.length;i++){var r=n[i].split("=");t[ut(r[0])]=ut(r[1])}return t}function yt(e){try{Boolean(new URL(e))}catch(e){}}(e=>{e[e.InFriendlyIframe=1]="InFriendlyIframe",e[e.InUnfriendlyIframe=2]="InUnfriendlyIframe",e[e.DirectIntegration=3]="DirectIntegration"})(O=O||{});var bt=(()=>{function e(e){this.window=e}return e.prototype.getUserContextualData=function(){var e;return{data:{contentLanguage:this.getContentLanguage(),navigatorLanguage:null==(e=null==(e=this.window)?void 0:e.navigator)?void 0:e.language,orientation:this.getOrientation(),windowInnerWidth:null==(e=this.window)?void 0:e.innerWidth,windowInnerHeight:null==(e=this.window)?void 0:e.innerHeight,pageWidth:null==(e=null==(e=null==(e=this.window)?void 0:e.document)?void 0:e.documentElement)?void 0:e.scrollWidth,pageHeight:null==(e=null==(e=null==(e=this.window)?void 0:e.document)?void 0:e.documentElement)?void 0:e.scrollHeight,sessionDuration:h.TimeSincePageLoad()},device:{w:null==(e=null==(e=this.window)?void 0:e.screen)?void 0:e.width,h:null==(e=null==(e=this.window)?void 0:e.screen)?void 0:e.height}}},e.prototype.getOrientation=function(){var e;return((null==(e=null==(e=this.window)?void 0:e.screen)?void 0:e.orientation)||{}).type||(null==(e=null==(e=this.window)?void 0:e.screen)?void 0:e.mozOrientation)||(null==(e=null==(e=this.window)?void 0:e.screen)?void 0:e.msOrientation)},e.prototype.getContentLanguage=function(){var e,t=null==(t=null==(t=null==(t=this.window)?void 0:t.document)?void 0:t.documentElement)?void 0:t.lang;return t=t||"function"!=typeof(null==(e=null==(e=this.window)?void 0:e.document)?void 0:e.querySelector)?t:null==(e=this.window.document.querySelector('meta[http-equiv="Content-Language"]'))?void 0:e.content},e})(),wt=(i=>{function e(e){var t=i.call(this)||this;return t.context=e,t}return t(e,i),e.prototype.sendEvents=function(e){e={requestId:this.context.getClientSessionId(),events:[e]};this.context.isEligibleForCsmEvents()&&this.sendEventsToBeacon(e,this.urlBuilder.buildCsmEventsUrl())},e})(p),M,Ct,_t=((e=>{e[e.None=0]="None",e[e.Cookie=1]="Cookie",e[e.LocalStorage=2]="LocalStorage",e[e.Delegation=4]="Delegation"})(M=M||{}),(e=>{e[e.Unknown=0]="Unknown",e[e.Deactivated=1]="Deactivated",e[e.Activated=2]="Activated"})(Ct=Ct||{}),(()=>{function e(e){this.userDataHandlers=e}return e.prototype.getLocalWebId=function(){return this.userDataHandlers.localWebId().fromAllStorages()},e.prototype.getOptOut=function(){return this.userDataHandlers.optOut().fromAllStorages()},e.prototype.getBundle=function(){return this.userDataHandlers.bundle().fromAllStorages()},e})()),Et=(()=>{function t(e,t){this.value=e,this.origin=t}return t.fromUserIdentificationData=function(e){return new t(e.value,e.origin)},t.fromValue=function(e){return new t(e,M.None)},t.prototype.hasValue=function(){return""!==String(this.value)&&null!=this.value},t})(),It=(o=>{function e(e,t,i,n,r){i=o.call(this,i,n)||this;return i.storageKey=e,i.expirationTimeHours=t,i.storageAdapter=r,i}return t(e,o),e.prototype.hasValue=function(){return""!==String(this.value)&&null!=this.value},e.prototype.saveOnAllStorages=function(){var e;this.hasValue()&&(e="boolean"==typeof this.value?this.value?"1":"0":String(this.value),this.storageAdapter.writeToAllStorages(this.storageKey,e,this.expirationTimeHours))},e.prototype.toJSON=function(){return{value:this.value,origin:this.origin}},e})(Et),St=(()=>{function t(e){this.storageAdapter=e}return t.prototype.localWebId=function(){return this.createGuid(t.LWID_COOKIE_NAME)},t.prototype.optOut=function(){return new Tt(Boolean,t.OPTOUT_COOKIE_NAME,t.OPTOUT_RETENTION_TIME_HOUR,this.storageAdapter)},t.prototype.bundle=function(){return this.createGuid(t.BUNDLE_COOKIE_NAME)},t.prototype.createGuid=function(e){return new Tt(String,e,t.GUID_RETENTION_TIME_HOUR,this.storageAdapter)},t.LWID_COOKIE_NAME="cto_lwid",t.OPTOUT_COOKIE_NAME="cto_optout",t.BUNDLE_COOKIE_NAME="cto_bundle",t.GUID_RETENTION_TIME_HOUR=9360,t.OPTOUT_RETENTION_TIME_HOUR=43200,t})(),Tt=(()=>{function e(e,t,i,n){this.type=e,this.storageKey=t,this.expirationTimeHours=i,this.storageAdapter=n}return e.prototype.fromAllStorages=function(){var e=this.storageAdapter.readFromAllStorages(this.storageKey),t="boolean"==typeof(new this.type).valueOf()?"1"===e.value:e.value;return this.create(t,e.origin)},e.prototype.fromValue=function(e){return this.create(e,M.None)},e.prototype.removeFromAllStorages=function(){this.storageAdapter.removeFromAllStorages(this.storageKey)},e.prototype.create=function(e,t){return new It(this.storageKey,this.expirationTimeHours,e,t,this.storageAdapter)},e})(),Pt=(()=>{function e(e,t,i){this.criteoGlobalVendorListId=91,this.window=e,this.document=e.document,this.userDataHandlers=new St(t),this.syncframeOrigin="https://".concat(i=null!=i?i:"gum.criteo.com"),this.syncframeEndpoint="https://".concat(i,"/syncframe"),this.window.criteo_syncframe_state||(this.window.criteo_syncframe_state={syncframeRequested:!1}),this.window.criteo_syncframe_state.appendSyncframeRequestQueue||(this.window.criteo_syncframe_state.appendSyncframeRequestQueue=[])}return e.prototype.getSyncframeListener=function(i,n){var r=this;return function(e){var t;r.discardMessageFromOtherFrames(e)&&!r.window.criteo_syncframe_state.ForceSyncframeMessageHandling||(null==(t=e.data)?void 0:t.requestId)===i&&(e.stopImmediatePropagation(),r.handleSyncframeResponse(t,n),r.window.criteo_syncframe_state.firstSyncframeCompleted=!0,r.window.criteo_syncframe_state.syncframeRequested=!1,r.tryUnqueueAppendSyncframeRequests())}},e.prototype.userBundleHasAlreadyBeenRetrieved=function(){return this.userDataHandlers.bundle().fromAllStorages().hasValue()},e.prototype.canDropSyncframe=function(){return!this.window.criteo_syncframe_state.syncframeRequested},e.prototype.discardMessageFromOtherFrames=function(e){return!e.data||e.origin!=this.syncframeOrigin},e.prototype.appendGumIframeIfDoesNotExist=function(e,t,i){var n,r=this;!0===(null==(n=this.window.criteo_syncframe_state)?void 0:n.firstSyncframeCompleted)||this.userBundleHasAlreadyBeenRetrieved()||this.canDropSyncframe()?this.appendGumIframe(e,t,i):this.queueAppendSyncframeRequest(function(){return r.appendGumIframeIfDoesNotExist(e,t,i)})},e.prototype.doOnCompletedDom=function(e){var t,i=this;this.window.addEventListener&&("complete"===this.document.readyState?e():(t=function(){i.window.removeEventListener("load",t),i.document.removeEventListener("DOMContentLoaded",t),e()},this.window.addEventListener("load",t,!1),this.document.addEventListener("DOMContentLoaded",t,!1)))},e.prototype.appendGumIframe=function(e,t,i){t();t=e();this.consentAllowsSyncframeToBeDropped(t.consent)?(this.window.addEventListener("message",this.getSyncframeListener(t.requestId,i),!0),e=this.createIFrame(t),this.document.body.appendChild(e),this.window.criteo_syncframe_state.syncframeRequested=!0):this.handleSyncframeResponse({},i)},e.prototype.consentAllowsSyncframeToBeDropped=function(e){return 2!==(null==e?void 0:e.gdprVersion)||!0!==(null==e?void 0:e.gdprApplies)||!0===(null==(e=null==e?void 0:e.vendorConsents)?void 0:e[this.criteoGlobalVendorListId])},e.prototype.queueAppendSyncframeRequest=function(e){void 0!==this.window.criteo_syncframe_state.appendSyncframeRequestQueue&&this.window.criteo_syncframe_state.appendSyncframeRequestQueue.push(e)},e.prototype.tryUnqueueAppendSyncframeRequests=function(){for(var e,t,i=null==(e=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)?void 0:e.shift();void 0!==i;)i(),i=null==(t=this.window.criteo_syncframe_state.appendSyncframeRequestQueue)?void 0:t.shift()},e.prototype.createIFrame=function(e){var t=this.document.createElement("iframe"),i={lwid:e.localWebId,bundle:e.bundle,optout:e.optoutCookie,tld:e.topLevelDomain,topUrl:e.topUrl,version:"string"==typeof e.version?null==(i=e.version)?void 0:i.replace(/\./g,"_"):e.version,cw:e.canWriteCookie,lsw:e.canWriteLocalStorage,origin:e.origin,pm:e.privateMode,rtusCallerId:e.rtusCallerId,requestId:e.requestId},n=[];return n.push("origin=".concat(e.origin)),n.push("topUrl=".concat(e.topUrl)),e.consent&&(void 0!==e.consent.gdprApplies&&n.push("gdpr=".concat(e.consent.gdprApplies?1:0)),void 0!==e.consent.consentData&&n.push("gdpr_consent=".concat(e.consent.consentData)),void 0!==e.consent.uspString&&n.push("us_privacy=".concat(e.consent.uspString)),void 0!==e.consent.gppString&&n.push("gpp=".concat(e.consent.gppString)),void 0!==e.consent.gppSectionIds)&&n.push("gpp_sid=".concat(e.consent.gppSectionIds)),e.isDebug&&n.push("debug=1"),t.src="".concat(this.syncframeEndpoint,"?").concat(n.join("&"),"#").concat(JSON.stringify(i)),t.width="0",t.height="0",t.frameBorder="0",t.style.borderWidth="0px",t.style.margin="0px",t.style.display="none",t.setAttribute("sandbox","allow-scripts allow-same-origin"),t.title="Criteo GUM iframe",t},e})(),At=(n=>{function e(e,t,i){t=n.call(this,t,e.storageAdapter,(i=void 0===i?!1:i)?"gumi.criteo.com":"gum.criteo.com")||this;return t.adapter=e,t}return t(e,n),e.prototype.handleSyncframeResponse=function(e,t){var i;if(e.optout)this.deleteUserData(),this.userDataHandlers.optOut().fromValue(!0).saveOnAllStorages(),null!=(i=null==t?void 0:t.resolve)&&i.call(t,"");else{if(e.callbacks)for(var n=0,r="string"==typeof e.callbacks?[e.callbacks]:e.callbacks;n<r.length;n++){var o=r[n],s=this.document.createElement("img");s.style.display="none",s.width=1,s.height=1,s.setAttribute("data-owner","criteo-tag"),s.src=o}else e.bundle&&this.userDataHandlers.bundle().fromValue(e.bundle).saveOnAllStorages();null!=t&&t.resolve&&t.resolve(e.bundle||"")}},e.prototype.appendGumIFrameOnCompletedDomIfItDoesNotExist=function(e,t){function i(){return n.appendGumIframeIfDoesNotExist(function(){return n.createSyncframeRequest(e(),r)},function(){},{resolve:t})}var n=this,r=Math.random().toString();this.adapter.isPubTagIds?i():this.doOnCompletedDom(i)},e.prototype.createSyncframeRequest=function(e,t){return{localWebId:this.userDataHandlers.localWebId().fromAllStorages().toJSON(),bundle:this.userDataHandlers.bundle().fromAllStorages().toJSON(),optoutCookie:this.userDataHandlers.optOut().fromAllStorages().toJSON(),topLevelDomain:e.topLevelDomain,topUrl:e.topUrl,version:e.version,canWriteCookie:e.canWriteCookie,canWriteLocalStorage:e.canWriteLocalStorage,origin:this.adapter.isPubTagIds?"publishertagids":"publishertag",privateMode:void 0,consent:e.consent,rtusCallerId:void 0,isDebug:this.adapter.isDebug,requestId:t}},e.prototype.fetchUserData=function(){return new _t(this.userDataHandlers)},e.prototype.deleteUserData=function(){this.userDataHandlers.bundle().removeFromAllStorages()},e})(Pt),xt=(()=>{function t(e,t,i,n,r,o,s){var a=this,e=(this.topDoc=i.document,this.cookieHelper=e,this.localStorageHelper=t,this.canWriteCookies=this.checkCookiesAreWriteable(),this.topUrl=r,!1);try{e=JSON.parse("false")}catch(e){}this.syncframe=null!=s?s:new At({storageAdapter:{readFromAllStorages:function(e){e=a.getFromAllStorages(e);return{value:e.value,origin:e.origin}},writeToAllStorages:function(e,t,i){a.writeOnAllStorages(e,t,i)},removeFromAllStorages:function(e){a.deleteFromAllStorage(e)}},isPubTagIds:null!=o&&o,isDebug:n},i,e)}return t.prototype.synchronizeCriteoUid=function(e,t){var i=this,n=null==e?void 0:e.gdprConsent,r=null==e?void 0:e.gppConsent;this.syncframe.appendGumIFrameOnCompletedDomIfItDoesNotExist(function(){var e;return{topLevelDomain:i.getTld(),topUrl:encodeURIComponent(pt(i.topUrl).hostname),version:u,canWriteCookie:i.canWriteCookies,canWriteLocalStorage:i.localStorageHelper.localStorageEnabled,consent:{gdprApplies:null==n?void 0:n.gdprApplies,consentData:null==n?void 0:n.consentData||"",gdprVersion:null==n?void 0:n.version,vendorConsents:null==n?void 0:n.vendorConsents,gppString:null==r?void 0:r.gpp,gppSectionIds:null==(e=null==r?void 0:r.gppSid)?void 0:e.join(",")}}},t)},t.prototype.checkCookiesAreWriteable=function(){var e="cto_writeable",t=(this.cookieHelper.setCookie(e,"1",1,this.topDoc,!0),"1"===this.cookieHelper.getCookie(e,this.topDoc));return this.cookieHelper.deleteCookie(e,this.topDoc,!0),t},t.prototype.writeOnAllStorages=function(e,t,i){this.localStorageHelper.setItem(e,t),this.cookieHelper.setCookie(e,t,i,this.topDoc,!0)},t.prototype.getFromAllStorages=function(e){var t=this.cookieHelper.getCookie(e,this.topDoc),e=this.localStorageHelper.getItem(e)||void 0;return{value:t||e,origin:(t&&M.Cookie)|(e&&M.LocalStorage)}},t.prototype.deleteFromAllStorage=function(e){this.cookieHelper.deleteCookie(e,this.topDoc,!0),this.localStorageHelper.removeItem(e)},t.prototype.getTld=function(){var e=this.cookieHelper.setCookie(t.TLD_TEST_COOKIE_NAME,"test",1,this.topDoc,!0);return this.cookieHelper.deleteCookie(t.TLD_TEST_COOKIE_NAME,this.topDoc,!0),e},t.prototype.fetchUserData=function(){return this.syncframe.fetchUserData()},t.prototype.deleteUserData=function(){this.syncframe.deleteUserData()},t.TLD_TEST_COOKIE_NAME="cto_pub_test_tld",t})(),Rt=(()=>{function e(e,t,i,n){this.highestAccessibleWindowStruct=g.getHighestAccessibleWindow(e),this.highestAccessibleUrl=g.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);e=gt(this.highestAccessibleUrl);this.debugMode="1"===e.pbt_debug||!1,this.debugMode&&l(c.Debug),this.cookieSynchronizerFactory=t,this.serviceProvider=i||new je(this.highestAccessibleWindowStruct.topFrame,void 0,void 0,void 0,n)}return e.prototype.synchronizeCriteoUid=function(e,t,i,n){var r=(null==(r=this.cookieSynchronizerFactory)?void 0:r.call(this))||new xt(t,e,this.highestAccessibleWindowStruct.topFrame,this.debugMode,this.highestAccessibleUrl,!1),t=r.fetchUserData();i("",t.getOptOut().value,"",t.getBundle().value),r.synchronizeCriteoUid(n)},e.prototype.getServicesAndSyncCriteoUid=function(i){var n=this;void 0===i&&(i=function(e,t,i,n){}),this.serviceProvider.getServicesAsync(function(e){var t;(null==(t=e.ccpaConsentProvider)?void 0:t.hasUserOptOut(null==(t=e.privacies)?void 0:t.ccpaIabConsent))||n.synchronizeCriteoUid(e.localStorageHelper,e.cookieHelper,i,e.privacies)})},e.prototype.deleteCriteoUid=function(){var i=this;this.serviceProvider.getServicesAsync(function(e){var t;((null==(t=i.cookieSynchronizerFactory)?void 0:t.call(i))||new xt(e.cookieHelper,e.localStorageHelper,i.highestAccessibleWindowStruct.topFrame,i.debugMode,i.highestAccessibleUrl,!1)).deleteUserData()})},e})(),Dt=(()=>{function e(e,t,i,n,r,o,s,a){void 0===s&&(s=(new Date).getUTCMilliseconds()),void 0===a&&(a=T()),this.cloneByImpressionId={},this.sessionRandomId=s,this.clientSessionId=a,this.contextMetricsManager=new wt(this),this.charset=e.charset||e.characterSet||"",this.highestAccessibleWindowStruct=g.getHighestAccessibleWindow(t),this.displayContext=this.getDisplayContext(this.highestAccessibleWindowStruct),this.highestAccessibleUrl=g.getHighestAccessibleUrl(this.highestAccessibleWindowStruct);s=gt(this.highestAccessibleUrl);this.debugMode="1"===s.pbt_debug||!1,this.noLog="1"===s.pbt_nolog||!1,this.remoteLogging=new dt(this.debugMode),this.debugMode&&l(c.Debug),this.location=t.location,this.dising=!1,this.ct0=void 0,this.wpdt0=void 0,this.isAdBlocked=void 0,this.rtaVarNames=[],this.identityHelper=new Rt(t,i,n,r),this.serviceProvider=this.identityHelper.serviceProvider,this.synchronizeCriteoUid(),this.userContextualDataManager=o||new bt(t)}return e.prototype.getContextFlags=function(){var e="";return(e+=this.debugMode?"&debug=1":"")+(this.noLog?"&nolog=1":"")},e.prototype.isEligibleForCsmEvents=function(){return this.sessionRandomId%100==0},e.prototype.getClientSessionId=function(){return this.clientSessionId},e.prototype.getMetricsManager=function(){return this.contextMetricsManager},e.prototype.getDisplayContext=function(e){return g.inIframe()?e.err?O.InUnfriendlyIframe:O.InFriendlyIframe:O.DirectIntegration},e.prototype.synchronizeCriteoUid=function(){var r=this;this.identityHelper.getServicesAndSyncCriteoUid(function(e,t,i,n){r.isOptOut=t,r.bundle=n})},e.prototype.getIdfs=function(){return""},e.prototype.setIdfs=function(e){},e.prototype.setSite=function(e){this.site=e},e.prototype.getSite=function(){return this.site},e.prototype.setApp=function(e){this.app=e},e.prototype.getApp=function(){return this.app},e.prototype.setDevice=function(e){this.device=e},e.prototype.getDevice=function(){return this.device},e.prototype.setUser=function(e){this.user=e},e.prototype.getPublisherExt=function(){return{}},e.prototype.getUserExtWithContextualData=function(){return{}},e.prototype.getUser=function(){var e,t=this.user||{},i=this.userContextualDataManager.getUserContextualData();return null!=i&&i.data&&(e=w(w({},null==(e=t.ext)?void 0:e.data),i.data),t.ext=w(w({},t.ext),{data:e})),null!=i&&i.device&&(e=w(w({},null==(e=t.ext)?void 0:e.device),i.device),t.ext=w(w({},t.ext),{device:e})),null!=(i=this.device)&&i.sua&&(t.ext=w(w({},t.ext),{sua:this.device.sua})),t},e})(),kt=function(){this.bids={},this.lineItemRanges=[],this.impIds=[]};function Ot(e){return"conditionalEvent"===e.name}var Mt=(()=>{function e(e){var t;void 0===e&&(e=null==(t=window.Criteo_prebid_157||window.Criteo)?void 0:t.config),this.standaloneBidder=new kt,this.events=[],this.context=new Dt(document,window,void 0,void 0,e),C.Debug("Publisher Tag loaded")}return e.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=0,n=e;i<n.length;i++)this.events.push(n[i]);this.evalEvents()},e.prototype.evalEvents=function(){for(var e=0;e<this.events.length;){var t=this.events[e];if(Ot(t)&&!t.canEval())e++;else{t=this.events.splice(e,1);try{t[0].eval(this)}catch(e){C.Error("An exception occurred processing an event: "+e.toString())}}}},e.VERSION=u,e})();function Ut(e){window.criteo_pubtag&&window.criteo_pubtag.context&&"serviceProvider"in window.criteo_pubtag.context||(st.LoadPolyfills(),window.criteo_pubtag=new Mt,window.criteo_pubtag_prebid_157=window.criteo_pubtag),window.Criteo=Ft(window.Criteo||{},e),window.Criteo_prebid_157=window.Criteo,C.Debug("Publisher Tag initialized with window.criteo_pubtag|criteo_pubtag_prebid_157, window.Criteo|Criteo_prebid_157")}function Ft(e,t){if(U(e)&&U(t))for(var i in t)U(t[i])?!U(e[i])&&void 0!==e[i]||(U(e[i])||(e[i]={}),Ft(e[i],t[i])):void 0===e[i]&&(e[i]=t[i]);return e}function U(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Lt(){var e;Ut(Qe({PubTag:{Adapters:{Prebid:Le},DirectBidding:{DirectBiddingEvent:Xe,DirectBiddingSlot:we,DirectBiddingUrlBuilder:I,Size:f}},events:null!=(e=null==(e=window.Criteo)?void 0:e.events)?e:[],passbackEvents:null!=(e=null==(e=window.Criteo)?void 0:e.passbackEvents)?e:[],usePrebidEvents:null==(e=null==(e=window.Criteo)?void 0:e.usePrebidEvents)||e})),!1!==window.Criteo.usePrebidEvents&&(window.Criteo.events=$e(window.Criteo.events)),window.criteo_pubtag.context.serviceProvider.getServicesAsync(function(e){Je(e.localStorageHelper)})}Lt(),F.DeclarePrebid=Lt}({});