/* prebid-universal-creative v0.3.0 Updated : 2018-03-23 */ !function(r){var n={};function o(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}o.m=r,o.c=n,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,r){"use strict";var h=n(r(1)),u=n(r(3));function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var o=window.pbjs=window.pbjs||{},a="//tpc.googlesyndication.com",c="prebid.adnxs.com",l="/pbc/v1/cache";o.renderAd=function(t,e,r){u.isAmp(r)?function(t,e,r,n){var o=(i=t,a=e,"https://"+(void 0===i||""===i?c:i)+(void 0===a||""===a?l:a)+"?uuid="+r);var i,a;if(void 0!==n&&""!==n){var s=n.split("x").map(Number);!function(n,o){if(u.isSafeFrame()){var i=window.innerWidth,a=window.innerHeight;i===n&&a===o||($sf.ext.register(n,o,function(t){var e=n-i,r=o-a;$sf.ext.expand({r:e,b:r,push:!0})}),window.parent.postMessage({sentinel:"amp",type:"embed-size",width:n,height:o},"*"))}}(s[0],s[1])}else console.log("Targeting key hb_size not found to resize creative");h.sendRequest(o,function(t){var e=void 0;try{e=JSON.parse(t)}catch(t){console.log("Error parsing response from cache host: "+t)}var r=void 0;if(e.adm&&e.nurl)r=e.adm,r+=h.createTrackPixelHtml(decodeURIComponent(e.nurl)),h.writeAdHtml(r);else if(e.adm)r=e.adm,h.writeAdHtml(r);else if(e.nurl){var n=e.nurl;h.writeAdUrl(n,e.h,e.w)}})}(r.cacheHost,r.cachePath,r.uuid,r.size):u.isCrossDomain()?function(p,t){var e=document.createElement("a");e.href=t;var f=e.protocol+"//"+e.host,r=e.protocol+a;function n(t){var e=t.message?"message":"data",r={};try{r=JSON.parse(t[e])}catch(t){return}var n=t.origin||t.originalEvent.origin;if(r.message&&"Prebid Response"===r.message&&f===n&&r.adId===p&&(r.ad||r.adUrl)){var o=window.document.body,i=r.ad,a=r.adUrl,s=r.width,u=r.height;if("video"===r.mediaType)console.log("Error trying to write ad.");else if(i){var c=h.getEmptyIframe(r.height,r.width);o.appendChild(c),c.contentDocument.open(),c.contentDocument.write(i),c.contentDocument.close()}else if(a){var l=h.getEmptyIframe(u,s);l.style.display="inline",l.style.overflow="hidden",l.src=a,h.insertElement(l,doc,"body")}else console.log("Error trying to write ad. No ad for bid response id: "+id)}}window.addEventListener("message",n,!1),o=JSON.stringify({message:"Prebid Request",adId:p,adServerDomain:r}),window.parent.postMessage(o,f);var o}(e,r.pubUrl):function(t,e){var r=window;for(i=0;i<10;i++)if((r=r.parent).pbjs)try{r.pbjs.renderAd(document,e);break}catch(t){continue}}(0,e)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrackPixelHtml=function(t){if(!t)return"";return'
'},e.writeAdUrl=function(t,e,r){var n=o(e,r);n.src=t,document.body.appendChild(n)},e.writeAdHtml=function(t){n(document.body,t)},e.sendRequest=function(t,e){var r=new XMLHttpRequest;r.addEventListener("load",function(){e(r.responseText)}),r.open("GET",t),r.send()},e.getEmptyIframe=o,e.insertElement=function(t,e,r){e=e||document;var n=void 0;n=r?e.getElementsByTagName(r):e.getElementsByTagName("head");try{(n=n.length?n:e.getElementsByTagName("body")).length&&(n=n[0]).insertBefore(t,n.firstChild)}catch(t){}};var n=r(2);function o(t,e){var r=document.createElement("iframe");return r.setAttribute("frameborder",0),r.setAttribute("scrolling","no"),r.setAttribute("marginheight",0),r.setAttribute("marginwidth",0),r.setAttribute("TOPMARGIN",0),r.setAttribute("LEFTMARGIN",0),r.setAttribute("allowtransparency","true"),r.setAttribute("width",e),r.setAttribute("height",t),r}},function(t,e,r){var n;n=function(){return function(r){var n={};function o(t){if(n[t])return n[t].exports;var e=n[t]={exports:{},id:t,loaded:!1};return r[t].call(e.exports,e,e.exports,o),e.loaded=!0,e.exports}return o.m=r,o.c=n,o.p="",o(0)}([function(t,e,r){"use strict";var n,o=r(1),i=(n=o)&&n.__esModule?n:{default:n};t.exports=i.default},function(t,e,r){"use strict";e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e