wp/wp-includes/js/dist/plugins.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 377);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 461);
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 0:
    90 /***/ 0:
    92 
    92 
    93 (function() { module.exports = this["wp"]["element"]; }());
    93 (function() { module.exports = this["wp"]["element"]; }());
    94 
    94 
    95 /***/ }),
    95 /***/ }),
    96 
    96 
    97 /***/ 10:
       
    98 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
    99 
       
   100 "use strict";
       
   101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
       
   102 function _classCallCheck(instance, Constructor) {
       
   103   if (!(instance instanceof Constructor)) {
       
   104     throw new TypeError("Cannot call a class as a function");
       
   105   }
       
   106 }
       
   107 
       
   108 /***/ }),
       
   109 
       
   110 /***/ 11:
       
   111 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   112 
       
   113 "use strict";
       
   114 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
       
   115 /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32);
       
   116 /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
       
   117 
       
   118 
       
   119 function _possibleConstructorReturn(self, call) {
       
   120   if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
       
   121     return call;
       
   122   }
       
   123 
       
   124   return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
       
   125 }
       
   126 
       
   127 /***/ }),
       
   128 
       
   129 /***/ 12:
    97 /***/ 12:
       
    98 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
    99 
       
   100 "use strict";
       
   101 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
       
   102 function _assertThisInitialized(self) {
       
   103   if (self === void 0) {
       
   104     throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
       
   105   }
       
   106 
       
   107   return self;
       
   108 }
       
   109 
       
   110 /***/ }),
       
   111 
       
   112 /***/ 16:
   130 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   113 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   131 
   114 
   132 "use strict";
   115 "use strict";
   133 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
   116 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
   134 function _getPrototypeOf(o) {
   117 function _getPrototypeOf(o) {
   138   return _getPrototypeOf(o);
   121   return _getPrototypeOf(o);
   139 }
   122 }
   140 
   123 
   141 /***/ }),
   124 /***/ }),
   142 
   125 
   143 /***/ 13:
   126 /***/ 19:
   144 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   127 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   145 
   128 
   146 "use strict";
   129 "use strict";
       
   130 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
       
   131 function _defineProperties(target, props) {
       
   132   for (var i = 0; i < props.length; i++) {
       
   133     var descriptor = props[i];
       
   134     descriptor.enumerable = descriptor.enumerable || false;
       
   135     descriptor.configurable = true;
       
   136     if ("value" in descriptor) descriptor.writable = true;
       
   137     Object.defineProperty(target, descriptor.key, descriptor);
       
   138   }
       
   139 }
       
   140 
       
   141 function _createClass(Constructor, protoProps, staticProps) {
       
   142   if (protoProps) _defineProperties(Constructor.prototype, protoProps);
       
   143   if (staticProps) _defineProperties(Constructor, staticProps);
       
   144   return Constructor;
       
   145 }
       
   146 
       
   147 /***/ }),
       
   148 
       
   149 /***/ 2:
       
   150 /***/ (function(module, exports) {
       
   151 
       
   152 (function() { module.exports = this["lodash"]; }());
       
   153 
       
   154 /***/ }),
       
   155 
       
   156 /***/ 20:
       
   157 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   158 
       
   159 "use strict";
       
   160 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
       
   161 function _classCallCheck(instance, Constructor) {
       
   162   if (!(instance instanceof Constructor)) {
       
   163     throw new TypeError("Cannot call a class as a function");
       
   164   }
       
   165 }
       
   166 
       
   167 /***/ }),
       
   168 
       
   169 /***/ 22:
       
   170 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   171 
       
   172 "use strict";
       
   173 
       
   174 // EXPORTS
       
   175 __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
   147 
   176 
   148 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
   177 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
   149 function _setPrototypeOf(o, p) {
   178 function _setPrototypeOf(o, p) {
   150   _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
   179   _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
   151     o.__proto__ = p;
   180     o.__proto__ = p;
   153   };
   182   };
   154 
   183 
   155   return _setPrototypeOf(o, p);
   184   return _setPrototypeOf(o, p);
   156 }
   185 }
   157 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
   186 // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
   158 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
       
   159 
   187 
   160 function _inherits(subClass, superClass) {
   188 function _inherits(subClass, superClass) {
   161   if (typeof superClass !== "function" && superClass !== null) {
   189   if (typeof superClass !== "function" && superClass !== null) {
   162     throw new TypeError("Super expression must either be null or a function");
   190     throw new TypeError("Super expression must either be null or a function");
   163   }
   191   }
   172   if (superClass) _setPrototypeOf(subClass, superClass);
   200   if (superClass) _setPrototypeOf(subClass, superClass);
   173 }
   201 }
   174 
   202 
   175 /***/ }),
   203 /***/ }),
   176 
   204 
   177 /***/ 15:
   205 /***/ 23:
   178 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   206 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   179 
   207 
   180 "use strict";
   208 "use strict";
   181 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
   209 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
   182 function _defineProperty(obj, key, value) {
   210 /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
   183   if (key in obj) {
   211 /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
   184     Object.defineProperty(obj, key, {
   212 
   185       value: value,
   213 
   186       enumerable: true,
   214 function _possibleConstructorReturn(self, call) {
   187       configurable: true,
   215   if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
   188       writable: true
   216     return call;
   189     });
   217   }
   190   } else {
   218 
   191     obj[key] = value;
   219   return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
   192   }
   220 }
   193 
   221 
   194   return obj;
   222 /***/ }),
   195 }
   223 
   196 
   224 /***/ 32:
   197 /***/ }),
       
   198 
       
   199 /***/ 19:
       
   200 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   201 
       
   202 "use strict";
       
   203 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
       
   204 function _extends() {
       
   205   _extends = Object.assign || function (target) {
       
   206     for (var i = 1; i < arguments.length; i++) {
       
   207       var source = arguments[i];
       
   208 
       
   209       for (var key in source) {
       
   210         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
   211           target[key] = source[key];
       
   212         }
       
   213       }
       
   214     }
       
   215 
       
   216     return target;
       
   217   };
       
   218 
       
   219   return _extends.apply(this, arguments);
       
   220 }
       
   221 
       
   222 /***/ }),
       
   223 
       
   224 /***/ 2:
       
   225 /***/ (function(module, exports) {
   225 /***/ (function(module, exports) {
   226 
   226 
   227 (function() { module.exports = this["lodash"]; }());
       
   228 
       
   229 /***/ }),
       
   230 
       
   231 /***/ 26:
       
   232 /***/ (function(module, exports) {
       
   233 
       
   234 (function() { module.exports = this["wp"]["hooks"]; }());
   227 (function() { module.exports = this["wp"]["hooks"]; }());
   235 
   228 
   236 /***/ }),
   229 /***/ }),
   237 
   230 
   238 /***/ 3:
   231 /***/ 40:
   239 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   240 
       
   241 "use strict";
       
   242 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
       
   243 function _assertThisInitialized(self) {
       
   244   if (self === void 0) {
       
   245     throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
       
   246   }
       
   247 
       
   248   return self;
       
   249 }
       
   250 
       
   251 /***/ }),
       
   252 
       
   253 /***/ 32:
       
   254 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   232 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   255 
   233 
   256 "use strict";
   234 "use strict";
   257 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
   235 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
   258 function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
       
   259 
       
   260 function _typeof(obj) {
   236 function _typeof(obj) {
   261   if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
   237   "@babel/helpers - typeof";
       
   238 
       
   239   if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
   262     _typeof = function _typeof(obj) {
   240     _typeof = function _typeof(obj) {
   263       return _typeof2(obj);
   241       return typeof obj;
   264     };
   242     };
   265   } else {
   243   } else {
   266     _typeof = function _typeof(obj) {
   244     _typeof = function _typeof(obj) {
   267       return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
   245       return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
   268     };
   246     };
   269   }
   247   }
   270 
   248 
   271   return _typeof(obj);
   249   return _typeof(obj);
   272 }
   250 }
   273 
   251 
   274 /***/ }),
   252 /***/ }),
   275 
   253 
   276 /***/ 377:
   254 /***/ 420:
   277 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   255 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   278 
   256 
   279 "use strict";
   257 "use strict";
       
   258 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
       
   259 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
       
   260 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
       
   261 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
       
   262 
       
   263 
       
   264 /**
       
   265  * WordPress dependencies
       
   266  */
       
   267 
       
   268 var plugins = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], {
       
   269   xmlns: "http://www.w3.org/2000/svg",
       
   270   viewBox: "0 0 24 24"
       
   271 }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], {
       
   272   d: "M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"
       
   273 }));
       
   274 /* harmony default export */ __webpack_exports__["a"] = (plugins);
       
   275 
       
   276 
       
   277 /***/ }),
       
   278 
       
   279 /***/ 461:
       
   280 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   281 
       
   282 "use strict";
       
   283 // ESM COMPAT FLAG
   280 __webpack_require__.r(__webpack_exports__);
   284 __webpack_require__.r(__webpack_exports__);
   281 
   285 
       
   286 // EXPORTS
       
   287 __webpack_require__.d(__webpack_exports__, "PluginArea", function() { return /* reexport */ plugin_area; });
       
   288 __webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return /* reexport */ plugin_context_withPluginContext; });
       
   289 __webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return /* reexport */ registerPlugin; });
       
   290 __webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return /* reexport */ unregisterPlugin; });
       
   291 __webpack_require__.d(__webpack_exports__, "getPlugin", function() { return /* reexport */ getPlugin; });
       
   292 __webpack_require__.d(__webpack_exports__, "getPlugins", function() { return /* reexport */ getPlugins; });
       
   293 
   282 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
   294 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
   283 var classCallCheck = __webpack_require__(10);
   295 var classCallCheck = __webpack_require__(20);
   284 
   296 
   285 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
   297 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
   286 var createClass = __webpack_require__(9);
   298 var createClass = __webpack_require__(19);
       
   299 
       
   300 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
       
   301 var assertThisInitialized = __webpack_require__(12);
   287 
   302 
   288 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
   303 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
   289 var possibleConstructorReturn = __webpack_require__(11);
   304 var possibleConstructorReturn = __webpack_require__(23);
   290 
   305 
   291 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
   306 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
   292 var getPrototypeOf = __webpack_require__(12);
   307 var getPrototypeOf = __webpack_require__(16);
   293 
   308 
   294 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
   309 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
   295 var inherits = __webpack_require__(13);
   310 var inherits = __webpack_require__(22);
   296 
       
   297 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
       
   298 var assertThisInitialized = __webpack_require__(3);
       
   299 
   311 
   300 // EXTERNAL MODULE: external {"this":["wp","element"]}
   312 // EXTERNAL MODULE: external {"this":["wp","element"]}
   301 var external_this_wp_element_ = __webpack_require__(0);
   313 var external_this_wp_element_ = __webpack_require__(0);
   302 
   314 
   303 // EXTERNAL MODULE: external "lodash"
   315 // EXTERNAL MODULE: external {"this":"lodash"}
   304 var external_lodash_ = __webpack_require__(2);
   316 var external_this_lodash_ = __webpack_require__(2);
   305 
   317 
   306 // EXTERNAL MODULE: external {"this":["wp","hooks"]}
   318 // EXTERNAL MODULE: external {"this":["wp","hooks"]}
   307 var external_this_wp_hooks_ = __webpack_require__(26);
   319 var external_this_wp_hooks_ = __webpack_require__(32);
   308 
   320 
   309 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
   321 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
   310 var esm_extends = __webpack_require__(19);
   322 var esm_extends = __webpack_require__(8);
   311 
   323 
   312 // EXTERNAL MODULE: external {"this":["wp","compose"]}
   324 // EXTERNAL MODULE: external {"this":["wp","compose"]}
   313 var external_this_wp_compose_ = __webpack_require__(6);
   325 var external_this_wp_compose_ = __webpack_require__(9);
   314 
   326 
   315 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js
   327 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-context/index.js
   316 
   328 
   317 
   329 
   318 
   330 
   336  *
   348  *
   337  * @param {Function} mapContextToProps Function called on every context change,
   349  * @param {Function} mapContextToProps Function called on every context change,
   338  *                                     expected to return object of props to
   350  *                                     expected to return object of props to
   339  *                                     merge with the component's own props.
   351  *                                     merge with the component's own props.
   340  *
   352  *
   341  * @return {Component} Enhanced component with injected context as props.
   353  * @return {WPComponent} Enhanced component with injected context as props.
   342  */
   354  */
   343 
   355 
   344 var plugin_context_withPluginContext = function withPluginContext(mapContextToProps) {
   356 var plugin_context_withPluginContext = function withPluginContext(mapContextToProps) {
   345   return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (OriginalComponent) {
   357   return Object(external_this_wp_compose_["createHigherOrderComponent"])(function (OriginalComponent) {
   346     return function (props) {
   358     return function (props) {
   349       });
   361       });
   350     };
   362     };
   351   }, 'withPluginContext');
   363   }, 'withPluginContext');
   352 };
   364 };
   353 
   365 
   354 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
   366 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
   355 var objectSpread = __webpack_require__(7);
   367 var defineProperty = __webpack_require__(5);
   356 
   368 
   357 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
   369 // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
   358 var esm_typeof = __webpack_require__(32);
   370 var esm_typeof = __webpack_require__(40);
       
   371 
       
   372 // EXTERNAL MODULE: ./node_modules/@wordpress/icons/build-module/library/plugins.js
       
   373 var plugins = __webpack_require__(420);
   359 
   374 
   360 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/api/index.js
   375 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/api/index.js
   361 
   376 
   362 
   377 
   363 
   378 
       
   379 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
       
   380 
       
   381 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
       
   382 
   364 /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */
   383 /* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */
   365 
   384 
   366 /**
   385 /**
   367  * WordPress dependencies
   386  * WordPress dependencies
   368  */
   387  */
   369 
   388 
       
   389 
   370 /**
   390 /**
   371  * External dependencies
   391  * External dependencies
   372  */
   392  */
   373 
   393 
   374 
   394 
   375 /**
   395 /**
       
   396  * Defined behavior of a plugin type.
       
   397  *
       
   398  * @typedef {Object} WPPlugin
       
   399  *
       
   400  * @property {string}                    name   A string identifying the plugin. Must be
       
   401  *                                              unique across all registered plugins.
       
   402  *                                              unique across all registered plugins.
       
   403  * @property {string|WPElement|Function} icon   An icon to be shown in the UI. It can
       
   404  *                                              be a slug of the Dashicon, or an element
       
   405  *                                              (or function returning an element) if you
       
   406  *                                              choose to render your own SVG.
       
   407  * @property {Function}                  render A component containing the UI elements
       
   408  *                                              to be rendered.
       
   409  */
       
   410 
       
   411 /**
   376  * Plugin definitions keyed by plugin name.
   412  * Plugin definitions keyed by plugin name.
   377  *
   413  *
   378  * @type {Object.<string,WPPlugin>}
   414  * @type {Object.<string,WPPlugin>}
   379  */
   415  */
   380 
   416 
   381 var plugins = {};
   417 var api_plugins = {};
   382 /**
   418 /**
   383  * Registers a plugin to the editor.
   419  * Registers a plugin to the editor.
   384  *
   420  *
   385  * @param {string}                    name            A string identifying the plugin. Must be unique across all registered plugins.
   421  * @param {string}   name     A string identifying the plugin.Must be
   386  * @param {Object}                    settings        The settings for this plugin.
   422  *                            unique across all registered plugins.
   387  * @param {string|WPElement|Function} settings.icon   An icon to be shown in the UI. It can be a slug of the Dashicon,
   423  * @param {WPPlugin} settings The settings for this plugin.
   388  * or an element (or function returning an element) if you choose to render your own SVG.
   424  *
   389  * @param {Function}                  settings.render A component containing the UI elements to be rendered.
   425  * @example
   390  *
   426  * <caption>ES5</caption>
   391  * @example <caption>ES5</caption>
       
   392  * ```js
   427  * ```js
   393  * // Using ES5 syntax
   428  * // Using ES5 syntax
   394  * var el = wp.element.createElement;
   429  * var el = wp.element.createElement;
   395  * var Fragment = wp.element.Fragment;
   430  * var Fragment = wp.element.Fragment;
   396  * var PluginSidebar = wp.editPost.PluginSidebar;
   431  * var PluginSidebar = wp.editPost.PluginSidebar;
   397  * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
   432  * var PluginSidebarMoreMenuItem = wp.editPost.PluginSidebarMoreMenuItem;
   398  * var registerPlugin = wp.plugins.registerPlugin;
   433  * var registerPlugin = wp.plugins.registerPlugin;
       
   434  * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
   399  *
   435  *
   400  * function Component() {
   436  * function Component() {
   401  * 	return el(
   437  * 	return el(
   402  * 		Fragment,
   438  * 		Fragment,
   403  * 		{},
   439  * 		{},
   417  * 			'Content of the sidebar'
   453  * 			'Content of the sidebar'
   418  * 		)
   454  * 		)
   419  * 	);
   455  * 	);
   420  * }
   456  * }
   421  * registerPlugin( 'plugin-name', {
   457  * registerPlugin( 'plugin-name', {
   422  * 	icon: 'smiley',
   458  * 	icon: moreIcon,
   423  * 	render: Component,
   459  * 	render: Component,
   424  * } );
   460  * } );
   425  * ```
   461  * ```
   426  *
   462  *
   427  * @example <caption>ESNext</caption>
   463  * @example
       
   464  * <caption>ESNext</caption>
   428  * ```js
   465  * ```js
   429  * // Using ESNext syntax
   466  * // Using ESNext syntax
   430  * const { Fragment } = wp.element;
   467  * import { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress/edit-post';
   431  * const { PluginSidebar, PluginSidebarMoreMenuItem } = wp.editPost;
   468  * import { registerPlugin } from '@wordpress/plugins';
   432  * const { registerPlugin } = wp.plugins;
   469  * import { more } from '@wordpress/icons';
   433  *
   470  *
   434  * const Component = () => (
   471  * const Component = () => (
   435  * 	<Fragment>
   472  * 	<>
   436  * 		<PluginSidebarMoreMenuItem
   473  * 		<PluginSidebarMoreMenuItem
   437  * 			target="sidebar-name"
   474  * 			target="sidebar-name"
   438  * 		>
   475  * 		>
   439  * 			My Sidebar
   476  * 			My Sidebar
   440  * 		</PluginSidebarMoreMenuItem>
   477  * 		</PluginSidebarMoreMenuItem>
   442  * 			name="sidebar-name"
   479  * 			name="sidebar-name"
   443  * 			title="My Sidebar"
   480  * 			title="My Sidebar"
   444  * 		>
   481  * 		>
   445  * 			Content of the sidebar
   482  * 			Content of the sidebar
   446  * 		</PluginSidebar>
   483  * 		</PluginSidebar>
   447  * 	</Fragment>
   484  * 	</>
   448  * );
   485  * );
   449  *
   486  *
   450  * registerPlugin( 'plugin-name', {
   487  * registerPlugin( 'plugin-name', {
   451  * 	icon: 'smiley',
   488  * 	icon: more,
   452  * 	render: Component,
   489  * 	render: Component,
   453  * } );
   490  * } );
   454  * ```
   491  * ```
   455  *
   492  *
   456  * @return {Object} The final plugin settings object.
   493  * @return {WPPlugin} The final plugin settings object.
   457  */
   494  */
   458 
   495 
   459 function registerPlugin(name, settings) {
   496 function registerPlugin(name, settings) {
   460   if (Object(esm_typeof["a" /* default */])(settings) !== 'object') {
   497   if (Object(esm_typeof["a" /* default */])(settings) !== 'object') {
   461     console.error('No settings object provided!');
   498     console.error('No settings object provided!');
   470   if (!/^[a-z][a-z0-9-]*$/.test(name)) {
   507   if (!/^[a-z][a-z0-9-]*$/.test(name)) {
   471     console.error('Plugin names must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".');
   508     console.error('Plugin names must include only lowercase alphanumeric characters or dashes, and start with a letter. Example: "my-plugin".');
   472     return null;
   509     return null;
   473   }
   510   }
   474 
   511 
   475   if (plugins[name]) {
   512   if (api_plugins[name]) {
   476     console.error("Plugin \"".concat(name, "\" is already registered."));
   513     console.error("Plugin \"".concat(name, "\" is already registered."));
   477   }
   514   }
   478 
   515 
   479   settings = Object(external_this_wp_hooks_["applyFilters"])('plugins.registerPlugin', settings, name);
   516   settings = Object(external_this_wp_hooks_["applyFilters"])('plugins.registerPlugin', settings, name);
   480 
   517 
   481   if (!Object(external_lodash_["isFunction"])(settings.render)) {
   518   if (!Object(external_this_lodash_["isFunction"])(settings.render)) {
   482     console.error('The "render" property must be specified and must be a valid function.');
   519     console.error('The "render" property must be specified and must be a valid function.');
   483     return null;
   520     return null;
   484   }
   521   }
   485 
   522 
   486   plugins[name] = Object(objectSpread["a" /* default */])({
   523   api_plugins[name] = _objectSpread({
   487     name: name,
   524     name: name,
   488     icon: 'admin-plugins'
   525     icon: plugins["a" /* default */]
   489   }, settings);
   526   }, settings);
   490   Object(external_this_wp_hooks_["doAction"])('plugins.pluginRegistered', settings, name);
   527   Object(external_this_wp_hooks_["doAction"])('plugins.pluginRegistered', settings, name);
   491   return settings;
   528   return settings;
   492 }
   529 }
   493 /**
   530 /**
   494  * Unregisters a plugin by name.
   531  * Unregisters a plugin by name.
   495  *
   532  *
   496  * @param {string} name Plugin name.
   533  * @param {string} name Plugin name.
   497  *
   534  *
   498  * @example <caption>ES5</caption>
   535  * @example
       
   536  * <caption>ES5</caption>
   499  * ```js
   537  * ```js
   500  * // Using ES5 syntax
   538  * // Using ES5 syntax
   501  * var unregisterPlugin = wp.plugins.unregisterPlugin;
   539  * var unregisterPlugin = wp.plugins.unregisterPlugin;
   502  *
   540  *
   503  * unregisterPlugin( 'plugin-name' );
   541  * unregisterPlugin( 'plugin-name' );
   504  * ```
   542  * ```
   505  *
   543  *
   506  * @example <caption>ESNext</caption>
   544  * @example
       
   545  * <caption>ESNext</caption>
   507  * ```js
   546  * ```js
   508  * // Using ESNext syntax
   547  * // Using ESNext syntax
   509  * const { unregisterPlugin } = wp.plugins;
   548  * import { unregisterPlugin } from '@wordpress/plugins';
   510  *
   549  *
   511  * unregisterPlugin( 'plugin-name' );
   550  * unregisterPlugin( 'plugin-name' );
   512  * ```
   551  * ```
   513  *
   552  *
   514  * @return {?WPPlugin} The previous plugin settings object, if it has been
   553  * @return {?WPPlugin} The previous plugin settings object, if it has been
   515  *                     successfully unregistered; otherwise `undefined`.
   554  *                     successfully unregistered; otherwise `undefined`.
   516  */
   555  */
   517 
   556 
   518 function unregisterPlugin(name) {
   557 function unregisterPlugin(name) {
   519   if (!plugins[name]) {
   558   if (!api_plugins[name]) {
   520     console.error('Plugin "' + name + '" is not registered.');
   559     console.error('Plugin "' + name + '" is not registered.');
   521     return;
   560     return;
   522   }
   561   }
   523 
   562 
   524   var oldPlugin = plugins[name];
   563   var oldPlugin = api_plugins[name];
   525   delete plugins[name];
   564   delete api_plugins[name];
   526   Object(external_this_wp_hooks_["doAction"])('plugins.pluginUnregistered', oldPlugin, name);
   565   Object(external_this_wp_hooks_["doAction"])('plugins.pluginUnregistered', oldPlugin, name);
   527   return oldPlugin;
   566   return oldPlugin;
   528 }
   567 }
   529 /**
   568 /**
   530  * Returns a registered plugin settings.
   569  * Returns a registered plugin settings.
   531  *
   570  *
   532  * @param {string} name Plugin name.
   571  * @param {string} name Plugin name.
   533  *
   572  *
   534  * @return {?Object} Plugin setting.
   573  * @return {?WPPlugin} Plugin setting.
   535  */
   574  */
   536 
   575 
   537 function getPlugin(name) {
   576 function getPlugin(name) {
   538   return plugins[name];
   577   return api_plugins[name];
   539 }
   578 }
   540 /**
   579 /**
   541  * Returns all registered plugins.
   580  * Returns all registered plugins.
   542  *
   581  *
   543  * @return {Array} Plugin settings.
   582  * @return {WPPlugin[]} Plugin settings.
   544  */
   583  */
   545 
   584 
   546 function getPlugins() {
   585 function getPlugins() {
   547   return Object.values(plugins);
   586   return Object.values(api_plugins);
   548 }
   587 }
   549 
   588 
   550 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js
   589 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/plugin-area/index.js
   551 
   590 
   552 
   591 
   554 
   593 
   555 
   594 
   556 
   595 
   557 
   596 
   558 
   597 
       
   598 function _createSuper(Derived) { return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
       
   599 
       
   600 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
       
   601 
   559 /**
   602 /**
   560  * External dependencies
   603  * External dependencies
   561  */
   604  */
   562 
   605 
   563 /**
   606 /**
   573 
   616 
   574 
   617 
   575 /**
   618 /**
   576  * A component that renders all plugin fills in a hidden div.
   619  * A component that renders all plugin fills in a hidden div.
   577  *
   620  *
   578  * @example <caption>ES5</caption>
   621  * @example
       
   622  * <caption>ES5</caption>
   579  * ```js
   623  * ```js
   580  * // Using ES5 syntax
   624  * // Using ES5 syntax
   581  * var el = wp.element.createElement;
   625  * var el = wp.element.createElement;
   582  * var PluginArea = wp.plugins.PluginArea;
   626  * var PluginArea = wp.plugins.PluginArea;
   583  *
   627  *
   589  * 		PluginArea
   633  * 		PluginArea
   590  * 	);
   634  * 	);
   591  * }
   635  * }
   592  * ```
   636  * ```
   593  *
   637  *
   594  * @example <caption>ESNext</caption>
   638  * @example
       
   639  * <caption>ESNext</caption>
   595  * ```js
   640  * ```js
   596  * // Using ESNext syntax
   641  * // Using ESNext syntax
   597  * const { PluginArea } = wp.plugins;
   642  * import { PluginArea } from '@wordpress/plugins';
   598  *
   643  *
   599  * const Layout = () => (
   644  * const Layout = () => (
   600  * 	<div>
   645  * 	<div>
   601  * 		Content of the page
   646  * 		Content of the page
   602  * 		<PluginArea />
   647  * 		<PluginArea />
   603  * 	</div>
   648  * 	</div>
   604  * );
   649  * );
   605  * ```
   650  * ```
   606  *
   651  *
   607  * @return {WPElement} Plugin area.
   652  * @return {WPComponent} The component to be rendered.
   608  */
   653  */
   609 
   654 
   610 var plugin_area_PluginArea =
   655 var plugin_area_PluginArea = /*#__PURE__*/function (_Component) {
   611 /*#__PURE__*/
       
   612 function (_Component) {
       
   613   Object(inherits["a" /* default */])(PluginArea, _Component);
   656   Object(inherits["a" /* default */])(PluginArea, _Component);
       
   657 
       
   658   var _super = _createSuper(PluginArea);
   614 
   659 
   615   function PluginArea() {
   660   function PluginArea() {
   616     var _this;
   661     var _this;
   617 
   662 
   618     Object(classCallCheck["a" /* default */])(this, PluginArea);
   663     Object(classCallCheck["a" /* default */])(this, PluginArea);
   619 
   664 
   620     _this = Object(possibleConstructorReturn["a" /* default */])(this, Object(getPrototypeOf["a" /* default */])(PluginArea).apply(this, arguments));
   665     _this = _super.apply(this, arguments);
   621     _this.setPlugins = _this.setPlugins.bind(Object(assertThisInitialized["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this)));
   666     _this.setPlugins = _this.setPlugins.bind(Object(assertThisInitialized["a" /* default */])(_this));
   622     _this.state = _this.getCurrentPluginsState();
   667     _this.state = _this.getCurrentPluginsState();
   623     return _this;
   668     return _this;
   624   }
   669   }
   625 
   670 
   626   Object(createClass["a" /* default */])(PluginArea, [{
   671   Object(createClass["a" /* default */])(PluginArea, [{
   627     key: "getCurrentPluginsState",
   672     key: "getCurrentPluginsState",
   628     value: function getCurrentPluginsState() {
   673     value: function getCurrentPluginsState() {
   629       return {
   674       return {
   630         plugins: Object(external_lodash_["map"])(getPlugins(), function (_ref) {
   675         plugins: Object(external_this_lodash_["map"])(getPlugins(), function (_ref) {
   631           var icon = _ref.icon,
   676           var icon = _ref.icon,
   632               name = _ref.name,
   677               name = _ref.name,
   633               render = _ref.render;
   678               render = _ref.render;
   634           return {
   679           return {
   635             Plugin: render,
   680             Plugin: render,
   663     value: function render() {
   708     value: function render() {
   664       return Object(external_this_wp_element_["createElement"])("div", {
   709       return Object(external_this_wp_element_["createElement"])("div", {
   665         style: {
   710         style: {
   666           display: 'none'
   711           display: 'none'
   667         }
   712         }
   668       }, Object(external_lodash_["map"])(this.state.plugins, function (_ref2) {
   713       }, Object(external_this_lodash_["map"])(this.state.plugins, function (_ref2) {
   669         var context = _ref2.context,
   714         var context = _ref2.context,
   670             Plugin = _ref2.Plugin;
   715             Plugin = _ref2.Plugin;
   671         return Object(external_this_wp_element_["createElement"])(Provider, {
   716         return Object(external_this_wp_element_["createElement"])(Provider, {
   672           key: context.name,
   717           key: context.name,
   673           value: context
   718           value: context
   684 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/index.js
   729 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/components/index.js
   685 
   730 
   686 
   731 
   687 
   732 
   688 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/index.js
   733 // CONCATENATED MODULE: ./node_modules/@wordpress/plugins/build-module/index.js
   689 /* concated harmony reexport PluginArea */__webpack_require__.d(__webpack_exports__, "PluginArea", function() { return plugin_area; });
   734 
   690 /* concated harmony reexport withPluginContext */__webpack_require__.d(__webpack_exports__, "withPluginContext", function() { return plugin_context_withPluginContext; });
   735 
   691 /* concated harmony reexport registerPlugin */__webpack_require__.d(__webpack_exports__, "registerPlugin", function() { return registerPlugin; });
   736 
   692 /* concated harmony reexport unregisterPlugin */__webpack_require__.d(__webpack_exports__, "unregisterPlugin", function() { return unregisterPlugin; });
   737 
   693 /* concated harmony reexport getPlugin */__webpack_require__.d(__webpack_exports__, "getPlugin", function() { return getPlugin; });
   738 /***/ }),
   694 /* concated harmony reexport getPlugins */__webpack_require__.d(__webpack_exports__, "getPlugins", function() { return getPlugins; });
   739 
   695 
   740 /***/ 5:
   696 
   741 /***/ (function(module, __webpack_exports__, __webpack_require__) {
   697 
   742 
       
   743 "use strict";
       
   744 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
       
   745 function _defineProperty(obj, key, value) {
       
   746   if (key in obj) {
       
   747     Object.defineProperty(obj, key, {
       
   748       value: value,
       
   749       enumerable: true,
       
   750       configurable: true,
       
   751       writable: true
       
   752     });
       
   753   } else {
       
   754     obj[key] = value;
       
   755   }
       
   756 
       
   757   return obj;
       
   758 }
   698 
   759 
   699 /***/ }),
   760 /***/ }),
   700 
   761 
   701 /***/ 6:
   762 /***/ 6:
   702 /***/ (function(module, exports) {
   763 /***/ (function(module, exports) {
   703 
   764 
       
   765 (function() { module.exports = this["wp"]["primitives"]; }());
       
   766 
       
   767 /***/ }),
       
   768 
       
   769 /***/ 8:
       
   770 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   771 
       
   772 "use strict";
       
   773 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
       
   774 function _extends() {
       
   775   _extends = Object.assign || function (target) {
       
   776     for (var i = 1; i < arguments.length; i++) {
       
   777       var source = arguments[i];
       
   778 
       
   779       for (var key in source) {
       
   780         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
   781           target[key] = source[key];
       
   782         }
       
   783       }
       
   784     }
       
   785 
       
   786     return target;
       
   787   };
       
   788 
       
   789   return _extends.apply(this, arguments);
       
   790 }
       
   791 
       
   792 /***/ }),
       
   793 
       
   794 /***/ 9:
       
   795 /***/ (function(module, exports) {
       
   796 
   704 (function() { module.exports = this["wp"]["compose"]; }());
   797 (function() { module.exports = this["wp"]["compose"]; }());
   705 
   798 
   706 /***/ }),
       
   707 
       
   708 /***/ 7:
       
   709 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   710 
       
   711 "use strict";
       
   712 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread; });
       
   713 /* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
       
   714 
       
   715 function _objectSpread(target) {
       
   716   for (var i = 1; i < arguments.length; i++) {
       
   717     var source = arguments[i] != null ? arguments[i] : {};
       
   718     var ownKeys = Object.keys(source);
       
   719 
       
   720     if (typeof Object.getOwnPropertySymbols === 'function') {
       
   721       ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
       
   722         return Object.getOwnPropertyDescriptor(source, sym).enumerable;
       
   723       }));
       
   724     }
       
   725 
       
   726     ownKeys.forEach(function (key) {
       
   727       Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
       
   728     });
       
   729   }
       
   730 
       
   731   return target;
       
   732 }
       
   733 
       
   734 /***/ }),
       
   735 
       
   736 /***/ 9:
       
   737 /***/ (function(module, __webpack_exports__, __webpack_require__) {
       
   738 
       
   739 "use strict";
       
   740 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
       
   741 function _defineProperties(target, props) {
       
   742   for (var i = 0; i < props.length; i++) {
       
   743     var descriptor = props[i];
       
   744     descriptor.enumerable = descriptor.enumerable || false;
       
   745     descriptor.configurable = true;
       
   746     if ("value" in descriptor) descriptor.writable = true;
       
   747     Object.defineProperty(target, descriptor.key, descriptor);
       
   748   }
       
   749 }
       
   750 
       
   751 function _createClass(Constructor, protoProps, staticProps) {
       
   752   if (protoProps) _defineProperties(Constructor.prototype, protoProps);
       
   753   if (staticProps) _defineProperties(Constructor, staticProps);
       
   754   return Constructor;
       
   755 }
       
   756 
       
   757 /***/ })
   799 /***/ })
   758 
   800 
   759 /******/ });
   801 /******/ });