prebid.js v0.25.0 for OpenX with Google Analytics


SUBMITTED BY: pogue

DATE: July 17, 2017, 11:58 a.m.

FORMAT: JavaScript

SIZE: 62.5 kB

HITS: 905

  1. /* prebid.js v0.25.0
  2. Updated : 2017-07-17 */
  3. !(function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}var t={};return n.m=e,n.c=t,n.p="",n(0)})([(function(e,n,t){"use strict";function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){e.forEach((function(e){if(u(e.called)===U)try{e.call(),e.called=!0}catch(n){S.logError("Error processing command :","prebid.js",n)}}))}function o(e){var n=E._bidsRequested.map((function(e){return e.bids.map((function(e){return e.placementCode}))})).reduce(f.flatten).filter(f.uniques);return S.contains(n,e)?!0:(S.logError('The "'+e+'" placement is not defined.'),void 0)}function a(){E._bidsRequested=[],E._bidsReceived=E._bidsReceived.filter((function(e){return!E._adUnitCodes.includes(e.adUnitCode)}))}function s(e,n,t){e.defaultView&&e.defaultView.frameElement&&(e.defaultView.frameElement.width=n,e.defaultView.frameElement.height=t)}var d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=t(1),f=t(2),l=t(4),p=t(7);t(16);var g=t(64),m=t(13),b=t(65),v=t(66),h=t(14),y=t(67),E=c.getGlobal(),T=t(3),S=t(2),I=t(12),A=t(5),_=t(11),w=t(9),j=t(68),O=t(69),C="function",U="undefined",B="object",R=T.EVENTS.BID_WON,N=T.EVENTS.SET_TARGETING,P=!1,k=[],x={bidWon:o};E._bidsRequested=[],E._bidsReceived=[],E._adUnitCodes=[],E._winningBids=[],E._adsReceived=[],E._sendAllBids=!1,E.bidderSettings=E.bidderSettings||{},E.bidderTimeout=E.bidderTimeout||3e3,E.cbTimeout=E.cbTimeout||200,E.timeoutBuffer=200,E.logging=E.logging||!1,E.publisherDomain=E.publisherDomain||window.location.origin,E.libLoaded=!0,E.version="v0.25.0",S.logInfo("Prebid.js v0.25.0 loaded"),E.adUnits=E.adUnits||[],E.cookieSyncDelay=E.cookieSyncDelay||100,E.cmd.push=function(e){if(("undefined"==typeof e?"undefined":u(e))===C)try{e.call()}catch(n){S.logError("Error processing command :"+n.message)}else S.logError("Commands written into pbjs.cmd.push must be wrapped in a function")},E.que.push=E.cmd.push,E.getAdserverTargetingForAdUnitCodeStr=function(e){if(S.logInfo("Invoking pbjs.getAdserverTargetingForAdUnitCodeStr",arguments),e){var n=E.getAdserverTargetingForAdUnitCode(e);return S.transformAdServerTargetingObj(n)}S.logMessage("Need to call getAdserverTargetingForAdUnitCodeStr with adunitCode")},E.getAdserverTargetingForAdUnitCode=function(e){return E.getAdserverTargeting(e)[e]},E.getAdserverTargeting=function(e){return S.logInfo("Invoking pbjs.getAdserverTargeting",arguments),O.getAllTargeting(e).map((function(e){return r({},Object.keys(e)[0],e[Object.keys(e)[0]].map((function(e){return r({},Object.keys(e)[0],e[Object.keys(e)[0]].join(", "))})).reduce((function(e,n){return d(n,e)}),{}))})).reduce((function(e,n){var t=Object.keys(n)[0];return e[t]=d({},e[t],n[t]),e}),{})},E.getBidResponses=function(){S.logInfo("Invoking pbjs.getBidResponses",arguments);var e=E._bidsReceived.filter(f.adUnitsFilter.bind(this,E._adUnitCodes)),n=e&&e.length&&e[e.length-1].requestId;return e.map((function(e){return e.adUnitCode})).filter(f.uniques).map((function(t){return e.filter((function(e){return e.requestId===n&&e.adUnitCode===t}))})).filter((function(e){return e&&e[0]&&e[0].adUnitCode})).map((function(e){return r({},e[0].adUnitCode,{bids:e})})).reduce((function(e,n){return d(e,n)}),{})},E.getBidResponsesForAdUnitCode=function(e){var n=E._bidsReceived.filter((function(n){return n.adUnitCode===e}));return{bids:n}},E.setTargetingForGPTAsync=function(e){if(S.logInfo("Invoking pbjs.setTargetingForGPTAsync",arguments),!f.isGptPubadsDefined())return S.logError("window.googletag is not defined on the page"),void 0;var n=O.getAllTargeting(e);O.resetPresetTargeting(e),O.setTargeting(n),w.emit(N)},E.setTargetingForAst=function(){return S.logInfo("Invoking pbjs.setTargetingForAn",arguments),O.isApntagDefined()?(O.setTargetingForAst(),w.emit(N),void 0):(S.logError("window.apntag is not defined on the page"),void 0)},E.allBidsAvailable=function(){return S.logInfo("Invoking pbjs.allBidsAvailable",arguments),I.bidsBackAll()},E.renderAd=function(e,n){if(S.logInfo("Invoking pbjs.renderAd",arguments),S.logMessage("Calling renderAd with adId :"+n),e&&n)try{var t=E._bidsReceived.find((function(e){return e.adId===n}));if(t){t.ad=S.replaceAuctionPrice(t.ad,t.cpm),t.url=S.replaceAuctionPrice(t.url,t.cpm),E._winningBids.push(t),w.emit(R,t);var r=t.height,i=t.width,o=t.ad,a=t.mediaType,d=t.adUrl,u=t.renderer;if(u&&u.url)u.render(t);else if(e===document&&!S.inIframe()||"video"===a)S.logError("Error trying to write ad. Ad render call ad id "+n+" was prevented from writing to the main document.");else if(o)e.write(o),e.close(),s(e,i,r);else if(d){var c=S.createInvisibleIframe();c.height=r,c.width=i,c.style.display="inline",c.style.overflow="hidden",c.src=d,S.insertElement(c,e,"body"),s(e,i,r)}else S.logError("Error trying to write ad. No ad for bid response id: "+n)}else S.logError("Error trying to write ad. Cannot find ad by given id : "+n)}catch(f){S.logError("Error trying to write ad Id :"+n+" to the page:"+f.message)}else S.logError("Error trying to write ad Id :"+n+" to the page. Missing document or adId")},E.removeAdUnit=function(e){if(S.logInfo("Invoking pbjs.removeAdUnit",arguments),e)for(var n=0;n<E.adUnits.length;n++)E.adUnits[n].code===e&&E.adUnits.splice(n,1)},E.clearAuction=function(){P=!1,v.syncCookies(E.cookieSyncDelay),S.logMessage("Prebid auction cleared"),k.length&&k.shift()()},E.requestBids=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.bidsBackHandler,t=e.timeout,r=e.adUnits,i=e.adUnitCodes;w.emit("requestBids");var o=E.cbTimeout=t||E.bidderTimeout;r=r||E.adUnits,S.logInfo("Invoking pbjs.requestBids",arguments),i&&i.length?r=r.filter((function(e){return i.includes(e.code)})):i=r&&r.map((function(e){return e.code}));var s=r.filter(l.videoAdUnit).filter(l.hasNonVideoBidder);if(s.forEach((function(e){S.logError("adUnit "+e.code+" has 'mediaType' set to 'video' but contains a bidder that doesn't support video. No Prebid demand requests will be triggered for this adUnit.");for(var n=0;n<r.length;n++)r[n].code===e.code&&r.splice(n,1)})),r.filter(p.nativeAdUnit).filter(p.hasNonNativeBidder).forEach((function(e){var n=e.bids.filter((function(e){return!p.nativeBidder(e)})).map((function(e){return e.bidder})).join(", ");S.logError("adUnit "+e.code+" has 'mediaType' set to 'native' but contains non-native bidder(s) "+n+". No Prebid demand requests will be triggered for those bidders."),e.bids=e.bids.filter(p.nativeBidder)})),P)return k.push((function(){E.requestBids({bidsBackHandler:n,timeout:o,adUnits:r,adUnitCodes:i})})),void 0;if(P=!0,E._adUnitCodes=i,I.externalCallbackReset(),a(),!r||0===r.length)return S.logMessage("No adUnits configured. No bids requested."),("undefined"==typeof n?"undefined":u(n))===C&&I.addOneTimeCallback(n,!1),I.executeCallback(),void 0;var d=!0,c=I.executeCallback.bind(I,d),f=setTimeout(c,o);y.setAjaxTimeout(o),("undefined"==typeof n?"undefined":u(n))===C&&I.addOneTimeCallback(n,f),A.callBids({adUnits:r,adUnitCodes:i,cbTimeout:o}),0===E._bidsRequested.length&&I.executeCallback()},E.addAdUnits=function(e){S.logInfo("Invoking pbjs.addAdUnits",arguments),S.isArray(e)?(e.forEach((function(e){return e.transactionId=S.generateUUID()})),E.adUnits.push.apply(E.adUnits,e)):("undefined"==typeof e?"undefined":u(e))===B&&(e.transactionId=S.generateUUID(),E.adUnits.push(e))},E.onEvent=function(e,n,t){return S.logInfo("Invoking pbjs.onEvent",arguments),S.isFn(n)?t&&!x[e].call(null,t)?(S.logError('The id provided is not valid for event "'+e+'" and no handler was set.'),void 0):(w.on(e,n,t),void 0):(S.logError('The event handler provided is not a function and was not set on event "'+e+'".'),void 0)},E.offEvent=function(e,n,t){S.logInfo("Invoking pbjs.offEvent",arguments),(!t||x[e].call(null,t))&&w.off(e,n,t)},E.addCallback=function(e,n){S.logInfo("Invoking pbjs.addCallback",arguments);var t=null;return e&&n&&("undefined"==typeof n?"undefined":u(n))===C?(t=S.getUniqueIdentifierStr,I.addCallback(t,n,e),t):(S.logError("error registering callback. Check method signature"),t)},E.removeCallback=function(){return null},E.registerBidAdapter=function(e,n){S.logInfo("Invoking pbjs.registerBidAdapter",arguments);try{A.registerBidAdapter(e(),n)}catch(t){S.logError("Error registering bidder adapter : "+t.message)}},E.registerAnalyticsAdapter=function(e){S.logInfo("Invoking pbjs.registerAnalyticsAdapter",arguments);try{A.registerAnalyticsAdapter(e)}catch(n){S.logError("Error registering analytics adapter : "+n.message)}},E.bidsAvailableForAdapter=function(e){S.logInfo("Invoking pbjs.bidsAvailableForAdapter",arguments),E._bidsRequested.find((function(n){return n.bidderCode===e})).bids.map((function(n){return d(n,_.createBid(1),{bidderCode:e,adUnitCode:n.placementCode})})).map((function(e){return E._bidsReceived.push(e)}))},E.createBid=function(e){return S.logInfo("Invoking pbjs.createBid",arguments),_.createBid(e)},E.addBidResponse=function(e,n){S.logInfo("Invoking pbjs.addBidResponse",arguments),I.addBidResponse(e,n)},E.loadScript=function(e,n,t){S.logInfo("Invoking pbjs.loadScript",arguments),h.loadScript(e,n,t)},E.enableAnalytics=function(e){e&&!S.isEmpty(e)?(S.logInfo("Invoking pbjs.enableAnalytics for: ",e),A.enableAnalytics(e)):S.logError("pbjs.enableAnalytics should be called with option {}")},E.aliasBidder=function(e,n){S.logInfo("Invoking pbjs.aliasBidder",arguments),e&&n?A.aliasBidAdapter(e,n):S.logError("bidderCode and alias must be passed as arguments","pbjs.aliasBidder")},E.setPriceGranularity=function(e){if(S.logInfo("Invoking pbjs.setPriceGranularity",arguments),!e)return S.logError("Prebid Error: no value passed to `setPriceGranularity()`"),void 0;if("string"==typeof e)I.setPriceGranularity(e);else if("object"===("undefined"==typeof e?"undefined":u(e))){if(!m.isValidePriceConfig(e))return S.logError("Invalid custom price value passed to `setPriceGranularity()`"),void 0;I.setCustomPriceBucket(e),I.setPriceGranularity(T.GRANULARITY_OPTIONS.CUSTOM),S.logMessage("Using custom price granularity")}},E.enableSendAllBids=function(){E._sendAllBids=!0},E.getAllWinningBids=function(){return E._winningBids},E.buildMasterVideoTagFromAdserverTag=function(e,n){S.logInfo("Invoking pbjs.buildMasterVideoTagFromAdserverTag",arguments);var t=g.parse(e);if(0===E._bidsReceived.length)return e;var r="";if("dfp"!==n.adserver.toLowerCase())return S.logError("Only DFP adserver is supported"),void 0;var i=j.dfpAdserver(n,t);return i.verifyAdserverTag()||S.logError("Invalid adserverTag, required google params are missing in query string"),i.appendQueryParams(),r=g.format(i.urlComponents)},E.setBidderSequence=function(e){e===T.ORDER.RANDOM&&A.setBidderSequence(T.ORDER.RANDOM)},E.getHighestCpmBids=function(e){return O.getWinningBids(e)},E.setS2SConfig=function(e){if(!S.contains(Object.keys(e),"accountId"))return S.logError("accountId missing in Server to Server config"),void 0;if(!S.contains(Object.keys(e),"bidders"))return S.logError("bidders missing in Server to Server config"),void 0;var n=d({enabled:!1,endpoint:T.S2S.DEFAULT_ENDPOINT,timeout:1e3,maxBids:1,adapter:"prebidServer"},e);A.setS2SConfig(n)},E.cmd.push((function(){return b.listenMessagesFromCreative()})),i(E.cmd),i(E.que)}),(function(e,n){"use strict";function t(){return window.pbjs}Object.defineProperty(n,"__esModule",{value:!0}),n.getGlobal=t,window.pbjs=window.pbjs||{},window.pbjs.cmd=window.pbjs.cmd||[],window.pbjs.que=window.pbjs.que||[]}),(function(e,n,t){"use strict";function r(){return k()+Math.random().toString(16).substr(2)}function i(){return window.console&&window.console.log}function o(e,n,t){return t.indexOf(e)===n}function a(e,n){return e.concat(n)}function s(e){return pbjs._bidsRequested.map((function(n){return n.bids.find((function(n){return n.bidId===e}))})).find((function(e){return e}))}function d(e){return Object.keys(e)}function u(e,n){return e[n]}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pbjs.adUnits;return e.map((function(e){return e.bids.map((function(e){return e.bidder})).reduce(a,[])})).reduce(a).filter(o)}function f(){return window.googletag&&n.isFn(window.googletag.pubads)&&n.isFn(window.googletag.pubads().getSlots)?!0:void 0}function l(e,n){return e.cpm===n.cpm?e.timeToRespond>n.timeToRespond?n:e:e.cpm<n.cpm?n:e}function p(e){for(var n=e.length;n>0;){var t=Math.floor(Math.random()*n);n--;var r=e[n];e[n]=e[t],e[t]=r}return e}function g(e,n){return e.includes(n&&n.placementCode||n&&n.adUnitCode)}function m(e){return e.defaultView&&e.defaultView.frameElement&&"srcdoc"in e.defaultView.frameElement&&!/firefox/i.test(navigator.userAgent)}function b(e){return JSON.parse(JSON.stringify(e))}function v(){try{return window.self!==window.top}catch(e){return!0}}function h(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function y(e,n){return e?e.replace(/\$\{AUCTION_PRICE\}/g,n):void 0}function E(e){return pbjs._bidsRequested.find((function(n){return n.bidderCode===e}))}function T(e,n){return pbjs._bidsRequested.find((function(t){return t.bids.filter((function(t){return t.bidder===e&&t.placementCode===n})).length>0}))||{start:null,requestId:null}}Object.defineProperty(n,"__esModule",{value:!0});var S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.uniques=o,n.flatten=a,n.getBidRequest=s,n.getKeys=d,n.getValue=u,n.getBidderCodes=c,n.isGptPubadsDefined=f,n.getHighestCpm=l,n.shuffle=p,n.adUnitsFilter=g,n.isSrcdocSupported=m,n.cloneJson=b,n.inIframe=v,n.isSafariBrowser=h,n.replaceAuctionPrice=y,n.getBidderRequestAllAdUnits=E,n.getBidderRequest=T;var I=t(3),A="object",_="string",w="number",j=!1,O="Array",C="String",U="Function",B="Number",R=Object.prototype.toString,N=null;try{N=console.info.bind(window.console)}catch(P){}n.replaceTokenInString=function(e,n,t){return this._each(n,(function(n,r){n=void 0===n?"":n;var i=t+r.toUpperCase()+t,o=new RegExp(i,"g");e=e.replace(o,n)})),e};var k=(function(){var e=0;return function(){return e++,e}})();n.getUniqueIdentifierStr=r,n.generateUUID=function G(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,G)},n.getBidIdParameter=function(e,n){return n&&n[e]?n[e]:""},n.tryAppendQueryString=function(e,n,t){return t?e+=n+"="+encodeURIComponent(t)+"&":e},n.parseQueryStringParameters=function(e){var n="";for(var t in e)e.hasOwnProperty(t)&&(n+=t+"="+encodeURIComponent(e[t])+"&");return n},n.transformAdServerTargetingObj=function(e){return e&&Object.getOwnPropertyNames(e).length>0?d(e).map((function(n){return n+"="+encodeURIComponent(u(e,n))})).join("&"):""},n.parseSizesInput=function(e){var n=[];if(("undefined"==typeof e?"undefined":S(e))===_){var t=e.split(","),r=/^(\d)+x(\d)+$/i;if(t)for(var i in t)M(t,i)&&t[i].match(r)&&n.push(t[i])}else if(("undefined"==typeof e?"undefined":S(e))===A){var o=e.length;if(o>0)if(2===o&&S(e[0])===w&&S(e[1])===w)n.push(this.parseGPTSingleSizeArray(e));else for(var a=0;o>a;a++)n.push(this.parseGPTSingleSizeArray(e[a]))}return n},n.parseGPTSingleSizeArray=function(e){return!this.isArray(e)||2!==e.length||isNaN(e[0])||isNaN(e[1])?void 0:e[0]+"x"+e[1]},n.getTopWindowLocation=function(){var e=void 0;try{e=window.top.location}catch(n){e=window.location}return e},n.getTopWindowUrl=function(){var e=void 0;try{e=this.getTopWindowLocation().href}catch(n){e=""}return e},n.logWarn=function(e){D()&&console.warn&&console.warn("WARNING: "+e)},n.logInfo=function(e,n){D()&&i()&&N&&(n&&0!==n.length||(n=""),N("INFO: "+e+(""===n?"":" : params : "),n))},n.logMessage=function(e){D()&&i()&&console.log("MESSAGE: "+e)},n.hasConsoleLogger=i;var x=(function(e){return e?window.console.error?"error":"log":""})(i()),D=function(){return pbjs.logging===!1&&j===!1&&(pbjs.logging="TRUE"===q(I.DEBUG_MODE).toUpperCase(),j=!0),!!pbjs.logging};n.debugTurnedOn=D,n.logError=function(e,n,t){var r=n||"ERROR";D()&&i()&&console[x](console,r+": "+e,t||"")},n.createInvisibleIframe=function(){var e=document.createElement("iframe");return e.id=r(),e.height=0,e.width=0,e.border="0px",e.hspace="0",e.vspace="0",e.marginWidth="0",e.marginHeight="0",e.style.border="0",e.scrolling="no",e.frameBorder="0",e.src="about:blank",e.style.display="none",e};var q=function(e){var n="[\\?&]"+e+"=([^&#]*)",t=new RegExp(n),r=t.exec(window.location.search);return null===r?"":decodeURIComponent(r[1].replace(/\+/g," "))};n.hasValidBidRequest=function(e,n,t){function r(e,t){t===n[o]&&(i=!0)}for(var i=!1,o=0;o<n.length;o++)if(i=!1,this._each(e,r),!i)return this.logError("Params are missing for bid request. One of these required paramaters are missing: "+n,t),!1;return!0},n.addEventHandler=function(e,n,t){e.addEventListener?e.addEventListener(n,t,!0):e.attachEvent&&e.attachEvent("on"+n,t)},n.isA=function(e,n){return R.call(e)==="[object "+n+"]"},n.isFn=function(e){return this.isA(e,U)},n.isStr=function(e){return this.isA(e,C)},n.isArray=function(e){return this.isA(e,O)},n.isNumber=function(e){return this.isA(e,B)},n.isEmpty=function(e){if(!e)return!0;if(this.isArray(e)||this.isStr(e))return!(e.length>0);for(var n in e)if(hasOwnProperty.call(e,n))return!1;return!0},n.isEmptyStr=function(e){return this.isStr(e)&&(!e||0===e.length)},n._each=function(e,n){if(!this.isEmpty(e)){if(this.isFn(e.forEach))return e.forEach(n,this);var t=0,r=e.length;if(r>0)for(;r>t;t++)n(e[t],t,e);else for(t in e)hasOwnProperty.call(e,t)&&n.call(this,e[t],t)}},n.contains=function(e,n){if(this.isEmpty(e))return!1;if(this.isFn(e.indexOf))return-1!==e.indexOf(n);for(var t=e.length;t--;)if(e[t]===n)return!0;return!1},n.indexOf=(function(){return Array.prototype.indexOf?Array.prototype.indexOf:void 0})(),n._map=function(e,n){if(this.isEmpty(e))return[];if(this.isFn(e.map))return e.map(n);var t=[];return this._each(e,(function(r,i){t.push(n(r,i,e))})),t};var M=function(e,n){return e.hasOwnProperty?e.hasOwnProperty(n):"undefined"!=typeof e[n]&&e.constructor.prototype[n]!==e[n]};n.insertElement=function(e,n,t){n=n||document;var r=void 0;r=t?n.getElementsByTagName(t):n.getElementsByTagName("head");try{r=r.length?r:n.getElementsByTagName("body"),r.length&&(r=r[0],r.insertBefore(e,r.firstChild))}catch(i){}},n.insertPixel=function(e){var n=new Image;n.id=this.getUniqueIdentifierStr(),n.src=e,n.height=0,n.width=0,n.style.display="none",n.onload=function(){try{this.parentNode.removeChild(this)}catch(e){}},this.insertElement(n)},n.insertCookieSyncIframe=function(e,n){var t=this.createTrackPixelIframeHtml(e,n),r=document.createElement("div");r.innerHTML=t;var i=r.firstChild;this.insertElement(i)},n.createTrackPixelHtml=function(e){if(!e)return"";var n=encodeURI(e),t='<div style="position:absolute;left:0px;top:0px;visibility:hidden;">';return t+='<img src="'+n+'"></div>'},n.createTrackPixelIframeHtml=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!0;return e?(n&&(e=encodeURI(e)),'<iframe frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0p;width:0p;display:none;" scrolling="no" src="'+e+'"></iframe>'):""},n.getIframeDocument=function(e){if(e){var n=void 0;try{n=e.contentWindow?e.contentWindow.document:e.contentDocument.document?e.contentDocument.document:e.contentDocument}catch(t){this.logError("Cannot get iframe document",t)}return n}},n.getValueString=function(e,n,t){return void 0===n||null===n?t:this.isStr(n)?n:this.isNumber(n)?n.toString():(this.logWarn("Unsuported type for param: "+e+" required type: String"),void 0)}}),(function(e){e.exports={JSON_MAPPING:{PL_CODE:"code",PL_SIZE:"sizes",PL_BIDS:"bids",BD_BIDDER:"bidder",BD_ID:"paramsd",BD_PL_ID:"placementId",ADSERVER_TARGETING:"adserverTargeting",BD_SETTING_STANDARD:"standard"},REPO_AND_VERSION:"prebid_prebid_0.25.0",DEBUG_MODE:"pbjs_debug",STATUS:{GOOD:1,NO_BID:2},CB:{TYPE:{ALL_BIDS_BACK:"allRequestedBidsBack",AD_UNIT_BIDS_BACK:"adUnitBidsBack",BID_WON:"bidWon",REQUEST_BIDS:"requestBids"}},objectType_function:"function",objectType_undefined:"undefined",objectType_object:"object",objectType_string:"string",objectType_number:"number",EVENTS:{AUCTION_INIT:"auctionInit",AUCTION_END:"auctionEnd",BID_ADJUSTMENT:"bidAdjustment",BID_TIMEOUT:"bidTimeout",BID_REQUESTED:"bidRequested",BID_RESPONSE:"bidResponse",BID_WON:"bidWon",SET_TARGETING:"setTargeting",REQUEST_BIDS:"requestBids"},EVENT_ID_PATHS:{bidWon:"adUnitCode"},ORDER:{RANDOM:"random"},GRANULARITY_OPTIONS:{LOW:"low",MEDIUM:"medium",HIGH:"high",AUTO:"auto",DENSE:"dense",CUSTOM:"custom"},TARGETING_KEYS:["hb_bidder","hb_adid","hb_pb","hb_size","hb_deal"],S2S:{DEFAULT_ENDPOINT:"https://prebid.adnxs.com/pbs/v1/auction"}}}),(function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasNonVideoBidder=n.videoAdUnit=void 0;{var r=t(5),i=(n.videoAdUnit=function(e){return"video"===e.mediaType},function(e){return!r.videoAdapters.includes(e.bidder)});n.hasNonVideoBidder=function(e){return e.bids.filter(i).length}}}),(function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var n=e.bidderCode,t=e.requestId,r=e.bidderRequestId,i=e.adUnits;return i.map((function(e){return e.bids.filter((function(e){return e.bidder===n})).map((function(n){var i=e.sizes;if(e.sizeMapping){var o=u.mapSizes(e);if(""===o)return"";i=o}return e.nativeParams&&(n=s({},n,{nativeParams:f["default"](e.nativeParams)})),s({},n,{placementCode:e.code,mediaType:e.mediaType,transactionId:e.transactionId,sizes:i,bidId:n.bid_id||p.getUniqueIdentifierStr(),bidderRequestId:r,requestId:t})}))})).reduce(d.flatten,[]).filter((function(e){return""!==e}))}function o(e){var n=[],t=p.parseSizesInput(e.sizes);return t.forEach((function(e){var t=e.split("x"),r={w:parseInt(t[0]),h:parseInt(t[1])};n.push(r)})),n}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d=t(2),u=t(6),c=t(7),f=r(c),l=t(8),p=t(2),g=t(3),m=t(9),b={};n.bidderRegistry=b;var v={},h={},y=null;n.callBids=function(e){var n=e.adUnits,t=e.cbTimeout,r=p.generateUUID(),a=Date.now(),s={timestamp:a,requestId:r};m.emit(g.EVENTS.AUCTION_INIT,s);var c=d.getBidderCodes(n);if(y===g.ORDER.RANDOM&&(c=d.shuffle(c)),v.enabled){var f=v.bidders;c=c.filter((function(e){return!f.includes(e)}));var l=p.cloneJson(n);l.forEach((function(e){e.sizeMapping&&(e.sizes=u.mapSizes(e),delete e.sizeMapping),e.sizes=o(e),e.bids=e.bids.filter((function(e){return f.includes(e.bidder)})).map((function(e){return e.bid_id=p.getUniqueIdentifierStr(),e}))}));var h=p.generateUUID();f.forEach((function(e){var n=p.getUniqueIdentifierStr(),t={bidderCode:e,requestId:r,bidderRequestId:n,tid:h,bids:i({bidderCode:e,requestId:r,bidderRequestId:n,adUnits:l}),start:(new Date).getTime(),auctionStart:a,timeout:v.timeout};pbjs._bidsRequested.push(t)}));var E={tid:h,ad_units:l},T=b[v.adapter];p.logMessage("CALLING S2S HEADER BIDDERS ==== "+f.join(",")),T.setConfig(v),T.callBids(E)}c.forEach((function(e){var o=b[e];if(o){var s=p.getUniqueIdentifierStr(),d={bidderCode:e,requestId:r,bidderRequestId:s,bids:i({bidderCode:e,requestId:r,bidderRequestId:s,adUnits:n}),start:(new Date).getTime(),auctionStart:a,timeout:t};d.bids&&0!==d.bids.length&&(p.logMessage("CALLING BIDDER ======= "+e),pbjs._bidsRequested.push(d),m.emit(g.EVENTS.BID_REQUESTED,d),o.callBids(d))}else p.logError("Adapter trying to be called which does not exist: "+e+" adaptermanager.callBids")}))},n.registerBidAdapter=function(e,n){e&&n?a(e.callBids)===g.objectType_function?b[n]=e:p.logError("Bidder adaptor error for bidder code: "+n+"bidder must implement a callBids() function"):p.logError("bidAdaptor or bidderCode not specified")},n.aliasBidAdapter=function(e,n){var t=b[n];if(("undefined"==typeof t?"undefined":a(t))===g.objectType_undefined){var r=b[e];if(("undefined"==typeof r?"undefined":a(r))===g.objectType_undefined)p.logError('bidderCode "'+e+'" is not an existing bidder.',"adaptermanager.aliasBidAdapter");else try{var i=null;r instanceof l.BaseAdapter?p.logError(e+" bidder does not currently support aliasing.","adaptermanager.aliasBidAdapter"):(i=r.createNew(),i.setBidderCode(n),this.registerBidAdapter(i,n))}catch(o){p.logError(e+" bidder does not currently support aliasing.","adaptermanager.aliasBidAdapter")}}else p.logMessage('alias name "'+n+'" has been already specified.')},n.registerAnalyticsAdapter=function(e){var n=e.adapter,t=e.code;n&&t?a(n.enableAnalytics)===g.objectType_function?(n.code=t,h[t]=n):p.logError('Prebid Error: Analytics adaptor error for analytics "'+t+'"\n analytics adapter must implement an enableAnalytics() function'):p.logError("Prebid Error: analyticsAdapter or analyticsCode not specified")},n.enableAnalytics=function(e){p.isArray(e)||(e=[e]),p._each(e,(function(e){var n=h[e.provider];n?n.enableAnalytics(e):p.logError("Prebid Error: no analytics adapter found in registry for\n "+e.provider+".")}))},n.setBidderSequence=function(e){y=e},n.setS2SConfig=function(e){v=e};var E=t(10);n.registerBidAdapter(new E,"openx"),n.videoAdapters=[];var T=t(15)["default"]||t(15);n.registerAnalyticsAdapter({adapter:T,code:"ga"})}),(function(e,n,t){"use strict";function r(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n["default"]=e,n}function i(e){if(!o(e.sizeMapping))return e.sizes;var n=a();if(!n){var t=e.sizeMapping.reduce((function(e,n){return e.minWidth<n.minWidth?n:e}));return t.sizes&&t.sizes.length?t.sizes:e.sizes}var r="",i=e.sizeMapping.find((function(e){return n>e.minWidth}));return i&&i.sizes&&i.sizes.length?(r=i.sizes,u.logMessage("AdUnit : "+e.code+" resized based on device width to : "+r)):u.logMessage("AdUnit : "+e.code+" not mapped to any sizes for device width. This request will be suppressed."),r}function o(e){return u.isArray(e)&&e.length>0?!0:(u.logInfo("No size mapping defined"),!1)}function a(e){var n=e||c||window,t=n.document;return n.innerWidth?n.innerWidth:t.body.clientWidth?t.body.clientWidth:t.documentElement.clientWidth?t.documentElement.clientWidth:0}function s(e){c=e}Object.defineProperty(n,"__esModule",{value:!0}),n.setWindow=n.getScreenWidth=n.mapSizes=void 0;var d=t(2),u=r(d),c=void 0;n.mapSizes=i,n.getScreenWidth=a,n.setWindow=s}),(function(e,n,t){"use strict";function r(e){return e&&e.type&&i(e.type)?f[e.type]:e}function i(e){return e&&Object.keys(f).includes(e)?!0:(s.logError(e+" nativeParam is not supported"),!1)}function o(e){var n=s.getBidRequest(e.adId);if(!n)return!1;var t=n.nativeParams;if(!t)return!0;var r=Object.keys(t).filter((function(e){return t[e].required})),i=Object.keys(e.native);return r.every((function(e){return i.includes(e)}))}function a(e){var n=e.native&&e.native.impressionTrackers;(n||[]).forEach((function(e){s.insertPixel(e)}))}Object.defineProperty(n,"__esModule",{value:!0}),n.hasNonNativeBidder=n.nativeBidder=n.nativeAdUnit=n.NATIVE_TARGETING_KEYS=n.NATIVE_KEYS=void 0,n["default"]=r,n.nativeBidIsValid=o,n.fireNativeImpressions=a;{var s=t(2),d=[],u=n.NATIVE_KEYS={title:"hb_native_title",body:"hb_native_body",sponsoredBy:"hb_native_brand",image:"hb_native_image",icon:"hb_native_icon",clickUrl:"hb_native_linkurl"},c=(n.NATIVE_TARGETING_KEYS=Object.keys(u).map((function(e){return u[e]})),{image:{required:!0},title:{required:!0},sponsoredBy:{required:!0},clickUrl:{required:!0},body:{required:!1},icon:{required:!1}}),f={image:c},l=(n.nativeAdUnit=function(e){return"native"===e.mediaType},n.nativeBidder=function(e){return d.includes(e.bidder)});n.hasNonNativeBidder=function(e){return e.bids.filter((function(e){return!l(e)})).length}}}),(function(e,n){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});{var r=(function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}})();n.BaseAdapter=(function(){function e(n){t(this,e),this.code=n}return r(e,[{key:"getCode",value:function(){return this.code}},{key:"setCode",value:function(e){this.code=e}},{key:"callBids",value:function(){throw"adapter implementation must override callBids method"}}]),e})()}}),(function(e,n,t){"use strict";var r=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i=t(2),o=t(3),a=Array.prototype.slice,s=Array.prototype.push,d=i._map(o.EVENTS,(function(e){return e})),u=o.EVENT_ID_PATHS,c=[];e.exports=(function(){function e(e,n){i.logMessage("Emitting event for: "+e);var r=n[0]||{},o=u[e],a=r[o],d=t[e]||{que:[]},f=i._map(d,(function(e,n){return n})),l=[];c.push({eventType:e,args:r,id:a}),a&&i.contains(f,a)&&s.apply(l,d[a].que),s.apply(l,d.que),i._each(l,(function(e){if(e)try{e.apply(null,n)}catch(t){i.logError("Error executing handler:","events.js",t)}}))}function n(e){return i.contains(d,e)}var t={},o={};return o.on=function(e,r,o){if(n(e)){var a=t[e]||{que:[]};o?(a[o]=a[o]||{que:[]},a[o].que.push(r)):a.que.push(r),t[e]=a}else i.logError("Wrong event name : "+e+" Valid event names :"+d)},o.emit=function(n){var t=a.call(arguments,1);e(n,t)},o.off=function(e,n,r){var o=t[e];i.isEmpty(o)||i.isEmpty(o.que)&&i.isEmpty(o[r])||r&&(i.isEmpty(o[r])||i.isEmpty(o[r].que))||(r?i._each(o[r].que,(function(e){var t=o[r].que;e===n&&t.splice(i.indexOf.call(t,e),1)})):i._each(o.que,(function(e){var t=o.que;e===n&&t.splice(i.indexOf.call(t,e),1)})),t[e]=o)},o.get=function(){return t},o.getEvents=function(){var e=[];return i._each(c,(function(n){var t=r({},n);e.push(t)})),e},o})()}),(function(e,n,t){"use strict";var r=t(11),i=t(12),o=t(14),a=t(3),s=t(2),d=function(){function e(e){var n=void 0,t=void 0,r=window,i=document,o=i.documentElement,a=void 0;if(e){try{r=window.top,i=window.top.document}catch(s){return}o=i.documentElement,a=i.body,n=r.innerWidth||o.clientWidth||a.clientWidth,t=r.innerHeight||o.clientHeight||a.clientHeight}else o=i.documentElement,n=r.innerWidth||o.clientWidth,t=r.innerHeight||o.clientHeight;return n+"x"+t}function n(e){var n=s.createInvisibleIframe(),t="openx-pd";n.setAttribute("id",t),n.setAttribute("name",t);var r=document.body;r&&(n.src=e,b?(b.parentNode.replaceChild(n,b),b=n):b=r.appendChild(n))}function t(e,n){var t=r.createBid(e?a.STATUS.GOOD:a.STATUS.NO_BID,n);if(t.bidderCode=p,e){var o=e.creative[0];t.ad=e.html,t.cpm=Number(e.pub_rev)/1e3,t.ad_id=e.adid,e.deal_id&&(t.dealId=e.deal_id),o&&(t.width=o.width,t.height=o.height)}i.addBidResponse(n.placementCode,t)}function d(e){for(var n in e)e.hasOwnProperty(n)&&(e[n]||delete e[n]);return s._map(Object.keys(e),(function(n){return n+"="+e[n]})).join("&")}function u(e,n){var t=new Image,r=e.tracking.impression,i=r.match(/([^?]+\/)ri\?/);i&&(t.src=i[1]+"bo?"+d(n))}function c(e,n){var t=s.parseSizesInput(n.sizes),r=t&&t.length||0,i=!1,o=e.creative&&e.creative[0],a=String(o.width)+"x"+String(o.height);if(s.isArray(t))for(var d=0;r>d;d++){var u=t[d];if(String(u)===String(a)){i=!0;break}}return i}function f(e,n,t){if(s.isArray(e)){n.auid=s._map(e,(function(e){return e.params.unit})).join("%2C"),n.aus=s._map(e,(function(e){return s.parseSizesInput(e.sizes).join(",")})).join("|"),e.forEach((function(e){for(var t in e.params.customParams)e.params.customParams.hasOwnProperty(t)&&(n["c."+t]=e.params.customParams[t])})),n.callback="window.pbjs.oxARJResponse";
  4. var r=d(n);o.loadScript("//"+t+"/w/1.0/arj?"+r)}}function l(n){var t=void 0,r=n.bids||[],i=window.parent!==window?document.referrer:window.location.href;i=i&&encodeURIComponent(i);try{t=window.self!==window.top}catch(o){t=!1}if(0!==r.length){var a=r[0].params.delDomain;m=new Date(n.start),f(r,{ju:i,jr:i,ch:document.charSet||document.characterSet,res:screen.width+"x"+screen.height+"x"+screen.colorDepth,ifr:t,tz:m.getTimezoneOffset(),tws:e(t),ef:"bt%2Cdb",be:1,bc:g},a)}}var p="openx",g="hb_pb",m=void 0,b=null;return pbjs.oxARJResponse=function(e){var r=e.ads.ad;e.ads&&e.ads.pixels&&n(e.ads.pixels),r||(r=[]);for(var i=pbjs._bidsRequested.find((function(e){return"openx"===e.bidderCode})).bids,o=0;o<i.length;o++){for(var a=i[o],s=null,d=null,f=0;f<r.length;f++)if(d=r[f],String(a.params.unit)===String(d.adunitid)&&c(d,a)&&!d.used){s=d.adunitid;break}var l={bd:+new Date-m,br:"0",bt:pbjs.cbTimeout||pbjs.bidderTimeout,bs:window.location.hostname};s&&d.pub_rev?(d.used=!0,l.br=l.bt<l.bd?"t":"p",l.bp=d.pub_rev,l.ts=d.ts,t(d,a),u(d.creative[0],l)):t(null,a)}},{callBids:l}};e.exports=d}),(function(e,n,t){"use strict";function r(e,n){function t(){switch(o){case 0:return"Pending";case 1:return"Bid available";case 2:return"Bid returned empty or error response";case 3:return"Bid timed out"}}var r=n&&n.bidId||i.getUniqueIdentifierStr(),o=e||0;this.bidderCode=n&&n.bidder||"",this.width=0,this.height=0,this.statusMessage=t(),this.adId=r,this.getStatusCode=function(){return o},this.getSize=function(){return this.width+"x"+this.height}}var i=t(2);n.createBid=function(){return new(Function.prototype.bind.apply(r,[null].concat(Array.prototype.slice.call(arguments))))}}),(function(e,n,t){"use strict";function r(){return(new Date).getTime()}function i(e){return e.bidderCode}function o(e){return e.bidder}function a(e){var n=this,t=pbjs._bidsRequested.map((function(t){return t.bids.filter(y.adUnitsFilter.bind(n,pbjs._adUnitCodes)).filter((function(n){return n.placementCode===e}))})).reduce(y.flatten,[]).map((function(e){return"indexExchange"===e.bidder?e.sizes.length:1})).reduce(s,0),r=pbjs._bidsReceived.filter((function(n){return n.adUnitCode===e})).length;return t===r}function s(e,n){return e+n}function d(){var e=pbjs._bidsRequested.map((function(e){return e.bids})).reduce(y.flatten,[]).filter(y.adUnitsFilter.bind(this,pbjs._adUnitCodes)).map((function(e){return"indexExchange"===e.bidder?e.sizes.length:1})).reduce((function(e,n){return e+n}),0),n=pbjs._bidsReceived.filter(y.adUnitsFilter.bind(this,pbjs._adUnitCodes)).length;return e===n}function u(e,n){var t={},r=pbjs.bidderSettings;if(n&&r){var i=m();c(t,i,n)}return e&&n&&r&&r[e]&&r[e][S.JSON_MAPPING.ADSERVER_TARGETING]?(c(t,r[e],n),n.alwaysUseBid=r[e].alwaysUseBid,n.sendStandardTargeting=r[e].sendStandardTargeting):U[e]&&(c(t,U[e],n),n.alwaysUseBid=U[e].alwaysUseBid,n.sendStandardTargeting=U[e].sendStandardTargeting),n.native&&Object.keys(n.native).forEach((function(e){var r=T.NATIVE_KEYS[e],i=n.native[e];r&&(t[r]=i)})),t}function c(e,n,t){var r=n[S.JSON_MAPPING.ADSERVER_TARGETING];return t.size=t.getSize(),A._each(r,(function(r){var i=r.key,o=r.val;if(e[i]&&A.logWarn("The key: "+i+" is getting ovewritten"),A.isFn(o))try{o=o(t)}catch(a){A.logError("bidmanager","ERROR",a)}("undefined"==typeof n.suppressEmptyKeys||n.suppressEmptyKeys!==!0)&&"hb_deal"!==i||!A.isEmptyStr(o)&&null!==o&&void 0!==o?e[i]=o:A.logInfo("suppressing empty key '"+i+"' from adserver targeting")})),e}function f(e){var n=[e];l(j.byAdUnit,n)}function l(e,n){var t=this;A.isArray(e)&&e.forEach((function(e){var r=n||pbjs._adUnitCodes,i=[pbjs._bidsReceived.filter(y.adUnitsFilter.bind(t,r)).reduce(p,{})];e.apply(pbjs,i)}))}function p(e,n){return e[n.adUnitCode]||(e[n.adUnitCode]={bids:[]}),e[n.adUnitCode].bids.push(n),e}function g(e){var n=e.bidderCode,t=e.cpm;if(n&&pbjs.bidderSettings&&pbjs.bidderSettings[n]&&v(pbjs.bidderSettings[n].bidCpmAdjustment)===w)try{t=pbjs.bidderSettings[n].bidCpmAdjustment.call(null,e.cpm,h({},e))}catch(r){A.logError("Error during bid adjustment","bidmanager.js",r)}t>=0&&(e.cpm=t)}function m(){var e=pbjs.bidderSettings;return e[S.JSON_MAPPING.BD_SETTING_STANDARD]||(e[S.JSON_MAPPING.BD_SETTING_STANDARD]={adserverTargeting:[{key:"hb_bidder",val:function(e){return e.bidderCode}},{key:"hb_adid",val:function(e){return e.adId}},{key:"hb_pb",val:function(e){return O===S.GRANULARITY_OPTIONS.AUTO?e.pbAg:O===S.GRANULARITY_OPTIONS.DENSE?e.pbDg:O===S.GRANULARITY_OPTIONS.LOW?e.pbLg:O===S.GRANULARITY_OPTIONS.MEDIUM?e.pbMg:O===S.GRANULARITY_OPTIONS.HIGH?e.pbHg:O===S.GRANULARITY_OPTIONS.CUSTOM?e.pbCg:void 0}},{key:"hb_size",val:function(e){return e.size}},{key:"hb_deal",val:function(e){return e.dealId}}]}),e[S.JSON_MAPPING.BD_SETTING_STANDARD]}function b(){return m()[S.JSON_MAPPING.ADSERVER_TARGETING]}var v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},y=t(2),E=t(13),T=t(7),S=t(3),I=S.EVENTS.AUCTION_END,A=t(2),_=t(9),w="function",j={byAdUnit:[],all:[],oneTime:null,timer:!1},O=S.GRANULARITY_OPTIONS.MEDIUM,C=void 0,U={};n.setCustomPriceBucket=function(e){C=e},n.getTimedOutBidders=function(){return pbjs._bidsRequested.map(i).filter(y.uniques).filter((function(e){return pbjs._bidsReceived.map(o).filter(y.uniques).indexOf(e)<0}))},n.bidsBackAll=function(){return d()},n.addBidResponse=function(e,t){if(!e)return A.logWarn("No adUnitCode supplied to addBidResponse, response discarded"),void 0;if(t){if("native"===t.mediaType&&!T.nativeBidIsValid(t))return A.logError("Native bid response does not contain all required assets. This bid won't be addeed to the auction"),void 0;var i=y.getBidderRequest(t.bidderCode,e),o=i.requestId,s=i.start;if(h(t,{requestId:o,responseTimestamp:r(),requestTimestamp:s,cpm:parseFloat(t.cpm)||0,bidder:t.bidderCode,adUnitCode:e}),t.timeToRespond=t.responseTimestamp-t.requestTimestamp,t.timeToRespond>pbjs.cbTimeout+pbjs.timeoutBuffer){var c=!0;n.executeCallback(c)}_.emit(S.EVENTS.BID_ADJUSTMENT,t),_.emit(S.EVENTS.BID_RESPONSE,t);var l=E.getPriceBucketString(t.cpm,C);t.pbLg=l.low,t.pbMg=l.med,t.pbHg=l.high,t.pbAg=l.auto,t.pbDg=l.dense,t.pbCg=l.custom;var p={};t.bidderCode&&(t.cpm>0||t.dealId)&&(p=u(t.bidderCode,t)),t.adserverTargeting=p,pbjs._bidsReceived.push(t)}t&&t.adUnitCode&&a(t.adUnitCode)&&f(t.adUnitCode),d()&&n.executeCallback()},n.getKeyValueTargetingPairs=function(){return u.apply(void 0,arguments)},n.setPriceGranularity=function(e){var n=S.GRANULARITY_OPTIONS;Object.keys(n).filter((function(t){return e===n[t]}))?O=e:(A.logWarn("Prebid Warning: setPriceGranularity was called with invalid setting, using `medium` as default."),O=S.GRANULARITY_OPTIONS.MEDIUM)},n.registerDefaultBidderSetting=function(e,n){U[e]=n},n.executeCallback=function(e){if(!e&&j.timer&&clearTimeout(j.timer),j.all.called!==!0&&(l(j.all),j.all.called=!0,e)){var t=n.getTimedOutBidders();t.length&&_.emit(S.EVENTS.BID_TIMEOUT,t)}if(j.oneTime){_.emit(I);try{l([j.oneTime])}catch(r){A.logError("Error executing bidsBackHandler",null,r)}finally{j.oneTime=null,j.timer=!1,pbjs.clearAuction()}}},n.externalCallbackReset=function(){j.all.called=!1},n.addOneTimeCallback=function(e,n){j.oneTime=e,j.timer=n},n.addCallback=function(e,n,t){n.id=e,S.CB.TYPE.ALL_BIDS_BACK===t?j.all.push(n):S.CB.TYPE.AD_UNIT_BIDS_BACK===t&&j.byAdUnit.push(n)},_.on(S.EVENTS.BID_ADJUSTMENT,(function(e){g(e)})),n.adjustBids=function(){return g.apply(void 0,arguments)},n.getStandardBidderAdServerTargeting=b}),(function(e,n){"use strict";function t(e,n){var t=0;return t=parseFloat(e),isNaN(t)&&(t=""),{low:""===t?"":r(e,s),med:""===t?"":r(e,d),high:""===t?"":r(e,u),auto:""===t?"":r(e,f),dense:""===t?"":r(e,c),custom:""===t?"":r(e,n)}}function r(e,n){var t="";if(!i(n))return t;var r=n.buckets.reduce((function(e,n){return e.max>n.max?e:n}),{max:0}),s=n.buckets.find((function(n){if(e>r.max){var i=n.precision||a;t=n.max.toFixed(i)}else if(e<=n.max&&e>=n.min)return n}));return s&&(t=o(e,s.increment,s.precision)),t}function i(e){if(!e||!e.buckets||!Array.isArray(e.buckets))return!1;var n=!0;return e.buckets.forEach((function(e){"undefined"!=typeof e.min&&e.max&&e.increment||(n=!1)})),n}function o(e,n,t){t||(t=a);var r=1/n;return(Math.floor(e*r)/r).toFixed(t)}Object.defineProperty(n,"__esModule",{value:!0});var a=2,s={buckets:[{min:0,max:5,increment:.5}]},d={buckets:[{min:0,max:20,increment:.1}]},u={buckets:[{min:0,max:20,increment:.01}]},c={buckets:[{min:0,max:3,increment:.01},{min:3,max:8,increment:.05},{min:8,max:20,increment:.5}]},f={buckets:[{min:0,max:5,increment:.05},{min:5,max:10,increment:.1},{min:10,max:20,increment:.5}]};n.getPriceBucketString=t,n.isValidePriceConfig=i}),(function(e,n,t){"use strict";function r(e,n){var t=document.createElement("script");t.type="text/javascript",t.async=!0,n&&"function"==typeof n&&(t.readyState?t.onreadystatechange=function(){("loaded"===t.readyState||"complete"===t.readyState)&&(t.onreadystatechange=null,n())}:t.onload=function(){n()}),t.src=e;var r=document.getElementsByTagName("head");r=r.length?r:document.getElementsByTagName("body"),r.length&&(r=r[0],r.insertBefore(t,r.firstChild))}var i=t(2),o={};n.loadScript=function(e,n,t){return e?(t?o[e]?n&&"function"==typeof n&&(o[e].loaded?n():o[e].callbacks.push(n)):(o[e]={loaded:!1,callbacks:[]},n&&"function"==typeof n&&o[e].callbacks.push(n),r(e,(function(){o[e].loaded=!0;try{for(var n=0;n<o[e].callbacks.length;n++)o[e].callbacks[n]()}catch(t){i.logError("Error executing callback","adloader.js:loadScript",t)}}))):r(e,n),void 0):(i.logError("Error attempting to request empty URL","adloader.js:loadScript"),void 0)}}),(function(e,n,t){"use strict";function r(){if(S&&"function"==typeof window[T]){for(var e=0;e<E.length;e++)E[e].call();E.push=function(e){e.call()},S=!1}p.logMessage("event count sent to GA: "+A)}function i(e){return e?Math.floor(100*e):0}function o(e){var n;return e>=0&&200>e?n="0-200ms":e>=200&&300>e?n="0200-300ms":e>=300&&400>e?n="0300-400ms":e>=400&&500>e?n="0400-500ms":e>=500&&600>e?n="0500-600ms":e>=600&&800>e?n="0600-800ms":e>=800&&1e3>e?n="0800-1000ms":e>=1e3&&1200>e?n="1000-1200ms":e>=1200&&1500>e?n="1200-1500ms":e>=1500&&2e3>e?n="1500-2000ms":e>=2e3&&(n="2000ms above"),n}function a(e){var n;return e>=0&&.5>e?n="$0-0.5":e>=.5&&1>e?n="$0.5-1":e>=1&&1.5>e?n="$1-1.5":e>=1.5&&2>e?n="$1.5-2":e>=2&&2.5>e?n="$2-2.5":e>=2.5&&3>e?n="$2.5-3":e>=3&&4>e?n="$3-4":e>=4&&6>e?n="$4-6":e>=6&&8>e?n="$6-8":e>=8&&(n="$8 above"),n}function s(e){e&&e.bidderCode&&E.push((function(){A++,window[T](w,"event",I,"Requests",e.bidderCode,1,y)})),r()}function d(e){e&&e.bidderCode&&E.push((function(){var n=i(e.cpm),t=e.bidderCode;if("undefined"!=typeof e.timeToRespond&&_){A++;var r=o(e.timeToRespond);window[T](w,"event","Prebid.js Load Time Distribution",r,t,1,y)}if(e.cpm>0){A+=2;var s=a(e.cpm);_&&(A++,window[T](w,"event","Prebid.js CPM Distribution",s,t,1,y)),window[T](w,"event",I,"Bids",t,n,y),window[T](w,"event",I,"Bid Load Time",t,e.timeToRespond,y)}})),r()}function u(e){E.push((function(){p._each(e,(function(e){A++,window[T](w,"event",I,"Timeouts",e,y)}))})),r()}function c(e){var n=i(e.cpm);E.push((function(){A++,window[T](w,"event",I,"Wins",e.bidderCode,n,y)})),r()}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=t(9),p=t(2),g=t(3),m=g.EVENTS.BID_REQUESTED,b=g.EVENTS.BID_TIMEOUT,v=g.EVENTS.BID_RESPONSE,h=g.EVENTS.BID_WON,y={nonInteraction:!0},E=[],T=null,S=!0,I="Prebid.js Bids",A=0,_=!1,w=null,j=!0;n.enableAnalytics=function(e){var n=e.provider,t=e.options;T=n||"ga",w=t&&t.trackerName?t.trackerName+".send":"send",j="undefined"==typeof t||"undefined"==typeof t.sampling||Math.random()<parseFloat(t.sampling),t&&"undefined"!=typeof t.global&&(T=t.global),t&&"undefined"!=typeof t.enableDistribution&&(_=t.enableDistribution);var r=null;if(j){var i=l.getEvents();p._each(i,(function(e){if("object"===("undefined"==typeof e?"undefined":f(e))){var n=e.args;if(e.eventType===m)r=n,s(r);else if(e.eventType===v)r=n,d(r);else if(e.eventType===b){var t=n;u(t)}else e.eventType===h&&(r=n,c(r))}})),l.on(m,(function(e){s(e)})),l.on(v,(function(e){d(e)})),l.on(b,(function(e){u(e)})),l.on(h,(function(e){c(e)}))}else p.logMessage("Prebid.js google analytics disabled by sampling");this.enableAnalytics=function(){return p.logMessage("Analytics adapter already enabled, unnecessary call to `enableAnalytics`.")}},n.getTrackerSend=function(){return w}}),(function(e,n,t){"use strict";t(17),t(50),t(55),Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}}),(function(e,n,t){t(18),e.exports=t(21).Array.find}),(function(e,n,t){"use strict";var r=t(19),i=t(37)(5),o="find",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),t(49)(o)}),(function(e,n,t){var r=t(20),i=t(21),o=t(22),a=t(32),s=t(35),d="prototype",u=function(e,n,t){var c,f,l,p,g=e&u.F,m=e&u.G,b=e&u.S,v=e&u.P,h=e&u.B,y=m?r:b?r[n]||(r[n]={}):(r[n]||{})[d],E=m?i:i[n]||(i[n]={}),T=E[d]||(E[d]={});m&&(t=n);for(c in t)f=!g&&y&&void 0!==y[c],l=(f?y:t)[c],p=h&&f?s(l,r):v&&"function"==typeof l?s(Function.call,l):l,y&&a(y,c,l,e&u.U),E[c]!=l&&o(E,c,p),v&&T[c]!=l&&(T[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u}),(function(e){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)}),(function(e){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)}),(function(e,n,t){var r=t(23),i=t(31);e.exports=t(27)?function(e,n,t){return r.f(e,n,i(1,t))}:function(e,n,t){return e[n]=t,e}}),(function(e,n,t){var r=t(24),i=t(26),o=t(30),a=Object.defineProperty;n.f=t(27)?Object.defineProperty:function(e,n,t){if(r(e),n=o(n,!0),r(t),i)try{return a(e,n,t)}catch(s){}if("get"in t||"set"in t)throw TypeError("Accessors not supported!");return"value"in t&&(e[n]=t.value),e}}),(function(e,n,t){var r=t(25);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}}),(function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}}),(function(e,n,t){e.exports=!t(27)&&!t(28)((function(){return 7!=Object.defineProperty(t(29)("div"),"a",{get:function(){return 7}}).a}))}),(function(e,n,t){e.exports=!t(28)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}),(function(e){e.exports=function(e){try{return!!e()}catch(n){return!0}}}),(function(e,n,t){var r=t(25),i=t(20).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}}),(function(e,n,t){var r=t(25);e.exports=function(e,n){if(!r(e))return e;var t,i;if(n&&"function"==typeof(t=e.toString)&&!r(i=t.call(e)))return i;if("function"==typeof(t=e.valueOf)&&!r(i=t.call(e)))return i;if(!n&&"function"==typeof(t=e.toString)&&!r(i=t.call(e)))return i;throw TypeError("Can't convert object to primitive value")}}),(function(e){e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}}),(function(e,n,t){var r=t(20),i=t(22),o=t(33),a=t(34)("src"),s="toString",d=Function[s],u=(""+d).split(s);t(21).inspectSource=function(e){return d.call(e)},(e.exports=function(e,n,t,s){var d="function"==typeof t;d&&(o(t,"name")||i(t,"name",n)),e[n]!==t&&(d&&(o(t,a)||i(t,a,e[n]?""+e[n]:u.join(String(n)))),e===r?e[n]=t:s?e[n]?e[n]=t:i(e,n,t):(delete e[n],i(e,n,t)))})(Function.prototype,s,(function(){return"function"==typeof this&&this[a]||d.call(this)}))}),(function(e){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}}),(function(e){var n=0,t=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+t).toString(36))}}),(function(e,n,t){var r=t(36);e.exports=function(e,n,t){if(r(e),void 0===n)return e;switch(t){case 1:return function(t){return e.call(n,t)};case 2:return function(t,r){return e.call(n,t,r)};case 3:return function(t,r,i){return e.call(n,t,r,i)}}return function(){return e.apply(n,arguments)}}}),(function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}}),(function(e,n,t){var r=t(35),i=t(38),o=t(40),a=t(42),s=t(44);e.exports=function(e,n){var t=1==e,d=2==e,u=3==e,c=4==e,f=6==e,l=5==e||f,p=n||s;return function(n,s,g){for(var m,b,v=o(n),h=i(v),y=r(s,g,3),E=a(h.length),T=0,S=t?p(n,E):d?p(n,0):void 0;E>T;T++)if((l||T in h)&&(m=h[T],b=y(m,T,v),e))if(t)S[T]=b;else if(b)switch(e){case 3:return!0;case 5:return m;case 6:return T;case 2:S.push(m)}else if(c)return!1;return f?-1:u||c?c:S}}}),(function(e,n,t){var r=t(39);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}}),(function(e){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}}),(function(e,n,t){var r=t(41);e.exports=function(e){return Object(r(e))}}),(function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}}),(function(e,n,t){var r=t(43),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}}),(function(e){var n=Math.ceil,t=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?t:n)(e)}}),(function(e,n,t){var r=t(45);e.exports=function(e,n){return new(r(e))(n)}}),(function(e,n,t){var r=t(25),i=t(46),o=t(47)("species");e.exports=function(e){var n;return i(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[o],null===n&&(n=void 0))),void 0===n?Array:n}}),(function(e,n,t){var r=t(39);e.exports=Array.isArray||function(e){return"Array"==r(e)}}),(function(e,n,t){var r=t(48)("wks"),i=t(34),o=t(20).Symbol,a="function"==typeof o,s=e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))};s.store=r}),(function(e,n,t){var r=t(20),i="__core-js_shared__",o=r[i]||(r[i]={});e.exports=function(e){return o[e]||(o[e]={})}}),(function(e,n,t){var r=t(47)("unscopables"),i=Array.prototype;void 0==i[r]&&t(22)(i,r,{}),e.exports=function(e){i[r][e]=!0}}),(function(e,n,t){t(51),e.exports=t(21).Array.includes}),(function(e,n,t){"use strict";var r=t(19),i=t(52)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),t(49)("includes")}),(function(e,n,t){var r=t(53),i=t(42),o=t(54);e.exports=function(e){return function(n,t,a){var s,d=r(n),u=i(d.length),c=o(a,u);if(e&&t!=t){for(;u>c;)if(s=d[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in d)&&d[c]===t)return e||c||0;return!e&&-1}}}),(function(e,n,t){var r=t(38),i=t(41);e.exports=function(e){return r(i(e))}}),(function(e,n,t){var r=t(43),i=Math.max,o=Math.min;e.exports=function(e,n){return e=r(e),0>e?i(e+n,0):o(e,n)}}),(function(e,n,t){t(56),e.exports=t(21).Object.assign}),(function(e,n,t){var r=t(19);r(r.S+r.F,"Object",{assign:t(57)})}),(function(e,n,t){"use strict";var r=t(58),i=t(62),o=t(63),a=t(40),s=t(38),d=Object.assign;e.exports=!d||t(28)((function(){var e={},n={},t=Symbol(),r="abcdefghijklmnopqrst";return e[t]=7,r.split("").forEach((function(e){n[e]=e})),7!=d({},e)[t]||Object.keys(d({},n)).join("")!=r}))?function(e){for(var n=a(e),t=arguments.length,d=1,u=i.f,c=o.f;t>d;)for(var f,l=s(arguments[d++]),p=u?r(l).concat(u(l)):r(l),g=p.length,m=0;g>m;)c.call(l,f=p[m++])&&(n[f]=l[f]);return n}:d}),(function(e,n,t){var r=t(59),i=t(61);e.exports=Object.keys||function(e){return r(e,i)}}),(function(e,n,t){var r=t(33),i=t(53),o=t(52)(!1),a=t(60)("IE_PROTO");e.exports=function(e,n){var t,s=i(e),d=0,u=[];for(t in s)t!=a&&r(s,t)&&u.push(t);for(;n.length>d;)r(s,t=n[d++])&&(~o(u,t)||u.push(t));return u}}),(function(e,n,t){var r=t(48)("keys"),i=t(34);e.exports=function(e){return r[e]||(r[e]=i(e))}}),(function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")}),(function(e,n){n.f=Object.getOwnPropertySymbols}),(function(e,n){n.f={}.propertyIsEnumerable}),(function(e,n){"use strict";function t(e){return e?e.replace(/^\?/,"").split("&").reduce((function(e,n){var t=n.split("="),r=a(t,2),i=r[0],o=r[1];return/\[\]$/.test(i)?(i=i.replace("[]",""),e[i]=e[i]||[],e[i].push(o)):e[i]=o||"",e}),{}):{}}function r(e){return Object.keys(e).map((function(n){return Array.isArray(e[n])?e[n].map((function(e){return n+"[]="+e})).join("&"):n+"="+e[n]})).join("&")}function i(e){var n=document.createElement("a");return n.href=decodeURIComponent(e),{protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),search:t(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host}}function o(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":"+e.port:""))+(e.pathname||"")+(e.search?"?"+r(e.search||""):"")+(e.hash?"#"+e.hash:"")}Object.defineProperty(n,"__esModule",{value:!0});var a=(function(){function e(e,n){var t=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(d){i=!0,o=d}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();n.parseQS=t,n.formatQS=r,n.parse=i,n.format=o}),(function(e,n,t){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){addEventListener("message",o,!1)}function o(e){var n=e.message?"message":"data",t={};try{t=JSON.parse(e[n])}catch(r){return}if(t.adId){var i=pbjs._bidsReceived.find((function(e){return e.adId===t.adId}));"Prebid Request"===t.message&&(a(i,t.adServerDomain,e.source),pbjs._winningBids.push(i),u["default"].emit(p,i)),"Prebid Native"===t.message&&(f["default"](i),pbjs._winningBids.push(i),u["default"].emit(p,i))}}function a(e,n,t){var r=e.adId,i=e.ad,o=e.adUrl,a=e.width,d=e.height;r&&(s(e),t.postMessage(JSON.stringify({message:"Prebid Response",ad:i,adUrl:o,adId:r,width:a,height:d}),n))}function s(e){var n=e.adUnitCode,t=e.width,r=e.height,i=document.getElementById(window.googletag.pubads().getSlots().find((function(e){return e.getAdUnitPath()===n||e.getSlotElementId()===n})).getSlotElementId()).querySelector("iframe");i.width=""+t,i.height=""+r}Object.defineProperty(n,"__esModule",{value:!0}),n.listenMessagesFromCreative=i;var d=t(9),u=r(d),c=t(7),f=r(c),l=t(3),p=l.EVENTS.BID_WON}),(function(e,n,t){"use strict";function r(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n["default"]=e,n}function i(){f.forEach((function(e){u.logMessage("Invoking cookie sync for bidder: "+e.bidder),"iframe"===e.type?u.insertCookieSyncIframe(e.url,!1):u.insertPixel(e.url)})),f.length=0}function o(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];t.href=e+encodeURIComponent(t.href)}}function a(e){"true"!==document.cookie.replace(/(?:(?:^|.*;\s*)pbsCookiePersistFooter\s*\=\s*([^;]*).*$)|^.*$/,"$1")&&(document.body.appendChild(s(e)),document.cookie="pbsCookiePersistFooter=true; expires=Fri, 31 Dec 9999 23:59:59 GMT")}function s(e){var n=document.createElement("div");n.style.background="#D3D3D3",n.style.color="#555",n.style.boxShadow="0 -1px 2px rgba(0, 0, 0, 0.2)",n.style.fontFamily="sans-serif",n.style.lineHeight="1.5",n.style.position="fixed",n.style.bottom="0",n.style.left="0",n.style.right="0",n.style.width="100%",n.style.padding="1em 0",n.style.zindex="1000";var t=document.createElement("p");return t.style.margin="0 2em",t.innerHTML=e,n.appendChild(t),n}var d=t(2),u=r(d),c=n,f=[];c.queueSync=function(e){var n=e.bidder,t=e.url,r=e.type;f.push({bidder:n,url:t,type:r})},c.syncCookies=function(e){e?setTimeout(i,e):i()},c.persist=function(e,n){u.isSafariBrowser()&&(o(e),a(n))}}),(function(e,n,t){"use strict";function r(e){c=e}function i(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{var i=void 0,f=!1,l=r.method||(t?"POST":"GET"),p="object"===("undefined"==typeof n?"undefined":a(n))?n:{success:function(){d.logMessage("xhr success")},error:function(e){d.logError("xhr error",null,e)}};if("function"==typeof n&&(p.success=n),window.XMLHttpRequest?(i=new window.XMLHttpRequest,void 0===i.responseType&&(f=!0)):f=!0,i.timeout=c,f?(i=new window.XDomainRequest,i.onload=function(){p.success(i.responseText,i)},i.onerror=function(){p.error("error",i)},i.ontimeout=function(){p.error("timeout",i)},i.onprogress=function(){d.logMessage("xhr onprogress")}):i.onreadystatechange=function(){if(i.readyState===u){var e=i.status;e>=200&&300>e||304===e?p.success(i.responseText,i):p.error(i.statusText,i)}},"GET"===l&&t){var g=s.parse(e);o(g.search,t),e=s.format(g)}i.open(l,e),f||(r.withCredentials&&(i.withCredentials=!0),d._each(r.customHeaders,(function(e,n){i.setRequestHeader(n,e)})),r.preflight&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("Content-Type",r.contentType||"text/plain")),i.send("POST"===l&&t)}catch(m){d.logError("xhr construction",m)}}Object.defineProperty(n,"__esModule",{value:!0});var o=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.setAjaxTimeout=r,n.ajax=i;var s=t(64),d=t(2),u=4,c=3e3}),(function(e,n,t){"use strict";var r=t(64),i=t(69),o=function(e){this.name=e.adserver,this.code=e.code,this.getWinningBidByCode=function(){return i.getWinningBids(this.code)[0]}};n.dfpAdserver=function(e,n){var t=new o(e);t.urlComponents=n;var i={env:"vp",gdfp_req:"1",impl:"s",unviewed_position_start:"1"},a=["output","iu","sz","url","correlator","description_url","hl"],s=function(e){return encodeURIComponent(r.formatQS(e))};return t.appendQueryParams=function(){var e=t.getWinningBidByCode();e&&(this.urlComponents.search.description_url=encodeURIComponent(e.descriptionUrl),this.urlComponents.search.cust_params=s(e.adserverTargeting),this.urlComponents.search.correlator=Date.now())},t.verifyAdserverTag=function(){for(var e in i)if(!this.urlComponents.search.hasOwnProperty(e)||this.urlComponents.search[e]!==i[e])return!1;for(var n in a)if(!this.urlComponents.search.hasOwnProperty(a[n]))return!1;return!0},t}}),(function(e,n,t){"use strict";function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e){return"string"==typeof e?[e]:p.isArray(e)?e:pbjs._adUnitCodes||[]}function o(e){var n=m.getWinningBids(e),t=a();return n=n.map((function(e){return r({},e.adUnitCode,Object.keys(e.adserverTargeting).filter((function(n){return"undefined"==typeof e.sendStandardTargeting||e.sendStandardTargeting||-1===t.indexOf(n)})).map((function(n){return r({},n.substring(0,20),[e.adserverTargeting[n]])})))}))}function a(){return l.getStandardBidderAdServerTargeting().map((function(e){return e.key})).concat(g.TARGETING_KEYS).filter(c.uniques)}function s(e){var n=a();return pbjs._bidsReceived.filter(c.adUnitsFilter.bind(this,e)).map((function(e){return e.alwaysUseBid?r({},e.adUnitCode,Object.keys(e.adserverTargeting).map((function(t){return n.indexOf(t)>-1?void 0:r({},t.substring(0,20),[e.adserverTargeting[t]])})).filter((function(e){return e}))):void 0})).filter((function(e){return e}))}function d(e){var n=g.TARGETING_KEYS.concat(f.NATIVE_TARGETING_KEYS);return pbjs._bidsReceived.filter(c.adUnitsFilter.bind(this,e)).map((function(e){return e.adserverTargeting?r({},e.adUnitCode,u(e,n.filter((function(n){return"undefined"!=typeof e.adserverTargeting[n]})))):void 0})).filter((function(e){return e}))}function u(e,n){return n.map((function(n){return r({},(n+"_"+e.bidderCode).substring(0,20),[e.adserverTargeting[n]])}))}var c=t(2),f=t(7),l=t(12),p=t(2),g=t(3),m=n,b=[];m.resetPresetTargeting=function(e){if(c.isGptPubadsDefined()){var n=i(e),t=pbjs.adUnits.filter((function(e){return n.includes(e.code)}));window.googletag.pubads().getSlots().forEach((function(e){b.forEach((function(n){t.forEach((function(t){(t.code===e.getAdUnitPath()||t.code===e.getSlotElementId())&&e.setTargeting(n,null)}))}))}))}},m.getAllTargeting=function(e){var n=i(e),t=o(n).concat(s(n)).concat(pbjs._sendAllBids?d(n):[]);return t.map((function(e){Object.keys(e).map((function(n){e[n].map((function(e){-1===b.indexOf(Object.keys(e)[0])&&(b=Object.keys(e).concat(b))}))}))})),t},m.setTargeting=function(e){window.googletag.pubads().getSlots().forEach((function(n){e.filter((function(e){return Object.keys(e)[0]===n.getAdUnitPath()||Object.keys(e)[0]===n.getSlotElementId()})).forEach((function(e){return e[Object.keys(e)[0]].forEach((function(e){e[Object.keys(e)[0]].map((function(t){return p.logMessage("Attempting to set key value for slot: "+n.getSlotElementId()+" key: "+Object.keys(e)[0]+" value: "+t),t})).forEach((function(t){n.setTargeting(Object.keys(e)[0],t)}))}))}))}))},m.getWinningBids=function(e){var n=i(e);return pbjs._bidsReceived.filter((function(e){return n.includes(e.adUnitCode)})).filter((function(e){return e.cpm>0})).map((function(e){return e.adUnitCode})).filter(c.uniques).map((function(e){return pbjs._bidsReceived.filter((function(n){return n.adUnitCode===e?n:null})).reduce(c.getHighestCpm,{adUnitCode:e,cpm:0,adserverTargeting:{},timeToRespond:0})}))},m.setTargetingForAst=function(){var e=pbjs.getAdserverTargeting();Object.keys(e).forEach((function(n){return Object.keys(e[n]).forEach((function(t){if(p.logMessage("Attempting to set targeting for targetId: "+n+" key: "+t+" value: "+e[n][t]),p.isStr(e[n][t])||p.isArray(e[n][t])){var r={},i="hb_adid",o=t.substring(0,i.length)===i?t.toUpperCase():t;r[o]=e[n][t],window.apntag.setKeywords(n,r)}}))}))},m.isApntagDefined=function(){return window.apntag&&p.isFn(window.apntag.setKeywords)?!0:void 0}})]);

comments powered by Disqus