/**
 * Assertive Yield - Yield Manager script.
 * v3.0.16-hotfix.2
 *
 * © 2018-2024 Assertive Yield B.V. All Rights Reserved.
 */
!function(e){function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){c=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw i}}return o}}(e,t)||n(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||n(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,i)}function c(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function c(e){a(o,r,i,c,s,"next",e)}function s(e){a(o,r,i,c,s,"throw",e)}c(void 0)}))}}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l,u=Object.prototype,d=u.hasOwnProperty,f="function"==typeof Symbol?Symbol:{},p=f.iterator||"@@iterator",g=f.asyncIterator||"@@asyncIterator",h=f.toStringTag||"@@toStringTag";function v(e,t,n,r){var i=t&&t.prototype instanceof O?t:O,o=Object.create(i.prototype),a=new x(r||[]);return o._invoke=function(e,t,n){var r=y;return function(i,o){if(r===E)throw new Error("Generator is already running");if(r===w){if("throw"===i)throw o;return B()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=M(a,n);if(c){if(c===T)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===y)throw r=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=E;var s=m(e,t,n);if("normal"===s.type){if(r=n.done?w:b,s.arg===T)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=w,n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}var y="suspendedStart",b="suspendedYield",E="executing",w="completed",T={};function O(){}function I(){}function S(){}var A={};A[p]=function(){return this};var R=Object.getPrototypeOf,_=R&&R(R(j([])));_&&_!==u&&d.call(_,p)&&(A=_);var U=S.prototype=O.prototype=Object.create(A);function N(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function P(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===I||"GeneratorFunction"===(t.displayName||t.name))}function D(e,t){function n(r,o,a,c){var s=m(e[r],e,o);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"===i(u)&&d.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(s.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function M(e,t){var n=e.iterator[t.method];if(n===l){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=l,M(e,t),"throw"===t.method))return T;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return T}var r=m(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,T;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,T):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,T)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function j(e){if(e){var t=e[p];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(d.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=l,t.done=!0,t};return r.next=r}}return{next:B}}function B(){return{value:l,done:!0}}I.prototype=U.constructor=S,S.constructor=I,S[h]=I.displayName="GeneratorFunction",N(D.prototype),D.prototype[g]=function(){return this},N(U),U[h]="Generator",U[p]=function(){return this},U.toString=function(){return"[object Generator]"},x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&d.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=l)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=l),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=d.call(i,"catchLoc"),c=d.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&d.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,T):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),L(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=l),T}};var F,k,z,H,W={wrap:v,isGeneratorFunction:P,AsyncIterator:D,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,h in e||(e[h]="GeneratorFunction")),e.prototype=Object.create(U),e},awrap:function(e){return{__await:e}},async:function(e,t,n,r,i){void 0===i&&(i=Promise);var o=new D(v(e,t,n,r),i);return P(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},keys:function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},values:j};function G(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function V(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(i(e)+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function a(e,n){if(n&&("object"===i(n)||"function"==typeof n)){var c=n.then;if("function"==typeof c)return void c.call(n,(function(t){a(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--o&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--o&&t(r)}for(var c=0;c<r.length;c++)a(c,r[c])}))}function Y(e,t){this.name="AggregateError",this.errors=e,this.message=t||""}function q(e){var t=this;return new t((function(n,r){if(!e||void 0===e.length)return r(new TypeError("Promise.any accepts an array"));var i=Array.prototype.slice.call(e);if(0===i.length)return r();for(var o=[],a=0;a<i.length;a++)try{t.resolve(i[a]).then(n).catch((function(e){o.push(e),o.length===i.length&&r(new Y(o,"All promises were rejected"))}))}catch(e){r(e)}}))}Array.prototype.find||(Array.prototype.find=function(e){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t=Object(this),n=t.length>>>0,r=arguments[1],i=void 0,o=0;o<n;o++)if(i=t[o],e.call(r,i,o,t))return i}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return i;i++}return-1}}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var t=Object(this),n=parseInt(t.length,10)||0;if(0===n)return!1;var r,i,o=parseInt(arguments[1],10)||0;for(0<=o?r=o:(r=n+o)<0&&(r=0);r<n;){if(e===(i=t[r])||e!=e&&i!=i)return!0;r++}return!1}),Array.from||(Array.from=(F=Object.prototype.toString,k=function(e){return"function"==typeof e||"[object Function]"===F.call(e)},z=Math.pow(2,53)-1,H=function(e){var t,n=(t=Number(e),isNaN(t)?0:0!==t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),z)},function(e){var t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=1<arguments.length?arguments[1]:void 0;if(void 0!==r){if(!k(r))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(n=arguments[2])}for(var i,o=H(t.length),a=k(this)?Object(new this(o)):new Array(o),c=0;c<o;)i=t[c],a[c]=r?void 0===n?r(i,c):r.call(n,i,c):i,c+=1;return a.length=o,a})),"function"!=typeof Object.entries&&(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}),"function"!=typeof Object.values&&(Object.values=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}),"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return t<this.length?t|=0:t=this.length,this.substr(t-e.length,e.length)===e}),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Y.prototype=Error.prototype;var J=setTimeout;function Z(e){return Boolean(e&&void 0!==e.length)}function K(){}function X(e){if(!(this instanceof X))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],re(e,this)}function Q(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,X._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void ee(t.promise,e)}$(t.promise,r)}else(1===e._state?$:ee)(t.promise,e._value)}))):e._deferreds.push(t)}function $(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===i(t)||"function"==typeof t)){var n=t.then;if(t instanceof X)return e._state=3,e._value=t,void te(e);if("function"==typeof n)return void re((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,te(e)}catch(t){ee(e,t)}var r,o}function ee(e,t){e._state=2,e._value=t,te(e)}function te(e){2===e._state&&0===e._deferreds.length&&X._immediateFn((function(){e._handled||X._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)Q(e,e._deferreds[t]);e._deferreds=null}function ne(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function re(e,t){var n=!1;try{e((function(e){n||(n=!0,$(t,e))}),(function(e){n||(n=!0,ee(t,e))}))}catch(e){if(n)return;n=!0,ee(t,e)}}X.prototype.catch=function(e){return this.then(null,e)},X.prototype.then=function(e,t){var n=new this.constructor(K);return Q(this,new ne(e,t,n)),n},X.prototype.finally=G,X.all=function(e){return new X((function(t,n){if(!Z(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function a(e,c){try{if(c&&("object"===i(c)||"function"==typeof c)){var s=c.then;if("function"==typeof s)return void s.call(c,(function(t){a(e,t)}),n)}r[e]=c,0==--o&&t(r)}catch(e){n(e)}}for(var c=0;c<r.length;c++)a(c,r[c])}))},X.any=q,X.allSettled=V,X.resolve=function(e){return e&&"object"===i(e)&&e.constructor===X?e:new X((function(t){t(e)}))},X.reject=function(e){return new X((function(t,n){n(e)}))},X.race=function(e){return new X((function(t,n){if(!Z(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,i=e.length;r<i;r++)X.resolve(e[r]).then(t,n)}))},X._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){J(e,0)},X._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var ie,oe,ae,ce,se,le=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function de(e){var t=function(e,t){if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ue(t)?t:t+""}function fe(e,t,n){return(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}"function"!=typeof le.Promise?le.Promise=X:(le.Promise.prototype.finally||(le.Promise.prototype.finally=G),le.Promise.allSettled||(le.Promise.allSettled=V),le.Promise.any||(le.Promise.any=q));var pe,ge="ayManagerEnv";!function(e){e.BETA="beta",e.STABLE="stable",e.LEGACY="legacy"}(pe||(pe={}));var he,ve,me,ye;fe(ie={},pe.BETA,"3.0.16-hotfix.2"),fe(ie,pe.STABLE,"3.0.7-hotfix.1"),fe(ie,pe.LEGACY,"3.0.7-hotfix.1");!function(e){e.MANUAL="manual",e.HISTORY="history"}(he||(he={})),function(e){e.PLACEMENTS="placements",e.BIDDERS="bidders",e.NAMESPACE="namespace",e.VERSIONS="versions",e.SETTINGS="settings"}(ve||(ve={})),function(e){e.PLACEMENTS="Placements",e.BIDDERS="Bidders",e.NAMESPACE="Namespace",e.VERSIONS="Versions",e.SETTINGS="Settings"}(me||(me={})),function(e){e.JAVASCRIPT="JAVASCRIPT",e.DROPDOWN="DROPDOWN",e.DROPDOWN_CREATABLE="DROPDOWN_CREATABLE",e.DROPDOWNMULTI="DROPDOWNMULTI",e.DROPDOWNMULTI_CREATABLE="DROPDOWNMULTI_CREATABLE",e.TEXT="TEXT",e.SWITCHER="SWITCHER",e.CSS="CSS",e.HTML="HTML",e._SIZES="_SIZES",e._PARAMS_LIST="_PARAMS_LIST",e._REFRESH="_REFRESH",e._PATH="_PATH"}(ye||(ye={}));var be,Ee,we,Te,Oe,Ie,Se,Ae,Re,_e,Ue,Ne,Pe,De,Me,Ce,Le,xe,je,Be,Fe,ke,ze=["beforebegin","afterbegin","beforeend","afterend"];!function(e){e.BANNER="banner",e.VIDEO_OUTSTREAM="video - outstream"}(be||(be={})),function(e){e.HTML5="html5",e.COOKIE="cookie"}(Ee||(Ee={})),function(e){e.AD_UNIT_DEFAULTS="AD_UNIT_DEFAULTS",e.AD_UNITS="AD_UNITS",e.PLACEMENT_DEFAULTS="PLACEMENT_DEFAULTS",e.PLACEMENTS="PLACEMENTS",e.HTML_UNITS="HTML_UNITS",e.BIDDERS="BIDDERS",e.PARAMS_OVERRIDE="PARAMS_OVERRIDE",e.REFRESH_CONTROLS="REFRESH_CONTROLS"}(we||(we={})),fe(oe={},we.AD_UNITS,{enabled:{renderType:ye.SWITCHER,isPopOver:!1,label:"Enabled"},path:{renderType:ye._PATH,needsParsing:!0,trimValueOnSave:!0,isPopOver:!1,label:"Ad Unit path",isDynamicOptions:!1,invertTruncatedDisplay:!0,explanation:'The GPT full Ad Unit path (e.g. /19968336/header-bid-tag-0). \nMore info: https://developers.google.com/publisher-tag/guides/get-started#ad-unit-path. \nYou can also have the Ad Unit path "inside" a Yield Manager variable and use that variable name here.'},name:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Internal Name",explanation:"A unique name to identify this Ad Unit."},conditions:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Enable if",isDynamicOptions:!0,allowEmpty:!0,emptyPlaceholder:"always",explanation:"If provided, the Ad Unit will only be enabled if all conditions evaluate to be true."},mediaTypes:{renderType:ye.DROPDOWNMULTI,options:Object.values(be),isPopOver:!0,label:"Media types"},sizes:{renderType:ye._SIZES,isPopOver:!0,label:"Sizes",isDynamicOptions:!0,explanation:"All sizes this Ad Unit can accept. Prebid recommends that the AdUnit sizes should match the GPT sizes. \n\nThe size of the video player for video media types can be specified by appending the 'v' letter to it.\n\nThe 'fluid' size will only take effect for GAM."},refresh:{renderType:ye._REFRESH,isPopOver:!0,label:"Refresh",explanation:"Use either a simple numeric value (in seconds) or select 'refresh controls' that you've created (Namespace > Refresh Controls).",emptyValue:null}}),fe(oe,we.PLACEMENTS,{enabled:{renderType:ye.SWITCHER,isPopOver:!1,label:"Enabled"},code:{renderType:ye.TEXT,isPopOver:!1,trimValueOnSave:!0,label:"Identifier Name",explanation:"GPT HTML div ID (ID of the div that will contain this Ad Unit). e.g. div-gpt-ad-header.\n\nIf you have two Placements with the same Identifier Name, be sure to add conditions so that they are never enabled at the same time."},name:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Internal Name",explanation:"A unique name to identify this Placement in Yield Manager."},conditions:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Enable if",isDynamicOptions:!0,allowEmpty:!0,emptyPlaceholder:"always",explanation:"If provided, the Placement will only be enabled if all conditions evaluate to be true."},fetchTrigger:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Fetch Trigger",isDynamicOptions:!0,emptyValue:[],explanation:"When the Prebid auction for this placement should kick off. You can set multiple triggers and the auction will run as soon as any of the triggers fire."},trigger:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Render Trigger",isDynamicOptions:!0,emptyValue:[],explanation:"When the given placement should be rendered on the page. You can set multiple triggers and the placement will be activated as soon as any of the triggers fire."},inject:{renderType:ye.SWITCHER,isPopOver:!1,label:"Inject",explanation:"Whether Yield Manager should inject the ad unit placeholder on the page for you.\n\nIf enabled, it will inject Ad Units in the element found by the 'Placement' selector using the 'Position'. \n\nIf disabled, you'll have to add the Placement snippet code to the page yourself. Also, the 'Placement' and 'Position' columns will be ignored.\n\nDisabling this is useful for infinite scroll layouts."},placement:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Placement",needsParsing:!0,explanation:"A CSS query string matching the elements on which Ad Units should be placed. The 'Position' column will be used to place the Ad Unit relative to this element. Note that the Yield Manager script will do a 'querySelectorAll', meaning that every element that matches this placement string will get the Ad Unit attached to it."},position:{renderType:ye.DROPDOWN,options:ze,isPopOver:!0,label:"Position",explanation:"'beforebegin': Before the element. 'afterbegin': Inside the element, before its first child. 'beforeend': Inside the element, after its last child. 'afterend': After the element. "},lazyLoad:{renderType:ye.SWITCHER,isPopOver:!1,label:"Lazy Fetch",explanation:"The auction will only run when the placement's target location is in view or about to be. Choose the margin offset in the settings page.\n\nIf disabled while Lazy Render is enabled, it will fetch bids as soon as the trigger fires, but will only render it once the Render Trigger fires and it is within its margin."},lazyRender:{renderType:ye.SWITCHER,isPopOver:!1,label:"Lazy Render",explanation:"The ads rendering process will only start when the placement's target location is in view or about to be. Choose the margin offset in the settings page.\n\nIf disabled while Lazy Fetch is enabled, it will only fetch bids once the Fetch Trigger fires and it is within its margin, but will render it as soon as the Render Trigger fires and the bids are available."},slug:{renderType:ye.SWITCHER,isPopOver:!1,label:"Slug",explanation:"If enabled, a placeholder with the text 'Ad' will be placed above the ad."},style:{renderType:ye.CSS,trimValueOnSave:!0,isPopOver:!0,label:"Style",needsParsing:!0,allowVarRef:!0,emptyValue:"{}"},adUnits:{label:"Ad Units",explanation:"Which Ad Units should be placed based on this placement"},htmlUnits:{label:"HTML Units",explanation:"Which HTML Units should be placed based on this placement"}}),fe(oe,we.HTML_UNITS,{enabled:{renderType:ye.SWITCHER,isPopOver:!1,label:"Enabled"},name:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Name",explanation:"A unique name to identify this HTML Unit."},conditions:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Enable if",isDynamicOptions:!0,allowEmpty:!0,emptyPlaceholder:"always",explanation:"If provided, the HTML Unit will only be enabled if all conditions evaluate to be true."},htmlCode:{renderType:ye.HTML,trimValueOnSave:!0,isPopOver:!0,label:"HTML Code",allowVarRef:!0,needsParsing:!0}}),fe(oe,we.BIDDERS,{enabled:{renderType:ye.SWITCHER,isPopOver:!1,label:"Enabled"},bidder:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Bidder",explanation:"The Bidder Adapter's name."},alias:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Alias",explanation:"An alias for the Bidder's name. The alias can help avoid user confusion since it's possible to send parameters to the same adapter but in different contexts.\n\nAn alias will only be used if this field is set. If left unset (i.e. using the \"global value\"), no alias will be applied."},name:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Name",explanation:"A unique name to identify this Bidder."},conditions:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Enable if",isDynamicOptions:!0,allowEmpty:!0,emptyPlaceholder:"always",explanation:"If provided, the Bidder will only be enabled if all conditions evaluate to be true."},params:{renderType:ye.JAVASCRIPT,trimValueOnSave:!0,disableSaveOnBlurIfNotDirty:!0,isPopOver:!0,label:"Params Template",needsParsing:!0,allowVarRef:!0,allowPlaceholderRef:!0,emptyValue:null,explanation:'The base params for this bidder. By manually editing this field, the params column will be ignored and only referenced params will be in the PlacementID table.\n\nYou can directly add param values that are static, e.g.: { floor: 0.5 }, while for params whose values change based on the Ad Unit ID or page Domain (e.g. placementId, siteId), you should add them as: { siteId: [[siteId]] }. \n\nPlease note that if the param is a string you should add the reference inside quotes: { siteId: "[[siteId]]" }'},paramsList:{renderType:ye._PARAMS_LIST,isPopOver:!0,label:"Params",needsParsing:!1,explanation:"The base params for this bidder.\n\nYou can toggle built-in parameters for built-in bidders as well as add custom ones by specifying the name and type.\n\nThese params will be used to populate the Placement IDs table as columns under each bidder."},cpmAdjustments:{renderType:ye.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"CPM Adj.",needsParsing:!0,explanation:"A decimal number that will be used to adjust the bid price returned by the bidder. This can be useful if the bidder returns gross prices instead of net prices"},storageAllowed:{renderType:ye.DROPDOWNMULTI,options:Object.values(Ee),isPopOver:!0,allowEmpty:!0,emptyPlaceholder:"None",label:"Storage",explanation:"Whether the bidder is allowed to store cookies or other data on the user's device and which method. \n\n 'html5': local storage. 'cookie': cookies. 'html5' + 'cookie': both. empty: none."}}),fe(oe,we.PARAMS_OVERRIDE,{params:{renderType:ye.JAVASCRIPT,trimValueOnSave:!0,disableSaveOnBlurIfNotDirty:!0,isPopOver:!0,label:"Params",needsParsing:!0,allowVarRef:!0,allowPlaceholderRef:!0,emptyValue:null,explanation:'Will replace the params for this bidder.\n\nYou should directly add param values that are static, e.g.: { floor: 0.5 }. But params whose values change based on the Ad Unit ID or page Domain (e.g. placementId, siteId), you should add them like this: { siteId: [[siteId]] }. \n\nPlease note that if the param is a string you should add the reference inside quotes: { siteId: "[[siteId]]" }'}}),fe(oe,we.REFRESH_CONTROLS,{name:{renderType:ye.TEXT,isPopOver:!1,label:"Name",explanation:"A unique name to identify this Refresh Control."},conditions:{renderType:ye.DROPDOWNMULTI,isPopOver:!0,label:"Enable if",isDynamicOptions:!0,allowEmpty:!0,emptyPlaceholder:"always",explanation:"If provided, the refresh control group will only be enabled if all conditions evaluate to be true."},defaultRefresh:{renderType:ye.TEXT,isPopOver:!1,label:"Default Refresh",needsParsing:!0,explanation:"The default refresh is used as fallback when no rule is matching the impression."},refreshCallsLimit:{renderType:ye.TEXT,isPopOver:!1,label:"Refresh Limit",needsParsing:!0,explanation:"If set to a value greater than 0, it stops refreshing the ad unit instance after reaching the limit."}}),function(e){e.CHANGED="changed",e.ADDED="added",e.REMOVED="removed"}(Te||(Te={})),function(e){e.AD_UNIT_DEFAULTS="Ad unit Defaults",e.AD_UNITS="Ad units",e.BIDDERS="Bidders",e.PARAMS_DEFAULTS="Params Defaults",e.PARAMS_GROUPS="Params Groups",e.PLACEMENT_DEFAULTS="Placement Defaults",e.PLACEMENTS="Placements",e.HTML_UNITS="HTML units",e.PREBID_SCRIPT="Prebid script",e.YIELD_MANAGER_SCRIPT="Yield Manager script",e.VARIABLES="Variables",e.CONDITIONS="Conditions",e.TRIGGERS="Triggers",e.SETTINGS="settings",e.REFRESH_CONTROLS="Refresh Controls"}(Oe||(Oe={})),function(e){e.GEOLOCATION_DATA="Geolocation data",e.DEPLOYMENT_DATA="Deployment data",e.BROWSER_DATA="Browser data",e.BOT_MANAGEMENT="Bot Management",e.CUSTOM="Custom"}(Ie||(Ie={})),function(e){e.LOCAL_STORAGE_ENTRY="LOCAL_STORAGE_ENTRY",e.COOKIE_VALUE="COOKIE_VALUE",e.JS_GLOBAL_VAR="JS_GLOBAL_VAR",e.JS_GLOBAL_FUNCTION="JS_GLOBAL_FUNCTION",e.JS_FUNCTION="JS_FUNCTION",e.URL_PARAMETER="URL_PARAMETER",e.SIMPLE_VALUE="SIMPLE_VALUE",e.URL="URL",e.URL_PATHNAME="URL_PATHNAME",e.DOMAIN="DOMAIN",e.WINDOW_WIDTH="WINDOW_WIDTH",e.WINDOW_HEIGHT="WINDOW_HEIGHT",e.IS_MOBILE="IS_MOBILE",e.UTM_SOURCE="UTM_SOURCE",e.UTM_MEDIUM="UTM_MEDIUM",e.UTM_CAMPAIGN="UTM_CAMPAIGN",e.UTM_TERM="UTM_TERM",e.UTM_CONTENT="UTM_CONTENT",e.DEPLOYMENT_ID="DEPLOYMENT_ID",e.VERSION_ID="VERSION_ID",e.DEPLOYMENT_PERCENTAGE="DEPLOYMENT_PERCENTAGE",e.COUNTRY="COUNTRY",e.IS_EU_COUNTRY="IS_EU_COUNTRY",e.IS_EEA_OR_UK="IS_EEA_OR_UK",e.CITY="CITY",e.CONTINENT="CONTINENT",e.LATITUDE="LATITUDE",e.LONGITUDE="LONGITUDE",e.POSTAL_CODE="POSTAL_CODE",e.REGION="REGION",e.REGION_CODE="REGION_CODE",e.TIMEZONE="TIMEZONE",e.BOT_SCORE="BOT_SCORE",e.VERIFIED_BOT="VERIFIED_BOT"}(Se||(Se={})),fe(ae={},Se.LOCAL_STORAGE_ENTRY,{type:"Local storage entry",description:Ie.CUSTOM,returnType:"string | null",tooltip:"The variable value will evaluate to a string containing the local storage value for the entry matching the provided name. The return type is string or null."}),fe(ae,Se.COOKIE_VALUE,{type:"Cookie value",description:Ie.CUSTOM,returnType:"string | null",tooltip:"The variable value will evaluate to a string containing the cookie value for the entry matching the provided name. The return type is string or null.",YMSupport:"1.4.0"}),fe(ae,Se.JS_GLOBAL_VAR,{type:"Javascript variable",description:Ie.CUSTOM,returnType:"any",tooltip:"The variable value will evaluate to that of the global Javascript variable with the provided name."}),fe(ae,Se.JS_GLOBAL_FUNCTION,{type:"Javascript function",description:Ie.CUSTOM,returnType:"any",tooltip:"The variable value will evaluate to that of the global Javascript function with the provided name."}),fe(ae,Se.JS_FUNCTION,{type:"Custom Javascript",description:Ie.CUSTOM,returnType:"any",tooltip:"The variable will use the provided JavaScript function to calculate its value in the browser. Each time the variable is found, the function will be executed and the return value at that time will be used."}),fe(ae,Se.URL_PARAMETER,{type:"URL parameter",description:Ie.CUSTOM,returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter with the provided name or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.SIMPLE_VALUE,{type:"Simple Value",description:Ie.CUSTOM,returnType:"any",tooltip:"The variable will simply evaluate to the entered value.",YMSupport:"1.4.0"}),fe(ae,Se.URL,{type:Ie.BROWSER_DATA,description:"The Browser's URL",returnType:"string",tooltip:"The variable will evaluate to a string containing the website's URL, obtained with the 'window.location.href' method (e.g. 'https://www.assertiveyield.com/')."}),fe(ae,Se.URL_PATHNAME,{type:Ie.BROWSER_DATA,description:"The Browser's URL path",returnType:"string",tooltip:"The variable will evaluate to a string containing the website's URL path, obtained with the 'window.location.pathname' method (e.g. '/manager/namespace').",YMSupport:"1.4.0"}),fe(ae,Se.DOMAIN,{type:Ie.BROWSER_DATA,description:"The website's domain",returnType:"string",tooltip:"The variable will evaluate to a string containing the website's domain without 'www.', obtained with the 'window.location.hostname' method (e.g. 'assertiveyield.com').",YMSupport:"1.4.0"}),fe(ae,Se.WINDOW_WIDTH,{type:Ie.BROWSER_DATA,description:"The width of the browser's window",returnType:"number",tooltip:"The variable will evaluate to a number containing the width of the user's browser window."}),fe(ae,Se.WINDOW_HEIGHT,{type:Ie.BROWSER_DATA,description:"The height of the browser's window",returnType:"number",tooltip:"The variable will evaluate to a number containing the height of the user's browser window."}),fe(ae,Se.IS_MOBILE,{type:Ie.BROWSER_DATA,description:"Whether a mobile device was detected",returnType:"boolean",tooltip:"The variable will evaluate to a boolean whose value will depend on whether the user's browser is a mobile or not. This is obtained from the 'navigator.userAgent', with a fallback to 'navigator.vendor' and 'window.opera'.",isBoolean:!0}),fe(ae,Se.UTM_SOURCE,{type:Ie.BROWSER_DATA,description:"Value of the utm_source URL parameter",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.UTM_MEDIUM,{type:Ie.BROWSER_DATA,description:"Value of the utm_medium URL parameter",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.UTM_CAMPAIGN,{type:Ie.BROWSER_DATA,description:"Value of the utm_campaign URL parameter",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.UTM_TERM,{type:Ie.BROWSER_DATA,description:"Value of the utm_term URL parameter",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.UTM_CONTENT,{type:Ie.BROWSER_DATA,description:"Value of the utm_content URL parameter",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the value of the URL parameter or null if not found.",YMSupport:"1.4.0"}),fe(ae,Se.DEPLOYMENT_ID,{type:Ie.DEPLOYMENT_DATA,description:"Yield Manager deployment ID",returnType:"string | undefined",tooltip:"The variable will evaluate to a string containing the version's deployment ID."}),fe(ae,Se.VERSION_ID,{type:Ie.DEPLOYMENT_DATA,description:"Yield Manager version ID",returnType:"number",tooltip:"The variable will evaluate to a string containing the version's ID"}),fe(ae,Se.DEPLOYMENT_PERCENTAGE,{type:Ie.DEPLOYMENT_DATA,description:"Yield Manager deployment percentage",returnType:"number",tooltip:"In case of a split test, the variable will evaluate to a decimal containing the percentage of users that are exposed to that version."}),fe(ae,Se.COUNTRY,{type:Ie.GEOLOCATION_DATA,description:"The two-letter country code",returnType:"string | null",tooltip:"The variable will evaluate to a string containing the user's two-letter country code.",hasSuggestions:!0}),fe(ae,Se.IS_EU_COUNTRY,{type:Ie.GEOLOCATION_DATA,description:"Whether the country is in the EU",returnType:"boolean",tooltip:"The variable will evaluate to a boolean indicating whether the country is part of the EU.",isBoolean:!0}),fe(ae,Se.IS_EEA_OR_UK,{type:Ie.GEOLOCATION_DATA,description:"Whether the user is in the EEA or UK",returnType:"boolean",tooltip:"The variable will evaluate to a boolean indicating whether the user is in a European Economic Area country or in the United Kingdom.",YMSupport:"1.4.0",isBoolean:!0}),fe(ae,Se.CITY,{type:Ie.GEOLOCATION_DATA,description:'The city name, for example, "Austin".',returnType:"string | null",tooltip:"The variable will evaluate to a string containing the user's city name."}),fe(ae,Se.CONTINENT,{type:Ie.GEOLOCATION_DATA,description:'The two-letter continent code, for example, "NA"',returnType:"string | null",tooltip:"The variable will evaluate to a string containing the two-letter continent code of the user.",hasSuggestions:!0}),fe(ae,Se.LATITUDE,{type:Ie.GEOLOCATION_DATA,description:'The latitude value, for example, "30.27130"',returnType:"string | null",tooltip:"The variable will evaluate to a string containing the user's latitude."}),fe(ae,Se.LONGITUDE,{type:Ie.GEOLOCATION_DATA,description:'The longitude value, for example, "-97.74260"',returnType:"string | null",tooltip:"The variable will evaluate to a string containing the user's longitude."}),fe(ae,Se.POSTAL_CODE,{type:Ie.GEOLOCATION_DATA,description:'The postal code value, for example, "78701"',returnType:"string | null",tooltip:"The variable will evaluate to a string containing the user's postal code."}),fe(ae,Se.REGION,{type:Ie.GEOLOCATION_DATA,description:'The ISO 3166-2 name for the first level region, for example, "Texas".',returnType:"string | null",tooltip:"If known, the variable will evaluate to a string containing the ISO 3166-2 name for the first level region of the user.",hasSuggestions:!0}),fe(ae,Se.REGION_CODE,{type:Ie.GEOLOCATION_DATA,description:'The ISO 3166-2 code for the first level region, for example, "TX".',returnType:"string | null",tooltip:"If known, the variable will evaluate to a string containing the ISO 3166-2 code for the first level region of the user.",hasSuggestions:!0}),fe(ae,Se.TIMEZONE,{type:Ie.GEOLOCATION_DATA,description:'The time zone name, for example, "America/Chicago"',returnType:"string",tooltip:"The variable will evaluate to a string containing the user's time zone name.",hasSuggestions:!0}),fe(ae,Se.BOT_SCORE,{type:Ie.BOT_MANAGEMENT,description:"An integer between 1-99, that indicates how likely that request came from a bot. The lower the value, the more likely the request came from a bot.",returnType:"number",tooltip:"The variable will evaluate to an integer between 1-99 which indicates Cloudflare's level of certainty that it's a bot request. The lower the value, the more likely the request came from a bot.",YMSupport:"3.0.0"}),fe(ae,Se.VERIFIED_BOT,{type:Ie.BOT_MANAGEMENT,description:"A boolean value set to 'true' when the request originates from a good bot, such as Google or Bing. Many users opt to permit such traffic.",returnType:"boolean",tooltip:"The variable will evaluate to a boolean whose value will be true based on the request origin being from a good bot.",YMSupport:"3.0.0"}),Se.URL,Se.URL_PATHNAME,Se.DOMAIN,Se.WINDOW_WIDTH,Se.WINDOW_HEIGHT,Se.IS_MOBILE,Se.UTM_SOURCE,Se.UTM_MEDIUM,Se.UTM_CAMPAIGN,Se.UTM_TERM,Se.UTM_CONTENT,Se.DEPLOYMENT_ID,Se.VERSION_ID,Se.DEPLOYMENT_PERCENTAGE,Se.COUNTRY,Se.IS_EU_COUNTRY,Se.IS_EEA_OR_UK,Se.CITY,Se.CONTINENT,Se.LATITUDE,Se.LONGITUDE,Se.POSTAL_CODE,Se.REGION,Se.REGION_CODE,Se.TIMEZONE,Se.BOT_SCORE,Se.VERIFIED_BOT,function(e){e.SCRIPT_LOADED="Script Loaded",e.WINDOW_READY="Window Ready",e.WINDOW_LOADED="Window Loaded",e.CONSENT_INITIALIZATION="Consent Initialization",e.MANUAL_EVENT="Manual event"}(Ae||(Ae={})),fe(ce={},Ae.SCRIPT_LOADED,"The Yield Manager Script is running."),fe(ce,Ae.WINDOW_READY,"The document has finished loading and the document has been parsed but sub-resources such as scripts, images, stylesheets and frames are still loading."),fe(ce,Ae.WINDOW_LOADED,"The document and all sub-resources have finished loading. The state indicates that the load event is about to fire."),fe(ce,Ae.CONSENT_INITIALIZATION,"A CMP is loaded and is prepared to surface a TC String to any calling scripts on the page."),fe(ce,Ae.MANUAL_EVENT,"Will fire when your page calls the dispatchManualEvent API method (i.e. ayManagerEnv.dispatchManualEvent())."),function(e){e.onScriptLoad="_onScriptLoad",e.onReady="_onReady",e.onLoad="_onLoad",e.onConsentInitialization="_onConsentInitialization",e.manualTrigger="_manualTrigger"}(Re||(Re={})),Re.onScriptLoad,Ae.SCRIPT_LOADED,Re.onReady,Ae.WINDOW_READY,Re.onLoad,Ae.WINDOW_LOADED,Re.onConsentInitialization,Ae.CONSENT_INITIALIZATION,Re.manualTrigger,Ae.MANUAL_EVENT,function(e){e.AND="AND",e.OR="OR"}(_e||(_e={})),function(e){e.EQ="equal",e.NE="not equal",e.ONE_OF="one of",e.NOT_ONE_OF="not one of",e.LT="less than",e.LE="less than or equal",e.GT="greater than",e.GE="greater than or equal",e.CONTAINS="contains",e.STARTS_WITH="starts with",e.ENDS_WITH="ends with",e.REGEX="regex",e.DOESNT_CONTAIN="does not contain",e.DOESNT_STARTS_WITH="does not start with",e.DOESNT_ENDS_WITH="does not end with",e.NOT_REGEX="not regex"}(Ue||(Ue={})),Ue.ONE_OF,Ue.NOT_ONE_OF,function(e){e.fileUpload="Prebid.js file",e.config="Prebid config object",e.yieldScript="Yield Manager Inline script",e.destroyFarUnits="Destroy distant ad units",e.yieldScriptMode="Yield Manager Script Mode",e.yieldScriptVersion="Yield Manager Script Version",e.publisherId="APS Publisher ID",e.apsConfigObject="APS config object",e.spa="Single Page Application support",e.serviceSupport="Enable service",e.customBidPool="Custom bid pool",e.persistentBidCaching="Persistent bid caching",e.preScript="Pre-Script (Advanced)",e.disableRefreshForDirectCampaign="Refresh Limits",e.apsIgnoreAdUnits="Ignore Ad Units from APS Auction",e.prefetchUrls="Prefetch URLs",e.lazyTrigger="Lazy Fetch/Render Margins",e.adSizes="Ad Sizes",e.enableTracker="Enable Tracker",e.trackerId="Entity ID",e.trackerConfig="Tracker Config",e.migrateLegacyToNext="Migrate Legacy Data"}(Ne||(Ne={})),function(e){e.VERSION="version",e.SPLIT_TEST="split test"}(Pe||(Pe={})),function(e){e.PREBID="PREBID",e.APS="APS",e.BOTH="BOTH"}(De||(De={})),fe(se={},Oe.AD_UNITS,!0),fe(se,Oe.AD_UNIT_DEFAULTS,!0),fe(se,Oe.PLACEMENT_DEFAULTS,!0),fe(se,Oe.PLACEMENTS,!0),fe(se,Oe.HTML_UNITS,!0),fe(se,Oe.BIDDERS,!0),fe(se,Oe.PARAMS_DEFAULTS,!0),fe(se,Oe.PARAMS_GROUPS,!0),fe(se,Oe.VARIABLES,!0),fe(se,Oe.CONDITIONS,!0),fe(se,Oe.TRIGGERS,!0),fe(se,Oe.REFRESH_CONTROLS,!0),fe(se,Oe.SETTINGS,!0),fe(se,"scripts",!0),fe(se,Oe.YIELD_MANAGER_SCRIPT,!0),fe(se,Oe.PREBID_SCRIPT,!0),be.BANNER,Re.onReady,pe.STABLE,pe.STABLE,he.HISTORY,De.PREBID,function(e){e.ERROR="error",e.BEFORE_PAGE_CHANGE="beforePageChange",e.AFTER_PAGE_CHANGE="afterPageChange",e.FAILSAFE_TIMEOUT_CHANGED="failSafeTimeoutChanged",e.BEFORE_DEFINE_SLOT="beforeDefineSlot",e.AFTER_DEFINE_SLOT="afterDefineSlot",e.BEFORE_REFRESH="beforeRefresh",e.AFTER_REFRESH="afterRefresh",e.APS_BEFORE_INIT="beforeApsInit",e.APS_AFTER_INIT="afterApsInit",e.APS_BEFORE_FETCH_BIDS="apsBeforeFetchBids",e.PREBID_BEFORE_FETCH_BIDS="prebidBeforeFetchBids"}(Me||(Me={})),function(e){e.BIDDER="BIDDER",e.ADVERTISER="ADVERTISER",e.ORDER="ORDER",e.SIZE="SIZE",e.LINE_ITEM="LINE_ITEM",e.LINE_ITEM_TYPE="LINE_ITEM_TYPE"}(Ce||(Ce={})),function(e){e.SPONSORSHIP="Sponsorship",e.STANDARD="Standard",e.AD_SENSE="AdSense",e.AD_EXCHANGE="AdExchange",e.NETWORK="Network",e.BULK="Bulk",e.PRICE_PRIORITY="Price priority",e.HOUSE="House"}(Le||(Le={}));var He=window.ayManagerEnv,We=null!==(xe=He.settings.prebidSettings.prebidScript.windowName)&&void 0!==xe?xe:"pbjs",Ge=He.settings.bidderSettings,Ve=He.settings.placements,Ye=He.settings.adUnits,qe=He.settings.htmlUnits,Je=He.settings.adUnitInstances=[],Ze=He.settings.htmlUnitInstances=[],Ke=null!==(je=He.settings.yieldScriptSettings.yieldScriptMode)&&void 0!==je?je:"PREBID",Xe=-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident/"),Qe="APS"===Ke||"BOTH"===Ke,$e=!Xe&&("PREBID"===Ke||"BOTH"===Ke)&&null!=(null===(Be=window[We])||void 0===Be?void 0:Be.libLoaded),et=null!==(Fe=null===(ke=He.debug)||void 0===ke?void 0:ke.flags)&&void 0!==Fe?Fe:[],tt=et.includes("all"),nt=!!et.length,rt=et.includes("no_refresh")||tt,it=et.includes("highlight")||tt;window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window[We]=window[We]||{},window[We].que=window[We].que||[],window.assertiveQueue=window.assertiveQueue||[];var ot,at,ct="\n    background: linear-gradient(-152deg, #100124, #3e007c 75%);\n    border-radius: 3px;\n    color: white;\n    padding: 1px 5px;\n    font-size: .6rem;\n",st={group:nt?window.console.groupCollapsed.bind(window.console,"%cYM",ct):function(){},groupEnd:nt?window.console.groupEnd.bind(window.console):function(){},log:nt?window.console.log.bind(window.console,"%cYM",ct):function(){},logt:nt?function(){for(var e,t=Date.now()-window.ayManagerEnv.startTime,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r.push(" - time:"),r.push(t),(e=window.console.log).call.apply(e,[window.console,"%cYM",ct].concat(r))}:function(){},warn:nt?window.console.warn.bind(window.console,"%cYM",ct):function(){},error:window.console.error.bind(window.console,"%cYM",ct),table:nt?window.console[null!=console.table?"table":"log"].bind(window.console):function(){},func:nt?function(e){return e()}:function(){}},lt=Object.values(Me),ut=(s(ot={},Me.ERROR,{que:[]}),s(ot,Me.BEFORE_PAGE_CHANGE,{que:[]}),s(ot,Me.AFTER_PAGE_CHANGE,{que:[]}),s(ot,Me.FAILSAFE_TIMEOUT_CHANGED,{que:[]}),s(ot,Me.BEFORE_DEFINE_SLOT,{que:[]}),s(ot,Me.AFTER_DEFINE_SLOT,{que:[]}),s(ot,Me.BEFORE_REFRESH,{que:[]}),s(ot,Me.AFTER_REFRESH,{que:[]}),s(ot,Me.APS_BEFORE_INIT,{que:[]}),s(ot,Me.APS_AFTER_INIT,{que:[]}),s(ot,Me.APS_BEFORE_FETCH_BIDS,{que:[]}),s(ot,Me.PREBID_BEFORE_FETCH_BIDS,{que:[]}),ot),dt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=ut[e];i.latestPayload=n,i.hasOccurred=!0,i.que.slice().forEach((function(t){try{t.apply(null,n)}catch(t){st.error("Error while trying to execute the handler for the ".concat(e," event"),t)}}))},ft=function(e,t){if(lt.includes(e)){var n=ut[e];if(n.hasOccurred){var r;st.warn("Event '".concat(e,"' already happened. Will execute the handler with the latest payload received.")),t.apply(void 0,o(null!==(r=n.latestPayload)&&void 0!==r?r:[]))}else{n.que.push((function n(){t.apply(void 0,arguments),gt(e,n)}))}}else st.error("Invalid event name: '".concat(e,"'. Available event names: '").concat(lt.join(", "),"'"))},pt=function(e,t){var n=lt.filter((function(e){return e!==Me.APS_BEFORE_INIT&&e!==Me.APS_AFTER_INIT}));n.includes(e)?ut[e].que.push(t):st.error("Invalid event name: '".concat(e,"'. Available event names: ")+"'".concat(n.join(", "),". (For init events, use 'onceEvent' - e.g. beforeApsInit)'"))},gt=function(e,t){if(lt.includes(e)){var n=ut[e];if(0===n.que.length)return;n.que.slice().reverse().forEach((function(e,r,i){e===t&&n.que.splice(i.length-1-r,1)}))}else st.error("Invalid event name: '".concat(e,"'. Available event names: '").concat(lt.join(", "),"'"))},ht=Object.freeze({__proto__:null,emit:dt,once:ft,on:pt,off:gt});function vt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=window.ayManagerEnv.settings.versionInfo,i=null!=t?t:{},o=i.type,a=void 0===o?"yieldmanager":o,c=i.description,s=i.adUnitName,l=i.adUnitInstanceCode,u=i.htmlUnitName,d=i.htmlUnitInstanceName,f=i.adUnitCodes,p=[e,{type:a,description:c,managerVersionId:r.versionId,adUnitName:s,adUnitInstanceCode:l,htmlUnitName:u,htmlUnitInstanceName:d,adUnitCodes:f}];null!=window.assertiveQueue&&-2!==r.versionId&&window.assertiveQueue.push((function(){var e;(e=window.assertive).logError.apply(e,p.concat([{skipConsole:!0,source:"manager"}]))})),dt.apply(ht,[Me.ERROR].concat(p)),n&&st.error(c+"\n",e)}var mt={Object:1,Array:2,String:3,Null:4,Undefined:5,Function:6,Boolean:7,Number:8,RegExp:9,Date:10};function yt(e,t){var n,r,i,o,a,c=function(e){return null===e?4:void 0===e?5:mt[Object.prototype.toString.call(e).slice(8,-1)]}(e);if(null==t&&(t=1),1===c){if(t>0){if(-1!==at.indexOf(e))return console.log("toSrc warning: Circular reference detected within object ",e),"undefined";for(r in at.push(e),n="{",e)e.hasOwnProperty(r)&&(n+='"'+r+'": '+yt(e[r],t-1)+", ");n.length>1&&(n=n.substring(0,n.length-2)),n+="}"}else n="undefined";return n}if(2===c){if(t>0){if(-1!==at.indexOf(e))return console.log("toSrc warning: Circular reference detected within array ",e),"undefined";for(at.push(e),n="[",i=0,o=e.length;i<o;i++)n+=yt(e[i],t-1)+", ";n.length>1&&(n=n.substring(0,n.length-2)),n+="]"}else n="undefined";return n}return 3===c?JSON.stringify(e):4===c?"null":5===c?"undefined":6===c?-1===(a=e.toString()).search(/^function \w+\(\) \{\s*\[native code\]\s*\}$/)?a:a.match(/^function (\w+)\(\) \{\s*\[native code\]\s*\}$/)[1]:7===c?e.toString():8===c?e===Number.MAX_VALUE?"Number.MAX_VALUE":e===Number.MIN_VALUE?"Number.MIN_VALUE":e===Math.E?"Math.E":e===Math.LN2?"Math.LN2":e===Math.LN10?"Math.LN10":e===Math.LOG2E?"Math.LOG2E":e===Math.LOG10E?"Math.LOG10E":e===Math.PI?"Math.PI":e===Math.SQRT1_2?"Math.SQRT1_2":e===Math.SQRT2?"Math.SQRT2":e.toString():9===c?e.toString():10===c?"new Date("+e.getTime()+")":"undefined"}function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wt(e,t,n){var r=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),i=new RegExp("[\\?&#]"+r+"(?:=([^&#]*))?",t?"i":"").exec(n||window.location.href);return null===i?null:void 0===i[1]?"":decodeURIComponent(i[1].replace(/\+/g," "))}function Tt(e){var t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=Et({path:"/"},n);var r,i=encodeURIComponent(e)+"="+encodeURIComponent(t);if(i+=";path="+n.path,n.domain&&(i+="; domain="+n.domain),n.expiresDays?r=864e5*n.expiresDays:n.expiresHours?r=36e5*n.expiresHours:n.expiresSeconds&&(r=1e3*n.expiresSeconds),r){var o=new Date;o.setTime(o.getTime()+r),i+="; expires="+o.toUTCString()}n.sameSite&&(i+="; samesite="+n.sameSite),n.secure&&(i+="; secure"),document.cookie=i}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var St=function(e){var t=function(e){return!("htmlCode"in e)};return e.map((function(e){try{var n=e.name,r=t(e)?"Ad unit":"HTML unit",i=e.conditions.reduce((function(e,t){return e&&Nt(t)}),!0),o=e.conditions.map((function(t){var n=window.ayManagerEnv.settings.definitions.conditions[t],r=n.name,i=n.group;return{name:r,evaluation:Nt(t),conditions:function t(n){if(null!=n.conditions)return n.conditions.reduce((function(e,r,i){return"".concat(e," ").concat(i>0?n.operator+" ":"","( ").concat(t(r)," )")}),"");try{var i=window.ayManagerEnv.settings.definitions.variables[n.variable],o=i.name,a=_t(i._id,null),c=Ut(a,n.value,n.operation);return"<<var: ".concat(o,">> '").concat(a,"' ").concat(n.operation," '").concat(n.value,"' <<eval: ").concat(c,">>")}catch(t){return t instanceof Error&&vt(t,{description:"Unable to evaluate condition for getConditionsEvaluation: var: ".concat(r,", op: ").concat(n.operation,", value: ").concat(n.value),adUnitName:e.name}),"<<var: ".concat(r,">> <<unable to evaluate>> ").concat(n.operation," '").concat(n.value,"' <<eval: ",!1,">>")}}(i)}}));return{name:n,type:r,evaluation:i,conditionSets:o}}catch(n){return n instanceof Error&&vt(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?It(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({description:"Unable to get condition evaluation for ".concat(t(e)?"Ad unit":"HTML unit",": ").concat(e.name)},t(e)?{adUnitName:e.name}:{htmlUnitName:e.name})),null}})).filter((function(e){return null!=e}))};function At(e){try{return Function("return (".concat(Rt(e),")"))()}catch(e){throw e instanceof Error&&(e.message="Unable to parse text inside evalTextWithVarIdsToJSValue: "+e.message),e}}function Rt(e){return null==e?"":e.replace(/({{ *)([_a-zA-Z0-9]+)((\.[_a-zA-Z0-9-]+)*)( *}})/g,(function(e,t,n,r,i,o){try{var a=window.ayManagerEnv.settings.definitions.variables;if(!a[n])throw new Error("Variable not found.");var c=a[n].directString,s=void 0===c||c,l=_t(n,null),u=r&&""!==r?r.slice(1).split(".").reduce((function(e,t,n){return 0===n?l[t]:e[t]}),null):l;return"string"==typeof u&&s?u:(at=[],yt(u,99))}catch(e){throw e instanceof Error&&(e.message="Unable to replace variable '".concat(n+r,"' by its value: ")+e.message),e}}))}function _t(e,t){var n=window.ayManagerEnv,r=n.geoInfo,i=n.botInfo,o=n.settings.definitions.variables;if(!o[e])throw new Error("Unable to evaluate variable: Variable ".concat(e," not found."));var a,c,s=o[e],l=s.type,u=s.value,d=s.name;try{var f,p=Rt(u);switch(l){case Se.LOCAL_STORAGE_ENTRY:return localStorage.getItem(p);case Se.COOKIE_VALUE:return Tt(p);case Se.JS_GLOBAL_VAR:try{f=p.split(".").reduce((function(e,t,n){return 0===n?window[t]:e[t]}),{})}catch(e){e instanceof Error&&vt(e,{description:"Failed to evaluate global js var ".concat(d,". Falling back to undefined.")}),f=void 0}return f;case Se.JS_GLOBAL_FUNCTION:try{f=p.split(".").reduce((function(e,t,n){return 0===n?window[t]:e[t]}),null)()}catch(e){e instanceof Error&&vt(e,{description:"Failed to evaluate global js function ".concat(d,". Falling back to undefined.")}),f=void 0}return f;case Se.JS_FUNCTION:return f=Function("return (".concat(p,")()"))();case Se.URL_PARAMETER:return wt(p);case Se.SIMPLE_VALUE:return p;case Se.URL:return window.location.href;case Se.URL_PATHNAME:return window.location.pathname;case Se.DOMAIN:return window.location.hostname.replace("www.","");case Se.WINDOW_WIDTH:return Math.max(document.documentElement.clientWidth,window.innerWidth||0);case Se.WINDOW_HEIGHT:return Math.max(document.documentElement.clientHeight,window.innerHeight||0);case Se.IS_MOBILE:return c=!1,a=navigator.userAgent||navigator.vendor||window.opera,void((/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(c=!0)),c;case Se.UTM_SOURCE:return Dt("utm_source");case Se.UTM_MEDIUM:return Dt("utm_medium");case Se.UTM_CAMPAIGN:return Dt("utm_campaign");case Se.UTM_TERM:return Dt("utm_term");case Se.UTM_CONTENT:return Dt("utm_content");case Se.DEPLOYMENT_ID:return window.ayManagerEnv.settings.versionInfo.deployId;case Se.VERSION_ID:return window.ayManagerEnv.settings.versionInfo.versionId;case Se.DEPLOYMENT_PERCENTAGE:return window.ayManagerEnv.settings.versionInfo.percentage;case Se.COUNTRY:return r.country;case Se.IS_EU_COUNTRY:return r.isEUCountry;case Se.IS_EEA_OR_UK:return r.isEEAOrUK;case Se.CITY:return r.city;case Se.CONTINENT:return r.continent;case Se.LATITUDE:return r.latitude;case Se.LONGITUDE:return r.longitude;case Se.POSTAL_CODE:return r.postalCode;case Se.REGION:return r.region;case Se.REGION_CODE:return r.regionCode;case Se.TIMEZONE:return r.timezone;case Se.BOT_SCORE:return i.score;case Se.VERIFIED_BOT:return i.verified}}catch(e){throw e instanceof Error&&(e.message="Unable to evaluate variable ".concat(d,": ")+e.message),e}}function Ut(e,t,n){try{switch(n){case Ue.EQ:return String(e)===String(t);case Ue.NE:return String(e)!==String(t);case Ue.ONE_OF:return t.includes(String(e));case Ue.NOT_ONE_OF:return!t.includes(String(e));case Ue.LT:return Number(e)<Number(t);case Ue.LE:return Number(e)<=Number(t);case Ue.GT:return Number(e)>Number(t);case Ue.GE:return Number(e)>=Number(t);case Ue.CONTAINS:return String(e).includes(String(t));case Ue.STARTS_WITH:return String(e).startsWith(String(t));case Ue.ENDS_WITH:return String(e).endsWith(String(t));case Ue.REGEX:return new RegExp(String(t)).test(String(e));case Ue.DOESNT_CONTAIN:return!String(e).includes(String(t));case Ue.DOESNT_STARTS_WITH:return!String(e).startsWith(String(t));case Ue.DOESNT_ENDS_WITH:return!String(e).endsWith(String(t));case Ue.NOT_REGEX:return!new RegExp(String(t)).test(String(e));default:throw new Error("ERROR: invalid op: ".concat(n))}}catch(e){throw e instanceof Error&&(e.message="Unable to evaluate expression: "+e.message),e}}function Nt(e,t){try{var n=!0,r=window.ayManagerEnv.settings.definitions;if(r.conditions[e])return n=function e(t,n){var r=function(e){return"conditions"in e};return"conditions"in t?r(t)&&t.conditions.length>0?t.conditions.reduce((function(r,i,a){return null==r?e(i,[].concat(o(n),[a])):t.operator===_e.AND?r&&(null!==(c=e(i,[].concat(o(n),[a])))&&void 0!==c?c:r):r||(null!==(s=e(i,[].concat(o(n),[a])))&&void 0!==s?s:r);var c,s}),null):null:Ut(_t(t.variable),t.value,t.operation)}(r.conditions[e].group,[]),n;throw new Error("Condition not found. id: ".concat(e))}catch(t){throw t instanceof Error&&(t.message="Unable to evaluate condition ".concat(e,": ")+t.message),t}}function Pt(e){try{return e.reduce((function(e,t){return e&&Nt(t)}),!0)}catch(t){return t instanceof Error&&vt(t,{description:"Unable to evaluate list of conditions: ".concat(JSON.stringify(e))}),!1}}function Dt(e){var t,n,r,i,o=null===(t=window.assertive)||void 0===t||null===(n=t.analytics)||void 0===n||null===(r=n.override)||void 0===r||null===(i=r.utm)||void 0===i?void 0:i[e];return o&&(e=o),wt(e)}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lt=!1;function xt(e){try{var t=e.containerRef,n=window.getComputedStyle(t),r=null,i=function(e){var t=e.visibility;return"hidden"===t||"collapse"===t};return(Lt||!function t(n,i){var o=n.nodeName,a=n.offsetParent,c=i.position,s=i.display;if("BODY"===o)return"none"===s;if("fixed"!==c)return!a;if("none"===s||null==n.parentElement)return!0;var l=n.parentElement,u=window.getComputedStyle(l);return l===e.containerRef.parentElement&&(r=u),t(l,u)}(t,n))&&!i(n)&&null!=t.parentElement&&!i(null!=r?r:window.getComputedStyle(t.parentElement))}catch(t){return t instanceof Error&&vt(t,{description:"Unable to detect if Ad Unit is visible",adUnitInstanceCode:e.code}),!0}}function jt(e){var t="";try{t=Rt(e)}catch(t){t instanceof Error&&vt(t,{description:"Unable to evaluate ad unit path: ".concat(e)})}return t}var Bt,Ft=function(){var e;return function(){var t;return null!==(t=e)&&void 0!==t?t:e=function(){var e=window.ayManagerEnv.settings.prebidSettings.config;try{var t=At(e);return st.log("Evaluated Prebid.config:",t),t}catch(e){return e instanceof Error&&vt(e,{description:"Unable to evaluate Prebid.config"}),{}}}()}}(),kt=function(){var e;return null!==(e=Bt)&&void 0!==e?e:Bt=function(){var e=window.ayManagerEnv.settings.yieldScriptSettings.apsConfig;try{var t=At(e);return st.log("Evaluated APS.config:",t),t}catch(e){return e instanceof Error&&vt(e,{description:"Unable to evaluate APS.config"}),{pubID:""}}}()};function zt(e,t){e.push=function(){return t.apply(e,arguments)}}function Ht(e,t){return new Promise((function(n){try{var i=null!=t?t:{},o=i.aboveSight,a=void 0!==o&&o,c=i.nearInSight,s=void 0!==c&&c,l=i.pixelsOffset,u=void 0===l?430:l;if(null==e)n(!1);else{var d=new IntersectionObserver((function(e){var t=r(e,1)[0];d.disconnect(),t.isIntersecting?n(!0):n(s&&a&&t.boundingClientRect.top>0)}),{rootMargin:"".concat(s?u:0,"px")});d.observe(e)}}catch(e){e instanceof Error&&vt(e,{description:"Unable to detect if element is in view"}),n(!1)}}))}function Wt(e,t,n){return Gt.apply(this,arguments)}function Gt(){return Gt=c(W.mark((function e(t,n,r){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n,e.next="visible"===e.t0?3:"near"===e.t0?4:"page"===e.t0?5:6;break;case 3:return e.abrupt("return",ln(t,function(){var e=c(W.mark((function e(t){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ht(t.containerRef,{nearInSight:!1});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 4:return e.abrupt("return",ln(t,function(){var e=c(W.mark((function e(t){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ht(t.containerRef,{nearInSight:!0,pixelsOffset:r});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:return e.abrupt("return",t.slice());case 6:return st.error("Invalid mode provided to filterAdUnits:",n),e.abrupt("return",[]);case 8:case"end":return e.stop()}}),e)}))),Gt.apply(this,arguments)}function Vt(e,t,n){return e.filter((function(e){var r="parentPlacement"in e?e.parentPlacement:e,i=("fetch"===n?r.fetchTrigger:r.trigger).map((function(e){return window.ayManagerEnv.settings.definitions.triggers[e]})).filter((function(e){return null!=e}));return i.some((function(e){var n,r;return null===(n=e.event===t&&(null===(r=e.conditions)||void 0===r?void 0:r.reduce((function(t,n){try{return t&&Nt(n)}catch(t){return t instanceof Error&&vt(t,{description:"Unable to evaluate trigger's (".concat(e.name,") condition (").concat(n,")")}),!1}}),!0)))||void 0===n||n}))}))}function Yt(e){var t=[],n=[];return e.forEach((function(e){var r;(null===(r=window[We])||void 0===r?void 0:r.libLoaded)&&"cpm"in window[We].getHighestUnusedBidResponseForAdUnitCode(e.code)?t.push(e):n.push(e)})),{adUnitsWithBids:t,adUnitsWithoutBids:n}}function qt(e,t){return t.filter((function(t){return e.includes(t.parentPlacement.code)}))}function Jt(e){return(null!=e?e:[]).map((function(e){return e.split("x").map((function(e){return parseInt(e.trim())}))}))}function Zt(e){return(null!=e?e:[]).map((function(e){return e.split("x").map((function(e,t){return parseInt(0===t?e.trim().slice(1):e.trim())}))}))}function Kt(e){return e.includes("v")}function Xt(e){return!e.includes("v")&&"fluid"!==e}function Qt(e){return Ge.bidders.map((function(t){var n,r,i,o,a;return{alias:t.alias,bidder:t.bidder,conditions:t.conditions,paramsTemplate:null!==(n=null===(r=t.paramsOverrides.find((function(t){return t.adUnitId===e._id})))||void 0===r?void 0:r.params)&&void 0!==n?n:t.params,paramsDefaultValues:null!==(i=null===(o=Ge.paramsDefaults.find((function(e){return e.bidderId===t._id})))||void 0===o||null===(a=o.adUnits.find((function(t){return t.adUnitId===e._id})))||void 0===a?void 0:a.params)&&void 0!==i?i:{},paramsValues:Ge.params.map((function(n){var r,i,o;return{conditions:n.conditions,params:null!==(r=null===(i=n.bidders.find((function(e){return e.bidderId===t._id})))||void 0===i||null===(o=i.adUnits.find((function(t){return t.adUnitId===e._id})))||void 0===o?void 0:o.params)&&void 0!==r?r:{}}}))}})).filter((function(t){return t.conditions.reduce((function(t,n){try{return t&&Nt(n)}catch(t){return t instanceof Error&&vt(t,{description:"Unable to evaluate bidder's condition (".concat(n,")"),adUnitName:e.name}),!1}}),!0)})).map((function(t){var n,r,i,o=Object.keys(t.paramsDefaultValues),a=null!==(n=null===(r=t.paramsValues.find((function(t){return t.conditions.reduce((function(t,n){try{return t&&Nt(n)}catch(t){return t instanceof Error&&vt(t,{description:"Unable to evaluate params group conditions (".concat(n,")"),adUnitName:e.name}),!1}}),!0)})))||void 0===r?void 0:r.params)&&void 0!==n?n:t.paramsDefaultValues,c=o.reduce((function(e,n){var r;return Ct(Ct({},e),{},s({},n,null!==(r=a[n])&&void 0!==r?r:t.paramsDefaultValues[n]))}),{});return{bidder:null!==(i=t.alias)&&void 0!==i?i:t.bidder,paramsTemplate:t.paramsTemplate,placeholders:o,paramsValues:c}})).map((function(t){try{var n=function(e,t){var n="__".concat(ge,"_undefined__"),r=0;return{value:e.replace(/(\[\[ *)(((\w[\w ]*)([a-zA-Z]+)([\w ]*\w))|((\w[\w ]*)([a-zA-Z]+))|(([a-zA-Z]+)([\w ]*\w)))( *\]\])/g,(function(e,i,o){try{r++;var a=t[o];return null==a||""===a?n:a}catch(e){throw e instanceof Error&&(e.message="Unable to replace placeholder '".concat(o,"' by its value: ")+e.message),e}})).replace(new RegExp("([\"'])".concat(n,"\\1"),"g"),"undefined").replace(new RegExp("".concat(n),"g"),"undefined"),count:r}}(t.paramsTemplate,t.paramsValues),r=n.value,i=n.count,o={};return(0===i||0!==t.placeholders.length&&!t.placeholders.every((function(e){return""===t.paramsValues[e]})))&&(o=At(r)),{bidder:t.bidder,params:o}}catch(n){return n instanceof Error&&vt(n,{description:"Unable to parse bidder params. ad unit: ".concat(e.name," bidder: ").concat(t.bidder),adUnitName:e.name}),{bidder:t.bidder,params:{}}}})).filter((function(e){return!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(e.params)}))}function $t(e){return e.responseTimestamp+1e3*e.ttl-1e3<=(new Date).getTime()}function en(e,t,n){return!(t.length>0&&t.includes(n))&&(0===e.length||e.includes(n))}function tn(e){return(null!=e?e:"").trim().slice(1,(null!=e?e:"").length-2).trim()}function nn(e){return parseInt(e.replace("px",""),10)}function rn(e){var t=e.style,n=t.width,r=t.height;return!!(n&&r&&n.includes("px")&&r.includes("px"))}function on(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n={width:null,height:null};try{var r=e.style,i=r.width,o=r.height;if(rn(e));else{var a=window.getComputedStyle(e);i=a.width,o=a.height}if(n.width=nn(i)||null,n.height=nn(o)||null,t&&(null===n.width||null===n.height)){var c=e.getBoundingClientRect();n.width=c.width,n.height=c.height}}catch(e){e instanceof Error&&vt(e,{description:"Error getting element size"})}return n}function an(e){return e.containerRef.querySelector('iframe[id^="google_ads_iframe_"]')}function cn(e){var t=an(e);if(t){var n=t.parentElement;return(n&&n.childElementCount>1||e.containerRef.childElementCount>1)&&!rn(t)?on(e.containerRef,!0):on(t,!1)}return null}function sn(e,t){t&&(t.width&&(!e.style.minWidth||nn(e.style.minWidth)<t.width)&&(e.style.minWidth="".concat(t.width,"px")),t.height&&(!e.style.minHeight||nn(e.style.minHeight)<t.height)&&(e.style.minHeight="".concat(t.height,"px")))}function ln(e,t){return un.apply(this,arguments)}function un(){return un=c(W.mark((function e(t,n){var r;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Symbol(),e.next=3,Promise.all(t.map(function(){var e=c(W.mark((function e(t,i,o){var a;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(t,i,o);case 2:return a=e.sent,e.abrupt("return",a?t:r);case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent.filter((function(e){return e!==r})));case 4:case"end":return e.stop()}}),e)}))),un.apply(this,arguments)}function dn(e){var t,n=null===(t=document.getElementsByTagName("script"))||void 0===t?void 0:t[0];n&&n.parentNode?n.parentNode.insertBefore(e,n):document.head.appendChild(e)}var fn="object"==("undefined"==typeof global?"undefined":i(global))&&global&&global.Object===Object&&global,pn="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,gn=fn||pn||Function("return this")(),hn=gn.Symbol,vn=Object.prototype,mn=vn.hasOwnProperty,yn=vn.toString,bn=hn?hn.toStringTag:void 0;var En=Object.prototype.toString;var wn=hn?hn.toStringTag:void 0;function Tn(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":wn&&wn in Object(e)?function(e){var t=mn.call(e,bn),n=e[bn];try{e[bn]=void 0;var r=!0}catch(e){}var i=yn.call(e);return r&&(t?e[bn]=n:delete e[bn]),i}(e):function(e){return En.call(e)}(e)}function On(e){return"symbol"==i(e)||function(e){return null!=e&&"object"==i(e)}(e)&&"[object Symbol]"==Tn(e)}var In=/\s/;var Sn=/^\s+/;function An(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&In.test(e.charAt(t)););return t}(e)+1).replace(Sn,""):e}function Rn(e){var t=i(e);return null!=e&&("object"==t||"function"==t)}var _n=/^[-+]0x[0-9a-f]+$/i,Un=/^0b[01]+$/i,Nn=/^0o[0-7]+$/i,Pn=parseInt;function Dn(e){if("number"==typeof e)return e;if(On(e))return NaN;if(Rn(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Rn(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=An(e);var n=Un.test(e);return n||Nn.test(e)?Pn(e.slice(2),n?2:8):_n.test(e)?NaN:+e}var Mn,Cn=function(){return gn.Date.now()},Ln=Math.max,xn=Math.min;function jn(e,t,n){var r,i,o,a,c,s,l=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function g(e){return l=e,c=setTimeout(v,t),u?p(e):a}function h(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-l>=o}function v(){var e=Cn();if(h(e))return m(e);c=setTimeout(v,function(e){var n=t-(e-s);return d?xn(n,o-(e-l)):n}(e))}function m(e){return c=void 0,f&&r?p(e):(r=i=void 0,a)}function y(){var e=Cn(),n=h(e);if(r=arguments,i=this,s=e,n){if(void 0===c)return g(s);if(d)return clearTimeout(c),c=setTimeout(v,t),p(s)}return void 0===c&&(c=setTimeout(v,t)),a}return t=Dn(t)||0,Rn(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Ln(Dn(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==c&&clearTimeout(c),l=0,r=s=i=c=void 0},y.flush=function(){return void 0===c?a:m(Cn())},y}var Bn={};function Fn(e,t,n){if(Bn[e]||(Bn[e]=0),null!=t){var r,i=null!=n?n:++Bn[e],o=t.slice(0,8);return Gn(r="".concat(e,"__").concat(ge,"__").concat(i,"_").concat(o)),r}var a=++Bn[e];return"".concat(e,"__").concat(ge,"__").concat(a)}function kn(e){var t=r(e.split("__".concat(ge,"__")),2),n=t[0],i=r(t[1].split("_"),2),o=i[0],a=i[1];return{placementCode:n,instanceNumber:Number(o),adUnitId:a}}function zn(e){var t=kn(e),n=t.placementCode,r=t.instanceNumber;return"".concat(n,"__").concat(ge,"__").concat(r)}function Hn(){var e=[].concat(o(Je.map((function(e){return e.parentPlacement.code}))),o(Ze.map((function(e){return e.parentPlacement.code})))).reduce((function(e,t){return e.includes(t)?e:[].concat(o(e),[t])}),[]);for(var t in Bn)e.includes(t)||delete Bn[t]}var Wn={};function Gn(e){var t,n=kn(e).adUnitId;(null!==(t=Wn[n])&&void 0!==t?t:Wn[n]={})[e]=!0}null!==(Mn=window.ayManagerEnv)&&void 0!==Mn&&Mn.adUnitCodeVariations||(window.ayManagerEnv.adUnitCodeVariations=Wn),nt&&(pt(Me.BEFORE_PAGE_CHANGE,(function(){window.ayManagerEnv.debug.conditionsEvaluation=St([].concat(o(Ye),o(qe)))})),$e&&window[We].que.push((function(){if(!window[We].getConfig("debug")){var e=function(e,t){return(e=Array.from(e)).unshift("%cPrebid","display: inline-block; color: #fff; background: #3b88c3; padding: 1px 4px; border-radius: 3px;",t),e};window[We].onEvent("auctionDebug",(function(t){var n=t.type,r=t.arguments;try{"ERROR"===n?console.error.apply(console,e(r,"ERROR:")):"WARNING"===n&&console.warn.apply(console,e(r,"WARNING:"))}catch(e){st.error(e)}}))}})),it&&window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){var t=e.slot,n=e.isEmpty,r=t.getSlotElementId();if(n&&!document.querySelector("#".concat(r," > span, #").concat(r," > div > iframe"))){var i,o=Je.find((function(e){return e.code===r&&e.parentAdUnit}));if(o)if(o.parentAdUnit.sizes.forEach((function(e){var t=e.split("x");(!i||t[0]*t[1]>i[0]*i[1])&&(i=t)})),i){var a=document.createElement("div");a.style.minWidth=i[0]+"px",a.style.minHeight=i[1]+"px",o.containerRef.appendChild(a);var c=document.createElement("span");c.innerText=i.join("x"),o.containerRef.appendChild(c)}}}))})));function Vn(){var e=[];try{e=window.ayManagerEnv.debug.conditionsEvaluation=St([].concat(o(Ye),o(qe)))}catch(e){e instanceof Error&&vt(e,{description:"Exception in runDebugConditionsEvaluation API call"})}return e}function Yn(){var e="".concat(ge,"__persistent_bid_cache_bids_v2");localStorage.removeItem("".concat(ge,"__persistent_bid_cache_bids")),window.addEventListener("beforeunload",(function(t){try{var n=Object.values(Wn).reduce((function(e,t){return[].concat(o(e),o(Object.keys(t)))}),[]).reduce((function(e,t){var n=window[We].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return!$t(e)&&"rendered"!==e.status&&e.cpm>0}));n=n.map((function(e){return e.metrics=!1,function(e){return!t(e).every((function(e){return["getStatusCode","getSize","getIdentifiers","metrics.startTiming","metrics.measureTime","metrics.measureHookTime","metrics.checkpoint","metrics.timeSince","metrics.timeBetween","metrics.setMetric","metrics.getMetrics","metrics.fork","metrics.join","metrics.newMetrics","metrics.renameWith","metrics.toJSON","getCpmInNewCurrency"].includes(e)}));function t(e){var n=[],r=function(r){"function"==typeof e[r]?n.push(r):"object"===i(e[r])&&n.push.apply(n,o(t(e[r]).map((function(e){return"".concat(r,".").concat(e)}))))};for(var a in e)r(a);return n}}(e)?(vt(new Error("Unknown bid method detected when caching bid"),{description:"Failed to cache bids!"}),null):("function"==typeof e.getSize&&(e.getSize=e.getSize()),"function"==typeof e.getStatusCode&&(e.getStatusCode=e.getStatusCode()),"function"==typeof e.getIdentifiers&&(e.getIdentifiers=e.getIdentifiers()),e)})).filter((function(e){return null!=e})),localStorage.setItem(e,JSON.stringify(n))}catch(e){e instanceof Error&&vt(e,{description:"Failed to cache bids!"})}}));window[We].onEvent("auctionEnd",(function t(n){var r,o=JSON.parse(null!==(r=localStorage.getItem(e))&&void 0!==r?r:"[]").filter((function(e){return!$t(e)&&"rendered"!==e.status&&e.cpm>0}));localStorage.setItem(e,JSON.stringify([])),o.forEach((function(e){if("string"==typeof e.getSize){var t=e.getSize;e.getSize=function(){return t}}if("number"==typeof e.getStatusCode){var n=e.getStatusCode;e.getStatusCode=function(){return n}}else void 0===e.getStatusCode&&(e.getStatusCode=function(){return 1});if("object"===i(e.getIdentifiers)){var r=e.getIdentifiers;e.getIdentifiers=function(){return r}}})),o.forEach((function(e){if(Gn(e.adUnitCode),e.persistentCache||(e.persistentCache=!0),e.auctionId=n.auctionId,n.bidsReceived.push(e),"function"==typeof e.getIdentifiers){var t=e.getIdentifiers();t.auctionId=e.auctionId,e.getIdentifiers=function(){return t}}})),st.log("Cached bids retrieved and reassigned to this auction: ",o),window[We].offEvent("auctionEnd",t)}))}function qn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qn(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Zn=Ft(),Kn="function"==typeof Zn.bidCacheFilterFunction;function Xn(e){var t=window.ayManagerEnv.settings.prebidSettings.customBidPool.codes;return en(t.include,t.exclude,e.split("__".concat(ge,"__"))[0])}function Qn(e){var t=window.ayManagerEnv.settings.prebidSettings.customBidPool.bidders;return en(t.include,t.exclude,e)}function $n(e,t){if(t.includes(e))return!1;if(!Qn(e.bidder)||!Xn(e.adUnitCode))return!1;var n="rendered"===e.status||"targetingSet"===e.status,r=$t(e);if(n||r)return!1;if(0===e.cpm)return!1;if(e.pooled)return!1;try{if(Kn&&!Zn.bidCacheFilterFunction(e))return!1}catch(e){vt(e,{description:"Failed to run prebid bidCacheFilterFunction"})}return!0}function er(e){nt&&(st.group("ORIGINAL - Custom Bid Pool & Highest Bids from Prebid auction: "),st.log([]),e.forEach((function(e){var t=e.code,n=window[We].getHighestUnusedBidResponseForAdUnitCode(t);if("adId"in n){var r=n.adId,i=n.bidder,o=n.cpm,a=n.size;st.log("Highest Bid (Prebid auction) for ".concat(t,": "),{bidder:i,adId:r,cpm:o,size:a,bidObject:JSON.parse(JSON.stringify(n))})}else st.log("No Bids     (Prebid auction) for ".concat(t,"."))})),st.groupEnd()),st.log("🔴 Skipping: Not enough Prebid bids."),st.groupEnd()}function tr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;st.group(">>> Custom bid pool for code variations <<<");var i=[],a=n.filter((function(t){if(!e.includes(t.code)||!t.slot||!t.parentAdUnit)return!1;var n=window[We].getHighestUnusedBidResponseForAdUnitCode(t.code);return"adId"in n&&i.push(n),!0})),c=a.reduce((function(e,t){var n;return Jn(Jn({},e),{},s({},t.parentAdUnit._id,[].concat(o(null!==(n=e[t.parentAdUnit._id])&&void 0!==n?n:[]),[t])))}),{}),l=[];return st.log("Auction ad unit instances:",a),Object.entries(c).forEach((function(e){var n=r(e,2),a=n[0],c=n[1];st.group("Parent ad unit id: ".concat(a,". Child instances:"),c);var s=Object.keys(Wn[a.slice(0,8)]);st.log("Adding to the bid pool bis from the following ad unit code variations:",s);var u=s.reduce((function(e,t){var n=window[We].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return $n(e,i)})).sort((function(e,t){return t.cpm-e.cpm}));if(0!==u.length){var d=ir(u,c,i);t&&rr(d),l.push.apply(l,d),st.groupEnd()}else er(c)})),st.groupEnd(),l}catch(t){return t instanceof Error&&vt(t,{description:"Failed to run the Custom bid pool for code variations",adUnitCodes:e}),[]}}function nr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;st.group(">>> customBidPool feature is enabled <<<"),e=e.filter((function(e){return Xn(e)}));var r=[],i=n.filter((function(t){if(!e.includes(t.code))return!1;var n=window[We].getHighestUnusedBidResponseForAdUnitCode(t.code);if("adId"in n){if(!Qn(n.bidder))return!1;r.push(n)}return!!t.parentAdUnit})),a=Object.values(Wn).reduce((function(e,t){return[].concat(o(e),o(Object.keys(t)))}),[]).reduce((function(e,t){var n=window[We].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]),c=a.filter((function(e){return $n(e,r)})).sort((function(e,t){return t.cpm-e.cpm}));if(0===c.length)return er(i),[];var s=ir(c,i,r);return t&&rr(s),st.groupEnd(),s}catch(t){return t instanceof Error&&vt(t,{description:"Failed to run the Custom Bid Pool",adUnitCodes:e}),[]}}function rr(e){e.forEach((function(e){var t=e.bid;null!=e.originalAdUnitCode&&(t.adUnitCode=e.adUnitCode,t.pooled=e.pooled,t.originalAdUnitCode=e.originalAdUnitCode,t.originalHighestBid=e.originalHighestBid)}))}function ir(e,t,n){var r,i=e.map((function(e){return{bid:e,adUnitCode:e.adUnitCode,pooled:e.pooled,originalAdUnitCode:e.originalAdUnitCode,originalHighestBid:e.originalHighestBid}})),a=t.reduce((function(e,t){var r=n.find((function(e){return e.adUnitCode===t.code}));return Jn(Jn({},e),null!=r?s({},t.code,{bid:r,adUnitCode:r.adUnitCode,pooled:r.pooled,originalAdUnitCode:r.originalAdUnitCode,originalHighestBid:r.originalHighestBid}):{})}),{});nt&&(st.group("ORIGINAL - Custom Bid Pool & Highest Bids from Prebid auction: "),st.log(i.map((function(e){var t=e.bid;return{adId:t.adId,bidder:t.bidder,cpm:t.cpm,size:t.size,bidObject:JSON.parse(JSON.stringify(t))}}))),t.forEach((function(e){var t=e.code,n=a[t];if(null!=n){var r=n.bid,i=r.adId,o=r.bidder,c=r.cpm,s=r.size;st.log("Highest Bid (Prebid auction) for ".concat(t,": "),{bidder:o,adId:i,cpm:c,size:s,bidObject:JSON.parse(JSON.stringify(n.bid))})}else st.log("No Bids     (Prebid auction) for ".concat(t,"."))})),st.groupEnd());var c=0;do{r=!1,t.forEach((function(e){var t,n,o,s,l,u,d=a[e.code],f=i.filter((function(t){var n=t.bid,r=e.parentAdUnit.sizes.includes("video"===n.mediaType?"v".concat(n.size):n.size),i=e.parentAdUnit.mediaTypes.some((function(e){return-1!==e.indexOf(n.mediaType)}));return r&&i}))[0];null!=f&&f.bid.cpm>(null!==(t=null==d||null===(n=d.bid)||void 0===n?void 0:n.cpm)&&void 0!==t?t:0)&&(st.group("🟢 Reassigning Bid"),st.log("bidId: ",f.bid.adId),st.log("From: ",f.adUnitCode,"To: ",e.code),st.log("Uplift: ",f.bid.cpm-(null!==(o=null==d||null===(s=d.bid)||void 0===s?void 0:s.cpm)&&void 0!==o?o:0)),st.groupEnd(),f.pooled=!0,f.originalAdUnitCode=f.bid.adUnitCode,f.originalHighestBid=null!==(l=null==d||null===(u=d.bid)||void 0===u?void 0:u.cpm)&&void 0!==l?l:0,null!=d&&(d.pooled&&d.originalAdUnitCode&&(d.adUnitCode=d.originalAdUnitCode,delete d.pooled,delete d.originalAdUnitCode,delete d.originalHighestBid),i.push(d),i.sort((function(e,t){return t.bid.cpm-e.bid.cpm}))),f.adUnitCode=e.code,i.splice(i.indexOf(f),1),a[e.code]=f,r=!0,c++)}))}while(r);return 0===c?st.log("🟡 No changes done: No higher bids availaible."):nt&&(st.group("UPDATED - Custom Bid Pool & Highest Updated Bids (".concat(c," changes): ")),st.log(i.map((function(e){var t=e.bid;return{adId:t.adId,bidder:t.bidder,cpm:t.cpm,size:t.size,bidObject:t}}))),t.forEach((function(e){var t=e.code,n=a[t];if(null!=n){var r=n.bid,i=r.adId,o=r.bidder,c=r.cpm,s=r.size;st.log("Highest Bid (Updated) for ".concat(t," ").concat(!0===n.pooled?"📈":"",": "),{bidder:o,adId:i,cpm:c,size:s,bidObject:JSON.parse(JSON.stringify(n.bid))})}else st.log("No Bids     (Updated) for ".concat(t,"."))})),st.groupEnd()),i.unshift.apply(i,o(Object.values(a).filter((function(e){return null!=e})))),i.sort((function(e,t){return t.bid.cpm-e.bid.cpm}))}var or=[],ar=window,cr=!1,sr=function(e){!function(){if(!cr){cr=!0;var e=ar.googlefc=ar.googlefc||{};e.ccpa=e.ccpa||{},e.callbackQueue=e.callbackQueue||[];var t=e.controlledMessagingFunction;e.controlledMessagingFunction=function(n){or.forEach((function(t){try{var n,r=t+"Locator",i=ar[t];delete ar[t],null!==(n=ar.frames[r])&&void 0!==n&&n.frameElement&&ar.frames[r].frameElement.remove(),e.callbackQueue.push({CONSENT_DATA_READY:function(){var e=i();e.length&&e.forEach((function(e){try{ar[t].apply(null,e)}catch(e){console.error(e)}}))}})}catch(e){console.error(e)}})),t?t(n):n.proceed(!0),e.controlledMessagingFunction=t}}}();var t,n,r=e+"Locator",o=[],a=ar;for(;a;){try{if(a.frames[r]){t=a;break}}catch(e){}if(a===ar.top)break;a=a.parent}t||a[e]||(!function e(){var t=ar.document,n=!!ar.frames[r];if(!n)if(t.body){var i=t.createElement("iframe");i.style.cssText="display:none",i.name=r,t.body.appendChild(i)}else setTimeout(e,5);return!n}(),ar[e]=function(){var e=arguments;if(!e.length)return o;"setGdprApplies"===e[0]?e.length>3&&2===parseInt(e[1],10)&&"boolean"==typeof e[3]&&(n=e[3],"function"==typeof e[2]&&e[2]("set",!0)):"ping"===e[0]?"function"==typeof e[2]&&e[2]({gdprApplies:n,cmpLoaded:!1,cmpStatus:"stub"}):o.push(e)},ar.addEventListener("message",(function(t){var n="string"==typeof t.data,r={};if(n)try{r=JSON.parse(t.data)}catch(e){}else r=t.data;var o=null!==r&&"object"===i(r)?r[e+"Call"]:null;o&&window[e](o.command,o.version,(function(r,i){var a=s({},e+"Return",{returnValue:r,success:i,callId:o.callId});t&&t.source&&t.source.postMessage&&t.source.postMessage(n?JSON.stringify(a):a,"*")}),o.parameter)}),!1),or.push(e))};function lr(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var ur=["slotID","size","mediaType"];function dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pr={},gr=[];function hr(e){return"object"===i(e)&&null!=e}function vr(e){return hr(e)&&"amzniid"in e&&"string"==typeof e.amzniid&&"amznbid"in e&&"string"==typeof e.amznbid}function mr(e){return hr(e)&&"targeting"in e&&vr(e.targeting)}var yr,br,Er,wr,Tr,Or,Ir=function(e){var t=e.filter((function(e){return function(e){return hr(e)&&"slotID"in e&&"string"==typeof e.slotID&&"size"in e&&"string"==typeof e.size}(e)&&(mr(e)||function(e){return hr(e)&&!("targeting"in e)&&vr(e)}(e))})),n=t.filter((function(e){return!["","1","2"].includes(mr(e)?e.targeting.amzniid:e.amzniid)})).map((function(e){if(mr(e))return e;var t=e.slotID,n=e.size,r=e.mediaType,i=lr(e,ur);return{slotID:t,size:n,targeting:i,helpers:{targetingKeys:Object.keys(i)},mediaType:null!=r?r:"d"}}));gr.push.apply(gr,o(n)),e.filter((function(e){return!t.find((function(t){return t===e}))})).forEach((function(e){vt(new Error("Invalid bid format!"),{description:"format: ".concat(JSON.stringify(e).slice(0,300))})}))},Sr=function(e){return null==e||null==e.targeting.amznbid?0:null!==(t=null===(n=pr[e.targeting.amznbid])||void 0===n?void 0:n[0])&&void 0!==t?t:999;var t,n},Ar=function(e){return{bids:gr.filter((function(t){return t.slotID===e}))}},Rr=function(e){var t=Ar(e).bids.filter((function(e){return"targetingSet"!==e.status&&"rendered"!==e.status}));if(0===t.length)return{};for(var n=t.length-1,r=Sr(t[n]),i=n;i>=0;i--){var o=Sr(t[i]);o>r&&(n=i,r=o)}return t[n]};function _r(e,t){return"video"!==e.mediaType&&(!t.includes(e)&&("rendered"!==e.status&&"targetingSet"!==e.status&&(0!==Sr(e)&&!e.pooled)))}function Ur(e){nt&&(st.group("ORIGINAL - Custom Bid Pool & Highest Bids from APS auctions: "),st.log([]),e.forEach((function(e){var t=e.code,n=Rr(t);if("slotID"in n){var r=n.slotID,i=n.mediaType,o=n.targeting,a=o.amznbid,c=o.amzniid,s=o.amznp,l=o.amznsz;st.log("Highest Bid (APS) for ".concat(t,": "),{slotID:r,mediaType:i,amznbid:a,amzniid:c,amznp:s,amznsz:l,bidObject:JSON.parse(JSON.stringify(n))})}else st.log("No Bids     (APS) for ".concat(t,"."))})),st.groupEnd()),st.log("🔴 Skipping: Not enough APS bids."),st.groupEnd()}function Nr(e){e.forEach((function(e){var t=e.bid;null!=e.originalAdUnitCode&&(t.slotID=e.adUnitCode,t.pooled=e.pooled,t.originalAdUnitCode=e.originalAdUnitCode,t.originalHighestBid=e.originalHighestBid)}))}function Pr(e,t,n){var r,i=e.map((function(e){return{bid:e,adUnitCode:e.slotID,pooled:e.pooled,originalAdUnitCode:e.originalAdUnitCode,originalHighestBid:e.originalHighestBid}})),a=t.reduce((function(e,t){var r=n.find((function(e){return e.slotID===t.code}));return fr(fr({},e),null!=r?s({},t.code,{bid:r,adUnitCode:r.slotID,pooled:r.pooled,originalAdUnitCode:r.originalAdUnitCode,originalHighestBid:r.originalHighestBid}):{})}),{});nt&&(st.group("ORIGINAL - Custom Bid Pool & Highest Bids from APS: "),st.log(i.map((function(e){var t=e.bid,n=t.slotID,r=t.mediaType,i=t.targeting;return{slotID:n,mediaType:r,amznbid:i.amznbid,amzniid:i.amzniid,amznp:i.amznp,amznsz:i.amznsz,bidObject:JSON.parse(JSON.stringify(t))}}))),t.forEach((function(e){var t=e.code,n=a[t];if(null!=n){var r=n.bid,i=r.slotID,o=r.mediaType,c=r.targeting,s=c.amznbid,l=c.amzniid,u=c.amznp,d=c.amznsz;st.log("Highest Bid (APS) for ".concat(t,": "),{slotID:i,mediaType:o,amznbid:s,amzniid:l,amznp:u,amznsz:d,bidObject:JSON.parse(JSON.stringify(n.bid))})}else st.log("No Bids     (APS) for ".concat(t,"."))})),st.groupEnd());var c=0;do{r=!1,t.forEach((function(e){var t=a[e.code],n=i.filter((function(t){var n=t.bid,r=e.parentAdUnit.sizes.includes("video"===n.mediaType?"v".concat(n.size):n.size),i="video"===n.mediaType?e.parentAdUnit.mediaTypes.some((function(e){return-1!==e.indexOf("video")})):e.parentAdUnit.mediaTypes.some((function(e){return-1!==e.indexOf("banner")}));return r&&i}))[0];null!=n&&Sr(n.bid)>Sr(null==t?void 0:t.bid)&&(st.group("🟢 Reassigning Bid"),st.log("bidId: ",n.bid.targeting.amzniid),st.log("From: ",n.adUnitCode,"To: ",e.code),st.log("Uplift: ",Sr(n.bid)-Sr(null==t?void 0:t.bid)),st.groupEnd(),n.pooled=!0,n.originalAdUnitCode=n.bid.slotID,n.originalHighestBid=Sr(null==t?void 0:t.bid),null!=t&&"video"!==t.bid.mediaType&&(t.pooled&&t.originalAdUnitCode&&(t.adUnitCode=t.originalAdUnitCode,delete t.pooled,delete t.originalAdUnitCode,delete t.originalHighestBid),i.push(t),i.sort((function(e,t){return Sr(t.bid)-Sr(e.bid)}))),n.adUnitCode=e.code,i.splice(i.indexOf(n),1),a[e.code]=n,r=!0,c++)}))}while(r);return 0===c?st.log("🟡 No changes done: No higher bids availaible."):nt&&(st.group("UPDATED - Custom Bid Pool & Highest Updated Bids (".concat(c," changes): ")),st.log(i.map((function(e){var t=e.bid,n=t.slotID,r=t.mediaType,i=t.targeting;return{slotID:n,mediaType:r,amznbid:i.amznbid,amzniid:i.amzniid,amznp:i.amznp,amznsz:i.amznsz,bidObject:JSON.parse(JSON.stringify(t))}}))),t.forEach((function(e){var t=e.code,n=a[t];if(null!=n){var r=n.bid,i=r.slotID,o=r.mediaType,c=r.targeting,s=c.amznbid,l=c.amzniid,u=c.amznp,d=c.amznsz;st.log("Highest Bid (Updated) for ".concat(t," ").concat(!0===n.pooled?"📈":"",": "),{slotID:i,mediaType:o,amznbid:s,amzniid:l,amznp:u,amznsz:d,bidObject:JSON.parse(JSON.stringify(n.bid))})}else st.log("No Bids     (Updated) for ".concat(t,"."))})),st.groupEnd()),i.unshift.apply(i,o(Object.values(a).filter((function(e){return null!=e})))),i.sort((function(e,t){return Sr(t.bid)-Sr(e.bid)}))}function Dr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Cr,Lr,xr=window.ayManagerEnv.startTime,jr={},Br=Ft();window.ayManagerEnv.settings.experiments.cmpStub&&(null!==(Cr=Br.consentManagement)&&void 0!==Cr&&Cr.gdpr&&sr("__tcfapi"),null!==(Lr=Br.consentManagement)&&void 0!==Lr&&Lr.usp&&sr("__uspapi"));var Fr=null!==(yr=Br.bidderTimeout)&&void 0!==yr?yr:3e3,kr=Fr-100,zr=(null===(br=Br.consentManagement)||void 0===br||null===(Er=br.gdpr)||void 0===Er?void 0:Er.timeout)||0,Hr=(null===(wr=Br.consentManagement)||void 0===wr||null===(Tr=wr.usp)||void 0===Tr?void 0:Tr.timeout)||0,Wr=Math.max(zr-100,50),Gr=Math.max(Hr,500),Vr=Math.max(null!==(Or=window.ayManagerEnv.settings.experiments.failsafetimeout)&&void 0!==Or?Or:0,Fr+2e3),Yr=Math.max(Vr,zr+500);function qr(e){Yr=e,dt(Me.FAILSAFE_TIMEOUT_CHANGED,e)}function Jr(e,t){var n=setTimeout((function(){gt(Me.FAILSAFE_TIMEOUT_CHANGED,r),e()}),t);function r(t){gt(Me.FAILSAFE_TIMEOUT_CHANGED,r),clearTimeout(n),Jr(e,t)}pt(Me.FAILSAFE_TIMEOUT_CHANGED,r)}var Zr=[];function Kr(e,t){if(0!==e.length){var n,r,i=new Date-xr,a=(n=(new Date).getTime(),r="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random();return n>0?(t=(n+t)%16|0,n=Math.floor(n/16)):(t=(r+t)%16|0,r=Math.floor(r/16)),("x"===e?t:3&t|8).toString(16)}))),c=!1;st.logt("🕘 Request Bids -> YM     START  - ID: ".concat(a),e),jr[a]={prebid:!1,aps:!1},$e&&window[We].que.push((function(){var t=e.map((function(e){return{code:e.code,mediaTypes:(t=e.parentAdUnit,n=Jt(t.sizes.filter((function(e){return Xt(e)}))),r=Zt(t.sizes.filter((function(e){return Kt(e)}))),Ct(Ct({},t.mediaTypes.includes(be.BANNER)?{banner:{sizes:n}}:{}),t.mediaTypes.includes(be.VIDEO_OUTSTREAM)?{video:{context:"outstream",playerSize:r.length>0?r[0]:[640,480],mimes:["video/mp4","video/webm","application/javascript"],api:[1,2],protocols:[1,2,3,4,5,6,7,8],playbackmethod:[2],skip:0,placement:2,minduration:5,maxduration:30}}:{})),bids:Qt(e.parentAdUnit)};var t,n,r})),n={adUnits:t,bidsBackHandler:function(e){window.googletag.cmd.push((function(){st.logt("📩 Request Bids -> PREBID FINISH - ID: ".concat(a," - ").concat(c?"(TIMEDOUT) - ":"","auction time:"),new Date-xr-i),st.log("Prebid auction bids:"),st.table(Object.values(null!=e?e:{}).reduce((function(e,t){return[].concat(o(e),o(t.bids))}),[]).sort((function(e,t){return t.cpm-e.cpm})).map((function(e){var t;return{bidder:e.bidderCode,cpm:e.cpm,size:e.size,mediaType:e.mediaType,currency:e.currency,source:e.source,floor:null===(t=e.floorData)||void 0===t?void 0:t.floorValue,adId:e.adId}}))),jr[a]&&!jr[a].prebid&&(jr[a].prebid=!0,$e&&!jr[a].prebid||Qe&&!jr[a].aps||(delete jr[a],s()))}))}};dt(Me.PREBID_BEFORE_FETCH_BIDS,n),st.logt("🕘 Request Bids -> PREBID START  - ID: ".concat(a),"Ad Units:",t),window[We].requestBids(n)})),Qe&&null!=window.apstag?Zr.push((function(){if(jr[a]){var t=e.filter((function(e){var t=window.ayManagerEnv.settings.yieldScriptSettings.apsIgnoredAdUnits;return en(t.include,t.exclude,kn(e.code).placementCode)})).map((function(e){var t,n,r,i=(t=e.parentAdUnit,n=Jt(t.sizes.filter((function(e){return Xt(e)}))),r=Zt(t.sizes.filter((function(e){return Kt(e)}))),Ct(Ct({},t.mediaTypes.includes(be.BANNER)?{display:{sizes:n}}:{}),t.mediaTypes.includes(be.VIDEO_OUTSTREAM)?{video:{sizes:r}}:{})),o=i.display,a=i.video;return window.ayManagerEnv.settings.experiments.apsMultiFormat&&null!=o&&null!=a?{slotName:e.parentPlacement.code,slotID:e.code,mediaType:"multi-format",multiFormatProperties:{display:o,video:a}}:null!=o?{slotName:e.parentPlacement.code,slotID:e.code,sizes:o.sizes}:null!=a?{slotName:e.parentPlacement.code,slotID:e.code,sizes:a.sizes,mediaType:"video"}:void 0}));dt(Me.APS_BEFORE_FETCH_BIDS,{slots:t,bidTimeout:kr}),0===t.length?(st.logt("🕘 Request Bids -> APS    SKIP!  - ID: ".concat(a),"Ad Units:",t),jr[a]&&!jr[a].aps&&(jr[a].aps=!0,$e&&!jr[a].prebid||Qe&&!jr[a].aps||(delete jr[a],s()))):(st.logt("🕘 Request Bids -> APS    START  - ID: ".concat(a),"Ad Units:",t),window.apstag.fetchBids({slots:t,bidTimeout:kr},(function(e){Ir(e),window.googletag.cmd.push((function(){st.logt("📩 Request Bids -> APS    FINISH - ID: ".concat(a," - ").concat(c?"(TIMEDOUT) - ":""),"bids: ",e,"auction time:",new Date-xr-i),jr[a]&&!jr[a].aps&&(jr[a].aps=!0,$e&&!jr[a].prebid||Qe&&!jr[a].aps||(delete jr[a],s()))}))})))}})):Qe&&null==window.apstag&&(jr[a].aps=!0),$e||Qe||window.googletag.cmd.push((function(){delete jr[a],s()})),Jr((function(){window.googletag.cmd.push((function(){jr[a]&&(Qe&&window.apstag&&"function"==typeof window.apstag._getSlotIdToNameMapping&&void 0===window.apstag._getSlotIdToNameMapping()||vt(new Error("Auction timedout!"),{description:"The fail-safe timeout was hit! "+"failSafeTimeout: ".concat(Yr,". finished: ").concat(JSON.stringify(jr[a])),type:"yieldmanager"}),c=!0,st.logt("⚠️ Request Bids -> YM   TIMEDOUT - ID: ".concat(a," - auction time: "),new Date-xr-i),delete jr[a],s())}))}),Yr)}function s(){st.logt("📩 Request Bids -> YM     FINISH - ID: ".concat(a," auction time:"),new Date-xr-i),t&&t()}}function Xr(e,t){window.googletag.cmd.push((function(){try{var n;(e=e.filter((function(e){return!e.state.waitingGPTRender}))).forEach((function(e){return e.state.waitingGPTRender=!0}));var i=e.map((function(e){return e.code})),a=window.ayManagerEnv.settings.prebidSettings.customBidPool.enabled,c=null!==(n=window.ayManagerEnv.settings.yieldScriptSettings.apsBidPool)&&void 0!==n?n:{enabled:!1,mode:"full"},l=c.enabled,u=c.mode;st.log("🎇 Render Ad Unit Instances".concat(t?" (refresh)":"",":"),i),a?nr(i):Br.useBidCache&&tr(i),$e&&"function"==typeof window[We].setTargetingForGPTAsync&&(window.ayManagerEnv.settings.experiments.wrapPBTargetingCallInsidePBQueue?window[We].que.push((function(){window[We].setTargetingForGPTAsync(i)})):window[We].setTargetingForGPTAsync(i)),Qe&&null!=window.apstag&&(l&&("full"===u?function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;st.group(">>> APS customBidPool feature is enabled <<<");var r=[],i=n.filter((function(t){if(!e.includes(t.code)||!t.parentAdUnit)return!1;var n=Rr(t.code);return"slotID"in n&&r.push(n),!0})),a=Object.values(Wn).reduce((function(e,t){return[].concat(o(e),o(Object.keys(t)))}),[]).reduce((function(e,t){var n=Ar(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return _r(e,r)})).sort((function(e,t){return Sr(t)-Sr(e)}));if(0===a.length)return Ur(i),[];var c=Pr(a,i,r);t&&Nr(c),st.groupEnd()}catch(t){return t instanceof Error&&vt(t,{description:"Failed to run the APS Custom Bid Pool",adUnitCodes:e}),[]}}(i):function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;st.group(">>> APS Custom bid pool for code variations <<<");var i=[],a=n.filter((function(t){if(!e.includes(t.code)||!t.slot||!t.parentAdUnit)return!1;var n=Rr(t.code);return"slotID"in n&&i.push(n),!0})),c=a.reduce((function(e,t){var n;return fr(fr({},e),{},s({},t.parentAdUnit._id,[].concat(o(null!==(n=e[t.parentAdUnit._id])&&void 0!==n?n:[]),[t])))}),{}),l=[];st.log("Auction ad unit instances:",a),Object.entries(c).forEach((function(e){var n=r(e,2),a=n[0],c=n[1];st.group("Parent ad unit id: ".concat(a,". Child instances:"),c);var s=Object.keys(Wn[a.slice(0,8)]);st.log("Adding to the bid pool bids from the following ad unit code variations:",s);var u=s.reduce((function(e,t){var n=Ar(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return _r(e,i)})).sort((function(e,t){return Sr(t)-Sr(e)}));if(0!==u.length){var d=Pr(u,c,i);t&&Nr(d),l.push.apply(l,d),st.groupEnd()}else Ur(c)})),st.groupEnd()}catch(t){return t instanceof Error&&vt(t,{description:"Failed to run the APS Custom bid pool for code variations",adUnitCodes:e}),[]}}(i)),function(e){e.forEach((function(e){var t,n=Rr(e.code),r=gr.find((function(t){return"targetingSet"===t.status&&t.slotID===e.code}));"targeting"in n&&null==r&&(n.status="targetingSet",e.slot.updateTargetingFromMap(n.targeting),null!==(t=window.ayManagerEnv.settings.yieldScriptSettings.apsBidPool)&&void 0!==t&&t.enabled&&999===Sr(n)&&vt(new Error("Bid not mapped"),{adUnitCodes:[e.code],adUnitName:"[".concat(n.targeting.amzniid,", ").concat(n.targeting.amznbid,"]")}))}))}(e));var d=e.map((function(e){return e.slot})).filter((function(e){return null!=e}));if(d.length>0){d.forEach((function(e){return e.setTargeting("aym_refresh","true")})),window.googletag.pubads().refresh(d);var f=setTimeout((function(){var t=e.filter((function(e){var t=e.slot;return null!=t&&d.includes(t)}));t.forEach((function(e){e.state.rendered=!0,e.state.waitingGPTRender=!1})),window.ayManagerEnv.refresh(t.map((function(e){return e.code})),{useInstanceCodes:!0,onlyUpdateViewedAt:!0}),window.googletag.pubads().removeEventListener("slotResponseReceived",p)}),6e3),p=function e(t){var n=t.slot;d.includes(n)&&(clearTimeout(f),window.googletag.pubads().removeEventListener("slotResponseReceived",e))};window.googletag.pubads().addEventListener("slotResponseReceived",p)}t&&dt(Me.AFTER_REFRESH,e.map((function(e){return e.code})))}catch(t){t instanceof Error&&(vt(t,{description:"Failed to execute bidsBackHandler",adUnitCodes:e.map((function(e){return e.code}))}),e.forEach((function(e){e.state.waitingGPTRender=!1})))}}))}function Qr(e){window.googletag.cmd.push((function(){try{var t,n=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled,r=[].concat(o(e.parentAdUnit.mediaTypes.includes(be.BANNER)?Jt(e.parentAdUnit.sizes.filter((function(e){return Xt(e)}))):[]),o(e.parentAdUnit.mediaTypes.includes(be.VIDEO_OUTSTREAM)?Zt(e.parentAdUnit.sizes.filter((function(e){return Kt(e)}))):[]),o(e.parentAdUnit.sizes.some((function(e){return"fluid"===e}))?["fluid"]:[])),i={adUnitPath:jt(e.parentAdUnit.path),size:r.length>0?r:[1,1],div:e.code};dt(Me.BEFORE_DEFINE_SLOT,e.code,i);var a=null===(t=window.googletag.defineSlot(i.adUnitPath,i.size,i.div))||void 0===t?void 0:t.addService(window.googletag.pubads());dt(Me.AFTER_DEFINE_SLOT,e.code,a),null!=a&&(e.slot=a,Qe&&a.setTargeting("uam","true"),n&&(a.getCollapseEmptyDiv()||a.getDivStartsCollapsed())&&(Lt=!0))}catch(t){var c;if(t instanceof Error)vt(t,{description:"Unable to define slot for ad unit ".concat(e.code),adUnitInstanceCode:e.code,adUnitName:null===(c=e.parentAdUnit)||void 0===c?void 0:c.name})}}))}function $r(e){window.googletag.cmd.push((function(){window.googletag._display(e)}))}var ei="allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation";function ti(e){e.setAttribute("sandbox",ei)}function ni(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ri(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ri(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ii=window.ayManagerEnv.settings.experiments.mutationObserverInject,oi=ii&&ii.ignoredElements||["IFRAME","IMG","INPUT","svg","LINK","SCRIPT","FORM","STYLE"],ai={maxWait:1e3};function ci(e){if(ii){var t=ii.observeTarget&&document.querySelector(ii.observeTarget)||document.body,n=[],r=jn((function(t){if(n.length>1){var r,i=!0,o=ni(n);try{for(o.s();!(r=o.n()).done;){if(r.value!==t){i=!1;break}}}catch(e){o.e(e)}finally{o.f()}i||(t=document.body),n=[]}t.isConnected&&t.childElementCount&&(st.logt("📑 Running observer inject:",[t]),e(t))}),500,ai);new MutationObserver((function(e,t){e.forEach((function(e){var t,i=Array.from(e.addedNodes).filter((function(e){if(1!==e.nodeType||oi.includes(e.nodeName))return!1;var t=e;return"string"!=typeof t.id||!t.id.includes("__ayManagerEnv__")&&!t.id.includes("google_ads_iframe_/")}));i.length&&(t=i[0].parentElement)&&(n.push(t),r(t))}))})).observe(t,{childList:!0,subtree:!0})}}function si(){return Ve.filter((function(e){return Pt(e.conditions)}))}function li(){return Ye.filter((function(e){return Pt(e.conditions)}))}function ui(){return qe.filter((function(e){return Pt(e.conditions)}))}var di,fi=[],pi=!1,gi=!1;function hi(e){var t=function(){var t=c(W.mark((function t(){var n;return W.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,yi();case 2:return n=t.sent,t.prev=3,t.next=6,e();case 6:t.next=11;break;case 8:t.prev=8,t.t0=t.catch(3),t.t0 instanceof Error&&vt(t.t0,{description:"Exception in sync queue task"});case 11:return t.prev=11,n(),t.finish(11);case 14:case"end":return t.stop()}}),t,null,[[3,8,11,14]])})));return function(){return t.apply(this,arguments)}}();fi.push(t),vi()}function vi(){return mi.apply(this,arguments)}function mi(){return(mi=c(W.mark((function e(){var t;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!pi&&!gi&&0!==fi.length){e.next=2;break}return e.abrupt("return");case 2:if(null==(t=fi.shift())){e.next=9;break}return gi=!0,e.next=7,t();case 7:gi=!1,vi();case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yi(){return bi.apply(this,arguments)}function bi(){return bi=c(W.mark((function e(){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){!function t(){pi?setTimeout(t,5):(pi=!0,e((function(){pi=!1,vi()})))}()})));case 1:case"end":return e.stop()}}),e)}))),bi.apply(this,arguments)}function Ei(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return wi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wi(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function wi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ti(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ti(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ii,Si,Ai=window.ayManagerEnv.startTime,Ri=function(){try{var e=window.ayManagerEnv.settings.yieldScriptSettings.lazyTrigger,t=e.fetchMargin,n=t.value,r=t.isPercentage,i=e.mobileScaling;if(window.ayManagerEnv.customLazyLoadOffset)return st.warn("customLazyLoadOffset will be deprecated, use Lazy Fetch/Render Margins instead."),window.ayManagerEnv.customLazyLoadOffset;var o=At(n),a=(window.innerWidth||document.documentElement.clientWidth)<992?i:1;if(isNaN(o))throw new Error("lazy fetch offset value did not evaluate to a number");return Math.floor(r?window.innerHeight*(o/100)*a:o*a)}catch(e){return e instanceof Error&&vt(e,{description:"Unable to parse lazy fetch offset value, falling back to default (1400)"}),1400}}(),_i=function(){try{var e=window.ayManagerEnv.settings.yieldScriptSettings.lazyTrigger,t=e.renderMargin,n=t.value,r=t.isPercentage,i=e.mobileScaling,o=At(n),a=(window.innerWidth||document.documentElement.clientWidth)<992?i:1;if(isNaN(o))throw new Error("lazy render offset value did not evaluate to a number");return Math.floor(r?window.innerHeight*(o/100)*a:o*a)}catch(e){return e instanceof Error&&vt(e,{description:"Unable to parse lazy render offset value, falling back to default (1400)"}),1400}}(),Ui={},Ni=(s(di={},Ae.SCRIPT_LOADED,!1),s(di,Ae.WINDOW_READY,!1),s(di,Ae.WINDOW_LOADED,!1),s(di,Ae.CONSENT_INITIALIZATION,!1),s(di,Ae.MANUAL_EVENT,!1),di),Pi=new IntersectionObserver((function(e){try{var t=e.filter((function(e){return e.isIntersecting})).map((function(e){var t=e.target;Pi.unobserve(t);var n=Je.find((function(e){return e.containerRef===t}));if(!n)throw new Error("Lazy load observer detected an ad unit instance that is no longer in memory");if(!n.state.waitingLazyLoad||n.state.triggerFetchStep||n.state.triggerRenderStep||n.state.waitingAuction||n.state.suspended||n.state.rendered)throw new Error("Lazy load observer detected an ad unit instance that is not in the 'standby' state");return n}));t.length>0&&(st.log("💤 Firing lazy fetch ad units:",t),t.forEach((function(e){e.state.waitingLazyLoad=!1})),qi(t,(function(e){Vi(e.filter((function(e){return!e.state.triggerRenderStep&&Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))})))})))}catch(e){e instanceof Error&&vt(e,{description:"Exception in Lazy Load Units observer"})}}),{rootMargin:"".concat(Ri,"px")}),Di=new IntersectionObserver((function(e){try{var t=e.filter((function(e){return e.isIntersecting})).map((function(e){var t=e.target;Di.unobserve(t);var n=Je.find((function(e){return e.containerRef===t}));if(!n)throw new Error("Lazy render observer detected an ad unit instance that is no longer in memory");if(!n.state.waitingLazyRender||!n.state.triggerFetchStep||n.state.triggerRenderStep||n.state.suspended||n.state.rendered)throw new Error("Lazy render observer detected an ad unit instance that is not in the 'standby' state");return n})).filter((function(e){return null!=e.parentAdUnit&&null!=e.slot}));if(t.length>0){st.log("💤 Firing lazy render ad units:",t),t.forEach((function(e){e.state.waitingLazyRender=!1}));var n=Yt(t),r=n.adUnitsWithBids,i=n.adUnitsWithoutBids;r.length>0&&Vi(r),i.length>0&&Ki(i,!1,(function(){Vi(i)}))}}catch(e){e instanceof Error&&vt(e,{description:"Exception in Lazy Load Units observer"})}}),{rootMargin:"".concat(_i,"px")}),Mi=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled?new IntersectionObserver((function(e){try{var t=e.filter((function(e){return!e.isIntersecting&&(!window.ayManagerEnv.settings.experiments.destroyFarUnitsAboveSightOnly||e.boundingClientRect.bottom<=0)})).map((function(e){var t=e.target;Mi.unobserve(t);var n=Je.find((function(e){return e.containerRef===t}));if(!n)throw new Error("farUnitsDestroy observer detected an ad unit instance that is no longer in memory");if(!n.state.rendered)throw new Error("farUnitsDestroy detected an ad unit instance that is not in the 'rendered' state");return n}));t.length>0&&zi(t,"distant",!0)}catch(e){e instanceof Error&&vt(e,{description:"Exception in Far Units Destroy observer"})}}),{rootMargin:"".concat(window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.destructionOffset,"px")}):null,Ci=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled&&window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.restorationOffset>0?new IntersectionObserver((function(e){try{var t=e.filter((function(e){return e.isIntersecting})).map((function(e){var t=e.target;Ci.unobserve(t);var n=Je.find((function(e){return e.containerRef===t}));if(!n)throw new Error("farUnitsDestroy observer detected an ad unit instance that is no longer in memory");if(!n.state.suspended)throw new Error("farUnitsDestroy detected an ad unit instance that is not in the 'suspended' state");return n})).filter((function(e){return e.parentPlacement.adUnits.map((function(e){return Ye.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Pt(e.conditions)}))}));t.length>0&&(st.log("🔙 Restoring the following ad units:",t),t.forEach((function(e){return e.state.suspended=!1})),Vi(t.filter((function(e){return e.state.triggerFetchStep}))),qi(t.filter((function(e){return!e.state.triggerFetchStep})),(function(e){return Vi(e)})))}catch(e){e instanceof Error&&vt(e,{description:"Exception in Far Units Restore observer"})}}),{rootMargin:"".concat(window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.restorationOffset,"px")}):null;function Li(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{for(var r in t||Ve.filter((function(e){return e.inject&&Pt(e.conditions)&&e.adUnits.length>0})).forEach((function(t){var r=e.querySelectorAll(t.placement);0!==r.length?Array.prototype.slice.apply(r).forEach((function(e,n){try{var r="true"===e.getAttribute("data-ay-manager-destroyed");if(!Je.some((function(n){return n.placementRef===e&&n.parentPlacement===t}))&&!r){var i,o=document.createElement("div"),a={code:Fn(t.code),parentPlacement:t,containerRef:o,placementRef:e,state:{triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:!1,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1,waitingGPTRender:!1},renderInfo:(i={count:0},s(i,Ce.ADVERTISER,""),s(i,Ce.ORDER,""),s(i,Ce.LINE_ITEM,""),s(i,Ce.SIZE,""),s(i,Ce.BIDDER,""),i)};Je.push(a),o.id=a.code,e.insertAdjacentElement(t.position,o),st.logt("📑 Ad unit instance injected - automatic:",[a.code])}}catch(e){e instanceof Error&&vt(e,{description:"Failed to inject ad unit for placement ".concat(t.name," at location '").concat(t.placement,"' at index ").concat(n),adUnitName:t.name})}})):n&&st.warn("📑 Could not inject ad unit instance for placement:",[t.name],"The placement query string returned no elements:",t.placement,"time:"+(new Date-Ai))})),Ve.filter((function(e){return e.inject&&Pt(e.conditions)&&e.htmlUnits.length>0})).forEach((function(t){var r=e.querySelectorAll(t.placement);0!==r.length?Array.prototype.slice.apply(r).forEach((function(e,n){try{Ze.some((function(n){return n.placementRef===e&&n.parentPlacement===t}))||t.htmlUnits.map((function(e){return qe.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).forEach((function(n){var r=document.createElement("script"),i={name:Fn(t.code),parentPlacement:t,parentHtmlUnit:n,placeholderRef:r,placementRef:e,state:"injected"};Ze.push(i),r.id=i.name,r.type="yield-manager/html-unit-placeholder",e.insertAdjacentElement(t.position,r),st.logt("📑 HTML unit instance injected:",[i.name],"(HTML Unit: ".concat(i.parentHtmlUnit.name,")"))}))}catch(e){e instanceof Error&&vt(e,{description:"Failed to inject HTML unit instances for placement ".concat(t.name," ")+"at placement location '".concat(t.placement,"' at index ").concat(n),htmlUnitName:t.name})}})):n&&st.warn("📑 Could not inject HTML unit instance for placement:",[t.name],"The placement query string returned no elements.","time:"+(new Date-Ai))})),Ni)Ni[r]&&Gi(r,n)}catch(e){e instanceof Error&&vt(e,{description:"Failed to inject placements"})}}function xi(){try{Fi(Je.filter((function(e){var t=document.getElementById(e.code);return!t||t!==e.containerRef}))),ki(Ze.filter((function(e){var t=document.getElementById(e.name);return!t||t!==e.placeholderRef}))),Hn()}catch(e){vt(e,{description:"Failed to cleanup disconnected instances"})}}function ji(e){var t=(null!=e?e:{}).skipAdUnits,n=void 0!==t&&t;st.log("🔁 Page change".concat(n?" - HTML units only":"")),dt(Me.BEFORE_PAGE_CHANGE,{}),xi(),function(){try{zi(Je.filter((function(e){return e.parentAdUnit&&!Pt(e.parentAdUnit.conditions)})),"conditions"),Hi(Ze.filter((function(e){return"injected"!==e.state&&!Pt(e.parentHtmlUnit.conditions)}))),Wi()}catch(e){vt(e,{description:"Failed to cleanup unfulfilled instances"})}}(),Li(document,n),dt(Me.AFTER_PAGE_CHANGE,{})}function Bi(e){xi(),Li(e||document,!1,!1)}function Fi(e){var t=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;0!==e.length&&(st.log("Removing the following ad unit instances:",e.map((function(e){return e.code}))),window.googletag.cmd.push((function(){window.googletag.destroySlots(e.map((function(e){return e.slot})).filter((function(e){return null!=e})))})),e.forEach((function(e){try{var n;e.state={triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:!1,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1,waitingGPTRender:!1},delete Ui[e.code],null===(n=e.renderInfo.obs)||void 0===n||n.disconnect(),Pi.unobserve(e.containerRef),Di.unobserve(e.containerRef),t&&(Mi.unobserve(e.containerRef),null==Ci||Ci.unobserve(e.containerRef));var r=document.getElementById(e.code);r&&r.parentNode&&r.parentNode.removeChild(r)}catch(t){var i;if(t instanceof Error)vt(t,{description:"Failed to remove ad unit instance ".concat(e.code),adUnitInstanceCode:e.code,adUnitName:null===(i=e.parentAdUnit)||void 0===i?void 0:i.name})}var o=Je.findIndex((function(t){return t===e}));Je.splice(o,1)})))}function ki(e){0!==e.length&&(st.log("Removing the following HTML unit instances:",e.map((function(e){return e.name}))),e.forEach((function(e){try{e.state="injected";var t=document.getElementById(e.name);t&&t.parentNode&&t.parentNode.removeChild(t);var n=document.querySelectorAll("[data-ay-manager-placement-id='".concat(e.name,"']"));Array.prototype.slice.apply(n).forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)}))}catch(t){var r;if(t instanceof Error)vt(t,{description:"Failed to remove HTML unit instance ".concat(e.name),htmlUnitName:null===(r=e.parentHtmlUnit)||void 0===r?void 0:r.name,htmlUnitInstanceName:e.name})}var i=Ze.findIndex((function(t){return t===e}));Ze.splice(i,1)})))}function zi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;0!==e.length&&(st.log("".concat(n?"Suspending":"Reseting"," the following ad unit instances:"),e.map((function(e){return e.code})),"Reason: ".concat(t)),n&&e.forEach((function(e){var t=cn(e);t&&(e.size=t)})),window.googletag.cmd.push((function(){window.googletag.destroySlots(e.map((function(e){return e.slot})).filter((function(e){return null!=e})))})),e.forEach((function(e){try{var t,i;e.state={triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:n,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1,waitingGPTRender:!1},delete e.slot,delete e.parentAdUnit,delete Ui[e.code],null===(t=e.renderInfo.obs)||void 0===t||t.disconnect(),e.renderInfo=(s(i={count:0,obs:void 0},Ce.ADVERTISER,""),s(i,Ce.ORDER,""),s(i,Ce.LINE_ITEM,""),s(i,Ce.SIZE,""),s(i,Ce.BIDDER,""),i),Pi.unobserve(e.containerRef),Di.unobserve(e.containerRef),r&&(Mi.unobserve(e.containerRef),null==Ci||Ci.unobserve(e.containerRef));var o=e.code;e.code=zn(e.code);var a=document.getElementById(o);if(a&&a.parentNode){var c=document.createElement("div");n&&sn(c,e.size),a.parentNode.replaceChild(c,a),c.id=e.code,e.containerRef=c,n&&r&&(null==Ci||Ci.observe(e.containerRef))}}catch(t){var l;if(t instanceof Error)vt(t,{description:"Unable to ".concat(n?"suspend":"reset"," Ad unit instance ").concat(e.code),adUnitInstanceCode:e.code,adUnitName:null===(l=e.parentAdUnit)||void 0===l?void 0:l.name}),Fi([e])}})))}function Hi(e){0!==(e=e.filter((function(e){return"injected"!==e.state}))).length&&(st.log("Reseting the following HTML unit instances:",e.map((function(e){return e.name}))),e.forEach((function(e){try{var t=document.querySelectorAll("[data-ay-manager-placement-id='".concat(e.name,"']"));Array.prototype.slice.apply(t).forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})),e.state="injected"}catch(t){var n;if(t instanceof Error)vt(t,{description:"Unable to reset HTML unit instance ".concat(e.name),htmlUnitInstanceName:e.name,htmlUnitName:null===(n=e.parentHtmlUnit)||void 0===n?void 0:n.name}),ki([e])}})))}function Wi(){zi(Je.filter((function(e){return e.state.triggerFetchStep&&!e.state.triggerRenderStep&&!Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"fetch").length>0}))||e.state.triggerRenderStep&&!Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))})),"trigger"),Hi(Ze.filter((function(e){return"injected"!==e.state})).filter((function(e){return!Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))})))}function Gi(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];function r(){return i.apply(this,arguments)}function i(){return(i=c(W.mark((function t(){var n,r,i,a,c,s,l;return W.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Je.filter((function(e){var t=e.state,n=t.triggerFetchStep,r=t.waitingAuction,i=t.triggerRenderStep,o=t.suspended,a=t.waitingLazyLoad,c=t.waitingLazyRender;return!(r||n||i||o||a||c)})),!((r=[].concat(o(Vt(n,e,"fetch")),o(Vt(n,e,"render"))).filter((function(e,t,n){return t===n.findIndex((function(t){return t===e}))})).filter((function(e){return e.parentPlacement.adUnits.map((function(e){return Ye.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Pt(e.conditions)}))}))).length>0)){t.next=6;break}return st.log("🎯 Fetch/Render trigger fired for Ad Units:",r.map((function(e){return e.code}))),t.next=6,qi(r,(function(e){var t=e.filter((function(e){return!e.state.triggerRenderStep&&Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))}));Vi(t)}));case 6:if(i=Je.filter((function(e){var t=e.state,n=t.triggerFetchStep,r=t.triggerRenderStep,i=t.waitingLazyLoad,o=t.waitingLazyRender,a=t.waitingAuction,c=e.parentAdUnit,s=e.slot;return n&&!r&&!i&&!o&&!a&&c&&s})),a=Vt(i,e,"render"),c=Yt(a),s=c.adUnitsWithBids,l=c.adUnitsWithoutBids,!(s.length>0)){t.next=13;break}return st.log("🎯 Render trigger fired for Ad Units (Fetch trigger done):",s.map((function(e){return e.code}))),t.next=13,Vi(s);case 13:l.length>0&&(st.log("🎯 Render trigger will fire after auction for Ad Units (Fetch trigger done - but expired/no bids):",l.map((function(e){return e.code}))),Ki(l,!1,(function(){Vi(l)})));case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(){var t=Vt(Ze,e,"render").filter((function(e){return"injected"===e.state})).filter((function(e){return Pt(e.parentHtmlUnit.conditions)}));t.length>0&&(st.log("🎯 Render trigger fired for HTML Units:",t.map((function(e){return e.name}))),Zi(t))}n?(t&&st.logt("⚡ ".concat(e)),Ni[e]=!0,a()):hi(c(W.mark((function n(){return W.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t&&st.logt("⚡ ".concat(e)),Ni[e]=!0,n.next=4,r();case 4:a();case 5:case"end":return n.stop()}}),n)}))))}function Vi(e){return Yi.apply(this,arguments)}function Yi(){return Yi=c(W.mark((function e(t){var n,r,i,o,a,s,l,u,d,f;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits,i=r.enabled,o=r.destructionOffset,a=null===(n=window.ayManagerEnv.checkIfAdUnitIsVisible)||void 0===n||n,0!==t.length){e.next=4;break}return e.abrupt("return");case 4:if(st.log("🎯 Trigger Render step for ad units:",t.map((function(e){return e.code}))),t.forEach((function(e){e.state.triggerRenderStep=!0})),a&&(s=[],t=t.filter((function(e){return!!xt(e)||(s.push(e),!1)})),s.forEach((function(e){e.state.triggerRenderStep=!1})),st.func((function(){s.length&&st.warn("🚫 Trigger ignored for:",s.map((function(e){return e.code})),"Reason: visibility")}))),!i){e.next=16;break}return l=window.ayManagerEnv.settings.experiments.destroyFarUnitsAboveSightOnly,u=void 0!==l&&l,d=[],e.next=12,ln(t,function(){var e=c(W.mark((function e(t){var n;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ht(t.containerRef,{nearInSight:!0,pixelsOffset:o,aboveSight:u});case 2:return(n=!e.sent)&&d.push(t),e.abrupt("return",!n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 12:t=e.sent,d.forEach((function(e){e.state.triggerRenderStep=!1})),st.func((function(){d.length&&st.log("💤 Trigger Render step ignored for:",d,"Reason: Inside destroy far units offset")})),d.forEach((function(e){e.state.suspended=!0,null==Ci||Ci.observe(e.containerRef)}));case 16:return f=[],e.next=19,ln(t,function(){var e=c(W.mark((function e(t){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.parentPlacement.lazyRender){e.next=4;break}return e.abrupt("return",!0);case 4:return e.next=6,Ht(t.containerRef,{nearInSight:!0,pixelsOffset:_i});case 6:if(!e.sent){e.next=11;break}return e.abrupt("return",!0);case 11:return t.state.triggerRenderStep=!1,t.state.waitingLazyRender=!0,Di.observe(t.containerRef),f.push(t.code),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 19:t=e.sent,st.func((function(){f.length&&st.log("💤 Trigger Render step ignored for:",f,"Reason: Out of lazy render offset")})),t.length>0&&Xr(t,!1);case 22:case"end":return e.stop()}}),e)}))),Yi.apply(this,arguments)}function qi(e,t){return Ji.apply(this,arguments)}function Ji(){return Ji=c(W.mark((function e(t,n){var i,a,l,u,d,f;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(i=window.ayManagerEnv.checkIfAdUnitIsVisible)||void 0===i||i,0!==t.length){e.next=3;break}return e.abrupt("return");case 3:return st.log("🎯 Trigger Fetch step for ad units:",t.map((function(e){return e.code}))),a&&(l=[],t=t.filter((function(e){return!!xt(e)||(l.push(e.code),!1)})),st.func((function(){l.length&&st.warn("🚫 Trigger ignored for:",l,"Reason: visibility")}))),u=[],e.next=8,ln(t,function(){var e=c(W.mark((function e(t){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.parentPlacement.lazyLoad){e.next=4;break}return e.abrupt("return",!0);case 4:return e.next=6,Ht(t.containerRef,{nearInSight:!0,pixelsOffset:Ri});case 6:if(!e.sent){e.next=11;break}return e.abrupt("return",!0);case 11:return t.state.waitingLazyLoad=!0,Pi.observe(t.containerRef),u.push(t.code),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 8:t=e.sent,st.func((function(){u.length&&st.log("💤 Trigger Fetch step ignored for:",u,"Reason: Out of lazy load offset")})),d=t.reduce((function(e,t){return Oi(Oi({},e),{},s({},t.code,t.parentPlacement.adUnits.map((function(e){return Ye.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).filter((function(e){return Pt(e.conditions)})).map((function(e){return{code:Fn(t.parentPlacement.code,e._id,kn(t.code).instanceNumber),parentAdUnit:e,parentPlacement:t.parentPlacement}}))))}),{}),t=t.filter((function(e){return d[e.code].length>0})),d=Object.entries(d).filter((function(e){var t=r(e,2);return t[0],t[1].length>0})).reduce((function(e,t){var n=r(t,2),i=n[0],o=n[1];return Oi(Oi({},e),{},s({},i,o))}),{}),f=Object.values(d).reduce((function(e,t){return[].concat(o(e),o(t))}),[]),t.forEach((function(e){e.state.suspended&&sn(e.containerRef,e.size),e.state.waitingAuction=!0})),Kr(f,(function(){var e=Object.entries(d).map((function(e){var n,i,o=r(e,2),a=o[0],c=o[1],s=t.find((function(e){return e.code===a&&e.state.waitingAuction}));if(!s)return null;if(null!==(n=window[We])&&void 0!==n&&n.libLoaded){var l=c.map((function(e){var t=window[We].getHighestUnusedBidResponseForAdUnitCode(e.code);return{code:e.code,cpm:"cpm"in t?t.cpm:-1,partialIntance:e}}));i=l.reduce((function(e,t){return t.cpm>e.cpm?t:e}),l[0]).partialIntance}else i=c[Math.floor(Math.random()*c.length)];return st.log("✏️ Renaming instance from:",s.code,"to:",i.code),s.containerRef.id=s.code=i.code,s.parentAdUnit=i.parentAdUnit,s})).filter((function(e){return null!=e}));Hn();var i=e.map((function(e){try{Qr(e),$r(e.code);var t=tn(e.parentPlacement.style);try{e.containerRef.style.cssText=Rt(t),it&&e.containerRef.classList.add("".concat(ge,"_highlight"))}catch(t){t instanceof Error&&vt(t,{description:"Unable to parse ad unit ".concat(e.code," styles")})}return e.parentPlacement.slug&&e.containerRef&&e.containerRef.classList.add("".concat(ge,"_slug")),e.state.waitingAuction=!1,e.state.triggerFetchStep=!0,e}catch(t){var n;if(t instanceof Error)vt(t,{description:"Unable to trigger ad unit ".concat(e.code),adUnitInstanceCode:e.code,adUnitName:null===(n=e.parentAdUnit)||void 0===n?void 0:n.name});return Fi([e]),!1}}));n(i)}));case 16:case"end":return e.stop()}}),e)}))),Ji.apply(this,arguments)}function Zi(e){e.forEach((function(e){try{e.state="rendered";var t=document.createElement("div"),n=e.parentPlacement,r=n.position,i=n.inject;t.innerHTML=Rt(e.parentHtmlUnit.htmlCode);var o=Array.from(t.children).slice(),a=[];(i&&("afterbegin"===r||"afterend"===r)?o.slice().reverse():o).forEach((function(t){t.setAttribute("data-ay-manager-placement-id",e.name),i?e.placementRef.insertAdjacentElement(r,t):e.placementRef.appendChild(t)})),o.forEach((function(e){"SCRIPT"===e.tagName&&a.push(e),Array.from(e.getElementsByTagName("SCRIPT")).slice().forEach((function(e){return a.push(e)}))})),a.forEach((function(t){return function(e,t){try{var n=document.createElement("script"),r=!e.src,i=Array.prototype.slice.call(e.attributes);n.async=!1,i.forEach((function(e){return n.setAttribute(e.name,e.value)})),r?(n.type="text/javascript",n.appendChild(document.createTextNode(e.innerHTML))):n.addEventListener("error",(function(e){var n=e.error;vt(n instanceof Error?n:new Error(n),{type:"script.onerror",description:"Error while trying to trigger HTML unit instance: ".concat(t,". ")+"One of its external scripts failed to load!",htmlUnitName:t},!1)})),e.parentElement&&e.parentElement.replaceChild(n,e)}catch(e){e instanceof Error&&vt(e,{description:"Unable to execute script from HTMLUnit ".concat(t),htmlUnitInstanceName:t})}}(t,e.name)}))}catch(t){var c;if(t instanceof Error)vt(t,{description:"Unable to trigger HTML unit instance: ".concat(e.name),htmlUnitInstanceName:e.name,htmlUnitName:null===(c=e.parentHtmlUnit)||void 0===c?void 0:c.name}),Hi([e])}}))}function Ki(e,t,n){var r=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;e.forEach((function(e){e.state.waitingAuction=!0,r&&Mi.unobserve(e.containerRef)})),Kr(e,(function(){var r=e.filter((function(e){return e.state.waitingAuction&&e.parentAdUnit&&e.slot}));r.forEach((function(e){e.state.waitingAuction=!1})),n?n(r):Xr(r,t)}))}function Xi(e){try{var t=function(e){return"string"==typeof e};if(!t(e)||!Ve.some((function(t){return t.code===e}))){var n=e;return void window.googletag.cmd.push((function(){if(window.googletag._display(n),!window.googletag._wasInitialLoadDisabled){var e=null!=(r=n)&&"object"===i(r)&&"id"in r?window.googletag.pubads().getSlots().find((function(e){return e.getSlotElementId()===n.id})):t(n)?window.googletag.pubads().getSlots().find((function(e){return e.getSlotElementId()===n})):n;null!=e&&window.googletag.pubads().refresh([e])}var r}))}var r=document.querySelector("[data-ay-manager-id='".concat(e,"']"))||document.getElementById(e);if(!r)return;r.removeAttribute("data-ay-manager-id"),r.setAttribute("data-manual-placement-group",e),r.children[0]&&r.removeChild(r.children[0]),Ve.filter((function(t){return!1===t.inject&&t.code===e&&Pt(t.conditions)})).forEach((function(e){try{if(e.adUnits.length>0){var t,n=document.createElement("div"),i={code:Fn(e.code),parentPlacement:e,containerRef:n,state:{triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:!1,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1,waitingGPTRender:!1},renderInfo:(t={count:0},s(t,Ce.ADVERTISER,""),s(t,Ce.ORDER,""),s(t,Ce.LINE_ITEM,""),s(t,Ce.SIZE,""),s(t,Ce.BIDDER,""),t)};if(Je.push(i),n.id=i.code,r.appendChild(n),st.logt("📑 Ad unit instance injected - manual:",[i.code]),Object.values(Ae).some((function(e){return Ni[e]&&(Vt([i],e,"fetch").length>0||Vt([i],e,"render").length>0)})))i.parentPlacement.adUnits.map((function(e){return Ye.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Pt(e.conditions)}))&&(st.logt("🎯 Trigger fired for:",[i.code]),qi([i],(function(e){Vi(e.filter((function(e){return Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))&&!e.state.triggerRenderStep})))})))}if(e.htmlUnits.length>0){var o=e.htmlUnits.map((function(e){return qe.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).filter((function(e){return Pt(e.conditions)}));if(o.length>0){var a=o.map((function(t){var n=document.createElement("script"),i={name:Fn(e.code),parentPlacement:e,parentHtmlUnit:t,placeholderRef:n,placementRef:r,state:"injected"};return Ze.push(i),n.id=i.name,n.type="yield-manager/html-unit-placeholder",r.appendChild(n),i}));st.logt("📑 HTML unit instances injected - manual:",Ze.map((function(e){return e.name}))),Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))&&(st.logt("🎯 Trigger fired for:",Ze.map((function(e){return e.name}))),Zi(a))}}}catch(t){t instanceof Error&&vt(t,{description:"Failed to manually inject placement ".concat(e.name),adUnitName:e.name})}}))}catch(t){t instanceof Error&&vt(t,Oi({description:"Exception in display API call"},"string"==typeof e?{adUnitCodes:[e]}:{}))}}function Qi(){return $i.apply(this,arguments)}function $i(){return($i=c(W.mark((function e(){var t,n,o,a,c,s,l;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=function(e,t){var n;if("number"==typeof e)return e;var r=e.refreshCallsLimit;if(r>0&&t.renderInfo.count>=r)return 0;var i=null===(n=e.rules.find((function(e){if(!e.enabled)return!1;switch(e.type){case Ce.ADVERTISER:case Ce.ORDER:case Ce.LINE_ITEM:case Ce.SIZE:case Ce.BIDDER:return e.value.includes(t.renderInfo[e.type]);default:return!1}})))||void 0===n?void 0:n.seconds;return null!=i?i:e.defaultRefresh},t=[],n=Object.entries(Ui).filter((function(e){var t=r(e,2);return t[0],null!==t[1].viewedAt})),!document.hidden){e.next=5;break}return e.abrupt("return");case 5:o=Ei(n),e.prev=6,c=W.mark((function e(){var n,i,o,c,s,u,d,f,p,g;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r(a.value,2),i=n[0],o=n[1],c=o.slot,s=o.viewedAt,u=o.refreshControl,(d=Je.find((function(e){return e.code===i})))&&d.parentAdUnit&&d.state.rendered){e.next=5;break}return delete Ui[i],e.abrupt("return",{v:void 0});case 5:if(0!==(f=l(u,d))){e.next=10;break}Ro(c,null),e.next=18;break;case 10:if(p=s.getTime()<=Date.now()-1e3*f,e.t0=window.ayManagerEnv.settings.experiments.refreshRegardlessOfView,e.t0){e.next=16;break}return e.next=15,Ht(d.containerRef);case 15:e.t0=e.sent;case 16:g=e.t0,p&&g&&(delete Ui[i],t.push(i));case 18:case"end":return e.stop()}}),e)})),o.s();case 9:if((a=o.n()).done){e.next=16;break}return e.delegateYield(c(),"t0",11);case 11:if("object"!==i(s=e.t0)){e.next=14;break}return e.abrupt("return",s.v);case 14:e.next=9;break;case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(6),o.e(e.t1);case 21:return e.prev=21,o.f(),e.finish(21);case 24:t.length>0&&eo(t,{useInstanceCodes:!0,mode:"page",ignoreRefreshLimits:!0});case 25:case"end":return e.stop()}}),e,null,[[6,18,21,24]])})))).apply(this,arguments)}function eo(e,t){return to.apply(this,arguments)}function to(){return(to=c(W.mark((function e(t,n){var r,i,o,a,c,l,u,d,f,p,g,h,v,m,y,b,E,w;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,l=r.useInstanceCodes,u=void 0!==l&&l,d=r.preFetch,f=void 0!==d&&d,p=r.onlyUpdateViewedAt,g=void 0!==p&&p,h=r.ignoreRefreshLimits,v=void 0!==h&&h,m=[],!rt){e.next=6;break}return st.warn("Refresh cancelled due 'no_refresh' debug flag!"),e.abrupt("return");case 6:if(null!=t){e.next=10;break}m=Je.slice(),e.next=16;break;case 10:if(!(Array.isArray(t)&&t.length>0)){e.next=14;break}m=u?Je.filter((function(e){return t.includes(e.code)})):qt(t,Je),e.next=16;break;case 14:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.refresh()"+JSON.stringify(t)),e.abrupt("return");case 16:return m=(m=m.filter((function(e){return e.state.rendered}))).filter((function(e){var t;return!((null===(t=window.ayManagerEnv.checkIfAdUnitIsVisible)||void 0===t||t)&&!xt(e))||(zi([e],"visibility"),!1)})),v||(m=m.filter((function(e){var t=window.ayManagerEnv.settings.yieldScriptSettings.disableRefreshForDirectCampaign,n=t.advertiserIds,r=t.orderIds,i=e.renderInfo[Ce.ADVERTISER],o=e.renderInfo[Ce.ORDER],a=""!==i&&!en(n.include,n.exclude,i.toString()),c=""!==o&&!en(r.include,r.exclude,o.toString());return!a&&!c}))),e.next=21,Wt(m,o,c);case 21:(m=(m=e.sent).filter((function(e){return null!=e.parentAdUnit&&null!=e.slot}))).length>0&&(y=m.map((function(e){return e.code})),g?(st.log("🔄 Updating the viewedAt info for the following Ad Unit instances:",y),m.map((function(e){return e.slot})).filter((function(e){return null!=e})).forEach((function(e){Ro(e)}))):(dt(Me.BEFORE_REFRESH,y,m),m.forEach((function(e){var t,n;delete Ui[e.code],null===(t=e.renderInfo.obs)||void 0===t||t.disconnect(),e.renderInfo=(s(n={count:e.renderInfo.count+1,obs:void 0},Ce.ADVERTISER,""),s(n,Ce.ORDER,""),s(n,Ce.LINE_ITEM,""),s(n,Ce.SIZE,""),s(n,Ce.BIDDER,""),n)})),f?(b=Yt(m),E=b.adUnitsWithBids,w=b.adUnitsWithoutBids,st.log("🔄 Refreshing the following Ad Unit Instances:",y,"\nThe following will be rendered right away (pre-fetch):",E.map((function(e){return e.code}))),E.length>0&&(Xr(E,!0),Ki(E,!0,(function(){}))),w.length>0&&Ki(w,!0,(function(e){Xr(e,!0),Ki(w,!0,(function(){}))}))):(st.log("🔄 Refreshing the following Ad Unit Instances:",y),Ki(m,!0)))),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in refresh API call"});case 29:case"end":return e.stop()}}),e,null,[[0,26]])})))).apply(this,arguments)}function no(e,t){return ro.apply(this,arguments)}function ro(){return(ro=c(W.mark((function e(t,n){var r,i,o,a,c,s,l,u;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,s=r.useInstanceCodes,l=void 0!==s&&s,u=[],null!=t){e.next=7;break}u=Je.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Je.filter((function(e){return t.includes(e.code)})):qt(t,Je),e.next=13;break;case 11:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.fetch()"+JSON.stringify(t)),e.abrupt("return");case 13:return u=u.filter((function(e){return null!=e.parentAdUnit&&null!=e.slot})),e.next=16,Wt(u,o,c);case 16:(u=e.sent).length>0&&(st.log("📩 Fetching bids for the following Ad Unit Instances:",u.map((function(e){return e.code}))),Ki(u,!1,(function(){}))),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in fetch API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function io(e,t){return oo.apply(this,arguments)}function oo(){return(oo=c(W.mark((function e(t,n){var r,i,o,a,c,s,l,u;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,s=r.useInstanceCodes,l=void 0!==s&&s,u=[],null!=t){e.next=7;break}u=Je.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Je.filter((function(e){return t.includes(e.code)})):qt(t,Je),e.next=13;break;case 11:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.render()"+JSON.stringify(t)),e.abrupt("return");case 13:return u=u.filter((function(e){return null!=e.parentAdUnit&&null!=e.slot})),e.next=16,Wt(u,o,c);case 16:(u=e.sent).length>0&&(st.log("🎇 Rendering the following Ad Unit Instances:",u.map((function(e){return e.code}))),u.forEach((function(e){return Di.unobserve(e.containerRef)})),Xr(u,!1)),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in render API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function ao(e,t){return co.apply(this,arguments)}function co(){return co=c(W.mark((function e(t,n){var r,i,o,a,c,s,l,u;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,s=r.useInstanceCodes,l=void 0!==s&&s,u=[],null!=t){e.next=7;break}u=Je.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Je.filter((function(e){return t.includes(e.code)})):qt(t,Je),e.next=13;break;case 11:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.reset()"+JSON.stringify(t)),e.abrupt("return");case 13:return u=u.filter((function(e){var t=e.state,n=t.suspended,r=t.triggerFetchStep,i=t.triggerRenderStep;return n||r||i})),e.next=16,Wt(u,o,c);case 16:zi(u=e.sent,"reset"),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in reset API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])}))),co.apply(this,arguments)}function so(e,t){return lo.apply(this,arguments)}function lo(){return(lo=c(W.mark((function e(t,n){var r,i,o,a,c,s,l,u;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,s=r.useInstanceCodes,l=void 0!==s&&s,u=[],null!=t){e.next=7;break}u=Je.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Je.filter((function(e){return t.includes(e.code)})):qt(t,Je),e.next=13;break;case 11:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.destroy()"+JSON.stringify(t)),e.abrupt("return");case 13:return e.next=15,Wt(u,o,c);case 15:(u=e.sent).forEach((function(e){e.placementRef&&e.placementRef.setAttribute("data-ay-manager-destroyed","true")})),Fi(u),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in destroy API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function uo(e){try{var t=[];if(null==e)t=Ve.slice();else{if(!(Array.isArray(e)&&e.length>0))return void st.error("Invalid 'placementCodes' provided to ayManagerEnv.restore()"+JSON.stringify(e));t=Ve.filter((function(t){return e.includes(t.code)}))}t.length>0&&(st.log("🔙 Restoring the following placements:",t.map((function(e){return e.name}))),t.forEach((function(e){var t=document.querySelectorAll(e.placement);Array.prototype.slice.apply(t).forEach((function(e){return e.removeAttribute("data-ay-manager-destroyed")}))})))}catch(e){e instanceof Error&&vt(e,{description:"Exception in restore API call"})}}function fo(e,t){return po.apply(this,arguments)}function po(){return(po=c(W.mark((function e(t,n){var r,i,o,a,c,s,l,u,d;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=(r=null!=n?n:{}).mode,o=void 0===i?"page":i,a=r.offset,c=void 0===a?400:a,s=r.useInstanceCodes,l=void 0!==s&&s,u=[],null!=t){e.next=7;break}u=Je.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}l?(d=t.map((function(e){return e.replace(/_[^_]+$/,"")})),u=Je.filter((function(e){return d.includes(e.code)}))):u=qt(t,Je),e.next=13;break;case 11:return st.error("Invalid 'placementCodes' provided to ayManagerEnv.trigger()"+JSON.stringify(t)),e.abrupt("return");case 13:return u=u.filter((function(e){return!e.state.triggerFetchStep&&!e.state.triggerRenderStep&&Object.values(Ae).some((function(t){return Ni[t]&&(Vt([e],t,"fetch").length>0||Vt([e],t,"render").length>0)}))})),e.next=16,Wt(u,o,c);case 16:(u=e.sent).length>0&&(st.log("🔙 Triggering the following Ad Unit Instances:",u.map((function(e){return e.code}))),qi(u,(function(e){Vi(e.filter((function(e){return Object.values(Ae).some((function(t){return Ni[t]&&Vt([e],t,"render").length>0}))&&!e.state.triggerRenderStep})))}))),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Exception in trigger API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function go(){try{Gi(Ae.CONSENT_INITIALIZATION)}catch(e){e instanceof Error&&vt(e,{description:"Exception in fakeTCLoad API call"})}}function ho(){window.ayManagerEnv.cmd.push((function(){Wi(),Gi(Ae.MANUAL_EVENT)}))}st.group("Yield Manager - Initializing..."),st.log("pbjs loaded:",null!==(Ii=null===(Si=window[We])||void 0===Si?void 0:Si.libLoaded)&&void 0!==Ii&&Ii),st.log("Ad units:",Ye),st.log("HTML units:",qe),st.groupEnd(),function(){var e=window.ayManagerEnv.settings.yieldScriptSettings,t=e.enableTracker,n=e.trackerId,r=e.trackerConfig;if(t&&(!window.assertive||!window.assertive.initialized)){var i;try{i=At(r)}catch(e){e instanceof Error&&vt(e,{description:"Unable to evaluate tracker config"})}window.assertive=i||{},window.assertive.entityId=n,window.assertive.debug=nt,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createElement("script");n.src=e,n.async=t,dn(n)}("https://".concat(n,".ay.delivery/client-v2.js"))}}(),function(e){window.googletag.cmd.push((function(){window.googletag.display=e,window.googletag.pubads().disableInitialLoad(),window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().setCentering(!0),window.googletag.enableServices()}))}(Xi),Qe&&function(){try{var e;(null!==(e=window.ayManagerEnv.settings.yieldScriptSettings.apsBidPool)&&void 0!==e?e:{enabled:!1}).enabled&&(r="KYjhyGIHnjBUB+cBsT8tyg==62bSNrO3b3==YCt5D4F7q5GclDDPMr6KphYGcR1tPtirQ==",new Promise((function(e,t){try{if("crypto"in window&&"subtle"in window.crypto){var n=function(e){return String.fromCharCode.apply(null,e)},o=function(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))},a=function(){var e=c(W.mark((function e(t,r,i){var a,c;return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,crypto.subtle.importKey("raw",o(r),{name:"AES-CTR"},!1,["encrypt","decrypt"]);case 2:return a=e.sent,e.t0=n,e.t1=Uint8Array,e.next=7,crypto.subtle.decrypt({name:"AES-CTR",counter:o(i),length:128},a,o(t));case 7:return e.t2=e.sent,e.t3=new e.t1(e.t2),c=(0,e.t0)(e.t3),e.abrupt("return",c);case 11:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),s=window.ayManagerEnv.entityId,l=new XMLHttpRequest;l.open("GET","https://".concat(s,".ay.delivery/data/").concat(s,"/m.json")),l.onload=function(){200===l.status?a(l.responseText,r.slice(0,24),r.slice(47)).then((function(n){try{var r=JSON.parse(n);"object"===i(r)&&null!=r&&Object.keys(r).length>0?e(r):t("Data is empty or invalid")}catch(e){t(e)}})).catch((function(e){t(e)})):t(new Error("Request failed with status ".concat(l.status)))},l.onerror=function(){t(new Error("Request failed"))},l.send()}else t(new Error("'crypto' is not available in window"))}catch(e){t(e)}})).then((function(e){Object.assign(pr,e)})).catch((function(e){var t;st.warn(null!==(t="Amazon setup is likely not synchronized yet (this can take up to 4h)! "+e.message)&&void 0!==t?t:"",e)})));var t=!1,n=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!t){t=!0;var r=window.ayManagerEnv.settings.yieldScriptSettings.publisherId,i=kt();if(i.pubID=r,i.adServer="googletag",i.videoAdServer="DFP",null==i.bidTimeout&&(i.bidTimeout=kr),null==(null===(e=i.gdpr)||void 0===e?void 0:e.cmpTimeout)&&(i.gdpr=i.gdpr||{},i.gdpr.cmpTimeout=Wr),null!=window.apstag){var o=function(e){dt(Me.APS_BEFORE_INIT,e),e.deals=!0,window.apstag.init(e,(function(){for(dt(Me.APS_AFTER_INIT,e);Zr.length;){var t;null===(t=Zr.pop())||void 0===t||t()}zt(Zr,(function(e){return e()}))}))};try{var a=Mr(Mr({},i),window.ayManagerEnv.apsTagInit?window.ayManagerEnv.apsTagInit:{});null!=n&&(a.params=a.params||{},a.params.us_privacy=n),o(a)}catch(e){e instanceof Error&&vt(e,{description:"Unable to read apsTagInit data, falling back to default APS initialization"}),o(i)}}}};"__uspapi"in window?(window.__uspapi("getUSPData",1,(function(e,t){t?n(e.uspString):n()})),setTimeout((function(){n()}),Gr)):n(),window.googletag.cmd.push((function(){googletag.pubads().addEventListener("slotRenderEnded",(function(e){var t=e.slot,n=e.isBackfill,r=e.isEmpty;if(null!=window.apstag)try{var i=r||n?void 0:-1!==t.getHtml().lastIndexOf("apstag.renderImp(document,"),o=gr.find((function(e){var n=e.slotID,r=e.status;return n===t.getSlotElementId()&&"targetingSet"===r}));window.ayManagerEnv.settings.experiments.skipClearBidTargeting||function(e,t){e.forEach((function(e){t.getTargeting(e).length>0&&t.clearTargeting(e)}))}(null!=o&&o.helpers.targetingKeys.length>0?o.helpers.targetingKeys:["amzniid","amznp","amznsz","amznbid","amznactt"],t),null!=o&&(i?(o.status="rendered",gr.splice(gr.indexOf(o),1)):delete o.status)}catch(e){e instanceof Error&&vt(e,{description:"Failed to detect if APS bid won"})}}))}))}catch(e){e instanceof Error&&vt(e,{description:"Exception during APS initialization"})}var r}(),$e&&window[We].que.push((function(){try{var e=window.ayManagerEnv.settings.prebidSettings,t=e.customBidPool.enabled,n=e.persistentBidCaching;void 0===Br.disableAjaxTimeout&&(Br.disableAjaxTimeout=!0),void 0===Br.maxRequestsPerOrigin&&(Br.maxRequestsPerOrigin=6),t&&(Br.useBidCache=!0),window[We].setConfig(Br),Ge.bidders.forEach((function(e){e.alias&&window[We].aliasBidder(e.bidder,e.alias)})),Ge.bidders.forEach((function(e){var t=e.alias,n=e.bidder,r=e.cpmAdjustments,i=e.storageAllowed,o=null!=t?t:n,a=window[We].bidderSettings[o]=window[We].bidderSettings[o]||{};a.bidCpmAdjustment=function(e){return e*r},a.storageAllowed=i})),window[We].onEvent("bidResponse",(function(e){var t;"teads"===((null===(t=window[We].aliasRegistry)||void 0===t?void 0:t[e.bidderCode])||e.bidderCode)&&(e.ttl=140)})),n&&Yn(),window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){var t=e.slot,n=e.isEmpty,r=e.isBackfill;try{var i=t.getSlotElementId();if(!i.includes("__".concat(ge,"__")))return;var o=window[We].getBidResponsesForAdUnitCode(i).bids.find((function(e){return"targetingSet"===e.status}));o&&(window.ayManagerEnv.settings.experiments.bidLostCheckImprovements&&(n||r)?a(o):setTimeout((function(){"targetingSet"===o.status&&a(o)}),500)),t.getTargeting("aym_refresh").length>0?t.clearTargeting("aym_refresh"):vt(new Error("Setting and removing a refresh targeting!"),{adUnitCodes:[i]})}catch(e){e instanceof Error&&vt(e,{description:"Failed to reset bid that lost to dfp"})}function a(e){try{nt&&st.log("'slotRenderEnded' timer - Bid lost to dfp. Slot element ID: ".concat(e.adUnitCode,". Refreshing bid: ").concat(e.adId),JSON.parse(JSON.stringify(e))),e.pooled&&e.originalAdUnitCode&&(e.adUnitCode=e.originalAdUnitCode,delete e.pooled,delete e.originalAdUnitCode,delete e.originalHighestBid),delete e.status,e.reset=!0}catch(e){e instanceof Error&&vt(e,{description:"Failed to reset bid that lost to dfp"})}}}))})),window.ayManagerEnv.settings.experiments.bidLostCheckImprovements&&window[We].onEvent("bidWon",(function(e){e.reset&&(e.status="rendered")})),window[We].onEvent("bidWon",(function(e){var t=Je.find((function(t){return t.code===e.adUnitCode}));t&&(t.renderInfo[Ce.BIDDER]=e.bidder)}))}catch(e){e instanceof Error&&vt(e,{description:"Exception during Prebid initialization"})}})),window.assertiveQueue.push((function(){var e,t;"function"==typeof window.assertive.setConfig&&void 0===(null===(e=window.assertive.analytics)||void 0===e||null===(t=e.integrations)||void 0===t?void 0:t.fullErrorLogging)&&window.assertive.setConfig("analytics.integrations.fullErrorLogging",!0)})),window.ayManagerEnv.refresh=eo,window.ayManagerEnv.fetch=no,window.ayManagerEnv.render=io,window.ayManagerEnv.reset=ao,window.ayManagerEnv.destroy=so,window.ayManagerEnv.restore=uo,window.ayManagerEnv.trigger=fo,window.ayManagerEnv.changePage=jn((function(){return ji()}),30),window.ayManagerEnv.display=Xi,window.ayManagerEnv.fakeTCLoad=go,window.ayManagerEnv.dispatchManualEvent=ho,window.ayManagerEnv.onEvent=pt,window.ayManagerEnv.offEvent=gt,window.ayManagerEnv.onceEvent=ft,window.ayManagerEnv.viewableSlots=Ui,window.ayManagerEnv.debug={flags:et,conditionsEvaluation:[],runDebugConditionsEvaluation:Vn},window.ayManagerEnv.tools={getCookie:Tt,setCookie:Ot,getEnabledAdUnits:li,getEnabledPlacements:si,getEnabledHTMLUnits:ui},window.ayManagerEnv.getHighestQualifiedBids=function(e){var t,n=window.ayManagerEnv.settings,r=n.prebidSettings.customBidPool.enabled,i=n.adUnitInstances;if(!window[We].libLoaded)return st.warn("ayManagerEnv.getHighestQualifiedBid() was called but Prebid is not loaded."),{};if(null==e||Array.isArray(e)&&0===e.length)e=i.map((function(e){return e.code}));else if(!function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e))return st.error("Invalid 'adUnitCodes' provided to ayManagerEnv.getHighestQualifiedBid()"+JSON.stringify(e)),{};if(r)t=nr(e,!1);else{if(!Zn.useBidCache)return e.map((function(e){return window[We].getHighestUnusedBidResponseForAdUnitCode(e)})).filter((function(e){return"adId"in e})).reduce((function(e,t){return Jn(Jn({},e),{},s({},t.adUnitCode,t))}),{});t=tr(e,!1)}return e.reduce((function(e,n){var r;return Jn(Jn({},e),{},s({},n,null===(r=t.find((function(e){return e.adUnitCode===n})))||void 0===r?void 0:r.bid))}),{})},document.head.appendChild(document.createElement("style")).innerHTML="\n            .".concat(ge,"_slug:before {\n                content: 'Ad';\n                display: block;\n                width: 100%;\n                text-align: center;\n                font-size: 10px;\n                color: #6a737c;\n            }\n        "),function(){if(it){var e="",t="".concat(ge,"_highlight");e+=".".concat(t," { background-color: #eee; outline: solid 2px #0f0; outline-offset: -2px; }"),e+=".".concat(t," > span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2vw; font-family: monospace; }");var n=document.head.appendChild(document.createElement("style"));n.id="".concat(ge,"_debug_styles"),n.innerHTML=e}}(),function(){var e=window.ayManagerEnv.settings.experiments,t=e.sandbox,n=e.sandboxObserve;if(!1!==t){"string"==typeof t&&(ei=t);var r=new MutationObserver((function(e){var t=e[0].target;t.getAttribute("sandbox")!==ei&&ti(t)})),i=Node.prototype.appendChild;Node.prototype.appendChild=function(e){return"IFRAME"===e.nodeName&&e.id&&e.id.startsWith("google_ads_iframe_")&&(ti(e),n&&r.observe(e,{attributes:!0,attributeFilter:["sandbox"]})),i.apply(this,arguments)}}}(),ji({skipAdUnits:!0}),Gi(Ae.SCRIPT_LOADED,!0,!0),window.googletag.cmd.push((function(){googletag.pubads().addEventListener("slotRenderEnded",(function(e){var t=e.slot,n=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled,r=t.getSlotElementId(),i=Je.find((function(e){return e.code===r}));i&&(i.state.rendered=!0,i.state.waitingGPTRender=!1,n&&Mi.observe(i.containerRef))}))}));var vo=history,mo=vo.pushState,yo=vo.replaceState,bo=window.ayManagerEnv.settings.yieldScriptSettings.spa,Eo=void 0===bo?{mode:"manual"}:bo,wo=jn(ji,50),To=window.location.pathname,Oo=function(){var e=window.location.pathname;e!==To&&(gr.length=0,To=e),"history"===Eo.mode&&requestAnimationFrame((function(){wo()}))};history.pushState=function(){mo.apply(history,arguments),Oo()},history.replaceState=function(){yo.apply(history,arguments),Oo()},window.addEventListener("popstate",(function(e){e.state&&Oo()}));var Io=function(){try{ji();for(var e=function(e){try{"function"==typeof e&&e()}catch(e){e instanceof Error&&vt(e,{description:"Exception in queued YM command"})}};window.ayManagerEnv.cmd.length;)e(window.ayManagerEnv.cmd.pop());zt(window.ayManagerEnv.cmd,(function(t){return e(t)})),Gi(Ae.WINDOW_READY),So(),ci(Bi)}catch(e){e instanceof Error&&vt(e,{description:"Exception in onReady listener"})}},So=function(){if("__tcfapi"in window)try{window.__tcfapi("addEventListener",2,(function(e,t){Ni[Ae.CONSENT_INITIALIZATION]||!1!==e.gdprApplies&&"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus?t||st.log("Listener for 'TCF Load' event could not be registered!"):(qr(Vr),Gi(Ae.CONSENT_INITIALIZATION),window.__tcfapi("removeEventListener",2,(function(e){}),e.listenerId))}))}catch(e){e instanceof Error&&vt(e,{description:"Exception in Consent Initialization listener"})}else qr(Vr),st.warn("__tcfapi framework/stub not found")};/interactive/.test(document.readyState)||/complete/.test(document.readyState)?Io():document.addEventListener("readystatechange",(function(e){"interactive"===e.target.readyState&&Io()}));var Ao=function(){try{Gi(Ae.WINDOW_LOADED)}catch(e){e instanceof Error&&vt(e,{description:"Exception in onLoad listener"})}};function Ro(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=e.getSlotElementId(),r=Je.find((function(e){return e.code===n}));if(r&&r.parentAdUnit){var i,o=r.parentAdUnit.refresh,a=o.refreshBasic,c=o.refreshControls,s=null==c&&0===a,l=null===(null===(i=Ui[n])||void 0===i?void 0:i.viewedAt);s||l||(Ui[n]={slot:e,viewedAt:t,refreshControl:u(r.parentAdUnit.refresh)})}function u(e){var t=window.ayManagerEnv.settings.definitions,n=e.refreshBasic,r=e.refreshControls;if(r){var i=r.find((function(e){var n,r;return Pt(null!==(n=null===(r=t.refreshControls[e])||void 0===r?void 0:r.conditions)&&void 0!==n?n:[])}));return i?t.refreshControls[i]:(st.warn("The conditions of all refresh controls associated with this Ad Unit evaluated to false. This will cause the Ad Unit not to refresh."),0)}return n}}/complete/.test(document.readyState)?Ao():document.addEventListener("readystatechange",(function(e){"complete"===e.target.readyState&&Ao()})),window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("impressionViewable",(function(e){var t=e.slot;try{Ro(t)}catch(e){e instanceof Error&&vt(e,{description:"Failed to keep track of impression for ".concat(t.getSlotElementId()),adUnitInstanceCode:t.getSlotElementId()})}})),window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){var t,n,r=e.slot,i=e.advertiserId,o=e.campaignId,a=e.lineItemId,c=e.isEmpty,s=r.getSlotElementId(),l=Je.find((function(e){return e.code===s}));if(l&&null!==(t=l.parentAdUnit)&&void 0!==t&&t.refresh.refreshControls&&(l.renderInfo[Ce.ADVERTISER]=String(null!=i?i:""),l.renderInfo[Ce.ORDER]=String(null!=o?o:""),l.renderInfo[Ce.LINE_ITEM]=String(null!=a?a:""),l.renderInfo[Ce.SIZE]||function(e,t){var n=an(e);if(n){var r=function(){var e=n.width,r=n.height;"1"===e&&n.style.width&&(e=n.style.width),"1"===r&&n.style.height&&(r=n.style.height),t({width:nn(e||"0"),height:nn(r||"0")})};if("1"!==n.width||"1"!==n.height||n.style.width||n.style.height)r();else{var i=0,o=0,a={width:n.style.width,height:n.style.height},c=new MutationObserver((function(e){e.forEach((function(e){var t=e.attributeName;"width"===t||"height"===t?i++:"style"===t&&(n.style.width!==a.width&&o++,n.style.height!==a.height&&o++)})),(i>=2||o>=2)&&(c.disconnect(),r())}));c.observe(n,{attributes:!0,attributeFilter:["width","height","style"]}),e.renderInfo.obs=c}}else t(null)}(l,(function(e){e&&e.height&&e.width&&(l.renderInfo[Ce.SIZE]=Object.values(e).join("x"))}))),c)l&&null!==(n=l.parentAdUnit)&&void 0!==n&&n.refresh.refreshControls&&(l.renderInfo[Ce.BIDDER]="",l.renderInfo[Ce.SIZE]="0x0"),Ro(r);else try{var u=window.ayManagerEnv.settings.yieldScriptSettings.disableRefreshForDirectCampaign,d=u.advertiserIds,f=u.orderIds,p=i&&!en(d.include,d.exclude,i.toString()),g=o&&!en(f.include,f.exclude,o.toString());(p||g)&&Ro(r,null)}catch(e){e instanceof Error&&vt(e,{description:"Failed to prevent direct campaign ads from refreshing ".concat(r.getSlotElementId()),adUnitInstanceCode:r.getSlotElementId()})}}))})),setInterval(c(W.mark((function e(){return W.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Qi();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),e.t0 instanceof Error&&vt(e.t0,{description:"Failed to refresh viewable slots at setInterval"});case 8:case"end":return e.stop()}}),e,null,[[0,5]])}))),3e3),e.changePage=ji,e.destroy=so,e.dispatchManualEvent=ho,e.display=Xi,e.fakeTCLoad=go,e.fetch=no,e.refresh=eo,e.render=io,e.reset=ao,e.restore=uo,e.trigger=fo,Object.defineProperty(e,"__esModule",{value:!0})}({});
