!function(){"use strict";function a(e,t){var o,n,i=null===(o=window.Criteo)||void 0===o?void 0:o.oneTagConfig;return null!==(n=i&&i[e])&&void 0!==n?n:t}var c="5.6.2";function i(e){try{return JSON.parse(e)}catch(e){return}}var r=(e.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,o=0;o<10;++o){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,o){function i(e,t){r.logger(t),clearTimeout(e),o()}var r=this;return window.setTimeout(function(){var o=window.setTimeout(function(){i(n,"Timeout: Unable to get ping return after "+e+"ms")},e);r.executeCommand("ping",null,function(e,t){clearTimeout(o),t?(r.logger("GDPR CMP ping returned"),!0!==e.cmpLoaded&&i(n,"GDPR ping returned cmpLoaded which is not true"),r.logger("GDPR ping returned cmpLoaded which is true")):i(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",[91],e)},e.prototype.executeRetrieveConsent=function(e,t,o){var n=this,i=!1,r=window.setTimeout(function(){i=!0,n.logger("Timeout: Unable to resolve GDPR consent after "+n.timeout+"ms"),o(void 0)},this.timeout),a=this.pingWithTimeout(r,this.pingTimeout,this.pingDelay,function(){i=!0,n.logger("Timeout: Unable to ping GDPR API after "+n.pingTimeout+"ms"),o(void 0)});this.executeCommand(e,t,function(e,t){clearTimeout(a),i||(clearTimeout(r),t?(n.logger("GDPR consent retrieved"),n.processConsentData(e,o)):(n.logger("Error retrieving GDPR consent data from CMP"),o(void 0)))})},e.prototype.processConsentData=function(e,t){if(e){var o={};void 0!==e.consentData&&(o.consentData=e.consentData),void 0!==e.gdprApplies&&(o.gdprApplies=!!e.gdprApplies),t(o)}else this.logger("Unable to read GDPR consent data from CMP"),t(void 0)},e.prototype.executeCommand=function(e,t,o){var r=this;if(!this.hasCallerFunctionInFrame()){this.logger("No GDPR CMP defined on current frame");var a=this.getCMPFrame();this.currentWindow.__cmp=function(e,t,o){if(!a)return r.logger("GDPR CMP not found in any frame"),void o({msg:"GDPR CMP not found in any frame"},!1);var n=Math.random().toString(10),i={__cmpCall:{command:e,parameter:t,callId:n}};r.cmpCallbacks[n]=o,a.postMessage(i,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?i(e.data):e.data;if(t&&t.__cmpReturn&&t.__cmpReturn.callId&&t.__cmpReturn.returnValue){var o=t.__cmpReturn;r.cmpCallbacks&&r.cmpCallbacks[o.callId]&&(r.cmpCallbacks[o.callId](o.returnValue,o.success),delete r.cmpCallbacks[o.callId])}},!1)}this.currentWindow.__cmp(e,t,o)},e);function e(e,t,o){void 0===o&&(o=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.logger=o}var s=(t.prototype.getCMPFrame=function(){for(var e,t=this.currentWindow,o=0;o<10;++o){try{t.frames.__tcfapiLocator&&(e=t)}catch(e){}if(t===this.currentWindow.top)break;t=t.parent}return e},t.prototype.hasCallerFunctionInFrame=function(){return"function"==typeof this.currentWindow.__tcfapi},t.prototype.readyToRetrieve=function(){return this.hasCallerFunctionInFrame()||void 0!==this.getCMPFrame()},t.prototype.pingWithTimeout=function(o,e,t,n){function i(e,t){r.logger(t),clearTimeout(e),n()}var r=this;return window.setTimeout(function(){var t=window.setTimeout(function(){i(o,"Timeout: Unable to get TCFv2 ping return after "+e+"ms")},e);r.executeCommand("ping",2,function(e){clearTimeout(t),r.logger("TCFv2 CMP ping returned in ms"),"error"===e.cmpStatus?i(o,"Error status on ping to TCFv2 CMP"):!0!==e.cmpLoaded?i(o,"TCFv2 ping returned cmpLoaded = false"):r.logger("TCFv2 ping returned cmpLoaded = true")})},t)},t.prototype.retrieveConsent=function(o){var n=this,i=!1,r=window.setTimeout(function(){i=!0,n.logger("Timeout: Unable to resolve TCFv2 consent after "+n.timeout+"ms"),o(void 0)},this.timeout),a=this.pingWithTimeout(r,this.pingTimeout,this.pingDelay,function(){i=!0,n.logger("Timeout: Unable to ping TCFv2 API after "+n.pingTimeout+"ms"),o(void 0)});this.executeCommand("getTCData",2,function(e,t){clearTimeout(a),i||(clearTimeout(r),t?(n.logger("TCFv2 consent retrieved in ms"),n.processResponseData(e,o)):(n.logger("Error retrieving TCFv2 consent data from CMP"),o(void 0)))},[91])},t.prototype.processResponseData=function(e,t){var o;if(e){var n={};void 0!==e.tcString&&(n.consentData=e.tcString),void 0!==e.gdprApplies&&(n.gdprApplies=!!e.gdprApplies),n.version=e.tcfPolicyVersion?e.tcfPolicyVersion:2,n.purposes=null===(o=null==e?void 0:e.purpose)||void 0===o?void 0:o.consents,t(n)}else this.logger("Unable to read GDPR consent data from CMP"),t(void 0)},t.prototype.executeCommand=function(e,t,o,n){var a=this;if(!this.hasCallerFunctionInFrame()){this.logger("No TCFv2 CMP defined on current frame");var c=this.getCMPFrame();this.currentWindow.__tcfapi=function(e,t,o,n){if(!c)return a.logger("TCFv2 CMP not found in any frame"),void o({msg:"TCFv2 CMP not found in any frame"},!1);var i=Math.random().toString(10),r={__tcfapiCall:{command:e,version:t,parameter:n,callId:i}};a.cmpCallbacks[i]=o,c.postMessage(r,"*")},this.currentWindow.addEventListener("message",function(e){var t="string"==typeof e.data?i(e.data):e.data;if(t&&t.__tcfapiReturn&&t.__tcfapiReturn.callId&&t.__tcfapiReturn.returnValue){var o=t.__tcfapiReturn;a.cmpCallbacks&&a.cmpCallbacks[o.callId]&&"function"==typeof a.cmpCallbacks[o.callId]&&(a.cmpCallbacks[o.callId](o.returnValue,o.success),delete a.cmpCallbacks[o.callId])}},!1)}this.currentWindow.__tcfapi(e,t,o,n)},t);function t(e,t,o){void 0===o&&(o=function(e){}),this.cmpCallbacks={},this.currentWindow=e,this.timeout=t.tcfTimeout,this.pingTimeout=t.tcfPingTimeout,this.pingDelay=t.tcfPingDelay,this.logger=o}var u=(o.prototype.getProvider=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},o.prototype.retrieveConsent=function(e){var t=this.getProvider();t?t.retrieveConsent(e):e(void 0)},o);function o(e,t,o,n){void 0===t&&(t=1e4),void 0===o&&(o=50),void 0===n&&(n=1e3);var i={tcfTimeout:t,tcfPingTimeout:o,tcfPingDelay:n};this.tcfv1ConsentProvider=new r(e,i),this.tcfv2ConsentProvider=new s(e,i)}var d=(n.prototype.catchAndStoreException=function(e,t){try{return void 0===t?e():e.apply(this,t)}catch(e){e instanceof Error?this.exceptions.push(e):this.exceptions.push(new Error(e))}},n.prototype.setProtectedTimeout=function(e,t){var o=this;if("undefined"!=typeof window&&"function"==typeof window.setTimeout)return window.setTimeout(function(){return o.catchAndStoreException(e)},t)},n.prototype.addProtectedEventListener=function(e,t,o,n){var i=this;if(void 0!==e&&"function"==typeof e.addEventListener)return e.addEventListener(t,function(){for(var e=[],t=0;t