| @@ -1,94 +1 @@ | ||
| 1 | -/******/ (function() { // webpackBootstrap | |
| 2 | -/******/ "use strict"; | |
| 3 | -/******/ // The require scope | |
| 4 | -/******/ var __webpack_require__ = {}; | |
| 5 | -/******/ | |
| 6 | -/************************************************************************/ | |
| 7 | -/******/ /* webpack/runtime/define property getters */ | |
| 8 | -/******/ !function() { | |
| 9 | -/******/ // define getter functions for harmony exports | |
| 10 | -/******/ __webpack_require__.d = function(exports, definition) { | |
| 11 | -/******/ for(var key in definition) { | |
| 12 | -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 13 | -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 14 | -/******/ } | |
| 15 | -/******/ } | |
| 16 | -/******/ }; | |
| 17 | -/******/ }(); | |
| 18 | -/******/ | |
| 19 | -/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 20 | -/******/ !function() { | |
| 21 | -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } | |
| 22 | -/******/ }(); | |
| 23 | -/******/ | |
| 24 | -/************************************************************************/ | |
| 25 | -var __webpack_exports__ = {}; | |
| 26 | - | |
| 27 | -// EXPORTS | |
| 28 | -__webpack_require__.d(__webpack_exports__, { | |
| 29 | - "default": function() { return /* binding */ warning; } | |
| 30 | -}); | |
| 31 | - | |
| 32 | -;// CONCATENATED MODULE: ./packages/warning/build-module/utils.js | |
| 33 | -/** | |
| 34 | - * Object map tracking messages which have been logged, for use in ensuring a | |
| 35 | - * message is only logged once. | |
| 36 | - * | |
| 37 | - * @type {Set<string>} | |
| 38 | - */ | |
| 39 | -const logged = new Set(); | |
| 40 | -//# sourceMappingURL=utils.js.map | |
| 41 | -;// CONCATENATED MODULE: ./packages/warning/build-module/index.js | |
| 42 | -/** | |
| 43 | - * Internal dependencies | |
| 44 | - */ | |
| 45 | - | |
| 46 | - | |
| 47 | -function isDev() { | |
| 48 | - return typeof process !== 'undefined' && process.env && "production" !== 'production'; | |
| 49 | -} | |
| 50 | -/** | |
| 51 | - * Shows a warning with `message` if environment is not `production`. | |
| 52 | - * | |
| 53 | - * @param {string} message Message to show in the warning. | |
| 54 | - * | |
| 55 | - * @example | |
| 56 | - * ```js | |
| 57 | - * import warning from '@wordpress/warning'; | |
| 58 | - * | |
| 59 | - * function MyComponent( props ) { | |
| 60 | - * if ( ! props.title ) { | |
| 61 | - * warning( '`props.title` was not passed' ); | |
| 62 | - * } | |
| 63 | - * ... | |
| 64 | - * } | |
| 65 | - * ``` | |
| 66 | - */ | |
| 67 | - | |
| 68 | - | |
| 69 | -function warning(message) { | |
| 70 | - if (!isDev()) { | |
| 71 | - return; | |
| 72 | - } // Skip if already logged. | |
| 73 | - | |
| 74 | - | |
| 75 | - if (logged.has(message)) { | |
| 76 | - return; | |
| 77 | - } // eslint-disable-next-line no-console | |
| 78 | - | |
| 79 | - | |
| 80 | - console.warn(message); // Throwing an error and catching it immediately to improve debugging | |
| 81 | - // A consumer can use 'pause on caught exceptions' | |
| 82 | - // https://github.com/facebook/react/issues/4216 | |
| 83 | - | |
| 84 | - try { | |
| 85 | - throw Error(message); | |
| 86 | - } catch (x) {// do nothing | |
| 87 | - } | |
| 88 | - | |
| 89 | - logged.add(message); | |
| 90 | -} | |
| 91 | -//# sourceMappingURL=index.js.map | |
| 92 | -(window.wp = window.wp || {}).warning = __webpack_exports__["default"]; | |
| 93 | -/******/ })() | |
| 94 | -; | |
| 1 | +this.wp=this.wp||{},this.wp.warning=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=376)}({111:function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var f,l=[],a=!1,s=-1;function p(){a&&f&&(a=!1,f.length?l=f.concat(l):s=-1,l.length&&d())}function d(){if(!a){var t=c(p);a=!0;for(var e=l.length;e;){for(f=l,l=[];++s<e;)f&&f[s].run();s=-1,e=l.length}f=null,a=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new h(t,e)),1!==l.length||a||c(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},376:function(t,e,n){"use strict";n.r(e),function(t){function r(e){void 0!==t&&t.env}n.d(e,"default",(function(){return r}))}.call(this,n(111))}}).default; | |