New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react16-advertising

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react16-advertising - npm Package Compare versions

Comparing version 3.0.2-beta.3 to 3.0.2-beta.4

2

dist/react16-advertising.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactAdvertisingR16=e(require("react")):t.ReactAdvertisingR16=e(t.React)}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e,r){"use strict";t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(e,r){e.exports=t},function(t,e,r){"use strict";t.exports=r(34)()},function(t,e,r){"use strict";t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,r){"use strict";var n=r(1);function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=o?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,e&&e.set(t,r),r}},function(t,e,r){"use strict";t.exports=r(20)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,u){try{var a=t[o](u),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var u=t.apply(e,r);function a(t){n(u,i,o,a,s,"next",t)}function s(t){n(u,i,o,a,s,"throw",t)}a(void 0)}))}}},function(t,e,r){"use strict";var n=r(22);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){"use strict";var n=r(1),i=r(23);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?i(t):e}},function(t,e,r){"use strict";function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,r){"use strict";t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";var n=r(12);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(3)),o=n(r(15)),u=i.default.shape({path:i.default.string,targeting:i.default.object,prebid:i.default.shape({debug:i.default.bool,bidderTimeout:i.default.number,enableSendAllBids:i.default.bool,bidderSequence:i.default.oneOf(["random","fixed"]),publisherDomain:i.default.string,cookieSyncDelay:i.default.number,priceGranularity:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),mediaTypePriceGranularity:i.default.shape({video:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),banner:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),native:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})])}),sizeConfig:i.default.arrayOf(i.default.shape({mediaQuery:i.default.string.isRequired,sizesSupported:i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)])),labels:i.default.arrayOf(i.default.string)}))}),sizeMappings:i.default.objectOf(i.default.arrayOf(i.default.shape({viewPortSize:i.default.arrayOf(i.default.number).isRequired,sizes:i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)])).isRequired}))),slots:i.default.arrayOf(o.default),outOfPageSlots:i.default.arrayOf(i.default.shape({id:i.default.string})),customEvents:i.default.objectOf(i.default.shape({eventMessagePrefix:i.default.string.isRequired,divIdPrefix:i.default.string}))});e.default=u},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(3)),o=i.default.shape({id:i.default.string.isRequired,path:i.default.string,collapseEmptyDiv:i.default.arrayOf(i.default.bool),targeting:i.default.object,sizes:i.default.oneOfType([i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)]),i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)]))]),sizeMappingName:i.default.string,prebid:i.default.arrayOf(i.default.shape({mediaTypes:i.default.objectOf(i.default.shape({sizes:i.default.arrayOf(i.default.arrayOf(i.default.number))})).isRequired,bids:i.default.arrayOf(i.default.shape({bidder:i.default.string.isRequired,params:i.default.object,labelAny:i.default.arrayOf(i.default.string),labelAll:i.default.arrayOf(i.default.string)})).isRequired})).isRequired});e.default=o},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(2)).default.createContext((function(){}));e.default=i},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(38)),o=n(r(2)),u=n(r(16));e.default=function(t){return function(e){return o.default.createElement(u.default.Consumer,null,(function(r){return o.default.createElement(t,(0,i.default)({},e,{activate:r}))}))}}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AdvertisingProvider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"AdvertisingSlot",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"connectToAdServer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"AdvertisingConfigPropType",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"AdvertisingSlotConfigPropType",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"logVersionInfo",{enumerable:!0,get:function(){return f.default}});var i=n(r(19)),o=n(r(37)),u=n(r(17)),a=n(r(14)),s=n(r(15)),f=n(r(39))},function(t,e,r){"use strict";var n=r(6),i=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(r(7)),u=i(r(8)),a=i(r(4)),s=i(r(5)),f=i(r(9)),c=i(r(10)),l=i(r(11)),d=n(r(2)),p=i(r(24)),h=i(r(3)),v=i(r(14)),g=i(r(16)),y=i(r(36));function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,l.default)(t);if(e){var i=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,c.default)(this,r)}}var m=function(t){(0,f.default)(i,t);var e,r,n=b(i);function i(t){var e;return(0,a.default)(this,i),(e=n.call(this,t)).initialize(),e.state={activate:e.advertising.activate.bind(e.advertising)},e}return(0,s.default)(i,[{key:"componentDidMount",value:function(){this.advertising.isConfigReady()&&this.props.active&&this.advertising.setup()}},{key:"componentDidUpdate",value:(r=(0,u.default)(o.default.mark((function t(e){var r,n,i,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.advertising){t.next=2;break}return t.abrupt("return");case 2:if(r=this.props,n=r.config,i=r.active,(u=this.advertising.isConfigReady())||!n||!i){t.next=9;break}this.advertising.setConfig(n),this.advertising.setup(),t.next=13;break;case 9:if(!u||(0,y.default)(e.config,n)){t.next=13;break}return t.next=12,this.teardown();case 12:i&&(this.initialize(),this.setState({activate:this.advertising.activate.bind(this.advertising)}),this.advertising.isConfigReady()&&this.advertising.setup());case 13:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.props.config&&this.teardown()}},{key:"teardown",value:(e=(0,u.default)(o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.advertising.teardown();case 2:this.advertising=null,this.activate=null;case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"initialize",value:function(){var t=this.props,e=t.config,r=t.plugins,n=t.onError;this.advertising=new p.default(e,r,n)}},{key:"render",value:function(){var t=this.state.activate;return d.default.createElement(g.default.Provider,{value:t},this.props.children)}}]),i}(d.Component);e.default=m,m.propTypes={active:h.default.bool,config:v.default,children:h.default.node,onError:h.default.func,plugins:h.default.arrayOf(h.default.shape({setupPrebid:h.default.func,setupGpt:h.default.func,teardownPrebid:h.default.func,teardownGpt:h.default.func}))},m.defaultProps={active:!0}},function(t,e,r){"use strict";(function(t){var e=r(0)(r(1)),n=function(t){var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),u=new x(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return j()}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var a=O(u,r);if(a){if(a===c)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=f(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===c)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,u),o}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function l(){}function d(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(E([])));g&&g!==r&&n.call(g,o)&&(h=g);var y=p.prototype=l.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function m(t,r){var i;this._invoke=function(o,u){function a(){return new r((function(i,a){!function i(o,u,a,s){var c=f(t[o],t,u);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===(0,e.default)(d)&&n.call(d,"__await")?r.resolve(d.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):r.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}(o,u,i,a)}))}return i=i?i.then(a,a):a()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=y.constructor=p,p.constructor=d,p[a]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(m.prototype),m.prototype[u]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new m(s(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},b(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}("object"===(0,e.default)(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}).call(this,r(21)(t))},function(t,e,r){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,r){"use strict";t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(25)),o=n(r(29)),u=n(r(7)),a=n(r(8)),s=n(r(4)),f=n(r(5)),c=n(r(33)),l=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};(0,s.default)(this,t),this.config=e,this.slots={},this.outOfPageSlots={},this.plugins=r,this.onError=n,this.gptSizeMappings={},this.customEventCallbacks={},this.customEventHandlers={},this.queue=[],e&&this.setDefaultConfig()}var e,r;return(0,f.default)(t,[{key:"setup",value:(r=(0,a.default)(u.default.mark((function e(){var r,n,i,o,a,s,f,c=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.executePlugins("setup"),r=this.slots,n=this.outOfPageSlots,i=this.queue,this.setupCustomEvents(),e.next=5,Promise.all([t.queueForPrebid(this.setupPrebid.bind(this),this.onError),t.queueForGPT(this.setupGpt.bind(this),this.onError)]);case 5:if(0!==i.length){e.next=7;break}return e.abrupt("return");case 7:for(o=function(t){var e=i[t],r=e.id,n=e.customEventHandlers;Object.keys(n).forEach((function(t){return c.customEventCallbacks[t]||(c.customEventCallbacks[t]={}),c.customEventCallbacks[t][r]=n[t]}))},a=0;a<i.length;a++)o(a);s=i.map((function(t){return t.id})),f=i.map((function(t){var e=t.id;return r[e]||n[e]})),t.queueForPrebid((function(){return window.pbjs.requestBids({adUnitCodes:s,bidsBackHandler:function(){window.pbjs.setTargetingForGPTAsync(s),t.queueForGPT((function(){return window.googletag.pubads().refresh(f)}),c.onError)}})}),this.onError);case 12:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"teardown",value:(e=(0,a.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.teardownCustomEvents(),e.next=3,Promise.all([t.queueForPrebid(this.teardownPrebid.bind(this),this.onError),t.queueForGPT(this.teardownGpt.bind(this),this.onError)]);case 3:this.slots={},this.gptSizeMappings={},this.queue={};case 6:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"activate",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.slots;0!==Object.values(i).length?(Object.keys(n).forEach((function(t){return r.customEventCallbacks[t]||(r.customEventCallbacks[t]={}),r.customEventCallbacks[t][e]=n[t]})),t.queueForPrebid((function(){return window.pbjs.requestBids({adUnitCodes:[e],bidsBackHandler:function(){window.pbjs.setTargetingForGPTAsync([e]),t.queueForGPT((function(){return window.googletag.pubads().refresh([i[e]])}),r.onError)}})}),this.onError)):this.queue.push({id:e,customEventHandlers:n})}},{key:"isConfigReady",value:function(){return Boolean(this.config)}},{key:"setConfig",value:function(t){this.config=t,this.setDefaultConfig()}},{key:"setupCustomEvents",value:function(){var t=this;this.config.customEvents&&Object.keys(this.config.customEvents).forEach((function(e){return t.setupCustomEvent(e,t.config.customEvents[e])}))}},{key:"setupCustomEvent",value:function(t,e){var r=e.eventMessagePrefix,n=e.divIdPrefix,i=this.customEventCallbacks;this.customEventHandlers[t]=function(e){var o=e.data;if("string"==typeof o&&o.startsWith("".concat(r))){var u="".concat(n||"").concat(o.substr(r.length)),a=i[t];if(a){var s=a[u];s&&s()}}},window.addEventListener("message",this.customEventHandlers[t])}},{key:"teardownCustomEvents",value:function(){var t=this;this.config.customEvents&&Object.keys(this.config.customEvents).forEach((function(e){return window.removeEventListener("message",t.customEventHandlers[e])}))}},{key:"defineGptSizeMappings",value:function(){if(this.config.sizeMappings)for(var t=Object.entries(this.config.sizeMappings),e=0;e<t.length;e++){for(var r=(0,o.default)(t[e],2),n=r[0],i=r[1],u=window.googletag.sizeMapping(),a=0;a<i.length;a++){var s=i[a],f=s.viewPortSize,c=s.sizes;u.addSize(f,c)}this.gptSizeMappings[n]=u.build()}}},{key:"getGptSizeMapping",value:function(t){return t&&this.gptSizeMappings[t]?this.gptSizeMappings[t]:null}},{key:"defineSlots",value:function(){var t=this;this.config.slots.forEach((function(e){var r=e.id,n=e.path,u=e.collapseEmptyDiv,a=e.targeting,s=void 0===a?{}:a,f=e.sizes,c=e.sizeMappingName,l=window.googletag.defineSlot(n||t.config.path,f,r),d=t.getGptSizeMapping(c);d&&l.defineSizeMapping(d),u&&u.length&&u.length>0&&l.setCollapseEmptyDiv.apply(l,(0,i.default)(u));for(var p=Object.entries(s),h=0;h<p.length;h++){var v=(0,o.default)(p[h],2),g=v[0],y=v[1];l.setTargeting(g,y)}l.addService(window.googletag.pubads()),t.slots[r]=l}))}},{key:"defineOutOfPageSlots",value:function(){var t=this;this.config.outOfPageSlots&&this.config.outOfPageSlots.forEach((function(e){var r=e.id,n=e.path,i=window.googletag.defineOutOfPageSlot(n||t.config.path,r);i.addService(window.googletag.pubads()),t.outOfPageSlots[r]=i}))}},{key:"displaySlots",value:function(){this.executePlugins("displaySlots"),this.config.slots.forEach((function(t){var e=t.id;window.googletag.display(e)}))}},{key:"displayOutOfPageSlots",value:function(){this.executePlugins("displayOutOfPageSlot"),this.config.outOfPageSlots&&this.config.outOfPageSlots.forEach((function(t){var e=t.id;window.googletag.display(e)}))}},{key:"setupPrebid",value:function(){this.executePlugins("setupPrebid");var t=(0,c.default)(this.config.slots);window.pbjs.addAdUnits(t),window.pbjs.setConfig(this.config.prebid)}},{key:"teardownPrebid",value:function(){this.executePlugins("teardownPrebid"),(0,c.default)(this.config.slots).forEach((function(t){var e=t.code;return window.pbjs.removeAdUnit(e)}))}},{key:"setupGpt",value:function(){this.executePlugins("setupGpt");var t=window.googletag.pubads(),e=this.config.targeting;this.defineGptSizeMappings(),this.defineSlots(),this.defineOutOfPageSlots();for(var r=Object.entries(e),n=0;n<r.length;n++){var i=(0,o.default)(r[n],2),u=i[0],a=i[1];t.setTargeting(u,a)}t.disableInitialLoad(),t.enableSingleRequest(),window.googletag.enableServices(),this.displaySlots(),this.displayOutOfPageSlots()}},{key:"teardownGpt",value:function(){this.executePlugins("teardownGpt"),window.googletag.destroySlots()}},{key:"setDefaultConfig",value:function(){this.config.prebid||(this.config.prebid={}),this.config.metaData||(this.config.metaData={}),this.config.targeting||(this.config.targeting={})}},{key:"executePlugins",value:function(t){for(var e=0;e<this.plugins.length;e++){var r=this.plugins[e][t];r&&r.call(this)}}}],[{key:"queueForGPT",value:function(e,r){return t.withQueue(window.googletag.cmd,e,r)}},{key:"queueForPrebid",value:function(e,r){return t.withQueue(window.pbjs.que,e,r)}},{key:"withQueue",value:function(t,e,r){return new Promise((function(n){return t.push((function(){try{e(),n()}catch(t){r(t)}}))}))}}]),t}();e.default=l},function(t,e,r){"use strict";var n=r(26),i=r(27),o=r(13),u=r(28);t.exports=function(t){return n(t)||i(t)||o(t)||u()}},function(t,e,r){"use strict";var n=r(12);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e,r){"use strict";t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,r){"use strict";t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";var n=r(30),i=r(31),o=r(13),u=r(32);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||u()}},function(t,e,r){"use strict";t.exports=function(t){if(Array.isArray(t))return t}},function(t,e,r){"use strict";t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}},function(t,e,r){"use strict";t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return t.reduce((function(t,e){return t.concat(e.prebid.map((function(t){return{code:e.id,mediaTypes:t.mediaTypes,bids:t.bids}})))}),[])}},function(t,e,r){"use strict";var n=r(35);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,r,i,o,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},function(t,e,r){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,r){"use strict";var n=r(0)(r(1));t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==(0,n.default)(e)&&"object"==(0,n.default)(r)){if(e.constructor!==r.constructor)return!1;var i,o,u;if(Array.isArray(e)){if((i=e.length)!=r.length)return!1;for(o=i;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((i=(u=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,u[o]))return!1;for(o=i;0!=o--;){var a=u[o];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r}},function(t,e,r){"use strict";var n=r(6),i=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(r(4)),u=i(r(5)),a=i(r(9)),s=i(r(10)),f=i(r(11)),c=n(r(2)),l=i(r(17)),d=i(r(3));function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,f.default)(t);if(e){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h=function(t){(0,a.default)(r,t);var e=p(r);function r(){return(0,o.default)(this,r),e.apply(this,arguments)}return(0,u.default)(r,[{key:"componentDidMount",value:function(){var t=this.props;(0,t.activate)(t.id,t.customEventHandlers)}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.activate,n=e.id,i=e.customEventHandlers;t.activate!==r&&r(n,i)}},{key:"render",value:function(){var t=this.props,e=t.id,r=t.style,n=t.className,i=t.children;return c.default.createElement("div",{id:e,style:r,className:n,children:i,"data-r16":"1"})}}]),r}(c.Component);h.propTypes={id:d.default.string.isRequired,style:d.default.object,className:d.default.string,children:d.default.node,activate:d.default.func.isRequired,customEventHandlers:d.default.objectOf(d.default.func).isRequired},h.defaultProps={customEventHandlers:{}};var v=(0,l.default)(h);e.default=v},function(t,e,r){"use strict";function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n.apply(this,arguments)}t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(){return console.log("react16-advertising@3.0.2-beta.3/UMD")}}])}));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactAdvertisingR16=e(require("react")):t.ReactAdvertisingR16=e(t.React)}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=18)}([function(t,e,r){"use strict";t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(e,r){e.exports=t},function(t,e,r){"use strict";t.exports=r(34)()},function(t,e,r){"use strict";t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e,r){"use strict";var n=r(1);function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if(Object.prototype.hasOwnProperty.call(t,u)){var a=o?Object.getOwnPropertyDescriptor(t,u):null;a&&(a.get||a.set)?Object.defineProperty(r,u,a):r[u]=t[u]}return r.default=t,e&&e.set(t,r),r}},function(t,e,r){"use strict";t.exports=r(20)},function(t,e,r){"use strict";function n(t,e,r,n,i,o,u){try{var a=t[o](u),s=a.value}catch(t){return void r(t)}a.done?e(s):Promise.resolve(s).then(n,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var u=t.apply(e,r);function a(t){n(u,i,o,a,s,"next",t)}function s(t){n(u,i,o,a,s,"throw",t)}a(void 0)}))}}},function(t,e,r){"use strict";var n=r(22);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){"use strict";var n=r(1),i=r(23);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?i(t):e}},function(t,e,r){"use strict";function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,r){"use strict";t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";var n=r(12);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(3)),o=n(r(15)),u=i.default.shape({path:i.default.string,targeting:i.default.object,prebid:i.default.shape({debug:i.default.bool,bidderTimeout:i.default.number,enableSendAllBids:i.default.bool,bidderSequence:i.default.oneOf(["random","fixed"]),publisherDomain:i.default.string,cookieSyncDelay:i.default.number,priceGranularity:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),mediaTypePriceGranularity:i.default.shape({video:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),banner:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})]),native:i.default.oneOfType([i.default.oneOf(["low","medium","high","auto","dense"]),i.default.shape({buckets:i.default.arrayOf(i.default.shape({precision:i.default.number,min:i.default.number.isRequired,max:i.default.number.isRequired,increment:i.default.number.isRequired})).isRequired})])}),sizeConfig:i.default.arrayOf(i.default.shape({mediaQuery:i.default.string.isRequired,sizesSupported:i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)])),labels:i.default.arrayOf(i.default.string)}))}),sizeMappings:i.default.objectOf(i.default.arrayOf(i.default.shape({viewPortSize:i.default.arrayOf(i.default.number).isRequired,sizes:i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)])).isRequired}))),slots:i.default.arrayOf(o.default),outOfPageSlots:i.default.arrayOf(i.default.shape({id:i.default.string})),customEvents:i.default.objectOf(i.default.shape({eventMessagePrefix:i.default.string.isRequired,divIdPrefix:i.default.string}))});e.default=u},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(3)),o=i.default.shape({id:i.default.string.isRequired,path:i.default.string,collapseEmptyDiv:i.default.arrayOf(i.default.bool),targeting:i.default.object,sizes:i.default.oneOfType([i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)]),i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.arrayOf(i.default.number)]))]),sizeMappingName:i.default.string,prebid:i.default.arrayOf(i.default.shape({mediaTypes:i.default.objectOf(i.default.shape({sizes:i.default.arrayOf(i.default.arrayOf(i.default.number))})).isRequired,bids:i.default.arrayOf(i.default.shape({bidder:i.default.string.isRequired,params:i.default.object,labelAny:i.default.arrayOf(i.default.string),labelAll:i.default.arrayOf(i.default.string)})).isRequired})).isRequired});e.default=o},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(2)).default.createContext((function(){}));e.default=i},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(38)),o=n(r(2)),u=n(r(16));e.default=function(t){return function(e){return o.default.createElement(u.default.Consumer,null,(function(r){return o.default.createElement(t,(0,i.default)({},e,{activate:r}))}))}}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AdvertisingProvider",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"AdvertisingSlot",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"connectToAdServer",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"AdvertisingConfigPropType",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"AdvertisingSlotConfigPropType",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"logVersionInfo",{enumerable:!0,get:function(){return f.default}});var i=n(r(19)),o=n(r(37)),u=n(r(17)),a=n(r(14)),s=n(r(15)),f=n(r(39))},function(t,e,r){"use strict";var n=r(6),i=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(r(7)),u=i(r(8)),a=i(r(4)),s=i(r(5)),f=i(r(9)),c=i(r(10)),l=i(r(11)),d=n(r(2)),p=i(r(24)),h=i(r(3)),v=i(r(14)),g=i(r(16)),y=i(r(36));function b(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,l.default)(t);if(e){var i=(0,l.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,c.default)(this,r)}}var m=function(t){(0,f.default)(i,t);var e,r,n=b(i);function i(t){var e;return(0,a.default)(this,i),(e=n.call(this,t)).initialize(),e.state={activate:e.advertising.activate.bind(e.advertising)},e}return(0,s.default)(i,[{key:"componentDidMount",value:function(){this.advertising.isConfigReady()&&this.props.active&&this.advertising.setup()}},{key:"componentDidUpdate",value:(r=(0,u.default)(o.default.mark((function t(e){var r,n,i,u;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.advertising){t.next=2;break}return t.abrupt("return");case 2:if(r=this.props,n=r.config,i=r.active,(u=this.advertising.isConfigReady())||!n||!i){t.next=9;break}this.advertising.setConfig(n),this.advertising.setup(),t.next=13;break;case 9:if(!u||(0,y.default)(e.config,n)){t.next=13;break}return t.next=12,this.teardown();case 12:i&&(this.initialize(),this.setState({activate:this.advertising.activate.bind(this.advertising)}),this.advertising.isConfigReady()&&this.advertising.setup());case 13:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){this.props.config&&this.teardown()}},{key:"teardown",value:(e=(0,u.default)(o.default.mark((function t(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.advertising.teardown();case 2:this.advertising=null,this.activate=null;case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"initialize",value:function(){var t=this.props,e=t.config,r=t.plugins,n=t.onError;this.advertising=new p.default(e,r,n)}},{key:"render",value:function(){var t=this.state.activate;return d.default.createElement(g.default.Provider,{value:t},this.props.children)}}]),i}(d.Component);e.default=m,m.propTypes={active:h.default.bool,config:v.default,children:h.default.node,onError:h.default.func,plugins:h.default.arrayOf(h.default.shape({setupPrebid:h.default.func,setupGpt:h.default.func,teardownPrebid:h.default.func,teardownGpt:h.default.func}))},m.defaultProps={active:!0}},function(t,e,r){"use strict";(function(t){var e=r(0)(r(1)),n=function(t){var r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function s(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,o=Object.create(i.prototype),u=new x(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return j()}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var a=O(u,r);if(a){if(a===c)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=f(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===c)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,u),o}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function l(){}function d(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(E([])));g&&g!==r&&n.call(g,o)&&(h=g);var y=p.prototype=l.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function m(t,r){var i;this._invoke=function(o,u){function a(){return new r((function(i,a){!function i(o,u,a,s){var c=f(t[o],t,u);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===(0,e.default)(d)&&n.call(d,"__await")?r.resolve(d.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):r.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}(o,u,i,a)}))}return i=i?i.then(a,a):a()}}function O(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,c;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}return d.prototype=y.constructor=p,p.constructor=d,p[a]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(m.prototype),m.prototype[u]=function(){return this},t.AsyncIterator=m,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new m(s(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},b(y),y[a]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=e,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},t}("object"===(0,e.default)(t)?t.exports:{});try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}}).call(this,r(21)(t))},function(t,e,r){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,r){"use strict";t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){"use strict";var n=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(25)),o=n(r(29)),u=n(r(7)),a=n(r(8)),s=n(r(4)),f=n(r(5)),c=n(r(33)),l=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};(0,s.default)(this,t),this.config=e,this.slots={},this.outOfPageSlots={},this.plugins=r,this.onError=n,this.gptSizeMappings={},this.customEventCallbacks={},this.customEventHandlers={},this.queue=[],e&&this.setDefaultConfig()}var e,r;return(0,f.default)(t,[{key:"setup",value:(r=(0,a.default)(u.default.mark((function e(){var r,n,i,o,a,s,f,c=this;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.executePlugins("setup"),r=this.slots,n=this.outOfPageSlots,i=this.queue,this.setupCustomEvents(),e.next=5,Promise.all([t.queueForPrebid(this.setupPrebid.bind(this),this.onError),t.queueForGPT(this.setupGpt.bind(this),this.onError)]);case 5:if(0!==i.length){e.next=7;break}return e.abrupt("return");case 7:for(o=function(t){var e=i[t],r=e.id,n=e.customEventHandlers;Object.keys(n).forEach((function(t){return c.customEventCallbacks[t]||(c.customEventCallbacks[t]={}),c.customEventCallbacks[t][r]=n[t]}))},a=0;a<i.length;a++)o(a);s=i.map((function(t){return t.id})),f=i.map((function(t){var e=t.id;return r[e]||n[e]})),t.queueForPrebid((function(){return window.pbjs.requestBids({adUnitCodes:s,bidsBackHandler:function(){window.pbjs.setTargetingForGPTAsync(s),t.queueForGPT((function(){return window.googletag.pubads().refresh(f)}),c.onError)}})}),this.onError);case 12:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"teardown",value:(e=(0,a.default)(u.default.mark((function e(){return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.teardownCustomEvents(),e.next=3,Promise.all([t.queueForPrebid(this.teardownPrebid.bind(this),this.onError),t.queueForGPT(this.teardownGpt.bind(this),this.onError)]);case 3:this.slots={},this.gptSizeMappings={},this.queue={};case 6:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"activate",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.slots;0!==Object.values(i).length?(Object.keys(n).forEach((function(t){return r.customEventCallbacks[t]||(r.customEventCallbacks[t]={}),r.customEventCallbacks[t][e]=n[t]})),t.queueForPrebid((function(){return window.pbjs.requestBids({adUnitCodes:[e],bidsBackHandler:function(){window.pbjs.setTargetingForGPTAsync([e]),t.queueForGPT((function(){return window.googletag.pubads().refresh([i[e]])}),r.onError)}})}),this.onError)):this.queue.push({id:e,customEventHandlers:n})}},{key:"isConfigReady",value:function(){return Boolean(this.config)}},{key:"setConfig",value:function(t){this.config=t,this.setDefaultConfig()}},{key:"setupCustomEvents",value:function(){var t=this;this.config.customEvents&&Object.keys(this.config.customEvents).forEach((function(e){return t.setupCustomEvent(e,t.config.customEvents[e])}))}},{key:"setupCustomEvent",value:function(t,e){var r=e.eventMessagePrefix,n=e.divIdPrefix,i=this.customEventCallbacks;this.customEventHandlers[t]=function(e){var o=e.data;if("string"==typeof o&&o.startsWith("".concat(r))){var u="".concat(n||"").concat(o.substr(r.length)),a=i[t];if(a){var s=a[u];s&&s()}}},window.addEventListener("message",this.customEventHandlers[t])}},{key:"teardownCustomEvents",value:function(){var t=this;this.config.customEvents&&Object.keys(this.config.customEvents).forEach((function(e){return window.removeEventListener("message",t.customEventHandlers[e])}))}},{key:"defineGptSizeMappings",value:function(){if(this.config.sizeMappings)for(var t=Object.entries(this.config.sizeMappings),e=0;e<t.length;e++){for(var r=(0,o.default)(t[e],2),n=r[0],i=r[1],u=window.googletag.sizeMapping(),a=0;a<i.length;a++){var s=i[a],f=s.viewPortSize,c=s.sizes;u.addSize(f,c)}this.gptSizeMappings[n]=u.build()}}},{key:"getGptSizeMapping",value:function(t){return t&&this.gptSizeMappings[t]?this.gptSizeMappings[t]:null}},{key:"defineSlots",value:function(){var t=this;this.config.slots.forEach((function(e){var r=e.id,n=e.path,u=e.collapseEmptyDiv,a=e.targeting,s=void 0===a?{}:a,f=e.sizes,c=e.sizeMappingName,l=window.googletag.defineSlot(n||t.config.path,f,r),d=t.getGptSizeMapping(c);d&&l.defineSizeMapping(d),u&&u.length&&u.length>0&&l.setCollapseEmptyDiv.apply(l,(0,i.default)(u));for(var p=Object.entries(s),h=0;h<p.length;h++){var v=(0,o.default)(p[h],2),g=v[0],y=v[1];l.setTargeting(g,y)}l.addService(window.googletag.pubads()),t.slots[r]=l}))}},{key:"defineOutOfPageSlots",value:function(){var t=this;this.config.outOfPageSlots&&this.config.outOfPageSlots.forEach((function(e){var r=e.id,n=e.path,i=window.googletag.defineOutOfPageSlot(n||t.config.path,r);i.addService(window.googletag.pubads()),t.outOfPageSlots[r]=i}))}},{key:"displaySlots",value:function(){this.executePlugins("displaySlots"),this.config.slots.forEach((function(t){var e=t.id;window.googletag.display(e)}))}},{key:"displayOutOfPageSlots",value:function(){this.executePlugins("displayOutOfPageSlot"),this.config.outOfPageSlots&&this.config.outOfPageSlots.forEach((function(t){var e=t.id;window.googletag.display(e)}))}},{key:"setupPrebid",value:function(){this.executePlugins("setupPrebid");var t=(0,c.default)(this.config.slots);window.pbjs.addAdUnits(t),window.pbjs.setConfig(this.config.prebid)}},{key:"teardownPrebid",value:function(){this.executePlugins("teardownPrebid"),(0,c.default)(this.config.slots).forEach((function(t){var e=t.code;return window.pbjs.removeAdUnit(e)}))}},{key:"setupGpt",value:function(){this.executePlugins("setupGpt");var t=window.googletag.pubads(),e=this.config.targeting;this.defineGptSizeMappings(),this.defineSlots(),this.defineOutOfPageSlots();for(var r=Object.entries(e),n=0;n<r.length;n++){var i=(0,o.default)(r[n],2),u=i[0],a=i[1];t.setTargeting(u,a)}t.disableInitialLoad(),t.enableSingleRequest(),window.googletag.enableServices(),this.displaySlots(),this.displayOutOfPageSlots()}},{key:"teardownGpt",value:function(){this.executePlugins("teardownGpt"),window.googletag.destroySlots()}},{key:"setDefaultConfig",value:function(){this.config.prebid||(this.config.prebid={}),this.config.metaData||(this.config.metaData={}),this.config.targeting||(this.config.targeting={})}},{key:"executePlugins",value:function(t){for(var e=0;e<this.plugins.length;e++){var r=this.plugins[e][t];r&&r.call(this)}}}],[{key:"queueForGPT",value:function(e,r){return t.withQueue(window.googletag.cmd,e,r)}},{key:"queueForPrebid",value:function(e,r){return t.withQueue(window.pbjs.que,e,r)}},{key:"withQueue",value:function(t,e,r){return new Promise((function(n){return t.push((function(){try{e(),n()}catch(t){r(t)}}))}))}}]),t}();e.default=l},function(t,e,r){"use strict";var n=r(26),i=r(27),o=r(13),u=r(28);t.exports=function(t){return n(t)||i(t)||o(t)||u()}},function(t,e,r){"use strict";var n=r(12);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e,r){"use strict";t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e,r){"use strict";t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";var n=r(30),i=r(31),o=r(13),u=r(32);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||u()}},function(t,e,r){"use strict";t.exports=function(t){if(Array.isArray(t))return t}},function(t,e,r){"use strict";t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}}},function(t,e,r){"use strict";t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){return t.reduce((function(t,e){return t.concat(e.prebid.map((function(t){return{code:e.id,mediaTypes:t.mediaTypes,bids:t.bids}})))}),[])}},function(t,e,r){"use strict";var n=r(35);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,r,i,o,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},function(t,e,r){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,r){"use strict";var n=r(0)(r(1));t.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==(0,n.default)(e)&&"object"==(0,n.default)(r)){if(e.constructor!==r.constructor)return!1;var i,o,u;if(Array.isArray(e)){if((i=e.length)!=r.length)return!1;for(o=i;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((i=(u=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=i;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,u[o]))return!1;for(o=i;0!=o--;){var a=u[o];if(!t(e[a],r[a]))return!1}return!0}return e!=e&&r!=r}},function(t,e,r){"use strict";var n=r(6),i=r(0);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(r(4)),u=i(r(5)),a=i(r(9)),s=i(r(10)),f=i(r(11)),c=n(r(2)),l=i(r(17)),d=i(r(3));function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=(0,f.default)(t);if(e){var i=(0,f.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,s.default)(this,r)}}var h=function(t){(0,a.default)(r,t);var e=p(r);function r(){return(0,o.default)(this,r),e.apply(this,arguments)}return(0,u.default)(r,[{key:"componentDidMount",value:function(){var t=this.props;(0,t.activate)(t.id,t.customEventHandlers)}},{key:"componentDidUpdate",value:function(t){var e=this.props,r=e.activate,n=e.id,i=e.customEventHandlers;t.activate!==r&&r(n,i)}},{key:"render",value:function(){var t=this.props,e=t.id,r=t.style,n=t.className,i=t.children;return c.default.createElement("div",{id:e,style:r,className:n,children:i,"data-r16":"1"})}}]),r}(c.Component);h.propTypes={id:d.default.string.isRequired,style:d.default.object,className:d.default.string,children:d.default.node,activate:d.default.func.isRequired,customEventHandlers:d.default.objectOf(d.default.func).isRequired},h.defaultProps={customEventHandlers:{}};var v=(0,l.default)(h);e.default=v},function(t,e,r){"use strict";function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n.apply(this,arguments)}t.exports=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(){return console.log("react16-advertising@3.0.2-beta.4/UMD")}}])}));
//# sourceMappingURL=react16-advertising.min.js.map
// eslint-disable-next-line no-console
export default (function () {
return console.log('react16-advertising@3.0.2-beta.3/ES');
return console.log('react16-advertising@3.0.2-beta.4/ES');
});

@@ -10,5 +10,5 @@ "use strict";

var _default = function _default() {
return console.log('react16-advertising@3.0.2-beta.3/CommonJS');
return console.log('react16-advertising@3.0.2-beta.4/CommonJS');
};
exports["default"] = _default;
{
"name": "react16-advertising",
"version": "3.0.2-beta.3",
"version": "3.0.2-beta.4",
"description": "Library for display ads in React applications",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc