text: pbjsChunk([61],{239:function(r,e,t){t(240),r.exports=t(241)},240:function(r,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spec=void 0;var i=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},n=t(1),a=(function(r){{if(r&&r.__esModule)return r;var e={};if(null!=r)for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}})(t(0)),o=t(3);var s="medianet";function d(r,e){return r.filter((function(r){return r.type===e}))}function p(r){return{w:parseInt(r[0],10),h:parseInt(r[1],10)}}function u(r){var e,t={id:r.bidId,ext:{dfp_id:r.adUnitCode},banner:(e=r.sizes,a.isArray(e)&&2===e.length&&!a.isArray(e[0])?[p(e)]:e.map((function(r){return p(r)}))),all:r.params};r.params.crid&&(t.tagid=r.params.crid.toString());var i=parseFloat(r.params.bidfloor);return i&&(t.bidfloor=i),t}function c(r){return{site:(t=r[0].params.site,{domain:(t=t||{}).domain||a.getTopWindowLocation().host,page:t.page||a.getTopWindowUrl(),ref:t.ref||a.getTopWindowReferrer()}),ext:(e=r[0].params,{customer_id:e.cid,prebid_version:pbjs.version}),id:r[0].auctionId,imp:r.map((function(r){return u(r)})),tmax:o.config.getConfig("bidderTimeout")};var e,t}pbjs.medianetGlobals={};var l=e.spec={code:s,isBidRequestValid:function(r){return r.params?r.params.cid&&a.isStr(r.params.cid)&&!a.isEmptyStr(r.params.cid)?(i(pbjs.medianetGlobals,!pbjs.medianetGlobals.cid&&{cid:r.params.cid}),!0):(a.logError(s+" : cid should be a string"),!1):(a.logError(s+" : Missing bid parameters"),!1)},buildRequests:function(r){var e=c(r);return{method:"POST",url:"https://prebid.media.net/rtb/prebid",data:JSON.stringify(e)}},interpretResponse:function(r,e){var t=[];if(!r||!r.body)return a.logInfo(s+" : response is empty"),t;var i=r.body.bidList;return a.isArray(i)&&0!==i.length?t=i.filter((function(r){return!1===(e=r).no_bid&&0<parseFloat(e.cpm);var e})):(a.logInfo(s+" : no bids"),t)},getUserSyncs:function(r,e){var t,i=(t=e,!a.isEmpty(t)&&t[0].body&&t[0].body.ext&&a.isArray(t[0].body.ext.csUrl)?t[0].body.ext.csUrl:[]);return r.iframeEnabled?d(i,"iframe"):r.pixelEnabled?d(i,"image"):void 0}};(0,n.registerBidder)(l)},241:function(r,e){}},[239]);