/** * Assertive Yield - Yield Manager script. * v3.0.7-hotfix.1 * * © 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=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=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&d.call(r,"finallyLoc")&&this.prev=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 B,k,H,W,z={wrap:v,isGeneratorFunction:M,AsyncIterator:D,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,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 M(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>>0,r=arguments[1],i=void 0,o=0;o>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;ithis.length)&&-1!==this.indexOf(e,t)}),Y.prototype=Error.prototype;var J=setTimeout;function Z(e){return Boolean(e&&void 0!==e.length)}function X(){}function Q(e){if(!(this instanceof Q))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 K(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,Q._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 Q)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&&Q._immediateFn((function(){e._handled||Q._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t Refresh Controls).",emptyValue:null}}),le(oe,ye.PLACEMENTS,{enabled:{renderType:he.SWITCHER,isPopOver:!1,label:"Enabled"},code:{renderType:he.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:he.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Internal Name",explanation:"A unique name to identify this Placement in Yield Manager."},conditions:{renderType:he.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:he.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:he.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:he.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:he.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:he.DROPDOWN,options:je,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:he.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:he.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:he.SWITCHER,isPopOver:!1,label:"Slug",explanation:"If enabled, a placeholder with the text 'Ad' will be placed above the ad."},style:{renderType:he.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"}}),le(oe,ye.HTML_UNITS,{enabled:{renderType:he.SWITCHER,isPopOver:!1,label:"Enabled"},name:{renderType:he.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Name",explanation:"A unique name to identify this HTML Unit."},conditions:{renderType:he.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:he.HTML,trimValueOnSave:!0,isPopOver:!0,label:"HTML Code",allowVarRef:!0,needsParsing:!0}}),le(oe,ye.BIDDERS,{enabled:{renderType:he.SWITCHER,isPopOver:!1,label:"Enabled"},bidder:{renderType:he.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Bidder",explanation:"The Bidder Adapter's name."},alias:{renderType:he.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:he.TEXT,trimValueOnSave:!0,isPopOver:!1,label:"Name",explanation:"A unique name to identify this Bidder."},conditions:{renderType:he.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:he.JSON,trimValueOnSave:!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:he._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:he.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:he.DROPDOWNMULTI,options:Object.values(me),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."}}),le(oe,ye.PARAMS_OVERRIDE,{params:{renderType:he.JSON,trimValueOnSave:!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]]" }'}}),le(oe,ye.REFRESH_CONTROLS,{name:{renderType:he.TEXT,isPopOver:!1,label:"Name",explanation:"A unique name to identify this Refresh Control."},conditions:{renderType:he.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:he.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:he.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"}(we||(we={})),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"}(Ee||(Ee={})),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"}(be||(be={})),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"}(Te||(Te={})),le(ae={},Te.LOCAL_STORAGE_ENTRY,{type:"Local storage entry",description:be.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."}),le(ae,Te.COOKIE_VALUE,{type:"Cookie value",description:be.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"}),le(ae,Te.JS_GLOBAL_VAR,{type:"Javascript variable",description:be.CUSTOM,returnType:"any",tooltip:"The variable value will evaluate to that of the global Javascript variable with the provided name."}),le(ae,Te.JS_GLOBAL_FUNCTION,{type:"Javascript function",description:be.CUSTOM,returnType:"any",tooltip:"The variable value will evaluate to that of the global Javascript function with the provided name."}),le(ae,Te.JS_FUNCTION,{type:"Custom Javascript",description:be.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."}),le(ae,Te.URL_PARAMETER,{type:"URL parameter",description:be.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"}),le(ae,Te.SIMPLE_VALUE,{type:"Simple Value",description:be.CUSTOM,returnType:"any",tooltip:"The variable will simply evaluate to the entered value.",YMSupport:"1.4.0"}),le(ae,Te.URL,{type:be.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/')."}),le(ae,Te.URL_PATHNAME,{type:be.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"}),le(ae,Te.DOMAIN,{type:be.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"}),le(ae,Te.WINDOW_WIDTH,{type:be.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."}),le(ae,Te.WINDOW_HEIGHT,{type:be.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."}),le(ae,Te.IS_MOBILE,{type:be.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'."}),le(ae,Te.UTM_SOURCE,{type:be.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"}),le(ae,Te.UTM_MEDIUM,{type:be.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"}),le(ae,Te.UTM_CAMPAIGN,{type:be.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"}),le(ae,Te.UTM_TERM,{type:be.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"}),le(ae,Te.UTM_CONTENT,{type:be.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"}),le(ae,Te.DEPLOYMENT_ID,{type:be.DEPLOYMENT_DATA,description:"Yield Manager deployment ID",returnType:"string | undefined",tooltip:"The variable will evaluate to a string containing the version's deployment ID."}),le(ae,Te.VERSION_ID,{type:be.DEPLOYMENT_DATA,description:"Yield Manager version ID",returnType:"number",tooltip:"The variable will evaluate to a string containing the version's ID"}),le(ae,Te.DEPLOYMENT_PERCENTAGE,{type:be.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."}),le(ae,Te.COUNTRY,{type:be.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."}),le(ae,Te.IS_EU_COUNTRY,{type:be.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."}),le(ae,Te.IS_EEA_OR_UK,{type:be.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"}),le(ae,Te.CITY,{type:be.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."}),le(ae,Te.CONTINENT,{type:be.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."}),le(ae,Te.LATITUDE,{type:be.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."}),le(ae,Te.LONGITUDE,{type:be.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."}),le(ae,Te.POSTAL_CODE,{type:be.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."}),le(ae,Te.REGION,{type:be.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."}),le(ae,Te.REGION_CODE,{type:be.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."}),le(ae,Te.TIMEZONE,{type:be.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."}),le(ae,Te.BOT_SCORE,{type:be.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"}),le(ae,Te.VERIFIED_BOT,{type:be.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"}),Te.URL,Te.URL_PATHNAME,Te.DOMAIN,Te.WINDOW_WIDTH,Te.WINDOW_HEIGHT,Te.IS_MOBILE,Te.UTM_SOURCE,Te.UTM_MEDIUM,Te.UTM_CAMPAIGN,Te.UTM_TERM,Te.UTM_CONTENT,Te.DEPLOYMENT_ID,Te.VERSION_ID,Te.DEPLOYMENT_PERCENTAGE,Te.COUNTRY,Te.IS_EU_COUNTRY,Te.IS_EEA_OR_UK,Te.CITY,Te.CONTINENT,Te.LATITUDE,Te.LONGITUDE,Te.POSTAL_CODE,Te.REGION,Te.REGION_CODE,Te.TIMEZONE,Te.BOT_SCORE,Te.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"}(Oe||(Oe={})),le(ce={},Oe.SCRIPT_LOADED,"The Yield Manager Script is running."),le(ce,Oe.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."),le(ce,Oe.WINDOW_LOADED,"The document and all sub-resources have finished loading. The state indicates that the load event is about to fire."),le(ce,Oe.CONSENT_INITIALIZATION,"A CMP is loaded and is prepared to surface a TC String to any calling scripts on the page."),le(ce,Oe.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"}(Ie||(Ie={})),Ie.onScriptLoad,Oe.SCRIPT_LOADED,Ie.onReady,Oe.WINDOW_READY,Ie.onLoad,Oe.WINDOW_LOADED,Ie.onConsentInitialization,Oe.CONSENT_INITIALIZATION,Ie.manualTrigger,Oe.MANUAL_EVENT,function(e){e.AND="AND",e.OR="OR"}(Ae||(Ae={})),function(e){e.EQ="equal",e.LT="less than",e.LE="less than or equal",e.GT="greater than",e.GE="greater than or equal",e.NE="not 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"}(Se||(Se={})),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.failSafeTimeout="Auction fail-safe timeout",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"}(Re||(Re={})),function(e){e.VERSION="version",e.SPLIT_TEST="split test"}(_e||(_e={})),function(e){e.PREBID="PREBID",e.APS="APS",e.BOTH="BOTH"}(Ue||(Ue={})),ve.BANNER,Ie.onReady,ue.STABLE,ue.STABLE,fe.HISTORY,Ue.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"}(Ne||(Ne={})),function(e){e.BIDDER="BIDDER",e.ADVERTISER="ADVERTISER",e.ORDER="ORDER",e.SIZE="SIZE"}(Me||(Me={}));var Fe=window.ayManagerEnv,Be=null!==(De=Fe.settings.prebidSettings.prebidScript.windowName)&&void 0!==De?De:"pbjs",ke=Fe.settings.bidderSettings,He=Fe.settings.placements,We=Fe.settings.adUnits,ze=Fe.settings.htmlUnits,Ge=Fe.settings.adUnitInstances=[],Ve=Fe.settings.htmlUnitInstances=[],Ye=null!==(Pe=Fe.settings.yieldScriptSettings.yieldScriptMode)&&void 0!==Pe?Pe:"PREBID",qe=-1!==navigator.userAgent.indexOf("MSIE")||-1!==navigator.userAgent.indexOf("Trident/"),Je="APS"===Ye||"BOTH"===Ye,Ze=!qe&&("PREBID"===Ye||"BOTH"===Ye)&&null!=(null===(Ce=window[Be])||void 0===Ce?void 0:Ce.libLoaded),Xe=null!==(Le=null===(xe=Fe.debug)||void 0===xe?void 0:xe.flags)&&void 0!==Le?Le:[],Qe=Xe.includes("all"),Ke=!!Xe.length,$e=Xe.includes("no_refresh")||Qe,et=Xe.includes("highlight")||Qe;window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],window[Be]=window[Be]||{},window[Be].que=window[Be].que||[],window.assertiveQueue=window.assertiveQueue||[];var tt,nt,rt="\n background: linear-gradient(-152deg, #100124, #3e007c 75%);\n border-radius: 3px;\n color: white;\n padding: 1px 5px;\n font-size: .6rem;\n",it={group:Ke?window.console.groupCollapsed.bind(window.console,"%cYM",rt):function(){},groupEnd:Ke?window.console.groupEnd.bind(window.console):function(){},log:Ke?window.console.log.bind(window.console,"%cYM",rt):function(){},logt:Ke?function(){for(var e,t=Date.now()-window.ayManagerEnv.startTime,n=arguments.length,r=new Array(n),i=0;i1?t-1:0),r=1;r1&&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"}]))})),ct.apply(dt,[Ne.ERROR].concat(p)),n&&it.error(c+"\n",e)}var pt={Object:1,Array:2,String:3,Null:4,Undefined:5,Function:6,Boolean:7,Number:8,RegExp:9,Date:10};function gt(e,t){var n,r,i,o,a,c=function(e){return null===e?4:void 0===e?5:pt[Object.prototype.toString.call(e).slice(8,-1)]}(e);if(null==t&&(t=1),1===c){if(t>0){if(-1!==nt.indexOf(e))return console.log("toSrc warning: Circular reference detected within object ",e),"undefined";for(r in nt.push(e),n="{",e)e.hasOwnProperty(r)&&(n+='"'+r+'": '+gt(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!==nt.indexOf(e))return console.log("toSrc warning: Circular reference detected within array ",e),"undefined";for(nt.push(e),n="[",i=0,o=e.length;i1&&(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 ht(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 vt(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};n=vt({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 Et(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 bt=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&&St(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:St(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=It(i._id,null),c=At(a,n.value,n.operation);return"<> '").concat(a,"' ").concat(n.operation," '").concat(n.value,"' <>")}catch(t){return t instanceof Error&&ft(t,{description:"Unable to evaluate condition for getConditionsEvaluation: var: ".concat(r,", op: ").concat(n.operation,", value: ").concat(n.value),adUnitName:e.name}),"<> <> ").concat(n.operation," '").concat(n.value,"' <>")}}(i)}}));return{name:n,type:r,evaluation:i,conditionSets:o}}catch(n){return n instanceof Error&&ft(n,function(e){for(var t=1;tNumber(t);case Se.GE:return Number(e)>=Number(t);case Se.CONTAINS:return String(e).includes(String(t));case Se.STARTS_WITH:return String(e).startsWith(String(t));case Se.ENDS_WITH:return String(e).endsWith(String(t));case Se.REGEX:return new RegExp(String(t)).test(String(e));case Se.DOESNT_CONTAIN:return!String(e).includes(String(t));case Se.DOESNT_STARTS_WITH:return!String(e).startsWith(String(t));case Se.DOESNT_ENDS_WITH:return!String(e).endsWith(String(t));case Se.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 St(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===Ae.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:At(It(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 Rt(e){try{return e.reduce((function(e,t){return e&&St(t)}),!0)}catch(t){return t instanceof Error&&ft(t,{description:"Unable to evaluate list of conditions: ".concat(JSON.stringify(e))}),!1}}function _t(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),mt(e)}function Ut(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 Nt(e){for(var t=1;t0)}),{rootMargin:"".concat(s?u:0,"px")});d.observe(e)}}catch(e){e instanceof Error&&ft(e,{description:"Unable to detect if element is in view"}),n(!1)}}))}function Bt(e,t,n){return kt.apply(this,arguments)}function kt(){return kt=c(z.mark((function e(t,n,r){return z.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",tn(t,function(){var e=c(z.mark((function e(t){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ft(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",tn(t,function(){var e=c(z.mark((function e(t){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ft(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 it.error("Invalid mode provided to filterAdUnits:",n),e.abrupt("return",[]);case 8:case"end":return e.stop()}}),e)}))),kt.apply(this,arguments)}function Ht(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&&St(n)}catch(t){return t instanceof Error&&ft(t,{description:"Unable to evaluate trigger's (".concat(e.name,") condition (").concat(n,")")}),!1}}),!0)))||void 0===n||n}))}))}function Wt(e){var t=[],n=[];return e.forEach((function(e){var r;(null===(r=window[Be])||void 0===r?void 0:r.libLoaded)&&"cpm"in window[Be].getHighestUnusedBidResponseForAdUnitCode(e.code)?t.push(e):n.push(e)})),{adUnitsWithBids:t,adUnitsWithoutBids:n}}function zt(e,t){return t.filter((function(t){return e.includes(t.parentPlacement.code)}))}function Gt(e){return(null!=e?e:[]).map((function(e){return e.split("x").map((function(e){return parseInt(e.trim())}))}))}function Vt(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 Yt(e){return e.includes("v")}function qt(e){return!e.includes("v")&&"fluid"!==e}function Jt(e){return ke.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=ke.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:ke.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&&St(n)}catch(t){return t instanceof Error&&ft(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&&St(n)}catch(t){return t instanceof Error&&ft(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 Nt(Nt({},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(de,"_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=Tt(r)),{bidder:t.bidder,params:o}}catch(n){return n instanceof Error&&ft(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 Zt(e){return e.responseTimestamp+1e3*e.ttl-1e3<=(new Date).getTime()}function Xt(e,t,n){return!(t.length>0&&t.includes(n))&&(0===e.length||e.includes(n))}function Qt(e){return(null!=e?e:"").trim().slice(1,(null!=e?e:"").length-2).trim()}function Kt(e){return parseInt(e.replace("px",""),10)}function $t(e){var t=e.containerRef.querySelector('iframe[id^="google_ads_iframe_"]');return t?function(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(i&&o&&i.includes("px")&&o.includes("px"));else{var a=window.getComputedStyle(e);i=a.width,o=a.height}if(n.width=Kt(i)||null,n.height=Kt(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&&ft(e,{description:"Error getting element size"})}return n}(t,!1):null}function en(e,t){t&&(t.width&&(!e.style.minWidth||Kt(e.style.minWidth)=t||n<0||d&&e-l>=o}function v(){var e=Rn();if(h(e))return m(e);c=setTimeout(v,function(e){var n=t-(e-s);return d?Un(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=Rn(),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=An(t)||0,En(n)&&(u=!!n.leading,o=(d="maxWait"in n)?_n(An(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(Rn())},y}var Mn={};function Dn(e,t,n){if(Mn[e]||(Mn[e]=0),null!=t){var r,i=null!=n?n:++Mn[e],o=t.slice(0,8);return jn(r="".concat(e,"__").concat(de,"__").concat(i,"_").concat(o)),r}var a=++Mn[e];return"".concat(e,"__").concat(de,"__").concat(a)}function Pn(e){var t=r(e.split("__".concat(de,"__")),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 Cn(e){var t=Pn(e),n=t.placementCode,r=t.instanceNumber;return"".concat(n,"__").concat(de,"__").concat(r)}function Ln(){var e=[].concat(o(Ge.map((function(e){return e.parentPlacement.code}))),o(Ve.map((function(e){return e.parentPlacement.code})))).reduce((function(e,t){return e.includes(t)?e:[].concat(o(e),[t])}),[]);for(var t in Mn)e.includes(t)||delete Mn[t]}var xn={};function jn(e){var t,n=Pn(e).adUnitId;(null!==(t=xn[n])&&void 0!==t?t:xn[n]={})[e]=!0}null!==(Sn=window.ayManagerEnv)&&void 0!==Sn&&Sn.adUnitCodeVariations||(window.ayManagerEnv.adUnitCodeVariations=xn),Ke&&(lt(Ne.BEFORE_PAGE_CHANGE,(function(){window.ayManagerEnv.debug.conditionsEvaluation=bt([].concat(o(We),o(ze)))})),Ze&&window[Be].que.push((function(){if(!window[Be].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[Be].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){it.error(e)}}))}})),et&&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=Ge.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 Fn(){var e=[];try{e=window.ayManagerEnv.debug.conditionsEvaluation=bt([].concat(o(We),o(ze)))}catch(e){e instanceof Error&&ft(e,{description:"Exception in runDebugConditionsEvaluation API call"})}return e}function Bn(){var e="".concat(de,"__persistent_bid_cache_bids_v2");localStorage.removeItem("".concat(de,"__persistent_bid_cache_bids")),window.addEventListener("beforeunload",(function(t){try{var n=Object.values(xn).reduce((function(e,t){return[].concat(o(e),o(Object.keys(t)))}),[]).reduce((function(e,t){var n=window[Be].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return!Zt(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)?(ft(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&&ft(e,{description:"Failed to cache bids!"})}}));window[Be].onEvent("auctionEnd",(function t(n){var r,o=JSON.parse(null!==(r=localStorage.getItem(e))&&void 0!==r?r:"[]").filter((function(e){return!Zt(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(jn(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}}})),it.log("Cached bids retrieved and reassigned to this auction: ",o),window[Be].offEvent("auctionEnd",t)}))}function kn(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 Hn(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;it.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[Be].getHighestUnusedBidResponseForAdUnitCode(t.code);return"adId"in n&&i.push(n),!0})),c=a.reduce((function(e,t){var n;return Hn(Hn({},e),{},s({},t.parentAdUnit._id,[].concat(o(null!==(n=e[t.parentAdUnit._id])&&void 0!==n?n:[]),[t])))}),{}),l=[];return it.log("Auction ad unit instances:",a),Object.entries(c).forEach((function(e){var n=r(e,2),a=n[0],c=n[1];it.group("Parent ad unit id: ".concat(a,". Child instances:"),c);var s=Object.keys(xn[a.slice(0,8)]);it.log("Adding to the auction bis from the following ad unit code variations:",s);var u=s.reduce((function(e,t){var n=window[Be].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]).filter((function(e){return Yn(e,i)})).sort((function(e,t){return t.cpm-e.cpm}));if(0!==u.length){var d=Qn(u,c,i);t&&Xn(d),l.push.apply(l,d),it.groupEnd()}else qn(c)})),it.groupEnd(),l}catch(t){return t instanceof Error&&ft(t,{description:"Failed to run the Custom bid pool for code variations",adUnitCodes:e}),[]}}function Zn(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=window.ayManagerEnv.settings.adUnitInstances;it.group(">>> customBidPool feature is enabled <<<"),e=e.filter((function(e){return Gn(e)}));var r=[],i=n.filter((function(t){if(!e.includes(t.code))return!1;var n=window[Be].getHighestUnusedBidResponseForAdUnitCode(t.code);if("adId"in n){if(!Vn(n.bidder))return!1;r.push(n)}return!!t.parentAdUnit})),a=Object.values(xn).reduce((function(e,t){return[].concat(o(e),o(Object.keys(t)))}),[]).reduce((function(e,t){var n=window[Be].getBidResponsesForAdUnitCode(t).bids;return[].concat(o(e),o(n))}),[]),c=a.filter((function(e){return Yn(e,r)})).sort((function(e,t){return t.cpm-e.cpm}));if(0===c.length)return qn(i),[];var s=Qn(c,i,r);return t&&Xn(s),it.groupEnd(),s}catch(t){return t instanceof Error&&ft(t,{description:"Failed to run the Custom Bid Pool",adUnitCodes:e}),[]}}function Xn(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 Qn(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 Hn(Hn({},e),null!=r?s({},t.code,{bid:r,adUnitCode:r.adUnitCode,pooled:r.pooled,originalAdUnitCode:r.originalAdUnitCode,originalHighestBid:r.originalHighestBid}):{})}),{});Ke&&(it.group("ORIGINAL - Custom Bid Pool & Highest Bids from Prebid auction: "),it.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;it.log("Highest Bid (Prebid auction) for ".concat(t,": "),{bidder:o,adId:i,cpm:c,size:s,bidObject:JSON.parse(JSON.stringify(n.bid))})}else it.log("No Bids (Prebid auction) for ".concat(t,"."))})),it.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)&&(it.group("🟢 Reassigning Bid"),it.log("bidId: ",f.bid.adId),it.log("From: ",f.adUnitCode,"To: ",e.code),it.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)),it.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?it.log("🟡 No changes done: No higher bids availaible."):Ke&&(it.group("UPDATED - Custom Bid Pool & Highest Updated Bids (".concat(c," changes): ")),it.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;it.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 it.log("No Bids (Updated) for ".concat(t,"."))})),it.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 Kn,$n,er,tr,nr,rr=[],ir=window,or=!1,ar=function(e){!function(){if(!or){or=!0;var e=ir.googlefc=ir.googlefc||{};e.ccpa=e.ccpa||{},e.callbackQueue=e.callbackQueue||[];var t=e.controlledMessagingFunction;e.controlledMessagingFunction=function(n){rr.forEach((function(t){try{var n,r=t+"Locator",i=ir[t];delete ir[t],null!==(n=ir.frames[r])&&void 0!==n&&n.frameElement&&ir.frames[r].frameElement.remove(),e.callbackQueue.push({CONSENT_DATA_READY:function(){var e=i();e.length&&e.forEach((function(e){try{ir[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=ir;for(;a;){try{if(a.frames[r]){t=a;break}}catch(e){}if(a===ir.top)break;a=a.parent}t||a[e]||(!function e(){var t=ir.document,n=!!ir.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}(),ir[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)},ir.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),rr.push(e))};function cr(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 sr(e){for(var t=1;t0?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(i+t)%16|0,i=Math.floor(i/16)),("x"===e?t:3&t|8).toString(16)}))),s=!1;it.logt("🕘 Request Bids -> YM START - ID: ".concat(c),e),fr[c]={prebid:!1,aps:!1},Ze&&window[Be].que.push((function(){var t=e.map((function(e){return{code:e.code,mediaTypes:(t=e.parentAdUnit,n=Gt(t.sizes.filter((function(e){return qt(e)}))),r=Vt(t.sizes.filter((function(e){return Yt(e)}))),Nt(Nt({},t.mediaTypes.includes(ve.BANNER)?{banner:{sizes:n}}:{}),t.mediaTypes.includes(ve.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:Jt(e.parentAdUnit)};var t,n,r})),n={adUnits:t,bidsBackHandler:function(e){window.googletag.cmd.push((function(){it.logt("📩 Request Bids -> PREBID FINISH - ID: ".concat(c," - ").concat(s?"(TIMEDOUT) - ":"","auction time:"),new Date-dr-a),it.log("Prebid auction bids:"),it.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}}))),fr[c]&&!fr[c].prebid&&(fr[c].prebid=!0,Ze&&!fr[c].prebid||Je&&!fr[c].aps||(delete fr[c],l()))}))}};ct(Ne.PREBID_BEFORE_FETCH_BIDS,n),it.logt("🕘 Request Bids -> PREBID START - ID: ".concat(c),"Ad Units:",t),window[Be].requestBids(n)})),Je&&null!=window.apstag?Ir.push((function(){if(fr[c]){var t=e.filter((function(e){var t=window.ayManagerEnv.settings.yieldScriptSettings.apsIgnoredAdUnits;return Xt(t.include,t.exclude,Pn(e.code).placementCode)})).map((function(e){var t,n,r,i,o,a,c=(t=e.parentAdUnit,n=Gt(t.sizes.filter((function(e){return qt(e)}))),r=Vt(t.sizes.filter((function(e){return Yt(e)}))),Nt(Nt({},t.mediaTypes.includes(ve.BANNER)?{display:{sizes:n}}:{}),t.mediaTypes.includes(ve.VIDEO_OUTSTREAM)?{video:{sizes:r}}:{})),s=c.display,l=c.video;return window.ayManagerEnv.settings.experiments.apsMultiFormat&&null!=s&&null!=l?{slotID:e.code,slotName:null===(i=e.slot)||void 0===i?void 0:i.getAdUnitPath(),mediaType:"multi-format",multiFormatProperties:{display:s,video:l}}:null!=s?{slotName:null===(o=e.slot)||void 0===o?void 0:o.getAdUnitPath(),slotID:e.code,sizes:s.sizes}:null!=l?{slotName:null===(a=e.slot)||void 0===a?void 0:a.getAdUnitPath(),slotID:e.code,sizes:l.sizes,mediaType:"video"}:void 0}));if(ct(Ne.APS_BEFORE_FETCH_BIDS,{slots:t,bidTimeout:hr}),0===e.length)it.logt("🕘 Request Bids -> APS SKIP! - ID: ".concat(c).concat(n?" (individual fetch)":""),"Ad Units:",t),fr[c]&&!fr[c].aps&&(fr[c].aps=!0,Ze&&!fr[c].prebid||Je&&!fr[c].aps||(delete fr[c],l()));else if(it.logt("🕘 Request Bids -> APS START - ID: ".concat(c).concat(n?" (individual fetch)":""),"Ad Units:",t),n){var r=1;t.forEach((function(t){window.apstag.fetchBids({slots:[t],bidTimeout:hr},(function(t){window.googletag.cmd.push((function(){it.logt("📩 Request Bids -> APS FINISH - ID: ".concat(c," - ").concat(s?"(TIMEDOUT) - ":"","auction time:"),new Date-dr-a),fr[c]&&!fr[c].aps&&(r===e.length?fr[c].aps=!0:r++,Ze&&!fr[c].prebid||Je&&!fr[c].aps||(delete fr[c],l()))}))}))}))}else window.apstag.fetchBids({slots:t,bidTimeout:hr},(function(e){window.googletag.cmd.push((function(){it.logt("📩 Request Bids -> APS FINISH - ID: ".concat(c," - ").concat(s?"(TIMEDOUT) - ":"","auction time:"),new Date-dr-a),fr[c]&&!fr[c].aps&&(fr[c].aps=!0,Ze&&!fr[c].prebid||Je&&!fr[c].aps||(delete fr[c],l()))}))}))}})):Je&&null==window.apstag&&(fr[c].aps=!0),Ze||Je||window.googletag.cmd.push((function(){delete fr[c],l()})),Or((function(){window.googletag.cmd.push((function(){var t,n;fr[c]&&(Je&&window.apstag&&"function"==typeof window.apstag._getSlotIdToNameMapping&&void 0===window.apstag._getSlotIdToNameMapping()||ft(new Error("Auction timedout!"),{description:"The fail-safe timeout was hit! "+"failSafeTimeout: ".concat(br,". finished: ").concat(JSON.stringify(fr[c])),type:"yieldmanager"}),s=!0,it.logt("⚠️ Request Bids -> YM TIMEDOUT - ID: ".concat(c," - auction time: "),new Date-dr-a),"function"==typeof(null===(t=window[Be])||void 0===t?void 0:t.setTargetingForGPTAsync)&&window[Be].setTargetingForGPTAsync(e.map((function(e){return e.code}))),"function"==typeof(null===(n=window.apstag)||void 0===n?void 0:n.setDisplayBids)&&window.apstag.setDisplayBids(),delete fr[c],l())}))}),br)}function l(){it.logt("📩 Request Bids -> YM FINISH - ID: ".concat(c," auction time:"),new Date-dr-a),t&&t()}}function Sr(e,t){window.googletag.cmd.push((function(){try{var n=window.ayManagerEnv.settings.prebidSettings.customBidPool.enabled,r=e.map((function(e){return e.code}));n?Zn(r):pr.useBidCache&&Jn(r),it.log("🎇 Render Ad Unit Instances".concat(t?" (refresh)":"",":"),r),Ze&&"function"==typeof window[Be].setTargetingForGPTAsync&&(window.ayManagerEnv.settings.experiments.wrapPBTargetingCallInsidePBQueue?window[Be].que.push((function(){window[Be].setTargetingForGPTAsync(r)})):window[Be].setTargetingForGPTAsync(r)),Je&&null!=window.apstag&&window.apstag.setDisplayBids();var i=e.map((function(e){return e.slot})).filter((function(e){return null!=e}));if(i.length>0){window.googletag.pubads().refresh(i);var o=setTimeout((function(){var t=e.filter((function(e){var t=e.slot;return null!=t&&i.includes(t)}));t.forEach((function(e){return e.state.rendered=!0})),window.ayManagerEnv.refresh(t.map((function(e){return e.code})),{useInstanceCodes:!0,onlyUpdateViewedAt:!0}),window.googletag.pubads().removeEventListener("slotResponseReceived",a)}),6e3),a=function e(t){var n=t.slot;i.includes(n)&&(clearTimeout(o),window.googletag.pubads().removeEventListener("slotResponseReceived",e))};window.googletag.pubads().addEventListener("slotResponseReceived",a)}t&&ct(Ne.AFTER_REFRESH,e.map((function(e){return e.code})))}catch(t){t instanceof Error&&ft(t,{description:"Failed to execute bidsBackHandler",adUnitCodes:e.map((function(e){return e.code}))})}}))}function Rr(e){window.googletag.cmd.push((function(){try{var t,n=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled,r=[].concat(o(e.parentAdUnit.mediaTypes.includes(ve.BANNER)?Gt(e.parentAdUnit.sizes.filter((function(e){return qt(e)}))):[]),o(e.parentAdUnit.mediaTypes.includes(ve.VIDEO_OUTSTREAM)?Vt(e.parentAdUnit.sizes.filter((function(e){return Yt(e)}))):[]),o(e.parentAdUnit.sizes.some((function(e){return"fluid"===e}))?["fluid"]:[])),i={adUnitPath:Pt(e.parentAdUnit.path),size:r.length>0?r:[1,1],div:e.code};ct(Ne.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());ct(Ne.AFTER_DEFINE_SLOT,e.code,a),null!=a&&(e.slot=a,Je&&a.setTargeting("uam","true"),n&&(a.getCollapseEmptyDiv()||a.getDivStartsCollapsed())&&(Mt=!0))}catch(t){var c;if(t instanceof Error)ft(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 Ur="allow-forms allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation";function Nr(e){e.setAttribute("sandbox",Ur)}function Mr(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 Dr(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 Dr(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 Dr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1){var r,i=!0,o=Mr(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&&(it.logt("📑 Running observer inject:",[t]),e(t))}),500,Lr);new MutationObserver((function(e,t){e.forEach((function(e){var t,i=Array.from(e.addedNodes).filter((function(e){if(1!==e.nodeType||Cr.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 jr(){return He.filter((function(e){return Rt(e.conditions)}))}function Fr(){return We.filter((function(e){return Rt(e.conditions)}))}function Br(){return ze.filter((function(e){return Rt(e.conditions)}))}var kr,Hr=[],Wr=!1,zr=!1;function Gr(e){var t=function(){var t=c(z.mark((function t(){var n;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qr();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&&ft(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)}}();Hr.push(t),Vr()}function Vr(){return Yr.apply(this,arguments)}function Yr(){return(Yr=c(z.mark((function e(){var t;return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Wr&&!zr&&0!==Hr.length){e.next=2;break}return e.abrupt("return");case 2:if(null==(t=Hr.shift())){e.next=9;break}return zr=!0,e.next=7,t();case 7:zr=!1,Vr();case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qr(){return Jr.apply(this,arguments)}function Jr(){return Jr=c(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){!function t(){Wr?setTimeout(t,5):(Wr=!0,e((function(){Wr=!1,Vr()})))}()})));case 1:case"end":return e.stop()}}),e)}))),Jr.apply(this,arguments)}function Zr(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 Xr(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 Xr(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 Xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(it.log("💤 Firing lazy fetch ad units:",t),t.forEach((function(e){e.state.waitingLazyLoad=!1})),Ii(t,(function(e){Ti(e.filter((function(e){return!e.state.triggerRenderStep&&Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))})))})))}catch(e){e instanceof Error&&ft(e,{description:"Exception in Lazy Load Units observer"})}}),{rootMargin:"".concat(ii,"px")}),li=new IntersectionObserver((function(e){try{var t=e.filter((function(e){return e.isIntersecting})).map((function(e){var t=e.target;li.unobserve(t);var n=Ge.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){it.log("💤 Firing lazy render ad units:",t),t.forEach((function(e){e.state.waitingLazyRender=!1}));var n=Wt(t),r=n.adUnitsWithBids,i=n.adUnitsWithoutBids;r.length>0&&Ti(r),i.length>0&&Ri(i,!1,(function(){Ti(i)}))}}catch(e){e instanceof Error&&ft(e,{description:"Exception in Lazy Load Units observer"})}}),{rootMargin:"".concat(oi,"px")}),ui=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;ui.unobserve(t);var n=Ge.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&&yi(t,"distant",!0)}catch(e){e instanceof Error&&ft(e,{description:"Exception in Far Units Destroy observer"})}}),{rootMargin:"".concat(window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.destructionOffset,"px")}):null,di=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;di.unobserve(t);var n=Ge.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 We.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Rt(e.conditions)}))}));t.length>0&&(it.log("🔙 Restoring the following ad units:",t),t.forEach((function(e){return e.state.suspended=!1})),Ti(t.filter((function(e){return e.state.triggerFetchStep}))),Ii(t.filter((function(e){return!e.state.triggerFetchStep})),(function(e){return Ti(e)})))}catch(e){e instanceof Error&&ft(e,{description:"Exception in Far Units Restore observer"})}}),{rootMargin:"".concat(window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.restorationOffset,"px")}):null;function fi(){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||He.filter((function(e){return e.inject&&Rt(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(!Ge.some((function(n){return n.placementRef===e&&n.parentPlacement===t}))&&!r){var i,o=document.createElement("div"),a={code:Dn(t.code),parentPlacement:t,containerRef:o,placementRef:e,state:{triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:!1,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1},renderInfo:(i={count:0},s(i,Me.ADVERTISER,""),s(i,Me.ORDER,""),s(i,Me.SIZE,""),s(i,Me.BIDDER,""),i)};Ge.push(a),o.id=a.code,e.insertAdjacentElement(t.position,o),it.logt("📑 Ad unit instance injected - automatic:",[a.code])}}catch(e){e instanceof Error&&ft(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&&it.warn("📑 Could not inject ad unit instance for placement:",[t.name],"The placement query string returned no elements:",t.placement,"time:"+(new Date-ri))})),He.filter((function(e){return e.inject&&Rt(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{Ve.some((function(n){return n.placementRef===e&&n.parentPlacement===t}))||t.htmlUnits.map((function(e){return ze.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).forEach((function(n){var r=document.createElement("script"),i={name:Dn(t.code),parentPlacement:t,parentHtmlUnit:n,placeholderRef:r,placementRef:e,state:"injected"};Ve.push(i),r.id=i.name,r.type="yield-manager/html-unit-placeholder",e.insertAdjacentElement(t.position,r),it.logt("📑 HTML unit instance injected:",[i.name],"(HTML Unit: ".concat(i.parentHtmlUnit.name,")"))}))}catch(e){e instanceof Error&&ft(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&&it.warn("📑 Could not inject HTML unit instance for placement:",[t.name],"The placement query string returned no elements.","time:"+(new Date-ri))})),ci)ci[r]&&bi(r,n)}catch(e){e instanceof Error&&ft(e,{description:"Failed to inject placements"})}}function pi(){try{vi(Ge.filter((function(e){var t=document.getElementById(e.code);return!t||t!==e.containerRef}))),mi(Ve.filter((function(e){var t=document.getElementById(e.name);return!t||t!==e.placeholderRef}))),Ln()}catch(e){ft(e,{description:"Failed to cleanup disconnected instances"})}}function gi(e){var t=(null!=e?e:{}).skipAdUnits,n=void 0!==t&&t;it.log("🔁 Page change".concat(n?" - HTML units only":"")),ct(Ne.BEFORE_PAGE_CHANGE,{}),pi(),function(){try{yi(Ge.filter((function(e){return e.parentAdUnit&&!Rt(e.parentAdUnit.conditions)})),"conditions"),wi(Ve.filter((function(e){return"injected"!==e.state&&!Rt(e.parentHtmlUnit.conditions)}))),Ei()}catch(e){ft(e,{description:"Failed to cleanup unfulfilled instances"})}}(),fi(document,n),ct(Ne.AFTER_PAGE_CHANGE,{})}function hi(e){pi(),fi(e||document,!1,!1)}function vi(e){var t=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;0!==e.length&&(it.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},delete ai[e.code],null===(n=e.renderInfo.obs)||void 0===n||n.disconnect(),si.unobserve(e.containerRef),li.unobserve(e.containerRef),t&&(ui.unobserve(e.containerRef),null==di||di.unobserve(e.containerRef));var r=document.getElementById(e.code);r&&r.parentNode&&r.parentNode.removeChild(r)}catch(t){var i;if(t instanceof Error)ft(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=Ge.findIndex((function(t){return t===e}));Ge.splice(o,1)})))}function mi(e){0!==e.length&&(it.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)ft(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=Ve.findIndex((function(t){return t===e}));Ve.splice(i,1)})))}function yi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;0!==e.length&&(it.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=$t(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},delete e.slot,delete e.parentAdUnit,delete ai[e.code],null===(t=e.renderInfo.obs)||void 0===t||t.disconnect(),e.renderInfo=(s(i={count:0,obs:void 0},Me.ADVERTISER,""),s(i,Me.ORDER,""),s(i,Me.SIZE,""),s(i,Me.BIDDER,""),i),si.unobserve(e.containerRef),li.unobserve(e.containerRef),r&&(ui.unobserve(e.containerRef),null==di||di.unobserve(e.containerRef));var o=e.code;e.code=Cn(e.code);var a=document.getElementById(o);if(a&&a.parentNode){var c=document.createElement("div");n&&en(c,e.size),a.parentNode.replaceChild(c,a),c.id=e.code,e.containerRef=c,n&&r&&(null==di||di.observe(e.containerRef))}}catch(t){var l;if(t instanceof Error)ft(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}),vi([e])}})))}function wi(e){0!==(e=e.filter((function(e){return"injected"!==e.state}))).length&&(it.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)ft(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}),mi([e])}})))}function Ei(){yi(Ge.filter((function(e){return e.state.triggerFetchStep&&!e.state.triggerRenderStep&&!Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"fetch").length>0}))||e.state.triggerRenderStep&&!Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))})),"trigger"),wi(Ve.filter((function(e){return"injected"!==e.state})).filter((function(e){return!Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))})))}function bi(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(z.mark((function t(){var n,r,i,a,c,s,l;return z.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Ge.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(Ht(n,e,"fetch")),o(Ht(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 We.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Rt(e.conditions)}))}))).length>0)){t.next=6;break}return it.log("🎯 Fetch/Render trigger fired for Ad Units:",r.map((function(e){return e.code}))),t.next=6,Ii(r,(function(e){var t=e.filter((function(e){return!e.state.triggerRenderStep&&Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))}));Ti(t)}));case 6:if(i=Ge.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=Ht(i,e,"render"),c=Wt(a),s=c.adUnitsWithBids,l=c.adUnitsWithoutBids,!(s.length>0)){t.next=13;break}return it.log("🎯 Render trigger fired for Ad Units (Fetch trigger done):",s.map((function(e){return e.code}))),t.next=13,Ti(s);case 13:l.length>0&&(it.log("🎯 Render trigger will fire after auction for Ad Units (Fetch trigger done - but expired/no bids):",l.map((function(e){return e.code}))),Ri(l,!1,(function(){Ti(l)})));case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function a(){var t=Ht(Ve,e,"render").filter((function(e){return"injected"===e.state})).filter((function(e){return Rt(e.parentHtmlUnit.conditions)}));t.length>0&&(it.log("🎯 Render trigger fired for HTML Units:",t.map((function(e){return e.name}))),Si(t))}n?(t&&it.logt("⚡ ".concat(e)),ci[e]=!0,a()):Gr(c(z.mark((function n(){return z.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t&&it.logt("⚡ ".concat(e)),ci[e]=!0,n.next=4,r();case 4:a();case 5:case"end":return n.stop()}}),n)}))))}function Ti(e){return Oi.apply(this,arguments)}function Oi(){return Oi=c(z.mark((function e(t){var n,r,i,o,a,s,l,u,d,f;return z.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(it.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!!Dt(e)||(s.push(e),!1)})),s.forEach((function(e){e.state.triggerRenderStep=!1})),it.func((function(){s.length&&it.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,tn(t,function(){var e=c(z.mark((function e(t){var n;return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ft(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})),it.func((function(){d.length&&it.log("💤 Trigger Render step ignored for:",d,"Reason: Inside destroy far units offset")})),d.forEach((function(e){e.state.suspended=!0,null==di||di.observe(e.containerRef)}));case 16:return f=[],e.next=19,tn(t,function(){var e=c(z.mark((function e(t){return z.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,Ft(t.containerRef,{nearInSight:!0,pixelsOffset:oi});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,li.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,it.func((function(){f.length&&it.log("💤 Trigger Render step ignored for:",f,"Reason: Out of lazy render offset")})),t.length>0&&Sr(t,!1);case 22:case"end":return e.stop()}}),e)}))),Oi.apply(this,arguments)}function Ii(e,t){return Ai.apply(this,arguments)}function Ai(){return Ai=c(z.mark((function e(t,n){var i,a,l,u,d,f;return z.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 it.log("🎯 Trigger Fetch step for ad units:",t.map((function(e){return e.code}))),a&&(l=[],t=t.filter((function(e){return!!Dt(e)||(l.push(e.code),!1)})),it.func((function(){l.length&&it.warn("🚫 Trigger ignored for:",l,"Reason: visibility")}))),u=[],e.next=8,tn(t,function(){var e=c(z.mark((function e(t){return z.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,Ft(t.containerRef,{nearInSight:!0,pixelsOffset:ii});case 6:if(!e.sent){e.next=11;break}return e.abrupt("return",!0);case 11:return t.state.waitingLazyLoad=!0,si.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,it.func((function(){u.length&&it.log("💤 Trigger Fetch step ignored for:",u,"Reason: Out of lazy load offset")})),d=t.reduce((function(e,t){return Kr(Kr({},e),{},s({},t.code,t.parentPlacement.adUnits.map((function(e){return We.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).filter((function(e){return Rt(e.conditions)})).map((function(e){return{code:Dn(t.parentPlacement.code,e._id,Pn(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 Kr(Kr({},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&&en(e.containerRef,e.size),e.state.waitingAuction=!0})),Ar(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[Be])&&void 0!==n&&n.libLoaded){var l=c.map((function(e){var t=window[Be].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 it.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}));Ln();var i=e.map((function(e){try{Rr(e),_r(e.code);var t=Qt(e.parentPlacement.style);try{e.containerRef.style.cssText=Ot(t),et&&e.containerRef.classList.add("".concat(de,"_highlight"))}catch(t){t instanceof Error&&ft(t,{description:"Unable to parse ad unit ".concat(e.code," styles")})}return e.parentPlacement.slug&&e.containerRef&&e.containerRef.classList.add("".concat(de,"_slug")),e.state.waitingAuction=!1,e.state.triggerFetchStep=!0,e}catch(t){var n;if(t instanceof Error)ft(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 vi([e]),!1}}));n(i)}));case 16:case"end":return e.stop()}}),e)}))),Ai.apply(this,arguments)}function Si(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=Ot(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;ft(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&&ft(e,{description:"Unable to execute script from HTMLUnit ".concat(t),htmlUnitInstanceName:t})}}(t,e.name)}))}catch(t){var c;if(t instanceof Error)ft(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}),wi([e])}}))}function Ri(e,t,n){var r=window.ayManagerEnv.settings.yieldScriptSettings.destroyFarUnits.enabled;e.forEach((function(e){e.state.waitingAuction=!0,r&&ui.unobserve(e.containerRef)})),Ar(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):Sr(r,t)}))}function _i(e){try{var t=function(e){return"string"==typeof e};if(!t(e)||!He.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]),He.filter((function(t){return!1===t.inject&&t.code===e&&Rt(t.conditions)})).forEach((function(e){try{if(e.adUnits.length>0){var t,n=document.createElement("div"),i={code:Dn(e.code),parentPlacement:e,containerRef:n,state:{triggerFetchStep:!1,triggerRenderStep:!1,waitingAuction:!1,suspended:!1,rendered:!1,waitingLazyLoad:!1,waitingLazyRender:!1},renderInfo:(t={count:0},s(t,Me.ADVERTISER,""),s(t,Me.ORDER,""),s(t,Me.SIZE,""),s(t,Me.BIDDER,""),t)};if(Ge.push(i),n.id=i.code,r.appendChild(n),it.logt("📑 Ad unit instance injected - manual:",[i.code]),Object.values(Oe).some((function(e){return ci[e]&&(Ht([i],e,"fetch").length>0||Ht([i],e,"render").length>0)})))i.parentPlacement.adUnits.map((function(e){return We.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).some((function(e){return Rt(e.conditions)}))&&(it.logt("🎯 Trigger fired for:",[i.code]),Ii([i],(function(e){Ti(e.filter((function(e){return Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))&&!e.state.triggerRenderStep})))})))}if(e.htmlUnits.length>0){var o=e.htmlUnits.map((function(e){return ze.find((function(t){return t._id===e}))})).filter((function(e){return null!=e})).filter((function(e){return Rt(e.conditions)}));if(o.length>0){var a=o.map((function(t){var n=document.createElement("script"),i={name:Dn(e.code),parentPlacement:e,parentHtmlUnit:t,placeholderRef:n,placementRef:r,state:"injected"};return Ve.push(i),n.id=i.name,n.type="yield-manager/html-unit-placeholder",r.appendChild(n),i}));it.logt("📑 HTML unit instances injected - manual:",Ve.map((function(e){return e.name}))),Object.values(Oe).some((function(t){return ci[t]&&Ht([e],t,"render").length>0}))&&(it.logt("🎯 Trigger fired for:",Ve.map((function(e){return e.name}))),Si(a))}}}catch(t){t instanceof Error&&ft(t,{description:"Failed to manually inject placement ".concat(e.name),adUnitName:e.name})}}))}catch(t){t instanceof Error&&ft(t,Kr({description:"Exception in display API call"},"string"==typeof e?{adUnitCodes:[e]}:{}))}}function Ui(){return Ni.apply(this,arguments)}function Ni(){return(Ni=c(z.mark((function e(){var t,n,o,a,c,s,l;return z.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 Me.ADVERTISER:case Me.ORDER:case Me.SIZE:case Me.BIDDER:return e.value.includes(t.renderInfo[e.type])}})))||void 0===n?void 0:n.seconds;return null!=i?i:e.defaultRefresh},t=[],n=Object.entries(ai).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=Zr(n),e.prev=6,c=z.mark((function e(){var n,i,o,c,s,u,d,f,p,g;return z.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=Ge.find((function(e){return e.code===i})))&&d.parentAdUnit&&d.state.rendered){e.next=5;break}return delete ai[i],e.abrupt("return",{v:void 0});case 5:if(0!==(f=l(u,d))){e.next=10;break}$i(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,Ft(d.containerRef);case 15:e.t0=e.sent;case 16:g=e.t0,p&&g&&(delete ai[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&&Mi(t,{useInstanceCodes:!0,mode:"page",ignoreRefreshLimits:!0});case 25:case"end":return e.stop()}}),e,null,[[6,18,21,24]])})))).apply(this,arguments)}function Mi(e,t){return Di.apply(this,arguments)}function Di(){return(Di=c(z.mark((function e(t,n){var r,i,o,a,c,l,u,d,f,p,g,h,v,m,y,w,E,b;return z.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=[],!$e){e.next=6;break}return it.warn("Refresh cancelled due 'no_refresh' debug flag!"),e.abrupt("return");case 6:if(null!=t){e.next=10;break}m=Ge.slice(),e.next=16;break;case 10:if(!(Array.isArray(t)&&t.length>0)){e.next=14;break}m=u?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=16;break;case 14:return it.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)&&!Dt(e))||(yi([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[Me.ADVERTISER],o=e.renderInfo[Me.ORDER],a=""!==i&&!Xt(n.include,n.exclude,i.toString()),c=""!==o&&!Xt(r.include,r.exclude,o.toString());return!a&&!c}))),e.next=21,Bt(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?(it.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){$i(e)}))):(ct(Ne.BEFORE_REFRESH,y,m),m.forEach((function(e){var t,n;delete ai[e.code],null===(t=e.renderInfo.obs)||void 0===t||t.disconnect(),e.renderInfo=(s(n={count:e.renderInfo.count+1,obs:void 0},Me.ADVERTISER,""),s(n,Me.ORDER,""),s(n,Me.SIZE,""),s(n,Me.BIDDER,""),n)})),f?(w=Wt(m),E=w.adUnitsWithBids,b=w.adUnitsWithoutBids,it.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&&(Sr(E,!0),Ri(E,!0,(function(){}))),b.length>0&&Ri(b,!0,(function(e){Sr(e,!0),Ri(b,!0,(function(){}))}))):(it.log("🔄 Refreshing the following Ad Unit Instances:",y),Ri(m,!0)))),e.next=29;break;case 26:e.prev=26,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Exception in refresh API call"});case 29:case"end":return e.stop()}}),e,null,[[0,26]])})))).apply(this,arguments)}function Pi(e,t){return Ci.apply(this,arguments)}function Ci(){return(Ci=c(z.mark((function e(t,n){var r,i,o,a,c,s,l,u;return z.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=Ge.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=13;break;case 11:return it.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,Bt(u,o,c);case 16:(u=e.sent).length>0&&(it.log("📩 Fetching bids for the following Ad Unit Instances:",u.map((function(e){return e.code}))),Ri(u,!1,(function(){}))),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Exception in fetch API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function Li(e,t){return xi.apply(this,arguments)}function xi(){return(xi=c(z.mark((function e(t,n){var r,i,o,a,c,s,l,u;return z.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=Ge.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=13;break;case 11:return it.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,Bt(u,o,c);case 16:(u=e.sent).length>0&&(it.log("🎇 Rendering the following Ad Unit Instances:",u.map((function(e){return e.code}))),u.forEach((function(e){return li.unobserve(e.containerRef)})),Sr(u,!1)),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Exception in render API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function ji(e,t){return Fi.apply(this,arguments)}function Fi(){return Fi=c(z.mark((function e(t,n){var r,i,o,a,c,s,l,u;return z.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=Ge.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=13;break;case 11:return it.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,Bt(u,o,c);case 16:yi(u=e.sent,"reset"),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Exception in reset API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])}))),Fi.apply(this,arguments)}function Bi(e,t){return ki.apply(this,arguments)}function ki(){return(ki=c(z.mark((function e(t,n){var r,i,o,a,c,s,l,u;return z.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=Ge.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=13;break;case 11:return it.error("Invalid 'placementCodes' provided to ayManagerEnv.destroy()"+JSON.stringify(t)),e.abrupt("return");case 13:return e.next=15,Bt(u,o,c);case 15:(u=e.sent).forEach((function(e){e.placementRef&&e.placementRef.setAttribute("data-ay-manager-destroyed","true")})),vi(u),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Exception in destroy API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function Hi(e){try{var t=[];if(null==e)t=He.slice();else{if(!(Array.isArray(e)&&e.length>0))return void it.error("Invalid 'placementCodes' provided to ayManagerEnv.restore()"+JSON.stringify(e));t=He.filter((function(t){return e.includes(t.code)}))}t.length>0&&(it.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&&ft(e,{description:"Exception in restore API call"})}}function Wi(e,t){return zi.apply(this,arguments)}function zi(){return(zi=c(z.mark((function e(t,n){var r,i,o,a,c,s,l,u;return z.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=Ge.slice(),e.next=13;break;case 7:if(!(Array.isArray(t)&&t.length>0)){e.next=11;break}u=l?Ge.filter((function(e){return t.includes(e.code)})):zt(t,Ge),e.next=13;break;case 11:return it.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(Oe).some((function(t){return ci[t]&&(Ht([e],t,"fetch").length>0||Ht([e],t,"render").length>0)}))})),e.next=16,Bt(u,o,c);case 16:(u=e.sent).length>0&&(it.log("🔙 Triggering the following Ad Unit Instances:",u.map((function(e){return e.code}))),Ii(u,(function(e){Ti(e.filter((function(e){return Object.values(Oe).some((function(t){return ci[t]&&Ht([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&&ft(e.t0,{description:"Exception in trigger API call"});case 23:case"end":return e.stop()}}),e,null,[[0,20]])})))).apply(this,arguments)}function Gi(){try{bi(Oe.CONSENT_INITIALIZATION)}catch(e){e instanceof Error&&ft(e,{description:"Exception in fakeTCLoad API call"})}}function Vi(){window.ayManagerEnv.cmd.push((function(){Ei(),bi(Oe.MANUAL_EVENT)}))}it.group("Yield Manager - Initializing..."),it.log("pbjs loaded:",null!==($r=null===(ei=window[Be])||void 0===ei?void 0:ei.libLoaded)&&void 0!==$r&&$r),it.log("Ad units:",We),it.log("HTML units:",ze),it.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=Tt(r)}catch(e){e instanceof Error&&ft(e,{description:"Unable to evaluate tracker config"})}window.assertive=i||{},window.assertive.entityId=n,window.assertive.debug=Ke,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createElement("script");n.src=e,n.async=t,rn(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()}))}(_i),Je&&(ti=!1,ni=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!ti){ti=!0;var n=window.ayManagerEnv.settings.yieldScriptSettings.publisherId,r="FQhSP3hYgzhG7z7uS"===window.ayManagerEnv.entityId&&-1!==window.ayManagerEnv.settings.versionInfo.versionName.indexOf("apsTest"),i=xt();if(i.pubID=n,i.adServer="googletag",i.videoAdServer="DFP",null==i.bidTimeout&&(i.bidTimeout=hr),null==(null===(e=i.gdpr)||void 0===e?void 0:e.cmpTimeout)&&(i.gdpr=i.gdpr||{},i.gdpr.cmpTimeout=yr),null!=window.apstag){var o=function(e){ct(Ne.APS_BEFORE_INIT,e),window.apstag.init(e,(function(){for(ct(Ne.APS_AFTER_INIT,e);Ir.length;){var t;null===(t=Ir.pop())||void 0===t||t()}jt(Ir,(function(e){return e()}))}))};try{var a=sr(sr({},i),window.ayManagerEnv.apsTagInit?window.ayManagerEnv.apsTagInit:{});r?delete a.params:null!=t&&(a.params=a.params||{},a.params.us_privacy=t),o(a)}catch(e){e instanceof Error&&ft(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?ni(e.uspString):ni()})),setTimeout((function(){ni()}),wr)):ni()),Ze&&window[Be].que.push((function(){try{var e=window.ayManagerEnv.settings.prebidSettings,t=e.customBidPool.enabled,n=e.persistentBidCaching;void 0===pr.disableAjaxTimeout&&(pr.disableAjaxTimeout=!0),void 0===pr.maxRequestsPerOrigin&&(pr.maxRequestsPerOrigin=6),t&&(pr.useBidCache=!0),window[Be].setConfig(pr),ke.bidders.forEach((function(e){e.alias&&window[Be].aliasBidder(e.bidder,e.alias)})),ke.bidders.filter((function(e,t,n){return n.findIndex((function(t){return t.bidder===e.bidder}))===t})).forEach((function(e){var t=e.bidder,n=e.cpmAdjustments,r=e.storageAllowed,i=window[Be].bidderSettings[t]=window[Be].bidderSettings[t]||{};i.bidCpmAdjustment=function(e){return e*n},i.storageAllowed=r})),window[Be].onEvent("bidResponse",(function(e){var t;"teads"===((null===(t=window[Be].aliasRegistry)||void 0===t?void 0:t[e.bidderCode])||e.bidderCode)&&(e.ttl=140)})),n&&Bn(),window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("slotRenderEnded",(function(e){try{var t=e.slot.getSlotElementId(),n=window[Be].getBidResponsesForAdUnitCode(t).bids.find((function(e){return"targetingSet"===e.status}));n&&(window.ayManagerEnv.settings.experiments.bidLostCheckImprovements&&(e.isEmpty||e.isBackfill)?r(n):setTimeout((function(){"targetingSet"===n.status&&r(n)}),500))}catch(e){e instanceof Error&&ft(e,{description:"Failed to reset bid that lost to dfp"})}function r(e){try{Ke&&it.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&&ft(e,{description:"Failed to reset bid that lost to dfp"})}}}))})),window.ayManagerEnv.settings.experiments.bidLostCheckImprovements&&window[Be].onEvent("bidWon",(function(e){e.reset&&(e.status="rendered")})),window[Be].onEvent("bidWon",(function(e){var t=Ge.find((function(t){return t.code===e.adUnitCode}));t&&(t.renderInfo[Me.BIDDER]=e.bidder)}))}catch(e){e instanceof Error&&ft(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=Mi,window.ayManagerEnv.fetch=Pi,window.ayManagerEnv.render=Li,window.ayManagerEnv.reset=ji,window.ayManagerEnv.destroy=Bi,window.ayManagerEnv.restore=Hi,window.ayManagerEnv.trigger=Wi,window.ayManagerEnv.changePage=Nn((function(){return gi()}),30),window.ayManagerEnv.display=_i,window.ayManagerEnv.fakeTCLoad=Gi,window.ayManagerEnv.dispatchManualEvent=Vi,window.ayManagerEnv.onEvent=lt,window.ayManagerEnv.offEvent=ut,window.ayManagerEnv.onceEvent=st,window.ayManagerEnv.viewableSlots=ai,window.ayManagerEnv.debug={flags:Xe,conditionsEvaluation:[],runDebugConditionsEvaluation:Fn},window.ayManagerEnv.tools={getCookie:yt,setCookie:wt,getEnabledAdUnits:Fr,getEnabledPlacements:jr,getEnabledHTMLUnits:Br},window.ayManagerEnv.getHighestQualifiedBids=function(e){var t,n=window.ayManagerEnv.settings,r=n.prebidSettings.customBidPool.enabled,i=n.adUnitInstances;if(!window[Be].libLoaded)return it.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 it.error("Invalid 'adUnitCodes' provided to ayManagerEnv.getHighestQualifiedBid()"+JSON.stringify(e)),{};if(r)t=Zn(e,!1);else{if(!Wn.useBidCache)return e.map((function(e){return window[Be].getHighestUnusedBidResponseForAdUnitCode(e)})).filter((function(e){return"adId"in e})).reduce((function(e,t){return Hn(Hn({},e),{},s({},t.adUnitCode,t))}),{});t=Jn(e,!1)}return e.reduce((function(e,n){var r;return Hn(Hn({},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(de,"_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(et){var e="",t="".concat(de,"_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(de,"_debug_styles"),n.innerHTML=e}}(),function(){var e=window.ayManagerEnv.settings.experiments,t=e.sandbox,n=e.sandboxObserve;if(!1!==t){"string"==typeof t&&(Ur=t);var r=new MutationObserver((function(e){var t=e[0].target;t.getAttribute("sandbox")!==Ur&&Nr(t)})),i=Node.prototype.appendChild;Node.prototype.appendChild=function(e){return"IFRAME"===e.nodeName&&e.id&&e.id.startsWith("google_ads_iframe_")&&(Nr(e),n&&r.observe(e,{attributes:!0,attributeFilter:["sandbox"]})),i.apply(this,arguments)}}}(),gi({skipAdUnits:!0}),bi(Oe.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=Ge.find((function(e){return e.code===r}));i&&(i.state.rendered=!0,n&&ui.observe(i.containerRef))}))}));var Yi=window.ayManagerEnv.settings.yieldScriptSettings.spa;if("history"===(void 0===Yi?{mode:"manual"}:Yi).mode){var qi=history.pushState,Ji=history.replaceState,Zi=Nn((function(){gi()}),50);history.pushState=function(){qi.apply(history,arguments),requestAnimationFrame((function(){Zi()}))},history.replaceState=function(){Ji.apply(history,arguments),requestAnimationFrame((function(){Zi()}))},window.addEventListener("popstate",(function(e){e.state&&requestAnimationFrame((function(){Zi()}))}))}var Xi=function(){try{gi();for(var e=function(e){try{"function"==typeof e&&e()}catch(e){e instanceof Error&&ft(e,{description:"Exception in queued YM command"})}};window.ayManagerEnv.cmd.length;)e(window.ayManagerEnv.cmd.pop());jt(window.ayManagerEnv.cmd,(function(t){return e(t)})),bi(Oe.WINDOW_READY),Qi(),xr(hi)}catch(e){e instanceof Error&&ft(e,{description:"Exception in onReady listener"})}},Qi=function(){if("__tcfapi"in window)try{window.__tcfapi("addEventListener",2,(function(e,t){ci[Oe.CONSENT_INITIALIZATION]||!1!==e.gdprApplies&&"tcloaded"!==e.eventStatus&&"useractioncomplete"!==e.eventStatus?t||it.log("Listener for 'TCF Load' event could not be registered!"):(Tr(Er),bi(Oe.CONSENT_INITIALIZATION),window.__tcfapi("removeEventListener",2,(function(e){}),e.listenerId))}))}catch(e){e instanceof Error&&ft(e,{description:"Exception in Consent Initialization listener"})}else Tr(Er),it.warn("__tcfapi framework/stub not found")};/interactive/.test(document.readyState)||/complete/.test(document.readyState)?Xi():document.addEventListener("readystatechange",(function(e){"interactive"===e.target.readyState&&Xi()}));var Ki=function(){try{bi(Oe.WINDOW_LOADED)}catch(e){e instanceof Error&&ft(e,{description:"Exception in onLoad listener"})}};function $i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=e.getSlotElementId(),r=Ge.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=ai[n])||void 0===i?void 0:i.viewedAt);s||l||(ai[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 Rt(null!==(n=null===(r=t.refreshControls[e])||void 0===r?void 0:r.conditions)&&void 0!==n?n:[])}));return i?t.refreshControls[i]:0}return n}}/complete/.test(document.readyState)?Ki():document.addEventListener("readystatechange",(function(e){"complete"===e.target.readyState&&Ki()})),window.googletag.cmd.push((function(){window.googletag.pubads().addEventListener("impressionViewable",(function(e){var t=e.slot;try{$i(t)}catch(e){e instanceof Error&&ft(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.isEmpty,c=r.getSlotElementId(),s=Ge.find((function(e){return e.code===c}));if(s&&null!==(t=s.parentAdUnit)&&void 0!==t&&t.refresh.refreshControls&&(s.renderInfo[Me.ADVERTISER]=String(null!=i?i:""),s.renderInfo[Me.ORDER]=String(null!=o?o:""),s.renderInfo[Me.SIZE]||function(e,t){var n=e.containerRef.querySelector('div[id^="google_ads_iframe_"] iframe');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:Kt(e||"0"),height:Kt(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)}(s,(function(e){e&&e.height&&e.width&&(s.renderInfo[Me.SIZE]=Object.values(e).join("x"))}))),a)s&&null!==(n=s.parentAdUnit)&&void 0!==n&&n.refresh.refreshControls&&(s.renderInfo[Me.BIDDER]="",s.renderInfo[Me.SIZE]="0x0"),$i(r);else try{var l=window.ayManagerEnv.settings.yieldScriptSettings.disableRefreshForDirectCampaign,u=l.advertiserIds,d=l.orderIds,f=i&&!Xt(u.include,u.exclude,i.toString()),p=o&&!Xt(d.include,d.exclude,o.toString());(f||p)&&$i(r,null)}catch(e){e instanceof Error&&ft(e,{description:"Failed to prevent direct campaign ads from refreshing ".concat(r.getSlotElementId()),adUnitInstanceCode:r.getSlotElementId()})}}))})),setInterval(c(z.mark((function e(){return z.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ui();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),e.t0 instanceof Error&&ft(e.t0,{description:"Failed to refresh viewable slots at setInterval"});case 8:case"end":return e.stop()}}),e,null,[[0,5]])}))),3e3),e.changePage=gi,e.destroy=Bi,e.dispatchManualEvent=Vi,e.display=_i,e.fakeTCLoad=Gi,e.fetch=Pi,e.refresh=Mi,e.render=Li,e.reset=ji,e.restore=Hi,e.trigger=Wi,Object.defineProperty(e,"__esModule",{value:!0})}({});