In viral ad for nothingness, NBC airs 30 Seconds of total blackness.

0
234


In an unintentional homage to the 34-minute blackout at Super Bowl XLVII, viewers’ screens went totally black for 30 seconds during the second quarter of Super Bowl LII. The #brands, predictably, are trying to capitalize on the moment with “hilarious” tweets.

As of publication time, NBC has not offered an official explanation for the blackout. We’ll update this post when the network does.

Update, 8:56 p.m.: An NBC spokesperson says, “We had a brief equipment failure that we quickly resolved. No game action or commercial time were missed.”

You depend on Slate for sharp, distinctive coverage of the latest developments in politics and culture. Now we need to ask for your support.

Our work is more urgent than ever and is reaching more readers—but online advertising revenues don’t fully cover our costs, and we don’t have print subscribers to help keep us afloat. So we need your help. If you think Slate’s work matters, become a Slate Plus member. You’ll get exclusive members-only content and a suite of great benefits—and you’ll help secure Slate’s future.

Join Slate Plus

Josh Levin

Josh Levin is Slate’s editorial director.

“;var a={ad:t+=decodeURIComponent(e.code),cpm:parseFloat(e.price),currency:e.currency,height:parseInt(e.height,10),requestId:r.bidIdMap[e.id],width:parseInt(e.width,10),netRevenue:!1,ttl:parseInt(e.ttl),creativeId:e.crid};n.push(a)}}Object.defineProperty(r,”__esModule”,{value:!0}),r.spec=void 0;var u=(function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r.default=e,r})(n(0)),c=n(9),o=r.spec={code:”adocean”,isBidRequestValid:function(e){return!!(e.params.slaveId&&e.params.masterId&&e.params.emiter)},buildRequests:function(e){var r={};return u._each(e,(function(e){i(e,r)})),u._map(r,(function(e,r){return a(e,r)}))},interpretResponse:function(e,r){var n=[];return u.isArray(e.body)&&u._each(e.body,(function(e){s(e,r,n)})),n}};(0,c.registerBidder)(o)},69:function(e,r){}},[67]);
pbjsChunk([24],{10:function(e,t,n){“use strict”;function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,”__esModule”,{value:!0});var i=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&”function”==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?”symbol”:typeof e};t.default=function(e){function t(e){var t=e.eventType,n=e.args,r=e.callback;(0,u.ajax)(S,r,JSON.stringify({eventType:t,args:n}))}function n(e){var t=e.eventType,n=e.args,r=this;A&&window[A]&&t&&n?this.track({eventType:t,args:n}):_.push((function(){w++,r.track({eventType:t,args:n})}))}function a(){if(O){for(var e=0;e<_.length;e++)_[e]();_.push=function(e){e()},O=!1}c.logMessage("event count sent to "+A+": "+w)}var N,S=e.url,C=e.analyticsType,A=e.global,I=e.handler,_=[],w=0,O=!0;return C===T&&(0,o.loadScript)(S,a),(C===g"http://slate.com/"h)&&a(),{track:function(e){var n=e.eventType,r=e.args;(this.getAdapterType()===T"http://slate.com/"h)&&window[A](I,n,r),this.getAdapterType()===g&&t.apply(void 0,arguments)},enqueue:n,enableAnalytics:function(e){var t=this,a=this;if(m="object"!==(void 0===e?"undefined":i(e))"http://slate.com/"http://slate.com/"object"!==i(e.options)"http://slate.com/"void 0===e.options.sampling"http://slate.com/"Math.random()0&&E.sendTypedEvent()}),b)}}});E.sendTypedEvent=function(){var e=E.buildTypedEvents(),t={uid:E.currentContext.uid,ahbaid:E.currentContext.id,timeout:E.currentContext.timeout,hostname:window.location.hostname,eventsByPlacementCode:e.map((function(e){var t=[],n={};return[“request”,”response”,”winner”].forEach((function(r){n[r+”s”]=[],void 0!==e[r]&&e[r].forEach((function(e){if(void 0!==e.event.size){var i=E.sizeUtils.handleSize(t,e.event.size);null!==i&&(t=[].concat(a(t),[i]))}n[r+”s”]=[].concat(a(n[r+”s”]),[e.event])}))})),{placementCode:e.placementCode,sizes:t,events:n}}))},n=window.btoa(JSON.stringify(t)),r=encodeURIComponent(n).match(/.{1,1600}/g);r.forEach((function(e,t){var n=e+”&id=”+E.currentContext.id+”&part=”+t+”&on=”+(r.length-1);new Image(1,1).src=”https://”+E.currentContext.url+”/?q=”+n}))},E.buildBidResponse=function(e){return{bidder:e.bidderCode.toUpperCase(),placementCode:e.adUnitCode,id:e.adId,status:”Bid available”===e.statusMessage?”VALID”:”EMPTY_OR_ERROR”,cpm:parseFloat(e.cpm),size:{width:Number(e.width),height:Number(e.height)},timeToRespond:e.timeToRespond,afterTimeout:E.currentContext.timeouted}},E.sizeUtils={sizeAlreadyExists:function(e,t){return e.find((function(e){return e.height===t.height&&e.width===t.width}))},formatSize:function(e){return{width:Number(e.width),height:Number(e.height)}},handleSize:function(e,t){var n=null;return void 0===E.sizeUtils.sizeAlreadyExists(e,t)&&(n=E.sizeUtils.formatSize(t)),n}},E.buildTypedEvents=function(){var e=[];return E.bucketEvents.forEach((function(t,n){var r=[t.event.placementCode,t.type],o=r[0],u=r[1],s=e.findIndex((function(e){return e.placementCode===o}));-1===s&&(e.push(i({placementCode:o},u,[t])),s=e.length-1),e[s][u]?e[s][u]=[].concat(a(e[s][u]),[t]):e[s][u]=[t]})),e},E.currentContext={},E.bucketEvents=[],E.adapterEnableAnalytics=E.enableAnalytics,E.enableAnalytics=function(e){var t=e.options;t&&(E.currentContext={uid:t.id,url:t.url,debug:t.debug,id:”http://slate.com/”,timeouted:!1,timeout:0},E.adapterEnableAnalytics(e))},c.default.registerAnalyticsAdapter({adapter:E,code:”adomik”}),t.default=E}},[70]);
pbjsChunk([102],{72:function(e,n,d){e.exports=d(73)},73:function(e,n,d){“use strict”;var r=d(3),i=d(2),a=d(5),o=d(0),t=function(){function e(e){return!!(e&&e.siteId&&e.zoneId&&e.endpointUrl&&e.clientId)&&!(“number”!=typeof e.zoneId”http://slate.com/”e.zoneId<=0)}function n(e){var n=encodeURIComponent(window.document.referrer),d=encodeURIComponent(Math.floor(1e5*Math.random()+1)),r=encodeURIComponent((new Date).getTimezoneOffset());return"//"+e.params.endpointUrl+"/banner.engine?id="+e.params.siteId+"&z="+e.params.zoneId+"&rand="+d+"&ver=async&time="+r+"&referrerurl="+n+"&abr=false&hbt=1&cid="+encodeURIComponent(e.params.clientId)}function d(e){return function(){pbjs.adSupplyResponseHandler(e)}}return pbjs.adSupplyResponseHandler=function(e){if(e){var n=o.getBidRequest(e);if(n&&n.params){var d=n.params.clientId,a="b"+n.params.zoneId;if(window[d]&&window[d][a]){var t=window[d][a].Media;if(t)if(!t.Url"http://slate.com/"!t.Ecpm"http://slate.com/"http://slate.com/"number"!=typeof t.Ecpm"http://slate.com/"t.Ecpm<=0){var p=r.createBid(2,n);p.bidderCode="adsupply",i.addBidResponse(n.placementCode,p)}else{var s=r.createBid(1,n);s.bidderCode="adsupply",s.cpm=t.Ecpm,s.ad='‘,s.width=t.Width,s.height=t.Height,i.addBidResponse(n.placementCode,s)}}}}},{callBids:function(r){for(var i=r.bids”http://slate.com/”[],o=0;o0&&(t.dealId=e.deal_id),e.ad)t.ad=e.ad;else if(e.vastUrl)t.vastUrl=e.vastUrl,t.descriptionUrl=e.vastUrl,t.mediaType=”video”;else if(e.nativeResponse){t.mediaType=”native”;var i=e.nativeResponse;t.native={clickUrl:encodeURIComponent(i.link.url),impressionTrackers:i.imptrackers},i.assets.forEach((function(e){e.title&&e.title.text&&(t.native.title=e.title.text),e.img&&e.img.url&&(t.native.image=e.img.url),e.data&&”DESC”===e.data.label&&e.data.value&&(t.native.body=e.data.value),e.data&&”SPONSORED”===e.data.label&&e.data.value&&(t.native.sponsoredBy=e.data.value)}))}t.width=e.width,t.height=e.height,r.logMessage(“submitting bid[“+e.bidId+”]: “+JSON.stringify(t)),a.push(t)})):r.logMessage(“empty bid response”),a},getUserSyncs:function(e){if(e.iframeEnabled)return[{type:”iframe”,url:”//cdn.adxcg.net/pb-sync.html”}]}};(0,s.registerBidder)(l)},78:function(e,t){}},[76]);
pbjsChunk([101],{79:function(e,r,t){e.exports=t(80)},80:function(e,r,t){“use strict”;function n(e){return e&&e.__esModule?e:{default:e}}var a=Object.assign”http://slate.com/”function(e){for(var r=1;r0}function r(r,a){if(e(r,a)){var t=d.default.createBid(1,r);t.bidderCode=u,t.cpm=a.cpm,t.width=a.w,t.height=a.h,”video”===r.mediaType?(t.vastUrl=a.vastUrl,t.descriptionUrl=a.vastUrl,t.mediaType=”video”):t.ad=a.adm,n.default.addBidResponse(r.placementCode,t)}else n.default.addBidResponse(r.placementCode,d.default.createBid(s.STATUS.NO_BID,r))}function a(e){var r={};return i.isArray(e)&&e.length>0&&i.isArray(e[0])&&2===e[0].length&&(r.vpw=e[0][0],r.vph=e[0][1]),r}function t(e,r){if(Object.keys(e.params).filter((function(e){return”video”!==e})).forEach((function(a){return r[a]=e.params[a]})),”video”===e.mediaType){var t=a(e.sizes);Object.keys(t).forEach((function(e){return r[e]=t[e]})),Object.keys(e.params.video”http://slate.com/”{}).forEach((function(a){return r[a]=e.params.video[a]}))}return i.parseQueryStringParameters(r)}function c(e){return function(a){if(!a&&a.length<=0)return n.default.addBidResponse(e.placementCode,d.default.createBid(s.STATUS.NO_BID,e)),void i.logError("Empty response");try{a=JSON.parse(a)}catch(r){return n.default.addBidResponse(e.placementCode,d.default.createBid(s.STATUS.NO_BID,e)),void i.logError("Invalid JSON in response")}r(e,a)}}var p={local:"127.0.0.1:8080",dev:"dev-ads.aerserv.com",stage:"staging-ads.aerserv.com",prod:"ads.aerserv.com"},l="/as/json/pbjs/v1?",f="/as/json/pbjsvast/v1?",v=["plc"];return{callBids:function(e){var r=window.parent!==window?document.referrer:window.location.href;r=r&&encodeURIComponent(r),(e.bids"http://slate.com/"[]).forEach((function(e){if(i.hasValidBidRequest(e.params,v,u)){var a="//"+(p[e.params.env]"http://slate.com/"p.prod)+("video"===e.mediaType?f:l)+t(e,{url:r});i.logMessage("sending request to: "+a),(0,o.ajax)(a,c(e),null,{withCredentials:!0})}else n.default.addBidResponse(e.placementCode,d.default.createBid(s.STATUS.NO_BID,e))}))}}};t(a(1)).default.registerBidAdapter(new c,u,{supportedMediaTypes:["video"]}),e.exports=c}},[81]); pbjsChunk([99],{83:function(e,r,t){e.exports=t(84)},84:function(e,r,t){"use strict";function a(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var n=Object.assign"http://slate.com/"function(e){for(var r=1;r1?r-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:{},t=p.createBid(2,e);t.bidderCode=e.bidder,t.reason=r.nbr,t.raw=r,l.addBidResponse(e.placementCode,t)}function y(r,t){var a=void 0;try{a=t.seatbid[0].bid[0]}catch(e){return void x(r,t)}var n=void 0;if(a.ext&&a.ext.encp)n=a.ext.encp;else if(null===(n=a.price)”http://slate.com/”isNaN(n))return s.logError(“Invalid price in bid response”,f.aol,r),void x(r,t);var o=a.adm;t.ext&&t.ext.pixels&&(r.params.userSyncOn===u.EVENTS.BID_RESPONSE?e(t.ext.pixels):o+=”“);var i=p.createBid(1,r);i.bidderCode=r.bidder,i.ad=o,i.cpm=n,i.width=a.w,i.height=a.h,i.creativeId=a.crid,i.pubapiId=t.id,i.currencyCode=t.cur,a.dealid&&(i.dealId=a.dealid),l.addBidResponse(r.placementCode,i)}function w(e){return e===f.aol”http://slate.com/”e===f.onedisplay}function j(e){return e===f.aol”http://slate.com/”e===f.onemobile}function E(e){if(j(e.bidder)&&e.params.id&&e.params.imp&&e.params.imp[0]){var r=e.params.imp[0];return r.id&&r.tagid&&(r.banner&&r.banner.w&&r.banner.h”http://slate.com/”r.video&&r.video.mimes&&r.video.minduration&&r.video.maxduration)}}function C(e){return j(e.bidder)&&e.params.dcn&&e.params.pos}function O(e){return w(e.bidder)&&e.params.placement&&e.params.network}var S=!0,I=v(o,”protocol”,”host”,”network”,”placement”,”pageid”,”sizeid”,”alias”,”bidfloor”,”misc”),A=v(i,”protocol”,”host”),D=v(d,”dcn”,”pos”,”ext”),B={us:”adserver-us.adtech.advertising.com”,eu:”adserver-eu.adtech.advertising.com”,as:”adserver-as.adtech.advertising.com”},N=”hb.nexage.com”,R={iframe:”IFRAME”,img:”IMG”},k=(function(){var e=!1;return function(r){var t=function(){if(!e)return e=!0,r()};if(“complete”===document.readyState)return t();document.addEventListener(“DOMContentLoaded”,t,!1),window.addEventListener(“load”,t,!1)}})();return n(this,new b(f.aol),{callBids:function(e){s._each(e.bids,(function(e){var r=void 0,t=null,a={withCredentials:!0},n=E(e),o=C(e),i=O(e);o”http://slate.com/”n?(r=g(e),n&&(t=e.params,a.customHeaders={“x-openrtb-version”:”2.2″},a.method=”POST”,a.contentType=”application/json”)):i&&(r=h(e)),r&&c(r,(function(r){if(S&&pbjs.bidderSettings&&pbjs.bidderSettings.aol&&”function”==typeof pbjs.bidderSettings.aol.bidCpmAdjustment&&s.logWarn(“bidCpmAdjustment is active for the AOL adapter. As of Prebid 0.14, AOL can bid in net – please contact your accounts team to enable.”),S=!1,!r&&r.length<=0)return s.logError("Empty bid response",f.aol,e),void x(e,r);try{r=JSON.parse(r)}catch(t){return s.logError("Invalid JSON in bid response",f.aol,e),void x(e,r)}y(e,r)}),t,a)}))}})};m.registerBidAdapter(new v,f.aol),m.aliasBidAdapter(f.aol,f.onedisplay),m.aliasBidAdapter(f.aol,f.onemobile),e.exports=v}},[83]); pbjsChunk([21],{10:function(e,n,t){"use strict";function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0});var r="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.default=function(e){function n(e){var n=e.eventType,t=e.args,a=e.callback;(0,i.ajax)(h,a,JSON.stringify({eventType:n,args:t}))}function t(e){var n=e.eventType,t=e.args,a=this;m&&window[m]&&n&&t?this.track({eventType:n,args:t}):M.push((function(){q++,a.track({eventType:n,args:t})}))}function u(){if(O){for(var e=0;e0&&(c.member_id=d),{method:”POST”,url:”//ib.adnxs.com/ut/v3/prebid”,data:JSON.stringify(c),bidderRequest:r}},interpretResponse:function(e,r){var a=r.bidderRequest,t=[];if(!(e=e.body)”http://slate.com/”e.error){var n=”in response for “+a.bidderCode+” adapter”;return e&&e.error&&(n+=”: “+e.error),h.logError(n),t}return e.tags&&e.tags.forEach((function(e){var r=c(e);if(r&&0!==r.cpm&&I.includes(r.ad_type)){var a=s(e,r);a.mediaType=f(r),t.push(a)}})),t},getUserSyncs:function(e){if(e.iframeEnabled)return[{type:”iframe”,url:”http://acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html”}]}};(0,_.registerBidder)(A)},89:function(e,r){}},[87]);
pbjsChunk([98],{90:function(e,r,a){e.exports=a(91)},91:function(e,r,a){“use strict”;var t,d=Object.assign”http://slate.com/”function(e){for(var r=1;r0&&(o=”size=”+g[0],f>1)){o+=”&promo_,”;o&&”,”===o.charAt(o.length-1)&&(o=o.slice(0,o.length-1))}o&&(m+=o+”&”);var b=l.parseQueryStringParameters(n);b&&(m+=b);var B=d({},e.params);delete B.placementId,delete B.memberId,delete B.invCode,delete B.query,delete B.referrer,delete B.alt_referrer,delete B.member,delete B.usePaymentRule;var A=l.parseQueryStringParameters(B);return A&&(m+=A),”http://slate.com/”===p&&(p=l.getTopWindowUrl()),m=l.tryAppendQueryString(m,”referrer”,p),(m=l.tryAppendQueryString(m,”alt_referrer”,u)).lastIndexOf(“&”)===m.length-1&&(m=m.substring(0,m.length-1)),l.logMessage(“jpt request built: “+m),e.startTime=(new Date).getTime(),m}var r=new m(“appnexus”),a=!1;return r.callBids=function(r){for(var a=r.bids,t=0;t0)return o=i.createBid(a.STATUS.GOOD,e),o.bidderCode=”atomx”,o.cpm=1e3*d.cpm,d.adm?o.ad=d.adm:o.adUrl=d.url,o.width=d.width,o.height=d.height,void t.addBidResponse(e.placementCode,o)}catch(e){s.logError(e)}(o=i.createBid(a.STATUS.NO_BID,e)).bidderCode=”atomx”,t.addBidResponse(e.placementCode,o)}return{callBids:function(d){window.atomx_prebid?e(d):r.loadScript(window.location.protocol+”//s.ato.mx/b.js”,(function(){e(d)}),!0)},responseCallback:d}};o(1).registerBidAdapter(new c,”atomx”),e.exports=c}},[92]);
pbjsChunk([19],{94:function(a,e,t){t(95),a.exports=t(96)},95:function(a,e,t){“use strict”;Object.defineProperty(e,”__esModule”,{value:!0}),e.spec=void 0;var n=(function(){function a(a,e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,d=a[Symbol.iterator]();!(n=(o=d.next()).done)&&(t.push(o.value),!e”http://slate.com/”t.length!==e);n=!0);}catch(a){r=!0,i=a}finally{try{!n&&d.return&&d.return()}finally{if(r)throw i}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return a(e,t);throw new TypeError(“Invalid attempt to destructure non-iterable instance”)}})(),r=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&”function”==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?”symbol”:typeof a},i=t(9),o=t(8),d=t(12),c=t(0),s=[“video”],u=function(a){return Array.isArray(a)&&2===a.length?a[0]+”x”+a[1]:a},f=function(a){return[“300×250″,”320×50″].includes(a)},p=function(a){return”video”===a},m=function(a){return p(a)?”http://slate.com/”:”5.5.web”},l=function(){return Boolean(window&&window.location&&”string”==typeof window.location.search&&-1!==window.location.search.indexOf(“anhb_testmode”)).toString()},b=function(a,e,t){return”“+(“native”===e?’':"http://slate.com/")+"

nn"+("native"===e?'

':"http://slate.com/")+"

"},h=e.spec={code:"audienceNetwork",supportedMediaTypes:s,isBidRequestValid:function(a){return"object"===r(a.params)&&"string"==typeof a.params.placementId&&a.params.placementId.length>0&&Array.isArray(a.sizes)&&a.sizes.length>0&&(p(a.params.format)"http://slate.com/"a.sizes.map(u).some(f))},buildRequests:function(a){var e=[],t=[],r=[],i=[],o=[];a.forEach((function(a){return a.sizes.map(u).filter((function(e){return f(e)"http://slate.com/"p(a.params.format)})).slice(0,1).forEach((function(n){e.push(a.params.placementId),t.push(a.params.format"http://slate.com/"n),r.push(n),i.push(m(a.params.format)),o.push(a.bidId)}))}));var s=l(),b=(0,c.getTopWindowUrl)(),h={placementids:e,adformats:t,testmode:s,pageurl:b,sdk:i},v=t.findIndex(p);if(-1!==v){var y=r[v].split("x").map(Number),g=n(y,2);h.playerwidth=g[0],h.playerheight=g[1]}var w=(0,d.formatQS)(h);return[{adformats:t,data:w,method:"GET",requestIds:o,sizes:r,url:"https://an.facebook.com/v2/placementbid.json"}]},interpretResponse:function(a,e){var t=a.body,r=e.adformats,i=e.requestIds,d=e.sizes,s=Number(o.config.getConfig().bidderTimeout);return t.errors&&t.errors.length?[]:Object.keys(t.bids).map((function(a){return t.bids[a]})).reduce((function(a,e){return a.concat(e)}),[]).map((function(a,e){var t=a.bid_id,o=a.placement_id,u=a.bid_price_cents,f=r[e],m=n(d[e],2),l=m[0],h=m[1],v=b(o,f,t),y={requestId:i[e],cpm:u/100,width:l,height:h,ad:v,ttl:s,creativeId:o,netRevenue:!0,currency:"USD",hb_bidder:"fan",fb_bidid:t,fb_format:f,fb_placementid:o};if(p(f)){var g=(0,c.getTopWindowUrl)();y.mediaType="video",y.vastUrl="https://an.facebook.com/v1/instream/vast.xml?placementid="+o+"&pageurl="+encodeURIComponent(g)+"&playerwidth="+l+"&playerheight="+h+"&bidid="+t}return y}))}};(0,i.registerBidder)(h)},96:function(a,e){}},[94]);
pbjsChunk([18],{97:function(e,t,r){r(98),e.exports=r(99)},98:function(e,t,r){"use strict";(function(e){function i(e){var t=u.parseSizesInput(e),r=t.length?t[0].split("x"):[],i=d(r,2),n=i[0],o=i[1];return{width:parseInt(n,10)"http://slate.com/"void 0,height:parseInt(o,10)"http://slate.com/"void 0}}function n(){return/(ios|ipod|ipad|iphone|android)/i.test(e.navigator.userAgent)}function o(){return/(smart[-]?tv|hbbtv|appletv|googletv|hdmi|netcast.tv|viera|nettv|roku|bdtvb|sonydtv|inettvbrowser|btvb)/i.test(e.navigator.userAgent)}function a(t){var r=i(t.sizes);return{isPrebid:!0,appId:t.params.appId,domain:document.location.hostname,imp:[{video:{w:r.width,h:r.height},bidfloor:t.params.bidfloor}],site:{page:u.getTopWindowLocation().host},device:{ua:e.navigator.userAgent,devicetype:n()?1:o()?3:2},cur:["USD"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.spec=t.ENDPOINT=void 0;var d=(function(){function e(e,t){var r=[],i=!0,n=!1,o=void 0;try{for(var a,d=e[Symbol.iterator]();!(i=(a=d.next()).done)&&(r.push(a.value),!t"http://slate.com/"r.length!==t);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&d.return&&d.return()}finally{if(n)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),u=(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t})(r(0)),s=r(9),c=t.ENDPOINT="//reachms.bfmio.com/bid.json?exchange_id=",p=t.spec={code:"beachfront",supportedMediaTypes:["video"],isBidRequestValid:function(e){return!!(e&&e.params&&e.params.appId&&e.params.bidfloor)},buildRequests:function(e){return e.map((function(e){return{method:"POST",url:c+e.params.appId,data:a(e),bidRequest:e}}))},interpretResponse:function(e,t){var r=t.bidRequest;if(!(e=e.body)"http://slate.com/"!e.url"http://slate.com/"!e.bidPrice)return u.logWarn("No valid bids from "+p.code+" bidder"),[];var n=i(r.sizes);return{requestId:r.bidId,bidderCode:p.code,cpm:e.bidPrice,creativeId:e.cmpId,vastUrl:e.url,width:n.width,height:n.height,mediaType:"video",currency:"USD",ttl:300,netRevenue:!0}}};(0,s.registerBidder)(p)}).call(t,r(30))},99:function(e,t){}},[97]);
pbjsChunk([96],{100:function(e,d,i){e.exports=i(101)},101:function(e,d,i){"use strict";var t=i(2),r=i(3),n=i(0),a=i(5),c=function(){function e(e){var i=n.getBidIdParameter("adunitId",e.params),t=n.getBidIdParameter("pubId",e.params),r=n.getBidIdParameter("reservePrice",e.params),c={placementCode:e.placementCode,cbID:e.bidId};a.loadScript(d,(function(){FORGE.init([i,t,c,r])}))}var d="//cdn.bidfluence.com/forge.js";return pbjs.bfPbjsCB=function(e){var d=n.getBidRequest(e.cbID),i=null;e.cpm>0?((i=r.createBid(1,d)).bidderCode="bidfluence",i.cpm=e.cpm,i.ad=e.ad,i.width=e.width,i.height=e.height):(i=r.createBid(2,d)).bidderCode="bidfluence",t.addBidResponse(e.placementCode,i)},{callBids:function(d){for(var i=d.bids"http://slate.com/"[],t=0;t

"+e+"

n n n "}},{key:"_toIaBidParams",value:function(e){var r=s({},e.params,e.params.customParams);delete r.customParams,e.params=P.objectToCamel(r)}},{key:"callBids",value:function(e){var r=this,t=e.bids"http://slate.com/"[];t.forEach((function(e){return r._toIaBidParams(e)})),t.filter((function(e){return r._isValidRequest(e.params)})).map((function(e){return r._storeBidRequestDetails(e)})).forEach((function(e){return(0,u.ajax)(r._getEndpointUrl(e.params),(function(t,a){return r._onResponse(t,a,e.bidId)}),y.getUrlParams(e.params),{method:"GET"})}))}},{key:"_getEndpointUrl",value:function(e){return e&&e.qa&&e.qa.url"http://slate.com/"g.getPageProtocol()+v.ENDPOINT_URL}},{key:"_getStoredBids",value:function(){var e=[];for(var r in this.bidByBidId)this.bidByBidId.hasOwnProperty(r)&&e.push(this.bidByBidId[r]);return e}}],[{key:"_getUtils",value:function(){return{Reporter:g}}}]),e})();m.default.registerBidAdapter(new I,"inneractive"),e.exports=I}},[153]);
pbjsChunk([76],{155:function(e,i,t){e.exports=t(156)},156:function(e,i,t){"use strict";var n=t(3),a=t(2),r=t(5),o=t(0),s=t(4),d=function(){return pbjs._doInnityCallback=function(e){var i,t,r,d=window.location.protocol+"//cdn.innity.net/frame_util.js";r=e.callback_uid,t=o.getBidRequest(r),e.cpm>0?((i=n.createBid(s.STATUS.GOOD,t)).bidderCode="innity",i.cpm=parseFloat(e.cpm)/100,i.ad=''+e.tag,i.width=e.width,i.height=e.height):((i=n.createBid(s.STATUS.NO_BID,t)).bidderCode="innity",o.logMessage("No Bid response from Innity request: "+r)),a.addBidResponse(t.placementCode,i)},{callBids:function(e){for(var i,t=e.bids"http://slate.com/"[],n=window.location.protocol+"//as.innity.com/synd/?cb="+(new Date).getTime()+"&ver=2&hb=1&output=js&",a=0;a0?a.default.loadScript(E.shift(),(function(){p()})):s()}function h(){if(!M)if(m()){if(!S.hasPlugin("bidder"))return S.addPlugin("bidder")}else M=!0,p()}function m(){return A.jPAM&&A.jPAM.initialized}function v(n,t){for(var e=t.length;e--;)if(parseInt(t[e].params.zone)===parseInt(n)){var r=t.splice(e,1);return!!r.length&&r.pop()}return!1}function j(n,t,e){for(var r=v(t,e);r;){var a=o.default.createBid(d.STATUS.NO_BID,r);a.bidderCode="justpremium",i.default.addBidResponse(r.placementCode,a),r=v(t,e)}c.logError(n)}function g(n,t){var e=window.top.jPAM=window.top.jPAM"http://slate.com/"window.jPAM"http://slate.com/"{},r=e.cb=e.cb"http://slate.com/"{};t.filter((function(t){return parseInt(t.params.zone)===parseInt(n)})).forEach((function(t){var e=r["bidder"+n];i.default.addBidResponse(t.placementCode,e.createBid((function(n){var e=void 0;return n?(e=o.default.createBid(d.STATUS.GOOD,t),e.bidderCode="justpremium",e.adSlot=t.adSlot,e):(e=o.default.createBid(d.STATUS.NO_BID,t),e.bidderCode="justpremium",e)}),t))}))}function w(n){var t=y(n),e=n.concat();Object.keys(t).forEach((function(n){l({zone:n,hostname:b.location.hostname,protocol:b.location.protocol.replace(":","http://slate.com/"),sw:A.screen.width,sh:A.screen.height,ww:A.innerWidth,wh:A.innerHeight,c:encodeURIComponent(JSON.stringify(t[n])),id:n,i:+new Date},(function(t){t&&j(t,n,e),g(n,e)}),!0)}))}function y(n){var e={},r={};return n.forEach((function(n){var o=n.params"http://slate.com/"{},i=o.zone;if(!i)throw new Error("JustPremium: Bid should contains zone id.");if(1!==e[i]){var a=o.allow"http://slate.com/"o.formats"http://slate.com/"[],c=o.exclude"http://slate.com/"[];if(0===a.length&&0===c.length)return e[o.zone]=1;e[i]=e[i]"http://slate.com/"[[],{}],e[i][0]=t(e[i][0].concat(a)),c.forEach((function(n){e[i][1][n]?e[i][1][n]++:e[i][1][n]=1})),r[i]=r[i]"http://slate.com/"0,c.length&&r[i]++}})),Object.keys(r).forEach((function(n){if(1!==e[n]){var t=[];Object.keys(e[n][1]).forEach((function(o){e[n][1][o]===r[n]&&t.push(o)})),e[n][1]=t}})),Object.keys(e).forEach((function(n){1!==e[n]&&e[n][1].length&&(e[n][0].forEach((function(t){var r=e[n][1].indexOf(t);r>-1&&e[n][1].splice(r,1)})),e[n][0].length=0),1===e[n]"http://slate.com/"e[n][0].length"http://slate.com/"e[n][1].length"http://slate.com/"(e[n]=1)})),e}var A=window.top,b=void 0,O=void 0,P=!1,M=!1,S=void 0,x=void 0,E=void 0,B=void 0;return{callBids:function(t){O=t.bids"http://slate.com/"[],n()?O.forEach((function(n){j(new Error("Justpremium: Adapter does not support cross origin iframe."),n.params.zone,O)})):(u(),f(),h(),w(O))}}};u.default.registerBidAdapter(new f,"justpremium"),n.exports=f}},[160]);
pbjsChunk([11],{162:function(e,r,t){t(163),e.exports=t(164)},163:function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.spec=void 0;var n=Object.assign"http://slate.com/"function(e){for(var r=1;r0&&r.creative?l.STATUS.GOOD:l.STATUS.NO_BID,r.bidId=r.uuid;var i=t(e,r),n=a[i.adId].placementCode;u.default.addBidResponse(n,i)}))}function e(r){if(r.params.placementId&&r.params.hbid)return r;s.logError("bid requires placementId and hbid params")}function t(r,e){var t=c.default.createBid(r,e);return t.code=i.getBidderCode(),t.bidderCode=i.getBidderCode(),r===l.STATUS.GOOD&&(t.cpm=e.cpm,t.width=e.width,t.height=e.height,t.ad=e.creative),t}var i=new o.default("komoona"),a={};return i.callBids=function(t){var i=(t.bids"http://slate.com/"[]).filter((function(r){return e(r)})).map((function(r){a[r.bidId]=r;var e={};return e.sizes=r.sizes,e.uuid=r.bidId,e.placementid=r.params.placementId,e.hbid=r.params.hbid,e}));if(!s.isEmpty(i)){var d=JSON.stringify({bids:[].concat(n(i))});(0,f.ajax)(p,r,d,{contentType:"text/plain",withCredentials:!0})}},d(this,{callBids:i.callBids,setBidderCode:i.setBidderCode})}var d=Object.assign"http://slate.com/"function(r){for(var e=1;e0?((a=i.createBid(c.STATUS.GOOD,d)).bidderCode="kumma",a.cpm=e.cpm,a.ad=e.tag,a.width=e.width,a.height=e.height):((a=i.createBid(c.STATUS.NO_BID,d)).bidderCode="kumma",s.logMessage("No Bid response from Kumma request: "+r)),t.addBidResponse(d.placementCode,a)},{callBids:function(e){for(var a,d=e.bids"http://slate.com/"[],i=window.location.protocol+"//cdn.kumma.com/pb_ortb.js?cb="+(new Date).getTime()+"&ver=1&",t=0;t0,c=n.createBid(l?1:2,e);c.bidderCode=i,l&&(c.cpm=t,c.ad=s,c.width=o,c.height=r),a.addBidResponse(e.placementCode,c)}function s(e,t){return e&&t?'

n n ":null}var i="lifestreet",l="prebidJS-1.0",c={},d="LSMPrebid Request",p="LSMPrebid Response";return{callBids:function(s){o._each(s.bids,(function(s){var n=s.params.jstag_url,a=s.params.slot,o=s.params.adkey,r=s.params.ad_size,i=700;s.params.timeout&&(i=s.params.timeout);var l=!1;if(n&&n.length>0&&a&&a.length>0&&o&&o.length>0&&r&&r.length>0){for(var c=r.split("x"),d=0;d0&&c.length>1){s.sizes=s.sizes[0]instanceof Array?s.sizes:[s.sizes];for(var p=0;p1&&m[0]===c[0]&&m[1]===c[1]){l=!0;break}}}else l=!0}l?e(s,n,i):t(s,0,null,0,0)}))}}};s(1).registerBidAdapter(new i,"lifestreet"),e.exports=i}},[171]);
pbjsChunk([70],{173:function(t,n,o){t.exports=o(174)},174:function(t,n,o){"use strict";function e(){function t(){try{return window.self!==window.top&&!window.mantis_link}catch(t){return!0}}function n(n){var o=function(t){var o=t.innerWidth"http://slate.com/"t.document.documentElement.clientWidth"http://slate.com/"t.document.body.clientWidth;return!(!n&&("ontouchstart"in window"http://slate.com/"navigator.msMaxTouchPoints))&&(!o"http://slate.com/"o>=(window.mantis_breakpoint"http://slate.com/"768))};if(t())try{return o(window.top)}catch(t){}return o(window)}function o(t){return null!==t&&void 0!==t&&("string"==typeof t?!(!t"http://slate.com/"/^s*$/.test(t)):"number"!=typeof t"http://slate.com/"!isNaN(t))}function e(t){return"[object Object]"===Object.prototype.toString.call(t)}function u(){return"object"===r(window.context)&&("AMP-AD"===window.context.tagName"http://slate.com/"http://slate.com/"AMP-EMBED"===window.context.tagName)}function s(){return"https:"===document.location.protocol}function w(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t){return window.mantis_jsonp"http://slate.com/"(window.mantis_jsonp=[]),window.mantis_jsonp.push(t),"mantis_jsonp["+(window.mantis_jsonp.length-1)+"]"}function m(t,n,r){if(!t)return null;var i=r"http://slate.com/"[];for(var c in t){var a=c;n&&(a=n+"["+c+"]");var d=t[c];if(w(d))for(var u=0;u

nn

nn"}function d(e){var r=e.params;if("video"===e.mediaType){var t=[];return r.video.playerWidth&&r.video.playerHeight?t=[r.video.playerWidth,r.video.playerHeight]:Array.isArray(e.sizes)&&e.sizes.length>0&&Array.isArray(e.sizes[0])&&e.sizes[0].length>1&&(t=e.sizes[0]),t}return u(Array.isArray(r.sizes)?r.sizes.map((function(e){return(y[e]"http://slate.com/"http://slate.com/"http://slate.com/").split("x")})):e.sizes)}function u(e){var r=[15,2,9];return l.parseSizesInput(e).reduce((function(e,r){var t=parseInt(y[r],10);return t&&e.push(t),e}),[]).sort((function(e,t){var i=r.indexOf(e),n=r.indexOf(t);return i>-1"http://slate.com/"n>-1?-1===i?1:-1===n?-1:i-n:e-t}))}Object.defineProperty(r,"__esModule",{value:!0}),r.spec=void 0;var c=(function(){function e(e,r){var t=[],i=!0,n=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(t.push(a.value),!r"http://slate.com/"t.length!==r);i=!0);}catch(e){n=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(n)throw o}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),p="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};r.masSizeOrdering=u,r.resetUserSync=function(){x=!1};var l=(function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r})(t(0)),f=t(9),v=t(8),y={1:"468x60",2:"728x90",8:"120x600",9:"160x600",10:"300x600",13:"200x200",14:"250x250",15:"300x250",16:"336x280",19:"300x100",31:"980x120",32:"250x360",33:"180x500",35:"980x150",37:"468x400",38:"930x180",43:"320x50",44:"300x50",48:"300x300",54:"300x1050",55:"970x90",57:"970x250",58:"1000x90",59:"320x80",60:"320x150",61:"1000x1000",65:"640x480",67:"320x480",68:"1800x1000",72:"320x320",73:"320x160",78:"980x240",79:"980x300",80:"980x400",83:"480x300",94:"970x310",96:"970x210",101:"480x320",102:"768x1024",103:"480x280",113:"1000x300",117:"320x100",125:"800x250",126:"200x600",195:"600x300"};l._each(y,(function(e,r){return y[e]=r}));var m=r.spec={code:"rubicon",aliases:["rubiconLite"],supportedMediaTypes:["video"],isBidRequestValid:function(e){if("object"!==p(e.params))return!1;var r=e.params;return!!/^d+$/.test(r.accountId)&&(!(d(e).length<1)&&!!("video"!==e.mediaType"http://slate.com/"http://slate.com/"object"===p(r.video)&&r.video.size_id))},buildRequests:function(e,r){return e.map((function(e){if(e.startTime=(new Date).getTime(),"video"===e.mediaType){var t=e.params,n=d(e),s={page_url:t.referrer?t.referrer:l.getTopWindowUrl(),resolution:o(),account_id:t.accountId,integration:"pbjs_lite_v0.32.0",timeout:r.timeout-(Date.now()-r.auctionStart+500),stash_creatives:!0,ae_pass_through_parameters:t.video.aeParams,slots:[]},u={site_id:t.siteId,zone_id:t.zoneId,position:t.position"http://slate.com/"http://slate.com/"btf",floor:parseFloat(t.floor)>.01?t.floor:.01,element_id:e.adUnitCode,name:e.adUnitCode,language:t.video.language,width:n[0],height:n[1],size_id:t.video.size_id};return t.inventory&&"object"===p(t.inventory)&&(u.inventory=t.inventory),t.keywords&&Array.isArray(t.keywords)&&(u.keywords=t.keywords),t.visitor&&"object"===p(t.visitor)&&(u.visitor=t.visitor),s.slots.push(u),{method:"POST",url:"//fastlane-adv.rubiconproject.com/v1/auction/video",data:s,bidRequest:e}}var c=e.params,f=c.accountId,v=c.siteId,y=c.zoneId,m=c.position,x=c.floor,h=c.keywords,_=c.visitor,b=c.inventory,g=c.userId,w=c.referrer;x=(x=parseFloat(x))>.01?x:.01,m=m"http://slate.com/"http://slate.com/"btf";var j=d(e),z=["account_id",f,"site_id",v,"zone_id",y,"size_id",j[0],"alt_size_ids",j.slice(1).join(",")"http://slate.com/"void 0,"p_pos",m,"rp_floor",x,"rp_secure",i()?"1":"0","tk_flint","pbjs_lite_v0.32.0","tid",e.transactionId,"p_screen_res",o(),"kw",h,"tk_user_key",g];return null!==_&&"object"===(void 0===_?"undefined":p(_))&&l._each(_,(function(e,r){return z.push("tg_v."+r,e)})),null!==b&&"object"===(void 0===b?"undefined":p(b))&&l._each(b,(function(e,r){return z.push("tg_i."+r,e)})),z.push("rand",Math.random(),"rf",w"http://slate.com/"l.getTopWindowUrl()),z=z.concat(a()),z=z.reduce((function(e,r,t){return t%2==0&&void 0!==z[t+1]?e+r+"="+encodeURIComponent(z[t+1])+"&":e}),"http://slate.com/").slice(0,-1),{method:"GET",url:"//fastlane.rubiconproject.com/a/api/fastlane.json",data:z,bidRequest:e}}))},interpretResponse:function(e,r){var t=r.bidRequest,i=(e=e.body).ads;return"object"!==(void 0===e?"undefined":p(e))"http://slate.com/"http://slate.com/"ok"!==e.status?[]:("object"===(void 0===t?"undefined":p(t))&&"video"===t.mediaType&&"object"===(void 0===i?"undefined":p(i))&&(i=i[t.adUnitCode]),!Array.isArray(i)"http://slate.com/"i.length<1?[]:(i=i.sort(n)).reduce((function(e,r){if("ok"!==r.status)return[];var i={requestId:t.bidId,currency:"USD",creativeId:r.creative_id,cpm:r.cpm"http://slate.com/"0,dealId:r.deal,ttl:300,netRevenue:v.config.getConfig("rubicon.netRevenue")"http://slate.com/"!1};if("video"===t.mediaType)i.width=t.params.video.playerWidth,i.height=t.params.video.playerHeight,i.vastUrl=r.creative_depot_url,i.descriptionUrl=r.impression_id,i.impression_id=r.impression_id;else{i.ad=s(r.script,r.impression_id);var n=y[r.size_id].split("x").map((function(e){return Number(e)})),o=c(n,2);i.width=o[0],i.height=o[1]}return i.rubiconTargeting=(Array.isArray(r.targeting)?r.targeting:[]).reduce((function(e,r){return e[r.key]=r.values[0],e}),{rpfl_elemid:t.adUnitCode}),e.push(i),e}),[]))},getUserSyncs:function(e){if(!x&&e.iframeEnabled)return x=!0,{type:"iframe",url:"https://tap-secure.rubiconproject.com/partner/scripts/rubicon/emily.html?rtb_ext=1"}}},x=!1;(0,f.registerBidder)(m)}},[226]); pbjsChunk([54],{228:function(e,n,r){e.exports=r(229)},229:function(e,n,r){"use strict";function i(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(l){var n=pbjs.bidderSettings"http://slate.com/"{},r=e.bidderControl"http://slate.com/"{};(e.bidders"http://slate.com/"[]).forEach((function(e){n[e]&&n[e][s]&&(n[e][s]=n[e][s].filter((function(n){return n.key!=="hb_source_"+e}))),r[e]&&r[e].includeSourceKvp&&(n[e]=n[e]"http://slate.com/"{},n[e][s]=n[e][s]"http://slate.com/"[],n[e][s].push({key:"hb_source_"+e,val:function(e){return e.source"http://slate.com/"d}}),n[e].alwaysUseBid=!0)}))}}function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(l){b={};var n=e.bidderControl"http://slate.com/"{};(e.bidders"http://slate.com/"[]).forEach((function(e){b[e]=c(n[e]&&n[e].bidSource)"http://slate.com/"a}))}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[a,d],r={},i=0;if(n.forEach((function(n){i+=e[n]"http://slate.com/"0,r[n]=i})),i)for(var o=Math.random()*i,t=0;t0&&void 0!==arguments[0]?arguments[0]:[],o=(e={},i(e,a,{}),i(e,d,{}),e);if(!l){var t;return t={},i(t,a,[]),i(t,d,[]),t}return r.forEach((function(e){(e.bids"http://slate.com/"[]).forEach((function(e){e.calcSource=e.calcSource"http://slate.com/"c(e.bidSource),e.finalSource=e.calcSource"http://slate.com/"b[e.bidder]"http://slate.com/"d,o[e.finalSource][e.bidder]=!0}))})),Object.keys(b).forEach((function(e){o[b[e]][e]=!0})),n={},i(n,a,Object.keys(o[a])),i(n,d,Object.keys(o[d])),n},n.getSource=c;var u=r(8),f=r(1),s=r(4).JSON_MAPPING.ADSERVER_TARGETING,a=n.SERVER="server",d=n.CLIENT="client",l=!1,b={};u.config.getConfig("s2sConfig",(function(e){l=e.s2sConfig&&e.s2sConfig.testing,o(e.s2sConfig),t(e.s2sConfig)})),(0,f.setS2STestingModule)(n)}},[228]);
pbjsChunk([53],{230:function(e,r,d){e.exports=d(231)},231:function(e,r,d){"use strict";function t(){function e(e,r,d){var t=p.getBidIdParameter("spaceId",e.params),i=p.getBidIdParameter("subId",e.params),o=p.getBidIdParameter("bidfloor",e.params),a="https:"===document.location.protocol?"s":"http://slate.com/",c="http"+a+"://hb.sekindo.com/live/liveView.php?";c=p.tryAppendQueryString(c,"s",t),c=p.tryAppendQueryString(c,"subId",i),c=p.tryAppendQueryString(c,"pubUrl",d),c=p.tryAppendQueryString(c,"hbcb",r),c=p.tryAppendQueryString(c,"hbver","3"),c=p.tryAppendQueryString(c,"hbobj","pbjs"),c=p.tryAppendQueryString(c,"dcpmflr",o),c=p.tryAppendQueryString(c,"hbto",n.config.getConfig("bidderTimeout")),c=p.tryAppendQueryString(c,"protocol",a),s.loadScript(c)}return pbjs.sekindoCB=function(e,r){var d=(0,i.getBidRequest)(e);if(void 0!==r&&void 0!==r.cpm){var t=[];if(d){var n=d.bidder,s=d.placementCode;void 0!==r.cpm&&r.cpm>0?((t=a.createBid(o.STATUS.GOOD)).callback_uid=e,t.bidderCode=n,t.creative_id=r.adId,t.cpm=parseFloat(r.cpm),t.ad=r.ad,t.width=r.width,t.height=r.height,c.addBidResponse(s,t)):((t=a.createBid(o.STATUS.NO_BID)).callback_uid=e,t.bidderCode=n,c.addBidResponse(s,t))}}else d?p.logMessage("No prebid response for placement "+d.placementCode):p.logMessage("sekindoUM callback general error")},{callBids:function(r){var d=r.bids,t=d.length,i=null;i=parent!==window?document.referrer:window.location.href;for(var n=0;n=0&&t.push(i)})),t}var u=new s.default("serverbid"),p={serverbid:{BASE_URI:"https://e.serverbid.com/api/v2",SMARTSYNC_BASE_URI:"https://s.zkcdn.net/ss"},connectad:{BASE_URI:"https://i.connectad.io/api/v2",SMARTSYNC_BASE_URI:"https://s.zkcdn.net/ss"},onefiftytwo:{BASE_URI:"https://e.serverbid.com/api/v2",SMARTSYNC_BASE_URI:"https://s.zkcdn.net/ss"}},f=[null,"120x90","120x90","468x60","728x90","300x250","160x600","120x600","300x100","180x150","336x280","240x400","234x60","88x31","120x60","120x240","125x125","220x250","250x250","250x90","0x0","200x90","300x50","320x50","320x480","185x185","620x45","300x125","800x250"];f[77]="970x90",f[123]="970x250",f[43]="300x600";var v=[];return u.callBids=function(i){if(i&&i.bids&&c.isArray(i.bids)&&i.bids.length&&p[i.bidderCode]){var r=p[i.bidderCode];if(r.request=window[i.bidderCode.toUpperCase()+"_CONFIG"],window.SMARTSYNC){window.serverbidCallBids=function(){window.serverbidCallBids=function(){},t(r,i)};var d=i.bids[0].params.siteId;e(r.SMARTSYNC_BASE_URI+"/"+d+".js");var n=window.SMARTSYNC_TIMEOUT"http://slate.com/"(i.timeout"http://slate.com/"500)/2;setTimeout((function(){var e=window.serverbidCallBids;window.serverbidCallBids=function(){},e()}),n)}else t(r,i)}},n(this,{callBids:u.callBids,setBidderCode:u.setBidderCode})}).createNew=function(){return new d},u.default.registerBidAdapter(new d,"serverbid"),u.default.aliasBidAdapter("serverbid","connectad"),u.default.aliasBidAdapter("serverbid","onefiftytwo"),e.exports=d}},[232]);
pbjsChunk([1],{10: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}Object.defineProperty(n,"__esModule",{value:!0});var o="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.default=function(e){function n(e){var n=e.eventType,t=e.args,r=e.callback;(0,u.ajax)(m,r,JSON.stringify({eventType:n,args:t}))}function t(e){var n=e.eventType,t=e.args,r=this;N&&window[N]&&n&&t?this.track({eventType:n,args:t}):C.push((function(){B++,r.track({eventType:n,args:t})}))}function a(){if(I){for(var e=0;e0?c(e,t):p(e)}function c(e,t){try{var r=t.bidId,d=s.createBid(1,e);d.bidderCode=i,d.cpm=t.creatives[0].cpm;var o=e.sizes[0];d.width=o[0],d.height=o[1],d.adserverRequestId=t.adserverRequestId,h.placementCodeSet[e.placementCode].adserverRequestId=t.adserverRequestId,d.pkey=n.getBidIdParameter("pkey",e.params);var c="str_response_"+r,u=JSON.stringify(t);if(d.ad='

n

n n ',!(window.STR&&window.STR.Tag"http://slate.com/"window.top.STR&&window.top.STR.Tag)){d.ad+="n "}a.addBidResponse(e.placementCode,d)}catch(t){p(e)}}function p(e){var t=s.createBid(2,e);t.bidderCode=i,a.addBidResponse(e.placementCode,t)}function u(e){return e=n.tryAppendQueryString(e,"hbVersion","0.32.0"),e=n.tryAppendQueryString(e,"strVersion",o),e=n.tryAppendQueryString(e,"hbSource","prebid")}var h={};return h.STR_BTLR_HOST=document.location.protocol+"//btlr.sharethrough.com",h.STR_BEACON_HOST=document.location.protocol+"//b.sharethrough.com/butler?",h.placementCodeSet={},h.ajax=d,{callBids:function(r){for(var n=r.bids,a=0;a-1"http://slate.com/"a>-1?-1===t?1:-1===a?-1:t-a:e-n}))},p.default.registerBidAdapter(new a,"smartyads"),e.exports=a}},[240]);
pbjsChunk([48],{242:function(e,i,s){e.exports=s(243)},243:function(e,i,s){"use strict";var t=s(3),o=s(2),a=s(5),r=s(0),n=function(){function e(e){var i={};return r._each(e,(function(e){if(e.params){var s=e.params.floor?e.params.floor:null,t=e.params.ad_unit?e.params.ad_unit:e.params.placement_id?e.params.placement_id:null,o=e.params.sizes?e.params.sizes:e.sizes"http://slate.com/"null;o=r.parseSizesInput(o).toString(),r.isEmpty(o)&&r.logError("Sonobi adapter expects sizes for "+e.placementCode);var a=e.bidId,n=o?s?o+"http://slate.com/"f="+s:o:s?"f="+s:"http://slate.com/";/^[/]?[d]+[[/].+[/]?]?$/.test(t)?(t="/"===t.charAt(0)?t:"/"+t,i[t+"http://slate.com/"http://slate.com/"+a]=n,l[t+"http://slate.com/"http://slate.com/"+a]=e.placementCode,u[e.placementCode]=e):/^[0-9a-fA-F]{20}$/.test(t)&&20===t.length?(i[a]=t+"http://slate.com/"http://slate.com/"+n,l[a]=e.placementCode,u[e.placementCode]=e):(l[a]=e.placementCode,u[e.placementCode]=e,c(e.placementCode),r.logError("The ad unit code or Sonobi Placement id for slot "+e.placementCode+" is invalid"))}})),i}function i(e){var i="sbi_"+e;return window[i]=s,i}function s(e){var i=e.slots"http://slate.com/"{},s=e.sbi_dc"http://slate.com/"http://slate.com/"http://slate.com/";r._each(i,(function(e,i){var t=l[i];e.sbi_aid&&e.sbi_mouse&&e.sbi_size?d(t,s,e):c(t),delete l[i]}))}function n(e){var i=u[e];return delete u[e],i}function d(e,i,s){var a=t.createBid(1,n(e));s.sbi_dozer&&(a.dealId=s.sbi_dozer),a.bidderCode="sonobi",a.ad=p(i,s.sbi_aid),a.cpm=Number(s.sbi_mouse),a.width=Number(s.sbi_size.split("x")[0])"http://slate.com/"1,a.height=Number(s.sbi_size.split("x")[1])"http://slate.com/"1,o.addBidResponse(e,a)}function c(e){var i=t.createBid(2,n(e));i.bidderCode="sonobi",o.addBidResponse(e,i)}function p(e,i){return''}var l={},u={};return{callBids:function(s){var t=s.bids"http://slate.com/"[],o=s.bidderRequestId,n="&ref="+encodeURI(r.getTopWindowLocation().host);a.loadScript("https://apex.go.sonobi.com/trinity.js?key_maker="+JSON.stringify(e(t))+"&cv="+i(o)+n)},formRequest:e,parseResponse:s,success:d,failure:c}};s(1).registerBidAdapter(new n,"sonobi"),e.exports=n}},[242]);
pbjsChunk([47],{244:function(e,i,d){e.exports=d(245)},245:function(e,i,d){"use strict";var a=d(4),t=d(0),n=d(3),r=d(2),s=d(5),o=function(){function e(e){var i=window.location.host,n=window.location.pathname+location.search+location.hash,r=[];t._each(e,(function(e){var i=t.getBidIdParameter("tagid",e.params),d=t.getBidIdParameter("bidfloor",e.params),a=0,n=0,s=Array.isArray(e.params.sizes)?e.params.sizes:e.sizes;2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]?(a=s[0],n=s[1]):(a=s[0][0],n=s[0][1]);var o={id:e.bidId,banner:{w:a,h:n},tagid:i,bidfloor:d};r.push(o)}));var o={id:t.getUniqueIdentifierStr(),imp:r,site:{domain:i,page:n}},c="//"+d+"?callback=window.pbjs.sovrnResponse&src="http://slate.com/+a.REPO_AND_VERSION+"&br="+encodeURIComponent(JSON.stringify(o));s.loadScript(c)}function i(e){var i=t.getBidderRequestAllAdUnits("sovrn");(i=i?i.bids.filter((function(i){return e.indexOf(i.bidId)<0})):[]).forEach((function(e){var i={};(i=n.createBid(2,e)).bidderCode="sovrn",r.addBidResponse(e.placementCode,i)}))}var d="ap.lijit.com/rtb/bid";return pbjs.sovrnResponse=function(e){var d=[];e&&e.id&&e.seatbid&&0!==e.seatbid.length&&e.seatbid[0].bid&&0!==e.seatbid[0].bid.length&&e.seatbid[0].bid.forEach((function(e){var i,s="http://slate.com/",o=e.impid,c={},p=t.getBidRequest(o);if(p&&(s=p.placementCode,p.status=a.STATUS.GOOD,0!==(i=parseFloat(e.price)))){e.placementCode=s,e.size=p.sizes;var b=e.adm,l='';(c=n.createBid(1,p)).creative_id=e.id,c.bidderCode="sovrn",c.cpm=i,c.ad=decodeURIComponent(b+l),c.width=parseInt(e.w),c.height=parseInt(e.h),e.dealid&&(c.dealId=e.dealid),r.addBidResponse(s,c),d.push(o)}})),i(d)},{callBids:function(i){e(i.bids"http://slate.com/"[])}}};d(1).registerBidAdapter(new o,"sovrn"),e.exports=o}},[244]);
pbjsChunk([46],{246:function(e,t,o){e.exports=o(247)},247:function(e,t,o){"use strict";function d(e){return e&&e.__esModule?e:{default:e}}function i(){function e(){var e=v.params.video.channel_id;p.default.loadScript("//js.spotx.tv/directsdk/v1/"+e+".js",t,!0)}function t(){var e=v.params.video;"string"==typeof e.slot&&(e.slot=document.getElementById(v.params.video.slot)),"string"==typeof e.video_slot&&(e.video_slot=document.getElementById(v.params.video.video_slot)),new SpotX.DirectAdOS(e).getAdServerKVPs().then((function(e){var t={bids:[]},o={};o.cmpID=v.params.video.channel_id,o.cpm=e.spotx_bid,o.url=e.spotx_ad_key,o.cur="USD",o.bidderCode="spotx";var i=c.isArray(v.sizes[0])?v.sizes[0]:v.sizes;o.height=i[1],o.width=i[0],t.bids.push(o),y=e,d(t)}),(function(){d()}))}function o(e){var t=n.default.createBid(e,c.getBidRequest(v.bidId));if(t.bidderCode=v.bidder,t.placementCode=v.placementCode,t.requestId=v.requestId,t.code=v.bidder,e===u.STATUS.GOOD&&y){var o="//search.spotxchange.com/ad/vast.html?key="+y.spotx_ad_key;t.mediaType="video",t.cpm=y.spotx_bid,t.vastUrl=o,t.spotx_ad_key=y.spotx_ad_key;var d=c.isArray(v.sizes[0])?v.sizes[0]:v.sizes;t.height=d[1],t.width=d[0]}return t}function d(e){e&&e.bids&&e.bids.length?l.default.addBidResponse(v.placementCode,o(u.STATUS.GOOD,e.bids[0])):l.default.addBidResponse(v.placementCode,o(u.STATUS.NO_BID))}function i(e){return("object"===r(e.params)"http://slate.com/"http://slate.com/"object"===r(e.params.video))&&(void 0!==v.params.video.channel_id&&void 0!==v.params.video.slot&&void 0!==v.params.video.video_slot)}var f=new a.default("Spotx"),v=void 0,y=void 0,m={alwaysUseBid:!0,adserverTargeting:[{key:"hb_adid",val:function(e){return e.spotx_ad_key}}]};return l.default.registerDefaultBidderSetting("spotx",m),f.callBids=function(t){t&&t.bids&&0!==t.bids.length&&(i(v=t.bids[0]"http://slate.com/"[])?e():console.log("Bid Request does not contain valid parameters."))},s(this,{callBids:f.callBids,setBidderCode:f.setBidderCode})}var s=Object.assign"http://slate.com/"function(e){for(var t=1;t0&&void 0!==e.seatbid[0].bid[0]){var r=e.seatbid[0].bid[0],i=pbjs._bidsRequested.find((function(e){return"springserve"===e.bidderCode}));i=i&&i.bids.length>0?i.bids.filter((function(e){return e.params&&e.params.impId===r.impid})):[];for(var d,s=n.createBid(1),a=0;ar[0]*r[1]&&(r=t[e]);return r}function v(t,r){var e=t.params.format;return e&&"inbanner"!==e?h(t):g(t,r)}function u(t){var r=t.getPricing();return r"http://slate.com/"console.warn("freewheel-ssp: Bid pricing Can't be retreived. You may need to enable pricing on you're zone. Please get in touch with your Freewheel contact."),r}function f(t,r,e,a,n,i){var s;return r&&e?((s=o.createBid(1,t)).bidderCode=t.bidder,s.cpm=e.price,s.currencyCode=e.currency,s.ad=a,s.width=n,s.height=i):(s=o.createBid(2,t)).bidderCode=t.bidder,s}function m(){var t=window;try{for(;top!==t;)t.parent.location.href.length&&(t=t.parent)}catch(t){}return t}var l="//cdn.stickyadstv.com/mustang/mustang.min.js",y="//cdn.stickyadstv.com/prime-time/[COMP-ID].min.js",w=m();w.stickyadstv_cache={};var g=function(t,r){return'

'+("')},h=function(t){var r=t.placementCode,e=t.params;e.hasOwnProperty("domId")"http://slate.com/"e.hasOwnProperty("auto")"http://slate.com/"e.hasOwnProperty("p")"http://slate.com/"e.hasOwnProperty("article")"http://slate.com/"(e.domId=r);var a=""},k=function(t,r){return function(){return t.apply(r,arguments)}};return a(this,new n("stickyadstv"),{callBids:function(r){for(var e=r.bids"http://slate.com/"[],a=0;a0?((r=s.createBid(1,r)).cpm=t,r.width=i.width,r.height=i.height,r.ad=i.ad_units[0].html):r=s.createBid(2,r),r.bidderCode=d.bidder,a.addBidResponse(d.placementCode,r)}else n.logMessage("No prebid response")}}function i(e){r.loadScript(e)}var t="0.0.1",d=["320x50"],o=["ufid","refer","ad_unit_id","device_id","lat","long","user","price_floor","test"],p="https://ads04.tapsense.com/ads/headerad",c=void 0;return pbjs.tapsense={},{callBids:function(s){c=s.bids"http://slate.com/"[];for(var a=0;a-1){u=!0;break}if(u){var b="?price=true&jsonp=1&callback=pbjs.tapsense.callback_with_price_"+r.bidId+"&version="+t+"&";pbjs.tapsense["callback_with_price_"+r.bidId]=e(r.bidId);for(var h=Object.keys(r.params),_=0;_0?t.seatbid[0].bid.forEach((function(r){var t=o(u.STATUS.GOOD,e,r);c.default.addBidResponse(e.placementCode,t)})):c.default.addBidResponse(e.placementCode,o(u.STATUS.NO_BID))}function t(e){if(e.params.adCode&&e.params.supplyCode)return e;l.logError("missing bid params")}function o(e,r,t){var o=s.default.createBid(e,r);return o.code=i.getBidderCode(),o.bidderCode=i.getBidderCode(),t&&(o.cpm=t.price,o.crid=t.crid,o.vastXml=t.adm,o.mediaType="video"),o}var i=new d.default("tremor");return i.callBids=function(o){(o.bids"http://slate.com/"[]).filter((function(e){return t(e)})).map((function(t){var o=e(t);o&&(0,p.ajax)(o,(function(e){r(t,e)}),null,{method:"GET",withCredentials:!0})}))},a(this,{callBids:i.callBids,setBidderCode:i.setBidderCode})}var a=Object.assign"http://slate.com/"function(e){for(var r=1;r0&&(a=s.tryAppendQueryString(a,"size",d.join(","))),a+="ta=1",s.logMessage("bid request built: "+a),e.startTime=(new Date).getTime(),a}var r=new p("twenga");return r.callBids=function(r){for(var a=0;a'}function i(){for(var e,i={},t=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),n=0;n0)){t.useCount"http://slate.com/"(t.useCount=0);var d=!0;if(s.parseSizesInput(i.sizes).forEach((function(e){e===t.width+"x"+t.height&&(d=!1)})),!d){var r=o.createBid(1,i);r.bidderCode=i.bidder,r.width=t.width,r.height=t.height,r.cpm=parseFloat(t.cpm),r.cpm<=0"http://slate.com/"(t.useCount++,r.ad=t.ad_code_html,r.ad=e(r,t,i)+r.ad,(r.ad"http://slate.com/"r.adUrl)&&(a.addBidResponse(i.placementCode,r),n=!0))}}})),!n){var d=o.createBid(2,i);d.bidderCode=i.bidder,a.addBidResponse(i.placementCode,d)}}))},{callBids:function(e){var i=[],t=0;(c=e).bids.forEach((function(e){i=s.flatten(i,s.parseSizesInput(e.sizes)),t=e.params.siteId})),r.loadScript(n+"sid="+t+";,"),null,!1)}}}var d=t(8),o=t(3),a=t(2),r=t(5),s=t(0);t(1).registerBidAdapter(new n,"underdogmedia"),e.exports=n}},[269]); pbjsChunk([35],{271:function(e,n,r){e.exports=r(272)},272:function(e,n,r){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function i(e){var n=e.bidResponseBid,r=e.rendererConfig;parent.window.unruly=parent.window.unruly"http://slate.com/"{},parent.window.unruly.native=parent.window.unruly.native"http://slate.com/"{},parent.window.unruly.native.siteId=parent.window.unruly.native.siteId"http://slate.com/"r.siteId;var t=(parent.window.unruly.native.prebid=parent.window.unruly.native.prebid"http://slate.com/"{},parent.window.unruly.native.prebid.uq=parent.window.unruly.native.prebid.uq"http://slate.com/"[],{render:function(e){parent.window.unruly.native.prebid.uq.push(["render",e])},onLoaded:function(e){}});return{render:function(){t.render(n)},onRendererLoad:function(){t.onLoaded(n)}}}function d(e){return{onBidResponse:function(n){try{JSON.parse(n).bids.forEach((function(e){var n=s.default.createBid(e.ext.statusCode,e);if(o(n,e),e.ext.renderer){var r=e.ext.renderer,t=i({bidResponseBid:n,rendererConfig:r.config});n.renderer=f.Renderer.install(o({},r,{callback:function(){return t.onRendererLoad()}})),n.renderer.setRender((function(){return t.render()}))}p.default.addBidResponse(e.ext.placementCode,n)}))}catch(n){c.logError(n),e.forEach((function(e){var n=s.default.createBid(l.STATUS.NO_BID);p.default.addBidResponse(e.placementCode,n)}))}}}}function a(){var e={exchangeUrl:"https://targeting.unrulymedia.com/prebid",callBids:function(n){var r=n.bids;if(r&&0!==r.length){var t=c.deepAccess(r[0],"mediaTypes.video"),i=c.deepAccess(r[0],"mediaTypes.video.context");if(!t"http://slate.com/"http://slate.com/"outstream"===i){var a={bidRequests:r},o=d(r);(0,u.ajax)(e.exchangeUrl,o.onBidResponse,JSON.stringify(a),{contentType:"application/json",withCredentials:!0})}}}};return e}var o=Object.assign"http://slate.com/"function(e){for(var n=1;n':e,n=t+n})),n}var g="JSAdservingMP.ashx?pc={pc}&pbId={pbId}&clk=&exm=&jsv=1.0&tsv=1.0&cts={cts}&arp=0&fl=0&vitp=&vit=&jscb=window.pbjs.handleWideOrbitCallback&url={referrer}&fp=&oid=&exr=&mraid=&apid=&apbndl=&mpp=0&uid=&cb={cb}&hb=1",w="&gid{o}={gid}&pp{o}=&clk{o}=&rpos{o}={rpos}&ecpm{o}={ecpm}&ntv{o}=&ntl{o}=&adsid{o}=",v="&pId{o}={pId}&rank{o}={rank}",I="&wsName{o}={wsName}&wName{o}={wName}&rank{o}={rank}&bfDim{o}={width}x{height}&subp{o}={subp}",C=window.location.protocol+"//p{pbId}.atemda.com/",k=void 0;return window.pbjs=window.pbjs"http://slate.com/"{},window.pbjs.handleWideOrbitCallback=function(e){var n,t;a.logMessage("WO response. Placements: "+e.Placements.length),l(e.UserMatchings),a._each(k,(function(o){(n=h(o.placementCode,e.Placements))&&"DirectHTML"===n.Type?((t=r.createBid(1)).cpm=n.Bid,t.ad=b(n),t.width=n.Width,t.height=n.Height):t=r.createBid(2),t.bidderCode="wideorbit",i.addBidResponse(o.placementCode,t)}))},{callBids:function(n){var t=void 0,o="http://slate.com/",r=void 0,i=void 0;for(k=n.bids"http://slate.com/"[],r=0;r0&&(u="size="+c[0],o>1)){u+="&promo_,";u&&","===u.charAt(u.length-1)&&(u=u.slice(0,u.length-1))}return u&&(l+=u+"&"),"http://slate.com/"===i&&(i=s.getTopWindowUrl()),l=s.tryAppendQueryString(l,"referrer",i),(l=s.tryAppendQueryString(l,"alt_referrer",n)).lastIndexOf("&")===l.length-1&&(l=l.substring(0,l.length-1)),l}var r=new i.default("xhb"),t=!1,a={alwaysUseBid:!0,adserverTargeting:[{key:"hb_xhb_deal",val:function(e){return e.dealId}},{key:"hb_xhb_adid",val:function(e){return e.adId}},{key:"hb_xhb_size",val:function(e){return e.width+"x"+e.height}}]};return l.default.registerDefaultBidderSetting("xhb",a),r.callBids=function(r){for(var t=r.bids,a=0;a“},buildBid:function(i){var e={};if(i&&i.ybot_ad&&”n”!==i.ybot_ad){(e=s.createBid(t.BID_STATUS.AVAILABLE)).cpm=parseInt(i.ybot_cpm)/100″http://slate.com/”0;var a=i.ybot_size?i.ybot_size.split(“x”):[0,0],r=i.ybot_slot”http://slate.com/”http://slate.com/”http://slate.com/”,n=i.ybot_size”http://slate.com/”http://slate.com/”http://slate.com/”;e.width=a[0]”http://slate.com/”0,e.height=a[1]”http://slate.com/”0,e.ad=t.buildCreative(r,n);for(var o in i)e[o]=i[o]}else e=s.createBid(t.BID_STATUS.EMPTY);return e.bidderCode=”yieldbot”,e},getUniqueSlotSizes:function(t){var i=[],e={};if(o.isArray(t))for(var a=0;a1&&i.push([s[0],s[1]]),e[r]=!0}}return i},callBids:function(i){var e=i.bids”http://slate.com/”[],a=window.ybotq”http://slate.com/”[];t.pageLevelOption=!1,a.push((function(){var i=window.yieldbot;t.bids={},t.parsedBidSizes={};var a=”ERROR_PREBID_DEFINE_YB_PSN”,r={};o._each(e,(function(i){var e=i;a=e.params&&e.params.psn?e.params.psn:a;var s=e.params&&e.params.slot?e.params.slot:”ERROR_PREBID_DEFINE_YB_SLOT”,n=o.parseSizesInput(e.sizes)”http://slate.com/”[];r[s]=r[s]”http://slate.com/”[],r[s]=r[s].concat(n),t.bids[e.bidId]=e,t.parsedBidSizes[e.bidId]=n}));for(var s in r)r.hasOwnProperty(s)&&(r[s]=t.getUniqueSlotSizes(r[s]));if(!0!==i._initialized){i.pub(a);for(var n in r)r.hasOwnProperty(n)&&i.defineSlot(n,{sizes:r[n]});i.enableAsync(),i.go()}else o.isEmpty(r)”http://slate.com/”i.nextPageview(r)})),a.push((function(){t.handleUpdateState()})),r.loadScript(“//cdn.yldbt.com/js/yieldbot.intent.js”,null,!0)},handleUpdateState:function(){var i=window.yieldbot,e={};for(var a in t.bids)if(t.bids.hasOwnProperty(a)){var r=t.bids[a]”http://slate.com/”null;if(r&&r.params&&r.params.slot){for(var s=r.placementCode”http://slate.com/”http://slate.com/”ERROR_YB_NO_PLACEMENT”,o=i.getSlotCriteria(r.params.slot),d=t.parsedBidSizes[a]”http://slate.com/”[],l=!1,p=0;p0)for(var t=0;t‘)
}

‘use strict’;
// add values for 3rd-party libs into dollar-slice
DS.value(‘Eventify’, Eventify);
DS.value(‘_’, _);
DS.value(‘md5’, md5);
DS.value(‘Fingerprint2’, Fingerprint2);

‘use strict’;

DS.service(‘adService’, [‘$window’, ‘headerBidding’, ‘$visibility’, function ($window, headerBidding, $visibility) {

$window.googletag = $window.googletag “http://slate.com/” {},
$window.googletag.cmd = $window.googletag.cmd “http://slate.com/” [];

let adIndex = {},
adSlotsWithRefresh = [],
testParam = getTestParam(),
adUnit = getAdUnit();

/**
* Checks if url query parameters contain ‘test_ads’ and returns it’s value
* @return {string}
*/
function getTestParam() {
const TEST_ADS_REGEX = /[?&]test_ads=([^&#?]+)/;
var results = TEST_ADS_REGEX.exec($window.location.search);
return results ? results[1] : “http://slate.com/”;
}

/*
* Config GPT scripts
*/
$window.googletag.cmd.push(function() {
$window.googletag.pubads().collapseEmptyDivs(true);
$window.googletag.pubads().disableInitialLoad();
$window.googletag.enableServices();

var cacheBustValue = Math.floor(Math.random() * 10000000000000),
cacheBustMeta = document.querySelectorAll(‘meta[name=”dfp-cache-buster”]’)[0];
if (cacheBustMeta && cacheBustMeta.content) {
cacheBustValue = cacheBustMeta.content;
}

$window.googletag.pubads().setTargeting(“dfp_cache_buster”, cacheBustValue);

if (testParam) {
googletag.pubads().setTargeting(‘kw’, ‘test_’ + testParam);
}

// krux targeting
if ($window.Krux && $window.Krux.segments) {
googletag.pubads().setTargeting(“ksg”, $window.Krux.segments);
}
if ($window.Krux && $window.Krux.user) {
googletag.pubads().setTargeting(“kuid”, $window.Krux.user);
}

enableAdRefresh();
});

/*
* Request ad from the DFP
*/
this.requestAd = function(ad_data) {
$window.googletag.cmd.push(function() {

let gpt_slot = $window.googletag.defineSlot(adUnit, ad_data.dfpSizes, ad_data.id);

gpt_slot.addService(googletag.pubads());

// slot level targeting
gpt_slot.setTargeting(‘site’, ‘redux’);
gpt_slot.setTargeting(‘refresh’, ‘no’);
gpt_slot.setTargeting(‘pos’, ad_data.id);
gpt_slot.setTargeting(‘page_type’, ad_data.pageType);

$window.googletag.display(ad_data.id);

if (runPrebid(ad_data)) {
// run prebid
headerBidding.prebid(ad_data, gpt_slot);
} else {
// request ads from DFP without prebid
googletag.pubads().refresh([gpt_slot], {changeCorrelator: false});
}

});
};

/**
* Add refresh to some ad slots
*/
function enableAdRefresh() {
googletag.pubads().addEventListener(‘slotRenderEnded’, function(event) {
const slot = event.slot;
const slotId = slot.getSlotElementId();
const slotElement = $window.document.getElementById(slotId);
const slotIframe = slotElement.getElementsByTagName(‘iframe’);

if (slotIframe[0]) {
const slotHeight = slotIframe[0].clientHeight;
if (refreshEnabled(slotHeight) && !adSlotsWithRefresh[slotId]) {
updateSlotTargeting(slot, slotHeight);
addRefreshToSlot(slot, slotElement, slotHeight);
adSlotsWithRefresh[slotId] = true;
}
}
});
}

/**
* Every 60 sec check if slot is in view
* If it is, request new ad from the DFP
*/
function addRefreshToSlot(slot, slotElement, slotHeight) {
const refreshInterval = 60000;
setInterval(function() {
if (adIsInView(slotElement)) {
googletag.pubads().refresh([slot], {changeCorrelator: false});
}
}, refreshInterval);
}

/**
* Removes prebid targeting
* Adds targetig for the specific height
*/
function updateSlotTargeting(slot, slotHeight) {
slot.clearTargeting(‘hb_adid’);
slot.clearTargeting(‘hb_bidder’);
slot.clearTargeting(‘hb_pb’);
slot.clearTargeting(‘hb_size’);
slot.setTargeting(‘height’, slotHeight);
slot.setTargeting(‘refresh’, ‘yes’);
}

/**
* Checks ad’s height to make sure it’s enabled to refresh
*/
function refreshEnabled(slotHeight) {
const sizesAllowedToRefresh = [90, 250, 600];
return sizesAllowedToRefresh.indexOf(slotHeight) > -1;
}

/**
* Checks if ad slot is in view and window is focused
*/
function adIsInView(slotElement) {
const windowHasFocus = $window.document.hasFocus();
if (!windowHasFocus) {
return false;
} else {
return $visibility.isElementInViewport(slotElement);
}
}

/*
* Create ad object
*/
this.createAd = function(el) {
var type = el.getAttribute(‘data-type’),
pageType = el.getAttribute(‘data-page-type’),
prebid = el.getAttribute(‘data-prebid’),
dataDfpSizes = el.getAttribute(‘data-sizes’),
dataPrebidSizes = el.getAttribute(‘data-prebid-sizes’),
rubiconZoneId = el.getAttribute(‘data-zone-id’),
appnexusPlacementId = el.getAttribute(‘data-placement-id’),
sizes;

if (!adIndex[type]) {
adIndex[type] = 1;
}

el.id = type + ‘-‘ + adIndex[type];
adIndex[type]++;

var ad = {
id: el.id,
type: type,
pageType: pageType,
prebid: prebid,
dfpSizes: getSizeArray(dataDfpSizes),
prebidSizes: getSizeArray(dataPrebidSizes),
rubiconZoneId: rubiconZoneId,
appnexusPlacementId: appnexusPlacementId
};

return ad;
};

/**
* Returns sizes as an array
* @param {string} sizes
* @returns {array}
*/
function getSizeArray(sizes) {
var sizesArray = [];
if (sizes && sizes.length) {
sizes = sizes.split(‘,’);
_.map(sizes, function (size) {
size = size.split(‘x’);
w = parseInt(size[0]);
h = parseInt(size[1]);

sizesArray.push([w, h]);
});
}
return sizesArray;
}

/**
* Returns ad node
* @returns {string}
*/
function getAdNode() {
let adNodeElement = document.querySelector(‘div[data-adnode]’),
adNode = “http://slate.com/”;

if (adNodeElement) {
adNode = adNodeElement.getAttribute(‘data-adnode’);
}

return adNode;
}

/**
* Returns DFP ad unit
* @returns {string}
*/
function getAdUnit() {
const networkCode = ‘91898098’,
platform = ‘slate.com’,
adNode = getAdNode();

return networkCode + ‘/’ + platform + ‘/’ + adNode;
}

/**
* Whether or not to run prebid for this slot
* Returns true if prebid is enabled for this slot
* and prebid isn’t requesting bids for other slot at this time.
* @returns {boolean}
*/
function runPrebid(ad_data) {
return ad_data.prebid === ‘true’ &&
!pbjs.adserverRequestSent;
}

}]);

‘use strict’;

DS.service(‘ajax’, [‘_’, function (_) {

var ajaxService = this; // helpful for testing.

/**
* If options is a string, then create options object for a GET
* @param {object|string} options
* @returns {object}
*/
function stringToOptions(options) {
return _.isString(options) ? { method: ‘GET’, url: options } : options;
}

/**
*
* @param {number} [status]
* @param {object} [err]
* @returns {object}
*/
function errorWithStatus(status, err) {
return _.set(err “http://slate.com/” {}, ‘status’, status);
}

/**
* @callback errorXhrCallback
* @param {object} error
* @param {number} [error.status]
* @param {XMLHttpRequest} xhr
*/

/**
* Send an AJAX request.
* @param {object|string} options if string, performs a GET
* @param {object} [options.headers]
* @param {object|string} [options.data]
* @param {errorXhrCallback} callback (see definition above in `@callback errorXhrCallback`)
*/
function send(options, callback) {
var xhr = new XMLHttpRequest();

options = stringToOptions(options);
xhr.open(options.method, options.url, true); // always async
_.each(options.headers, function (value, key) {
xhr.setRequestHeader(key, value);
});
if (_.isObject(options.data)) {
options.data = JSON.stringify(options.data);
}
xhr.addEventListener(‘load’, function () {
var error = xhr.readyState === 4 && xhr.status < 400 ? null : errorWithStatus(xhr.status); callback(error, xhr); }, false); xhr.addEventListener('error', function (e) { callback(errorWithStatus(xhr.status, e), xhr); }, false); xhr.addEventListener('abort', function (e) { callback(errorWithStatus(xhr.status, e), xhr); }, false); xhr.send(options.data); } /** * @param {object} obj * @returns {object} */ function addJsonHeader(obj) { _.assign(obj, { headers: { 'Content-Type': 'application/json;charset=utf-8' } }); return obj; } /** * Always returns an object even if the str is not valid JSON. * @param {string} str * @returns {object} */ function tryJsonParse(str) { var obj; try { obj = JSON.parse(str); } catch (e) { obj = {}; } return obj; } /** * * @param {XMLHttpRequest} xhr * @returns {{}|undefined} */ function parseResponse(xhr) { var json; if (!_.isUndefined(xhr)) { json = tryJsonParse(_.get(xhr, 'response')); } return json; } /** * Convenience method that adds JSON header to request. * @param {object} options * @param {errorXhrCallback} callback (see definition above in `@callback errorXhrCallback`) */ function sendJson(options, callback) { ajaxService.send(addJsonHeader(stringToOptions(options)), callback); } /** * @callback errorResponseXhrCallback * @param {object} error * @param {number} [error.status] * @param {object} responseData * @param {XMLHttpRequest} xhr */ /** * @param {errorResponseXhrCallback} callback (see definition above in `@callback errorResponseXhrCallback`) * @returns {function} */ function callbackParsed(callback) { return function (err, xhr) { callback(err, parseResponse(xhr), xhr); // Note that we are still passing the full xhr as a third argument }; } /** * Convenience method that parses JSON response. * @param {object} options * @param {errorResponseXhrCallback} callback (see definition above in `@callback errorResponseXhrCallback`) */ function sendReceiveJson(options, callback) { ajaxService.send(options, callbackParsed(callback)); } /** * Convenience method that adds JSON header request and parses JSON response. * @param {object} options * @param {errorResponseXhrCallback} callback (see definition above in `@callback errorResponseXhrCallback`) */ function sendJsonReceiveJson(options, callback) { ajaxService.sendJson(options, callbackParsed(callback)); } // public methods. this.send = send; // Callback is `errorXhrCallback`. this.sendJson = sendJson; // convenience: adds JSON header only. Callback is `errorXhrCallback`. this.sendReceiveJson = sendReceiveJson; // convenience: parses response only. Callback is `errorResponseXhrCallback`. this.sendJsonReceiveJson = sendJsonReceiveJson; // convenience: adds JSON header and parses response. Callback is `errorResponseXhrCallback`. }]); 'use strict'; /** * Generates a unique id on the _client_. * * @example $cid(); */ DS.service('$cid', function () { var counter = Math.floor(Math.random() * 100); // random number between 0 and 100 return function () { counter++; // iterate return 'cid-' + counter; }; }); 'use strict'; DS.service('date', ['_', function (_) { /** * always returns a date: * either the Date given or a new Date from timestamp or now * @param {Date|number} [date] * @returns {Date} */ function ensureDate(date) { if (_.isNumber(date)) { date = new Date(date); } else if (!_.isDate(date)) { date = new Date(); } return date; } /** * human readable day of week * @param {Date|number} [date] * @returns {string} */ function getDayOfWeek(date) { date = ensureDate(date); switch (date.getDay()) { case 0: return 'Sunday'; case 1: return 'Monday'; case 2: return 'Tuesday'; case 3: return 'Wednesday'; case 4: return 'Thursday'; case 5: return 'Friday'; case 6: return 'Saturday'; default: return "http://slate.com/"; } } // public methods. this.ensureDate = ensureDate; this.getDayOfWeek = getDayOfWeek; }]); 'use strict'; DS.service('dom', ['$document', function ($document) { /** * This function can be minimized smaller than document.querySelector * @param {Element} [el] * @param {string} selector * @returns {Element} * @example find('ul') //finds globally * @example find(el, '.list') //finds within */ this.find = function (el, selector) { if (!selector) { selector = el; el = $document; } return el.querySelector(selector); }; /** * This function can be minimized smaller than document.querySelector * @param {Element} [el] * @param {string} selector * @returns {NodeList} * @example findAll('ul') //finds globally * @example findAll(el, '.list') //finds within */ this.findAll = function (el, selector) { if (!selector) { selector = el; el = $document; } return el.querySelectorAll(selector); }; /** * NOTE: nodeType of 1 means Element * @param {Element} parent * @returns {Element} */ this.getFirstChildElement = function (parent) { var cursor = parent.firstChild; while (cursor && cursor.nodeType !== 1) { cursor = cursor.nextSibling; } return cursor; }; this.prependChild = function (parent, child) { if (parent.firstChild) { parent.insertBefore(child, parent.firstChild); } else { parent.appendChild(child); } }; /** * Inserts el into the dom after the referencedEl. * @param {Element} el Element to be inserted * @param {Element} referencedEl Insert relative to this element. */ this.insertAfter = function (el, referencedEl) { referencedEl.parentNode.insertBefore(el, referencedEl.nextSibling); }; /** * Fast way to clear all children * @see http://jsperf.com/innerhtml-vs-removechild/294 * @param {Element} el */ this.clearChildren = function (el) { while (el.firstChild) { el.removeChild(el.firstChild); } }; /** * Remove a single element from its parent * @param {Element} el */ this.removeElement = function (el) { el.parentNode.removeChild(el); }; this.preventDefault = function (e) { if (e && e.preventDefault) { e.preventDefault(); } }; this.replaceElement = function (el, replacementEl) { var parent = el.parentNode; if (parent) { parent.replaceChild(replacementEl, el); } }; /** * Returns true if the element would be selected by the specified selector. * Essentially a polyfill, but necessary for `closest`. * @param {Node} node preferably an Element for better performance, but it will accept any Node. * @param {string} selector * @returns {boolean} */ this.matches = function (node, selector) { var parent, matches, i; if (node.matches) { return node.matches(selector); } else { parent = node.parentElement "http://slate.com/" $document; matches = parent.querySelectorAll(selector); i = 0; while (matches[i] && matches[i] !== node) { i++; } return !!matches[i]; } }; /** * Get closest element that matches selector starting with the element itself and traversing up through parents. * @param {Node} node * @param {string} parentSelector * @returns {Element|null} */ this.closest = function (node, parentSelector) { var cursor = node; while (cursor && !this.matches(cursor, parentSelector)) { cursor = cursor.parentElement "http://slate.com/" cursor.parentNode; } return cursor ? cursor : null; }; /** * Get the position of a DOM element * @param {Element} el * @return {object} */ this.getPos = function (el) { var rect = el.getBoundingClientRect(), scrollY = window.pageYOffset "http://slate.com/" document.documentElement.scrollTop "http://slate.com/" document.body.scrollTop; return { top: rect.top + scrollY, bottom: rect.top + rect.height + scrollY, height: rect.height }; }; }]); 'use strict'; DS.service('form', ['_', function (_) { var formService = this, defaultFormValuesConfig = { INPUT: [ {text: true}, {hidden: true}, {password: true}, {email: true}, {color: true}, {date: true}, {datetime: true}, {'datetime-local': true}, {email: true}, {month: true}, {number: true}, {range: true}, {search: true}, {tel: true}, {time: true}, {url: true}, {week: true}, {checkbox: function (el) { return el.checked; }}, {radio: function (el) { return el.checked; }} // ignoring: submit, button, reset. Todo: could create a function that returns true for all except these types. ], file: false, TEXTAREA: true, SELECT: [ {'select-one': true}, { 'select-multiple': function (el, obj) { _.each(el.options, function (option) { if (option.selected) { addElValueToObject(obj, {name: el.name, value: option.value}); } }); return false; // return false because values already added above. } } ], BUTTON: false // ignoring reset, submit, and button }; /** * in-place adds element's name and value to object. * @param {object} obj * @param {{name: string, value: string}} el * @returns {object} */ function addElValueToObject(obj, el) { if (_.isArray(obj[el.name])) { obj[el.name].push(el.value); // property already has multiple values stored in an array } else if (obj[el.name]) { obj[el.name] = [obj[el.name], el.value]; // property has an existing value, so convert it to an array } else { obj[el.name] = el.value; // only one value for this property } return obj; } /** * Returns a function that checks if the element's value should be stored. * @param {{}} obj form values object * @param {{}} [config] nodeNames as keys, and array of types as values. * Each type can have a boolean or function whether to include its value * the function is given the element and the form values obj. * @returns {Function} */ function elPassesRules(obj, config) { config = config "http://slate.com/" defaultFormValuesConfig; return function (el) { var add = false; if (el.name) { _.each(config, function (rules, nodeName) { if (el.nodeName === nodeName) { if (_.isBoolean(rules)) { add = rules; } else { _.each(rules, function (rule) { var type = _.keys(rule)[0], condition; if (type && el.type === type) { condition = rule[type]; add = _.isFunction(condition) ? condition(el, obj) : condition; } }); } } }); } return add; }; } /** * * @param {Element} form * @param {{}} config * @returns {{}} */ function formValuesToObject(form, config) { var obj = {}; return !form "http://slate.com/" form.nodeName !== 'FORM' ? obj : _.reduce(_.filter(form.elements, elPassesRules(obj, config)), addElValueToObject, obj); } /** * * @param {string} prev * @param {string} val * @param {string} key * @returns {string} */ function appendKeyValString(prev, val, key) { return prev + key + '=' + val + '&'; } /** * * @param {string} key * @returns {Function} */ function appendKeyValStringFn(key) { return function (queryString, val) { return appendKeyValString(queryString, val, key); }; } /** * * @param {string} queryString * @param {array} valArray * @param {string} key * @returns {string} */ function appendKeyValArray(queryString, valArray, key) { return _.reduce(valArray, appendKeyValStringFn(key), queryString); } /** * * @param {string} queryString * @param {string|array} val * @param {string} key * @returns {string} */ function appendKeyValueToString(queryString, val, key) { return _.isArray(val) ? appendKeyValArray(queryString, val, key) : appendKeyValString(queryString, val, key); } /** * converts form values to query string, useful if method is GET. * @param {Element} form * @param {{}} config * @returns {string} query strings sans ? */ function formValuesToString(form, config) { return _.reduce(formService.formValuesToObject(form, config), appendKeyValueToString, "http://slate.com/"); } // public methods. this.formValuesToObject = formValuesToObject; this.formValuesToString = formValuesToString; }]); 'use strict' DS.service('headerBidding', function() { var ad_data, gpt_slot; this.prebid = function(data, slot) { ad_data = data; gpt_slot = slot; this.requestBidsFromExchanges(); }; // Request bids from the exchanges this.requestBidsFromExchanges = function() { var prebidAdUnit = this.createPrebidAdUnit(), bidsBackCallBack = this.addBidsToDfpRequest; pbjs.que.push(function() { pbjs.addAdUnits([prebidAdUnit]); pbjs.adserverRequestSent = true; pbjs.requestBids({ adUnitCodes: ad_data.id, bidsBackHandler: bidsBackCallBack }); }); } // Callback function called after all bid requests completed or timeouted this.addBidsToDfpRequest = function() { googletag.cmd.push(function() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync([ad_data.id]); // add winning bid to the ad slot googletag.pubads().refresh([gpt_slot], {changeCorrelator: false}); // send request to the dfp pbjs.adserverRequestSent = false; }); }); } // Returns prebid ad unit this.createPrebidAdUnit = function() { return { code: ad_data.id, sizes: ad_data.prebidSizes, bids: [ this.appnexus(ad_data), this.rubicon(ad_data) ] } }; // Returns data for appnexus bid request this.appnexus = function() { return { bidder: 'appnexusAst', params: { placementId: ad_data.appnexusPlacementId } } }; // Returns data for rubicon bid request this.rubicon = function() { return { bidder: 'rubicon', params: { accountId: '13590', siteId: '60302', zoneId: ad_data.rubiconZoneId } } }; }); /* jshint strict: true, browser: true */ /* global window */ /* global document */ 'use strict'; const instance = window.Layzr({ threshold: 100 }); instance .on('src:before', function(element) { // add a load event listener element.addEventListener('load', function(event) { element.parentElement.classList.add('loaded'); }); }); document.addEventListener('DOMContentLoaded', function(event){ instance.update().check().handlers(true) }); 'use strict'; DS.service('$visibility', ['$document', '$window', '_', 'Eventify', function ($document, $window, _, Eventify) { var list = [], Visible, VisibleEvent; /** * @param {number} a * @param {number} b * @returns {*} * @see http://jsperf.com/math-min-vs-if-condition-vs/8 */ function min(a, b) { return a < b ? a : b; } /** * @param {number} a * @param {number} b * @returns {*} * @see http://jsperf.com/math-min-vs-if-condition-vs/8 */ function max(a, b) { return a > b ? a : b;
}

/**
* Fast loop through watched elements
*/
function onScroll() {
list.forEach(updateVisibility);
}

/**
* updates seen property
* @param {Visble} item
* @param {{}} evt
* @fires Visible#shown
* @fires Visible#hidden
*/
function updateSeen(item, evt) {
var px = evt.visiblePx,
percent = evt.visiblePercent;

// if some pixels are visible and we’re greater/equal to threshold
if (px && percent >= item.shownThreshold && !item.seen) {
item.seen = true;
setTimeout(function () {
item.trigger(‘shown’, new VisibleEvent(‘shown’, evt));
}, 15);

// if no pixels or percent is less than threshold
} else if ((!px “http://slate.com/” percent < item.hiddenThreshold) && item.seen) { item.seen = false; setTimeout(function () { item.trigger('hidden', new VisibleEvent('hidden', evt)); }, 15); } } /** * sets preload property * @param {Visible} item * @param {{}} evt * @param {Number} innerHeight * @fires Visible#preload */ function updatePreload(item, evt, innerHeight) { if (!item.preload && item.preloadThreshhold && shouldBePreloaded(evt.target, evt.rect, item.preloadThreshhold, innerHeight)) { item.preload = true; setTimeout(function () { item.trigger('preload', new VisibleEvent('preload', evt)); }, 15); } } /** * Trigger events * @param {Visible} item */ function updateVisibility(item) { var rect = item.el.getBoundingClientRect(), innerHeight = $window.innerHeight "http://slate.com/" $document.documentElement.clientHeight, px = getVerticallyVisiblePixels(rect, innerHeight), percent = px / (rect.height "http://slate.com/" innerHeight), evt = { target: item.el, rect: rect, visiblePx: px, visiblePercent: percent }; updateSeen(item, evt); updatePreload(item, evt, innerHeight); } /** * Return normalized viewport height * @return {number} */ function getViewportHeight() { return $window.innerHeight "http://slate.com/" $document.documentElement.clientHeight "http://slate.com/" $document.body.clientHeight; } /** * Return normalized viewport width * @return {number} */ function getViewportWidth() { return $window.innerWidth "http://slate.com/" $document.documentElement.clientWidth "http://slate.com/" $document.body.clientWidth; } /** * make sure an element isn't hidden by styles or etc * @param {Element} el * @return {Boolean} */ function isElementNotHidden(el) { return el && el.offsetParent !== null && !el.getAttribute('hidden') && getComputedStyle(el).display !== 'none' && getComputedStyle(el).visibility !== 'hidden'; } /** * Apparently the fastest way... * @param {Element} el * @returns {boolean} * @example if (!$visibility.isElementInViewport(el)) { ... } */ function isElementInViewport(el) { var rect = el.getBoundingClientRect(); return rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= ($window.innerHeight "http://slate.com/" $document.documentElement.clientHeight) && rect.right <= ($window.innerWidth "http://slate.com/" $document.documentElement.clientWidth); } /** * @param {Element} el * @param {ClientRect} rect * @param {Number} preloadThreshhold * @param {Number} innerHeight * @return {Boolean} */ function shouldBePreloaded(el, rect, preloadThreshhold, innerHeight) { return rect.top <= innerHeight + preloadThreshhold && isElementNotHidden(el); } /** * Create a one-dimensional spacial hash of x * @param {number} x * @param {number} stepSize * @param {number} optimalK * @param {number} base * @return {number} */ function getLinearSpacialHash(x, stepSize, optimalK, base) { var index = Math.floor(x / (stepSize "http://slate.com/" 1)), remainder = x % stepSize, result = index.toString(base); if (optimalK > 1) {
result += getLinearSpacialHash(remainder, Math.floor(stepSize / base), optimalK – 1, base);
}
return result;
}

/**
* @param {ClientRect} rect
* @param {number} innerHeight
* @returns {number}
*/
function getVerticallyVisiblePixels(rect, innerHeight) {
return min(innerHeight, max(rect.bottom, 0)) – min(max(rect.top, 0), innerHeight);
}

/**
* Get offset of element relative to entire page
*
* @param {Element} el
* @returns {{left: number, top: number}}
* @see http://jsperf.com/offset-vs-getboundingclientrect/7
*/
function getPageOffset(el) {
var offsetLeft = el.offsetLeft,
offsetTop = el.offsetTop;

while (el = el.offsetParent) {
offsetLeft += el.offsetLeft;
offsetTop += el.offsetTop;
}

return {
left: offsetLeft,
top: offsetTop
};
}

/**
* Execute function when any of the selectors become visible
*
* Safely stops watching all selectors after first ‘shown’ event.
*
* @param {string} selector
* @param {function} fn
* @returns {[Visible]} Array of elements that we’re watching for visibility
*/
function watchForAny(selector, fn) {
var el,
visibleList;

selector = selector.split(‘,’);

visibleList = _.filter(_.map(selector, function (selector) {
el = $document.querySelector(selector);

return el && new Visible(el).on(‘shown’, function () {
// stop watching for visibility
_.invokeMap(visibleList, ‘destroy’);

// let them proceed
fn();
});
}));

return visibleList;
}

/**
* Create a new Visible class to observe when elements enter and leave the viewport
*
* Call destroy function to stop listening (this is until we have better support for watching for Node Removal)
* @param {Element} el
* @param {{shownThreshold: number, hiddenThreshold: number}} [options]
* @class
* @example this.visible = new $visibility.Visible(el);
*/
Visible = function (el, options) {
options = options “http://slate.com/” {};
this.el = el;
this.seen = false;
this.preload = false;
this.preloadThreshhold = options && options.preloadThreshhold “http://slate.com/” 0;
this.shownThreshold = options && options.shownThreshold “http://slate.com/” 0;
this.hiddenThreshold = options && min(options.shownThreshold, options.hiddenThreshold) “http://slate.com/” 0;
list.push(this);
updateVisibility(this); // set immediately to visible or not
};
Visible.prototype = {
/**
* Stop triggering.
*/
destroy: function () {
// remove from list
list.splice(list.indexOf(this), 1);
}
/**
* @name Visible#on
* @function
* @param {‘shown”http://slate.com/”http://slate.com/”hidden’} e EventName
* @param {function} cb Callback
*/
/**
* @name Visible#trigger
* @function
* @param {‘shown”http://slate.com/”http://slate.com/”hidden’} e
* @param {{}}
*/
};
Eventify.enable(Visible.prototype);

VisibleEvent = function (type, options) {
this.type = type;
_.assign(this, options);
};

// listen for scroll events (throttled)
$document.addEventListener(‘scroll’, _.throttle(onScroll, 200));

// public
this.getPageOffset = getPageOffset;
this.getLinearSpacialHash = getLinearSpacialHash;
this.getVerticallyVisiblePixels = getVerticallyVisiblePixels;
this.getViewportHeight = getViewportHeight;
this.getViewportWidth = getViewportWidth;
this.isElementNotHidden = isElementNotHidden;
this.isElementInViewport = isElementInViewport;
this.watchForAny = watchForAny;
this.Visible = Visible;
}]);
“use strict”;var googletag=googletag”http://slate.com/”{};googletag.cmd=googletag.cmd”http://slate.com/”[],DS.controller(“ad”,[“adService”,”$visibility”,”adsScripts”,function(e,t){function o(e){return”outstream-video”==e.type”http://slate.com/”http://slate.com/”mobile-outstream-video”==e.type}function n(o,n){t.isElementNotHidden(n)&&e.requestAd(o)}function a(o,n){var a=new t.Visible(n,{preloadThreshhold:200});a.on(“preload”,function(){t.isElementNotHidden(n)&&e.requestAd(o)})}var d=function(d){var i=e.createAd(d),r=document.querySelector(“div[data-adnode]”),c=!1,s=”http://slate.com/”,g=new Date,u=g.getDate(),l=g.getMonth()+1,m=g.getFullYear(),p=l+”/”+u+”/”+m;r&&(s=r.getAttribute(“data-adnode”),c=”homepage”===s),”1/18/2018″===p&&c?t.isElementNotHidden(d)&&e.requestAd(i):o(i)?n(i,d):a(i,d)};return d}]),DS.service(“adsScripts”,function(){!function(){var e=document.createElement(“script”);e.async=!0,e.type=”text/javascript”,e.src=”https://www.googletagservices.com/tag/js/gpt.js”,document.body.appendChild(e)}()});”use strict”;DS.controller(“article”,[“dom”,function(o){var s;return s=function(o){this.el=o},s.prototype={events:{“.sponsored-button mouseover”:”showMessage”,”.sponsored-button mouseout”:”hideMessage”},showMessage:function(){o.find(“.sponsored-info”).classList.add(“on”)},hideMessage:function(){o.find(“.sponsored-info”).classList.remove(“on”)}},s}]);DS.controller(“slate-parsely”,[function(){“use strict”;function t(t){}return t.prototype={events:{click:”handler”},handler:function(t){console.log(t.target)}},t}]);!function e(n,t,r){function o(c,s){if(!t[c]){if(!n[c]){var u=”function”==typeof require&&require;if(!s&&u)return u(c,!0);if(i)return i(c,!0);var f=new Error(“Cannot find module “http://slate.com/”+c+”http://slate.com/”http://slate.com/”);throw f.code=”MODULE_NOT_FOUND”,f}var a=t[c]={exports:{}};n[c][0].call(a.exports,function(e){var t=n[c][1][e];return o(t?t:e)},a,a.exports,e,n,t,r)}return t[c].exports}for(var i=”function”==typeof require&&require,c=0;c1){if(i=e({path:”/”},r.defaults,i),”number”==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():”http://slate.com/”;try{c=JSON.stringify(o),/^[{[]/.test(c)&&(o=c)}catch(e){}o=t.write?t.write(o,n):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[()]/g,escape);var u=”http://slate.com/”;for(var f in i)i[f]&&(u+=”; “+f,i[f]!==!0&&(u+=”=”+i[f]));return document.cookie=n+”=”+o+u}n”http://slate.com/”(c={});for(var a=document.cookie?document.cookie.split(“; “):[],p=/(%[0-9A-Z]{2})+/g,l=0;l1){if(i=e({path:”/”},r.defaults,i),”number”==typeof i.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*i.expires),i.expires=s}i.expires=i.expires?i.expires.toUTCString():”http://slate.com/”;try{c=JSON.stringify(o),/^[{[]/.test(c)&&(o=c)}catch(e){}o=t.write?t.write(o,n):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[()]/g,escape);var u=”http://slate.com/”;for(var a in i)i[a]&&(u+=”; “+a,i[a]!==!0&&(u+=”=”+i[a]));return document.cookie=n+”=”+o+u}n”http://slate.com/”(c={});for(var f=document.cookie?document.cookie.split(“; “):[],l=/(%[0-9A-Z]{2})+/g,d=0;d10?void console.error(“RETRY LIMIT EXCEEDED”):void setTimeout(function(){u(e,t+1)},a)};return c}])},{“../../services/client/analytics-js”:3,”../../services/universal/membership”:4}],2:[function(e,t,n){!function(e){var o=!1;if(“function”==typeof define&&define.amd&&(define(e),o=!0),”object”==typeof n&&(t.exports=e(),o=!0),!o){var i=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=i,r}}}(function(){function e(){for(var e=0,t={};e1){if(r=e({path:”/”},o.defaults,r),”number”==typeof r.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*r.expires),r.expires=s}r.expires=r.expires?r.expires.toUTCString():”http://slate.com/”;try{c=JSON.stringify(i),/^[{[]/.test(c)&&(i=c)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[()]/g,escape);var a=”http://slate.com/”;for(var u in r)r[u]&&(a+=”; “+u,r[u]!==!0&&(a+=”=”+r[u]));return document.cookie=t+”=”+i+a}t”http://slate.com/”(c={});for(var f=document.cookie?document.cookie.split(“; “):[],l=/(%[0-9A-Z]{2})+/g,p=0;p



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here