this["wp"] = this["wp"] || {}; this["wp"]["blockDirectory"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "7f3f"); /******/ }) /************************************************************************/ /******/ ({ /***/ "//Lo": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("GRId"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("Tqx9"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ var blockDefault = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["SVG"], { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__["Path"], { d: "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z" })); /* harmony default export */ __webpack_exports__["a"] = (blockDefault); /***/ }), /***/ "1ZqX": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["data"]; }()); /***/ }), /***/ "25BE": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; }); function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } /***/ }), /***/ "51Zz": /***/ (function(module, exports) { (function() { module.exports = window["wp"]["dataControls"]; }()); /***/ }), /***/ "7f3f": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "store", function() { return /* reexport */ store; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js var selectors_namespaceObject = {}; __webpack_require__.r(selectors_namespaceObject); __webpack_require__.d(selectors_namespaceObject, "isRequestingDownloadableBlocks", function() { return selectors_isRequestingDownloadableBlocks; }); __webpack_require__.d(selectors_namespaceObject, "getDownloadableBlocks", function() { return selectors_getDownloadableBlocks; }); __webpack_require__.d(selectors_namespaceObject, "getInstalledBlockTypes", function() { return getInstalledBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "getNewBlockTypes", function() { return getNewBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "getUnusedBlockTypes", function() { return getUnusedBlockTypes; }); __webpack_require__.d(selectors_namespaceObject, "isInstalling", function() { return selectors_isInstalling; }); __webpack_require__.d(selectors_namespaceObject, "getErrorNotices", function() { return getErrorNotices; }); __webpack_require__.d(selectors_namespaceObject, "getErrorNoticeForBlock", function() { return selectors_getErrorNoticeForBlock; }); // NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js var actions_namespaceObject = {}; __webpack_require__.r(actions_namespaceObject); __webpack_require__.d(actions_namespaceObject, "fetchDownloadableBlocks", function() { return fetchDownloadableBlocks; }); __webpack_require__.d(actions_namespaceObject, "receiveDownloadableBlocks", function() { return receiveDownloadableBlocks; }); __webpack_require__.d(actions_namespaceObject, "installBlockType", function() { return actions_installBlockType; }); __webpack_require__.d(actions_namespaceObject, "uninstallBlockType", function() { return actions_uninstallBlockType; }); __webpack_require__.d(actions_namespaceObject, "addInstalledBlockType", function() { return addInstalledBlockType; }); __webpack_require__.d(actions_namespaceObject, "removeInstalledBlockType", function() { return removeInstalledBlockType; }); __webpack_require__.d(actions_namespaceObject, "setIsInstalling", function() { return setIsInstalling; }); __webpack_require__.d(actions_namespaceObject, "setErrorNotice", function() { return setErrorNotice; }); __webpack_require__.d(actions_namespaceObject, "clearErrorNotice", function() { return clearErrorNotice; }); // EXTERNAL MODULE: external ["wp","element"] var external_wp_element_ = __webpack_require__("GRId"); // EXTERNAL MODULE: external ["wp","plugins"] var external_wp_plugins_ = __webpack_require__("TvNi"); // EXTERNAL MODULE: external ["wp","hooks"] var external_wp_hooks_ = __webpack_require__("g56x"); // EXTERNAL MODULE: external ["wp","blocks"] var external_wp_blocks_ = __webpack_require__("HSyU"); // EXTERNAL MODULE: external ["wp","data"] var external_wp_data_ = __webpack_require__("1ZqX"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: external ["wp","dataControls"] var external_wp_dataControls_ = __webpack_require__("51Zz"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("KQm4"); // EXTERNAL MODULE: external "lodash" var external_lodash_ = __webpack_require__("YLtl"); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js 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; } 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; } /** * External dependencies */ /** * WordPress dependencies */ /** * Reducer returning an array of downloadable blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ var reducer_downloadableBlocks = function downloadableBlocks() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'FETCH_DOWNLOADABLE_BLOCKS': return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.filterValue, { isRequesting: true })); case 'RECEIVE_DOWNLOADABLE_BLOCKS': return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.filterValue, { results: action.downloadableBlocks, isRequesting: false })); } return state; }; /** * Reducer managing the installation and deletion of blocks. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ var reducer_blockManagement = function blockManagement() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { installedBlockTypes: [], isInstalling: {} }; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'ADD_INSTALLED_BLOCK_TYPE': return _objectSpread(_objectSpread({}, state), {}, { installedBlockTypes: [].concat(Object(toConsumableArray["a" /* default */])(state.installedBlockTypes), [action.item]) }); case 'REMOVE_INSTALLED_BLOCK_TYPE': return _objectSpread(_objectSpread({}, state), {}, { installedBlockTypes: state.installedBlockTypes.filter(function (blockType) { return blockType.name !== action.item.name; }) }); case 'SET_INSTALLING_BLOCK': return _objectSpread(_objectSpread({}, state), {}, { isInstalling: _objectSpread(_objectSpread({}, state.isInstalling), {}, Object(defineProperty["a" /* default */])({}, action.blockId, action.isInstalling)) }); } return state; }; /** * Reducer returning an object of error notices. * * @param {Object} state Current state. * @param {Object} action Dispatched action. * * @return {Object} Updated state. */ var reducer_errorNotices = function errorNotices() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'SET_ERROR_NOTICE': return _objectSpread(_objectSpread({}, state), {}, Object(defineProperty["a" /* default */])({}, action.blockId, { message: action.message, isFatal: action.isFatal })); case 'CLEAR_ERROR_NOTICE': return Object(external_lodash_["omit"])(state, action.blockId); } return state; }; /* harmony default export */ var reducer = (Object(external_wp_data_["combineReducers"])({ downloadableBlocks: reducer_downloadableBlocks, blockManagement: reducer_blockManagement, errorNotices: reducer_errorNotices })); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js /** * Check if a block list contains a specific block type. Recursively searches * through `innerBlocks` if they exist. * * @param {Object} blockType A block object to search for. * @param {Object[]} blocks The list of blocks to look through. * * @return {boolean} Whether the blockType is found. */ function hasBlockType(blockType) { var blocks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; if (!blocks.length) { return false; } if (blocks.some(function (_ref) { var name = _ref.name; return name === blockType.name; })) { return true; } for (var i = 0; i < blocks.length; i++) { if (hasBlockType(blockType, blocks[i].innerBlocks)) { return true; } } return false; } // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Returns true if application is requesting for downloadable blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {boolean} Whether a request is in progress for the blocks list. */ function selectors_isRequestingDownloadableBlocks(state, filterValue) { if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].isRequesting) { return false; } return state.downloadableBlocks[filterValue].isRequesting; } /** * Returns the available uninstalled blocks. * * @param {Object} state Global application state. * @param {string} filterValue Search string. * * @return {Array} Downloadable blocks. */ function selectors_getDownloadableBlocks(state, filterValue) { if (!state.downloadableBlocks[filterValue] || !state.downloadableBlocks[filterValue].results) { return []; } return state.downloadableBlocks[filterValue].results; } /** * Returns the block types that have been installed on the server in this * session. * * @param {Object} state Global application state. * * @return {Array} Block type items */ function getInstalledBlockTypes(state) { return state.blockManagement.installedBlockTypes; } /** * Returns block types that have been installed on the server and used in the * current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ var getNewBlockTypes = Object(external_wp_data_["createRegistrySelector"])(function (select) { return function (state) { var usedBlockTree = select('core/block-editor').getBlocks(); var installedBlockTypes = getInstalledBlockTypes(state); return installedBlockTypes.filter(function (blockType) { return hasBlockType(blockType, usedBlockTree); }); }; }); /** * Returns the block types that have been installed on the server but are not * used in the current post. * * @param {Object} state Global application state. * * @return {Array} Block type items. */ var getUnusedBlockTypes = Object(external_wp_data_["createRegistrySelector"])(function (select) { return function (state) { var usedBlockTree = select('core/block-editor').getBlocks(); var installedBlockTypes = getInstalledBlockTypes(state); return installedBlockTypes.filter(function (blockType) { return !hasBlockType(blockType, usedBlockTree); }); }; }); /** * Returns true if a block plugin install is in progress. * * @param {Object} state Global application state. * @param {string} blockId Id of the block. * * @return {boolean} Whether this block is currently being installed. */ function selectors_isInstalling(state, blockId) { return state.blockManagement.isInstalling[blockId] || false; } /** * Returns all block error notices. * * @param {Object} state Global application state. * * @return {Object} Object with error notices. */ function getErrorNotices(state) { return state.errorNotices; } /** * Returns the error notice for a given block. * * @param {Object} state Global application state. * @param {string} blockId The ID of the block plugin. eg: my-block * * @return {string|boolean} The error text, or false if no error. */ function selectors_getErrorNoticeForBlock(state, blockId) { return state.errorNotices[blockId]; } // EXTERNAL MODULE: external "regeneratorRuntime" var external_regeneratorRuntime_ = __webpack_require__("dvlR"); var external_regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(external_regeneratorRuntime_); // EXTERNAL MODULE: external ["wp","i18n"] var external_wp_i18n_ = __webpack_require__("l3Sj"); // EXTERNAL MODULE: external ["wp","notices"] var external_wp_notices_ = __webpack_require__("onLe"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js var asyncToGenerator = __webpack_require__("HaE+"); // EXTERNAL MODULE: external ["wp","apiFetch"] var external_wp_apiFetch_ = __webpack_require__("ywyh"); var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_); // CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/controls.js function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } /** * WordPress dependencies */ /** * Load an asset for a block. * * This function returns a Promise that will resolve once the asset is loaded, * or in the case of Stylesheets and Inline JavaScript, will resolve immediately. * * @param {HTMLElement} el A HTML Element asset to inject. * * @return {Promise} Promise which will resolve when the asset is loaded. */ var loadAsset = function loadAsset(el) { return new Promise(function (resolve, reject) { /* * Reconstruct the passed element, this is required as inserting the Node directly * won't always fire the required onload events, even if the asset wasn't already loaded. */ var newNode = document.createElement(el.nodeName); ['id', 'rel', 'src', 'href', 'type'].forEach(function (attr) { if (el[attr]) { newNode[attr] = el[attr]; } }); // Append inline