wp/wp-includes/js/dist/block-directory.js
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    88 __webpack_require__.r(resolvers_namespaceObject);
    88 __webpack_require__.r(resolvers_namespaceObject);
    89 __webpack_require__.d(resolvers_namespaceObject, {
    89 __webpack_require__.d(resolvers_namespaceObject, {
    90   getDownloadableBlocks: () => (resolvers_getDownloadableBlocks)
    90   getDownloadableBlocks: () => (resolvers_getDownloadableBlocks)
    91 });
    91 });
    92 
    92 
    93 ;// CONCATENATED MODULE: external ["wp","plugins"]
    93 ;// external ["wp","plugins"]
    94 const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
    94 const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
    95 ;// CONCATENATED MODULE: external ["wp","hooks"]
    95 ;// external ["wp","hooks"]
    96 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
    96 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
    97 ;// CONCATENATED MODULE: external ["wp","blocks"]
    97 ;// external ["wp","blocks"]
    98 const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
    98 const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
    99 ;// CONCATENATED MODULE: external ["wp","data"]
    99 ;// external ["wp","data"]
   100 const external_wp_data_namespaceObject = window["wp"]["data"];
   100 const external_wp_data_namespaceObject = window["wp"]["data"];
   101 ;// CONCATENATED MODULE: external ["wp","element"]
   101 ;// external ["wp","element"]
   102 const external_wp_element_namespaceObject = window["wp"]["element"];
   102 const external_wp_element_namespaceObject = window["wp"]["element"];
   103 ;// CONCATENATED MODULE: external ["wp","editor"]
   103 ;// external ["wp","editor"]
   104 const external_wp_editor_namespaceObject = window["wp"]["editor"];
   104 const external_wp_editor_namespaceObject = window["wp"]["editor"];
   105 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js
   105 ;// ./node_modules/@wordpress/block-directory/build-module/store/reducer.js
   106 /**
   106 /**
   107  * WordPress dependencies
   107  * WordPress dependencies
   108  */
   108  */
   109 
   109 
   110 
   110 
   203   downloadableBlocks,
   203   downloadableBlocks,
   204   blockManagement,
   204   blockManagement,
   205   errorNotices
   205   errorNotices
   206 }));
   206 }));
   207 
   207 
   208 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
   208 ;// external ["wp","blockEditor"]
   209 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
   209 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
   210 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js
   210 ;// ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
   211 /**
   211 /**
   212  * Check if a block list contains a specific block type. Recursively searches
   212  * WordPress dependencies
   213  * through `innerBlocks` if they exist.
   213  */
   214  *
   214 
   215  * @param {Object}   blockType A block object to search for.
   215 
   216  * @param {Object[]} blocks    The list of blocks to look through.
   216 const EMPTY_ARRAY = [];
   217  *
       
   218  * @return {boolean} Whether the blockType is found.
       
   219  */
       
   220 function hasBlockType(blockType, blocks = []) {
       
   221   if (!blocks.length) {
       
   222     return false;
       
   223   }
       
   224   if (blocks.some(({
       
   225     name
       
   226   }) => name === blockType.name)) {
       
   227     return true;
       
   228   }
       
   229   for (let i = 0; i < blocks.length; i++) {
       
   230     if (hasBlockType(blockType, blocks[i].innerBlocks)) {
       
   231       return true;
       
   232     }
       
   233   }
       
   234   return false;
       
   235 }
       
   236 
       
   237 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
       
   238 /**
       
   239  * WordPress dependencies
       
   240  */
       
   241 
       
   242 
       
   243 
       
   244 /**
       
   245  * Internal dependencies
       
   246  */
       
   247 
       
   248 
   217 
   249 /**
   218 /**
   250  * Returns true if application is requesting for downloadable blocks.
   219  * Returns true if application is requesting for downloadable blocks.
   251  *
   220  *
   252  * @param {Object} state       Global application state.
   221  * @param {Object} state       Global application state.
   267  *
   236  *
   268  * @return {Array} Downloadable blocks.
   237  * @return {Array} Downloadable blocks.
   269  */
   238  */
   270 function getDownloadableBlocks(state, filterValue) {
   239 function getDownloadableBlocks(state, filterValue) {
   271   var _state$downloadableBl2;
   240   var _state$downloadableBl2;
   272   return (_state$downloadableBl2 = state.downloadableBlocks[filterValue]?.results) !== null && _state$downloadableBl2 !== void 0 ? _state$downloadableBl2 : [];
   241   return (_state$downloadableBl2 = state.downloadableBlocks[filterValue]?.results) !== null && _state$downloadableBl2 !== void 0 ? _state$downloadableBl2 : EMPTY_ARRAY;
   273 }
   242 }
   274 
   243 
   275 /**
   244 /**
   276  * Returns the block types that have been installed on the server in this
   245  * Returns the block types that have been installed on the server in this
   277  * session.
   246  * session.
   290  *
   259  *
   291  * @param {Object} state Global application state.
   260  * @param {Object} state Global application state.
   292  *
   261  *
   293  * @return {Array} Block type items.
   262  * @return {Array} Block type items.
   294  */
   263  */
   295 const getNewBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
   264 const getNewBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)(state => {
   296   const usedBlockTree = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
       
   297   const installedBlockTypes = getInstalledBlockTypes(state);
   265   const installedBlockTypes = getInstalledBlockTypes(state);
   298   return installedBlockTypes.filter(blockType => hasBlockType(blockType, usedBlockTree));
   266   if (!installedBlockTypes.length) {
   299 });
   267     return EMPTY_ARRAY;
       
   268   }
       
   269   const {
       
   270     getBlockName,
       
   271     getClientIdsWithDescendants
       
   272   } = select(external_wp_blockEditor_namespaceObject.store);
       
   273   const installedBlockNames = installedBlockTypes.map(blockType => blockType.name);
       
   274   const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => {
       
   275     const blockName = getBlockName(clientId);
       
   276     return installedBlockNames.includes(blockName) ? blockName : [];
       
   277   });
       
   278   const newBlockTypes = installedBlockTypes.filter(blockType => foundBlockNames.includes(blockType.name));
       
   279   return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
       
   280 }, state => [getInstalledBlockTypes(state), select(external_wp_blockEditor_namespaceObject.store).getClientIdsWithDescendants()]));
   300 
   281 
   301 /**
   282 /**
   302  * Returns the block types that have been installed on the server but are not
   283  * Returns the block types that have been installed on the server but are not
   303  * used in the current post.
   284  * used in the current post.
   304  *
   285  *
   305  * @param {Object} state Global application state.
   286  * @param {Object} state Global application state.
   306  *
   287  *
   307  * @return {Array} Block type items.
   288  * @return {Array} Block type items.
   308  */
   289  */
   309 const getUnusedBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
   290 const getUnusedBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)(state => {
   310   const usedBlockTree = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
       
   311   const installedBlockTypes = getInstalledBlockTypes(state);
   291   const installedBlockTypes = getInstalledBlockTypes(state);
   312   return installedBlockTypes.filter(blockType => !hasBlockType(blockType, usedBlockTree));
   292   if (!installedBlockTypes.length) {
   313 });
   293     return EMPTY_ARRAY;
       
   294   }
       
   295   const {
       
   296     getBlockName,
       
   297     getClientIdsWithDescendants
       
   298   } = select(external_wp_blockEditor_namespaceObject.store);
       
   299   const installedBlockNames = installedBlockTypes.map(blockType => blockType.name);
       
   300   const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => {
       
   301     const blockName = getBlockName(clientId);
       
   302     return installedBlockNames.includes(blockName) ? blockName : [];
       
   303   });
       
   304   const unusedBlockTypes = installedBlockTypes.filter(blockType => !foundBlockNames.includes(blockType.name));
       
   305   return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
       
   306 }, state => [getInstalledBlockTypes(state), select(external_wp_blockEditor_namespaceObject.store).getClientIdsWithDescendants()]));
   314 
   307 
   315 /**
   308 /**
   316  * Returns true if a block plugin install is in progress.
   309  * Returns true if a block plugin install is in progress.
   317  *
   310  *
   318  * @param {Object} state   Global application state.
   311  * @param {Object} state   Global application state.
   345  */
   338  */
   346 function getErrorNoticeForBlock(state, blockId) {
   339 function getErrorNoticeForBlock(state, blockId) {
   347   return state.errorNotices[blockId];
   340   return state.errorNotices[blockId];
   348 }
   341 }
   349 
   342 
   350 ;// CONCATENATED MODULE: external ["wp","i18n"]
   343 ;// external ["wp","i18n"]
   351 const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   344 const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   352 ;// CONCATENATED MODULE: external ["wp","apiFetch"]
   345 ;// external ["wp","apiFetch"]
   353 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
   346 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
   354 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
   347 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
   355 ;// CONCATENATED MODULE: external ["wp","notices"]
   348 ;// external ["wp","notices"]
   356 const external_wp_notices_namespaceObject = window["wp"]["notices"];
   349 const external_wp_notices_namespaceObject = window["wp"]["notices"];
   357 ;// CONCATENATED MODULE: external ["wp","url"]
   350 ;// external ["wp","url"]
   358 const external_wp_url_namespaceObject = window["wp"]["url"];
   351 const external_wp_url_namespaceObject = window["wp"]["url"];
   359 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/load-assets.js
   352 ;// ./node_modules/@wordpress/block-directory/build-module/store/load-assets.js
   360 /**
   353 /**
   361  * WordPress dependencies
   354  * WordPress dependencies
   362  */
   355  */
   363 
   356 
   364 
   357 
   426   for (const newAsset of newAssets) {
   419   for (const newAsset of newAssets) {
   427     await loadAsset(newAsset);
   420     await loadAsset(newAsset);
   428   }
   421   }
   429 }
   422 }
   430 
   423 
   431 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js
   424 ;// ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js
   432 /**
   425 /**
   433  * Get the plugin's direct API link out of a block-directory response.
   426  * Get the plugin's direct API link out of a block-directory response.
   434  *
   427  *
   435  * @param {Object} block The block object
   428  * @param {Object} block The block object
   436  *
   429  *
   445     return link[0].href;
   438     return link[0].href;
   446   }
   439   }
   447   return false;
   440   return false;
   448 }
   441 }
   449 
   442 
   450 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
   443 ;// ./node_modules/@wordpress/block-directory/build-module/store/actions.js
   451 /**
   444 /**
   452  * WordPress dependencies
   445  * WordPress dependencies
   453  */
   446  */
   454 
   447 
   455 
   448 
   703     type: 'CLEAR_ERROR_NOTICE',
   696     type: 'CLEAR_ERROR_NOTICE',
   704     blockId
   697     blockId
   705   };
   698   };
   706 }
   699 }
   707 
   700 
   708 ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.mjs
   701 ;// ./node_modules/tslib/tslib.es6.mjs
   709 /******************************************************************************
   702 /******************************************************************************
   710 Copyright (c) Microsoft Corporation.
   703 Copyright (c) Microsoft Corporation.
   711 
   704 
   712 Permission to use, copy, modify, and/or distribute this software for any
   705 Permission to use, copy, modify, and/or distribute this software for any
   713 purpose with or without fee is hereby granted.
   706 purpose with or without fee is hereby granted.
   718 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
   711 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
   719 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
   712 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
   720 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
   713 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
   721 PERFORMANCE OF THIS SOFTWARE.
   714 PERFORMANCE OF THIS SOFTWARE.
   722 ***************************************************************************** */
   715 ***************************************************************************** */
   723 /* global Reflect, Promise, SuppressedError, Symbol */
   716 /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
   724 
   717 
   725 var extendStatics = function(d, b) {
   718 var extendStatics = function(d, b) {
   726   extendStatics = Object.setPrototypeOf ||
   719   extendStatics = Object.setPrototypeOf ||
   727       ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
   720       ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
   728       function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
   721       function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
   829       step((generator = generator.apply(thisArg, _arguments || [])).next());
   822       step((generator = generator.apply(thisArg, _arguments || [])).next());
   830   });
   823   });
   831 }
   824 }
   832 
   825 
   833 function __generator(thisArg, body) {
   826 function __generator(thisArg, body) {
   834   var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
   827   var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
   835   return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
   828   return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
   836   function verb(n) { return function (v) { return step([n, v]); }; }
   829   function verb(n) { return function (v) { return step([n, v]); }; }
   837   function step(op) {
   830   function step(op) {
   838       if (f) throw new TypeError("Generator is already executing.");
   831       if (f) throw new TypeError("Generator is already executing.");
   839       while (g && (g = 0, op[0] && (_ = 0)), _) try {
   832       while (g && (g = 0, op[0] && (_ = 0)), _) try {
   840           if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
   833           if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
   934 }
   927 }
   935 
   928 
   936 function __asyncGenerator(thisArg, _arguments, generator) {
   929 function __asyncGenerator(thisArg, _arguments, generator) {
   937   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
   930   if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
   938   var g = generator.apply(thisArg, _arguments || []), i, q = [];
   931   var g = generator.apply(thisArg, _arguments || []), i, q = [];
   939   return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
   932   return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
   940   function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
   933   function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
       
   934   function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
   941   function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
   935   function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
   942   function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
   936   function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
   943   function fulfill(value) { resume("next", value); }
   937   function fulfill(value) { resume("next", value); }
   944   function reject(value) { resume("throw", value); }
   938   function reject(value) { resume("throw", value); }
   945   function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
   939   function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
   968   Object.defineProperty(o, "default", { enumerable: true, value: v });
   962   Object.defineProperty(o, "default", { enumerable: true, value: v });
   969 }) : function(o, v) {
   963 }) : function(o, v) {
   970   o["default"] = v;
   964   o["default"] = v;
   971 };
   965 };
   972 
   966 
       
   967 var ownKeys = function(o) {
       
   968   ownKeys = Object.getOwnPropertyNames || function (o) {
       
   969     var ar = [];
       
   970     for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
       
   971     return ar;
       
   972   };
       
   973   return ownKeys(o);
       
   974 };
       
   975 
   973 function __importStar(mod) {
   976 function __importStar(mod) {
   974   if (mod && mod.__esModule) return mod;
   977   if (mod && mod.__esModule) return mod;
   975   var result = {};
   978   var result = {};
   976   if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
   979   if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
   977   __setModuleDefault(result, mod);
   980   __setModuleDefault(result, mod);
   978   return result;
   981   return result;
   979 }
   982 }
   980 
   983 
   981 function __importDefault(mod) {
   984 function __importDefault(mod) {
  1001 }
  1004 }
  1002 
  1005 
  1003 function __addDisposableResource(env, value, async) {
  1006 function __addDisposableResource(env, value, async) {
  1004   if (value !== null && value !== void 0) {
  1007   if (value !== null && value !== void 0) {
  1005     if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
  1008     if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
  1006     var dispose;
  1009     var dispose, inner;
  1007     if (async) {
  1010     if (async) {
  1008         if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
  1011       if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
  1009         dispose = value[Symbol.asyncDispose];
  1012       dispose = value[Symbol.asyncDispose];
  1010     }
  1013     }
  1011     if (dispose === void 0) {
  1014     if (dispose === void 0) {
  1012         if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
  1015       if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
  1013         dispose = value[Symbol.dispose];
  1016       dispose = value[Symbol.dispose];
       
  1017       if (async) inner = dispose;
  1014     }
  1018     }
  1015     if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
  1019     if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
       
  1020     if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
  1016     env.stack.push({ value: value, dispose: dispose, async: async });
  1021     env.stack.push({ value: value, dispose: dispose, async: async });
  1017   }
  1022   }
  1018   else if (async) {
  1023   else if (async) {
  1019     env.stack.push({ async: true });
  1024     env.stack.push({ async: true });
  1020   }
  1025   }
  1029 function __disposeResources(env) {
  1034 function __disposeResources(env) {
  1030   function fail(e) {
  1035   function fail(e) {
  1031     env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
  1036     env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
  1032     env.hasError = true;
  1037     env.hasError = true;
  1033   }
  1038   }
       
  1039   var r, s = 0;
  1034   function next() {
  1040   function next() {
  1035     while (env.stack.length) {
  1041     while (r = env.stack.pop()) {
  1036       var rec = env.stack.pop();
       
  1037       try {
  1042       try {
  1038         var result = rec.dispose && rec.dispose.call(rec.value);
  1043         if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
  1039         if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
  1044         if (r.dispose) {
       
  1045           var result = r.dispose.call(r.value);
       
  1046           if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
       
  1047         }
       
  1048         else s |= 1;
  1040       }
  1049       }
  1041       catch (e) {
  1050       catch (e) {
  1042           fail(e);
  1051         fail(e);
  1043       }
  1052       }
  1044     }
  1053     }
       
  1054     if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
  1045     if (env.hasError) throw env.error;
  1055     if (env.hasError) throw env.error;
  1046   }
  1056   }
  1047   return next();
  1057   return next();
       
  1058 }
       
  1059 
       
  1060 function __rewriteRelativeImportExtension(path, preserveJsx) {
       
  1061   if (typeof path === "string" && /^\.\.?\//.test(path)) {
       
  1062       return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
       
  1063           return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
       
  1064       });
       
  1065   }
       
  1066   return path;
  1048 }
  1067 }
  1049 
  1068 
  1050 /* harmony default export */ const tslib_es6 = ({
  1069 /* harmony default export */ const tslib_es6 = ({
  1051   __extends,
  1070   __extends,
  1052   __assign,
  1071   __assign,
  1053   __rest,
  1072   __rest,
  1054   __decorate,
  1073   __decorate,
  1055   __param,
  1074   __param,
       
  1075   __esDecorate,
       
  1076   __runInitializers,
       
  1077   __propKey,
       
  1078   __setFunctionName,
  1056   __metadata,
  1079   __metadata,
  1057   __awaiter,
  1080   __awaiter,
  1058   __generator,
  1081   __generator,
  1059   __createBinding,
  1082   __createBinding,
  1060   __exportStar,
  1083   __exportStar,
  1073   __classPrivateFieldGet,
  1096   __classPrivateFieldGet,
  1074   __classPrivateFieldSet,
  1097   __classPrivateFieldSet,
  1075   __classPrivateFieldIn,
  1098   __classPrivateFieldIn,
  1076   __addDisposableResource,
  1099   __addDisposableResource,
  1077   __disposeResources,
  1100   __disposeResources,
       
  1101   __rewriteRelativeImportExtension,
  1078 });
  1102 });
  1079 
  1103 
  1080 ;// CONCATENATED MODULE: ./node_modules/lower-case/dist.es2015/index.js
  1104 ;// ./node_modules/lower-case/dist.es2015/index.js
  1081 /**
  1105 /**
  1082  * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
  1106  * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
  1083  */
  1107  */
  1084 var SUPPORTED_LOCALE = {
  1108 var SUPPORTED_LOCALE = {
  1085     tr: {
  1109     tr: {
  1124  */
  1148  */
  1125 function lowerCase(str) {
  1149 function lowerCase(str) {
  1126     return str.toLowerCase();
  1150     return str.toLowerCase();
  1127 }
  1151 }
  1128 
  1152 
  1129 ;// CONCATENATED MODULE: ./node_modules/no-case/dist.es2015/index.js
  1153 ;// ./node_modules/no-case/dist.es2015/index.js
  1130 
  1154 
  1131 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
  1155 // Support camel case ("camelCase" -> "camel Case" and "CAMELCase" -> "CAMEL Case").
  1132 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  1156 var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
  1133 // Remove all non-word characters.
  1157 // Remove all non-word characters.
  1134 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  1158 var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
  1156     if (re instanceof RegExp)
  1180     if (re instanceof RegExp)
  1157         return input.replace(re, value);
  1181         return input.replace(re, value);
  1158     return re.reduce(function (input, re) { return input.replace(re, value); }, input);
  1182     return re.reduce(function (input, re) { return input.replace(re, value); }, input);
  1159 }
  1183 }
  1160 
  1184 
  1161 ;// CONCATENATED MODULE: ./node_modules/pascal-case/dist.es2015/index.js
  1185 ;// ./node_modules/pascal-case/dist.es2015/index.js
  1162 
  1186 
  1163 
  1187 
  1164 function pascalCaseTransform(input, index) {
  1188 function pascalCaseTransform(input, index) {
  1165     var firstChar = input.charAt(0);
  1189     var firstChar = input.charAt(0);
  1166     var lowerChars = input.substr(1).toLowerCase();
  1190     var lowerChars = input.substr(1).toLowerCase();
  1175 function pascalCase(input, options) {
  1199 function pascalCase(input, options) {
  1176     if (options === void 0) { options = {}; }
  1200     if (options === void 0) { options = {}; }
  1177     return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  1201     return noCase(input, __assign({ delimiter: "", transform: pascalCaseTransform }, options));
  1178 }
  1202 }
  1179 
  1203 
  1180 ;// CONCATENATED MODULE: ./node_modules/camel-case/dist.es2015/index.js
  1204 ;// ./node_modules/camel-case/dist.es2015/index.js
  1181 
  1205 
  1182 
  1206 
  1183 function camelCaseTransform(input, index) {
  1207 function camelCaseTransform(input, index) {
  1184     if (index === 0)
  1208     if (index === 0)
  1185         return input.toLowerCase();
  1209         return input.toLowerCase();
  1193 function camelCase(input, options) {
  1217 function camelCase(input, options) {
  1194     if (options === void 0) { options = {}; }
  1218     if (options === void 0) { options = {}; }
  1195     return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
  1219     return pascalCase(input, __assign({ transform: camelCaseTransform }, options));
  1196 }
  1220 }
  1197 
  1221 
  1198 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
  1222 ;// ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
  1199 /**
  1223 /**
  1200  * External dependencies
  1224  * External dependencies
  1201  */
  1225  */
  1202 
  1226 
  1203 
  1227 
  1221     const results = await external_wp_apiFetch_default()({
  1245     const results = await external_wp_apiFetch_default()({
  1222       path: `wp/v2/block-directory/search?term=${filterValue}`
  1246       path: `wp/v2/block-directory/search?term=${filterValue}`
  1223     });
  1247     });
  1224     const blocks = results.map(result => Object.fromEntries(Object.entries(result).map(([key, value]) => [camelCase(key), value])));
  1248     const blocks = results.map(result => Object.fromEntries(Object.entries(result).map(([key, value]) => [camelCase(key), value])));
  1225     dispatch(receiveDownloadableBlocks(blocks, filterValue));
  1249     dispatch(receiveDownloadableBlocks(blocks, filterValue));
  1226   } catch {}
  1250   } catch {
       
  1251     dispatch(receiveDownloadableBlocks([], filterValue));
       
  1252   }
  1227 };
  1253 };
  1228 
  1254 
  1229 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/index.js
  1255 ;// ./node_modules/@wordpress/block-directory/build-module/store/index.js
  1230 /**
  1256 /**
  1231  * WordPress dependencies
  1257  * WordPress dependencies
  1232  */
  1258  */
  1233 
  1259 
  1234 
  1260 
  1267  * @type {Object}
  1293  * @type {Object}
  1268  */
  1294  */
  1269 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
  1295 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, storeConfig);
  1270 (0,external_wp_data_namespaceObject.register)(store);
  1296 (0,external_wp_data_namespaceObject.register)(store);
  1271 
  1297 
  1272 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js
  1298 ;// ./node_modules/@wordpress/block-directory/build-module/components/auto-block-uninstaller/index.js
  1273 /**
  1299 /**
  1274  * WordPress dependencies
  1300  * WordPress dependencies
  1275  */
  1301  */
  1276 
  1302 
  1277 
  1303 
  1303     }
  1329     }
  1304   }, [shouldRemoveBlockTypes]);
  1330   }, [shouldRemoveBlockTypes]);
  1305   return null;
  1331   return null;
  1306 }
  1332 }
  1307 
  1333 
  1308 ;// CONCATENATED MODULE: external ["wp","compose"]
  1334 ;// external ["wp","compose"]
  1309 const external_wp_compose_namespaceObject = window["wp"]["compose"];
  1335 const external_wp_compose_namespaceObject = window["wp"]["compose"];
  1310 ;// CONCATENATED MODULE: external ["wp","components"]
  1336 ;// external ["wp","components"]
  1311 const external_wp_components_namespaceObject = window["wp"]["components"];
  1337 const external_wp_components_namespaceObject = window["wp"]["components"];
  1312 ;// CONCATENATED MODULE: external ["wp","coreData"]
  1338 ;// external ["wp","coreData"]
  1313 const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
  1339 const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
  1314 ;// CONCATENATED MODULE: external ["wp","htmlEntities"]
  1340 ;// ./node_modules/clsx/dist/clsx.mjs
       
  1341 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
       
  1342 ;// external ["wp","htmlEntities"]
  1315 const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  1343 const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
  1316 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/icon/index.js
  1344 ;// ./node_modules/@wordpress/icons/build-module/icon/index.js
  1317 /**
  1345 /**
  1318  * WordPress dependencies
  1346  * WordPress dependencies
  1319  */
  1347  */
  1320 
  1348 
  1321 
  1349 
  1323 
  1351 
  1324 /**
  1352 /**
  1325  * Return an SVG icon.
  1353  * Return an SVG icon.
  1326  *
  1354  *
  1327  * @param {IconProps}                                 props icon is the SVG component to render
  1355  * @param {IconProps}                                 props icon is the SVG component to render
  1328  *                                                          size is a number specifiying the icon size in pixels
  1356  *                                                          size is a number specifying the icon size in pixels
  1329  *                                                          Other props will be passed to wrapped SVG component
  1357  *                                                          Other props will be passed to wrapped SVG component
  1330  * @param {import('react').ForwardedRef<HTMLElement>} ref   The forwarded ref to the SVG element.
  1358  * @param {import('react').ForwardedRef<HTMLElement>} ref   The forwarded ref to the SVG element.
  1331  *
  1359  *
  1332  * @return {JSX.Element}  Icon component
  1360  * @return {JSX.Element}  Icon component
  1333  */
  1361  */
  1343     ref
  1371     ref
  1344   });
  1372   });
  1345 }
  1373 }
  1346 /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
  1374 /* harmony default export */ const icon = ((0,external_wp_element_namespaceObject.forwardRef)(Icon));
  1347 
  1375 
  1348 ;// CONCATENATED MODULE: external ["wp","primitives"]
  1376 ;// external ["wp","primitives"]
  1349 const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
  1377 const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
  1350 ;// CONCATENATED MODULE: external "ReactJSXRuntime"
  1378 ;// external "ReactJSXRuntime"
  1351 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
  1379 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
  1352 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
  1380 ;// ./node_modules/@wordpress/icons/build-module/library/star-filled.js
  1353 /**
  1381 /**
  1354  * WordPress dependencies
  1382  * WordPress dependencies
  1355  */
  1383  */
  1356 
  1384 
  1357 
  1385 
  1362     d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
  1390     d: "M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"
  1363   })
  1391   })
  1364 });
  1392 });
  1365 /* harmony default export */ const star_filled = (starFilled);
  1393 /* harmony default export */ const star_filled = (starFilled);
  1366 
  1394 
  1367 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-half.js
  1395 ;// ./node_modules/@wordpress/icons/build-module/library/star-half.js
  1368 /**
  1396 /**
  1369  * WordPress dependencies
  1397  * WordPress dependencies
  1370  */
  1398  */
  1371 
  1399 
  1372 
  1400 
  1377     d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"
  1405     d: "M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"
  1378   })
  1406   })
  1379 });
  1407 });
  1380 /* harmony default export */ const star_half = (starHalf);
  1408 /* harmony default export */ const star_half = (starHalf);
  1381 
  1409 
  1382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
  1410 ;// ./node_modules/@wordpress/icons/build-module/library/star-empty.js
  1383 /**
  1411 /**
  1384  * WordPress dependencies
  1412  * WordPress dependencies
  1385  */
  1413  */
  1386 
  1414 
  1387 
  1415 
  1394     clipRule: "evenodd"
  1422     clipRule: "evenodd"
  1395   })
  1423   })
  1396 });
  1424 });
  1397 /* harmony default export */ const star_empty = (starEmpty);
  1425 /* harmony default export */ const star_empty = (starEmpty);
  1398 
  1426 
  1399 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js
  1427 ;// ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/stars.js
  1400 /**
  1428 /**
  1401  * WordPress dependencies
  1429  * WordPress dependencies
  1402  */
  1430  */
  1403 
       
  1404 
  1431 
  1405 
  1432 
  1406 
  1433 
  1407 function Stars({
  1434 function Stars({
  1408   rating
  1435   rating
  1410   const stars = Math.round(rating / 0.5) * 0.5;
  1437   const stars = Math.round(rating / 0.5) * 0.5;
  1411   const fullStarCount = Math.floor(rating);
  1438   const fullStarCount = Math.floor(rating);
  1412   const halfStarCount = Math.ceil(rating - fullStarCount);
  1439   const halfStarCount = Math.ceil(rating - fullStarCount);
  1413   const emptyStarCount = 5 - (fullStarCount + halfStarCount);
  1440   const emptyStarCount = 5 - (fullStarCount + halfStarCount);
  1414   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
  1441   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
  1415     "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: number of stars. */
  1442     "aria-label": (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: number of stars. */
  1416     (0,external_wp_i18n_namespaceObject.__)('%s out of 5 stars'), stars),
  1443     (0,external_wp_i18n_namespaceObject.__)('%s out of 5 stars'), stars),
  1417     children: [Array.from({
  1444     children: [Array.from({
  1418       length: fullStarCount
  1445       length: fullStarCount
  1419     }).map((_, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, {
  1446     }).map((_, i) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, {
  1420       className: "block-directory-block-ratings__star-full",
  1447       className: "block-directory-block-ratings__star-full",
  1435     }, `empty_stars_${i}`))]
  1462     }, `empty_stars_${i}`))]
  1436   });
  1463   });
  1437 }
  1464 }
  1438 /* harmony default export */ const stars = (Stars);
  1465 /* harmony default export */ const stars = (Stars);
  1439 
  1466 
  1440 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js
  1467 ;// ./node_modules/@wordpress/block-directory/build-module/components/block-ratings/index.js
  1441 /**
  1468 /**
  1442  * Internal dependencies
  1469  * Internal dependencies
  1443  */
  1470  */
  1444 
  1471 
  1445 
  1472 
  1451     rating: rating
  1478     rating: rating
  1452   })
  1479   })
  1453 });
  1480 });
  1454 /* harmony default export */ const block_ratings = (BlockRatings);
  1481 /* harmony default export */ const block_ratings = (BlockRatings);
  1455 
  1482 
  1456 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js
  1483 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-icon/index.js
  1457 /**
  1484 /**
  1458  * WordPress dependencies
  1485  * WordPress dependencies
  1459  */
  1486  */
  1460 
  1487 
  1461 
  1488 
  1473     showColors: true
  1500     showColors: true
  1474   });
  1501   });
  1475 }
  1502 }
  1476 /* harmony default export */ const downloadable_block_icon = (DownloadableBlockIcon);
  1503 /* harmony default export */ const downloadable_block_icon = (DownloadableBlockIcon);
  1477 
  1504 
  1478 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js
  1505 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-notice/index.js
  1479 /**
  1506 /**
  1480  * WordPress dependencies
  1507  * WordPress dependencies
  1481  */
  1508  */
  1482 
  1509 
  1483 
  1510 
  1484 
  1511 
  1485 /**
  1512 /**
  1486  * Internal dependencies
  1513  * Internal dependencies
  1487  */
  1514  */
  1488 
       
  1489 
  1515 
  1490 
  1516 
  1491 const DownloadableBlockNotice = ({
  1517 const DownloadableBlockNotice = ({
  1492   block
  1518   block
  1493 }) => {
  1519 }) => {
  1503     })
  1529     })
  1504   });
  1530   });
  1505 };
  1531 };
  1506 /* harmony default export */ const downloadable_block_notice = (DownloadableBlockNotice);
  1532 /* harmony default export */ const downloadable_block_notice = (DownloadableBlockNotice);
  1507 
  1533 
  1508 ;// CONCATENATED MODULE: external ["wp","privateApis"]
  1534 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js
  1509 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
  1535 /**
  1510 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/lock-unlock.js
  1536  * External dependencies
  1511 /**
  1537  */
  1512  * WordPress dependencies
  1538 
  1513  */
  1539 
  1514 
       
  1515 const {
       
  1516   lock,
       
  1517   unlock
       
  1518 } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/block-directory');
       
  1519 
       
  1520 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-block-list-item/index.js
       
  1521 /**
  1540 /**
  1522  * WordPress dependencies
  1541  * WordPress dependencies
  1523  */
  1542  */
  1524 
  1543 
  1525 
  1544 
  1534 
  1553 
  1535 
  1554 
  1536 
  1555 
  1537 
  1556 
  1538 
  1557 
  1539 
       
  1540 
       
  1541 
       
  1542 const {
       
  1543   CompositeItemV2: CompositeItem
       
  1544 } = unlock(external_wp_components_namespaceObject.privateApis);
       
  1545 
       
  1546 // Return the appropriate block item label, given the block data and status.
  1558 // Return the appropriate block item label, given the block data and status.
       
  1559 
  1547 function getDownloadableBlockLabel({
  1560 function getDownloadableBlockLabel({
  1548   title,
  1561   title,
  1549   rating,
  1562   rating,
  1550   ratingCount
  1563   ratingCount
  1551 }, {
  1564 }, {
  1553   isInstalled,
  1566   isInstalled,
  1554   isInstalling
  1567   isInstalling
  1555 }) {
  1568 }) {
  1556   const stars = Math.round(rating / 0.5) * 0.5;
  1569   const stars = Math.round(rating / 0.5) * 0.5;
  1557   if (!isInstalled && hasNotice) {
  1570   if (!isInstalled && hasNotice) {
  1558     /* translators: %1$s: block title */
  1571     /* translators: %s: block title */
  1559     return (0,external_wp_i18n_namespaceObject.sprintf)('Retry installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1572     return (0,external_wp_i18n_namespaceObject.sprintf)('Retry installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1560   }
  1573   }
  1561   if (isInstalled) {
  1574   if (isInstalled) {
  1562     /* translators: %1$s: block title */
  1575     /* translators: %s: block title */
  1563     return (0,external_wp_i18n_namespaceObject.sprintf)('Add %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1576     return (0,external_wp_i18n_namespaceObject.sprintf)('Add %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1564   }
  1577   }
  1565   if (isInstalling) {
  1578   if (isInstalling) {
  1566     /* translators: %1$s: block title */
  1579     /* translators: %s: block title */
  1567     return (0,external_wp_i18n_namespaceObject.sprintf)('Installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1580     return (0,external_wp_i18n_namespaceObject.sprintf)('Installing %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1568   }
  1581   }
  1569 
  1582 
  1570   // No ratings yet, just use the title.
  1583   // No ratings yet, just use the title.
  1571   if (ratingCount < 1) {
  1584   if (ratingCount < 1) {
  1572     /* translators: %1$s: block title */
  1585     /* translators: %s: block title */
  1573     return (0,external_wp_i18n_namespaceObject.sprintf)('Install %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1586     return (0,external_wp_i18n_namespaceObject.sprintf)('Install %s.', (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title));
  1574   }
  1587   }
  1575   return (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: block title, %2$s: average rating, %3$s: total ratings count. */
  1588   return (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: 1: block title, 2: average rating, 3: total ratings count. */
  1576   (0,external_wp_i18n_namespaceObject._n)('Install %1$s. %2$s stars with %3$s review.', 'Install %1$s. %2$s stars with %3$s reviews.', ratingCount), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), stars, ratingCount);
  1589   (0,external_wp_i18n_namespaceObject._n)('Install %1$s. %2$s stars with %3$s review.', 'Install %1$s. %2$s stars with %3$s reviews.', ratingCount), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), stars, ratingCount);
  1577 }
  1590 }
  1578 function DownloadableBlockListItem({
  1591 function DownloadableBlockListItem({
  1579   composite,
       
  1580   item,
  1592   item,
  1581   onClick
  1593   onClick
  1582 }) {
  1594 }) {
  1583   const {
  1595   const {
  1584     author,
  1596     author,
  1610   if (isInstalled) {
  1622   if (isInstalled) {
  1611     statusText = (0,external_wp_i18n_namespaceObject.__)('Installed!');
  1623     statusText = (0,external_wp_i18n_namespaceObject.__)('Installed!');
  1612   } else if (isInstalling) {
  1624   } else if (isInstalling) {
  1613     statusText = (0,external_wp_i18n_namespaceObject.__)('Installing…');
  1625     statusText = (0,external_wp_i18n_namespaceObject.__)('Installing…');
  1614   }
  1626   }
  1615   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(CompositeItem, {
  1627   const itemLabel = getDownloadableBlockLabel(item, {
  1616     render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  1628     hasNotice,
  1617       __experimentalIsFocusable: true,
  1629     isInstalled,
  1618       type: "button",
  1630     isInstalling
  1619       role: "option",
  1631   });
  1620       className: "block-directory-downloadable-block-list-item",
  1632   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, {
  1621       isBusy: isInstalling,
  1633     placement: "top",
       
  1634     text: itemLabel,
       
  1635     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Composite.Item, {
       
  1636       className: dist_clsx('block-directory-downloadable-block-list-item', isInstalling && 'is-installing'),
       
  1637       accessibleWhenDisabled: true,
       
  1638       disabled: isInstalling || !isInstallable,
  1622       onClick: event => {
  1639       onClick: event => {
  1623         event.preventDefault();
  1640         event.preventDefault();
  1624         onClick();
  1641         onClick();
  1625       },
  1642       },
  1626       label: getDownloadableBlockLabel(item, {
  1643       "aria-label": itemLabel,
  1627         hasNotice,
  1644       type: "button",
  1628         isInstalled,
  1645       role: "option",
  1629         isInstalling
  1646       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1630       }),
  1647         className: "block-directory-downloadable-block-list-item__icon",
  1631       showTooltip: true,
  1648         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_icon, {
  1632       tooltipPosition: "top center"
  1649           icon: icon,
  1633     }),
  1650           title: title
  1634     store: composite,
  1651         }), isInstalling ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1635     disabled: isInstalling || !isInstallable,
  1652           className: "block-directory-downloadable-block-list-item__spinner",
  1636     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1653           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
  1637       className: "block-directory-downloadable-block-list-item__icon",
  1654         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_ratings, {
  1638       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_icon, {
  1655           rating: rating
  1639         icon: icon,
  1656         })]
  1640         title: title
  1657       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
  1641       }), isInstalling ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1658         className: "block-directory-downloadable-block-list-item__details",
  1642         className: "block-directory-downloadable-block-list-item__spinner",
  1659         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1643         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {})
  1660           className: "block-directory-downloadable-block-list-item__title",
  1644       }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_ratings, {
  1661           children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)(/* translators: 1: block title. 2: author name. */
  1645         rating: rating
  1662           (0,external_wp_i18n_namespaceObject.__)('%1$s <span>by %2$s</span>'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), author), {
  1646       })]
  1663             span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1647     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("span", {
  1664               className: "block-directory-downloadable-block-list-item__author"
  1648       className: "block-directory-downloadable-block-list-item__details",
  1665             })
  1649       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
  1650         className: "block-directory-downloadable-block-list-item__title",
       
  1651         children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %1$s: block title, %2$s: author name. */
       
  1652         (0,external_wp_i18n_namespaceObject.__)('%1$s <span>by %2$s</span>'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title), author), {
       
  1653           span: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
  1654             className: "block-directory-downloadable-block-list-item__author"
       
  1655           })
  1666           })
  1656         })
  1667         }), hasNotice ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_notice, {
  1657       }), hasNotice ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_notice, {
  1668           block: item
  1658         block: item
  1669         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1659       }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1670           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1660         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
  1671             className: "block-directory-downloadable-block-list-item__desc",
  1661           className: "block-directory-downloadable-block-list-item__desc",
  1672             children: !!statusText ? statusText : (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(description)
  1662           children: !!statusText ? statusText : (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(description)
  1673           }), isInstallable && !(isInstalled || isInstalling) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
  1663         }), isInstallable && !(isInstalled || isInstalling) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
  1674             children: (0,external_wp_i18n_namespaceObject.__)('Install block')
  1664           children: (0,external_wp_i18n_namespaceObject.__)('Install block')
  1675           })]
  1665         })]
  1676         })]
  1666       })]
  1677       })]
  1667     })]
  1678     })
  1668   });
  1679   });
  1669 }
  1680 }
  1670 /* harmony default export */ const downloadable_block_list_item = (DownloadableBlockListItem);
  1681 /* harmony default export */ const downloadable_block_list_item = (DownloadableBlockListItem);
  1671 
  1682 
  1672 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js
  1683 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-list/index.js
  1673 /**
  1684 /**
  1674  * WordPress dependencies
  1685  * WordPress dependencies
  1675  */
  1686  */
  1676 
  1687 
  1677 
  1688 
  1682  * Internal dependencies
  1693  * Internal dependencies
  1683  */
  1694  */
  1684 
  1695 
  1685 
  1696 
  1686 
  1697 
  1687 
       
  1688 const {
       
  1689   CompositeV2: Composite,
       
  1690   useCompositeStoreV2: useCompositeStore
       
  1691 } = unlock(external_wp_components_namespaceObject.privateApis);
       
  1692 const noop = () => {};
  1698 const noop = () => {};
  1693 function DownloadableBlocksList({
  1699 function DownloadableBlocksList({
  1694   items,
  1700   items,
  1695   onHover = noop,
  1701   onHover = noop,
  1696   onSelect
  1702   onSelect
  1697 }) {
  1703 }) {
  1698   const composite = useCompositeStore();
       
  1699   const {
  1704   const {
  1700     installBlockType
  1705     installBlockType
  1701   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1706   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1702   if (!items.length) {
  1707   if (!items.length) {
  1703     return null;
  1708     return null;
  1704   }
  1709   }
  1705   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Composite, {
  1710   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Composite, {
  1706     store: composite,
       
  1707     role: "listbox",
  1711     role: "listbox",
  1708     className: "block-directory-downloadable-blocks-list",
  1712     className: "block-directory-downloadable-blocks-list",
  1709     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Blocks available for install'),
  1713     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Blocks available for install'),
  1710     children: items.map(item => {
  1714     children: items.map(item => {
  1711       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_list_item, {
  1715       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(downloadable_block_list_item, {
  1712         composite: composite,
       
  1713         onClick: () => {
  1716         onClick: () => {
  1714           // Check if the block is registered (`getBlockType`
  1717           // Check if the block is registered (`getBlockType`
  1715           // will return an object). If so, insert the block.
  1718           // will return an object). If so, insert the block.
  1716           // This prevents installing existing plugins.
  1719           // This prevents installing existing plugins.
  1717           if ((0,external_wp_blocks_namespaceObject.getBlockType)(item.name)) {
  1720           if ((0,external_wp_blocks_namespaceObject.getBlockType)(item.name)) {
  1731     })
  1734     })
  1732   });
  1735   });
  1733 }
  1736 }
  1734 /* harmony default export */ const downloadable_blocks_list = (DownloadableBlocksList);
  1737 /* harmony default export */ const downloadable_blocks_list = (DownloadableBlocksList);
  1735 
  1738 
  1736 ;// CONCATENATED MODULE: external ["wp","a11y"]
  1739 ;// external ["wp","a11y"]
  1737 const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
  1740 const external_wp_a11y_namespaceObject = window["wp"]["a11y"];
  1738 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.js
  1741 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/inserter-panel.js
  1739 /**
  1742 /**
  1740  * WordPress dependencies
  1743  * WordPress dependencies
  1741  */
  1744  */
  1742 
       
  1743 
       
  1744 
  1745 
  1745 
  1746 
  1746 
  1747 
  1747 
  1748 
  1748 function DownloadableBlocksInserterPanel({
  1749 function DownloadableBlocksInserterPanel({
  1750   downloadableItems,
  1751   downloadableItems,
  1751   hasLocalBlocks
  1752   hasLocalBlocks
  1752 }) {
  1753 }) {
  1753   const count = downloadableItems.length;
  1754   const count = downloadableItems.length;
  1754   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1755   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1755     (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %d: number of available blocks. */
  1756     (0,external_wp_a11y_namespaceObject.speak)((0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %d: number of available blocks. */
  1756     (0,external_wp_i18n_namespaceObject._n)('%d additional block is available to install.', '%d additional blocks are available to install.', count), count));
  1757     (0,external_wp_i18n_namespaceObject._n)('%d additional block is available to install.', '%d additional blocks are available to install.', count), count));
  1757   }, [count]);
  1758   }, [count]);
  1758   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1759   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1759     children: [!hasLocalBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  1760     children: [!hasLocalBlocks && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  1760       className: "block-directory-downloadable-blocks-panel__no-local",
  1761       className: "block-directory-downloadable-blocks-panel__no-local",
  1776     })]
  1777     })]
  1777   });
  1778   });
  1778 }
  1779 }
  1779 /* harmony default export */ const inserter_panel = (DownloadableBlocksInserterPanel);
  1780 /* harmony default export */ const inserter_panel = (DownloadableBlocksInserterPanel);
  1780 
  1781 
  1781 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
  1782 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/no-results.js
  1782 /**
  1783 /**
  1783  * WordPress dependencies
  1784  * WordPress dependencies
  1784  */
  1785  */
  1785 
       
  1786 
       
  1787 const blockDefault = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  1788   xmlns: "http://www.w3.org/2000/svg",
       
  1789   viewBox: "0 0 24 24",
       
  1790   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  1791     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"
       
  1792   })
       
  1793 });
       
  1794 /* harmony default export */ const block_default = (blockDefault);
       
  1795 
       
  1796 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/no-results.js
       
  1797 /**
       
  1798  * WordPress dependencies
       
  1799  */
       
  1800 
       
  1801 
       
  1802 
       
  1803 
  1786 
  1804 
  1787 
  1805 
  1788 
  1806 function DownloadableBlocksNoResults() {
  1789 function DownloadableBlocksNoResults() {
  1807   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1790   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1808     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1791     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1809       className: "block-editor-inserter__no-results",
  1792       className: "block-editor-inserter__no-results",
  1810       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(icon, {
  1793       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  1811         className: "block-editor-inserter__no-results-icon",
       
  1812         icon: block_default
       
  1813       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
  1814         children: (0,external_wp_i18n_namespaceObject.__)('No results found.')
  1794         children: (0,external_wp_i18n_namespaceObject.__)('No results found.')
  1815       })]
  1795       })
  1816     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1796     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1817       className: "block-editor-inserter__tips",
  1797       className: "block-editor-inserter__tips",
  1818       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Tip, {
  1798       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Tip, {
  1819         children: [(0,external_wp_i18n_namespaceObject.__)('Interested in creating your own block?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ExternalLink, {
  1799         children: [(0,external_wp_i18n_namespaceObject.__)('Interested in creating your own block?'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("br", {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ExternalLink, {
  1820           href: "https://developer.wordpress.org/block-editor/",
  1800           href: "https://developer.wordpress.org/block-editor/",
  1824     })]
  1804     })]
  1825   });
  1805   });
  1826 }
  1806 }
  1827 /* harmony default export */ const no_results = (DownloadableBlocksNoResults);
  1807 /* harmony default export */ const no_results = (DownloadableBlocksNoResults);
  1828 
  1808 
  1829 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js
  1809 ;// ./node_modules/@wordpress/block-directory/build-module/components/downloadable-blocks-panel/index.js
  1830 /**
  1810 /**
  1831  * WordPress dependencies
  1811  * WordPress dependencies
  1832  */
  1812  */
  1833 
  1813 
  1834 
  1814 
  1842 
  1822 
  1843 
  1823 
  1844 
  1824 
  1845 
  1825 
  1846 
  1826 
  1847 
  1827 const downloadable_blocks_panel_EMPTY_ARRAY = [];
  1848 
       
  1849 const EMPTY_ARRAY = [];
       
  1850 const useDownloadableBlocks = filterValue => (0,external_wp_data_namespaceObject.useSelect)(select => {
  1828 const useDownloadableBlocks = filterValue => (0,external_wp_data_namespaceObject.useSelect)(select => {
  1851   const {
  1829   const {
  1852     getDownloadableBlocks,
  1830     getDownloadableBlocks,
  1853     isRequestingDownloadableBlocks,
  1831     isRequestingDownloadableBlocks,
  1854     getInstalledBlockTypes
  1832     getInstalledBlockTypes
  1855   } = select(store);
  1833   } = select(store);
  1856   const hasPermission = select(external_wp_coreData_namespaceObject.store).canUser('read', 'block-directory/search');
  1834   const hasPermission = select(external_wp_coreData_namespaceObject.store).canUser('read', 'block-directory/search');
  1857   let downloadableBlocks = EMPTY_ARRAY;
  1835   let downloadableBlocks = downloadable_blocks_panel_EMPTY_ARRAY;
  1858   if (hasPermission) {
  1836   if (hasPermission) {
  1859     downloadableBlocks = getDownloadableBlocks(filterValue);
  1837     downloadableBlocks = getDownloadableBlocks(filterValue);
  1860 
  1838 
  1861     // Filter out blocks that are already installed.
  1839     // Filter out blocks that are already installed.
  1862     const installedBlockTypes = getInstalledBlockTypes();
  1840     const installedBlockTypes = getInstalledBlockTypes();
  1877       downloadableBlocks = installableBlocks;
  1855       downloadableBlocks = installableBlocks;
  1878     }
  1856     }
  1879 
  1857 
  1880     // Return identical empty array when there are no blocks
  1858     // Return identical empty array when there are no blocks
  1881     if (downloadableBlocks.length === 0) {
  1859     if (downloadableBlocks.length === 0) {
  1882       downloadableBlocks = EMPTY_ARRAY;
  1860       downloadableBlocks = downloadable_blocks_panel_EMPTY_ARRAY;
  1883     }
  1861     }
  1884   }
  1862   }
  1885   return {
  1863   return {
  1886     hasPermission,
  1864     hasPermission,
  1887     downloadableBlocks,
  1865     downloadableBlocks,
  1933       onHover: onHover
  1911       onHover: onHover
  1934     })
  1912     })
  1935   });
  1913   });
  1936 }
  1914 }
  1937 
  1915 
  1938 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js
  1916 ;// ./node_modules/@wordpress/block-directory/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js
  1939 /**
  1917 /**
  1940  * WordPress dependencies
  1918  * WordPress dependencies
  1941  */
  1919  */
  1942 
  1920 
  1943 
  1921 
  1974     }
  1952     }
  1975   });
  1953   });
  1976 }
  1954 }
  1977 /* harmony default export */ const inserter_menu_downloadable_blocks_panel = (InserterMenuDownloadableBlocksPanel);
  1955 /* harmony default export */ const inserter_menu_downloadable_blocks_panel = (InserterMenuDownloadableBlocksPanel);
  1978 
  1956 
  1979 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/components/compact-list/index.js
  1957 ;// ./node_modules/@wordpress/block-directory/build-module/components/compact-list/index.js
  1980 /**
  1958 /**
  1981  * WordPress dependencies
  1959  * WordPress dependencies
  1982  */
  1960  */
  1983 
  1961 
  1984 
  1962 
  1985 /**
  1963 /**
  1986  * Internal dependencies
  1964  * Internal dependencies
  1987  */
  1965  */
  1988 
       
  1989 
  1966 
  1990 
  1967 
  1991 function CompactList({
  1968 function CompactList({
  1992   items
  1969   items
  1993 }) {
  1970 }) {
  2011         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1988         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  2012           className: "block-directory-compact-list__item-title",
  1989           className: "block-directory-compact-list__item-title",
  2013           children: title
  1990           children: title
  2014         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1991         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  2015           className: "block-directory-compact-list__item-author",
  1992           className: "block-directory-compact-list__item-author",
  2016           children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Name of the block author. */
  1993           children: (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: Name of the block author. */
  2017           (0,external_wp_i18n_namespaceObject.__)('By %s'), author)
  1994           (0,external_wp_i18n_namespaceObject.__)('By %s'), author)
  2018         })]
  1995         })]
  2019       })]
  1996       })]
  2020     }, id))
  1997     }, id))
  2021   });
  1998   });
  2022 }
  1999 }
  2023 
  2000 
  2024 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.js
  2001 ;// ./node_modules/@wordpress/block-directory/build-module/plugins/installed-blocks-pre-publish-panel/index.js
  2025 var _window$wp$editor;
       
  2026 /**
  2002 /**
  2027  * WordPress dependencies
  2003  * WordPress dependencies
  2028  */
  2004  */
  2029 
  2005 
  2030 
  2006 
  2034  * Internal dependencies
  2010  * Internal dependencies
  2035  */
  2011  */
  2036 
  2012 
  2037 
  2013 
  2038 
  2014 
  2039 // We shouldn't import the editor package directly
       
  2040 // because it would include the wp-editor in all pages loading the block-directory script.
       
  2041 
       
  2042 
       
  2043 const {
       
  2044   PluginPrePublishPanel
       
  2045 } = (_window$wp$editor = window?.wp?.editor) !== null && _window$wp$editor !== void 0 ? _window$wp$editor : {};
       
  2046 function InstalledBlocksPrePublishPanel() {
  2015 function InstalledBlocksPrePublishPanel() {
  2047   const newBlockTypes = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getNewBlockTypes(), []);
  2016   const newBlockTypes = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getNewBlockTypes(), []);
  2048   if (!newBlockTypes.length) {
  2017   if (!newBlockTypes.length) {
  2049     return null;
  2018     return null;
  2050   }
  2019   }
  2051   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(PluginPrePublishPanel, {
  2020   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_editor_namespaceObject.PluginPrePublishPanel, {
  2052     icon: block_default,
       
  2053     title: (0,external_wp_i18n_namespaceObject.sprintf)(
  2021     title: (0,external_wp_i18n_namespaceObject.sprintf)(
  2054     // translators: %d: number of blocks (number).
  2022     // translators: %d: number of blocks (number).
  2055     (0,external_wp_i18n_namespaceObject._n)('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length),
  2023     (0,external_wp_i18n_namespaceObject._n)('Added: %d block', 'Added: %d blocks', newBlockTypes.length), newBlockTypes.length),
  2056     initialOpen: true,
  2024     initialOpen: true,
  2057     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  2025     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  2061       items: newBlockTypes
  2029       items: newBlockTypes
  2062     })]
  2030     })]
  2063   });
  2031   });
  2064 }
  2032 }
  2065 
  2033 
  2066 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js
  2034 ;// ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/install-button.js
  2067 /**
  2035 /**
  2068  * WordPress dependencies
  2036  * WordPress dependencies
  2069  */
  2037  */
  2070 
  2038 
  2071 
  2039 
  2089   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  2057   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  2090   const {
  2058   const {
  2091     replaceBlock
  2059     replaceBlock
  2092   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  2060   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  2093   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  2061   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  2062     __next40pxDefaultSize: true,
  2094     onClick: () => installBlockType(block).then(success => {
  2063     onClick: () => installBlockType(block).then(success => {
  2095       if (success) {
  2064       if (success) {
  2096         const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(block.name);
  2065         const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(block.name);
  2097         const [originalBlock] = (0,external_wp_blocks_namespaceObject.parse)(attributes.originalContent);
  2066         const [originalBlock] = (0,external_wp_blocks_namespaceObject.parse)(attributes.originalContent);
  2098         if (originalBlock && blockType) {
  2067         if (originalBlock && blockType) {
  2099           replaceBlock(clientId, (0,external_wp_blocks_namespaceObject.createBlock)(blockType.name, originalBlock.attributes, originalBlock.innerBlocks));
  2068           replaceBlock(clientId, (0,external_wp_blocks_namespaceObject.createBlock)(blockType.name, originalBlock.attributes, originalBlock.innerBlocks));
  2100         }
  2069         }
  2101       }
  2070       }
  2102     }),
  2071     }),
  2103     __experimentalIsFocusable: true,
  2072     accessibleWhenDisabled: true,
  2104     disabled: isInstallingBlock,
  2073     disabled: isInstallingBlock,
  2105     isBusy: isInstallingBlock,
  2074     isBusy: isInstallingBlock,
  2106     variant: "primary",
  2075     variant: "primary",
  2107     children: (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */
  2076     children: (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */
  2108     (0,external_wp_i18n_namespaceObject.__)('Install %s'), block.title)
  2077     (0,external_wp_i18n_namespaceObject.__)('Install %s'), block.title)
  2109   });
  2078   });
  2110 }
  2079 }
  2111 
  2080 
  2112 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js
  2081 ;// ./node_modules/@wordpress/block-directory/build-module/plugins/get-install-missing/index.js
  2113 /**
  2082 /**
  2114  * WordPress dependencies
  2083  * WordPress dependencies
  2115  */
  2084  */
  2116 
  2085 
  2117 
  2086 
  2122 
  2091 
  2123 
  2092 
  2124 /**
  2093 /**
  2125  * Internal dependencies
  2094  * Internal dependencies
  2126  */
  2095  */
  2127 
       
  2128 
  2096 
  2129 
  2097 
  2130 
  2098 
  2131 const getInstallMissing = OriginalComponent => props => {
  2099 const getInstallMissing = OriginalComponent => props => {
  2132   const {
  2100   const {
  2184       canInsertBlockType,
  2152       canInsertBlockType,
  2185       getBlockRootClientId
  2153       getBlockRootClientId
  2186     } = select(external_wp_blockEditor_namespaceObject.store);
  2154     } = select(external_wp_blockEditor_namespaceObject.store);
  2187     return canInsertBlockType('core/html', getBlockRootClientId(clientId));
  2155     return canInsertBlockType('core/html', getBlockRootClientId(clientId));
  2188   }, [clientId]);
  2156   }, [clientId]);
  2189   let messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */
  2157   let messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */
  2190   (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'), originalBlock.title || originalName);
  2158   (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'), originalBlock.title || originalName);
  2191   const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstallButton, {
  2159   const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstallButton, {
  2192     block: originalBlock,
  2160     block: originalBlock,
  2193     attributes: props.attributes,
  2161     attributes: props.attributes,
  2194     clientId: props.clientId
  2162     clientId: props.clientId
  2195   }, "install")];
  2163   }, "install")];
  2196   if (hasContent && hasHTMLBlock) {
  2164   if (hasContent && hasHTMLBlock) {
  2197     messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: block name */
  2165     messageHTML = (0,external_wp_i18n_namespaceObject.sprintf)(/* translators: %s: block name */
  2198     (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName);
  2166     (0,external_wp_i18n_namespaceObject.__)('Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'), originalBlock.title || originalName);
  2199     actions.push( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  2167     actions.push(/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  2168       __next40pxDefaultSize: true,
  2200       onClick: convertToHTML,
  2169       onClick: convertToHTML,
  2201       variant: "tertiary",
  2170       variant: "tertiary",
  2202       children: (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')
  2171       children: (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')
  2203     }, "convert"));
  2172     }, "convert"));
  2204   }
  2173   }
  2212     })]
  2181     })]
  2213   });
  2182   });
  2214 };
  2183 };
  2215 /* harmony default export */ const get_install_missing = (getInstallMissing);
  2184 /* harmony default export */ const get_install_missing = (getInstallMissing);
  2216 
  2185 
  2217 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/plugins/index.js
  2186 ;// ./node_modules/@wordpress/block-directory/build-module/plugins/index.js
  2218 /**
  2187 /**
  2219  * WordPress dependencies
  2188  * WordPress dependencies
  2220  */
  2189  */
  2221 
  2190 
  2222 
  2191 
  2227 
  2196 
  2228 
  2197 
  2229 
  2198 
  2230 
  2199 
  2231 
  2200 
  2232 
       
  2233 
       
  2234 (0,external_wp_plugins_namespaceObject.registerPlugin)('block-directory', {
  2201 (0,external_wp_plugins_namespaceObject.registerPlugin)('block-directory', {
       
  2202   // The icon is explicitly set to undefined to prevent PluginPrePublishPanel
       
  2203   // from rendering the fallback icon pluginIcon.
       
  2204   icon: undefined,
  2235   render() {
  2205   render() {
  2236     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  2206     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  2237       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AutoBlockUninstaller, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter_menu_downloadable_blocks_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstalledBlocksPrePublishPanel, {})]
  2207       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AutoBlockUninstaller, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(inserter_menu_downloadable_blocks_panel, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InstalledBlocksPrePublishPanel, {})]
  2238     });
  2208     });
  2239   }
  2209   }
  2244   }
  2214   }
  2245   settings.edit = get_install_missing(settings.edit);
  2215   settings.edit = get_install_missing(settings.edit);
  2246   return settings;
  2216   return settings;
  2247 });
  2217 });
  2248 
  2218 
  2249 ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/index.js
  2219 ;// ./node_modules/@wordpress/block-directory/build-module/index.js
  2250 /**
  2220 /**
  2251  * Internal dependencies
  2221  * Internal dependencies
  2252  */
  2222  */
  2253 
  2223 
  2254 
  2224