wp/wp-includes/js/dist/edit-widgets.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /******/ (function() { // webpackBootstrap
     1 /******/ (() => { // webpackBootstrap
     2 /******/ 	var __webpack_modules__ = ({
     2 /******/ 	"use strict";
     3 
     3 /******/ 	// The require scope
     4 /***/ 4403:
     4 /******/ 	var __webpack_require__ = {};
     5 /***/ (function(module, exports) {
       
     6 
       
     7 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
       
     8   Copyright (c) 2018 Jed Watson.
       
     9   Licensed under the MIT License (MIT), see
       
    10   http://jedwatson.github.io/classnames
       
    11 */
       
    12 /* global define */
       
    13 
       
    14 (function () {
       
    15 	'use strict';
       
    16 
       
    17 	var hasOwn = {}.hasOwnProperty;
       
    18 
       
    19 	function classNames() {
       
    20 		var classes = [];
       
    21 
       
    22 		for (var i = 0; i < arguments.length; i++) {
       
    23 			var arg = arguments[i];
       
    24 			if (!arg) continue;
       
    25 
       
    26 			var argType = typeof arg;
       
    27 
       
    28 			if (argType === 'string' || argType === 'number') {
       
    29 				classes.push(arg);
       
    30 			} else if (Array.isArray(arg)) {
       
    31 				if (arg.length) {
       
    32 					var inner = classNames.apply(null, arg);
       
    33 					if (inner) {
       
    34 						classes.push(inner);
       
    35 					}
       
    36 				}
       
    37 			} else if (argType === 'object') {
       
    38 				if (arg.toString === Object.prototype.toString) {
       
    39 					for (var key in arg) {
       
    40 						if (hasOwn.call(arg, key) && arg[key]) {
       
    41 							classes.push(key);
       
    42 						}
       
    43 					}
       
    44 				} else {
       
    45 					classes.push(arg.toString());
       
    46 				}
       
    47 			}
       
    48 		}
       
    49 
       
    50 		return classes.join(' ');
       
    51 	}
       
    52 
       
    53 	if ( true && module.exports) {
       
    54 		classNames.default = classNames;
       
    55 		module.exports = classNames;
       
    56 	} else if (true) {
       
    57 		// register as 'classnames', consistent with npm package name
       
    58 		!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
       
    59 			return classNames;
       
    60 		}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
       
    61 		__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
       
    62 	} else {}
       
    63 }());
       
    64 
       
    65 
       
    66 /***/ })
       
    67 
       
    68 /******/ 	});
       
    69 /************************************************************************/
       
    70 /******/ 	// The module cache
       
    71 /******/ 	var __webpack_module_cache__ = {};
       
    72 /******/ 	
       
    73 /******/ 	// The require function
       
    74 /******/ 	function __webpack_require__(moduleId) {
       
    75 /******/ 		// Check if module is in cache
       
    76 /******/ 		var cachedModule = __webpack_module_cache__[moduleId];
       
    77 /******/ 		if (cachedModule !== undefined) {
       
    78 /******/ 			return cachedModule.exports;
       
    79 /******/ 		}
       
    80 /******/ 		// Create a new module (and put it into the cache)
       
    81 /******/ 		var module = __webpack_module_cache__[moduleId] = {
       
    82 /******/ 			// no module.id needed
       
    83 /******/ 			// no module.loaded needed
       
    84 /******/ 			exports: {}
       
    85 /******/ 		};
       
    86 /******/ 	
       
    87 /******/ 		// Execute the module function
       
    88 /******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
       
    89 /******/ 	
       
    90 /******/ 		// Return the exports of the module
       
    91 /******/ 		return module.exports;
       
    92 /******/ 	}
       
    93 /******/ 	
     5 /******/ 	
    94 /************************************************************************/
     6 /************************************************************************/
    95 /******/ 	/* webpack/runtime/compat get default export */
     7 /******/ 	/* webpack/runtime/compat get default export */
    96 /******/ 	!function() {
     8 /******/ 	(() => {
    97 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
     9 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
    98 /******/ 		__webpack_require__.n = function(module) {
    10 /******/ 		__webpack_require__.n = (module) => {
    99 /******/ 			var getter = module && module.__esModule ?
    11 /******/ 			var getter = module && module.__esModule ?
   100 /******/ 				function() { return module['default']; } :
    12 /******/ 				() => (module['default']) :
   101 /******/ 				function() { return module; };
    13 /******/ 				() => (module);
   102 /******/ 			__webpack_require__.d(getter, { a: getter });
    14 /******/ 			__webpack_require__.d(getter, { a: getter });
   103 /******/ 			return getter;
    15 /******/ 			return getter;
   104 /******/ 		};
    16 /******/ 		};
   105 /******/ 	}();
    17 /******/ 	})();
   106 /******/ 	
    18 /******/ 	
   107 /******/ 	/* webpack/runtime/define property getters */
    19 /******/ 	/* webpack/runtime/define property getters */
   108 /******/ 	!function() {
    20 /******/ 	(() => {
   109 /******/ 		// define getter functions for harmony exports
    21 /******/ 		// define getter functions for harmony exports
   110 /******/ 		__webpack_require__.d = function(exports, definition) {
    22 /******/ 		__webpack_require__.d = (exports, definition) => {
   111 /******/ 			for(var key in definition) {
    23 /******/ 			for(var key in definition) {
   112 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
    24 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
   113 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
    25 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
   114 /******/ 				}
    26 /******/ 				}
   115 /******/ 			}
    27 /******/ 			}
   116 /******/ 		};
    28 /******/ 		};
   117 /******/ 	}();
    29 /******/ 	})();
   118 /******/ 	
    30 /******/ 	
   119 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
    31 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
   120 /******/ 	!function() {
    32 /******/ 	(() => {
   121 /******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
    33 /******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
   122 /******/ 	}();
    34 /******/ 	})();
   123 /******/ 	
    35 /******/ 	
   124 /******/ 	/* webpack/runtime/make namespace object */
    36 /******/ 	/* webpack/runtime/make namespace object */
   125 /******/ 	!function() {
    37 /******/ 	(() => {
   126 /******/ 		// define __esModule on exports
    38 /******/ 		// define __esModule on exports
   127 /******/ 		__webpack_require__.r = function(exports) {
    39 /******/ 		__webpack_require__.r = (exports) => {
   128 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    40 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
   129 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    41 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
   130 /******/ 			}
    42 /******/ 			}
   131 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
    43 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
   132 /******/ 		};
    44 /******/ 		};
   133 /******/ 	}();
    45 /******/ 	})();
   134 /******/ 	
    46 /******/ 	
   135 /************************************************************************/
    47 /************************************************************************/
   136 var __webpack_exports__ = {};
    48 var __webpack_exports__ = {};
   137 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
       
   138 !function() {
       
   139 "use strict";
       
   140 // ESM COMPAT FLAG
    49 // ESM COMPAT FLAG
   141 __webpack_require__.r(__webpack_exports__);
    50 __webpack_require__.r(__webpack_exports__);
   142 
    51 
   143 // EXPORTS
    52 // EXPORTS
   144 __webpack_require__.d(__webpack_exports__, {
    53 __webpack_require__.d(__webpack_exports__, {
   145   "initialize": function() { return /* binding */ initialize; },
    54   initialize: () => (/* binding */ initialize),
   146   "reinitializeEditor": function() { return /* binding */ reinitializeEditor; }
    55   initializeEditor: () => (/* binding */ initializeEditor),
       
    56   reinitializeEditor: () => (/* binding */ reinitializeEditor),
       
    57   store: () => (/* reexport */ store_store)
   147 });
    58 });
   148 
    59 
   149 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
    60 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/actions.js
   150 var actions_namespaceObject = {};
    61 var actions_namespaceObject = {};
   151 __webpack_require__.r(actions_namespaceObject);
    62 __webpack_require__.r(actions_namespaceObject);
   152 __webpack_require__.d(actions_namespaceObject, {
    63 __webpack_require__.d(actions_namespaceObject, {
   153   "disableComplementaryArea": function() { return disableComplementaryArea; },
    64   closeModal: () => (closeModal),
   154   "enableComplementaryArea": function() { return enableComplementaryArea; },
    65   disableComplementaryArea: () => (disableComplementaryArea),
   155   "pinItem": function() { return pinItem; },
    66   enableComplementaryArea: () => (enableComplementaryArea),
   156   "setFeatureDefaults": function() { return setFeatureDefaults; },
    67   openModal: () => (openModal),
   157   "setFeatureValue": function() { return setFeatureValue; },
    68   pinItem: () => (pinItem),
   158   "toggleFeature": function() { return toggleFeature; },
    69   setDefaultComplementaryArea: () => (setDefaultComplementaryArea),
   159   "unpinItem": function() { return unpinItem; }
    70   setFeatureDefaults: () => (setFeatureDefaults),
       
    71   setFeatureValue: () => (setFeatureValue),
       
    72   toggleFeature: () => (toggleFeature),
       
    73   unpinItem: () => (unpinItem)
   160 });
    74 });
   161 
    75 
   162 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
    76 // NAMESPACE OBJECT: ./node_modules/@wordpress/interface/build-module/store/selectors.js
   163 var selectors_namespaceObject = {};
    77 var selectors_namespaceObject = {};
   164 __webpack_require__.r(selectors_namespaceObject);
    78 __webpack_require__.r(selectors_namespaceObject);
   165 __webpack_require__.d(selectors_namespaceObject, {
    79 __webpack_require__.d(selectors_namespaceObject, {
   166   "getActiveComplementaryArea": function() { return getActiveComplementaryArea; },
    80   getActiveComplementaryArea: () => (getActiveComplementaryArea),
   167   "isFeatureActive": function() { return isFeatureActive; },
    81   isComplementaryAreaLoading: () => (isComplementaryAreaLoading),
   168   "isItemPinned": function() { return isItemPinned; }
    82   isFeatureActive: () => (isFeatureActive),
       
    83   isItemPinned: () => (isItemPinned),
       
    84   isModalActive: () => (isModalActive)
   169 });
    85 });
   170 
    86 
   171 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js
    87 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/actions.js
   172 var store_actions_namespaceObject = {};
    88 var store_actions_namespaceObject = {};
   173 __webpack_require__.r(store_actions_namespaceObject);
    89 __webpack_require__.r(store_actions_namespaceObject);
   174 __webpack_require__.d(store_actions_namespaceObject, {
    90 __webpack_require__.d(store_actions_namespaceObject, {
   175   "closeGeneralSidebar": function() { return closeGeneralSidebar; },
    91   closeGeneralSidebar: () => (closeGeneralSidebar),
   176   "moveBlockToWidgetArea": function() { return moveBlockToWidgetArea; },
    92   moveBlockToWidgetArea: () => (moveBlockToWidgetArea),
   177   "persistStubPost": function() { return persistStubPost; },
    93   persistStubPost: () => (persistStubPost),
   178   "saveEditedWidgetAreas": function() { return saveEditedWidgetAreas; },
    94   saveEditedWidgetAreas: () => (saveEditedWidgetAreas),
   179   "saveWidgetArea": function() { return saveWidgetArea; },
    95   saveWidgetArea: () => (saveWidgetArea),
   180   "saveWidgetAreas": function() { return saveWidgetAreas; },
    96   saveWidgetAreas: () => (saveWidgetAreas),
   181   "setIsInserterOpened": function() { return setIsInserterOpened; },
    97   setIsInserterOpened: () => (setIsInserterOpened),
   182   "setIsListViewOpened": function() { return setIsListViewOpened; },
    98   setIsListViewOpened: () => (setIsListViewOpened),
   183   "setIsWidgetAreaOpen": function() { return setIsWidgetAreaOpen; },
    99   setIsWidgetAreaOpen: () => (setIsWidgetAreaOpen),
   184   "setWidgetAreasOpenState": function() { return setWidgetAreasOpenState; },
   100   setWidgetAreasOpenState: () => (setWidgetAreasOpenState),
   185   "setWidgetIdForClientId": function() { return setWidgetIdForClientId; }
   101   setWidgetIdForClientId: () => (setWidgetIdForClientId)
   186 });
   102 });
   187 
   103 
   188 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
   104 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
   189 var resolvers_namespaceObject = {};
   105 var resolvers_namespaceObject = {};
   190 __webpack_require__.r(resolvers_namespaceObject);
   106 __webpack_require__.r(resolvers_namespaceObject);
   191 __webpack_require__.d(resolvers_namespaceObject, {
   107 __webpack_require__.d(resolvers_namespaceObject, {
   192   "getWidgetAreas": function() { return getWidgetAreas; },
   108   getWidgetAreas: () => (getWidgetAreas),
   193   "getWidgets": function() { return getWidgets; }
   109   getWidgets: () => (getWidgets)
   194 });
   110 });
   195 
   111 
   196 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
   112 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
   197 var store_selectors_namespaceObject = {};
   113 var store_selectors_namespaceObject = {};
   198 __webpack_require__.r(store_selectors_namespaceObject);
   114 __webpack_require__.r(store_selectors_namespaceObject);
   199 __webpack_require__.d(store_selectors_namespaceObject, {
   115 __webpack_require__.d(store_selectors_namespaceObject, {
   200   "__experimentalGetInsertionPoint": function() { return __experimentalGetInsertionPoint; },
   116   __experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint),
   201   "canInsertBlockInWidgetArea": function() { return canInsertBlockInWidgetArea; },
   117   canInsertBlockInWidgetArea: () => (canInsertBlockInWidgetArea),
   202   "getEditedWidgetAreas": function() { return getEditedWidgetAreas; },
   118   getEditedWidgetAreas: () => (getEditedWidgetAreas),
   203   "getIsWidgetAreaOpen": function() { return getIsWidgetAreaOpen; },
   119   getIsWidgetAreaOpen: () => (getIsWidgetAreaOpen),
   204   "getParentWidgetAreaBlock": function() { return getParentWidgetAreaBlock; },
   120   getParentWidgetAreaBlock: () => (getParentWidgetAreaBlock),
   205   "getReferenceWidgetBlocks": function() { return getReferenceWidgetBlocks; },
   121   getReferenceWidgetBlocks: () => (getReferenceWidgetBlocks),
   206   "getWidget": function() { return getWidget; },
   122   getWidget: () => (getWidget),
   207   "getWidgetAreaForWidgetId": function() { return getWidgetAreaForWidgetId; },
   123   getWidgetAreaForWidgetId: () => (getWidgetAreaForWidgetId),
   208   "getWidgetAreas": function() { return selectors_getWidgetAreas; },
   124   getWidgetAreas: () => (selectors_getWidgetAreas),
   209   "getWidgets": function() { return selectors_getWidgets; },
   125   getWidgets: () => (selectors_getWidgets),
   210   "isInserterOpened": function() { return isInserterOpened; },
   126   isInserterOpened: () => (isInserterOpened),
   211   "isListViewOpened": function() { return isListViewOpened; },
   127   isListViewOpened: () => (isListViewOpened),
   212   "isSavingWidgetAreas": function() { return isSavingWidgetAreas; }
   128   isSavingWidgetAreas: () => (isSavingWidgetAreas)
       
   129 });
       
   130 
       
   131 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js
       
   132 var private_selectors_namespaceObject = {};
       
   133 __webpack_require__.r(private_selectors_namespaceObject);
       
   134 __webpack_require__.d(private_selectors_namespaceObject, {
       
   135   getInserterSidebarToggleRef: () => (getInserterSidebarToggleRef),
       
   136   getListViewToggleRef: () => (getListViewToggleRef)
   213 });
   137 });
   214 
   138 
   215 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
   139 // NAMESPACE OBJECT: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
   216 var widget_area_namespaceObject = {};
   140 var widget_area_namespaceObject = {};
   217 __webpack_require__.r(widget_area_namespaceObject);
   141 __webpack_require__.r(widget_area_namespaceObject);
   218 __webpack_require__.d(widget_area_namespaceObject, {
   142 __webpack_require__.d(widget_area_namespaceObject, {
   219   "metadata": function() { return metadata; },
   143   metadata: () => (metadata),
   220   "name": function() { return widget_area_name; },
   144   name: () => (widget_area_name),
   221   "settings": function() { return settings; }
   145   settings: () => (settings)
   222 });
   146 });
   223 
   147 
       
   148 ;// CONCATENATED MODULE: external ["wp","blocks"]
       
   149 const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
       
   150 ;// CONCATENATED MODULE: external ["wp","data"]
       
   151 const external_wp_data_namespaceObject = window["wp"]["data"];
       
   152 ;// CONCATENATED MODULE: external ["wp","deprecated"]
       
   153 const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
       
   154 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
   224 ;// CONCATENATED MODULE: external ["wp","element"]
   155 ;// CONCATENATED MODULE: external ["wp","element"]
   225 var external_wp_element_namespaceObject = window["wp"]["element"];
   156 const external_wp_element_namespaceObject = window["wp"]["element"];
   226 ;// CONCATENATED MODULE: external ["wp","blocks"]
       
   227 var external_wp_blocks_namespaceObject = window["wp"]["blocks"];
       
   228 ;// CONCATENATED MODULE: external ["wp","data"]
       
   229 var external_wp_data_namespaceObject = window["wp"]["data"];
       
   230 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
   157 ;// CONCATENATED MODULE: external ["wp","blockLibrary"]
   231 var external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
   158 const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
   232 ;// CONCATENATED MODULE: external ["wp","coreData"]
   159 ;// CONCATENATED MODULE: external ["wp","coreData"]
   233 var external_wp_coreData_namespaceObject = window["wp"]["coreData"];
   160 const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
   234 ;// CONCATENATED MODULE: external ["wp","widgets"]
   161 ;// CONCATENATED MODULE: external ["wp","widgets"]
   235 var external_wp_widgets_namespaceObject = window["wp"]["widgets"];
   162 const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
   236 ;// CONCATENATED MODULE: external ["wp","preferences"]
   163 ;// CONCATENATED MODULE: external ["wp","preferences"]
   237 var external_wp_preferences_namespaceObject = window["wp"]["preferences"];
   164 const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
   238 ;// CONCATENATED MODULE: external ["wp","apiFetch"]
   165 ;// CONCATENATED MODULE: external ["wp","apiFetch"]
   239 var external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
   166 const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
   240 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
   167 var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
   241 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js
   168 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/reducer.js
   242 /**
   169 /**
   243  * WordPress dependencies
   170  * WordPress dependencies
   244  */
   171  */
   245 
   172 
       
   173 
   246 /**
   174 /**
   247  * Controls the open state of the widget areas.
   175  * Controls the open state of the widget areas.
   248  *
   176  *
   249  * @param {Object} state  Redux state.
   177  * @param {Object} state  Redux state.
   250  * @param {Object} action Redux action.
   178  * @param {Object} action Redux action.
   251  *
   179  *
   252  * @return {Array} Updated state.
   180  * @return {Array} Updated state.
   253  */
   181  */
   254 
   182 function widgetAreasOpenState(state = {}, action) {
   255 function widgetAreasOpenState() {
       
   256   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
       
   257   let action = arguments.length > 1 ? arguments[1] : undefined;
       
   258   const {
   183   const {
   259     type
   184     type
   260   } = action;
   185   } = action;
   261 
       
   262   switch (type) {
   186   switch (type) {
   263     case 'SET_WIDGET_AREAS_OPEN_STATE':
   187     case 'SET_WIDGET_AREAS_OPEN_STATE':
   264       {
   188       {
   265         return action.widgetAreasOpenState;
   189         return action.widgetAreasOpenState;
   266       }
   190       }
   267 
       
   268     case 'SET_IS_WIDGET_AREA_OPEN':
   191     case 'SET_IS_WIDGET_AREA_OPEN':
   269       {
   192       {
   270         const {
   193         const {
   271           clientId,
   194           clientId,
   272           isOpen
   195           isOpen
   273         } = action;
   196         } = action;
   274         return { ...state,
   197         return {
       
   198           ...state,
   275           [clientId]: isOpen
   199           [clientId]: isOpen
   276         };
   200         };
   277       }
   201       }
   278 
       
   279     default:
   202     default:
   280       {
   203       {
   281         return state;
   204         return state;
   282       }
   205       }
   283   }
   206   }
   284 }
   207 }
       
   208 
   285 /**
   209 /**
   286  * Reducer to set the block inserter panel open or closed.
   210  * Reducer to set the block inserter panel open or closed.
   287  *
   211  *
   288  * Note: this reducer interacts with the list view panel reducer
   212  * Note: this reducer interacts with the list view panel reducer
   289  * to make sure that only one of the two panels is open at the same time.
   213  * to make sure that only one of the two panels is open at the same time.
   290  *
   214  *
   291  * @param {Object} state  Current state.
   215  * @param {Object} state  Current state.
   292  * @param {Object} action Dispatched action.
   216  * @param {Object} action Dispatched action.
   293  */
   217  */
   294 
   218 function blockInserterPanel(state = false, action) {
   295 function blockInserterPanel() {
       
   296   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
   297   let action = arguments.length > 1 ? arguments[1] : undefined;
       
   298 
       
   299   switch (action.type) {
   219   switch (action.type) {
   300     case 'SET_IS_LIST_VIEW_OPENED':
   220     case 'SET_IS_LIST_VIEW_OPENED':
   301       return action.isOpen ? false : state;
   221       return action.isOpen ? false : state;
   302 
       
   303     case 'SET_IS_INSERTER_OPENED':
   222     case 'SET_IS_INSERTER_OPENED':
   304       return action.value;
   223       return action.value;
   305   }
   224   }
   306 
       
   307   return state;
   225   return state;
   308 }
   226 }
       
   227 
   309 /**
   228 /**
   310  * Reducer to set the list view panel open or closed.
   229  * Reducer to set the list view panel open or closed.
   311  *
   230  *
   312  * Note: this reducer interacts with the inserter panel reducer
   231  * Note: this reducer interacts with the inserter panel reducer
   313  * to make sure that only one of the two panels is open at the same time.
   232  * to make sure that only one of the two panels is open at the same time.
   314  *
   233  *
   315  * @param {Object} state  Current state.
   234  * @param {Object} state  Current state.
   316  * @param {Object} action Dispatched action.
   235  * @param {Object} action Dispatched action.
   317  */
   236  */
   318 
   237 function listViewPanel(state = false, action) {
   319 function listViewPanel() {
       
   320   let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
       
   321   let action = arguments.length > 1 ? arguments[1] : undefined;
       
   322 
       
   323   switch (action.type) {
   238   switch (action.type) {
   324     case 'SET_IS_INSERTER_OPENED':
   239     case 'SET_IS_INSERTER_OPENED':
   325       return action.value ? false : state;
   240       return action.value ? false : state;
   326 
       
   327     case 'SET_IS_LIST_VIEW_OPENED':
   241     case 'SET_IS_LIST_VIEW_OPENED':
   328       return action.isOpen;
   242       return action.isOpen;
   329   }
   243   }
   330 
       
   331   return state;
   244   return state;
   332 }
   245 }
   333 /* harmony default export */ var reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
   246 
       
   247 /**
       
   248  * This reducer does nothing aside initializing a ref to the list view toggle.
       
   249  * We will have a unique ref per "editor" instance.
       
   250  *
       
   251  * @param {Object} state
       
   252  * @return {Object} Reference to the list view toggle button.
       
   253  */
       
   254 function listViewToggleRef(state = {
       
   255   current: null
       
   256 }) {
       
   257   return state;
       
   258 }
       
   259 
       
   260 /**
       
   261  * This reducer does nothing aside initializing a ref to the inserter sidebar toggle.
       
   262  * We will have a unique ref per "editor" instance.
       
   263  *
       
   264  * @param {Object} state
       
   265  * @return {Object} Reference to the inserter sidebar toggle button.
       
   266  */
       
   267 function inserterSidebarToggleRef(state = {
       
   268   current: null
       
   269 }) {
       
   270   return state;
       
   271 }
       
   272 /* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
   334   blockInserterPanel,
   273   blockInserterPanel,
       
   274   inserterSidebarToggleRef,
   335   listViewPanel,
   275   listViewPanel,
       
   276   listViewToggleRef,
   336   widgetAreasOpenState
   277   widgetAreasOpenState
   337 }));
   278 }));
   338 
   279 
   339 ;// CONCATENATED MODULE: external ["wp","i18n"]
   280 ;// CONCATENATED MODULE: external ["wp","i18n"]
   340 var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   281 const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
   341 ;// CONCATENATED MODULE: external ["wp","notices"]
   282 ;// CONCATENATED MODULE: external ["wp","notices"]
   342 var external_wp_notices_namespaceObject = window["wp"]["notices"];
   283 const external_wp_notices_namespaceObject = window["wp"]["notices"];
   343 ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
   284 ;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
   344 function _extends() {
   285 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);
   345   _extends = Object.assign ? Object.assign.bind() : function (target) {
       
   346     for (var i = 1; i < arguments.length; i++) {
       
   347       var source = arguments[i];
       
   348 
       
   349       for (var key in source) {
       
   350         if (Object.prototype.hasOwnProperty.call(source, key)) {
       
   351           target[key] = source[key];
       
   352         }
       
   353       }
       
   354     }
       
   355 
       
   356     return target;
       
   357   };
       
   358   return _extends.apply(this, arguments);
       
   359 }
       
   360 // EXTERNAL MODULE: ./node_modules/classnames/index.js
       
   361 var classnames = __webpack_require__(4403);
       
   362 var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
       
   363 ;// CONCATENATED MODULE: external ["wp","components"]
   286 ;// CONCATENATED MODULE: external ["wp","components"]
   364 var external_wp_components_namespaceObject = window["wp"]["components"];
   287 const external_wp_components_namespaceObject = window["wp"]["components"];
   365 ;// CONCATENATED MODULE: external ["wp","primitives"]
   288 ;// CONCATENATED MODULE: external ["wp","primitives"]
   366 var external_wp_primitives_namespaceObject = window["wp"]["primitives"];
   289 const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
       
   290 ;// CONCATENATED MODULE: external "ReactJSXRuntime"
       
   291 const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
   367 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
   292 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/check.js
   368 
   293 /**
   369 
   294  * WordPress dependencies
   370 /**
   295  */
   371  * WordPress dependencies
   296 
   372  */
   297 
   373 
   298 const check = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   374 const check = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   375   xmlns: "http://www.w3.org/2000/svg",
   299   xmlns: "http://www.w3.org/2000/svg",
   376   viewBox: "0 0 24 24"
   300   viewBox: "0 0 24 24",
   377 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   301   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   378   d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
   302     d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
   379 }));
   303   })
   380 /* harmony default export */ var library_check = (check);
   304 });
       
   305 /* harmony default export */ const library_check = (check);
   381 
   306 
   382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
   307 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-filled.js
   383 
   308 /**
   384 
   309  * WordPress dependencies
   385 /**
   310  */
   386  * WordPress dependencies
   311 
   387  */
   312 
   388 
   313 const starFilled = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   389 const starFilled = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   390   xmlns: "http://www.w3.org/2000/svg",
   314   xmlns: "http://www.w3.org/2000/svg",
   391   viewBox: "0 0 24 24"
   315   viewBox: "0 0 24 24",
   392 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   316   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   393   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"
   317     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"
   394 }));
   318   })
   395 /* harmony default export */ var star_filled = (starFilled);
   319 });
       
   320 /* harmony default export */ const star_filled = (starFilled);
   396 
   321 
   397 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
   322 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/star-empty.js
   398 
   323 /**
   399 
   324  * WordPress dependencies
   400 /**
   325  */
   401  * WordPress dependencies
   326 
   402  */
   327 
   403 
   328 const starEmpty = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   404 const starEmpty = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   405   xmlns: "http://www.w3.org/2000/svg",
   329   xmlns: "http://www.w3.org/2000/svg",
   406   viewBox: "0 0 24 24"
   330   viewBox: "0 0 24 24",
   407 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   331   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   408   fillRule: "evenodd",
   332     fillRule: "evenodd",
   409   d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.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.39z",
   333     d: "M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.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.39z",
   410   clipRule: "evenodd"
   334     clipRule: "evenodd"
   411 }));
   335   })
   412 /* harmony default export */ var star_empty = (starEmpty);
   336 });
       
   337 /* harmony default export */ const star_empty = (starEmpty);
   413 
   338 
   414 ;// CONCATENATED MODULE: external ["wp","viewport"]
   339 ;// CONCATENATED MODULE: external ["wp","viewport"]
   415 var external_wp_viewport_namespaceObject = window["wp"]["viewport"];
   340 const external_wp_viewport_namespaceObject = window["wp"]["viewport"];
       
   341 ;// CONCATENATED MODULE: external ["wp","compose"]
       
   342 const external_wp_compose_namespaceObject = window["wp"]["compose"];
   416 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
   343 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close-small.js
   417 
   344 /**
   418 
   345  * WordPress dependencies
   419 /**
   346  */
   420  * WordPress dependencies
   347 
   421  */
   348 
   422 
   349 const closeSmall = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
   423 const closeSmall = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
   424   xmlns: "http://www.w3.org/2000/svg",
   350   xmlns: "http://www.w3.org/2000/svg",
   425   viewBox: "0 0 24 24"
   351   viewBox: "0 0 24 24",
   426 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
   352   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
   427   d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
   353     d: "M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"
   428 }));
   354   })
   429 /* harmony default export */ var close_small = (closeSmall);
   355 });
   430 
   356 /* harmony default export */ const close_small = (closeSmall);
   431 ;// CONCATENATED MODULE: external "lodash"
   357 
   432 var external_lodash_namespaceObject = window["lodash"];
   358 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/deprecated.js
   433 ;// CONCATENATED MODULE: external ["wp","deprecated"]
   359 /**
   434 var external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
   360  * WordPress dependencies
   435 var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
   361  */
       
   362 
       
   363 function normalizeComplementaryAreaScope(scope) {
       
   364   if (['core/edit-post', 'core/edit-site'].includes(scope)) {
       
   365     external_wp_deprecated_default()(`${scope} interface scope`, {
       
   366       alternative: 'core interface scope',
       
   367       hint: 'core/edit-post and core/edit-site are merging.',
       
   368       version: '6.6'
       
   369     });
       
   370     return 'core';
       
   371   }
       
   372   return scope;
       
   373 }
       
   374 function normalizeComplementaryAreaName(scope, name) {
       
   375   if (scope === 'core' && name === 'edit-site/template') {
       
   376     external_wp_deprecated_default()(`edit-site/template sidebar`, {
       
   377       alternative: 'edit-post/document',
       
   378       version: '6.6'
       
   379     });
       
   380     return 'edit-post/document';
       
   381   }
       
   382   if (scope === 'core' && name === 'edit-site/block-inspector') {
       
   383     external_wp_deprecated_default()(`edit-site/block-inspector sidebar`, {
       
   384       alternative: 'edit-post/block',
       
   385       version: '6.6'
       
   386     });
       
   387     return 'edit-post/block';
       
   388   }
       
   389   return name;
       
   390 }
       
   391 
   436 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
   392 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/actions.js
   437 /**
   393 /**
   438  * WordPress dependencies
   394  * WordPress dependencies
   439  */
   395  */
   440 
   396 
   441 
   397 
   442 /**
   398 
   443  * Enable the complementary area.
   399 /**
       
   400  * Internal dependencies
       
   401  */
       
   402 
       
   403 
       
   404 /**
       
   405  * Set a default complementary area.
   444  *
   406  *
   445  * @param {string} scope Complementary area scope.
   407  * @param {string} scope Complementary area scope.
   446  * @param {string} area  Area identifier.
   408  * @param {string} area  Area identifier.
   447  */
   409  *
   448 
   410  * @return {Object} Action object.
   449 const enableComplementaryArea = (scope, area) => _ref => {
   411  */
   450   let {
   412 const setDefaultComplementaryArea = (scope, area) => {
   451     registry
   413   scope = normalizeComplementaryAreaScope(scope);
   452   } = _ref;
   414   area = normalizeComplementaryAreaName(scope, area);
   453 
   415   return {
       
   416     type: 'SET_DEFAULT_COMPLEMENTARY_AREA',
       
   417     scope,
       
   418     area
       
   419   };
       
   420 };
       
   421 
       
   422 /**
       
   423  * Enable the complementary area.
       
   424  *
       
   425  * @param {string} scope Complementary area scope.
       
   426  * @param {string} area  Area identifier.
       
   427  */
       
   428 const enableComplementaryArea = (scope, area) => ({
       
   429   registry,
       
   430   dispatch
       
   431 }) => {
   454   // Return early if there's no area.
   432   // Return early if there's no area.
   455   if (!area) {
   433   if (!area) {
   456     return;
   434     return;
   457   }
   435   }
   458 
   436   scope = normalizeComplementaryAreaScope(scope);
   459   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', area);
   437   area = normalizeComplementaryAreaName(scope, area);
       
   438   const isComplementaryAreaVisible = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
       
   439   if (!isComplementaryAreaVisible) {
       
   440     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'isComplementaryAreaVisible', true);
       
   441   }
       
   442   dispatch({
       
   443     type: 'ENABLE_COMPLEMENTARY_AREA',
       
   444     scope,
       
   445     area
       
   446   });
   460 };
   447 };
       
   448 
   461 /**
   449 /**
   462  * Disable the complementary area.
   450  * Disable the complementary area.
   463  *
   451  *
   464  * @param {string} scope Complementary area scope.
   452  * @param {string} scope Complementary area scope.
   465  */
   453  */
   466 
   454 const disableComplementaryArea = scope => ({
   467 const disableComplementaryArea = scope => _ref2 => {
   455   registry
   468   let {
   456 }) => {
   469     registry
   457   scope = normalizeComplementaryAreaScope(scope);
   470   } = _ref2;
   458   const isComplementaryAreaVisible = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
   471   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'complementaryArea', null);
   459   if (isComplementaryAreaVisible) {
       
   460     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'isComplementaryAreaVisible', false);
       
   461   }
   472 };
   462 };
       
   463 
   473 /**
   464 /**
   474  * Pins an item.
   465  * Pins an item.
   475  *
   466  *
   476  * @param {string} scope Item scope.
   467  * @param {string} scope Item scope.
   477  * @param {string} item  Item identifier.
   468  * @param {string} item  Item identifier.
   478  *
   469  *
   479  * @return {Object} Action object.
   470  * @return {Object} Action object.
   480  */
   471  */
   481 
   472 const pinItem = (scope, item) => ({
   482 const pinItem = (scope, item) => _ref3 => {
   473   registry
   483   let {
   474 }) => {
   484     registry
       
   485   } = _ref3;
       
   486 
       
   487   // Return early if there's no item.
   475   // Return early if there's no item.
   488   if (!item) {
   476   if (!item) {
   489     return;
   477     return;
   490   }
   478   }
   491 
   479   scope = normalizeComplementaryAreaScope(scope);
   492   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems'); // The item is already pinned, there's nothing to do.
   480   item = normalizeComplementaryAreaName(scope, item);
   493 
   481   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
   494   if ((pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) === true) {
   482 
       
   483   // The item is already pinned, there's nothing to do.
       
   484   if (pinnedItems?.[item] === true) {
   495     return;
   485     return;
   496   }
   486   }
   497 
   487   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', {
   498   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
   488     ...pinnedItems,
   499     [item]: true
   489     [item]: true
   500   });
   490   });
   501 };
   491 };
       
   492 
   502 /**
   493 /**
   503  * Unpins an item.
   494  * Unpins an item.
   504  *
   495  *
   505  * @param {string} scope Item scope.
   496  * @param {string} scope Item scope.
   506  * @param {string} item  Item identifier.
   497  * @param {string} item  Item identifier.
   507  */
   498  */
   508 
   499 const unpinItem = (scope, item) => ({
   509 const unpinItem = (scope, item) => _ref4 => {
   500   registry
   510   let {
   501 }) => {
   511     registry
       
   512   } = _ref4;
       
   513 
       
   514   // Return early if there's no item.
   502   // Return early if there's no item.
   515   if (!item) {
   503   if (!item) {
   516     return;
   504     return;
   517   }
   505   }
   518 
   506   scope = normalizeComplementaryAreaScope(scope);
       
   507   item = normalizeComplementaryAreaName(scope, item);
   519   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
   508   const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
   520   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', { ...pinnedItems,
   509   registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', {
       
   510     ...pinnedItems,
   521     [item]: false
   511     [item]: false
   522   });
   512   });
   523 };
   513 };
       
   514 
   524 /**
   515 /**
   525  * Returns an action object used in signalling that a feature should be toggled.
   516  * Returns an action object used in signalling that a feature should be toggled.
   526  *
   517  *
   527  * @param {string} scope       The feature scope (e.g. core/edit-post).
   518  * @param {string} scope       The feature scope (e.g. core/edit-post).
   528  * @param {string} featureName The feature name.
   519  * @param {string} featureName The feature name.
   529  */
   520  */
   530 
       
   531 function toggleFeature(scope, featureName) {
   521 function toggleFeature(scope, featureName) {
   532   return function (_ref5) {
   522   return function ({
   533     let {
   523     registry
   534       registry
   524   }) {
   535     } = _ref5;
       
   536     external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
   525     external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
   537       since: '6.0',
   526       since: '6.0',
   538       alternative: `dispatch( 'core/preferences' ).toggle`
   527       alternative: `dispatch( 'core/preferences' ).toggle`
   539     });
   528     });
   540     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
   529     registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
   541   };
   530   };
   542 }
   531 }
       
   532 
   543 /**
   533 /**
   544  * Returns an action object used in signalling that a feature should be set to
   534  * Returns an action object used in signalling that a feature should be set to
   545  * a true or false value
   535  * a true or false value
   546  *
   536  *
   547  * @param {string}  scope       The feature scope (e.g. core/edit-post).
   537  * @param {string}  scope       The feature scope (e.g. core/edit-post).
   548  * @param {string}  featureName The feature name.
   538  * @param {string}  featureName The feature name.
   549  * @param {boolean} value       The value to set.
   539  * @param {boolean} value       The value to set.
   550  *
   540  *
   551  * @return {Object} Action object.
   541  * @return {Object} Action object.
   552  */
   542  */
   553 
       
   554 function setFeatureValue(scope, featureName, value) {
   543 function setFeatureValue(scope, featureName, value) {
   555   return function (_ref6) {
   544   return function ({
   556     let {
   545     registry
   557       registry
   546   }) {
   558     } = _ref6;
       
   559     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
   547     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
   560       since: '6.0',
   548       since: '6.0',
   561       alternative: `dispatch( 'core/preferences' ).set`
   549       alternative: `dispatch( 'core/preferences' ).set`
   562     });
   550     });
   563     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
   551     registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
   564   };
   552   };
   565 }
   553 }
       
   554 
   566 /**
   555 /**
   567  * Returns an action object used in signalling that defaults should be set for features.
   556  * Returns an action object used in signalling that defaults should be set for features.
   568  *
   557  *
   569  * @param {string}                  scope    The feature scope (e.g. core/edit-post).
   558  * @param {string}                  scope    The feature scope (e.g. core/edit-post).
   570  * @param {Object<string, boolean>} defaults A key/value map of feature names to values.
   559  * @param {Object<string, boolean>} defaults A key/value map of feature names to values.
   571  *
   560  *
   572  * @return {Object} Action object.
   561  * @return {Object} Action object.
   573  */
   562  */
   574 
       
   575 function setFeatureDefaults(scope, defaults) {
   563 function setFeatureDefaults(scope, defaults) {
   576   return function (_ref7) {
   564   return function ({
   577     let {
   565     registry
   578       registry
   566   }) {
   579     } = _ref7;
       
   580     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
   567     external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
   581       since: '6.0',
   568       since: '6.0',
   582       alternative: `dispatch( 'core/preferences' ).setDefaults`
   569       alternative: `dispatch( 'core/preferences' ).setDefaults`
   583     });
   570     });
   584     registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
   571     registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
   585   };
   572   };
   586 }
   573 }
   587 
   574 
       
   575 /**
       
   576  * Returns an action object used in signalling that the user opened a modal.
       
   577  *
       
   578  * @param {string} name A string that uniquely identifies the modal.
       
   579  *
       
   580  * @return {Object} Action object.
       
   581  */
       
   582 function openModal(name) {
       
   583   return {
       
   584     type: 'OPEN_MODAL',
       
   585     name
       
   586   };
       
   587 }
       
   588 
       
   589 /**
       
   590  * Returns an action object signalling that the user closed a modal.
       
   591  *
       
   592  * @return {Object} Action object.
       
   593  */
       
   594 function closeModal() {
       
   595   return {
       
   596     type: 'CLOSE_MODAL'
       
   597   };
       
   598 }
       
   599 
   588 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
   600 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
   589 /**
   601 /**
   590  * WordPress dependencies
   602  * WordPress dependencies
   591  */
   603  */
   592 
   604 
       
   605 
       
   606 
       
   607 
       
   608 /**
       
   609  * Internal dependencies
       
   610  */
   593 
   611 
   594 
   612 
   595 /**
   613 /**
   596  * Returns the complementary area that is active in a given scope.
   614  * Returns the complementary area that is active in a given scope.
   597  *
   615  *
   598  * @param {Object} state Global application state.
   616  * @param {Object} state Global application state.
   599  * @param {string} scope Item scope.
   617  * @param {string} scope Item scope.
   600  *
   618  *
   601  * @return {string} The complementary area that is active in the given scope.
   619  * @return {string | null | undefined} The complementary area that is active in the given scope.
   602  */
   620  */
   603 
       
   604 const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
   621 const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
   605   return select(external_wp_preferences_namespaceObject.store).get(scope, 'complementaryArea');
   622   scope = normalizeComplementaryAreaScope(scope);
       
   623   const isComplementaryAreaVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
       
   624 
       
   625   // Return `undefined` to indicate that the user has never toggled
       
   626   // visibility, this is the vanilla default. Other code relies on this
       
   627   // nuance in the return value.
       
   628   if (isComplementaryAreaVisible === undefined) {
       
   629     return undefined;
       
   630   }
       
   631 
       
   632   // Return `null` to indicate the user hid the complementary area.
       
   633   if (isComplementaryAreaVisible === false) {
       
   634     return null;
       
   635   }
       
   636   return state?.complementaryAreas?.[scope];
   606 });
   637 });
       
   638 const isComplementaryAreaLoading = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
       
   639   scope = normalizeComplementaryAreaScope(scope);
       
   640   const isVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
       
   641   const identifier = state?.complementaryAreas?.[scope];
       
   642   return isVisible && identifier === undefined;
       
   643 });
       
   644 
   607 /**
   645 /**
   608  * Returns a boolean indicating if an item is pinned or not.
   646  * Returns a boolean indicating if an item is pinned or not.
   609  *
   647  *
   610  * @param {Object} state Global application state.
   648  * @param {Object} state Global application state.
   611  * @param {string} scope Scope.
   649  * @param {string} scope Scope.
   612  * @param {string} item  Item to check.
   650  * @param {string} item  Item to check.
   613  *
   651  *
   614  * @return {boolean} True if the item is pinned and false otherwise.
   652  * @return {boolean} True if the item is pinned and false otherwise.
   615  */
   653  */
   616 
       
   617 const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
   654 const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
   618   var _pinnedItems$item;
   655   var _pinnedItems$item;
   619 
   656   scope = normalizeComplementaryAreaScope(scope);
       
   657   item = normalizeComplementaryAreaName(scope, item);
   620   const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
   658   const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
   621   return (_pinnedItems$item = pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
   659   return (_pinnedItems$item = pinnedItems?.[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
   622 });
   660 });
       
   661 
   623 /**
   662 /**
   624  * Returns a boolean indicating whether a feature is active for a particular
   663  * Returns a boolean indicating whether a feature is active for a particular
   625  * scope.
   664  * scope.
   626  *
   665  *
   627  * @param {Object} state       The store state.
   666  * @param {Object} state       The store state.
   628  * @param {string} scope       The scope of the feature (e.g. core/edit-post).
   667  * @param {string} scope       The scope of the feature (e.g. core/edit-post).
   629  * @param {string} featureName The name of the feature.
   668  * @param {string} featureName The name of the feature.
   630  *
   669  *
   631  * @return {boolean} Is the feature enabled?
   670  * @return {boolean} Is the feature enabled?
   632  */
   671  */
   633 
       
   634 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
   672 const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
   635   external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
   673   external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
   636     since: '6.0',
   674     since: '6.0',
   637     alternative: `select( 'core/preferences' ).get( scope, featureName )`
   675     alternative: `select( 'core/preferences' ).get( scope, featureName )`
   638   });
   676   });
   639   return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
   677   return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
   640 });
   678 });
   641 
   679 
       
   680 /**
       
   681  * Returns true if a modal is active, or false otherwise.
       
   682  *
       
   683  * @param {Object} state     Global application state.
       
   684  * @param {string} modalName A string that uniquely identifies the modal.
       
   685  *
       
   686  * @return {boolean} Whether the modal is active.
       
   687  */
       
   688 function isModalActive(state, modalName) {
       
   689   return state.activeModal === modalName;
       
   690 }
       
   691 
       
   692 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js
       
   693 /**
       
   694  * WordPress dependencies
       
   695  */
       
   696 
       
   697 function complementaryAreas(state = {}, action) {
       
   698   switch (action.type) {
       
   699     case 'SET_DEFAULT_COMPLEMENTARY_AREA':
       
   700       {
       
   701         const {
       
   702           scope,
       
   703           area
       
   704         } = action;
       
   705 
       
   706         // If there's already an area, don't overwrite it.
       
   707         if (state[scope]) {
       
   708           return state;
       
   709         }
       
   710         return {
       
   711           ...state,
       
   712           [scope]: area
       
   713         };
       
   714       }
       
   715     case 'ENABLE_COMPLEMENTARY_AREA':
       
   716       {
       
   717         const {
       
   718           scope,
       
   719           area
       
   720         } = action;
       
   721         return {
       
   722           ...state,
       
   723           [scope]: area
       
   724         };
       
   725       }
       
   726   }
       
   727   return state;
       
   728 }
       
   729 
       
   730 /**
       
   731  * Reducer for storing the name of the open modal, or null if no modal is open.
       
   732  *
       
   733  * @param {Object} state  Previous state.
       
   734  * @param {Object} action Action object containing the `name` of the modal
       
   735  *
       
   736  * @return {Object} Updated state
       
   737  */
       
   738 function activeModal(state = null, action) {
       
   739   switch (action.type) {
       
   740     case 'OPEN_MODAL':
       
   741       return action.name;
       
   742     case 'CLOSE_MODAL':
       
   743       return null;
       
   744   }
       
   745   return state;
       
   746 }
       
   747 /* harmony default export */ const store_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
       
   748   complementaryAreas,
       
   749   activeModal
       
   750 }));
       
   751 
   642 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
   752 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
   643 /**
   753 /**
   644  * The identifier for the data store.
   754  * The identifier for the data store.
   645  *
   755  *
   646  * @type {string}
   756  * @type {string}
   650 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
   760 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
   651 /**
   761 /**
   652  * WordPress dependencies
   762  * WordPress dependencies
   653  */
   763  */
   654 
   764 
       
   765 
   655 /**
   766 /**
   656  * Internal dependencies
   767  * Internal dependencies
   657  */
   768  */
   658 
   769 
   659 
   770 
   660 
   771 
   661 
   772 
       
   773 
   662 /**
   774 /**
   663  * Store definition for the interface namespace.
   775  * Store definition for the interface namespace.
   664  *
   776  *
   665  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
   777  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
   666  *
   778  *
   667  * @type {Object}
   779  * @type {Object}
   668  */
   780  */
   669 
       
   670 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
   781 const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
   671   reducer: () => {},
   782   reducer: store_reducer,
   672   actions: actions_namespaceObject,
   783   actions: actions_namespaceObject,
   673   selectors: selectors_namespaceObject
   784   selectors: selectors_namespaceObject
   674 }); // Once we build a more generic persistence plugin that works across types of stores
   785 });
       
   786 
       
   787 // Once we build a more generic persistence plugin that works across types of stores
   675 // we'd be able to replace this with a register call.
   788 // we'd be able to replace this with a register call.
   676 
       
   677 (0,external_wp_data_namespaceObject.register)(store);
   789 (0,external_wp_data_namespaceObject.register)(store);
   678 
   790 
   679 ;// CONCATENATED MODULE: external ["wp","plugins"]
   791 ;// CONCATENATED MODULE: external ["wp","plugins"]
   680 var external_wp_plugins_namespaceObject = window["wp"]["plugins"];
   792 const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
   681 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
   793 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
   682 /**
   794 /**
   683  * WordPress dependencies
   795  * WordPress dependencies
   684  */
   796  */
   685 
   797 
   686 /* harmony default export */ var complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
   798 /* harmony default export */ const complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
   687   return {
   799   return {
   688     icon: ownProps.icon || context.icon,
   800     icon: ownProps.icon || context.icon,
   689     identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
   801     identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
   690   };
   802   };
   691 }));
   803 }));
   692 
   804 
   693 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
   805 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
   694 
       
   695 
       
   696 
       
   697 /**
       
   698  * External dependencies
       
   699  */
       
   700 
       
   701 /**
   806 /**
   702  * WordPress dependencies
   807  * WordPress dependencies
   703  */
   808  */
   704 
   809 
   705 
   810 
   708  * Internal dependencies
   813  * Internal dependencies
   709  */
   814  */
   710 
   815 
   711 
   816 
   712 
   817 
   713 
   818 function ComplementaryAreaToggle({
   714 function ComplementaryAreaToggle(_ref) {
   819   as = external_wp_components_namespaceObject.Button,
   715   let {
   820   scope,
   716     as = external_wp_components_namespaceObject.Button,
   821   identifier,
   717     scope,
   822   icon,
   718     identifier,
   823   selectedIcon,
   719     icon,
   824   name,
   720     selectedIcon,
   825   ...props
   721     ...props
   826 }) {
   722   } = _ref;
       
   723   const ComponentToUse = as;
   827   const ComponentToUse = as;
   724   const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier]);
   828   const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]);
   725   const {
   829   const {
   726     enableComplementaryArea,
   830     enableComplementaryArea,
   727     disableComplementaryArea
   831     disableComplementaryArea
   728   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
   832   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
   729   return (0,external_wp_element_namespaceObject.createElement)(ComponentToUse, _extends({
   833   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentToUse, {
   730     icon: selectedIcon && isSelected ? selectedIcon : icon,
   834     icon: selectedIcon && isSelected ? selectedIcon : icon,
       
   835     "aria-controls": identifier.replace('/', ':'),
   731     onClick: () => {
   836     onClick: () => {
   732       if (isSelected) {
   837       if (isSelected) {
   733         disableComplementaryArea(scope);
   838         disableComplementaryArea(scope);
   734       } else {
   839       } else {
   735         enableComplementaryArea(scope, identifier);
   840         enableComplementaryArea(scope, identifier);
   736       }
   841       }
   737     }
   842     },
   738   }, (0,external_lodash_namespaceObject.omit)(props, ['name'])));
   843     ...props
   739 }
   844   });
   740 
   845 }
   741 /* harmony default export */ var complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle));
   846 /* harmony default export */ const complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle));
   742 
   847 
   743 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
   848 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
   744 
       
   745 
       
   746 
       
   747 /**
   849 /**
   748  * External dependencies
   850  * External dependencies
   749  */
   851  */
   750 
   852 
       
   853 
   751 /**
   854 /**
   752  * WordPress dependencies
   855  * WordPress dependencies
   753  */
   856  */
   754 
   857 
   755 
   858 
   757  * Internal dependencies
   860  * Internal dependencies
   758  */
   861  */
   759 
   862 
   760 
   863 
   761 
   864 
   762 const ComplementaryAreaHeader = _ref => {
   865 
   763   let {
   866 const ComplementaryAreaHeader = ({
   764     smallScreenTitle,
   867   smallScreenTitle,
   765     children,
   868   children,
   766     className,
   869   className,
   767     toggleButtonProps
   870   toggleButtonProps
   768   } = _ref;
   871 }) => {
   769   const toggleButton = (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, _extends({
   872   const toggleButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
   770     icon: close_small
   873     icon: close_small,
   771   }, toggleButtonProps));
   874     ...toggleButtonProps
   772   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
   875   });
   773     className: "components-panel__header interface-complementary-area-header__small"
   876   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
   774   }, smallScreenTitle && (0,external_wp_element_namespaceObject.createElement)("span", {
   877     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
   775     className: "interface-complementary-area-header__small-title"
   878       className: "components-panel__header interface-complementary-area-header__small",
   776   }, smallScreenTitle), toggleButton), (0,external_wp_element_namespaceObject.createElement)("div", {
   879       children: [smallScreenTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
   777     className: classnames_default()('components-panel__header', 'interface-complementary-area-header', className),
   880         className: "interface-complementary-area-header__small-title",
   778     tabIndex: -1
   881         children: smallScreenTitle
   779   }, children, toggleButton));
   882       }), toggleButton]
       
   883     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
       
   884       className: dist_clsx('components-panel__header', 'interface-complementary-area-header', className),
       
   885       tabIndex: -1,
       
   886       children: [children, toggleButton]
       
   887     })]
       
   888   });
   780 };
   889 };
   781 
   890 /* harmony default export */ const complementary_area_header = (ComplementaryAreaHeader);
   782 /* harmony default export */ var complementary_area_header = (ComplementaryAreaHeader);
       
   783 
   891 
   784 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
   892 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
   785 
   893 /**
   786 
   894  * WordPress dependencies
   787 
   895  */
   788 /**
   896 
   789  * External dependencies
   897 
   790  */
   898 
   791 
   899 const noop = () => {};
   792 /**
   900 function ActionItemSlot({
   793  * WordPress dependencies
   901   name,
   794  */
   902   as: Component = external_wp_components_namespaceObject.ButtonGroup,
   795 
   903   fillProps = {},
   796 
   904   bubblesVirtually,
   797 
   905   ...props
   798 
   906 }) {
   799 function ActionItemSlot(_ref) {
   907   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
   800   let {
       
   801     name,
       
   802     as: Component = external_wp_components_namespaceObject.ButtonGroup,
       
   803     fillProps = {},
       
   804     bubblesVirtually,
       
   805     ...props
       
   806   } = _ref;
       
   807   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, {
       
   808     name: name,
   908     name: name,
   809     bubblesVirtually: bubblesVirtually,
   909     bubblesVirtually: bubblesVirtually,
   810     fillProps: fillProps
   910     fillProps: fillProps,
   811   }, fills => {
   911     children: fills => {
   812     if ((0,external_lodash_namespaceObject.isEmpty)(external_wp_element_namespaceObject.Children.toArray(fills))) {
   912       if (!external_wp_element_namespaceObject.Children.toArray(fills).length) {
   813       return null;
   913         return null;
   814     } // Special handling exists for backward compatibility.
   914       }
   815     // It ensures that menu items created by plugin authors aren't
   915 
   816     // duplicated with automatically injected menu items coming
   916       // Special handling exists for backward compatibility.
   817     // from pinnable plugin sidebars.
   917       // It ensures that menu items created by plugin authors aren't
   818     // @see https://github.com/WordPress/gutenberg/issues/14457
   918       // duplicated with automatically injected menu items coming
   819 
   919       // from pinnable plugin sidebars.
   820 
   920       // @see https://github.com/WordPress/gutenberg/issues/14457
   821     const initializedByPlugins = [];
   921       const initializedByPlugins = [];
   822     external_wp_element_namespaceObject.Children.forEach(fills, _ref2 => {
   922       external_wp_element_namespaceObject.Children.forEach(fills, ({
   823       let {
       
   824         props: {
   923         props: {
   825           __unstableExplicitMenuItem,
   924           __unstableExplicitMenuItem,
   826           __unstableTarget
   925           __unstableTarget
   827         }
   926         }
   828       } = _ref2;
   927       }) => {
   829 
   928         if (__unstableTarget && __unstableExplicitMenuItem) {
   830       if (__unstableTarget && __unstableExplicitMenuItem) {
   929           initializedByPlugins.push(__unstableTarget);
   831         initializedByPlugins.push(__unstableTarget);
   930         }
   832       }
   931       });
   833     });
   932       const children = external_wp_element_namespaceObject.Children.map(fills, child => {
   834     const children = external_wp_element_namespaceObject.Children.map(fills, child => {
   933         if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
   835       if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
   934           return null;
   836         return null;
   935         }
   837       }
   936         return child;
   838 
   937       });
   839       return child;
   938       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
   840     });
   939         ...props,
   841     return (0,external_wp_element_namespaceObject.createElement)(Component, props, children);
   940         children: children
   842   });
   941       });
   843 }
   942     }
   844 
   943   });
   845 function ActionItem(_ref3) {
   944 }
   846   let {
   945 function ActionItem({
   847     name,
   946   name,
   848     as: Component = external_wp_components_namespaceObject.Button,
   947   as: Component = external_wp_components_namespaceObject.Button,
   849     onClick,
   948   onClick,
   850     ...props
   949   ...props
   851   } = _ref3;
   950 }) {
   852   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, {
   951   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
   853     name: name
   952     name: name,
   854   }, _ref4 => {
   953     children: ({
   855     let {
       
   856       onClick: fpOnClick
   954       onClick: fpOnClick
   857     } = _ref4;
   955     }) => {
   858     return (0,external_wp_element_namespaceObject.createElement)(Component, _extends({
   956       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
   859       onClick: onClick || fpOnClick ? function () {
   957         onClick: onClick || fpOnClick ? (...args) => {
   860         (onClick || external_lodash_namespaceObject.noop)(...arguments);
   958           (onClick || noop)(...args);
   861         (fpOnClick || external_lodash_namespaceObject.noop)(...arguments);
   959           (fpOnClick || noop)(...args);
   862       } : undefined
   960         } : undefined,
   863     }, props));
   961         ...props
   864   });
   962       });
   865 }
   963     }
   866 
   964   });
       
   965 }
   867 ActionItem.Slot = ActionItemSlot;
   966 ActionItem.Slot = ActionItemSlot;
   868 /* harmony default export */ var action_item = (ActionItem);
   967 /* harmony default export */ const action_item = (ActionItem);
   869 
   968 
   870 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
   969 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
   871 
       
   872 
       
   873 
       
   874 /**
       
   875  * External dependencies
       
   876  */
       
   877 
       
   878 /**
   970 /**
   879  * WordPress dependencies
   971  * WordPress dependencies
   880  */
   972  */
   881 
   973 
   882 
   974 
   885  * Internal dependencies
   977  * Internal dependencies
   886  */
   978  */
   887 
   979 
   888 
   980 
   889 
   981 
   890 
   982 const PluginsMenuItem = ({
   891 const PluginsMenuItem = props => // Menu item is marked with unstable prop for backward compatibility.
   983   // Menu item is marked with unstable prop for backward compatibility.
   892 // They are removed so they don't leak to DOM elements.
   984   // They are removed so they don't leak to DOM elements.
   893 // @see https://github.com/WordPress/gutenberg/issues/14457
   985   // @see https://github.com/WordPress/gutenberg/issues/14457
   894 (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, (0,external_lodash_namespaceObject.omit)(props, ['__unstableExplicitMenuItem', '__unstableTarget']));
   986   __unstableExplicitMenuItem,
   895 
   987   __unstableTarget,
   896 function ComplementaryAreaMoreMenuItem(_ref) {
   988   ...restProps
   897   let {
   989 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
   898     scope,
   990   ...restProps
   899     target,
   991 });
   900     __unstableExplicitMenuItem,
   992 function ComplementaryAreaMoreMenuItem({
   901     ...props
   993   scope,
   902   } = _ref;
   994   target,
   903   return (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, _extends({
   995   __unstableExplicitMenuItem,
       
   996   ...props
       
   997 }) {
       
   998   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
   904     as: toggleProps => {
   999     as: toggleProps => {
   905       return (0,external_wp_element_namespaceObject.createElement)(action_item, _extends({
  1000       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(action_item, {
   906         __unstableExplicitMenuItem: __unstableExplicitMenuItem,
  1001         __unstableExplicitMenuItem: __unstableExplicitMenuItem,
   907         __unstableTarget: `${scope}/${target}`,
  1002         __unstableTarget: `${scope}/${target}`,
   908         as: PluginsMenuItem,
  1003         as: PluginsMenuItem,
   909         name: `${scope}/plugin-more-menu`
  1004         name: `${scope}/plugin-more-menu`,
   910       }, toggleProps));
  1005         ...toggleProps
       
  1006       });
   911     },
  1007     },
   912     role: "menuitemcheckbox",
  1008     role: "menuitemcheckbox",
   913     selectedIcon: library_check,
  1009     selectedIcon: library_check,
   914     name: target,
  1010     name: target,
   915     scope: scope
  1011     scope: scope,
   916   }, props));
  1012     ...props
       
  1013   });
   917 }
  1014 }
   918 
  1015 
   919 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
  1016 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/pinned-items/index.js
   920 
       
   921 
       
   922 
       
   923 /**
  1017 /**
   924  * External dependencies
  1018  * External dependencies
   925  */
  1019  */
   926 
  1020 
   927 
  1021 
   928 /**
  1022 /**
   929  * WordPress dependencies
  1023  * WordPress dependencies
   930  */
  1024  */
   931 
  1025 
   932 
  1026 
   933 
  1027 function PinnedItems({
   934 function PinnedItems(_ref) {
  1028   scope,
   935   let {
  1029   ...props
   936     scope,
  1030 }) {
       
  1031   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
       
  1032     name: `PinnedItems/${scope}`,
   937     ...props
  1033     ...props
   938   } = _ref;
  1034   });
   939   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, _extends({
  1035 }
   940     name: `PinnedItems/${scope}`
  1036 function PinnedItemsSlot({
   941   }, props));
  1037   scope,
   942 }
  1038   className,
   943 
  1039   ...props
   944 function PinnedItemsSlot(_ref2) {
  1040 }) {
   945   let {
  1041   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
   946     scope,
  1042     name: `PinnedItems/${scope}`,
   947     className,
  1043     ...props,
       
  1044     children: fills => fills?.length > 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  1045       className: dist_clsx(className, 'interface-pinned-items'),
       
  1046       children: fills
       
  1047     })
       
  1048   });
       
  1049 }
       
  1050 PinnedItems.Slot = PinnedItemsSlot;
       
  1051 /* harmony default export */ const pinned_items = (PinnedItems);
       
  1052 
       
  1053 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
       
  1054 /**
       
  1055  * External dependencies
       
  1056  */
       
  1057 
       
  1058 
       
  1059 /**
       
  1060  * WordPress dependencies
       
  1061  */
       
  1062 
       
  1063 
       
  1064 
       
  1065 
       
  1066 
       
  1067 
       
  1068 
       
  1069 
       
  1070 
       
  1071 /**
       
  1072  * Internal dependencies
       
  1073  */
       
  1074 
       
  1075 
       
  1076 
       
  1077 
       
  1078 
       
  1079 
       
  1080 
       
  1081 
       
  1082 
       
  1083 const ANIMATION_DURATION = 0.3;
       
  1084 function ComplementaryAreaSlot({
       
  1085   scope,
       
  1086   ...props
       
  1087 }) {
       
  1088   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
       
  1089     name: `ComplementaryArea/${scope}`,
   948     ...props
  1090     ...props
   949   } = _ref2;
  1091   });
   950   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, _extends({
  1092 }
   951     name: `PinnedItems/${scope}`
  1093 const SIDEBAR_WIDTH = 280;
   952   }, props), fills => !(0,external_lodash_namespaceObject.isEmpty)(fills) && (0,external_wp_element_namespaceObject.createElement)("div", {
  1094 const variants = {
   953     className: classnames_default()(className, 'interface-pinned-items')
  1095   open: {
   954   }, fills));
  1096     width: SIDEBAR_WIDTH
   955 }
  1097   },
   956 
  1098   closed: {
   957 PinnedItems.Slot = PinnedItemsSlot;
  1099     width: 0
   958 /* harmony default export */ var pinned_items = (PinnedItems);
  1100   },
   959 
  1101   mobileOpen: {
   960 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area/index.js
  1102     width: '100vw'
   961 
  1103   }
   962 
  1104 };
   963 
  1105 function ComplementaryAreaFill({
   964 /**
  1106   activeArea,
   965  * External dependencies
  1107   isActive,
   966  */
  1108   scope,
   967 
  1109   children,
   968 /**
  1110   className,
   969  * WordPress dependencies
  1111   id
   970  */
  1112 }) {
   971 
  1113   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
   972 
  1114   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
   973 
  1115   // This is used to delay the exit animation to the next tick.
   974 
  1116   // The reason this is done is to allow us to apply the right transition properties
   975 
  1117   // When we switch from an open sidebar to another open sidebar.
   976 
  1118   // we don't want to animate in this case.
   977 
  1119   const previousActiveArea = (0,external_wp_compose_namespaceObject.usePrevious)(activeArea);
   978 /**
  1120   const previousIsActive = (0,external_wp_compose_namespaceObject.usePrevious)(isActive);
   979  * Internal dependencies
  1121   const [, setState] = (0,external_wp_element_namespaceObject.useState)({});
   980  */
  1122   (0,external_wp_element_namespaceObject.useEffect)(() => {
   981 
  1123     setState({});
   982 
  1124   }, [isActive]);
   983 
  1125   const transition = {
   984 
  1126     type: 'tween',
   985 
  1127     duration: disableMotion || isMobileViewport || !!previousActiveArea && !!activeArea && activeArea !== previousActiveArea ? 0 : ANIMATION_DURATION,
   986 
  1128     ease: [0.6, 0, 0.4, 1]
   987 
  1129   };
   988 
  1130   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
   989 function ComplementaryAreaSlot(_ref) {
  1131     name: `ComplementaryArea/${scope}`,
   990   let {
  1132     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
   991     scope,
  1133       initial: false,
   992     ...props
  1134       children: (previousIsActive || isActive) && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
   993   } = _ref;
  1135         variants: variants,
   994   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Slot, _extends({
  1136         initial: "closed",
   995     name: `ComplementaryArea/${scope}`
  1137         animate: isMobileViewport ? 'mobileOpen' : 'open',
   996   }, props));
  1138         exit: "closed",
   997 }
  1139         transition: transition,
   998 
  1140         className: "interface-complementary-area__fill",
   999 function ComplementaryAreaFill(_ref2) {
  1141         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1000   let {
  1142           id: id,
  1001     scope,
  1143           className: className,
  1002     children,
  1144           style: {
  1003     className
  1145             width: isMobileViewport ? '100vw' : SIDEBAR_WIDTH
  1004   } = _ref2;
  1146           },
  1005   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Fill, {
  1147           children: children
  1006     name: `ComplementaryArea/${scope}`
  1148         })
  1007   }, (0,external_wp_element_namespaceObject.createElement)("div", {
  1149       })
  1008     className: className
  1150     })
  1009   }, children));
  1151   });
  1010 }
  1152 }
  1011 
       
  1012 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
  1153 function useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall) {
  1013   const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false);
  1154   const previousIsSmall = (0,external_wp_element_namespaceObject.useRef)(false);
  1014   const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false);
  1155   const shouldOpenWhenNotSmall = (0,external_wp_element_namespaceObject.useRef)(false);
  1015   const {
  1156   const {
  1016     enableComplementaryArea,
  1157     enableComplementaryArea,
  1017     disableComplementaryArea
  1158     disableComplementaryArea
  1018   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1159   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1019   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1160   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1020     // If the complementary area is active and the editor is switching from a big to a small window size.
  1161     // If the complementary area is active and the editor is switching from
       
  1162     // a big to a small window size.
  1021     if (isActive && isSmall && !previousIsSmall.current) {
  1163     if (isActive && isSmall && !previousIsSmall.current) {
  1022       // Disable the complementary area.
  1164       disableComplementaryArea(scope);
  1023       disableComplementaryArea(scope); // Flag the complementary area to be reopened when the window size goes from small to big.
  1165       // Flag the complementary area to be reopened when the window size
  1024 
  1166       // goes from small to big.
  1025       shouldOpenWhenNotSmall.current = true;
  1167       shouldOpenWhenNotSmall.current = true;
  1026     } else if ( // If there is a flag indicating the complementary area should be enabled when we go from small to big window size
  1168     } else if (
  1027     // and we are going from a small to big window size.
  1169     // If there is a flag indicating the complementary area should be
       
  1170     // enabled when we go from small to big window size and we are going
       
  1171     // from a small to big window size.
  1028     shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
  1172     shouldOpenWhenNotSmall.current && !isSmall && previousIsSmall.current) {
  1029       // Remove the flag indicating the complementary area should be enabled.
  1173       // Remove the flag indicating the complementary area should be
  1030       shouldOpenWhenNotSmall.current = false; // Enable the complementary area.
  1174       // enabled.
  1031 
  1175       shouldOpenWhenNotSmall.current = false;
  1032       enableComplementaryArea(scope, identifier);
  1176       enableComplementaryArea(scope, identifier);
  1033     } else if ( // If the flag is indicating the current complementary should be reopened but another complementary area becomes active,
  1177     } else if (
  1034     // remove the flag.
  1178     // If the flag is indicating the current complementary should be
       
  1179     // reopened but another complementary area becomes active, remove
       
  1180     // the flag.
  1035     shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
  1181     shouldOpenWhenNotSmall.current && activeArea && activeArea !== identifier) {
  1036       shouldOpenWhenNotSmall.current = false;
  1182       shouldOpenWhenNotSmall.current = false;
  1037     }
  1183     }
  1038 
       
  1039     if (isSmall !== previousIsSmall.current) {
  1184     if (isSmall !== previousIsSmall.current) {
  1040       previousIsSmall.current = isSmall;
  1185       previousIsSmall.current = isSmall;
  1041     }
  1186     }
  1042   }, [isActive, isSmall, scope, identifier, activeArea]);
  1187   }, [isActive, isSmall, scope, identifier, activeArea, disableComplementaryArea, enableComplementaryArea]);
  1043 }
  1188 }
  1044 
  1189 function ComplementaryArea({
  1045 function ComplementaryArea(_ref3) {
  1190   children,
  1046   let {
  1191   className,
  1047     children,
  1192   closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'),
  1048     className,
  1193   identifier,
  1049     closeLabel = (0,external_wp_i18n_namespaceObject.__)('Close plugin'),
  1194   header,
  1050     identifier,
  1195   headerClassName,
  1051     header,
  1196   icon,
  1052     headerClassName,
  1197   isPinnable = true,
  1053     icon,
  1198   panelClassName,
  1054     isPinnable = true,
  1199   scope,
  1055     panelClassName,
  1200   name,
  1056     scope,
  1201   smallScreenTitle,
  1057     name,
  1202   title,
  1058     smallScreenTitle,
  1203   toggleShortcut,
  1059     title,
  1204   isActiveByDefault
  1060     toggleShortcut,
  1205 }) {
  1061     isActiveByDefault,
  1206   // This state is used to delay the rendering of the Fill
  1062     showIconLabels = false
  1207   // until the initial effect runs.
  1063   } = _ref3;
  1208   // This prevents the animation from running on mount if
       
  1209   // the complementary area is active by default.
       
  1210   const [isReady, setIsReady] = (0,external_wp_element_namespaceObject.useState)(false);
  1064   const {
  1211   const {
       
  1212     isLoading,
  1065     isActive,
  1213     isActive,
  1066     isPinned,
  1214     isPinned,
  1067     activeArea,
  1215     activeArea,
  1068     isSmall,
  1216     isSmall,
  1069     isLarge
  1217     isLarge,
       
  1218     showIconLabels
  1070   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1219   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  1071     const {
  1220     const {
  1072       getActiveComplementaryArea,
  1221       getActiveComplementaryArea,
       
  1222       isComplementaryAreaLoading,
  1073       isItemPinned
  1223       isItemPinned
  1074     } = select(store);
  1224     } = select(store);
  1075 
  1225     const {
       
  1226       get
       
  1227     } = select(external_wp_preferences_namespaceObject.store);
  1076     const _activeArea = getActiveComplementaryArea(scope);
  1228     const _activeArea = getActiveComplementaryArea(scope);
  1077 
       
  1078     return {
  1229     return {
       
  1230       isLoading: isComplementaryAreaLoading(scope),
  1079       isActive: _activeArea === identifier,
  1231       isActive: _activeArea === identifier,
  1080       isPinned: isItemPinned(scope, identifier),
  1232       isPinned: isItemPinned(scope, identifier),
  1081       activeArea: _activeArea,
  1233       activeArea: _activeArea,
  1082       isSmall: select(external_wp_viewport_namespaceObject.store).isViewportMatch('< medium'),
  1234       isSmall: select(external_wp_viewport_namespaceObject.store).isViewportMatch('< medium'),
  1083       isLarge: select(external_wp_viewport_namespaceObject.store).isViewportMatch('large')
  1235       isLarge: select(external_wp_viewport_namespaceObject.store).isViewportMatch('large'),
       
  1236       showIconLabels: get('core', 'showIconLabels')
  1084     };
  1237     };
  1085   }, [identifier, scope]);
  1238   }, [identifier, scope]);
  1086   useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall);
  1239   useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall);
  1087   const {
  1240   const {
  1088     enableComplementaryArea,
  1241     enableComplementaryArea,
  1089     disableComplementaryArea,
  1242     disableComplementaryArea,
  1090     pinItem,
  1243     pinItem,
  1091     unpinItem
  1244     unpinItem
  1092   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1245   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  1093   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1246   (0,external_wp_element_namespaceObject.useEffect)(() => {
       
  1247     // Set initial visibility: For large screens, enable if it's active by
       
  1248     // default. For small screens, always initially disable.
  1094     if (isActiveByDefault && activeArea === undefined && !isSmall) {
  1249     if (isActiveByDefault && activeArea === undefined && !isSmall) {
  1095       enableComplementaryArea(scope, identifier);
  1250       enableComplementaryArea(scope, identifier);
       
  1251     } else if (activeArea === undefined && isSmall) {
       
  1252       disableComplementaryArea(scope, identifier);
  1096     }
  1253     }
  1097   }, [activeArea, isActiveByDefault, scope, identifier, isSmall]);
  1254     setIsReady(true);
  1098   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isPinnable && (0,external_wp_element_namespaceObject.createElement)(pinned_items, {
  1255   }, [activeArea, isActiveByDefault, scope, identifier, isSmall, enableComplementaryArea, disableComplementaryArea]);
  1099     scope: scope
  1256   if (!isReady) {
  1100   }, isPinned && (0,external_wp_element_namespaceObject.createElement)(complementary_area_toggle, {
  1257     return;
  1101     scope: scope,
  1258   }
  1102     identifier: identifier,
  1259   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  1103     isPressed: isActive && (!showIconLabels || isLarge),
  1260     children: [isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items, {
  1104     "aria-expanded": isActive,
  1261       scope: scope,
  1105     label: title,
  1262       children: isPinned && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
  1106     icon: showIconLabels ? library_check : icon,
  1263         scope: scope,
  1107     showTooltip: !showIconLabels,
  1264         identifier: identifier,
  1108     variant: showIconLabels ? 'tertiary' : undefined
  1265         isPressed: isActive && (!showIconLabels || isLarge),
  1109   })), name && isPinnable && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaMoreMenuItem, {
  1266         "aria-expanded": isActive,
  1110     target: name,
  1267         "aria-disabled": isLoading,
  1111     scope: scope,
  1268         label: title,
  1112     icon: icon
  1269         icon: showIconLabels ? library_check : icon,
  1113   }, title), isActive && (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaFill, {
  1270         showTooltip: !showIconLabels,
  1114     className: classnames_default()('interface-complementary-area', className),
  1271         variant: showIconLabels ? 'tertiary' : undefined,
  1115     scope: scope
  1272         size: "compact"
  1116   }, (0,external_wp_element_namespaceObject.createElement)(complementary_area_header, {
  1273       })
  1117     className: headerClassName,
  1274     }), name && isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComplementaryAreaMoreMenuItem, {
  1118     closeLabel: closeLabel,
  1275       target: name,
  1119     onClose: () => disableComplementaryArea(scope),
  1276       scope: scope,
  1120     smallScreenTitle: smallScreenTitle,
  1277       icon: icon,
  1121     toggleButtonProps: {
  1278       children: title
  1122       label: closeLabel,
  1279     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ComplementaryAreaFill, {
  1123       shortcut: toggleShortcut,
  1280       activeArea: activeArea,
  1124       scope,
  1281       isActive: isActive,
  1125       identifier
  1282       className: dist_clsx('interface-complementary-area', className),
  1126     }
  1283       scope: scope,
  1127   }, header || (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("strong", null, title), isPinnable && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  1284       id: identifier.replace('/', ':'),
  1128     className: "interface-complementary-area__pin-unpin-item",
  1285       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_header, {
  1129     icon: isPinned ? star_filled : star_empty,
  1286         className: headerClassName,
  1130     label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'),
  1287         closeLabel: closeLabel,
  1131     onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier),
  1288         onClose: () => disableComplementaryArea(scope),
  1132     isPressed: isPinned,
  1289         smallScreenTitle: smallScreenTitle,
  1133     "aria-expanded": isPinned
  1290         toggleButtonProps: {
  1134   }))), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Panel, {
  1291           label: closeLabel,
  1135     className: panelClassName
  1292           size: 'small',
  1136   }, children)));
  1293           shortcut: toggleShortcut,
  1137 }
  1294           scope,
  1138 
  1295           identifier
       
  1296         },
       
  1297         children: header || /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
  1298           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
       
  1299             className: "interface-complementary-area-header__title",
       
  1300             children: title
       
  1301           }), isPinnable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  1302             className: "interface-complementary-area__pin-unpin-item",
       
  1303             icon: isPinned ? star_filled : star_empty,
       
  1304             label: isPinned ? (0,external_wp_i18n_namespaceObject.__)('Unpin from toolbar') : (0,external_wp_i18n_namespaceObject.__)('Pin to toolbar'),
       
  1305             onClick: () => (isPinned ? unpinItem : pinItem)(scope, identifier),
       
  1306             isPressed: isPinned,
       
  1307             "aria-expanded": isPinned,
       
  1308             size: "compact"
       
  1309           })]
       
  1310         })
       
  1311       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Panel, {
       
  1312         className: panelClassName,
       
  1313         children: children
       
  1314       })]
       
  1315     })]
       
  1316   });
       
  1317 }
  1139 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea);
  1318 const ComplementaryAreaWrapped = complementary_area_context(ComplementaryArea);
  1140 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
  1319 ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
  1141 /* harmony default export */ var complementary_area = (ComplementaryAreaWrapped);
  1320 /* harmony default export */ const complementary_area = (ComplementaryAreaWrapped);
  1142 
  1321 
  1143 ;// CONCATENATED MODULE: external ["wp","compose"]
  1322 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/navigable-region/index.js
  1144 var external_wp_compose_namespaceObject = window["wp"]["compose"];
  1323 /**
       
  1324  * External dependencies
       
  1325  */
       
  1326 
       
  1327 
       
  1328 function NavigableRegion({
       
  1329   children,
       
  1330   className,
       
  1331   ariaLabel,
       
  1332   as: Tag = 'div',
       
  1333   ...props
       
  1334 }) {
       
  1335   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tag, {
       
  1336     className: dist_clsx('interface-navigable-region', className),
       
  1337     "aria-label": ariaLabel,
       
  1338     role: "region",
       
  1339     tabIndex: "-1",
       
  1340     ...props,
       
  1341     children: children
       
  1342   });
       
  1343 }
       
  1344 
  1145 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
  1345 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/interface-skeleton/index.js
  1146 
       
  1147 
       
  1148 
       
  1149 /**
  1346 /**
  1150  * External dependencies
  1347  * External dependencies
  1151  */
  1348  */
  1152 
  1349 
  1153 /**
  1350 
  1154  * WordPress dependencies
  1351 /**
  1155  */
  1352  * WordPress dependencies
  1156 
  1353  */
  1157 /**
  1354 
  1158  * WordPress dependencies
  1355 
  1159  */
  1356 
  1160 
  1357 
  1161 
  1358 
  1162 
  1359 /**
  1163 
  1360  * Internal dependencies
  1164 
  1361  */
  1165 
  1362 
       
  1363 
       
  1364 
       
  1365 const interface_skeleton_ANIMATION_DURATION = 0.25;
       
  1366 const commonTransition = {
       
  1367   type: 'tween',
       
  1368   duration: interface_skeleton_ANIMATION_DURATION,
       
  1369   ease: [0.6, 0, 0.4, 1]
       
  1370 };
  1166 function useHTMLClass(className) {
  1371 function useHTMLClass(className) {
  1167   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1372   (0,external_wp_element_namespaceObject.useEffect)(() => {
  1168     const element = document && document.querySelector(`html:not(.${className})`);
  1373     const element = document && document.querySelector(`html:not(.${className})`);
  1169 
       
  1170     if (!element) {
  1374     if (!element) {
  1171       return;
  1375       return;
  1172     }
  1376     }
  1173 
       
  1174     element.classList.toggle(className);
  1377     element.classList.toggle(className);
  1175     return () => {
  1378     return () => {
  1176       element.classList.toggle(className);
  1379       element.classList.toggle(className);
  1177     };
  1380     };
  1178   }, [className]);
  1381   }, [className]);
  1179 }
  1382 }
  1180 
  1383 const headerVariants = {
  1181 function InterfaceSkeleton(_ref, ref) {
  1384   hidden: {
  1182   let {
  1385     opacity: 1,
  1183     footer,
  1386     marginTop: -60
  1184     header,
  1387   },
  1185     sidebar,
  1388   visible: {
  1186     secondarySidebar,
  1389     opacity: 1,
  1187     notices,
  1390     marginTop: 0
  1188     content,
  1391   },
  1189     drawer,
  1392   distractionFreeHover: {
  1190     actions,
  1393     opacity: 1,
  1191     labels,
  1394     marginTop: 0,
  1192     className,
  1395     transition: {
  1193     shortcuts
  1396       ...commonTransition,
  1194   } = _ref;
  1397       delay: 0.2,
       
  1398       delayChildren: 0.2
       
  1399     }
       
  1400   },
       
  1401   distractionFreeHidden: {
       
  1402     opacity: 0,
       
  1403     marginTop: -60
       
  1404   },
       
  1405   distractionFreeDisabled: {
       
  1406     opacity: 0,
       
  1407     marginTop: 0,
       
  1408     transition: {
       
  1409       ...commonTransition,
       
  1410       delay: 0.8,
       
  1411       delayChildren: 0.8
       
  1412     }
       
  1413   }
       
  1414 };
       
  1415 function InterfaceSkeleton({
       
  1416   isDistractionFree,
       
  1417   footer,
       
  1418   header,
       
  1419   editorNotices,
       
  1420   sidebar,
       
  1421   secondarySidebar,
       
  1422   content,
       
  1423   actions,
       
  1424   labels,
       
  1425   className,
       
  1426   enableRegionNavigation = true,
       
  1427   // Todo: does this need to be a prop.
       
  1428   // Can we use a dependency to keyboard-shortcuts directly?
       
  1429   shortcuts
       
  1430 }, ref) {
       
  1431   const [secondarySidebarResizeListener, secondarySidebarSize] = (0,external_wp_compose_namespaceObject.useResizeObserver)();
       
  1432   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
       
  1433   const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
       
  1434   const defaultTransition = {
       
  1435     type: 'tween',
       
  1436     duration: disableMotion ? 0 : interface_skeleton_ANIMATION_DURATION,
       
  1437     ease: [0.6, 0, 0.4, 1]
       
  1438   };
  1195   const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts);
  1439   const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)(shortcuts);
  1196   useHTMLClass('interface-interface-skeleton__html-container');
  1440   useHTMLClass('interface-interface-skeleton__html-container');
  1197   const defaultLabels = {
  1441   const defaultLabels = {
  1198     /* translators: accessibility text for the nav bar landmark region. */
       
  1199     drawer: (0,external_wp_i18n_namespaceObject.__)('Drawer'),
       
  1200 
       
  1201     /* translators: accessibility text for the top bar landmark region. */
  1442     /* translators: accessibility text for the top bar landmark region. */
  1202     header: (0,external_wp_i18n_namespaceObject.__)('Header'),
  1443     header: (0,external_wp_i18n_namespaceObject._x)('Header', 'header landmark area'),
  1203 
       
  1204     /* translators: accessibility text for the content landmark region. */
  1444     /* translators: accessibility text for the content landmark region. */
  1205     body: (0,external_wp_i18n_namespaceObject.__)('Content'),
  1445     body: (0,external_wp_i18n_namespaceObject.__)('Content'),
  1206 
       
  1207     /* translators: accessibility text for the secondary sidebar landmark region. */
  1446     /* translators: accessibility text for the secondary sidebar landmark region. */
  1208     secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
  1447     secondarySidebar: (0,external_wp_i18n_namespaceObject.__)('Block Library'),
  1209 
       
  1210     /* translators: accessibility text for the settings landmark region. */
  1448     /* translators: accessibility text for the settings landmark region. */
  1211     sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'),
  1449     sidebar: (0,external_wp_i18n_namespaceObject.__)('Settings'),
  1212 
       
  1213     /* translators: accessibility text for the publish landmark region. */
  1450     /* translators: accessibility text for the publish landmark region. */
  1214     actions: (0,external_wp_i18n_namespaceObject.__)('Publish'),
  1451     actions: (0,external_wp_i18n_namespaceObject.__)('Publish'),
  1215 
       
  1216     /* translators: accessibility text for the footer landmark region. */
  1452     /* translators: accessibility text for the footer landmark region. */
  1217     footer: (0,external_wp_i18n_namespaceObject.__)('Footer')
  1453     footer: (0,external_wp_i18n_namespaceObject.__)('Footer')
  1218   };
  1454   };
  1219   const mergedLabels = { ...defaultLabels,
  1455   const mergedLabels = {
       
  1456     ...defaultLabels,
  1220     ...labels
  1457     ...labels
  1221   };
  1458   };
  1222   return (0,external_wp_element_namespaceObject.createElement)("div", _extends({}, navigateRegionsProps, {
  1459   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1223     ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, navigateRegionsProps.ref]),
  1460     ...(enableRegionNavigation ? navigateRegionsProps : {}),
  1224     className: classnames_default()(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer')
  1461     ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([ref, enableRegionNavigation ? navigateRegionsProps.ref : undefined]),
  1225   }), !!drawer && (0,external_wp_element_namespaceObject.createElement)("div", {
  1462     className: dist_clsx(className, 'interface-interface-skeleton', navigateRegionsProps.className, !!footer && 'has-footer'),
  1226     className: "interface-interface-skeleton__drawer",
  1463     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1227     role: "region",
  1464       className: "interface-interface-skeleton__editor",
  1228     "aria-label": mergedLabels.drawer,
  1465       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
  1229     tabIndex: "-1"
  1466         initial: false,
  1230   }, drawer), (0,external_wp_element_namespaceObject.createElement)("div", {
  1467         children: !!header && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1231     className: "interface-interface-skeleton__editor"
  1468           as: external_wp_components_namespaceObject.__unstableMotion.div,
  1232   }, !!header && (0,external_wp_element_namespaceObject.createElement)("div", {
  1469           className: "interface-interface-skeleton__header",
  1233     className: "interface-interface-skeleton__header",
  1470           "aria-label": mergedLabels.header,
  1234     role: "region",
  1471           initial: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
  1235     "aria-label": mergedLabels.header,
  1472           whileHover: isDistractionFree ? 'distractionFreeHover' : 'visible',
  1236     tabIndex: "-1"
  1473           animate: isDistractionFree ? 'distractionFreeDisabled' : 'visible',
  1237   }, header), (0,external_wp_element_namespaceObject.createElement)("div", {
  1474           exit: isDistractionFree ? 'distractionFreeHidden' : 'hidden',
  1238     className: "interface-interface-skeleton__body"
  1475           variants: headerVariants,
  1239   }, !!secondarySidebar && (0,external_wp_element_namespaceObject.createElement)("div", {
  1476           transition: defaultTransition,
  1240     className: "interface-interface-skeleton__secondary-sidebar",
  1477           children: header
  1241     role: "region",
  1478         })
  1242     "aria-label": mergedLabels.secondarySidebar,
  1479       }), isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  1243     tabIndex: "-1"
  1480         className: "interface-interface-skeleton__header",
  1244   }, secondarySidebar), !!notices && (0,external_wp_element_namespaceObject.createElement)("div", {
  1481         children: editorNotices
  1245     className: "interface-interface-skeleton__notices"
  1482       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1246   }, notices), (0,external_wp_element_namespaceObject.createElement)("div", {
  1483         className: "interface-interface-skeleton__body",
  1247     className: "interface-interface-skeleton__content",
  1484         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableAnimatePresence, {
  1248     role: "region",
  1485           initial: false,
  1249     "aria-label": mergedLabels.body,
  1486           children: !!secondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1250     tabIndex: "-1"
  1487             className: "interface-interface-skeleton__secondary-sidebar",
  1251   }, content), !!sidebar && (0,external_wp_element_namespaceObject.createElement)("div", {
  1488             ariaLabel: mergedLabels.secondarySidebar,
  1252     className: "interface-interface-skeleton__sidebar",
  1489             as: external_wp_components_namespaceObject.__unstableMotion.div,
  1253     role: "region",
  1490             initial: "closed",
  1254     "aria-label": mergedLabels.sidebar,
  1491             animate: isMobileViewport ? 'mobileOpen' : 'open',
  1255     tabIndex: "-1"
  1492             exit: "closed",
  1256   }, sidebar), !!actions && (0,external_wp_element_namespaceObject.createElement)("div", {
  1493             variants: {
  1257     className: "interface-interface-skeleton__actions",
  1494               open: {
  1258     role: "region",
  1495                 width: secondarySidebarSize.width
  1259     "aria-label": mergedLabels.actions,
  1496               },
  1260     tabIndex: "-1"
  1497               closed: {
  1261   }, actions))), !!footer && (0,external_wp_element_namespaceObject.createElement)("div", {
  1498                 width: 0
  1262     className: "interface-interface-skeleton__footer",
  1499               },
  1263     role: "region",
  1500               mobileOpen: {
  1264     "aria-label": mergedLabels.footer,
  1501                 width: '100vw'
  1265     tabIndex: "-1"
  1502               }
  1266   }, footer));
  1503             },
  1267 }
  1504             transition: defaultTransition,
  1268 
  1505             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  1269 /* harmony default export */ var interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton));
  1506               style: {
  1270 
  1507                 position: 'absolute',
  1271 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
  1508                 width: isMobileViewport ? '100vw' : 'fit-content',
  1272 
  1509                 height: '100%',
  1273 
  1510                 right: 0
  1274 /**
  1511               },
  1275  * WordPress dependencies
  1512               children: [secondarySidebarResizeListener, secondarySidebar]
  1276  */
  1513             })
  1277 
  1514           })
  1278 const moreVertical = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  1515         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1279   xmlns: "http://www.w3.org/2000/svg",
  1516           className: "interface-interface-skeleton__content",
  1280   viewBox: "0 0 24 24"
  1517           ariaLabel: mergedLabels.body,
  1281 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  1518           children: content
  1282   d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
  1519         }), !!sidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1283 }));
  1520           className: "interface-interface-skeleton__sidebar",
  1284 /* harmony default export */ var more_vertical = (moreVertical);
  1521           ariaLabel: mergedLabels.sidebar,
  1285 
  1522           children: sidebar
  1286 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/more-menu-dropdown/index.js
  1523         }), !!actions && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1287 
  1524           className: "interface-interface-skeleton__actions",
  1288 
  1525           ariaLabel: mergedLabels.actions,
  1289 /**
  1526           children: actions
  1290  * External dependencies
  1527         })]
  1291  */
  1528       })]
  1292 
  1529     }), !!footer && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableRegion, {
  1293 /**
  1530       className: "interface-interface-skeleton__footer",
  1294  * WordPress dependencies
  1531       ariaLabel: mergedLabels.footer,
  1295  */
  1532       children: footer
  1296 
  1533     })]
  1297 
  1534   });
  1298 
  1535 }
  1299 
  1536 /* harmony default export */ const interface_skeleton = ((0,external_wp_element_namespaceObject.forwardRef)(InterfaceSkeleton));
  1300 function MoreMenuDropdown(_ref) {
       
  1301   let {
       
  1302     as: DropdownComponent = external_wp_components_namespaceObject.DropdownMenu,
       
  1303     className,
       
  1304 
       
  1305     /* translators: button label text should, if possible, be under 16 characters. */
       
  1306     label = (0,external_wp_i18n_namespaceObject.__)('Options'),
       
  1307     popoverProps,
       
  1308     toggleProps,
       
  1309     children
       
  1310   } = _ref;
       
  1311   return (0,external_wp_element_namespaceObject.createElement)(DropdownComponent, {
       
  1312     className: classnames_default()('interface-more-menu-dropdown', className),
       
  1313     icon: more_vertical,
       
  1314     label: label,
       
  1315     popoverProps: {
       
  1316       position: 'bottom left',
       
  1317       ...popoverProps,
       
  1318       className: classnames_default()('interface-more-menu-dropdown__content', popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.className)
       
  1319     },
       
  1320     toggleProps: {
       
  1321       tooltipPosition: 'bottom',
       
  1322       ...toggleProps
       
  1323     }
       
  1324   }, onClose => children(onClose));
       
  1325 }
       
  1326 
  1537 
  1327 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
  1538 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/index.js
  1328 
  1539 
  1329 
  1540 
  1330 
  1541 
  1331 
  1542 
  1332 
  1543 
  1333 
  1544 
  1334 
  1545 
  1335 
  1546 
  1336 
       
  1337 
       
  1338 
       
  1339 
       
  1340 
       
  1341 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
  1547 ;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/index.js
  1342 
  1548 
  1343 
  1549 
  1344 
  1550 
  1345 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
  1551 ;// CONCATENATED MODULE: external ["wp","blockEditor"]
  1346 var external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
  1552 const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
  1347 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js
  1553 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/transformers.js
  1348 /**
  1554 /**
  1349  * WordPress dependencies
  1555  * WordPress dependencies
  1350  */
  1556  */
       
  1557 
  1351 
  1558 
  1352 
  1559 
  1353 /**
  1560 /**
  1354  * Converts a widget entity record into a block.
  1561  * Converts a widget entity record into a block.
  1355  *
  1562  *
  1356  * @param {Object} widget The widget entity record.
  1563  * @param {Object} widget The widget entity record.
  1357  * @return {Object} a block (converted from the entity record).
  1564  * @return {Object} a block (converted from the entity record).
  1358  */
  1565  */
  1359 
       
  1360 function transformWidgetToBlock(widget) {
  1566 function transformWidgetToBlock(widget) {
  1361   if (widget.id_base === 'block') {
  1567   if (widget.id_base === 'block') {
  1362     const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(widget.instance.raw.content);
  1568     const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)(widget.instance.raw.content, {
  1363 
  1569       __unstableSkipAutop: true
       
  1570     });
  1364     if (!parsedBlocks.length) {
  1571     if (!parsedBlocks.length) {
  1365       return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {}, []), widget.id);
  1572       return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {}, []), widget.id);
  1366     }
  1573     }
  1367 
       
  1368     return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(parsedBlocks[0], widget.id);
  1574     return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(parsedBlocks[0], widget.id);
  1369   }
  1575   }
  1370 
       
  1371   let attributes;
  1576   let attributes;
  1372 
       
  1373   if (widget._embedded.about[0].is_multi) {
  1577   if (widget._embedded.about[0].is_multi) {
  1374     attributes = {
  1578     attributes = {
  1375       idBase: widget.id_base,
  1579       idBase: widget.id_base,
  1376       instance: widget.instance
  1580       instance: widget.instance
  1377     };
  1581     };
  1378   } else {
  1582   } else {
  1379     attributes = {
  1583     attributes = {
  1380       id: widget.id
  1584       id: widget.id
  1381     };
  1585     };
  1382   }
  1586   }
  1383 
       
  1384   return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', attributes, []), widget.id);
  1587   return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)((0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', attributes, []), widget.id);
  1385 }
  1588 }
       
  1589 
  1386 /**
  1590 /**
  1387  * Converts a block to a widget entity record.
  1591  * Converts a block to a widget entity record.
  1388  *
  1592  *
  1389  * @param {Object}  block         The block.
  1593  * @param {Object}  block         The block.
  1390  * @param {Object?} relatedWidget A related widget entity record from the API (optional).
  1594  * @param {Object?} relatedWidget A related widget entity record from the API (optional).
  1391  * @return {Object} the widget object (converted from block).
  1595  * @return {Object} the widget object (converted from block).
  1392  */
  1596  */
  1393 
  1597 function transformBlockToWidget(block, relatedWidget = {}) {
  1394 function transformBlockToWidget(block) {
       
  1395   let relatedWidget = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
       
  1396   let widget;
  1598   let widget;
  1397   const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
  1599   const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
  1398 
       
  1399   if (isValidLegacyWidgetBlock) {
  1600   if (isValidLegacyWidgetBlock) {
  1400     var _block$attributes$id, _block$attributes$idB, _block$attributes$ins;
  1601     var _block$attributes$id, _block$attributes$idB, _block$attributes$ins;
  1401 
  1602     widget = {
  1402     widget = { ...relatedWidget,
  1603       ...relatedWidget,
  1403       id: (_block$attributes$id = block.attributes.id) !== null && _block$attributes$id !== void 0 ? _block$attributes$id : relatedWidget.id,
  1604       id: (_block$attributes$id = block.attributes.id) !== null && _block$attributes$id !== void 0 ? _block$attributes$id : relatedWidget.id,
  1404       id_base: (_block$attributes$idB = block.attributes.idBase) !== null && _block$attributes$idB !== void 0 ? _block$attributes$idB : relatedWidget.id_base,
  1605       id_base: (_block$attributes$idB = block.attributes.idBase) !== null && _block$attributes$idB !== void 0 ? _block$attributes$idB : relatedWidget.id_base,
  1405       instance: (_block$attributes$ins = block.attributes.instance) !== null && _block$attributes$ins !== void 0 ? _block$attributes$ins : relatedWidget.instance
  1606       instance: (_block$attributes$ins = block.attributes.instance) !== null && _block$attributes$ins !== void 0 ? _block$attributes$ins : relatedWidget.instance
  1406     };
  1607     };
  1407   } else {
  1608   } else {
  1408     widget = { ...relatedWidget,
  1609     widget = {
       
  1610       ...relatedWidget,
  1409       id_base: 'block',
  1611       id_base: 'block',
  1410       instance: {
  1612       instance: {
  1411         raw: {
  1613         raw: {
  1412           content: (0,external_wp_blocks_namespaceObject.serialize)(block)
  1614           content: (0,external_wp_blocks_namespaceObject.serialize)(block)
  1413         }
  1615         }
  1414       }
  1616       }
  1415     };
  1617     };
  1416   } // Delete read-only properties.
  1618   }
  1417 
  1619 
  1418 
  1620   // Delete read-only properties.
  1419   delete widget.rendered;
  1621   delete widget.rendered;
  1420   delete widget.rendered_form;
  1622   delete widget.rendered_form;
  1421   return widget;
  1623   return widget;
  1422 }
  1624 }
  1423 
  1625 
  1426  * "Kind" of the navigation post.
  1628  * "Kind" of the navigation post.
  1427  *
  1629  *
  1428  * @type {string}
  1630  * @type {string}
  1429  */
  1631  */
  1430 const KIND = 'root';
  1632 const KIND = 'root';
       
  1633 
  1431 /**
  1634 /**
  1432  * "post type" of the navigation post.
  1635  * "post type" of the navigation post.
  1433  *
  1636  *
  1434  * @type {string}
  1637  * @type {string}
  1435  */
  1638  */
  1436 
       
  1437 const WIDGET_AREA_ENTITY_TYPE = 'sidebar';
  1639 const WIDGET_AREA_ENTITY_TYPE = 'sidebar';
       
  1640 
  1438 /**
  1641 /**
  1439  * "post type" of the widget area post.
  1642  * "post type" of the widget area post.
  1440  *
  1643  *
  1441  * @type {string}
  1644  * @type {string}
  1442  */
  1645  */
  1443 
       
  1444 const POST_TYPE = 'postType';
  1646 const POST_TYPE = 'postType';
       
  1647 
  1445 /**
  1648 /**
  1446  * Builds an ID for a new widget area post.
  1649  * Builds an ID for a new widget area post.
  1447  *
  1650  *
  1448  * @param {number} widgetAreaId Widget area id.
  1651  * @param {number} widgetAreaId Widget area id.
  1449  * @return {string} An ID.
  1652  * @return {string} An ID.
  1450  */
  1653  */
  1451 
       
  1452 const buildWidgetAreaPostId = widgetAreaId => `widget-area-${widgetAreaId}`;
  1654 const buildWidgetAreaPostId = widgetAreaId => `widget-area-${widgetAreaId}`;
       
  1655 
  1453 /**
  1656 /**
  1454  * Builds an ID for a global widget areas post.
  1657  * Builds an ID for a global widget areas post.
  1455  *
  1658  *
  1456  * @return {string} An ID.
  1659  * @return {string} An ID.
  1457  */
  1660  */
  1458 
       
  1459 const buildWidgetAreasPostId = () => `widget-areas`;
  1661 const buildWidgetAreasPostId = () => `widget-areas`;
       
  1662 
  1460 /**
  1663 /**
  1461  * Builds a query to resolve sidebars.
  1664  * Builds a query to resolve sidebars.
  1462  *
  1665  *
  1463  * @return {Object} Query.
  1666  * @return {Object} Query.
  1464  */
  1667  */
  1465 
       
  1466 function buildWidgetAreasQuery() {
  1668 function buildWidgetAreasQuery() {
  1467   return {
  1669   return {
  1468     per_page: -1
  1670     per_page: -1
  1469   };
  1671   };
  1470 }
  1672 }
       
  1673 
  1471 /**
  1674 /**
  1472  * Builds a query to resolve widgets.
  1675  * Builds a query to resolve widgets.
  1473  *
  1676  *
  1474  * @return {Object} Query.
  1677  * @return {Object} Query.
  1475  */
  1678  */
  1476 
       
  1477 function buildWidgetsQuery() {
  1679 function buildWidgetsQuery() {
  1478   return {
  1680   return {
  1479     per_page: -1,
  1681     per_page: -1,
  1480     _embed: 'about'
  1682     _embed: 'about'
  1481   };
  1683   };
  1482 }
  1684 }
       
  1685 
  1483 /**
  1686 /**
  1484  * Creates a stub post with given id and set of blocks. Used as a governing entity records
  1687  * Creates a stub post with given id and set of blocks. Used as a governing entity records
  1485  * for all widget areas.
  1688  * for all widget areas.
  1486  *
  1689  *
  1487  * @param {string} id     Post ID.
  1690  * @param {string} id     Post ID.
  1488  * @param {Array}  blocks The list of blocks.
  1691  * @param {Array}  blocks The list of blocks.
  1489  * @return {Object} A stub post object formatted in compliance with the data layer.
  1692  * @return {Object} A stub post object formatted in compliance with the data layer.
  1490  */
  1693  */
  1491 
       
  1492 const createStubPost = (id, blocks) => ({
  1694 const createStubPost = (id, blocks) => ({
  1493   id,
  1695   id,
  1494   slug: id,
  1696   slug: id,
  1495   status: 'draft',
  1697   status: 'draft',
  1496   type: 'page',
  1698   type: 'page',
  1514 
  1716 
  1515 
  1717 
  1516 
  1718 
  1517 
  1719 
  1518 
  1720 
       
  1721 
  1519 /**
  1722 /**
  1520  * Internal dependencies
  1723  * Internal dependencies
  1521  */
  1724  */
  1522 
  1725 
  1523 
  1726 
  1529  *
  1732  *
  1530  * @param {string} id     Post ID.
  1733  * @param {string} id     Post ID.
  1531  * @param {Array}  blocks Blocks the post should consist of.
  1734  * @param {Array}  blocks Blocks the post should consist of.
  1532  * @return {Object} The post object.
  1735  * @return {Object} The post object.
  1533  */
  1736  */
  1534 
  1737 const persistStubPost = (id, blocks) => ({
  1535 const persistStubPost = (id, blocks) => _ref => {
  1738   registry
  1536   let {
  1739 }) => {
  1537     registry
       
  1538   } = _ref;
       
  1539   const stubPost = createStubPost(id, blocks);
  1740   const stubPost = createStubPost(id, blocks);
  1540   registry.dispatch(external_wp_coreData_namespaceObject.store).receiveEntityRecords(KIND, POST_TYPE, stubPost, {
  1741   registry.dispatch(external_wp_coreData_namespaceObject.store).receiveEntityRecords(KIND, POST_TYPE, stubPost, {
  1541     id: stubPost.id
  1742     id: stubPost.id
  1542   }, false);
  1743   }, false);
  1543   return stubPost;
  1744   return stubPost;
  1544 };
  1745 };
       
  1746 
  1545 /**
  1747 /**
  1546  * Converts all the blocks from edited widget areas into widgets,
  1748  * Converts all the blocks from edited widget areas into widgets,
  1547  * and submits a batch request to save everything at once.
  1749  * and submits a batch request to save everything at once.
  1548  *
  1750  *
  1549  * Creates a snackbar notice on either success or error.
  1751  * Creates a snackbar notice on either success or error.
  1550  *
  1752  *
  1551  * @return {Function} An action creator.
  1753  * @return {Function} An action creator.
  1552  */
  1754  */
  1553 
  1755 const saveEditedWidgetAreas = () => async ({
  1554 const saveEditedWidgetAreas = () => async _ref2 => {
  1756   select,
  1555   let {
  1757   dispatch,
  1556     select,
  1758   registry
  1557     dispatch,
  1759 }) => {
  1558     registry
       
  1559   } = _ref2;
       
  1560   const editedWidgetAreas = select.getEditedWidgetAreas();
  1760   const editedWidgetAreas = select.getEditedWidgetAreas();
  1561 
  1761   if (!editedWidgetAreas?.length) {
  1562   if (!(editedWidgetAreas !== null && editedWidgetAreas !== void 0 && editedWidgetAreas.length)) {
       
  1563     return;
  1762     return;
  1564   }
  1763   }
  1565 
       
  1566   try {
  1764   try {
  1567     await dispatch.saveWidgetAreas(editedWidgetAreas);
  1765     await dispatch.saveWidgetAreas(editedWidgetAreas);
  1568     registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Widgets saved.'), {
  1766     registry.dispatch(external_wp_notices_namespaceObject.store).createSuccessNotice((0,external_wp_i18n_namespaceObject.__)('Widgets saved.'), {
  1569       type: 'snackbar'
  1767       type: 'snackbar'
  1570     });
  1768     });
  1571   } catch (e) {
  1769   } catch (e) {
  1572     registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice(
  1770     registry.dispatch(external_wp_notices_namespaceObject.store).createErrorNotice( /* translators: %s: The error message. */
  1573     /* translators: %s: The error message. */
       
  1574     (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('There was an error. %s'), e.message), {
  1771     (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('There was an error. %s'), e.message), {
  1575       type: 'snackbar'
  1772       type: 'snackbar'
  1576     });
  1773     });
  1577   }
  1774   }
  1578 };
  1775 };
       
  1776 
  1579 /**
  1777 /**
  1580  * Converts all the blocks from specified widget areas into widgets,
  1778  * Converts all the blocks from specified widget areas into widgets,
  1581  * and submits a batch request to save everything at once.
  1779  * and submits a batch request to save everything at once.
  1582  *
  1780  *
  1583  * @param {Object[]} widgetAreas Widget areas to save.
  1781  * @param {Object[]} widgetAreas Widget areas to save.
  1584  * @return {Function} An action creator.
  1782  * @return {Function} An action creator.
  1585  */
  1783  */
  1586 
  1784 const saveWidgetAreas = widgetAreas => async ({
  1587 const saveWidgetAreas = widgetAreas => async _ref3 => {
  1785   dispatch,
  1588   let {
  1786   registry
  1589     dispatch,
  1787 }) => {
  1590     registry
       
  1591   } = _ref3;
       
  1592 
       
  1593   try {
  1788   try {
  1594     for (const widgetArea of widgetAreas) {
  1789     for (const widgetArea of widgetAreas) {
  1595       await dispatch.saveWidgetArea(widgetArea.id);
  1790       await dispatch.saveWidgetArea(widgetArea.id);
  1596     }
  1791     }
  1597   } finally {
  1792   } finally {
  1598     // saveEditedEntityRecord resets the resolution status, let's fix it manually.
  1793     // saveEditedEntityRecord resets the resolution status, let's fix it manually.
  1599     await registry.dispatch(external_wp_coreData_namespaceObject.store).finishResolution('getEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreasQuery());
  1794     await registry.dispatch(external_wp_coreData_namespaceObject.store).finishResolution('getEntityRecord', KIND, WIDGET_AREA_ENTITY_TYPE, buildWidgetAreasQuery());
  1600   }
  1795   }
  1601 };
  1796 };
       
  1797 
  1602 /**
  1798 /**
  1603  * Converts all the blocks from a widget area specified by ID into widgets,
  1799  * Converts all the blocks from a widget area specified by ID into widgets,
  1604  * and submits a batch request to save everything at once.
  1800  * and submits a batch request to save everything at once.
  1605  *
  1801  *
  1606  * @param {string} widgetAreaId ID of the widget area to process.
  1802  * @param {string} widgetAreaId ID of the widget area to process.
  1607  * @return {Function} An action creator.
  1803  * @return {Function} An action creator.
  1608  */
  1804  */
  1609 
  1805 const saveWidgetArea = widgetAreaId => async ({
  1610 const saveWidgetArea = widgetAreaId => async _ref4 => {
  1806   dispatch,
  1611   let {
  1807   select,
  1612     dispatch,
  1808   registry
  1613     select,
  1809 }) => {
  1614     registry
       
  1615   } = _ref4;
       
  1616   const widgets = select.getWidgets();
  1810   const widgets = select.getWidgets();
  1617   const post = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(widgetAreaId)); // Get all widgets from this area
  1811   const post = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(widgetAreaId));
  1618 
  1812 
  1619   const areaWidgets = Object.values(widgets).filter(_ref5 => {
  1813   // Get all widgets from this area
  1620     let {
  1814   const areaWidgets = Object.values(widgets).filter(({
  1621       sidebar
  1815     sidebar
  1622     } = _ref5;
  1816   }) => sidebar === widgetAreaId);
  1623     return sidebar === widgetAreaId;
  1817 
  1624   }); // Remove all duplicate reference widget instances for legacy widgets.
  1818   // Remove all duplicate reference widget instances for legacy widgets.
  1625   // Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget
  1819   // Why? We filter out the widgets with duplicate IDs to prevent adding more than one instance of a widget
  1626   // implemented using a function. WordPress doesn't support having more than one instance of these, if you try to
  1820   // implemented using a function. WordPress doesn't support having more than one instance of these, if you try to
  1627   // save multiple instances of these in different sidebars you will run into undefined behaviors.
  1821   // save multiple instances of these in different sidebars you will run into undefined behaviors.
  1628 
       
  1629   const usedReferenceWidgets = [];
  1822   const usedReferenceWidgets = [];
  1630   const widgetsBlocks = post.blocks.filter(block => {
  1823   const widgetsBlocks = post.blocks.filter(block => {
  1631     const {
  1824     const {
  1632       id
  1825       id
  1633     } = block.attributes;
  1826     } = block.attributes;
  1634 
       
  1635     if (block.name === 'core/legacy-widget' && id) {
  1827     if (block.name === 'core/legacy-widget' && id) {
  1636       if (usedReferenceWidgets.includes(id)) {
  1828       if (usedReferenceWidgets.includes(id)) {
  1637         return false;
  1829         return false;
  1638       }
  1830       }
  1639 
       
  1640       usedReferenceWidgets.push(id);
  1831       usedReferenceWidgets.push(id);
  1641     }
  1832     }
  1642 
       
  1643     return true;
  1833     return true;
  1644   }); // Determine which widgets have been deleted. We can tell if a widget is
  1834   });
       
  1835 
       
  1836   // Determine which widgets have been deleted. We can tell if a widget is
  1645   // deleted and not just moved to a different area by looking to see if
  1837   // deleted and not just moved to a different area by looking to see if
  1646   // getWidgetAreaForWidgetId() finds something.
  1838   // getWidgetAreaForWidgetId() finds something.
  1647 
       
  1648   const deletedWidgets = [];
  1839   const deletedWidgets = [];
  1649 
       
  1650   for (const widget of areaWidgets) {
  1840   for (const widget of areaWidgets) {
  1651     const widgetsNewArea = select.getWidgetAreaForWidgetId(widget.id);
  1841     const widgetsNewArea = select.getWidgetAreaForWidgetId(widget.id);
  1652 
       
  1653     if (!widgetsNewArea) {
  1842     if (!widgetsNewArea) {
  1654       deletedWidgets.push(widget);
  1843       deletedWidgets.push(widget);
  1655     }
  1844     }
  1656   }
  1845   }
  1657 
       
  1658   const batchMeta = [];
  1846   const batchMeta = [];
  1659   const batchTasks = [];
  1847   const batchTasks = [];
  1660   const sidebarWidgetsIds = [];
  1848   const sidebarWidgetsIds = [];
  1661 
       
  1662   for (let i = 0; i < widgetsBlocks.length; i++) {
  1849   for (let i = 0; i < widgetsBlocks.length; i++) {
  1663     const block = widgetsBlocks[i];
  1850     const block = widgetsBlocks[i];
  1664     const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block);
  1851     const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block);
  1665     const oldWidget = widgets[widgetId];
  1852     const oldWidget = widgets[widgetId];
  1666     const widget = transformBlockToWidget(block, oldWidget); // We'll replace the null widgetId after save, but we track it here
  1853     const widget = transformBlockToWidget(block, oldWidget);
       
  1854 
       
  1855     // We'll replace the null widgetId after save, but we track it here
  1667     // since order is important.
  1856     // since order is important.
  1668 
  1857     sidebarWidgetsIds.push(widgetId);
  1669     sidebarWidgetsIds.push(widgetId); // Check oldWidget as widgetId might refer to an ID which has been
  1858 
       
  1859     // Check oldWidget as widgetId might refer to an ID which has been
  1670     // deleted, e.g. if a deleted block is restored via undo after saving.
  1860     // deleted, e.g. if a deleted block is restored via undo after saving.
  1671 
       
  1672     if (oldWidget) {
  1861     if (oldWidget) {
  1673       // Update an existing widget.
  1862       // Update an existing widget.
  1674       registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('root', 'widget', widgetId, { ...widget,
  1863       registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord('root', 'widget', widgetId, {
       
  1864         ...widget,
  1675         sidebar: widgetAreaId
  1865         sidebar: widgetAreaId
  1676       }, {
  1866       }, {
  1677         undoIgnore: true
  1867         undoIgnore: true
  1678       });
  1868       });
  1679       const hasEdits = registry.select(external_wp_coreData_namespaceObject.store).hasEditsForEntityRecord('root', 'widget', widgetId);
  1869       const hasEdits = registry.select(external_wp_coreData_namespaceObject.store).hasEditsForEntityRecord('root', 'widget', widgetId);
  1680 
       
  1681       if (!hasEdits) {
  1870       if (!hasEdits) {
  1682         continue;
  1871         continue;
  1683       }
  1872       }
  1684 
  1873       batchTasks.push(({
  1685       batchTasks.push(_ref6 => {
  1874         saveEditedEntityRecord
  1686         let {
  1875       }) => saveEditedEntityRecord('root', 'widget', widgetId));
  1687           saveEditedEntityRecord
       
  1688         } = _ref6;
       
  1689         return saveEditedEntityRecord('root', 'widget', widgetId);
       
  1690       });
       
  1691     } else {
  1876     } else {
  1692       // Create a new widget.
  1877       // Create a new widget.
  1693       batchTasks.push(_ref7 => {
  1878       batchTasks.push(({
  1694         let {
  1879         saveEntityRecord
  1695           saveEntityRecord
  1880       }) => saveEntityRecord('root', 'widget', {
  1696         } = _ref7;
  1881         ...widget,
  1697         return saveEntityRecord('root', 'widget', { ...widget,
  1882         sidebar: widgetAreaId
  1698           sidebar: widgetAreaId
  1883       }));
  1699         });
       
  1700       });
       
  1701     }
  1884     }
  1702 
       
  1703     batchMeta.push({
  1885     batchMeta.push({
  1704       block,
  1886       block,
  1705       position: i,
  1887       position: i,
  1706       clientId: block.clientId
  1888       clientId: block.clientId
  1707     });
  1889     });
  1708   }
  1890   }
  1709 
       
  1710   for (const widget of deletedWidgets) {
  1891   for (const widget of deletedWidgets) {
  1711     batchTasks.push(_ref8 => {
  1892     batchTasks.push(({
  1712       let {
  1893       deleteEntityRecord
  1713         deleteEntityRecord
  1894     }) => deleteEntityRecord('root', 'widget', widget.id, {
  1714       } = _ref8;
  1895       force: true
  1715       return deleteEntityRecord('root', 'widget', widget.id, {
  1896     }));
  1716         force: true
  1897   }
  1717       });
       
  1718     });
       
  1719   }
       
  1720 
       
  1721   const records = await registry.dispatch(external_wp_coreData_namespaceObject.store).__experimentalBatch(batchTasks);
  1898   const records = await registry.dispatch(external_wp_coreData_namespaceObject.store).__experimentalBatch(batchTasks);
  1722   const preservedRecords = records.filter(record => !record.hasOwnProperty('deleted'));
  1899   const preservedRecords = records.filter(record => !record.hasOwnProperty('deleted'));
  1723   const failedWidgetNames = [];
  1900   const failedWidgetNames = [];
  1724 
       
  1725   for (let i = 0; i < preservedRecords.length; i++) {
  1901   for (let i = 0; i < preservedRecords.length; i++) {
  1726     const widget = preservedRecords[i];
  1902     const widget = preservedRecords[i];
  1727     const {
  1903     const {
  1728       block,
  1904       block,
  1729       position
  1905       position
  1730     } = batchMeta[i]; // Set __internalWidgetId on the block. This will be persisted to the
  1906     } = batchMeta[i];
       
  1907 
       
  1908     // Set __internalWidgetId on the block. This will be persisted to the
  1731     // store when we dispatch receiveEntityRecords( post ) below.
  1909     // store when we dispatch receiveEntityRecords( post ) below.
  1732 
       
  1733     post.blocks[position].attributes.__internalWidgetId = widget.id;
  1910     post.blocks[position].attributes.__internalWidgetId = widget.id;
  1734     const error = registry.select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError('root', 'widget', widget.id);
  1911     const error = registry.select(external_wp_coreData_namespaceObject.store).getLastEntitySaveError('root', 'widget', widget.id);
  1735 
       
  1736     if (error) {
  1912     if (error) {
  1737       var _block$attributes;
  1913       failedWidgetNames.push(block.attributes?.name || block?.name);
  1738 
       
  1739       failedWidgetNames.push(((_block$attributes = block.attributes) === null || _block$attributes === void 0 ? void 0 : _block$attributes.name) || (block === null || block === void 0 ? void 0 : block.name));
       
  1740     }
  1914     }
  1741 
       
  1742     if (!sidebarWidgetsIds[position]) {
  1915     if (!sidebarWidgetsIds[position]) {
  1743       sidebarWidgetsIds[position] = widget.id;
  1916       sidebarWidgetsIds[position] = widget.id;
  1744     }
  1917     }
  1745   }
  1918   }
  1746 
       
  1747   if (failedWidgetNames.length) {
  1919   if (failedWidgetNames.length) {
  1748     throw new Error((0,external_wp_i18n_namespaceObject.sprintf)(
  1920     throw new Error((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: List of widget names */
  1749     /* translators: %s: List of widget names */
       
  1750     (0,external_wp_i18n_namespaceObject.__)('Could not save the following widgets: %s.'), failedWidgetNames.join(', ')));
  1921     (0,external_wp_i18n_namespaceObject.__)('Could not save the following widgets: %s.'), failedWidgetNames.join(', ')));
  1751   }
  1922   }
  1752 
       
  1753   registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
  1923   registry.dispatch(external_wp_coreData_namespaceObject.store).editEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
  1754     widgets: sidebarWidgetsIds
  1924     widgets: sidebarWidgetsIds
  1755   }, {
  1925   }, {
  1756     undoIgnore: true
  1926     undoIgnore: true
  1757   });
  1927   });
  1758   dispatch(trySaveWidgetArea(widgetAreaId));
  1928   dispatch(trySaveWidgetArea(widgetAreaId));
  1759   registry.dispatch(external_wp_coreData_namespaceObject.store).receiveEntityRecords(KIND, POST_TYPE, post, undefined);
  1929   registry.dispatch(external_wp_coreData_namespaceObject.store).receiveEntityRecords(KIND, POST_TYPE, post, undefined);
  1760 };
  1930 };
  1761 
  1931 const trySaveWidgetArea = widgetAreaId => ({
  1762 const trySaveWidgetArea = widgetAreaId => _ref9 => {
  1932   registry
  1763   let {
  1933 }) => {
  1764     registry
       
  1765   } = _ref9;
       
  1766   registry.dispatch(external_wp_coreData_namespaceObject.store).saveEditedEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
  1934   registry.dispatch(external_wp_coreData_namespaceObject.store).saveEditedEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, widgetAreaId, {
  1767     throwOnError: true
  1935     throwOnError: true
  1768   });
  1936   });
  1769 };
  1937 };
       
  1938 
  1770 /**
  1939 /**
  1771  * Sets the clientId stored for a particular widgetId.
  1940  * Sets the clientId stored for a particular widgetId.
  1772  *
  1941  *
  1773  * @param {number} clientId Client id.
  1942  * @param {number} clientId Client id.
  1774  * @param {number} widgetId Widget id.
  1943  * @param {number} widgetId Widget id.
  1775  *
  1944  *
  1776  * @return {Object} Action.
  1945  * @return {Object} Action.
  1777  */
  1946  */
  1778 
       
  1779 
       
  1780 function setWidgetIdForClientId(clientId, widgetId) {
  1947 function setWidgetIdForClientId(clientId, widgetId) {
  1781   return {
  1948   return {
  1782     type: 'SET_WIDGET_ID_FOR_CLIENT_ID',
  1949     type: 'SET_WIDGET_ID_FOR_CLIENT_ID',
  1783     clientId,
  1950     clientId,
  1784     widgetId
  1951     widgetId
  1785   };
  1952   };
  1786 }
  1953 }
       
  1954 
  1787 /**
  1955 /**
  1788  * Sets the open state of all the widget areas.
  1956  * Sets the open state of all the widget areas.
  1789  *
  1957  *
  1790  * @param {Object} widgetAreasOpenState The open states of all the widget areas.
  1958  * @param {Object} widgetAreasOpenState The open states of all the widget areas.
  1791  *
  1959  *
  1792  * @return {Object} Action.
  1960  * @return {Object} Action.
  1793  */
  1961  */
  1794 
       
  1795 function setWidgetAreasOpenState(widgetAreasOpenState) {
  1962 function setWidgetAreasOpenState(widgetAreasOpenState) {
  1796   return {
  1963   return {
  1797     type: 'SET_WIDGET_AREAS_OPEN_STATE',
  1964     type: 'SET_WIDGET_AREAS_OPEN_STATE',
  1798     widgetAreasOpenState
  1965     widgetAreasOpenState
  1799   };
  1966   };
  1800 }
  1967 }
       
  1968 
  1801 /**
  1969 /**
  1802  * Sets the open state of the widget area.
  1970  * Sets the open state of the widget area.
  1803  *
  1971  *
  1804  * @param {string}  clientId The clientId of the widget area.
  1972  * @param {string}  clientId The clientId of the widget area.
  1805  * @param {boolean} isOpen   Whether the widget area should be opened.
  1973  * @param {boolean} isOpen   Whether the widget area should be opened.
  1806  *
  1974  *
  1807  * @return {Object} Action.
  1975  * @return {Object} Action.
  1808  */
  1976  */
  1809 
       
  1810 function setIsWidgetAreaOpen(clientId, isOpen) {
  1977 function setIsWidgetAreaOpen(clientId, isOpen) {
  1811   return {
  1978   return {
  1812     type: 'SET_IS_WIDGET_AREA_OPEN',
  1979     type: 'SET_IS_WIDGET_AREA_OPEN',
  1813     clientId,
  1980     clientId,
  1814     isOpen
  1981     isOpen
  1815   };
  1982   };
  1816 }
  1983 }
       
  1984 
  1817 /**
  1985 /**
  1818  * Returns an action object used to open/close the inserter.
  1986  * Returns an action object used to open/close the inserter.
  1819  *
  1987  *
  1820  * @param {boolean|Object} value                Whether the inserter should be
  1988  * @param {boolean|Object} value                Whether the inserter should be
  1821  *                                              opened (true) or closed (false).
  1989  *                                              opened (true) or closed (false).
  1824  * @param {string}         value.rootClientId   The root client ID to insert at.
  1992  * @param {string}         value.rootClientId   The root client ID to insert at.
  1825  * @param {number}         value.insertionIndex The index to insert at.
  1993  * @param {number}         value.insertionIndex The index to insert at.
  1826  *
  1994  *
  1827  * @return {Object} Action object.
  1995  * @return {Object} Action object.
  1828  */
  1996  */
  1829 
       
  1830 function setIsInserterOpened(value) {
  1997 function setIsInserterOpened(value) {
  1831   return {
  1998   return {
  1832     type: 'SET_IS_INSERTER_OPENED',
  1999     type: 'SET_IS_INSERTER_OPENED',
  1833     value
  2000     value
  1834   };
  2001   };
  1835 }
  2002 }
       
  2003 
  1836 /**
  2004 /**
  1837  * Returns an action object used to open/close the list view.
  2005  * Returns an action object used to open/close the list view.
  1838  *
  2006  *
  1839  * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.
  2007  * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.
  1840  * @return {Object} Action object.
  2008  * @return {Object} Action object.
  1841  */
  2009  */
  1842 
       
  1843 function setIsListViewOpened(isOpen) {
  2010 function setIsListViewOpened(isOpen) {
  1844   return {
  2011   return {
  1845     type: 'SET_IS_LIST_VIEW_OPENED',
  2012     type: 'SET_IS_LIST_VIEW_OPENED',
  1846     isOpen
  2013     isOpen
  1847   };
  2014   };
  1848 }
  2015 }
       
  2016 
  1849 /**
  2017 /**
  1850  * Returns an action object signalling that the user closed the sidebar.
  2018  * Returns an action object signalling that the user closed the sidebar.
  1851  *
  2019  *
  1852  * @return {Object} Action creator.
  2020  * @return {Object} Action creator.
  1853  */
  2021  */
  1854 
  2022 const closeGeneralSidebar = () => ({
  1855 const closeGeneralSidebar = () => _ref10 => {
  2023   registry
  1856   let {
  2024 }) => {
  1857     registry
       
  1858   } = _ref10;
       
  1859   registry.dispatch(store).disableComplementaryArea(constants_STORE_NAME);
  2025   registry.dispatch(store).disableComplementaryArea(constants_STORE_NAME);
  1860 };
  2026 };
       
  2027 
  1861 /**
  2028 /**
  1862  * Action that handles moving a block between widget areas
  2029  * Action that handles moving a block between widget areas
  1863  *
  2030  *
  1864  * @param {string} clientId     The clientId of the block to move.
  2031  * @param {string} clientId     The clientId of the block to move.
  1865  * @param {string} widgetAreaId The id of the widget area to move the block to.
  2032  * @param {string} widgetAreaId The id of the widget area to move the block to.
  1866  */
  2033  */
  1867 
  2034 const moveBlockToWidgetArea = (clientId, widgetAreaId) => async ({
  1868 const moveBlockToWidgetArea = (clientId, widgetAreaId) => async _ref11 => {
  2035   dispatch,
  1869   let {
  2036   select,
  1870     dispatch,
  2037   registry
  1871     select,
  2038 }) => {
  1872     registry
  2039   const sourceRootClientId = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockRootClientId(clientId);
  1873   } = _ref11;
  2040 
  1874   const sourceRootClientId = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockRootClientId([clientId]); // Search the top level blocks (widget areas) for the one with the matching
  2041   // Search the top level blocks (widget areas) for the one with the matching
  1875   // id attribute. Makes the assumption that all top-level blocks are widget
  2042   // id attribute. Makes the assumption that all top-level blocks are widget
  1876   // areas.
  2043   // areas.
  1877 
       
  1878   const widgetAreas = registry.select(external_wp_blockEditor_namespaceObject.store).getBlocks();
  2044   const widgetAreas = registry.select(external_wp_blockEditor_namespaceObject.store).getBlocks();
  1879   const destinationWidgetAreaBlock = widgetAreas.find(_ref12 => {
  2045   const destinationWidgetAreaBlock = widgetAreas.find(({
  1880     let {
  2046     attributes
  1881       attributes
  2047   }) => attributes.id === widgetAreaId);
  1882     } = _ref12;
  2048   const destinationRootClientId = destinationWidgetAreaBlock.clientId;
  1883     return attributes.id === widgetAreaId;
  2049 
  1884   });
  2050   // Get the index for moving to the end of the destination widget area.
  1885   const destinationRootClientId = destinationWidgetAreaBlock.clientId; // Get the index for moving to the end of the the destination widget area.
       
  1886 
       
  1887   const destinationInnerBlocksClientIds = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder(destinationRootClientId);
  2051   const destinationInnerBlocksClientIds = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder(destinationRootClientId);
  1888   const destinationIndex = destinationInnerBlocksClientIds.length; // Reveal the widget area, if it's not open.
  2052   const destinationIndex = destinationInnerBlocksClientIds.length;
  1889 
  2053 
       
  2054   // Reveal the widget area, if it's not open.
  1890   const isDestinationWidgetAreaOpen = select.getIsWidgetAreaOpen(destinationRootClientId);
  2055   const isDestinationWidgetAreaOpen = select.getIsWidgetAreaOpen(destinationRootClientId);
  1891 
       
  1892   if (!isDestinationWidgetAreaOpen) {
  2056   if (!isDestinationWidgetAreaOpen) {
  1893     dispatch.setIsWidgetAreaOpen(destinationRootClientId, true);
  2057     dispatch.setIsWidgetAreaOpen(destinationRootClientId, true);
  1894   } // Move the block.
  2058   }
  1895 
  2059 
  1896 
  2060   // Move the block.
  1897   registry.dispatch(external_wp_blockEditor_namespaceObject.store).moveBlocksToPosition([clientId], sourceRootClientId, destinationRootClientId, destinationIndex);
  2061   registry.dispatch(external_wp_blockEditor_namespaceObject.store).moveBlocksToPosition([clientId], sourceRootClientId, destinationRootClientId, destinationIndex);
  1898 };
  2062 };
  1899 
  2063 
  1900 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
  2064 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/resolvers.js
  1901 /**
  2065 /**
  1902  * WordPress dependencies
  2066  * WordPress dependencies
  1903  */
  2067  */
       
  2068 
  1904 
  2069 
  1905 
  2070 
  1906 /**
  2071 /**
  1907  * Internal dependencies
  2072  * Internal dependencies
  1908  */
  2073  */
  1917  *
  2082  *
  1918  * Fetches all widgets from all widgets aras, converts them into blocks, and hydrates a new post with them.
  2083  * Fetches all widgets from all widgets aras, converts them into blocks, and hydrates a new post with them.
  1919  *
  2084  *
  1920  * @return {Function} An action creator.
  2085  * @return {Function} An action creator.
  1921  */
  2086  */
  1922 
  2087 const getWidgetAreas = () => async ({
  1923 const getWidgetAreas = () => async _ref => {
  2088   dispatch,
  1924   let {
  2089   registry
  1925     dispatch,
  2090 }) => {
  1926     registry
       
  1927   } = _ref;
       
  1928   const query = buildWidgetAreasQuery();
  2091   const query = buildWidgetAreasQuery();
  1929   const widgetAreas = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
  2092   const widgetAreas = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
  1930   const widgetAreaBlocks = [];
  2093   const widgetAreaBlocks = [];
  1931   const sortedWidgetAreas = widgetAreas.sort((a, b) => {
  2094   const sortedWidgetAreas = widgetAreas.sort((a, b) => {
  1932     if (a.id === 'wp_inactive_widgets') {
  2095     if (a.id === 'wp_inactive_widgets') {
  1933       return 1;
  2096       return 1;
  1934     }
  2097     }
  1935 
       
  1936     if (b.id === 'wp_inactive_widgets') {
  2098     if (b.id === 'wp_inactive_widgets') {
  1937       return -1;
  2099       return -1;
  1938     }
  2100     }
  1939 
       
  1940     return 0;
  2101     return 0;
  1941   });
  2102   });
  1942 
       
  1943   for (const widgetArea of sortedWidgetAreas) {
  2103   for (const widgetArea of sortedWidgetAreas) {
  1944     widgetAreaBlocks.push((0,external_wp_blocks_namespaceObject.createBlock)('core/widget-area', {
  2104     widgetAreaBlocks.push((0,external_wp_blocks_namespaceObject.createBlock)('core/widget-area', {
  1945       id: widgetArea.id,
  2105       id: widgetArea.id,
  1946       name: widgetArea.name
  2106       name: widgetArea.name
  1947     }));
  2107     }));
  1948 
       
  1949     if (!widgetArea.widgets.length) {
  2108     if (!widgetArea.widgets.length) {
  1950       // If this widget area has no widgets, it won't get a post setup by
  2109       // If this widget area has no widgets, it won't get a post setup by
  1951       // the getWidgets resolver.
  2110       // the getWidgets resolver.
  1952       dispatch(persistStubPost(buildWidgetAreaPostId(widgetArea.id), []));
  2111       dispatch(persistStubPost(buildWidgetAreaPostId(widgetArea.id), []));
  1953     }
  2112     }
  1954   }
  2113   }
  1955 
       
  1956   const widgetAreasOpenState = {};
  2114   const widgetAreasOpenState = {};
  1957   widgetAreaBlocks.forEach((widgetAreaBlock, index) => {
  2115   widgetAreaBlocks.forEach((widgetAreaBlock, index) => {
  1958     // Defaults to open the first widget area.
  2116     // Defaults to open the first widget area.
  1959     widgetAreasOpenState[widgetAreaBlock.clientId] = index === 0;
  2117     widgetAreasOpenState[widgetAreaBlock.clientId] = index === 0;
  1960   });
  2118   });
  1961   dispatch(setWidgetAreasOpenState(widgetAreasOpenState));
  2119   dispatch(setWidgetAreasOpenState(widgetAreasOpenState));
  1962   dispatch(persistStubPost(buildWidgetAreasPostId(), widgetAreaBlocks));
  2120   dispatch(persistStubPost(buildWidgetAreasPostId(), widgetAreaBlocks));
  1963 };
  2121 };
       
  2122 
  1964 /**
  2123 /**
  1965  * Fetches all widgets from all widgets ares, and groups them by widget area Id.
  2124  * Fetches all widgets from all widgets ares, and groups them by widget area Id.
  1966  *
  2125  *
  1967  * @return {Function} An action creator.
  2126  * @return {Function} An action creator.
  1968  */
  2127  */
  1969 
  2128 const getWidgets = () => async ({
  1970 const getWidgets = () => async _ref2 => {
  2129   dispatch,
  1971   let {
  2130   registry
  1972     dispatch,
  2131 }) => {
  1973     registry
       
  1974   } = _ref2;
       
  1975   const query = buildWidgetsQuery();
  2132   const query = buildWidgetsQuery();
  1976   const widgets = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecords('root', 'widget', query);
  2133   const widgets = await registry.resolveSelect(external_wp_coreData_namespaceObject.store).getEntityRecords('root', 'widget', query);
  1977   const groupedBySidebar = {};
  2134   const groupedBySidebar = {};
  1978 
       
  1979   for (const widget of widgets) {
  2135   for (const widget of widgets) {
  1980     const block = transformWidgetToBlock(widget);
  2136     const block = transformWidgetToBlock(widget);
  1981     groupedBySidebar[widget.sidebar] = groupedBySidebar[widget.sidebar] || [];
  2137     groupedBySidebar[widget.sidebar] = groupedBySidebar[widget.sidebar] || [];
  1982     groupedBySidebar[widget.sidebar].push(block);
  2138     groupedBySidebar[widget.sidebar].push(block);
  1983   }
  2139   }
  1984 
       
  1985   for (const sidebarId in groupedBySidebar) {
  2140   for (const sidebarId in groupedBySidebar) {
  1986     if (groupedBySidebar.hasOwnProperty(sidebarId)) {
  2141     if (groupedBySidebar.hasOwnProperty(sidebarId)) {
  1987       // Persist the actual post containing the widget block
  2142       // Persist the actual post containing the widget block
  1988       dispatch(persistStubPost(buildWidgetAreaPostId(sidebarId), groupedBySidebar[sidebarId]));
  2143       dispatch(persistStubPost(buildWidgetAreaPostId(sidebarId), groupedBySidebar[sidebarId]));
  1989     }
  2144     }
  1990   }
  2145   }
  1991 };
  2146 };
  1992 
  2147 
  1993 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
  2148 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/selectors.js
  1994 /**
  2149 /**
  1995  * External dependencies
       
  1996  */
       
  1997 
       
  1998 /**
       
  1999  * WordPress dependencies
  2150  * WordPress dependencies
  2000  */
  2151  */
  2001 
  2152 
  2002 
  2153 
  2003 
  2154 
  2006 /**
  2157 /**
  2007  * Internal dependencies
  2158  * Internal dependencies
  2008  */
  2159  */
  2009 
  2160 
  2010 
  2161 
       
  2162 const EMPTY_INSERTION_POINT = {
       
  2163   rootClientId: undefined,
       
  2164   insertionIndex: undefined
       
  2165 };
  2011 
  2166 
  2012 /**
  2167 /**
  2013  * Returns all API widgets.
  2168  * Returns all API widgets.
  2014  *
  2169  *
  2015  * @return {Object[]} API List of widgets.
  2170  * @return {Object[]} API List of widgets.
  2016  */
  2171  */
  2017 
       
  2018 const selectors_getWidgets = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2172 const selectors_getWidgets = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2019   const widgets = select(external_wp_coreData_namespaceObject.store).getEntityRecords('root', 'widget', buildWidgetsQuery());
  2173   const widgets = select(external_wp_coreData_namespaceObject.store).getEntityRecords('root', 'widget', buildWidgetsQuery());
  2020   return (0,external_lodash_namespaceObject.keyBy)(widgets, 'id');
  2174   return (
       
  2175     // Key widgets by their ID.
       
  2176     widgets?.reduce((allWidgets, widget) => ({
       
  2177       ...allWidgets,
       
  2178       [widget.id]: widget
       
  2179     }), {}) || {}
       
  2180   );
  2021 });
  2181 });
       
  2182 
  2022 /**
  2183 /**
  2023  * Returns API widget data for a particular widget ID.
  2184  * Returns API widget data for a particular widget ID.
  2024  *
  2185  *
  2025  * @param {number} id Widget ID.
  2186  * @param {number} id Widget ID.
  2026  *
  2187  *
  2027  * @return {Object} API widget data for a particular widget ID.
  2188  * @return {Object} API widget data for a particular widget ID.
  2028  */
  2189  */
  2029 
       
  2030 const getWidget = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, id) => {
  2190 const getWidget = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, id) => {
  2031   const widgets = select(constants_STORE_NAME).getWidgets();
  2191   const widgets = select(constants_STORE_NAME).getWidgets();
  2032   return widgets[id];
  2192   return widgets[id];
  2033 });
  2193 });
       
  2194 
  2034 /**
  2195 /**
  2035  * Returns all API widget areas.
  2196  * Returns all API widget areas.
  2036  *
  2197  *
  2037  * @return {Object[]} API List of widget areas.
  2198  * @return {Object[]} API List of widget areas.
  2038  */
  2199  */
  2039 
       
  2040 const selectors_getWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2200 const selectors_getWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2041   const query = buildWidgetAreasQuery();
  2201   const query = buildWidgetAreasQuery();
  2042   return select(external_wp_coreData_namespaceObject.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
  2202   return select(external_wp_coreData_namespaceObject.store).getEntityRecords(KIND, WIDGET_AREA_ENTITY_TYPE, query);
  2043 });
  2203 });
       
  2204 
  2044 /**
  2205 /**
  2045  * Returns widgetArea containing a block identify by given widgetId
  2206  * Returns widgetArea containing a block identify by given widgetId
  2046  *
  2207  *
  2047  * @param {string} widgetId The ID of the widget.
  2208  * @param {string} widgetId The ID of the widget.
  2048  * @return {Object} Containing widget area.
  2209  * @return {Object} Containing widget area.
  2049  */
  2210  */
  2050 
       
  2051 const getWidgetAreaForWidgetId = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, widgetId) => {
  2211 const getWidgetAreaForWidgetId = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, widgetId) => {
  2052   const widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2212   const widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2053   return widgetAreas.find(widgetArea => {
  2213   return widgetAreas.find(widgetArea => {
  2054     const post = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(widgetArea.id));
  2214     const post = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(widgetArea.id));
  2055     const blockWidgetIds = post.blocks.map(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block));
  2215     const blockWidgetIds = post.blocks.map(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block));
  2056     return blockWidgetIds.includes(widgetId);
  2216     return blockWidgetIds.includes(widgetId);
  2057   });
  2217   });
  2058 });
  2218 });
       
  2219 
  2059 /**
  2220 /**
  2060  * Given a child client id, returns the parent widget area block.
  2221  * Given a child client id, returns the parent widget area block.
  2061  *
  2222  *
  2062  * @param {string} clientId The client id of a block in a widget area.
  2223  * @param {string} clientId The client id of a block in a widget area.
  2063  *
  2224  *
  2064  * @return {WPBlock} The widget area block.
  2225  * @return {WPBlock} The widget area block.
  2065  */
  2226  */
  2066 
       
  2067 const getParentWidgetAreaBlock = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, clientId) => {
  2227 const getParentWidgetAreaBlock = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, clientId) => {
  2068   const {
  2228   const {
  2069     getBlock,
  2229     getBlock,
  2070     getBlockName,
  2230     getBlockName,
  2071     getBlockParents
  2231     getBlockParents
  2072   } = select(external_wp_blockEditor_namespaceObject.store);
  2232   } = select(external_wp_blockEditor_namespaceObject.store);
  2073   const blockParents = getBlockParents(clientId);
  2233   const blockParents = getBlockParents(clientId);
  2074   const widgetAreaClientId = blockParents.find(parentClientId => getBlockName(parentClientId) === 'core/widget-area');
  2234   const widgetAreaClientId = blockParents.find(parentClientId => getBlockName(parentClientId) === 'core/widget-area');
  2075   return getBlock(widgetAreaClientId);
  2235   return getBlock(widgetAreaClientId);
  2076 });
  2236 });
       
  2237 
  2077 /**
  2238 /**
  2078  * Returns all edited widget area entity records.
  2239  * Returns all edited widget area entity records.
  2079  *
  2240  *
  2080  * @return {Object[]} List of edited widget area entity records.
  2241  * @return {Object[]} List of edited widget area entity records.
  2081  */
  2242  */
  2082 
       
  2083 const getEditedWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, ids) => {
  2243 const getEditedWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, ids) => {
  2084   let widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2244   let widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2085 
       
  2086   if (!widgetAreas) {
  2245   if (!widgetAreas) {
  2087     return [];
  2246     return [];
  2088   }
  2247   }
  2089 
       
  2090   if (ids) {
  2248   if (ids) {
  2091     widgetAreas = widgetAreas.filter(_ref => {
  2249     widgetAreas = widgetAreas.filter(({
  2092       let {
       
  2093         id
       
  2094       } = _ref;
       
  2095       return ids.includes(id);
       
  2096     });
       
  2097   }
       
  2098 
       
  2099   return widgetAreas.filter(_ref2 => {
       
  2100     let {
       
  2101       id
  2250       id
  2102     } = _ref2;
  2251     }) => ids.includes(id));
  2103     return select(external_wp_coreData_namespaceObject.store).hasEditsForEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(id));
  2252   }
  2104   }).map(_ref3 => {
  2253   return widgetAreas.filter(({
  2105     let {
  2254     id
  2106       id
  2255   }) => select(external_wp_coreData_namespaceObject.store).hasEditsForEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(id))).map(({
  2107     } = _ref3;
  2256     id
  2108     return select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, id);
  2257   }) => select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, id));
  2109   });
       
  2110 });
  2258 });
       
  2259 
  2111 /**
  2260 /**
  2112  * Returns all blocks representing reference widgets.
  2261  * Returns all blocks representing reference widgets.
  2113  *
  2262  *
  2114  * @param {string} referenceWidgetName Optional. If given, only reference widgets with this name will be returned.
  2263  * @param {string} referenceWidgetName Optional. If given, only reference widgets with this name will be returned.
  2115  * @return {Array}  List of all blocks representing reference widgets
  2264  * @return {Array}  List of all blocks representing reference widgets
  2116  */
  2265  */
  2117 
  2266 const getReferenceWidgetBlocks = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, referenceWidgetName = null) => {
  2118 const getReferenceWidgetBlocks = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => function (state) {
       
  2119   let referenceWidgetName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
       
  2120   const results = [];
  2267   const results = [];
  2121   const widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2268   const widgetAreas = select(constants_STORE_NAME).getWidgetAreas();
  2122 
       
  2123   for (const _widgetArea of widgetAreas) {
  2269   for (const _widgetArea of widgetAreas) {
  2124     const post = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(_widgetArea.id));
  2270     const post = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(KIND, POST_TYPE, buildWidgetAreaPostId(_widgetArea.id));
  2125 
       
  2126     for (const block of post.blocks) {
  2271     for (const block of post.blocks) {
  2127       var _block$attributes;
  2272       if (block.name === 'core/legacy-widget' && (!referenceWidgetName || block.attributes?.referenceWidgetName === referenceWidgetName)) {
  2128 
       
  2129       if (block.name === 'core/legacy-widget' && (!referenceWidgetName || ((_block$attributes = block.attributes) === null || _block$attributes === void 0 ? void 0 : _block$attributes.referenceWidgetName) === referenceWidgetName)) {
       
  2130         results.push(block);
  2273         results.push(block);
  2131       }
  2274       }
  2132     }
  2275     }
  2133   }
  2276   }
  2134 
       
  2135   return results;
  2277   return results;
  2136 });
  2278 });
       
  2279 
  2137 /**
  2280 /**
  2138  * Returns true if any widget area is currently being saved.
  2281  * Returns true if any widget area is currently being saved.
  2139  *
  2282  *
  2140  * @return {boolean} True if any widget area is currently being saved. False otherwise.
  2283  * @return {boolean} True if any widget area is currently being saved. False otherwise.
  2141  */
  2284  */
  2142 
       
  2143 const isSavingWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2285 const isSavingWidgetAreas = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
  2144   var _select$getWidgetArea;
  2286   const widgetAreasIds = select(constants_STORE_NAME).getWidgetAreas()?.map(({
  2145 
  2287     id
  2146   const widgetAreasIds = (_select$getWidgetArea = select(constants_STORE_NAME).getWidgetAreas()) === null || _select$getWidgetArea === void 0 ? void 0 : _select$getWidgetArea.map(_ref4 => {
  2288   }) => id);
  2147     let {
       
  2148       id
       
  2149     } = _ref4;
       
  2150     return id;
       
  2151   });
       
  2152 
       
  2153   if (!widgetAreasIds) {
  2289   if (!widgetAreasIds) {
  2154     return false;
  2290     return false;
  2155   }
  2291   }
  2156 
       
  2157   for (const id of widgetAreasIds) {
  2292   for (const id of widgetAreasIds) {
  2158     const isSaving = select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, id);
  2293     const isSaving = select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord(KIND, WIDGET_AREA_ENTITY_TYPE, id);
  2159 
       
  2160     if (isSaving) {
  2294     if (isSaving) {
  2161       return true;
  2295       return true;
  2162     }
  2296     }
  2163   }
  2297   }
  2164 
       
  2165   const widgetIds = [...Object.keys(select(constants_STORE_NAME).getWidgets()), undefined // account for new widgets without an ID
  2298   const widgetIds = [...Object.keys(select(constants_STORE_NAME).getWidgets()), undefined // account for new widgets without an ID
  2166   ];
  2299   ];
  2167 
       
  2168   for (const id of widgetIds) {
  2300   for (const id of widgetIds) {
  2169     const isSaving = select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord('root', 'widget', id);
  2301     const isSaving = select(external_wp_coreData_namespaceObject.store).isSavingEntityRecord('root', 'widget', id);
  2170 
       
  2171     if (isSaving) {
  2302     if (isSaving) {
  2172       return true;
  2303       return true;
  2173     }
  2304     }
  2174   }
  2305   }
  2175 
       
  2176   return false;
  2306   return false;
  2177 });
  2307 });
       
  2308 
  2178 /**
  2309 /**
  2179  * Gets whether the widget area is opened.
  2310  * Gets whether the widget area is opened.
  2180  *
  2311  *
  2181  * @param {Array}  state    The open state of the widget areas.
  2312  * @param {Array}  state    The open state of the widget areas.
  2182  * @param {string} clientId The clientId of the widget area.
  2313  * @param {string} clientId The clientId of the widget area.
  2183  *
  2314  *
  2184  * @return {boolean} True if the widget area is open.
  2315  * @return {boolean} True if the widget area is open.
  2185  */
  2316  */
  2186 
       
  2187 const getIsWidgetAreaOpen = (state, clientId) => {
  2317 const getIsWidgetAreaOpen = (state, clientId) => {
  2188   const {
  2318   const {
  2189     widgetAreasOpenState
  2319     widgetAreasOpenState
  2190   } = state;
  2320   } = state;
  2191   return !!widgetAreasOpenState[clientId];
  2321   return !!widgetAreasOpenState[clientId];
  2192 };
  2322 };
       
  2323 
  2193 /**
  2324 /**
  2194  * Returns true if the inserter is opened.
  2325  * Returns true if the inserter is opened.
  2195  *
  2326  *
  2196  * @param {Object} state Global application state.
  2327  * @param {Object} state Global application state.
  2197  *
  2328  *
  2198  * @return {boolean} Whether the inserter is opened.
  2329  * @return {boolean} Whether the inserter is opened.
  2199  */
  2330  */
  2200 
       
  2201 function isInserterOpened(state) {
  2331 function isInserterOpened(state) {
  2202   return !!state.blockInserterPanel;
  2332   return !!state.blockInserterPanel;
  2203 }
  2333 }
       
  2334 
  2204 /**
  2335 /**
  2205  * Get the insertion point for the inserter.
  2336  * Get the insertion point for the inserter.
  2206  *
  2337  *
  2207  * @param {Object} state Global application state.
  2338  * @param {Object} state Global application state.
  2208  *
  2339  *
  2209  * @return {Object} The root client ID and index to insert at.
  2340  * @return {Object} The root client ID and index to insert at.
  2210  */
  2341  */
  2211 
       
  2212 function __experimentalGetInsertionPoint(state) {
  2342 function __experimentalGetInsertionPoint(state) {
  2213   const {
  2343   if (typeof state.blockInserterPanel === 'boolean') {
  2214     rootClientId,
  2344     return EMPTY_INSERTION_POINT;
  2215     insertionIndex
  2345   }
  2216   } = state.blockInserterPanel;
  2346   return state.blockInserterPanel;
  2217   return {
  2347 }
  2218     rootClientId,
  2348 
  2219     insertionIndex
       
  2220   };
       
  2221 }
       
  2222 /**
  2349 /**
  2223  * Returns true if a block can be inserted into a widget area.
  2350  * Returns true if a block can be inserted into a widget area.
  2224  *
  2351  *
  2225  * @param {Array}  state     The open state of the widget areas.
  2352  * @param {Array}  state     The open state of the widget areas.
  2226  * @param {string} blockName The name of the block being inserted.
  2353  * @param {string} blockName The name of the block being inserted.
  2227  *
  2354  *
  2228  * @return {boolean} True if the block can be inserted in a widget area.
  2355  * @return {boolean} True if the block can be inserted in a widget area.
  2229  */
  2356  */
  2230 
       
  2231 const canInsertBlockInWidgetArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, blockName) => {
  2357 const canInsertBlockInWidgetArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, blockName) => {
  2232   // Widget areas are always top-level blocks, which getBlocks will return.
  2358   // Widget areas are always top-level blocks, which getBlocks will return.
  2233   const widgetAreas = select(external_wp_blockEditor_namespaceObject.store).getBlocks(); // Makes an assumption that a block that can be inserted into one
  2359   const widgetAreas = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
       
  2360 
       
  2361   // Makes an assumption that a block that can be inserted into one
  2234   // widget area can be inserted into any widget area. Uses the first
  2362   // widget area can be inserted into any widget area. Uses the first
  2235   // widget area for testing whether the block can be inserted.
  2363   // widget area for testing whether the block can be inserted.
  2236 
       
  2237   const [firstWidgetArea] = widgetAreas;
  2364   const [firstWidgetArea] = widgetAreas;
  2238   return select(external_wp_blockEditor_namespaceObject.store).canInsertBlockType(blockName, firstWidgetArea.clientId);
  2365   return select(external_wp_blockEditor_namespaceObject.store).canInsertBlockType(blockName, firstWidgetArea.clientId);
  2239 });
  2366 });
       
  2367 
  2240 /**
  2368 /**
  2241  * Returns true if the list view is opened.
  2369  * Returns true if the list view is opened.
  2242  *
  2370  *
  2243  * @param {Object} state Global application state.
  2371  * @param {Object} state Global application state.
  2244  *
  2372  *
  2245  * @return {boolean} Whether the list view is opened.
  2373  * @return {boolean} Whether the list view is opened.
  2246  */
  2374  */
  2247 
       
  2248 function isListViewOpened(state) {
  2375 function isListViewOpened(state) {
  2249   return state.listViewPanel;
  2376   return state.listViewPanel;
  2250 }
  2377 }
  2251 
  2378 
       
  2379 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/private-selectors.js
       
  2380 function getListViewToggleRef(state) {
       
  2381   return state.listViewToggleRef;
       
  2382 }
       
  2383 function getInserterSidebarToggleRef(state) {
       
  2384   return state.inserterSidebarToggleRef;
       
  2385 }
       
  2386 
       
  2387 ;// CONCATENATED MODULE: external ["wp","privateApis"]
       
  2388 const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
       
  2389 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/lock-unlock.js
       
  2390 /**
       
  2391  * WordPress dependencies
       
  2392  */
       
  2393 
       
  2394 const {
       
  2395   lock,
       
  2396   unlock
       
  2397 } = (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/edit-widgets');
       
  2398 
  2252 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/index.js
  2399 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/store/index.js
  2253 /**
  2400 /**
  2254  * WordPress dependencies
  2401  * WordPress dependencies
  2255  */
  2402  */
  2256 
  2403 
  2257 
  2404 
       
  2405 
  2258 /**
  2406 /**
  2259  * Internal dependencies
  2407  * Internal dependencies
  2260  */
  2408  */
  2261 
  2409 
  2262 
  2410 
  2263 
  2411 
  2264 
  2412 
  2265 
  2413 
  2266 
  2414 
       
  2415 
       
  2416 
  2267 /**
  2417 /**
  2268  * Block editor data store configuration.
  2418  * Block editor data store configuration.
  2269  *
  2419  *
  2270  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#register
  2420  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#register
  2271  *
  2421  *
  2272  * @type {Object}
  2422  * @type {Object}
  2273  */
  2423  */
  2274 
       
  2275 const storeConfig = {
  2424 const storeConfig = {
  2276   reducer: reducer,
  2425   reducer: reducer,
  2277   selectors: store_selectors_namespaceObject,
  2426   selectors: store_selectors_namespaceObject,
  2278   resolvers: resolvers_namespaceObject,
  2427   resolvers: resolvers_namespaceObject,
  2279   actions: store_actions_namespaceObject
  2428   actions: store_actions_namespaceObject
  2280 };
  2429 };
       
  2430 
  2281 /**
  2431 /**
  2282  * Store definition for the edit widgets namespace.
  2432  * Store definition for the edit widgets namespace.
  2283  *
  2433  *
  2284  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
  2434  * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
  2285  *
  2435  *
  2286  * @type {Object}
  2436  * @type {Object}
  2287  */
  2437  */
  2288 
       
  2289 const store_store = (0,external_wp_data_namespaceObject.createReduxStore)(constants_STORE_NAME, storeConfig);
  2438 const store_store = (0,external_wp_data_namespaceObject.createReduxStore)(constants_STORE_NAME, storeConfig);
  2290 (0,external_wp_data_namespaceObject.register)(store_store); // This package uses a few in-memory post types as wrappers for convenience.
  2439 (0,external_wp_data_namespaceObject.register)(store_store);
       
  2440 
       
  2441 // This package uses a few in-memory post types as wrappers for convenience.
  2291 // This middleware prevents any network requests related to these types as they are
  2442 // This middleware prevents any network requests related to these types as they are
  2292 // bound to fail anyway.
  2443 // bound to fail anyway.
  2293 
       
  2294 external_wp_apiFetch_default().use(function (options, next) {
  2444 external_wp_apiFetch_default().use(function (options, next) {
  2295   var _options$path;
  2445   if (options.path?.indexOf('/wp/v2/types/widget-area') === 0) {
  2296 
       
  2297   if (((_options$path = options.path) === null || _options$path === void 0 ? void 0 : _options$path.indexOf('/wp/v2/types/widget-area')) === 0) {
       
  2298     return Promise.resolve({});
  2446     return Promise.resolve({});
  2299   }
  2447   }
  2300 
       
  2301   return next(options);
  2448   return next(options);
  2302 });
  2449 });
       
  2450 unlock(store_store).registerPrivateSelectors(private_selectors_namespaceObject);
  2303 
  2451 
  2304 ;// CONCATENATED MODULE: external ["wp","hooks"]
  2452 ;// CONCATENATED MODULE: external ["wp","hooks"]
  2305 var external_wp_hooks_namespaceObject = window["wp"]["hooks"];
  2453 const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
  2306 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/move-to-widget-area.js
  2454 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/move-to-widget-area.js
  2307 
  2455 /**
  2308 
  2456  * WordPress dependencies
  2309 /**
  2457  */
  2310  * WordPress dependencies
  2458 
  2311  */
  2459 
  2312 
  2460 
  2313 
  2461 
  2314 
  2462 
  2315 
  2463 
  2316 
  2464 
  2317 /**
  2465 /**
  2318  * Internal dependencies
  2466  * Internal dependencies
  2319  */
  2467  */
       
  2468 
       
  2469 
  2320 
  2470 
  2321 
  2471 
  2322 const withMoveToWidgetAreaToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2472 const withMoveToWidgetAreaToolbarItem = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => props => {
  2323   const {
  2473   const {
  2324     clientId,
  2474     clientId,
  2327   const {
  2477   const {
  2328     widgetAreas,
  2478     widgetAreas,
  2329     currentWidgetAreaId,
  2479     currentWidgetAreaId,
  2330     canInsertBlockInWidgetArea
  2480     canInsertBlockInWidgetArea
  2331   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  2481   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  2332     var _widgetAreaBlock$attr;
       
  2333 
       
  2334     // Component won't display for a widget area, so don't run selectors.
  2482     // Component won't display for a widget area, so don't run selectors.
  2335     if (blockName === 'core/widget-area') {
  2483     if (blockName === 'core/widget-area') {
  2336       return {};
  2484       return {};
  2337     }
  2485     }
  2338 
       
  2339     const selectors = select(store_store);
  2486     const selectors = select(store_store);
  2340     const widgetAreaBlock = selectors.getParentWidgetAreaBlock(clientId);
  2487     const widgetAreaBlock = selectors.getParentWidgetAreaBlock(clientId);
  2341     return {
  2488     return {
  2342       widgetAreas: selectors.getWidgetAreas(),
  2489       widgetAreas: selectors.getWidgetAreas(),
  2343       currentWidgetAreaId: widgetAreaBlock === null || widgetAreaBlock === void 0 ? void 0 : (_widgetAreaBlock$attr = widgetAreaBlock.attributes) === null || _widgetAreaBlock$attr === void 0 ? void 0 : _widgetAreaBlock$attr.id,
  2490       currentWidgetAreaId: widgetAreaBlock?.attributes?.id,
  2344       canInsertBlockInWidgetArea: selectors.canInsertBlockInWidgetArea(blockName)
  2491       canInsertBlockInWidgetArea: selectors.canInsertBlockInWidgetArea(blockName)
  2345     };
  2492     };
  2346   }, [clientId, blockName]);
  2493   }, [clientId, blockName]);
  2347   const {
  2494   const {
  2348     moveBlockToWidgetArea
  2495     moveBlockToWidgetArea
  2349   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  2496   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  2350   const hasMultipleWidgetAreas = (widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.length) > 1;
  2497   const hasMultipleWidgetAreas = widgetAreas?.length > 1;
  2351   const isMoveToWidgetAreaVisible = blockName !== 'core/widget-area' && hasMultipleWidgetAreas && canInsertBlockInWidgetArea;
  2498   const isMoveToWidgetAreaVisible = blockName !== 'core/widget-area' && hasMultipleWidgetAreas && canInsertBlockInWidgetArea;
  2352   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(BlockEdit, props), isMoveToWidgetAreaVisible && (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockControls, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_widgets_namespaceObject.MoveToWidgetArea, {
  2499   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  2353     widgetAreas: widgetAreas,
  2500     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockEdit, {
  2354     currentWidgetAreaId: currentWidgetAreaId,
  2501       ...props
  2355     onSelect: widgetAreaId => {
  2502     }), isMoveToWidgetAreaVisible && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockControls, {
  2356       moveBlockToWidgetArea(props.clientId, widgetAreaId);
  2503       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_widgets_namespaceObject.MoveToWidgetArea, {
  2357     }
  2504         widgetAreas: widgetAreas,
  2358   })));
  2505         currentWidgetAreaId: currentWidgetAreaId,
       
  2506         onSelect: widgetAreaId => {
       
  2507           moveBlockToWidgetArea(props.clientId, widgetAreaId);
       
  2508         }
       
  2509       })
       
  2510     })]
       
  2511   });
  2359 }, 'withMoveToWidgetAreaToolbarItem');
  2512 }, 'withMoveToWidgetAreaToolbarItem');
  2360 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/edit-widgets/block-edit', withMoveToWidgetAreaToolbarItem);
  2513 (0,external_wp_hooks_namespaceObject.addFilter)('editor.BlockEdit', 'core/edit-widgets/block-edit', withMoveToWidgetAreaToolbarItem);
  2361 
  2514 
  2362 ;// CONCATENATED MODULE: external ["wp","mediaUtils"]
  2515 ;// CONCATENATED MODULE: external ["wp","mediaUtils"]
  2363 var external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
  2516 const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
  2364 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/replace-media-upload.js
  2517 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/replace-media-upload.js
  2365 /**
  2518 /**
  2366  * WordPress dependencies
  2519  * WordPress dependencies
  2367  */
  2520  */
  2368 
  2521 
  2369 
  2522 
  2370 
       
  2371 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload;
  2523 const replaceMediaUpload = () => external_wp_mediaUtils_namespaceObject.MediaUpload;
  2372 
       
  2373 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload);
  2524 (0,external_wp_hooks_namespaceObject.addFilter)('editor.MediaUpload', 'core/edit-widgets/replace-media-upload', replaceMediaUpload);
  2374 
  2525 
  2375 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/index.js
  2526 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/filters/index.js
  2376 /**
  2527 /**
  2377  * Internal dependencies
  2528  * Internal dependencies
  2382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.js
  2533 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/use-is-dragging-within.js
  2383 /**
  2534 /**
  2384  * WordPress dependencies
  2535  * WordPress dependencies
  2385  */
  2536  */
  2386 
  2537 
       
  2538 
  2387 /** @typedef {import('@wordpress/element').RefObject} RefObject */
  2539 /** @typedef {import('@wordpress/element').RefObject} RefObject */
  2388 
  2540 
  2389 /**
  2541 /**
  2390  * A React hook to determine if it's dragging within the target element.
  2542  * A React hook to determine if it's dragging within the target element.
  2391  *
  2543  *
  2392  * @param {RefObject<HTMLElement>} elementRef The target elementRef object.
  2544  * @param {RefObject<HTMLElement>} elementRef The target elementRef object.
  2393  *
  2545  *
  2394  * @return {boolean} Is dragging within the target element.
  2546  * @return {boolean} Is dragging within the target element.
  2395  */
  2547  */
  2396 
       
  2397 const useIsDraggingWithin = elementRef => {
  2548 const useIsDraggingWithin = elementRef => {
  2398   const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
  2549   const [isDraggingWithin, setIsDraggingWithin] = (0,external_wp_element_namespaceObject.useState)(false);
  2399   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2550   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2400     const {
  2551     const {
  2401       ownerDocument
  2552       ownerDocument
  2402     } = elementRef.current;
  2553     } = elementRef.current;
  2403 
       
  2404     function handleDragStart(event) {
  2554     function handleDragStart(event) {
  2405       // Check the first time when the dragging starts.
  2555       // Check the first time when the dragging starts.
  2406       handleDragEnter(event);
  2556       handleDragEnter(event);
  2407     } // Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.
  2557     }
  2408 
  2558 
  2409 
  2559     // Set to false whenever the user cancel the drag event by either releasing the mouse or press Escape.
  2410     function handleDragEnd() {
  2560     function handleDragEnd() {
  2411       setIsDraggingWithin(false);
  2561       setIsDraggingWithin(false);
  2412     }
  2562     }
  2413 
       
  2414     function handleDragEnter(event) {
  2563     function handleDragEnter(event) {
  2415       // Check if the current target is inside the item element.
  2564       // Check if the current target is inside the item element.
  2416       if (elementRef.current.contains(event.target)) {
  2565       if (elementRef.current.contains(event.target)) {
  2417         setIsDraggingWithin(true);
  2566         setIsDraggingWithin(true);
  2418       } else {
  2567       } else {
  2419         setIsDraggingWithin(false);
  2568         setIsDraggingWithin(false);
  2420       }
  2569       }
  2421     } // Bind these events to the document to catch all drag events.
  2570     }
       
  2571 
       
  2572     // Bind these events to the document to catch all drag events.
  2422     // Ideally, we can also use `event.relatedTarget`, but sadly that doesn't work in Safari.
  2573     // Ideally, we can also use `event.relatedTarget`, but sadly that doesn't work in Safari.
  2423 
       
  2424 
       
  2425     ownerDocument.addEventListener('dragstart', handleDragStart);
  2574     ownerDocument.addEventListener('dragstart', handleDragStart);
  2426     ownerDocument.addEventListener('dragend', handleDragEnd);
  2575     ownerDocument.addEventListener('dragend', handleDragEnd);
  2427     ownerDocument.addEventListener('dragenter', handleDragEnter);
  2576     ownerDocument.addEventListener('dragenter', handleDragEnter);
  2428     return () => {
  2577     return () => {
  2429       ownerDocument.removeEventListener('dragstart', handleDragStart);
  2578       ownerDocument.removeEventListener('dragstart', handleDragStart);
  2431       ownerDocument.removeEventListener('dragenter', handleDragEnter);
  2580       ownerDocument.removeEventListener('dragenter', handleDragEnter);
  2432     };
  2581     };
  2433   }, []);
  2582   }, []);
  2434   return isDraggingWithin;
  2583   return isDraggingWithin;
  2435 };
  2584 };
  2436 
  2585 /* harmony default export */ const use_is_dragging_within = (useIsDraggingWithin);
  2437 /* harmony default export */ var use_is_dragging_within = (useIsDraggingWithin);
       
  2438 
  2586 
  2439 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.js
  2587 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/inner-blocks.js
  2440 
       
  2441 
       
  2442 /**
  2588 /**
  2443  * External dependencies
  2589  * External dependencies
  2444  */
  2590  */
  2445 
  2591 
       
  2592 
  2446 /**
  2593 /**
  2447  * WordPress dependencies
  2594  * WordPress dependencies
  2448  */
  2595  */
  2449 
  2596 
  2450 
  2597 
  2453 /**
  2600 /**
  2454  * Internal dependencies
  2601  * Internal dependencies
  2455  */
  2602  */
  2456 
  2603 
  2457 
  2604 
  2458 function WidgetAreaInnerBlocks(_ref) {
  2605 function WidgetAreaInnerBlocks({
  2459   let {
  2606   id
  2460     id
  2607 }) {
  2461   } = _ref;
       
  2462   const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('root', 'postType');
  2608   const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)('root', 'postType');
  2463   const innerBlocksRef = (0,external_wp_element_namespaceObject.useRef)();
  2609   const innerBlocksRef = (0,external_wp_element_namespaceObject.useRef)();
  2464   const isDraggingWithinInnerBlocks = use_is_dragging_within(innerBlocksRef);
  2610   const isDraggingWithinInnerBlocks = use_is_dragging_within(innerBlocksRef);
  2465   const shouldHighlightDropZone = isDraggingWithinInnerBlocks; // Using the experimental hook so that we can control the className of the element.
  2611   const shouldHighlightDropZone = isDraggingWithinInnerBlocks;
  2466 
  2612   // Using the experimental hook so that we can control the className of the element.
  2467   const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({
  2613   const innerBlocksProps = (0,external_wp_blockEditor_namespaceObject.useInnerBlocksProps)({
  2468     ref: innerBlocksRef
  2614     ref: innerBlocksRef
  2469   }, {
  2615   }, {
  2470     value: blocks,
  2616     value: blocks,
  2471     onInput,
  2617     onInput,
  2472     onChange,
  2618     onChange,
  2473     templateLock: false,
  2619     templateLock: false,
  2474     renderAppender: external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
  2620     renderAppender: external_wp_blockEditor_namespaceObject.InnerBlocks.ButtonBlockAppender
  2475   });
  2621   });
  2476   return (0,external_wp_element_namespaceObject.createElement)("div", {
  2622   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  2477     "data-widget-area-id": id,
  2623     "data-widget-area-id": id,
  2478     className: classnames_default()('wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper', {
  2624     className: dist_clsx('wp-block-widget-area__inner-blocks block-editor-inner-blocks editor-styles-wrapper', {
  2479       'wp-block-widget-area__highlight-drop-zone': shouldHighlightDropZone
  2625       'wp-block-widget-area__highlight-drop-zone': shouldHighlightDropZone
       
  2626     }),
       
  2627     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
       
  2628       ...innerBlocksProps
  2480     })
  2629     })
  2481   }, (0,external_wp_element_namespaceObject.createElement)("div", innerBlocksProps));
  2630   });
  2482 }
  2631 }
  2483 
  2632 
  2484 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/index.js
  2633 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/edit/index.js
  2485 
  2634 /**
  2486 
  2635  * WordPress dependencies
  2487 /**
  2636  */
  2488  * WordPress dependencies
  2637 
  2489  */
       
  2490 
  2638 
  2491 
  2639 
  2492 
  2640 
  2493 
  2641 
  2494 /**
  2642 /**
  2498 
  2646 
  2499 
  2647 
  2500 
  2648 
  2501 /** @typedef {import('@wordpress/element').RefObject} RefObject */
  2649 /** @typedef {import('@wordpress/element').RefObject} RefObject */
  2502 
  2650 
  2503 function WidgetAreaEdit(_ref) {
  2651 function WidgetAreaEdit({
  2504   let {
  2652   clientId,
  2505     clientId,
  2653   className,
  2506     className,
  2654   attributes: {
  2507     attributes: {
  2655     id,
  2508       id,
  2656     name
  2509       name
  2657   }
  2510     }
  2658 }) {
  2511   } = _ref;
       
  2512   const isOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getIsWidgetAreaOpen(clientId), [clientId]);
  2659   const isOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getIsWidgetAreaOpen(clientId), [clientId]);
  2513   const {
  2660   const {
  2514     setIsWidgetAreaOpen
  2661     setIsWidgetAreaOpen
  2515   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  2662   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  2516   const wrapper = (0,external_wp_element_namespaceObject.useRef)();
  2663   const wrapper = (0,external_wp_element_namespaceObject.useRef)();
  2521   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2668   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2522     if (!isDragging) {
  2669     if (!isDragging) {
  2523       setOpenedWhileDragging(false);
  2670       setOpenedWhileDragging(false);
  2524       return;
  2671       return;
  2525     }
  2672     }
  2526 
       
  2527     if (isDraggingWithin && !isOpen) {
  2673     if (isDraggingWithin && !isOpen) {
  2528       setOpen(true);
  2674       setOpen(true);
  2529       setOpenedWhileDragging(true);
  2675       setOpenedWhileDragging(true);
  2530     } else if (!isDraggingWithin && isOpen && openedWhileDragging) {
  2676     } else if (!isDraggingWithin && isOpen && openedWhileDragging) {
  2531       setOpen(false);
  2677       setOpen(false);
  2532     }
  2678     }
  2533   }, [isOpen, isDragging, isDraggingWithin, openedWhileDragging]);
  2679   }, [isOpen, isDragging, isDraggingWithin, openedWhileDragging]);
  2534   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Panel, {
  2680   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Panel, {
  2535     className: className,
  2681     className: className,
  2536     ref: wrapper
  2682     ref: wrapper,
  2537   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.PanelBody, {
  2683     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelBody, {
  2538     title: name,
  2684       title: name,
  2539     opened: isOpen,
  2685       opened: isOpen,
  2540     onToggle: () => {
  2686       onToggle: () => {
  2541       setIsWidgetAreaOpen(clientId, !isOpen);
  2687         setIsWidgetAreaOpen(clientId, !isOpen);
  2542     },
  2688       },
  2543     scrollAfterOpen: !isDragging
  2689       scrollAfterOpen: !isDragging,
  2544   }, _ref2 => {
  2690       children: ({
  2545     let {
  2691         opened
  2546       opened
  2692       }) =>
  2547     } = _ref2;
  2693       /*#__PURE__*/
  2548     return (// This is required to ensure LegacyWidget blocks are not
  2694       // This is required to ensure LegacyWidget blocks are not
  2549       // unmounted when the panel is collapsed. Unmounting legacy
  2695       // unmounted when the panel is collapsed. Unmounting legacy
  2550       // widgets may have unintended consequences (e.g.  TinyMCE
  2696       // widgets may have unintended consequences (e.g.  TinyMCE
  2551       // not being properly reinitialized)
  2697       // not being properly reinitialized)
  2552       (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__unstableDisclosureContent, {
  2698       (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableDisclosureContent, {
  2553         className: "wp-block-widget-area__panel-body-content",
  2699         className: "wp-block-widget-area__panel-body-content",
  2554         visible: opened
  2700         visible: opened,
  2555       }, (0,external_wp_element_namespaceObject.createElement)(external_wp_coreData_namespaceObject.EntityProvider, {
  2701         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_coreData_namespaceObject.EntityProvider, {
  2556         kind: "root",
  2702           kind: "root",
  2557         type: "postType",
  2703           type: "postType",
  2558         id: `widget-area-${id}`
  2704           id: `widget-area-${id}`,
  2559       }, (0,external_wp_element_namespaceObject.createElement)(WidgetAreaInnerBlocks, {
  2705           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WidgetAreaInnerBlocks, {
  2560         id: id
  2706             id: id
  2561       })))
  2707           })
  2562     );
  2708         })
  2563   }));
  2709       })
  2564 }
  2710     })
       
  2711   });
       
  2712 }
       
  2713 
  2565 /**
  2714 /**
  2566  * A React hook to determine if dragging is active.
  2715  * A React hook to determine if dragging is active.
  2567  *
  2716  *
  2568  * @param {RefObject<HTMLElement>} elementRef The target elementRef object.
  2717  * @param {RefObject<HTMLElement>} elementRef The target elementRef object.
  2569  *
  2718  *
  2570  * @return {boolean} Is dragging within the entire document.
  2719  * @return {boolean} Is dragging within the entire document.
  2571  */
  2720  */
  2572 
       
  2573 const useIsDragging = elementRef => {
  2721 const useIsDragging = elementRef => {
  2574   const [isDragging, setIsDragging] = (0,external_wp_element_namespaceObject.useState)(false);
  2722   const [isDragging, setIsDragging] = (0,external_wp_element_namespaceObject.useState)(false);
  2575   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2723   (0,external_wp_element_namespaceObject.useEffect)(() => {
  2576     const {
  2724     const {
  2577       ownerDocument
  2725       ownerDocument
  2578     } = elementRef.current;
  2726     } = elementRef.current;
  2579 
       
  2580     function handleDragStart() {
  2727     function handleDragStart() {
  2581       setIsDragging(true);
  2728       setIsDragging(true);
  2582     }
  2729     }
  2583 
       
  2584     function handleDragEnd() {
  2730     function handleDragEnd() {
  2585       setIsDragging(false);
  2731       setIsDragging(false);
  2586     }
  2732     }
  2587 
       
  2588     ownerDocument.addEventListener('dragstart', handleDragStart);
  2733     ownerDocument.addEventListener('dragstart', handleDragStart);
  2589     ownerDocument.addEventListener('dragend', handleDragEnd);
  2734     ownerDocument.addEventListener('dragend', handleDragEnd);
  2590     return () => {
  2735     return () => {
  2591       ownerDocument.removeEventListener('dragstart', handleDragStart);
  2736       ownerDocument.removeEventListener('dragstart', handleDragStart);
  2592       ownerDocument.removeEventListener('dragend', handleDragEnd);
  2737       ownerDocument.removeEventListener('dragend', handleDragEnd);
  2598 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
  2743 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/blocks/widget-area/index.js
  2599 /**
  2744 /**
  2600  * WordPress dependencies
  2745  * WordPress dependencies
  2601  */
  2746  */
  2602 
  2747 
       
  2748 
  2603 /**
  2749 /**
  2604  * Internal dependencies
  2750  * Internal dependencies
  2605  */
  2751  */
  2606 
       
  2607 const metadata = {
  2752 const metadata = {
       
  2753   $schema: "https://schemas.wp.org/trunk/block.json",
  2608   name: "core/widget-area",
  2754   name: "core/widget-area",
       
  2755   title: "Widget Area",
  2609   category: "widgets",
  2756   category: "widgets",
  2610   attributes: {
  2757   attributes: {
  2611     id: {
  2758     id: {
  2612       type: "string"
  2759       type: "string"
  2613     },
  2760     },
  2619     html: false,
  2766     html: false,
  2620     inserter: false,
  2767     inserter: false,
  2621     customClassName: false,
  2768     customClassName: false,
  2622     reusable: false,
  2769     reusable: false,
  2623     __experimentalToolbar: false,
  2770     __experimentalToolbar: false,
  2624     __experimentalParentSelector: false
  2771     __experimentalParentSelector: false,
       
  2772     __experimentalDisableBlockOverlay: true
  2625   },
  2773   },
  2626   editorStyle: "wp-block-widget-area-editor",
  2774   editorStyle: "wp-block-widget-area-editor",
  2627   style: "wp-block-widget-area"
  2775   style: "wp-block-widget-area"
  2628 };
  2776 };
  2629 
  2777 
  2632 } = metadata;
  2780 } = metadata;
  2633 
  2781 
  2634 const settings = {
  2782 const settings = {
  2635   title: (0,external_wp_i18n_namespaceObject.__)('Widget Area'),
  2783   title: (0,external_wp_i18n_namespaceObject.__)('Widget Area'),
  2636   description: (0,external_wp_i18n_namespaceObject.__)('A widget area container.'),
  2784   description: (0,external_wp_i18n_namespaceObject.__)('A widget area container.'),
  2637   __experimentalLabel: _ref => {
  2785   __experimentalLabel: ({
  2638     let {
  2786     name: label
  2639       name: label
  2787   }) => label,
  2640     } = _ref;
       
  2641     return label;
       
  2642   },
       
  2643   edit: WidgetAreaEdit
  2788   edit: WidgetAreaEdit
  2644 };
  2789 };
  2645 
  2790 
  2646 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/error-boundary/index.js
  2791 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/error-boundary/index.js
  2647 
  2792 /**
  2648 
  2793  * WordPress dependencies
  2649 /**
  2794  */
  2650  * WordPress dependencies
  2795 
  2651  */
  2796 
  2652 
  2797 
  2653 
  2798 
  2654 
  2799 
  2655 
  2800 
  2656 
  2801 
  2657 
  2802 function CopyButton({
  2658 function CopyButton(_ref) {
  2803   text,
  2659   let {
  2804   children
  2660     text,
  2805 }) {
  2661     children
       
  2662   } = _ref;
       
  2663   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
  2806   const ref = (0,external_wp_compose_namespaceObject.useCopyToClipboard)(text);
  2664   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  2807   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  2665     variant: "secondary",
  2808     variant: "secondary",
  2666     ref: ref
  2809     ref: ref,
  2667   }, children);
  2810     children: children
  2668 }
  2811   });
  2669 
  2812 }
       
  2813 function ErrorBoundaryWarning({
       
  2814   message,
       
  2815   error
       
  2816 }) {
       
  2817   const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CopyButton, {
       
  2818     text: error.stack,
       
  2819     children: (0,external_wp_i18n_namespaceObject.__)('Copy Error')
       
  2820   }, "copy-error")];
       
  2821   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.Warning, {
       
  2822     className: "edit-widgets-error-boundary",
       
  2823     actions: actions,
       
  2824     children: message
       
  2825   });
       
  2826 }
  2670 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
  2827 class ErrorBoundary extends external_wp_element_namespaceObject.Component {
  2671   constructor() {
  2828   constructor() {
  2672     super(...arguments);
  2829     super(...arguments);
  2673     this.reboot = this.reboot.bind(this);
       
  2674     this.state = {
  2830     this.state = {
  2675       error: null
  2831       error: null
  2676     };
  2832     };
  2677   }
  2833   }
  2678 
       
  2679   componentDidCatch(error) {
  2834   componentDidCatch(error) {
  2680     this.setState({
  2835     (0,external_wp_hooks_namespaceObject.doAction)('editor.ErrorBoundary.errorLogged', error);
       
  2836   }
       
  2837   static getDerivedStateFromError(error) {
       
  2838     return {
  2681       error
  2839       error
  2682     });
  2840     };
  2683   }
  2841   }
  2684 
       
  2685   reboot() {
       
  2686     this.props.onError();
       
  2687   }
       
  2688 
       
  2689   render() {
  2842   render() {
  2690     const {
  2843     if (!this.state.error) {
  2691       error
       
  2692     } = this.state;
       
  2693 
       
  2694     if (!error) {
       
  2695       return this.props.children;
  2844       return this.props.children;
  2696     }
  2845     }
  2697 
  2846     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundaryWarning, {
  2698     return (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, {
  2847       message: (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.'),
  2699       className: "edit-widgets-error-boundary",
  2848       error: this.state.error
  2700       actions: [(0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  2849     });
  2701         key: "recovery",
  2850   }
  2702         onClick: this.reboot,
  2851 }
  2703         variant: "secondary"
  2852 
  2704       }, (0,external_wp_i18n_namespaceObject.__)('Attempt Recovery')), (0,external_wp_element_namespaceObject.createElement)(CopyButton, {
  2853 ;// CONCATENATED MODULE: external ["wp","patterns"]
  2705         key: "copy-error",
  2854 const external_wp_patterns_namespaceObject = window["wp"]["patterns"];
  2706         text: error.stack
       
  2707       }, (0,external_wp_i18n_namespaceObject.__)('Copy Error'))]
       
  2708     }, (0,external_wp_i18n_namespaceObject.__)('The editor has encountered an unexpected error.'));
       
  2709   }
       
  2710 
       
  2711 }
       
  2712 
       
  2713 ;// CONCATENATED MODULE: external ["wp","reusableBlocks"]
       
  2714 var external_wp_reusableBlocks_namespaceObject = window["wp"]["reusableBlocks"];
       
  2715 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
  2855 ;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
  2716 var external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
  2856 const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
       
  2857 ;// CONCATENATED MODULE: external ["wp","keycodes"]
       
  2858 const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
  2717 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcuts/index.js
  2859 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcuts/index.js
  2718 /**
  2860 /**
  2719  * WordPress dependencies
  2861  * WordPress dependencies
  2720  */
  2862  */
  2721 
  2863 
  2722 
  2864 
  2723 
  2865 
  2724 
  2866 
  2725 
  2867 
       
  2868 
       
  2869 
  2726 /**
  2870 /**
  2727  * Internal dependencies
  2871  * Internal dependencies
  2728  */
  2872  */
  2729 
       
  2730 
       
  2731 
  2873 
  2732 function KeyboardShortcuts() {
  2874 function KeyboardShortcuts() {
  2733   const {
  2875   const {
  2734     redo,
  2876     redo,
  2735     undo
  2877     undo
  2749     event.preventDefault();
  2891     event.preventDefault();
  2750     saveEditedWidgetAreas();
  2892     saveEditedWidgetAreas();
  2751   });
  2893   });
  2752   return null;
  2894   return null;
  2753 }
  2895 }
  2754 
       
  2755 function KeyboardShortcutsRegister() {
  2896 function KeyboardShortcutsRegister() {
  2756   // Registering the shortcuts.
  2897   // Registering the shortcuts.
  2757   const {
  2898   const {
  2758     registerShortcut
  2899     registerShortcut
  2759   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
  2900   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
  2772       category: 'global',
  2913       category: 'global',
  2773       description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
  2914       description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
  2774       keyCombination: {
  2915       keyCombination: {
  2775         modifier: 'primaryShift',
  2916         modifier: 'primaryShift',
  2776         character: 'z'
  2917         character: 'z'
  2777       }
  2918       },
       
  2919       // Disable on Apple OS because it conflicts with the browser's
       
  2920       // history shortcut. It's a fine alias for both Windows and Linux.
       
  2921       // Since there's no conflict for Ctrl+Shift+Z on both Windows and
       
  2922       // Linux, we keep it as the default for consistency.
       
  2923       aliases: (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? [] : [{
       
  2924         modifier: 'primary',
       
  2925         character: 'y'
       
  2926       }]
  2778     });
  2927     });
  2779     registerShortcut({
  2928     registerShortcut({
  2780       name: 'core/edit-widgets/save',
  2929       name: 'core/edit-widgets/save',
  2781       category: 'global',
  2930       category: 'global',
  2782       description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
  2931       description: (0,external_wp_i18n_namespaceObject.__)('Save your changes.'),
  2816         character: '`'
  2965         character: '`'
  2817       },
  2966       },
  2818       aliases: [{
  2967       aliases: [{
  2819         modifier: 'access',
  2968         modifier: 'access',
  2820         character: 'p'
  2969         character: 'p'
       
  2970       }, {
       
  2971         modifier: 'ctrlShift',
       
  2972         character: '~'
  2821       }]
  2973       }]
  2822     });
  2974     });
  2823   }, [registerShortcut]);
  2975   }, [registerShortcut]);
  2824   return null;
  2976   return null;
  2825 }
  2977 }
  2826 
       
  2827 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  2978 KeyboardShortcuts.Register = KeyboardShortcutsRegister;
  2828 /* harmony default export */ var keyboard_shortcuts = (KeyboardShortcuts);
  2979 /* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts);
  2829 
  2980 
  2830 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-last-selected-widget-area.js
  2981 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-last-selected-widget-area.js
  2831 /**
  2982 /**
  2832  * WordPress dependencies
  2983  * WordPress dependencies
  2833  */
  2984  */
       
  2985 
  2834 
  2986 
  2835 
  2987 
  2836 
  2988 
  2837 /**
  2989 /**
  2838  * Internal dependencies
  2990  * Internal dependencies
  2844  * A react hook that returns the client id of the last widget area to have
  2996  * A react hook that returns the client id of the last widget area to have
  2845  * been selected, or to have a selected block within it.
  2997  * been selected, or to have a selected block within it.
  2846  *
  2998  *
  2847  * @return {string} clientId of the widget area last selected.
  2999  * @return {string} clientId of the widget area last selected.
  2848  */
  3000  */
  2849 
       
  2850 const useLastSelectedWidgetArea = () => (0,external_wp_data_namespaceObject.useSelect)(select => {
  3001 const useLastSelectedWidgetArea = () => (0,external_wp_data_namespaceObject.useSelect)(select => {
  2851   var _widgetAreasPost$bloc;
       
  2852 
       
  2853   const {
  3002   const {
  2854     getBlockSelectionEnd,
  3003     getBlockSelectionEnd,
  2855     getBlockName
  3004     getBlockName
  2856   } = select(external_wp_blockEditor_namespaceObject.store);
  3005   } = select(external_wp_blockEditor_namespaceObject.store);
  2857   const selectionEndClientId = getBlockSelectionEnd(); // If the selected block is a widget area, return its clientId.
  3006   const selectionEndClientId = getBlockSelectionEnd();
  2858 
  3007 
       
  3008   // If the selected block is a widget area, return its clientId.
  2859   if (getBlockName(selectionEndClientId) === 'core/widget-area') {
  3009   if (getBlockName(selectionEndClientId) === 'core/widget-area') {
  2860     return selectionEndClientId;
  3010     return selectionEndClientId;
  2861   }
  3011   }
  2862 
       
  2863   const {
  3012   const {
  2864     getParentWidgetAreaBlock
  3013     getParentWidgetAreaBlock
  2865   } = select(store_store);
  3014   } = select(store_store);
  2866   const widgetAreaBlock = getParentWidgetAreaBlock(selectionEndClientId);
  3015   const widgetAreaBlock = getParentWidgetAreaBlock(selectionEndClientId);
  2867   const widgetAreaBlockClientId = widgetAreaBlock === null || widgetAreaBlock === void 0 ? void 0 : widgetAreaBlock.clientId;
  3016   const widgetAreaBlockClientId = widgetAreaBlock?.clientId;
  2868 
       
  2869   if (widgetAreaBlockClientId) {
  3017   if (widgetAreaBlockClientId) {
  2870     return widgetAreaBlockClientId;
  3018     return widgetAreaBlockClientId;
  2871   } // If no widget area has been selected, return the clientId of the first
  3019   }
       
  3020 
       
  3021   // If no widget area has been selected, return the clientId of the first
  2872   // area.
  3022   // area.
  2873 
       
  2874 
       
  2875   const {
  3023   const {
  2876     getEntityRecord
  3024     getEntityRecord
  2877   } = select(external_wp_coreData_namespaceObject.store);
  3025   } = select(external_wp_coreData_namespaceObject.store);
  2878   const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId());
  3026   const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId());
  2879   return widgetAreasPost === null || widgetAreasPost === void 0 ? void 0 : (_widgetAreasPost$bloc = widgetAreasPost.blocks[0]) === null || _widgetAreasPost$bloc === void 0 ? void 0 : _widgetAreasPost$bloc.clientId;
  3027   return widgetAreasPost?.blocks[0]?.clientId;
  2880 }, []);
  3028 }, []);
  2881 
  3029 /* harmony default export */ const use_last_selected_widget_area = (useLastSelectedWidgetArea);
  2882 /* harmony default export */ var use_last_selected_widget_area = (useLastSelectedWidgetArea);
       
  2883 
  3030 
  2884 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/constants.js
  3031 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/constants.js
  2885 const ALLOW_REUSABLE_BLOCKS = false;
  3032 const ALLOW_REUSABLE_BLOCKS = false;
  2886 const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
  3033 const ENABLE_EXPERIMENTAL_FSE_BLOCKS = false;
  2887 
  3034 
  2888 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.js
  3035 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-provider/index.js
  2889 
  3036 /**
  2890 
  3037  * WordPress dependencies
  2891 
  3038  */
  2892 /**
  3039 
  2893  * External dependencies
  3040 
  2894  */
       
  2895 
       
  2896 /**
       
  2897  * WordPress dependencies
       
  2898  */
       
  2899 
  3041 
  2900 
  3042 
  2901 
  3043 
  2902 
  3044 
  2903 
  3045 
  2913 
  3055 
  2914 
  3056 
  2915 
  3057 
  2916 
  3058 
  2917 
  3059 
  2918 function WidgetAreasBlockEditorProvider(_ref) {
  3060 
  2919   let {
  3061 const {
  2920     blockEditorSettings,
  3062   ExperimentalBlockEditorProvider
  2921     children,
  3063 } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
  2922     ...props
  3064 const {
  2923   } = _ref;
  3065   PatternsMenuItems
       
  3066 } = unlock(external_wp_patterns_namespaceObject.privateApis);
       
  3067 const {
       
  3068   BlockKeyboardShortcuts
       
  3069 } = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
       
  3070 function WidgetAreasBlockEditorProvider({
       
  3071   blockEditorSettings,
       
  3072   children,
       
  3073   ...props
       
  3074 }) {
       
  3075   const mediaPermissions = (0,external_wp_coreData_namespaceObject.useResourcePermissions)('media');
       
  3076   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  2924   const {
  3077   const {
  2925     hasUploadPermissions,
       
  2926     reusableBlocks,
  3078     reusableBlocks,
  2927     isFixedToolbarActive,
  3079     isFixedToolbarActive,
  2928     keepCaretInsideBlock
  3080     keepCaretInsideBlock,
  2929   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
  3081     pageOnFront,
  2930     hasUploadPermissions: (0,external_lodash_namespaceObject.defaultTo)(select(external_wp_coreData_namespaceObject.store).canUser('create', 'media'), true),
  3082     pageForPosts
  2931     widgetAreas: select(store_store).getWidgetAreas(),
  3083   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  2932     widgets: select(store_store).getWidgets(),
  3084     const {
  2933     reusableBlocks: ALLOW_REUSABLE_BLOCKS ? select(external_wp_coreData_namespaceObject.store).getEntityRecords('postType', 'wp_block') : [],
  3085       canUser,
  2934     isFixedToolbarActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar'),
  3086       getEntityRecord,
  2935     keepCaretInsideBlock: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'keepCaretInsideBlock')
  3087       getEntityRecords
  2936   }), []);
  3088     } = select(external_wp_coreData_namespaceObject.store);
       
  3089     const siteSettings = canUser('read', 'settings') ? getEntityRecord('root', 'site') : undefined;
       
  3090     return {
       
  3091       widgetAreas: select(store_store).getWidgetAreas(),
       
  3092       widgets: select(store_store).getWidgets(),
       
  3093       reusableBlocks: ALLOW_REUSABLE_BLOCKS ? getEntityRecords('postType', 'wp_block') : [],
       
  3094       isFixedToolbarActive: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar'),
       
  3095       keepCaretInsideBlock: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'keepCaretInsideBlock'),
       
  3096       pageOnFront: siteSettings?.page_on_front,
       
  3097       pageForPosts: siteSettings?.page_for_posts
       
  3098     };
       
  3099   }, []);
  2937   const {
  3100   const {
  2938     setIsInserterOpened
  3101     setIsInserterOpened
  2939   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  3102   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  2940   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
  3103   const settings = (0,external_wp_element_namespaceObject.useMemo)(() => {
  2941     let mediaUploadBlockEditor;
  3104     let mediaUploadBlockEditor;
  2942 
  3105     if (mediaPermissions.canCreate) {
  2943     if (hasUploadPermissions) {
  3106       mediaUploadBlockEditor = ({
  2944       mediaUploadBlockEditor = _ref2 => {
  3107         onError,
  2945         let {
  3108         ...argumentsObject
  2946           onError,
  3109       }) => {
  2947           ...argumentsObject
       
  2948         } = _ref2;
       
  2949         (0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
  3110         (0,external_wp_mediaUtils_namespaceObject.uploadMedia)({
  2950           wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
  3111           wpAllowedMimeTypes: blockEditorSettings.allowedMimeTypes,
  2951           onError: _ref3 => {
  3112           onError: ({
  2952             let {
  3113             message
  2953               message
  3114           }) => onError(message),
  2954             } = _ref3;
       
  2955             return onError(message);
       
  2956           },
       
  2957           ...argumentsObject
  3115           ...argumentsObject
  2958         });
  3116         });
  2959       };
  3117       };
  2960     }
  3118     }
  2961 
  3119     return {
  2962     return { ...blockEditorSettings,
  3120       ...blockEditorSettings,
  2963       __experimentalReusableBlocks: reusableBlocks,
  3121       __experimentalReusableBlocks: reusableBlocks,
  2964       hasFixedToolbar: isFixedToolbarActive,
  3122       hasFixedToolbar: isFixedToolbarActive || !isLargeViewport,
  2965       keepCaretInsideBlock,
  3123       keepCaretInsideBlock,
  2966       mediaUpload: mediaUploadBlockEditor,
  3124       mediaUpload: mediaUploadBlockEditor,
  2967       templateLock: 'all',
  3125       templateLock: 'all',
  2968       __experimentalSetIsInserterOpened: setIsInserterOpened
  3126       __experimentalSetIsInserterOpened: setIsInserterOpened,
       
  3127       pageOnFront,
       
  3128       pageForPosts
  2969     };
  3129     };
  2970   }, [blockEditorSettings, isFixedToolbarActive, keepCaretInsideBlock, hasUploadPermissions, reusableBlocks, setIsInserterOpened]);
  3130   }, [blockEditorSettings, isFixedToolbarActive, isLargeViewport, keepCaretInsideBlock, mediaPermissions.canCreate, reusableBlocks, setIsInserterOpened, pageOnFront, pageForPosts]);
  2971   const widgetAreaId = use_last_selected_widget_area();
  3131   const widgetAreaId = use_last_selected_widget_area();
  2972   const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(KIND, POST_TYPE, {
  3132   const [blocks, onInput, onChange] = (0,external_wp_coreData_namespaceObject.useEntityBlockEditor)(KIND, POST_TYPE, {
  2973     id: buildWidgetAreasPostId()
  3133     id: buildWidgetAreasPostId()
  2974   });
  3134   });
  2975   return (0,external_wp_element_namespaceObject.createElement)(external_wp_keyboardShortcuts_namespaceObject.ShortcutProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorKeyboardShortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts.Register, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockEditorProvider, _extends({
  3135   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.SlotFillProvider, {
  2976     value: blocks,
  3136     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts.Register, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ExperimentalBlockEditorProvider, {
  2977     onInput: onInput,
  3137       value: blocks,
  2978     onChange: onChange,
  3138       onInput: onInput,
  2979     settings: settings,
  3139       onChange: onChange,
  2980     useSubRegistry: false
  3140       settings: settings,
  2981   }, props), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.CopyHandler, null, children), (0,external_wp_element_namespaceObject.createElement)(external_wp_reusableBlocks_namespaceObject.ReusableBlocksMenuItems, {
  3141       useSubRegistry: false,
  2982     rootClientId: widgetAreaId
  3142       ...props,
  2983   }))));
  3143       children: [children, /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PatternsMenuItems, {
  2984 }
  3144         rootClientId: widgetAreaId
  2985 
  3145       })]
  2986 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/cog.js
  3146     })]
  2987 
  3147   });
  2988 
  3148 }
  2989 /**
  3149 
  2990  * WordPress dependencies
  3150 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-left.js
  2991  */
  3151 /**
  2992 
  3152  * WordPress dependencies
  2993 const cog = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  3153  */
       
  3154 
       
  3155 
       
  3156 const drawerLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3157   width: "24",
       
  3158   height: "24",
  2994   xmlns: "http://www.w3.org/2000/svg",
  3159   xmlns: "http://www.w3.org/2000/svg",
  2995   viewBox: "0 0 24 24"
  3160   viewBox: "0 0 24 24",
  2996 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3161   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  2997   fillRule: "evenodd",
  3162     fillRule: "evenodd",
  2998   d: "M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z",
  3163     clipRule: "evenodd",
  2999   clipRule: "evenodd"
  3164     d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"
  3000 }));
  3165   })
  3001 /* harmony default export */ var library_cog = (cog);
  3166 });
       
  3167 /* harmony default export */ const drawer_left = (drawerLeft);
       
  3168 
       
  3169 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-right.js
       
  3170 /**
       
  3171  * WordPress dependencies
       
  3172  */
       
  3173 
       
  3174 
       
  3175 const drawerRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3176   width: "24",
       
  3177   height: "24",
       
  3178   xmlns: "http://www.w3.org/2000/svg",
       
  3179   viewBox: "0 0 24 24",
       
  3180   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  3181     fillRule: "evenodd",
       
  3182     clipRule: "evenodd",
       
  3183     d: "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"
       
  3184   })
       
  3185 });
       
  3186 /* harmony default export */ const drawer_right = (drawerRight);
  3002 
  3187 
  3003 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
  3188 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
  3004 
  3189 /**
  3005 
  3190  * WordPress dependencies
  3006 /**
  3191  */
  3007  * WordPress dependencies
  3192 
  3008  */
  3193 
  3009 
  3194 const blockDefault = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
  3010 const blockDefault = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  3011   xmlns: "http://www.w3.org/2000/svg",
  3195   xmlns: "http://www.w3.org/2000/svg",
  3012   viewBox: "0 0 24 24"
  3196   viewBox: "0 0 24 24",
  3013 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3197   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  3014   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"
  3198     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"
  3015 }));
  3199   })
  3016 /* harmony default export */ var block_default = (blockDefault);
  3200 });
       
  3201 /* harmony default export */ const block_default = (blockDefault);
  3017 
  3202 
  3018 ;// CONCATENATED MODULE: external ["wp","url"]
  3203 ;// CONCATENATED MODULE: external ["wp","url"]
  3019 var external_wp_url_namespaceObject = window["wp"]["url"];
  3204 const external_wp_url_namespaceObject = window["wp"]["url"];
  3020 ;// CONCATENATED MODULE: external ["wp","dom"]
  3205 ;// CONCATENATED MODULE: external ["wp","dom"]
  3021 var external_wp_dom_namespaceObject = window["wp"]["dom"];
  3206 const external_wp_dom_namespaceObject = window["wp"]["dom"];
  3022 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/widget-areas.js
  3207 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/widget-areas.js
  3023 
  3208 /**
  3024 
  3209  * WordPress dependencies
  3025 /**
  3210  */
  3026  * WordPress dependencies
  3211 
  3027  */
       
  3028 
  3212 
  3029 
  3213 
  3030 
  3214 
  3031 
  3215 
  3032 
  3216 
  3036 /**
  3220 /**
  3037  * Internal dependencies
  3221  * Internal dependencies
  3038  */
  3222  */
  3039 
  3223 
  3040 
  3224 
  3041 function WidgetAreas(_ref) {
  3225 
  3042   let {
  3226 function WidgetAreas({
  3043     selectedWidgetAreaId
  3227   selectedWidgetAreaId
  3044   } = _ref;
  3228 }) {
  3045   const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas(), []);
  3229   const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas(), []);
  3046   const selectedWidgetArea = (0,external_wp_element_namespaceObject.useMemo)(() => selectedWidgetAreaId && (widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.find(widgetArea => widgetArea.id === selectedWidgetAreaId)), [selectedWidgetAreaId, widgetAreas]);
  3230   const selectedWidgetArea = (0,external_wp_element_namespaceObject.useMemo)(() => selectedWidgetAreaId && widgetAreas?.find(widgetArea => widgetArea.id === selectedWidgetAreaId), [selectedWidgetAreaId, widgetAreas]);
  3047   let description;
  3231   let description;
  3048 
       
  3049   if (!selectedWidgetArea) {
  3232   if (!selectedWidgetArea) {
  3050     description = (0,external_wp_i18n_namespaceObject.__)('Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
  3233     description = (0,external_wp_i18n_namespaceObject.__)('Widget Areas are global parts in your site’s layout that can accept blocks. These vary by theme, but are typically parts like your Sidebar or Footer.');
  3051   } else if (selectedWidgetAreaId === 'wp_inactive_widgets') {
  3234   } else if (selectedWidgetAreaId === 'wp_inactive_widgets') {
  3052     description = (0,external_wp_i18n_namespaceObject.__)('Blocks in this Widget Area will not be displayed in your site.');
  3235     description = (0,external_wp_i18n_namespaceObject.__)('Blocks in this Widget Area will not be displayed in your site.');
  3053   } else {
  3236   } else {
  3054     description = selectedWidgetArea.description;
  3237     description = selectedWidgetArea.description;
  3055   }
  3238   }
  3056 
  3239   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  3057   return (0,external_wp_element_namespaceObject.createElement)("div", {
  3240     className: "edit-widgets-widget-areas",
  3058     className: "edit-widgets-widget-areas"
  3241     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3059   }, (0,external_wp_element_namespaceObject.createElement)("div", {
  3242       className: "edit-widgets-widget-areas__top-container",
  3060     className: "edit-widgets-widget-areas__top-container"
  3243       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockIcon, {
  3061   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockIcon, {
  3244         icon: block_default
  3062     icon: block_default
  3245       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3063   }), (0,external_wp_element_namespaceObject.createElement)("div", null, (0,external_wp_element_namespaceObject.createElement)("p", {
  3246         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  3064     // Use `dangerouslySetInnerHTML` to keep backwards
  3247           // Use `dangerouslySetInnerHTML` to keep backwards
  3065     // compatibility. Basic markup in the description is an
  3248           // compatibility. Basic markup in the description is an
  3066     // established feature of WordPress.
  3249           // established feature of WordPress.
  3067     // @see https://github.com/WordPress/gutenberg/issues/33106
  3250           // @see https://github.com/WordPress/gutenberg/issues/33106
  3068     dangerouslySetInnerHTML: {
  3251           dangerouslySetInnerHTML: {
  3069       __html: (0,external_wp_dom_namespaceObject.safeHTML)(description)
  3252             __html: (0,external_wp_dom_namespaceObject.safeHTML)(description)
  3070     }
  3253           }
  3071   }), (widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.length) === 0 && (0,external_wp_element_namespaceObject.createElement)("p", null, (0,external_wp_i18n_namespaceObject.__)('Your theme does not contain any Widget Areas.')), !selectedWidgetArea && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  3254         }), widgetAreas?.length === 0 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  3072     href: (0,external_wp_url_namespaceObject.addQueryArgs)('customize.php', {
  3255           children: (0,external_wp_i18n_namespaceObject.__)('Your theme does not contain any Widget Areas.')
  3073       'autofocus[panel]': 'widgets',
  3256         }), !selectedWidgetArea && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  3074       return: window.location.pathname
  3257           href: (0,external_wp_url_namespaceObject.addQueryArgs)('customize.php', {
  3075     }),
  3258             'autofocus[panel]': 'widgets',
  3076     variant: "tertiary"
  3259             return: window.location.pathname
  3077   }, (0,external_wp_i18n_namespaceObject.__)('Manage with live preview')))));
  3260           }),
       
  3261           variant: "tertiary",
       
  3262           children: (0,external_wp_i18n_namespaceObject.__)('Manage with live preview')
       
  3263         })]
       
  3264       })]
       
  3265     })
       
  3266   });
  3078 }
  3267 }
  3079 
  3268 
  3080 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/index.js
  3269 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/sidebar/index.js
  3081 
  3270 /**
  3082 
  3271  * WordPress dependencies
  3083 /**
  3272  */
  3084  * External dependencies
       
  3085  */
       
  3086 
       
  3087 /**
       
  3088  * WordPress dependencies
       
  3089  */
       
  3090 
       
  3091 
  3273 
  3092 
  3274 
  3093 
  3275 
  3094 
  3276 
  3095 
  3277 
  3097 
  3279 
  3098 const SIDEBAR_ACTIVE_BY_DEFAULT = external_wp_element_namespaceObject.Platform.select({
  3280 const SIDEBAR_ACTIVE_BY_DEFAULT = external_wp_element_namespaceObject.Platform.select({
  3099   web: true,
  3281   web: true,
  3100   native: false
  3282   native: false
  3101 });
  3283 });
  3102 const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector'; // Widget areas were one called block areas, so use 'edit-widgets/block-areas'
  3284 const BLOCK_INSPECTOR_IDENTIFIER = 'edit-widgets/block-inspector';
       
  3285 
       
  3286 // Widget areas were one called block areas, so use 'edit-widgets/block-areas'
  3103 // for backwards compatibility.
  3287 // for backwards compatibility.
  3104 
       
  3105 const WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';
  3288 const WIDGET_AREAS_IDENTIFIER = 'edit-widgets/block-areas';
       
  3289 
  3106 /**
  3290 /**
  3107  * Internal dependencies
  3291  * Internal dependencies
  3108  */
  3292  */
  3109 
  3293 
  3110 
  3294 
  3111 
  3295 
  3112 
  3296 
  3113 function ComplementaryAreaTab(_ref) {
  3297 
  3114   let {
  3298 const {
  3115     identifier,
  3299   Tabs
  3116     label,
  3300 } = unlock(external_wp_components_namespaceObject.privateApis);
  3117     isActive
  3301 function SidebarHeader({
  3118   } = _ref;
  3302   selectedWidgetAreaBlock
       
  3303 }) {
       
  3304   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs.TabList, {
       
  3305     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
       
  3306       tabId: WIDGET_AREAS_IDENTIFIER,
       
  3307       children: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0,external_wp_i18n_namespaceObject.__)('Widget Areas')
       
  3308     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Tab, {
       
  3309       tabId: BLOCK_INSPECTOR_IDENTIFIER,
       
  3310       children: (0,external_wp_i18n_namespaceObject.__)('Block')
       
  3311     })]
       
  3312   });
       
  3313 }
       
  3314 function SidebarContent({
       
  3315   hasSelectedNonAreaBlock,
       
  3316   currentArea,
       
  3317   isGeneralSidebarOpen,
       
  3318   selectedWidgetAreaBlock
       
  3319 }) {
  3119   const {
  3320   const {
  3120     enableComplementaryArea
  3321     enableComplementaryArea
  3121   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  3322   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  3122   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  3323   (0,external_wp_element_namespaceObject.useEffect)(() => {
  3123     onClick: () => enableComplementaryArea(store_store.name, identifier),
  3324     if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
  3124     className: classnames_default()('edit-widgets-sidebar__panel-tab', {
  3325       enableComplementaryArea('core/edit-widgets', BLOCK_INSPECTOR_IDENTIFIER);
  3125       'is-active': isActive
  3326     }
       
  3327     if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
       
  3328       enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER);
       
  3329     }
       
  3330     // We're intentionally leaving `currentArea` and `isGeneralSidebarOpen`
       
  3331     // out of the dep array because we want this effect to run based on
       
  3332     // block selection changes, not sidebar state changes.
       
  3333     // eslint-disable-next-line react-hooks/exhaustive-deps
       
  3334   }, [hasSelectedNonAreaBlock, enableComplementaryArea]);
       
  3335   const tabsContextValue = (0,external_wp_element_namespaceObject.useContext)(Tabs.Context);
       
  3336   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area, {
       
  3337     className: "edit-widgets-sidebar",
       
  3338     header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.Context.Provider, {
       
  3339       value: tabsContextValue,
       
  3340       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarHeader, {
       
  3341         selectedWidgetAreaBlock: selectedWidgetAreaBlock
       
  3342       })
  3126     }),
  3343     }),
  3127     "aria-label": isActive ? // translators: %s: sidebar label e.g: "Widget Areas".
  3344     headerClassName: "edit-widgets-sidebar__panel-tabs"
  3128     (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('%s (selected)'), label) : label,
  3345     /* translators: button label text should, if possible, be under 16 characters. */,
  3129     "data-label": label
  3346     title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
  3130   }, label);
  3347     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close Settings'),
  3131 }
  3348     scope: "core/edit-widgets",
  3132 
  3349     identifier: currentArea,
       
  3350     icon: (0,external_wp_i18n_namespaceObject.isRTL)() ? drawer_left : drawer_right,
       
  3351     isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT,
       
  3352     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(Tabs.Context.Provider, {
       
  3353       value: tabsContextValue,
       
  3354       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
       
  3355         tabId: WIDGET_AREAS_IDENTIFIER,
       
  3356         focusable: false,
       
  3357         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WidgetAreas, {
       
  3358           selectedWidgetAreaId: selectedWidgetAreaBlock?.attributes.id
       
  3359         })
       
  3360       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs.TabPanel, {
       
  3361         tabId: BLOCK_INSPECTOR_IDENTIFIER,
       
  3362         focusable: false,
       
  3363         children: hasSelectedNonAreaBlock ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockInspector, {}) :
       
  3364         /*#__PURE__*/
       
  3365         // Pretend that Widget Areas are part of the UI by not
       
  3366         // showing the Block Inspector when one is selected.
       
  3367         (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
       
  3368           className: "block-editor-block-inspector__no-blocks",
       
  3369           children: (0,external_wp_i18n_namespaceObject.__)('No block selected.')
       
  3370         })
       
  3371       })]
       
  3372     })
       
  3373   });
       
  3374 }
  3133 function Sidebar() {
  3375 function Sidebar() {
  3134   const {
       
  3135     enableComplementaryArea
       
  3136   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
       
  3137   const {
  3376   const {
  3138     currentArea,
  3377     currentArea,
  3139     hasSelectedNonAreaBlock,
  3378     hasSelectedNonAreaBlock,
  3140     isGeneralSidebarOpen,
  3379     isGeneralSidebarOpen,
  3141     selectedWidgetAreaBlock
  3380     selectedWidgetAreaBlock
  3149       getActiveComplementaryArea
  3388       getActiveComplementaryArea
  3150     } = select(store);
  3389     } = select(store);
  3151     const selectedBlock = getSelectedBlock();
  3390     const selectedBlock = getSelectedBlock();
  3152     const activeArea = getActiveComplementaryArea(store_store.name);
  3391     const activeArea = getActiveComplementaryArea(store_store.name);
  3153     let currentSelection = activeArea;
  3392     let currentSelection = activeArea;
  3154 
       
  3155     if (!currentSelection) {
  3393     if (!currentSelection) {
  3156       if (selectedBlock) {
  3394       if (selectedBlock) {
  3157         currentSelection = BLOCK_INSPECTOR_IDENTIFIER;
  3395         currentSelection = BLOCK_INSPECTOR_IDENTIFIER;
  3158       } else {
  3396       } else {
  3159         currentSelection = WIDGET_AREAS_IDENTIFIER;
  3397         currentSelection = WIDGET_AREAS_IDENTIFIER;
  3160       }
  3398       }
  3161     }
  3399     }
  3162 
       
  3163     let widgetAreaBlock;
  3400     let widgetAreaBlock;
  3164 
       
  3165     if (selectedBlock) {
  3401     if (selectedBlock) {
  3166       if (selectedBlock.name === 'core/widget-area') {
  3402       if (selectedBlock.name === 'core/widget-area') {
  3167         widgetAreaBlock = selectedBlock;
  3403         widgetAreaBlock = selectedBlock;
  3168       } else {
  3404       } else {
  3169         widgetAreaBlock = getBlock(getBlockParentsByBlockName(selectedBlock.clientId, 'core/widget-area')[0]);
  3405         widgetAreaBlock = getBlock(getBlockParentsByBlockName(selectedBlock.clientId, 'core/widget-area')[0]);
  3170       }
  3406       }
  3171     }
  3407     }
  3172 
       
  3173     return {
  3408     return {
  3174       currentArea: currentSelection,
  3409       currentArea: currentSelection,
  3175       hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== 'core/widget-area'),
  3410       hasSelectedNonAreaBlock: !!(selectedBlock && selectedBlock.name !== 'core/widget-area'),
  3176       isGeneralSidebarOpen: !!activeArea,
  3411       isGeneralSidebarOpen: !!activeArea,
  3177       selectedWidgetAreaBlock: widgetAreaBlock
  3412       selectedWidgetAreaBlock: widgetAreaBlock
  3178     };
  3413     };
  3179   }, []); // currentArea, and isGeneralSidebarOpen are intentionally left out from the dependencies,
  3414   }, []);
  3180   // because we want to run the effect when a block is selected/unselected and not when the sidebar state changes.
  3415   const {
  3181 
  3416     enableComplementaryArea
  3182   (0,external_wp_element_namespaceObject.useEffect)(() => {
  3417   } = (0,external_wp_data_namespaceObject.useDispatch)(store);
  3183     if (hasSelectedNonAreaBlock && currentArea === WIDGET_AREAS_IDENTIFIER && isGeneralSidebarOpen) {
  3418 
  3184       enableComplementaryArea('core/edit-widgets', BLOCK_INSPECTOR_IDENTIFIER);
  3419   // `newSelectedTabId` could technically be falsey if no tab is selected (i.e.
       
  3420   // the initial render) or when we don't want a tab displayed (i.e. the
       
  3421   // sidebar is closed). These cases should both be covered by the `!!` check
       
  3422   // below, so we shouldn't need any additional falsey handling.
       
  3423   const onTabSelect = (0,external_wp_element_namespaceObject.useCallback)(newSelectedTabId => {
       
  3424     if (!!newSelectedTabId) {
       
  3425       enableComplementaryArea(store_store.name, newSelectedTabId);
  3185     }
  3426     }
  3186 
  3427   }, [enableComplementaryArea]);
  3187     if (!hasSelectedNonAreaBlock && currentArea === BLOCK_INSPECTOR_IDENTIFIER && isGeneralSidebarOpen) {
  3428   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Tabs
  3188       enableComplementaryArea('core/edit-widgets', WIDGET_AREAS_IDENTIFIER);
  3429   // Due to how this component is controlled (via a value from the
  3189     }
  3430   // `interfaceStore`), when the sidebar closes the currently selected
  3190   }, [hasSelectedNonAreaBlock, enableComplementaryArea]);
  3431   // tab can't be found. This causes the component to continuously reset
  3191   return (0,external_wp_element_namespaceObject.createElement)(complementary_area, {
  3432   // the selection to `null` in an infinite loop. Proactively setting
  3192     className: "edit-widgets-sidebar",
  3433   // the selected tab to `null` avoids that.
  3193     header: (0,external_wp_element_namespaceObject.createElement)("ul", null, (0,external_wp_element_namespaceObject.createElement)("li", null, (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaTab, {
  3434   , {
  3194       identifier: WIDGET_AREAS_IDENTIFIER,
  3435     selectedTabId: isGeneralSidebarOpen ? currentArea : null,
  3195       label: selectedWidgetAreaBlock ? selectedWidgetAreaBlock.attributes.name : (0,external_wp_i18n_namespaceObject.__)('Widget Areas'),
  3436     onSelect: onTabSelect,
  3196       isActive: currentArea === WIDGET_AREAS_IDENTIFIER
  3437     selectOnMove: false,
  3197     })), (0,external_wp_element_namespaceObject.createElement)("li", null, (0,external_wp_element_namespaceObject.createElement)(ComplementaryAreaTab, {
  3438     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SidebarContent, {
  3198       identifier: BLOCK_INSPECTOR_IDENTIFIER,
  3439       hasSelectedNonAreaBlock: hasSelectedNonAreaBlock,
  3199       label: (0,external_wp_i18n_namespaceObject.__)('Block'),
  3440       currentArea: currentArea,
  3200       isActive: currentArea === BLOCK_INSPECTOR_IDENTIFIER
  3441       isGeneralSidebarOpen: isGeneralSidebarOpen,
  3201     }))),
  3442       selectedWidgetAreaBlock: selectedWidgetAreaBlock
  3202     headerClassName: "edit-widgets-sidebar__panel-tabs"
  3443     })
  3203     /* translators: button label text should, if possible, be under 16 characters. */
  3444   });
       
  3445 }
       
  3446 
       
  3447 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
       
  3448 /**
       
  3449  * WordPress dependencies
       
  3450  */
       
  3451 
       
  3452 
       
  3453 const plus = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3454   xmlns: "http://www.w3.org/2000/svg",
       
  3455   viewBox: "0 0 24 24",
       
  3456   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  3457     d: "M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"
       
  3458   })
       
  3459 });
       
  3460 /* harmony default export */ const library_plus = (plus);
       
  3461 
       
  3462 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
       
  3463 /**
       
  3464  * WordPress dependencies
       
  3465  */
       
  3466 
       
  3467 
       
  3468 const listView = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3469   viewBox: "0 0 24 24",
       
  3470   xmlns: "http://www.w3.org/2000/svg",
       
  3471   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  3472     d: "M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"
       
  3473   })
       
  3474 });
       
  3475 /* harmony default export */ const list_view = (listView);
       
  3476 
       
  3477 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
       
  3478 /**
       
  3479  * WordPress dependencies
       
  3480  */
       
  3481 
       
  3482 
       
  3483 const undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3484   xmlns: "http://www.w3.org/2000/svg",
       
  3485   viewBox: "0 0 24 24",
       
  3486   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  3487     d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
       
  3488   })
       
  3489 });
       
  3490 /* harmony default export */ const library_undo = (undo);
       
  3491 
       
  3492 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
       
  3493 /**
       
  3494  * WordPress dependencies
       
  3495  */
       
  3496 
       
  3497 
       
  3498 const redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
       
  3499   xmlns: "http://www.w3.org/2000/svg",
       
  3500   viewBox: "0 0 24 24",
       
  3501   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
       
  3502     d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
       
  3503   })
       
  3504 });
       
  3505 /* harmony default export */ const library_redo = (redo);
       
  3506 
       
  3507 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/undo.js
       
  3508 /**
       
  3509  * WordPress dependencies
       
  3510  */
       
  3511 
       
  3512 
       
  3513 
       
  3514 
       
  3515 
       
  3516 
       
  3517 
       
  3518 
       
  3519 function UndoButton(props, ref) {
       
  3520   const hasUndo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasUndo(), []);
       
  3521   const {
       
  3522     undo
       
  3523   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  3524   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
       
  3525     ...props,
       
  3526     ref: ref,
       
  3527     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo,
       
  3528     label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
       
  3529     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z')
       
  3530     // If there are no undo levels we don't want to actually disable this
       
  3531     // button, because it will remove focus for keyboard users.
       
  3532     // See: https://github.com/WordPress/gutenberg/issues/3486
  3204     ,
  3533     ,
  3205     title: (0,external_wp_i18n_namespaceObject.__)('Settings'),
  3534     "aria-disabled": !hasUndo,
  3206     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close settings'),
  3535     onClick: hasUndo ? undo : undefined,
  3207     scope: "core/edit-widgets",
  3536     size: "compact"
  3208     identifier: currentArea,
  3537   });
  3209     icon: library_cog,
  3538 }
  3210     isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT
  3539 /* harmony default export */ const undo_redo_undo = ((0,external_wp_element_namespaceObject.forwardRef)(UndoButton));
  3211   }, currentArea === WIDGET_AREAS_IDENTIFIER && (0,external_wp_element_namespaceObject.createElement)(WidgetAreas, {
  3540 
  3212     selectedWidgetAreaId: selectedWidgetAreaBlock === null || selectedWidgetAreaBlock === void 0 ? void 0 : selectedWidgetAreaBlock.attributes.id
  3541 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/redo.js
  3213   }), currentArea === BLOCK_INSPECTOR_IDENTIFIER && (hasSelectedNonAreaBlock ? (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockInspector, null) : // Pretend that Widget Areas are part of the UI by not
  3542 /**
  3214   // showing the Block Inspector when one is selected.
  3543  * WordPress dependencies
  3215   (0,external_wp_element_namespaceObject.createElement)("span", {
  3544  */
  3216     className: "block-editor-block-inspector__no-blocks"
  3545 
  3217   }, (0,external_wp_i18n_namespaceObject.__)('No block selected.'))));
  3546 
  3218 }
  3547 
  3219 
  3548 
  3220 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/plus.js
  3549 
  3221 
  3550 
  3222 
  3551 
  3223 /**
  3552 
  3224  * WordPress dependencies
  3553 function RedoButton(props, ref) {
  3225  */
  3554   const shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y');
  3226 
  3555   const hasRedo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasRedo(), []);
  3227 const plus = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  3556   const {
  3228   xmlns: "http://www.w3.org/2000/svg",
  3557     redo
  3229   viewBox: "0 0 24 24"
  3558   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
  3230 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3559   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  3231   d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
  3560     ...props,
  3232 }));
  3561     ref: ref,
  3233 /* harmony default export */ var library_plus = (plus);
  3562     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo,
  3234 
  3563     label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
  3235 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/list-view.js
  3564     shortcut: shortcut
  3236 
  3565     // If there are no undo levels we don't want to actually disable this
  3237 
  3566     // button, because it will remove focus for keyboard users.
  3238 /**
  3567     // See: https://github.com/WordPress/gutenberg/issues/3486
  3239  * WordPress dependencies
  3568     ,
  3240  */
  3569     "aria-disabled": !hasRedo,
  3241 
  3570     onClick: hasRedo ? redo : undefined,
  3242 const listView = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  3571     size: "compact"
  3243   viewBox: "0 0 24 24",
  3572   });
  3244   xmlns: "http://www.w3.org/2000/svg"
  3573 }
  3245 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3574 /* harmony default export */ const undo_redo_redo = ((0,external_wp_element_namespaceObject.forwardRef)(RedoButton));
  3246   d: "M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z"
  3575 
  3247 }));
  3576 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/document-tools/index.js
  3248 /* harmony default export */ var list_view = (listView);
  3577 /**
       
  3578  * WordPress dependencies
       
  3579  */
       
  3580 
       
  3581 
       
  3582 
       
  3583 
       
  3584 
       
  3585 
       
  3586 
       
  3587 
       
  3588 /**
       
  3589  * Internal dependencies
       
  3590  */
       
  3591 
       
  3592 
       
  3593 
       
  3594 
       
  3595 
       
  3596 
       
  3597 
       
  3598 function DocumentTools() {
       
  3599   const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
       
  3600   const {
       
  3601     isInserterOpen,
       
  3602     isListViewOpen,
       
  3603     inserterSidebarToggleRef,
       
  3604     listViewToggleRef
       
  3605   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
       
  3606     const {
       
  3607       isInserterOpened,
       
  3608       getInserterSidebarToggleRef,
       
  3609       isListViewOpened,
       
  3610       getListViewToggleRef
       
  3611     } = unlock(select(store_store));
       
  3612     return {
       
  3613       isInserterOpen: isInserterOpened(),
       
  3614       isListViewOpen: isListViewOpened(),
       
  3615       inserterSidebarToggleRef: getInserterSidebarToggleRef(),
       
  3616       listViewToggleRef: getListViewToggleRef()
       
  3617     };
       
  3618   }, []);
       
  3619   const {
       
  3620     setIsInserterOpened,
       
  3621     setIsListViewOpened
       
  3622   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  3623   const toggleListView = (0,external_wp_element_namespaceObject.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
       
  3624   const toggleInserterSidebar = (0,external_wp_element_namespaceObject.useCallback)(() => setIsInserterOpened(!isInserterOpen), [setIsInserterOpened, isInserterOpen]);
       
  3625   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
       
  3626     className: "edit-widgets-header-toolbar",
       
  3627     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools'),
       
  3628     variant: "unstyled",
       
  3629     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3630       ref: inserterSidebarToggleRef,
       
  3631       as: external_wp_components_namespaceObject.Button,
       
  3632       className: "edit-widgets-header-toolbar__inserter-toggle",
       
  3633       variant: "primary",
       
  3634       isPressed: isInserterOpen,
       
  3635       onMouseDown: event => {
       
  3636         event.preventDefault();
       
  3637       },
       
  3638       onClick: toggleInserterSidebar,
       
  3639       icon: library_plus
       
  3640       /* translators: button label text should, if possible, be under 16
       
  3641       	characters. */,
       
  3642       label: (0,external_wp_i18n_namespaceObject._x)('Toggle block inserter', 'Generic label for block inserter button'),
       
  3643       size: "compact"
       
  3644     }), isMediumViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
  3645       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3646         as: undo_redo_undo
       
  3647       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3648         as: undo_redo_redo
       
  3649       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3650         as: external_wp_components_namespaceObject.Button,
       
  3651         className: "edit-widgets-header-toolbar__list-view-toggle",
       
  3652         icon: list_view,
       
  3653         isPressed: isListViewOpen
       
  3654         /* translators: button label text should, if possible, be under 16 characters. */,
       
  3655         label: (0,external_wp_i18n_namespaceObject.__)('List View'),
       
  3656         onClick: toggleListView,
       
  3657         ref: listViewToggleRef,
       
  3658         size: "compact"
       
  3659       })]
       
  3660     })]
       
  3661   });
       
  3662 }
       
  3663 /* harmony default export */ const document_tools = (DocumentTools);
  3249 
  3664 
  3250 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/save-button/index.js
  3665 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/save-button/index.js
  3251 
  3666 /**
  3252 
  3667  * WordPress dependencies
  3253 /**
  3668  */
  3254  * WordPress dependencies
  3669 
  3255  */
       
  3256 
  3670 
  3257 
  3671 
  3258 
  3672 
  3259 /**
  3673 /**
  3260  * Internal dependencies
  3674  * Internal dependencies
  3261  */
  3675  */
  3262 
       
  3263 
  3676 
  3264 
  3677 
  3265 function SaveButton() {
  3678 function SaveButton() {
  3266   const {
  3679   const {
  3267     hasEditedWidgetAreaIds,
  3680     hasEditedWidgetAreaIds,
  3268     isSaving
  3681     isSaving
  3269   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3682   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3270     var _getEditedWidgetAreas;
       
  3271 
       
  3272     const {
  3683     const {
  3273       getEditedWidgetAreas,
  3684       getEditedWidgetAreas,
  3274       isSavingWidgetAreas
  3685       isSavingWidgetAreas
  3275     } = select(store_store);
  3686     } = select(store_store);
  3276     return {
  3687     return {
  3277       hasEditedWidgetAreaIds: ((_getEditedWidgetAreas = getEditedWidgetAreas()) === null || _getEditedWidgetAreas === void 0 ? void 0 : _getEditedWidgetAreas.length) > 0,
  3688       hasEditedWidgetAreaIds: getEditedWidgetAreas()?.length > 0,
  3278       isSaving: isSavingWidgetAreas()
  3689       isSaving: isSavingWidgetAreas()
  3279     };
  3690     };
  3280   }, []);
  3691   }, []);
  3281   const {
  3692   const {
  3282     saveEditedWidgetAreas
  3693     saveEditedWidgetAreas
  3283   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  3694   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  3284   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  3695   const isDisabled = isSaving || !hasEditedWidgetAreaIds;
       
  3696   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  3285     variant: "primary",
  3697     variant: "primary",
  3286     isBusy: isSaving,
  3698     isBusy: isSaving,
  3287     "aria-disabled": isSaving,
  3699     "aria-disabled": isDisabled,
  3288     onClick: isSaving ? undefined : saveEditedWidgetAreas,
  3700     onClick: isDisabled ? undefined : saveEditedWidgetAreas,
  3289     disabled: !hasEditedWidgetAreaIds
  3701     size: "compact",
  3290   }, isSaving ? (0,external_wp_i18n_namespaceObject.__)('Saving…') : (0,external_wp_i18n_namespaceObject.__)('Update'));
  3702     children: isSaving ? (0,external_wp_i18n_namespaceObject.__)('Saving…') : (0,external_wp_i18n_namespaceObject.__)('Update')
  3291 }
  3703   });
  3292 
  3704 }
  3293 /* harmony default export */ var save_button = (SaveButton);
  3705 /* harmony default export */ const save_button = (SaveButton);
  3294 
  3706 
  3295 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
  3707 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/more-vertical.js
  3296 
  3708 /**
  3297 
  3709  * WordPress dependencies
  3298 /**
  3710  */
  3299  * WordPress dependencies
  3711 
  3300  */
  3712 
  3301 
  3713 const moreVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
  3302 const undo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  3303   xmlns: "http://www.w3.org/2000/svg",
  3714   xmlns: "http://www.w3.org/2000/svg",
  3304   viewBox: "0 0 24 24"
  3715   viewBox: "0 0 24 24",
  3305 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3716   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  3306   d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
  3717     d: "M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
  3307 }));
  3718   })
  3308 /* harmony default export */ var library_undo = (undo);
  3719 });
  3309 
  3720 /* harmony default export */ const more_vertical = (moreVertical);
  3310 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
  3721 
  3311 
  3722 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
  3312 
  3723 /**
  3313 /**
  3724  * WordPress dependencies
  3314  * WordPress dependencies
  3725  */
  3315  */
  3726 
  3316 
  3727 
  3317 const redo = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
  3728 const external = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
  3318   xmlns: "http://www.w3.org/2000/svg",
  3729   xmlns: "http://www.w3.org/2000/svg",
  3319   viewBox: "0 0 24 24"
  3730   viewBox: "0 0 24 24",
  3320 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  3731   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  3321   d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
  3732     d: "M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
  3322 }));
  3733   })
  3323 /* harmony default export */ var library_redo = (redo);
  3734 });
  3324 
  3735 /* harmony default export */ const library_external = (external);
  3325 ;// CONCATENATED MODULE: external ["wp","keycodes"]
       
  3326 var external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
       
  3327 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/undo.js
       
  3328 
       
  3329 
       
  3330 /**
       
  3331  * WordPress dependencies
       
  3332  */
       
  3333 
       
  3334 
       
  3335 
       
  3336 
       
  3337 
       
  3338 
       
  3339 function UndoButton() {
       
  3340   const hasUndo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasUndo(), []);
       
  3341   const {
       
  3342     undo
       
  3343   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  3344   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
       
  3345     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo,
       
  3346     label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
       
  3347     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z') // If there are no undo levels we don't want to actually disable this
       
  3348     // button, because it will remove focus for keyboard users.
       
  3349     // See: https://github.com/WordPress/gutenberg/issues/3486
       
  3350     ,
       
  3351     "aria-disabled": !hasUndo,
       
  3352     onClick: hasUndo ? undo : undefined
       
  3353   });
       
  3354 }
       
  3355 
       
  3356 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/undo-redo/redo.js
       
  3357 
       
  3358 
       
  3359 /**
       
  3360  * WordPress dependencies
       
  3361  */
       
  3362 
       
  3363 
       
  3364 
       
  3365 
       
  3366 
       
  3367 
       
  3368 function RedoButton() {
       
  3369   const hasRedo = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).hasRedo(), []);
       
  3370   const {
       
  3371     redo
       
  3372   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_coreData_namespaceObject.store);
       
  3373   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarButton, {
       
  3374     icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo,
       
  3375     label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
       
  3376     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') // If there are no undo levels we don't want to actually disable this
       
  3377     // button, because it will remove focus for keyboard users.
       
  3378     // See: https://github.com/WordPress/gutenberg/issues/3486
       
  3379     ,
       
  3380     "aria-disabled": !hasRedo,
       
  3381     onClick: hasRedo ? redo : undefined
       
  3382   });
       
  3383 }
       
  3384 
       
  3385 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/external.js
       
  3386 
       
  3387 
       
  3388 /**
       
  3389  * WordPress dependencies
       
  3390  */
       
  3391 
       
  3392 const external = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  3393   xmlns: "http://www.w3.org/2000/svg",
       
  3394   viewBox: "0 0 24 24"
       
  3395 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
       
  3396   d: "M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"
       
  3397 }));
       
  3398 /* harmony default export */ var library_external = (external);
       
  3399 
  3736 
  3400 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
  3737 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/config.js
  3401 /**
  3738 /**
  3402  * WordPress dependencies
  3739  * WordPress dependencies
  3403  */
  3740  */
  3426     character: 'k'
  3763     character: 'k'
  3427   },
  3764   },
  3428   description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
  3765   description: (0,external_wp_i18n_namespaceObject.__)('Remove a link.')
  3429 }, {
  3766 }, {
  3430   keyCombination: {
  3767   keyCombination: {
       
  3768     character: '[['
       
  3769   },
       
  3770   description: (0,external_wp_i18n_namespaceObject.__)('Insert a link to a post or page.')
       
  3771 }, {
       
  3772   keyCombination: {
  3431     modifier: 'primary',
  3773     modifier: 'primary',
  3432     character: 'u'
  3774     character: 'u'
  3433   },
  3775   },
  3434   description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
  3776   description: (0,external_wp_i18n_namespaceObject.__)('Underline the selected text.')
       
  3777 }, {
       
  3778   keyCombination: {
       
  3779     modifier: 'access',
       
  3780     character: 'd'
       
  3781   },
       
  3782   description: (0,external_wp_i18n_namespaceObject.__)('Strikethrough the selected text.')
       
  3783 }, {
       
  3784   keyCombination: {
       
  3785     modifier: 'access',
       
  3786     character: 'x'
       
  3787   },
       
  3788   description: (0,external_wp_i18n_namespaceObject.__)('Make the selected text inline code.')
       
  3789 }, {
       
  3790   keyCombination: {
       
  3791     modifier: 'access',
       
  3792     character: '0'
       
  3793   },
       
  3794   aliases: [{
       
  3795     modifier: 'access',
       
  3796     character: '7'
       
  3797   }],
       
  3798   description: (0,external_wp_i18n_namespaceObject.__)('Convert the current heading to a paragraph.')
       
  3799 }, {
       
  3800   keyCombination: {
       
  3801     modifier: 'access',
       
  3802     character: '1-6'
       
  3803   },
       
  3804   description: (0,external_wp_i18n_namespaceObject.__)('Convert the current paragraph or heading to a heading of level 1 to 6.')
       
  3805 }, {
       
  3806   keyCombination: {
       
  3807     modifier: 'primaryShift',
       
  3808     character: 'SPACE'
       
  3809   },
       
  3810   description: (0,external_wp_i18n_namespaceObject.__)('Add non breaking space.')
  3435 }];
  3811 }];
  3436 
  3812 
  3437 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
  3813 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/shortcut.js
  3438 
  3814 /**
  3439 
  3815  * WordPress dependencies
  3440 /**
  3816  */
  3441  * External dependencies
  3817 
  3442  */
  3818 
  3443 
  3819 
  3444 /**
  3820 
  3445  * WordPress dependencies
  3821 
  3446  */
  3822 function KeyCombination({
  3447 
  3823   keyCombination,
  3448 
  3824   forceAriaLabel
  3449 
  3825 }) {
  3450 
       
  3451 function KeyCombination(_ref) {
       
  3452   let {
       
  3453     keyCombination,
       
  3454     forceAriaLabel
       
  3455   } = _ref;
       
  3456   const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
  3826   const shortcut = keyCombination.modifier ? external_wp_keycodes_namespaceObject.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
  3457   const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
  3827   const ariaLabel = keyCombination.modifier ? external_wp_keycodes_namespaceObject.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
  3458   return (0,external_wp_element_namespaceObject.createElement)("kbd", {
  3828   const shortcuts = Array.isArray(shortcut) ? shortcut : [shortcut];
       
  3829   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
  3459     className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
  3830     className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key-combination",
  3460     "aria-label": forceAriaLabel || ariaLabel
  3831     "aria-label": forceAriaLabel || ariaLabel,
  3461   }, (0,external_lodash_namespaceObject.castArray)(shortcut).map((character, index) => {
  3832     children: shortcuts.map((character, index) => {
  3462     if (character === '+') {
  3833       if (character === '+') {
  3463       return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, {
  3834         return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
  3464         key: index
  3835           children: character
  3465       }, character);
  3836         }, index);
  3466     }
  3837       }
  3467 
  3838       return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("kbd", {
  3468     return (0,external_wp_element_namespaceObject.createElement)("kbd", {
  3839         className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key",
  3469       key: index,
  3840         children: character
  3470       className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-key"
  3841       }, index);
  3471     }, character);
  3842     })
  3472   }));
  3843   });
  3473 }
  3844 }
  3474 
  3845 function Shortcut({
  3475 function Shortcut(_ref2) {
  3846   description,
  3476   let {
  3847   keyCombination,
  3477     description,
  3848   aliases = [],
  3478     keyCombination,
  3849   ariaLabel
  3479     aliases = [],
  3850 }) {
  3480     ariaLabel
  3851   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3481   } = _ref2;
  3852     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  3482   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
  3853       className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description",
  3483     className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-description"
  3854       children: description
  3484   }, description), (0,external_wp_element_namespaceObject.createElement)("div", {
  3855     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3485     className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term"
  3856       className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-term",
  3486   }, (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
  3857       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
  3487     keyCombination: keyCombination,
  3858         keyCombination: keyCombination,
  3488     forceAriaLabel: ariaLabel
  3859         forceAriaLabel: ariaLabel
  3489   }), aliases.map((alias, index) => (0,external_wp_element_namespaceObject.createElement)(KeyCombination, {
  3860       }), aliases.map((alias, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyCombination, {
  3490     keyCombination: alias,
  3861         keyCombination: alias,
  3491     forceAriaLabel: ariaLabel,
  3862         forceAriaLabel: ariaLabel
  3492     key: index
  3863       }, index))]
  3493   }))));
  3864     })]
  3494 }
  3865   });
  3495 
  3866 }
  3496 /* harmony default export */ var keyboard_shortcut_help_modal_shortcut = (Shortcut);
  3867 /* harmony default export */ const keyboard_shortcut_help_modal_shortcut = (Shortcut);
  3497 
  3868 
  3498 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
  3869 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js
  3499 
  3870 /**
  3500 
  3871  * WordPress dependencies
  3501 /**
  3872  */
  3502  * WordPress dependencies
  3873 
  3503  */
       
  3504 
  3874 
  3505 
  3875 
  3506 /**
  3876 /**
  3507  * Internal dependencies
  3877  * Internal dependencies
  3508  */
  3878  */
  3509 
  3879 
  3510 
  3880 
  3511 
  3881 function DynamicShortcut({
  3512 function DynamicShortcut(_ref) {
  3882   name
  3513   let {
  3883 }) {
  3514     name
       
  3515   } = _ref;
       
  3516   const {
  3884   const {
  3517     keyCombination,
  3885     keyCombination,
  3518     description,
  3886     description,
  3519     aliases
  3887     aliases
  3520   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3888   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3527       keyCombination: getShortcutKeyCombination(name),
  3895       keyCombination: getShortcutKeyCombination(name),
  3528       aliases: getShortcutAliases(name),
  3896       aliases: getShortcutAliases(name),
  3529       description: getShortcutDescription(name)
  3897       description: getShortcutDescription(name)
  3530     };
  3898     };
  3531   }, [name]);
  3899   }, [name]);
  3532 
       
  3533   if (!keyCombination) {
  3900   if (!keyCombination) {
  3534     return null;
  3901     return null;
  3535   }
  3902   }
  3536 
  3903   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
  3537   return (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, {
       
  3538     keyCombination: keyCombination,
  3904     keyCombination: keyCombination,
  3539     description: description,
  3905     description: description,
  3540     aliases: aliases
  3906     aliases: aliases
  3541   });
  3907   });
  3542 }
  3908 }
  3543 
  3909 /* harmony default export */ const dynamic_shortcut = (DynamicShortcut);
  3544 /* harmony default export */ var dynamic_shortcut = (DynamicShortcut);
       
  3545 
  3910 
  3546 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
  3911 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/keyboard-shortcut-help-modal/index.js
  3547 
       
  3548 
       
  3549 /**
  3912 /**
  3550  * External dependencies
  3913  * External dependencies
  3551  */
  3914  */
  3552 
  3915 
  3553 
  3916 
  3565 
  3928 
  3566 
  3929 
  3567 
  3930 
  3568 
  3931 
  3569 
  3932 
  3570 const ShortcutList = _ref => {
  3933 const ShortcutList = ({
  3571   let {
  3934   shortcuts
  3572     shortcuts
  3935 }) =>
  3573   } = _ref;
  3936 /*#__PURE__*/
  3574   return (
  3937 /*
  3575     /*
  3938  * Disable reason: The `list` ARIA role is redundant but
  3576      * Disable reason: The `list` ARIA role is redundant but
  3939  * Safari+VoiceOver won't announce the list otherwise.
  3577      * Safari+VoiceOver won't announce the list otherwise.
  3940  */
  3578      */
  3941 /* eslint-disable jsx-a11y/no-redundant-roles */
  3579 
  3942 (0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
  3580     /* eslint-disable jsx-a11y/no-redundant-roles */
  3943   className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
  3581     (0,external_wp_element_namespaceObject.createElement)("ul", {
  3944   role: "list",
  3582       className: "edit-widgets-keyboard-shortcut-help-modal__shortcut-list",
  3945   children: shortcuts.map((shortcut, index) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
  3583       role: "list"
  3946     className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
  3584     }, shortcuts.map((shortcut, index) => (0,external_wp_element_namespaceObject.createElement)("li", {
  3947     children: typeof shortcut === 'string' ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dynamic_shortcut, {
  3585       className: "edit-widgets-keyboard-shortcut-help-modal__shortcut",
       
  3586       key: index
       
  3587     }, (0,external_lodash_namespaceObject.isString)(shortcut) ? (0,external_wp_element_namespaceObject.createElement)(dynamic_shortcut, {
       
  3588       name: shortcut
  3948       name: shortcut
  3589     }) : (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcut_help_modal_shortcut, shortcut))))
  3949     }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcut_help_modal_shortcut, {
  3590     /* eslint-enable jsx-a11y/no-redundant-roles */
  3950       ...shortcut
  3591 
  3951     })
  3592   );
  3952   }, index))
  3593 };
  3953 })
  3594 
  3954 /* eslint-enable jsx-a11y/no-redundant-roles */;
  3595 const ShortcutSection = _ref2 => {
  3955 const ShortcutSection = ({
  3596   let {
  3956   title,
  3597     title,
  3957   shortcuts,
  3598     shortcuts,
  3958   className
  3599     className
  3959 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("section", {
  3600   } = _ref2;
  3960   className: dist_clsx('edit-widgets-keyboard-shortcut-help-modal__section', className),
  3601   return (0,external_wp_element_namespaceObject.createElement)("section", {
  3961   children: [!!title && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
  3602     className: classnames_default()('edit-widgets-keyboard-shortcut-help-modal__section', className)
  3962     className: "edit-widgets-keyboard-shortcut-help-modal__section-title",
  3603   }, !!title && (0,external_wp_element_namespaceObject.createElement)("h2", {
  3963     children: title
  3604     className: "edit-widgets-keyboard-shortcut-help-modal__section-title"
  3964   }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutList, {
  3605   }, title), (0,external_wp_element_namespaceObject.createElement)(ShortcutList, {
       
  3606     shortcuts: shortcuts
  3965     shortcuts: shortcuts
  3607   }));
  3966   })]
  3608 };
  3967 });
  3609 
  3968 const ShortcutCategorySection = ({
  3610 const ShortcutCategorySection = _ref3 => {
  3969   title,
  3611   let {
  3970   categoryName,
  3612     title,
  3971   additionalShortcuts = []
  3613     categoryName,
  3972 }) => {
  3614     additionalShortcuts = []
       
  3615   } = _ref3;
       
  3616   const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3973   const categoryShortcuts = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3617     return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
  3974     return select(external_wp_keyboardShortcuts_namespaceObject.store).getCategoryShortcuts(categoryName);
  3618   }, [categoryName]);
  3975   }, [categoryName]);
  3619   return (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
  3976   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  3620     title: title,
  3977     title: title,
  3621     shortcuts: categoryShortcuts.concat(additionalShortcuts)
  3978     shortcuts: categoryShortcuts.concat(additionalShortcuts)
  3622   });
  3979   });
  3623 };
  3980 };
  3624 
  3981 function KeyboardShortcutHelpModal({
  3625 function KeyboardShortcutHelpModal(_ref4) {
  3982   isModalActive,
  3626   let {
  3983   toggleModal
  3627     isModalActive,
  3984 }) {
  3628     toggleModal
       
  3629   } = _ref4;
       
  3630   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleModal, {
  3985   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleModal, {
  3631     bindGlobal: true
  3986     bindGlobal: true
  3632   });
  3987   });
  3633 
       
  3634   if (!isModalActive) {
  3988   if (!isModalActive) {
  3635     return null;
  3989     return null;
  3636   }
  3990   }
  3637 
  3991   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.Modal, {
  3638   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Modal, {
       
  3639     className: "edit-widgets-keyboard-shortcut-help-modal",
  3992     className: "edit-widgets-keyboard-shortcut-help-modal",
  3640     title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
  3993     title: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts'),
  3641     closeLabel: (0,external_wp_i18n_namespaceObject.__)('Close'),
  3994     onRequestClose: toggleModal,
  3642     onRequestClose: toggleModal
  3995     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  3643   }, (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
  3996       className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
  3644     className: "edit-widgets-keyboard-shortcut-help-modal__main-shortcuts",
  3997       shortcuts: ['core/edit-widgets/keyboard-shortcuts']
  3645     shortcuts: ['core/edit-widgets/keyboard-shortcuts']
  3998     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  3646   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
  3999       title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
  3647     title: (0,external_wp_i18n_namespaceObject.__)('Global shortcuts'),
  4000       categoryName: "global"
  3648     categoryName: "global"
  4001     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  3649   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
  4002       title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
  3650     title: (0,external_wp_i18n_namespaceObject.__)('Selection shortcuts'),
  4003       categoryName: "selection"
  3651     categoryName: "selection"
  4004     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  3652   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutCategorySection, {
  4005       title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
  3653     title: (0,external_wp_i18n_namespaceObject.__)('Block shortcuts'),
  4006       categoryName: "block",
  3654     categoryName: "block",
  4007       additionalShortcuts: [{
  3655     additionalShortcuts: [{
  4008         keyCombination: {
  3656       keyCombination: {
  4009           character: '/'
  3657         character: '/'
  4010         },
  3658       },
  4011         description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
  3659       description: (0,external_wp_i18n_namespaceObject.__)('Change the block type after adding a new paragraph.'),
  4012         /* translators: The forward-slash character. e.g. '/'. */
  3660 
  4013         ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
  3661       /* translators: The forward-slash character. e.g. '/'. */
  4014       }]
  3662       ariaLabel: (0,external_wp_i18n_namespaceObject.__)('Forward-slash')
  4015     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutSection, {
  3663     }]
  4016       title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
  3664   }), (0,external_wp_element_namespaceObject.createElement)(ShortcutSection, {
  4017       shortcuts: textFormattingShortcuts
  3665     title: (0,external_wp_i18n_namespaceObject.__)('Text formatting'),
  4018     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ShortcutCategorySection, {
  3666     shortcuts: textFormattingShortcuts
  4019       title: (0,external_wp_i18n_namespaceObject.__)('List View shortcuts'),
  3667   }));
  4020       categoryName: "list-view"
       
  4021     })]
       
  4022   });
  3668 }
  4023 }
  3669 
  4024 
  3670 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/tools-more-menu-group.js
  4025 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/tools-more-menu-group.js
  3671 
       
  3672 
       
  3673 /**
       
  3674  * External dependencies
       
  3675  */
       
  3676 
       
  3677 /**
  4026 /**
  3678  * WordPress dependencies
  4027  * WordPress dependencies
  3679  */
  4028  */
  3680 
  4029 
  3681 
  4030 
  3682 const {
  4031 const {
  3683   Fill: ToolsMoreMenuGroup,
  4032   Fill: ToolsMoreMenuGroup,
  3684   Slot
  4033   Slot
  3685 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditWidgetsToolsMoreMenuGroup');
  4034 } = (0,external_wp_components_namespaceObject.createSlotFill)('EditWidgetsToolsMoreMenuGroup');
  3686 
  4035 ToolsMoreMenuGroup.Slot = ({
  3687 ToolsMoreMenuGroup.Slot = _ref => {
  4036   fillProps
  3688   let {
  4037 }) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Slot, {
  3689     fillProps
  4038   fillProps: fillProps,
  3690   } = _ref;
  4039   children: fills => fills.length > 0 && fills
  3691   return (0,external_wp_element_namespaceObject.createElement)(Slot, {
  4040 });
  3692     fillProps: fillProps
  4041 /* harmony default export */ const tools_more_menu_group = (ToolsMoreMenuGroup);
  3693   }, fills => !(0,external_lodash_namespaceObject.isEmpty)(fills) && fills);
       
  3694 };
       
  3695 
       
  3696 /* harmony default export */ var tools_more_menu_group = (ToolsMoreMenuGroup);
       
  3697 
  4042 
  3698 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/index.js
  4043 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/more-menu/index.js
  3699 
       
  3700 
       
  3701 /**
  4044 /**
  3702  * WordPress dependencies
  4045  * WordPress dependencies
  3703  */
  4046  */
  3704 
  4047 
  3705 
  4048 
  3711 
  4054 
  3712 
  4055 
  3713 /**
  4056 /**
  3714  * Internal dependencies
  4057  * Internal dependencies
  3715  */
  4058  */
       
  4059 
       
  4060 
  3716 
  4061 
  3717 
  4062 
  3718 
  4063 
  3719 function MoreMenu() {
  4064 function MoreMenu() {
  3720   const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
  4065   const [isKeyboardShortcutsModalActive, setIsKeyboardShortcutsModalVisible] = (0,external_wp_element_namespaceObject.useState)(false);
  3721 
       
  3722   const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
  4066   const toggleKeyboardShortcutsModal = () => setIsKeyboardShortcutsModalVisible(!isKeyboardShortcutsModalActive);
  3723 
       
  3724   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
  4067   (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-widgets/keyboard-shortcuts', toggleKeyboardShortcutsModal);
  3725   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  4068   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  3726   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(MoreMenuDropdown, null, onClose => (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
  4069   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3727     label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun')
  4070     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
  3728   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  4071       icon: more_vertical,
  3729     scope: "core/edit-widgets",
  4072       label: (0,external_wp_i18n_namespaceObject.__)('Options'),
  3730     name: "fixedToolbar",
  4073       popoverProps: {
  3731     label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'),
  4074         placement: 'bottom-end',
  3732     info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'),
  4075         className: 'more-menu-dropdown__content'
  3733     messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'),
  4076       },
  3734     messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated')
  4077       toggleProps: {
  3735   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
  4078         tooltipPosition: 'bottom',
  3736     label: (0,external_wp_i18n_namespaceObject.__)('Tools')
  4079         size: 'compact'
  3737   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
  4080       },
  3738     onClick: () => {
  4081       children: onClose => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3739       setIsKeyboardShortcutsModalVisible(true);
  4082         children: [isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuGroup, {
  3740     },
  4083           label: (0,external_wp_i18n_namespaceObject._x)('View', 'noun'),
  3741     shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h')
  4084           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  3742   }, (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  4085             scope: "core/edit-widgets",
  3743     scope: "core/edit-widgets",
  4086             name: "fixedToolbar",
  3744     name: "welcomeGuide",
  4087             label: (0,external_wp_i18n_namespaceObject.__)('Top toolbar'),
  3745     label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
  4088             info: (0,external_wp_i18n_namespaceObject.__)('Access all block and document tools in a single place'),
  3746   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuItem, {
  4089             messageActivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar activated'),
  3747     role: "menuitem",
  4090             messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Top toolbar deactivated')
  3748     icon: library_external,
  4091           })
  3749     href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/block-based-widgets-editor/'),
  4092         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
  3750     target: "_blank",
  4093           label: (0,external_wp_i18n_namespaceObject.__)('Tools'),
  3751     rel: "noopener noreferrer"
  4094           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
  3752   }, (0,external_wp_i18n_namespaceObject.__)('Help'), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
  4095             onClick: () => {
  3753     as: "span"
  4096               setIsKeyboardShortcutsModalVisible(true);
  3754   },
  4097             },
  3755   /* translators: accessibility text */
  4098             shortcut: external_wp_keycodes_namespaceObject.displayShortcut.access('h'),
  3756   (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)'))), (0,external_wp_element_namespaceObject.createElement)(tools_more_menu_group.Slot, {
  4099             children: (0,external_wp_i18n_namespaceObject.__)('Keyboard shortcuts')
  3757     fillProps: {
  4100           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  3758       onClose
  4101             scope: "core/edit-widgets",
  3759     }
  4102             name: "welcomeGuide",
  3760   })), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.MenuGroup, {
  4103             label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
  3761     label: (0,external_wp_i18n_namespaceObject.__)('Preferences')
  4104           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuItem, {
  3762   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  4105             role: "menuitem",
  3763     scope: "core/edit-widgets",
  4106             icon: library_external,
  3764     name: "keepCaretInsideBlock",
  4107             href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/block-based-widgets-editor/'),
  3765     label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'),
  4108             target: "_blank",
  3766     info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'),
  4109             rel: "noopener noreferrer",
  3767     messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'),
  4110             children: [(0,external_wp_i18n_namespaceObject.__)('Help'), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
  3768     messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated')
  4111               as: "span",
  3769   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  4112               children: /* translators: accessibility text */
  3770     scope: "core/edit-widgets",
  4113               (0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)')
  3771     name: "themeStyles",
  4114             })]
  3772     info: (0,external_wp_i18n_namespaceObject.__)('Make the editor look like your theme.'),
  4115           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tools_more_menu_group.Slot, {
  3773     label: (0,external_wp_i18n_namespaceObject.__)('Use theme styles')
  4116             fillProps: {
  3774   }), isLargeViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  4117               onClose
  3775     scope: "core/edit-widgets",
  4118             }
  3776     name: "showBlockBreadcrumbs",
  4119           })]
  3777     label: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs'),
  4120         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.MenuGroup, {
  3778     info: (0,external_wp_i18n_namespaceObject.__)('Shows block breadcrumbs at the bottom of the editor.'),
  4121           label: (0,external_wp_i18n_namespaceObject.__)('Preferences'),
  3779     messageActivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs activated'),
  4122           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
  3780     messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs deactivated')
  4123             scope: "core/edit-widgets",
  3781   })))), (0,external_wp_element_namespaceObject.createElement)(KeyboardShortcutHelpModal, {
  4124             name: "keepCaretInsideBlock",
  3782     isModalActive: isKeyboardShortcutsModalActive,
  4125             label: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block'),
  3783     toggleModal: toggleKeyboardShortcutsModal
  4126             info: (0,external_wp_i18n_namespaceObject.__)('Aids screen readers by stopping text caret from leaving blocks.'),
  3784   }));
  4127             messageActivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block activated'),
       
  4128             messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Contain text cursor inside block deactivated')
       
  4129           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
       
  4130             scope: "core/edit-widgets",
       
  4131             name: "themeStyles",
       
  4132             info: (0,external_wp_i18n_namespaceObject.__)('Make the editor look like your theme.'),
       
  4133             label: (0,external_wp_i18n_namespaceObject.__)('Use theme styles')
       
  4134           }), isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
       
  4135             scope: "core/edit-widgets",
       
  4136             name: "showBlockBreadcrumbs",
       
  4137             label: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs'),
       
  4138             info: (0,external_wp_i18n_namespaceObject.__)('Shows block breadcrumbs at the bottom of the editor.'),
       
  4139             messageActivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs activated'),
       
  4140             messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Display block breadcrumbs deactivated')
       
  4141           })]
       
  4142         })]
       
  4143       })
       
  4144     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(KeyboardShortcutHelpModal, {
       
  4145       isModalActive: isKeyboardShortcutsModalActive,
       
  4146       toggleModal: toggleKeyboardShortcutsModal
       
  4147     })]
       
  4148   });
  3785 }
  4149 }
  3786 
  4150 
  3787 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/index.js
  4151 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/header/index.js
  3788 
  4152 /**
  3789 
  4153  * WordPress dependencies
  3790 /**
  4154  */
  3791  * WordPress dependencies
  4155 
  3792  */
       
  3793 
  4156 
  3794 
  4157 
  3795 
  4158 
  3796 
  4159 
  3797 
  4160 
  3805 
  4168 
  3806 
  4169 
  3807 
  4170 
  3808 
  4171 
  3809 
  4172 
  3810 
       
  3811 
       
  3812 function Header() {
  4173 function Header() {
  3813   const isMediumViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  4174   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  3814   const inserterButton = (0,external_wp_element_namespaceObject.useRef)();
  4175   const blockToolbarRef = (0,external_wp_element_namespaceObject.useRef)();
  3815   const widgetAreaClientId = use_last_selected_widget_area();
       
  3816   const isLastSelectedWidgetAreaOpen = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getIsWidgetAreaOpen(widgetAreaClientId), [widgetAreaClientId]);
       
  3817   const {
  4176   const {
  3818     isInserterOpen,
  4177     hasFixedToolbar
  3819     isListViewOpen
  4178   } = (0,external_wp_data_namespaceObject.useSelect)(select => ({
  3820   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4179     hasFixedToolbar: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'fixedToolbar')
  3821     const {
  4180   }), []);
  3822       isInserterOpened,
  4181   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3823       isListViewOpened
  4182     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3824     } = select(store_store);
  4183       className: "edit-widgets-header",
  3825     return {
  4184       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3826       isInserterOpen: isInserterOpened(),
  4185         className: "edit-widgets-header__navigable-toolbar-wrapper",
  3827       isListViewOpen: isListViewOpened()
  4186         children: [isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  3828     };
  4187           className: "edit-widgets-header__title",
  3829   }, []);
  4188           children: (0,external_wp_i18n_namespaceObject.__)('Widgets')
  3830   const {
  4189         }), !isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
  3831     setIsWidgetAreaOpen,
  4190           as: "h1",
  3832     setIsInserterOpened,
  4191           className: "edit-widgets-header__title",
  3833     setIsListViewOpened
  4192           children: (0,external_wp_i18n_namespaceObject.__)('Widgets')
  3834   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  4193         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(document_tools, {}), hasFixedToolbar && isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3835   const {
  4194           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  3836     selectBlock
  4195             className: "selected-block-tools-wrapper",
  3837   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
  4196             children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
  3838 
  4197               hideDragHandle: true
  3839   const handleClick = () => {
  4198             })
  3840     if (isInserterOpen) {
  4199           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover.Slot, {
  3841       // Focusing the inserter button closes the inserter popover.
  4200             ref: blockToolbarRef,
  3842       setIsInserterOpened(false);
  4201             name: "block-toolbar"
  3843     } else {
  4202           })]
  3844       if (!isLastSelectedWidgetAreaOpen) {
  4203         })]
  3845         // Select the last selected block if hasn't already.
  4204       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3846         selectBlock(widgetAreaClientId); // Open the last selected widget area when opening the inserter.
  4205         className: "edit-widgets-header__actions",
  3847 
  4206         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(save_button, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(pinned_items.Slot, {
  3848         setIsWidgetAreaOpen(widgetAreaClientId, true);
  4207           scope: "core/edit-widgets"
  3849       } // The DOM updates resulting from selectBlock() and setIsInserterOpened() calls are applied the
  4208         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})]
  3850       // same tick and pretty much in a random order. The inserter is closed if any other part of the
  4209       })]
  3851       // app receives focus. If selectBlock() happens to take effect after setIsInserterOpened() then
  4210     })
  3852       // the inserter is visible for a brief moment and then gets auto-closed due to focus moving to
  4211   });
  3853       // the selected block.
  4212 }
  3854 
  4213 /* harmony default export */ const header = (Header);
  3855 
       
  3856       window.requestAnimationFrame(() => setIsInserterOpened(true));
       
  3857     }
       
  3858   };
       
  3859 
       
  3860   const toggleListView = (0,external_wp_element_namespaceObject.useCallback)(() => setIsListViewOpened(!isListViewOpen), [setIsListViewOpened, isListViewOpen]);
       
  3861   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  3862     className: "edit-widgets-header"
       
  3863   }, (0,external_wp_element_namespaceObject.createElement)("div", {
       
  3864     className: "edit-widgets-header__navigable-toolbar-wrapper"
       
  3865   }, isMediumViewport && (0,external_wp_element_namespaceObject.createElement)("h1", {
       
  3866     className: "edit-widgets-header__title"
       
  3867   }, (0,external_wp_i18n_namespaceObject.__)('Widgets')), !isMediumViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.VisuallyHidden, {
       
  3868     as: "h1",
       
  3869     className: "edit-widgets-header__title"
       
  3870   }, (0,external_wp_i18n_namespaceObject.__)('Widgets')), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
       
  3871     className: "edit-widgets-header-toolbar",
       
  3872     "aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools')
       
  3873   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3874     ref: inserterButton,
       
  3875     as: external_wp_components_namespaceObject.Button,
       
  3876     className: "edit-widgets-header-toolbar__inserter-toggle",
       
  3877     variant: "primary",
       
  3878     isPressed: isInserterOpen,
       
  3879     onMouseDown: event => {
       
  3880       event.preventDefault();
       
  3881     },
       
  3882     onClick: handleClick,
       
  3883     icon: library_plus
       
  3884     /* translators: button label text should, if possible, be under 16
       
  3885     characters. */
       
  3886     ,
       
  3887     label: (0,external_wp_i18n_namespaceObject._x)('Toggle block inserter', 'Generic label for block inserter button')
       
  3888   }), isMediumViewport && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(UndoButton, null), (0,external_wp_element_namespaceObject.createElement)(RedoButton, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ToolbarItem, {
       
  3889     as: external_wp_components_namespaceObject.Button,
       
  3890     className: "edit-widgets-header-toolbar__list-view-toggle",
       
  3891     icon: list_view,
       
  3892     isPressed: isListViewOpen
       
  3893     /* translators: button label text should, if possible, be under 16 characters. */
       
  3894     ,
       
  3895     label: (0,external_wp_i18n_namespaceObject.__)('List View'),
       
  3896     onClick: toggleListView
       
  3897   })))), (0,external_wp_element_namespaceObject.createElement)("div", {
       
  3898     className: "edit-widgets-header__actions"
       
  3899   }, (0,external_wp_element_namespaceObject.createElement)(save_button, null), (0,external_wp_element_namespaceObject.createElement)(pinned_items.Slot, {
       
  3900     scope: "core/edit-widgets"
       
  3901   }), (0,external_wp_element_namespaceObject.createElement)(MoreMenu, null))));
       
  3902 }
       
  3903 
       
  3904 /* harmony default export */ var header = (Header);
       
  3905 
  4214 
  3906 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/notices/index.js
  4215 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/notices/index.js
  3907 
  4216 /**
  3908 
  4217  * WordPress dependencies
  3909 /**
  4218  */
  3910  * External dependencies
  4219 
  3911  */
  4220 
  3912 
  4221 
  3913 /**
  4222 
  3914  * WordPress dependencies
  4223 // Last three notices. Slices from the tail end of the list.
  3915  */
  4224 
  3916 
  4225 
  3917 
  4226 
  3918 
  4227 const MAX_VISIBLE_NOTICES = -3;
  3919 
       
  3920 
       
  3921 function Notices() {
  4228 function Notices() {
  3922   const {
  4229   const {
  3923     removeNotice
  4230     removeNotice
  3924   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
  4231   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
  3925   const {
  4232   const {
  3927   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4234   } = (0,external_wp_data_namespaceObject.useSelect)(select => {
  3928     return {
  4235     return {
  3929       notices: select(external_wp_notices_namespaceObject.store).getNotices()
  4236       notices: select(external_wp_notices_namespaceObject.store).getNotices()
  3930     };
  4237     };
  3931   }, []);
  4238   }, []);
  3932   const dismissibleNotices = (0,external_lodash_namespaceObject.filter)(notices, {
  4239   const dismissibleNotices = notices.filter(({
  3933     isDismissible: true,
  4240     isDismissible,
  3934     type: 'default'
  4241     type
  3935   });
  4242   }) => isDismissible && type === 'default');
  3936   const nonDismissibleNotices = (0,external_lodash_namespaceObject.filter)(notices, {
  4243   const nonDismissibleNotices = notices.filter(({
  3937     isDismissible: false,
  4244     isDismissible,
  3938     type: 'default'
  4245     type
  3939   });
  4246   }) => !isDismissible && type === 'default');
  3940   const snackbarNotices = (0,external_lodash_namespaceObject.filter)(notices, {
  4247   const snackbarNotices = notices.filter(({
  3941     type: 'snackbar'
  4248     type
  3942   });
  4249   }) => type === 'snackbar').slice(MAX_VISIBLE_NOTICES);
  3943   return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NoticeList, {
  4250   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  3944     notices: nonDismissibleNotices,
  4251     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NoticeList, {
  3945     className: "edit-widgets-notices__pinned"
  4252       notices: nonDismissibleNotices,
  3946   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.NoticeList, {
  4253       className: "edit-widgets-notices__pinned"
  3947     notices: dismissibleNotices,
  4254     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NoticeList, {
  3948     className: "edit-widgets-notices__dismissible",
  4255       notices: dismissibleNotices,
  3949     onRemove: removeNotice
  4256       className: "edit-widgets-notices__dismissible",
  3950   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.SnackbarList, {
  4257       onRemove: removeNotice
  3951     notices: snackbarNotices,
  4258     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SnackbarList, {
  3952     className: "edit-widgets-notices__snackbar",
  4259       notices: snackbarNotices,
  3953     onRemove: removeNotice
  4260       className: "edit-widgets-notices__snackbar",
  3954   }));
  4261       onRemove: removeNotice
  3955 }
  4262     })]
  3956 
  4263   });
  3957 /* harmony default export */ var notices = (Notices);
  4264 }
       
  4265 /* harmony default export */ const notices = (Notices);
  3958 
  4266 
  3959 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-content/index.js
  4267 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/widget-areas-block-editor-content/index.js
  3960 
  4268 /**
  3961 
  4269  * WordPress dependencies
  3962 /**
  4270  */
  3963  * WordPress dependencies
  4271 
  3964  */
  4272 
  3965 
  4273 
  3966 
  4274 
  3967 
  4275 
  3968 
  4276 
  3969 /**
  4277 /**
  3970  * Internal dependencies
  4278  * Internal dependencies
  3971  */
  4279  */
  3972 
  4280 
  3973 
  4281 
  3974 
  4282 
  3975 function WidgetAreasBlockEditorContent(_ref) {
  4283 
  3976   let {
  4284 function WidgetAreasBlockEditorContent({
  3977     blockEditorSettings
  4285   blockEditorSettings
  3978   } = _ref;
  4286 }) {
  3979   const hasThemeStyles = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'themeStyles'), []);
  4287   const hasThemeStyles = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'themeStyles'), []);
       
  4288   const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
  3980   const styles = (0,external_wp_element_namespaceObject.useMemo)(() => {
  4289   const styles = (0,external_wp_element_namespaceObject.useMemo)(() => {
  3981     return hasThemeStyles ? blockEditorSettings.styles : [];
  4290     return hasThemeStyles ? blockEditorSettings.styles : [];
  3982   }, [blockEditorSettings, hasThemeStyles]);
  4291   }, [blockEditorSettings, hasThemeStyles]);
  3983   return (0,external_wp_element_namespaceObject.createElement)("div", {
  4292   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  3984     className: "edit-widgets-block-editor"
  4293     className: "edit-widgets-block-editor",
  3985   }, (0,external_wp_element_namespaceObject.createElement)(notices, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockTools, null, (0,external_wp_element_namespaceObject.createElement)(keyboard_shortcuts, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
  4294     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(notices, {}), !isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockToolbar, {
  3986     styles: styles
  4295       hideDragHandle: true
  3987   }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.WritingFlow, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.ObserveTyping, null, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockList, {
  4296     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.BlockTools, {
  3988     className: "edit-widgets-main-block-list"
  4297       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__unstableEditorStyles, {
  3989   }))))));
  4298         styles: styles,
       
  4299         scope: ".editor-styles-wrapper"
       
  4300       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockSelectionClearer, {
       
  4301         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.WritingFlow, {
       
  4302           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockList, {
       
  4303             className: "edit-widgets-main-block-list"
       
  4304           })
       
  4305         })
       
  4306       })]
       
  4307     })]
       
  4308   });
  3990 }
  4309 }
  3991 
  4310 
  3992 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
  4311 ;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/close.js
  3993 
  4312 /**
  3994 
  4313  * WordPress dependencies
  3995 /**
  4314  */
  3996  * WordPress dependencies
  4315 
  3997  */
  4316 
  3998 
  4317 const close_close = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
  3999 const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, {
       
  4000   xmlns: "http://www.w3.org/2000/svg",
  4318   xmlns: "http://www.w3.org/2000/svg",
  4001   viewBox: "0 0 24 24"
  4319   viewBox: "0 0 24 24",
  4002 }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, {
  4320   children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
  4003   d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
  4321     d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"
  4004 }));
  4322   })
  4005 /* harmony default export */ var library_close = (close_close);
  4323 });
       
  4324 /* harmony default export */ const library_close = (close_close);
  4006 
  4325 
  4007 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-widget-library-insertion-point.js
  4326 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/hooks/use-widget-library-insertion-point.js
  4008 /**
  4327 /**
  4009  * WordPress dependencies
  4328  * WordPress dependencies
  4010  */
  4329  */
  4011 
  4330 
  4012 
  4331 
  4013 
  4332 
       
  4333 
  4014 /**
  4334 /**
  4015  * Internal dependencies
  4335  * Internal dependencies
  4016  */
  4336  */
  4017 
       
  4018 
       
  4019 
  4337 
  4020 
  4338 
  4021 const useWidgetLibraryInsertionPoint = () => {
  4339 const useWidgetLibraryInsertionPoint = () => {
  4022   const firstRootId = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4340   const firstRootId = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4023     var _widgetAreasPost$bloc;
       
  4024 
       
  4025     // Default to the first widget area
  4341     // Default to the first widget area
  4026     const {
  4342     const {
  4027       getEntityRecord
  4343       getEntityRecord
  4028     } = select(external_wp_coreData_namespaceObject.store);
  4344     } = select(external_wp_coreData_namespaceObject.store);
  4029     const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId());
  4345     const widgetAreasPost = getEntityRecord(KIND, POST_TYPE, buildWidgetAreasPostId());
  4030     return widgetAreasPost === null || widgetAreasPost === void 0 ? void 0 : (_widgetAreasPost$bloc = widgetAreasPost.blocks[0]) === null || _widgetAreasPost$bloc === void 0 ? void 0 : _widgetAreasPost$bloc.clientId;
  4346     return widgetAreasPost?.blocks[0]?.clientId;
  4031   }, []);
  4347   }, []);
  4032   return (0,external_wp_data_namespaceObject.useSelect)(select => {
  4348   return (0,external_wp_data_namespaceObject.useSelect)(select => {
  4033     const {
  4349     const {
  4034       getBlockRootClientId,
  4350       getBlockRootClientId,
  4035       getBlockSelectionEnd,
  4351       getBlockSelectionEnd,
  4036       getBlockOrder,
  4352       getBlockOrder,
  4037       getBlockIndex
  4353       getBlockIndex
  4038     } = select(external_wp_blockEditor_namespaceObject.store);
  4354     } = select(external_wp_blockEditor_namespaceObject.store);
  4039 
  4355     const insertionPoint = select(store_store).__experimentalGetInsertionPoint();
  4040     const insertionPoint = select(store_store).__experimentalGetInsertionPoint(); // "Browse all" in the quick inserter will set the rootClientId to the current block.
  4356 
       
  4357     // "Browse all" in the quick inserter will set the rootClientId to the current block.
  4041     // Otherwise, it will just be undefined, and we'll have to handle it differently below.
  4358     // Otherwise, it will just be undefined, and we'll have to handle it differently below.
  4042 
       
  4043 
       
  4044     if (insertionPoint.rootClientId) {
  4359     if (insertionPoint.rootClientId) {
  4045       return insertionPoint;
  4360       return insertionPoint;
  4046     }
  4361     }
  4047 
       
  4048     const clientId = getBlockSelectionEnd() || firstRootId;
  4362     const clientId = getBlockSelectionEnd() || firstRootId;
  4049     const rootClientId = getBlockRootClientId(clientId); // If the selected block is at the root level, it's a widget area and
  4363     const rootClientId = getBlockRootClientId(clientId);
       
  4364 
       
  4365     // If the selected block is at the root level, it's a widget area and
  4050     // blocks can't be inserted here. Return this block as the root and the
  4366     // blocks can't be inserted here. Return this block as the root and the
  4051     // last child clientId indicating insertion at the end.
  4367     // last child clientId indicating insertion at the end.
  4052 
       
  4053     if (clientId && rootClientId === '') {
  4368     if (clientId && rootClientId === '') {
  4054       return {
  4369       return {
  4055         rootClientId: clientId,
  4370         rootClientId: clientId,
  4056         insertionIndex: getBlockOrder(clientId).length
  4371         insertionIndex: getBlockOrder(clientId).length
  4057       };
  4372       };
  4058     }
  4373     }
  4059 
       
  4060     return {
  4374     return {
  4061       rootClientId,
  4375       rootClientId,
  4062       insertionIndex: getBlockIndex(clientId) + 1
  4376       insertionIndex: getBlockIndex(clientId) + 1
  4063     };
  4377     };
  4064   }, [firstRootId]);
  4378   }, [firstRootId]);
  4065 };
  4379 };
  4066 
  4380 /* harmony default export */ const use_widget_library_insertion_point = (useWidgetLibraryInsertionPoint);
  4067 /* harmony default export */ var use_widget_library_insertion_point = (useWidgetLibraryInsertionPoint);
       
  4068 
  4381 
  4069 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.js
  4382 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/inserter-sidebar.js
  4070 
  4383 /**
  4071 
  4384  * WordPress dependencies
  4072 
  4385  */
  4073 /**
  4386 
  4074  * WordPress dependencies
       
  4075  */
       
  4076 
  4387 
  4077 
  4388 
  4078 
  4389 
  4079 
  4390 
  4080 
  4391 
  4081 
  4392 
  4082 
  4393 
  4083 /**
  4394 /**
  4084  * Internal dependencies
  4395  * Internal dependencies
  4085  */
  4396  */
       
  4397 
  4086 
  4398 
  4087 
  4399 
  4088 
  4400 
  4089 function InserterSidebar() {
  4401 function InserterSidebar() {
  4090   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
  4402   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
  4099     return setIsInserterOpened(false);
  4411     return setIsInserterOpened(false);
  4100   }, [setIsInserterOpened]);
  4412   }, [setIsInserterOpened]);
  4101   const TagName = !isMobileViewport ? external_wp_components_namespaceObject.VisuallyHidden : 'div';
  4413   const TagName = !isMobileViewport ? external_wp_components_namespaceObject.VisuallyHidden : 'div';
  4102   const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({
  4414   const [inserterDialogRef, inserterDialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({
  4103     onClose: closeInserter,
  4415     onClose: closeInserter,
  4104     focusOnMount: null
  4416     focusOnMount: true
  4105   });
  4417   });
  4106   const libraryRef = (0,external_wp_element_namespaceObject.useRef)();
  4418   const libraryRef = (0,external_wp_element_namespaceObject.useRef)();
  4107   (0,external_wp_element_namespaceObject.useEffect)(() => {
  4419   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  4108     libraryRef.current.focusSearch();
  4420     ref: inserterDialogRef,
  4109   }, []);
  4421     ...inserterDialogProps,
  4110   return (0,external_wp_element_namespaceObject.createElement)("div", _extends({
  4422     className: "edit-widgets-layout__inserter-panel",
  4111     ref: inserterDialogRef
  4423     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TagName, {
  4112   }, inserterDialogProps, {
  4424       className: "edit-widgets-layout__inserter-panel-header",
  4113     className: "edit-widgets-layout__inserter-panel"
  4425       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  4114   }), (0,external_wp_element_namespaceObject.createElement)(TagName, {
  4426         icon: library_close,
  4115     className: "edit-widgets-layout__inserter-panel-header"
  4427         onClick: closeInserter,
  4116   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  4428         label: (0,external_wp_i18n_namespaceObject.__)('Close block inserter')
  4117     icon: library_close,
  4429       })
  4118     onClick: closeInserter,
  4430     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  4119     label: (0,external_wp_i18n_namespaceObject.__)('Close block inserter')
  4431       className: "edit-widgets-layout__inserter-panel-content",
  4120   })), (0,external_wp_element_namespaceObject.createElement)("div", {
  4432       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, {
  4121     className: "edit-widgets-layout__inserter-panel-content"
  4433         showInserterHelpPanel: true,
  4122   }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalLibrary, {
  4434         shouldFocusBlock: isMobileViewport,
  4123     showInserterHelpPanel: true,
  4435         rootClientId: rootClientId,
  4124     shouldFocusBlock: isMobileViewport,
  4436         __experimentalInsertionIndex: insertionIndex,
  4125     rootClientId: rootClientId,
  4437         ref: libraryRef
  4126     __experimentalInsertionIndex: insertionIndex,
  4438       })
  4127     ref: libraryRef
  4439     })]
  4128   })));
  4440   });
  4129 }
  4441 }
  4130 
  4442 
  4131 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js
  4443 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/list-view-sidebar.js
  4132 
  4444 /**
  4133 
  4445  * WordPress dependencies
  4134 /**
  4446  */
  4135  * WordPress dependencies
  4447 
  4136  */
  4448 
  4137 
  4449 
  4138 
  4450 
  4139 
  4451 
  4140 
  4452 
  4141 
  4453 
  4142 
  4454 
  4143 
  4455 
  4144 /**
  4456 /**
  4145  * Internal dependencies
  4457  * Internal dependencies
  4146  */
  4458  */
       
  4459 
       
  4460 
  4147 
  4461 
  4148 
  4462 
  4149 function ListViewSidebar() {
  4463 function ListViewSidebar() {
  4150   const {
  4464   const {
  4151     setIsListViewOpened
  4465     setIsListViewOpened
  4152   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
  4466   } = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
       
  4467   const {
       
  4468     getListViewToggleRef
       
  4469   } = unlock((0,external_wp_data_namespaceObject.useSelect)(store_store));
       
  4470 
       
  4471   // Use internal state instead of a ref to make sure that the component
       
  4472   // re-renders when the dropZoneElement updates.
       
  4473   const [dropZoneElement, setDropZoneElement] = (0,external_wp_element_namespaceObject.useState)(null);
  4153   const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement');
  4474   const focusOnMountRef = (0,external_wp_compose_namespaceObject.useFocusOnMount)('firstElement');
  4154   const headerFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)();
  4475 
  4155   const contentFocusReturnRef = (0,external_wp_compose_namespaceObject.useFocusReturn)();
  4476   // When closing the list view, focus should return to the toggle button.
  4156 
  4477   const closeListView = (0,external_wp_element_namespaceObject.useCallback)(() => {
  4157   function closeOnEscape(event) {
  4478     setIsListViewOpened(false);
       
  4479     getListViewToggleRef().current?.focus();
       
  4480   }, [getListViewToggleRef, setIsListViewOpened]);
       
  4481   const closeOnEscape = (0,external_wp_element_namespaceObject.useCallback)(event => {
  4158     if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) {
  4482     if (event.keyCode === external_wp_keycodes_namespaceObject.ESCAPE && !event.defaultPrevented) {
  4159       event.preventDefault();
  4483       event.preventDefault();
  4160       setIsListViewOpened(false);
  4484       closeListView();
  4161     }
  4485     }
  4162   }
  4486   }, [closeListView]);
  4163 
  4487   return (
  4164   const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(ListViewSidebar);
  4488     /*#__PURE__*/
  4165   const labelId = `edit-widgets-editor__list-view-panel-label-${instanceId}`;
  4489     // eslint-disable-next-line jsx-a11y/no-static-element-interactions
  4166   return (// eslint-disable-next-line jsx-a11y/no-static-element-interactions
  4490     (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  4167     (0,external_wp_element_namespaceObject.createElement)("div", {
       
  4168       "aria-labelledby": labelId,
       
  4169       className: "edit-widgets-editor__list-view-panel",
  4491       className: "edit-widgets-editor__list-view-panel",
  4170       onKeyDown: closeOnEscape
  4492       onKeyDown: closeOnEscape,
  4171     }, (0,external_wp_element_namespaceObject.createElement)("div", {
  4493       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
  4172       className: "edit-widgets-editor__list-view-panel-header",
  4494         className: "edit-widgets-editor__list-view-panel-header",
  4173       ref: headerFocusReturnRef
  4495         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", {
  4174     }, (0,external_wp_element_namespaceObject.createElement)("strong", {
  4496           children: (0,external_wp_i18n_namespaceObject.__)('List View')
  4175       id: labelId
  4497         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
  4176     }, (0,external_wp_i18n_namespaceObject.__)('List View')), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
  4498           icon: close_small,
  4177       icon: close_small,
  4499           label: (0,external_wp_i18n_namespaceObject.__)('Close'),
  4178       label: (0,external_wp_i18n_namespaceObject.__)('Close List View Sidebar'),
  4500           onClick: closeListView
  4179       onClick: () => setIsListViewOpened(false)
  4501         })]
  4180     })), (0,external_wp_element_namespaceObject.createElement)("div", {
  4502       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  4181       className: "edit-widgets-editor__list-view-panel-content",
  4503         className: "edit-widgets-editor__list-view-panel-content",
  4182       ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([contentFocusReturnRef, focusOnMountRef])
  4504         ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([focusOnMountRef, setDropZoneElement]),
  4183     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.__experimentalListView, {
  4505         children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.__experimentalListView, {
  4184       showNestedBlocks: true,
  4506           dropZoneElement: dropZoneElement
  4185       __experimentalHideContainerBlockActions: true,
  4507         })
  4186       __experimentalFeatures: true,
  4508       })]
  4187       __experimentalPersistentListViewFeatures: true
  4509     })
  4188     })))
       
  4189   );
  4510   );
  4190 }
  4511 }
  4191 
  4512 
  4192 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/index.js
  4513 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/secondary-sidebar/index.js
  4193 
       
  4194 
       
  4195 /**
  4514 /**
  4196  * WordPress dependencies
  4515  * WordPress dependencies
  4197  */
  4516  */
  4198 
  4517 
  4199 /**
  4518 /**
  4219     return {
  4538     return {
  4220       isInserterOpen: isInserterOpened(),
  4539       isInserterOpen: isInserterOpened(),
  4221       isListViewOpen: isListViewOpened()
  4540       isListViewOpen: isListViewOpened()
  4222     };
  4541     };
  4223   }, []);
  4542   }, []);
  4224 
       
  4225   if (isInserterOpen) {
  4543   if (isInserterOpen) {
  4226     return (0,external_wp_element_namespaceObject.createElement)(InserterSidebar, null);
  4544     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InserterSidebar, {});
  4227   }
  4545   }
  4228 
       
  4229   if (isListViewOpen) {
  4546   if (isListViewOpen) {
  4230     return (0,external_wp_element_namespaceObject.createElement)(ListViewSidebar, null);
  4547     return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ListViewSidebar, {});
  4231   }
  4548   }
  4232 
       
  4233   return null;
  4549   return null;
  4234 }
  4550 }
  4235 
  4551 
  4236 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/interface.js
  4552 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/interface.js
  4237 
  4553 /**
  4238 
  4554  * WordPress dependencies
  4239 /**
  4555  */
  4240  * WordPress dependencies
  4556 
  4241  */
       
  4242 
  4557 
  4243 
  4558 
  4244 
  4559 
  4245 
  4560 
  4246 
  4561 
  4248 
  4563 
  4249 
  4564 
  4250 /**
  4565 /**
  4251  * Internal dependencies
  4566  * Internal dependencies
  4252  */
  4567  */
       
  4568 
  4253 
  4569 
  4254 
  4570 
  4255 
  4571 
  4256 
  4572 
  4257 
  4573 
  4258 const interfaceLabels = {
  4574 const interfaceLabels = {
  4259   /* translators: accessibility text for the widgets screen top bar landmark region. */
  4575   /* translators: accessibility text for the widgets screen top bar landmark region. */
  4260   header: (0,external_wp_i18n_namespaceObject.__)('Widgets top bar'),
  4576   header: (0,external_wp_i18n_namespaceObject.__)('Widgets top bar'),
  4261 
       
  4262   /* translators: accessibility text for the widgets screen content landmark region. */
  4577   /* translators: accessibility text for the widgets screen content landmark region. */
  4263   body: (0,external_wp_i18n_namespaceObject.__)('Widgets and blocks'),
  4578   body: (0,external_wp_i18n_namespaceObject.__)('Widgets and blocks'),
  4264 
       
  4265   /* translators: accessibility text for the widgets screen settings landmark region. */
  4579   /* translators: accessibility text for the widgets screen settings landmark region. */
  4266   sidebar: (0,external_wp_i18n_namespaceObject.__)('Widgets settings'),
  4580   sidebar: (0,external_wp_i18n_namespaceObject.__)('Widgets settings'),
  4267 
       
  4268   /* translators: accessibility text for the widgets screen footer landmark region. */
  4581   /* translators: accessibility text for the widgets screen footer landmark region. */
  4269   footer: (0,external_wp_i18n_namespaceObject.__)('Widgets footer')
  4582   footer: (0,external_wp_i18n_namespaceObject.__)('Widgets footer')
  4270 };
  4583 };
  4271 
  4584 function Interface({
  4272 function Interface(_ref) {
  4585   blockEditorSettings
  4273   let {
  4586 }) {
  4274     blockEditorSettings
       
  4275   } = _ref;
       
  4276   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
  4587   const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
  4277   const isHugeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('huge', '>=');
  4588   const isHugeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('huge', '>=');
  4278   const {
  4589   const {
  4279     setIsInserterOpened,
  4590     setIsInserterOpened,
  4280     setIsListViewOpened,
  4591     setIsListViewOpened,
  4292     isInserterOpened: !!select(store_store).isInserterOpened(),
  4603     isInserterOpened: !!select(store_store).isInserterOpened(),
  4293     isListViewOpened: !!select(store_store).isListViewOpened(),
  4604     isListViewOpened: !!select(store_store).isListViewOpened(),
  4294     hasBlockBreadCrumbsEnabled: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'showBlockBreadcrumbs'),
  4605     hasBlockBreadCrumbsEnabled: !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'showBlockBreadcrumbs'),
  4295     previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'),
  4606     previousShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/previous-region'),
  4296     nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region')
  4607     nextShortcut: select(external_wp_keyboardShortcuts_namespaceObject.store).getAllShortcutKeyCombinations('core/edit-widgets/next-region')
  4297   }), []); // Inserter and Sidebars are mutually exclusive
  4608   }), []);
  4298 
  4609 
       
  4610   // Inserter and Sidebars are mutually exclusive
  4299   (0,external_wp_element_namespaceObject.useEffect)(() => {
  4611   (0,external_wp_element_namespaceObject.useEffect)(() => {
  4300     if (hasSidebarEnabled && !isHugeViewport) {
  4612     if (hasSidebarEnabled && !isHugeViewport) {
  4301       setIsInserterOpened(false);
  4613       setIsInserterOpened(false);
  4302       setIsListViewOpened(false);
  4614       setIsListViewOpened(false);
  4303     }
  4615     }
  4307       closeGeneralSidebar();
  4619       closeGeneralSidebar();
  4308     }
  4620     }
  4309   }, [isInserterOpened, isListViewOpened, isHugeViewport]);
  4621   }, [isInserterOpened, isListViewOpened, isHugeViewport]);
  4310   const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
  4622   const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('List View') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
  4311   const hasSecondarySidebar = isListViewOpened || isInserterOpened;
  4623   const hasSecondarySidebar = isListViewOpened || isInserterOpened;
  4312   return (0,external_wp_element_namespaceObject.createElement)(interface_skeleton, {
  4624   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(interface_skeleton, {
  4313     labels: { ...interfaceLabels,
  4625     labels: {
       
  4626       ...interfaceLabels,
  4314       secondarySidebar: secondarySidebarLabel
  4627       secondarySidebar: secondarySidebarLabel
  4315     },
  4628     },
  4316     header: (0,external_wp_element_namespaceObject.createElement)(header, null),
  4629     header: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(header, {}),
  4317     secondarySidebar: hasSecondarySidebar && (0,external_wp_element_namespaceObject.createElement)(SecondarySidebar, null),
  4630     secondarySidebar: hasSecondarySidebar && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SecondarySidebar, {}),
  4318     sidebar: hasSidebarEnabled && (0,external_wp_element_namespaceObject.createElement)(complementary_area.Slot, {
  4631     sidebar: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area.Slot, {
  4319       scope: "core/edit-widgets"
  4632       scope: "core/edit-widgets"
  4320     }),
  4633     }),
  4321     content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(WidgetAreasBlockEditorContent, {
  4634     content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4322       blockEditorSettings: blockEditorSettings
  4635       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WidgetAreasBlockEditorContent, {
  4323     }), (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockStyles.Slot, {
  4636         blockEditorSettings: blockEditorSettings
  4324       scope: "core/block-inspector"
  4637       })
  4325     })),
  4638     }),
  4326     footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && (0,external_wp_element_namespaceObject.createElement)("div", {
  4639     footer: hasBlockBreadCrumbsEnabled && !isMobileViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
  4327       className: "edit-widgets-layout__footer"
  4640       className: "edit-widgets-layout__footer",
  4328     }, (0,external_wp_element_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockBreadcrumb, {
  4641       children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockBreadcrumb, {
  4329       rootLabelText: (0,external_wp_i18n_namespaceObject.__)('Widgets')
  4642         rootLabelText: (0,external_wp_i18n_namespaceObject.__)('Widgets')
  4330     })),
  4643       })
       
  4644     }),
  4331     shortcuts: {
  4645     shortcuts: {
  4332       previous: previousShortcut,
  4646       previous: previousShortcut,
  4333       next: nextShortcut
  4647       next: nextShortcut
  4334     }
  4648     }
  4335   });
  4649   });
  4336 }
  4650 }
  4337 
  4651 /* harmony default export */ const layout_interface = (Interface);
  4338 /* harmony default export */ var layout_interface = (Interface);
       
  4339 
  4652 
  4340 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/unsaved-changes-warning.js
  4653 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/unsaved-changes-warning.js
  4341 /**
  4654 /**
  4342  * WordPress dependencies
  4655  * WordPress dependencies
  4343  */
  4656  */
       
  4657 
  4344 
  4658 
  4345 
  4659 
  4346 
  4660 
  4347 /**
  4661 /**
  4348  * Internal dependencies
  4662  * Internal dependencies
  4353  * Warns the user if there are unsaved changes before leaving the editor.
  4667  * Warns the user if there are unsaved changes before leaving the editor.
  4354  *
  4668  *
  4355  * This is a duplicate of the component implemented in the editor package.
  4669  * This is a duplicate of the component implemented in the editor package.
  4356  * Duplicated here as edit-widgets doesn't depend on editor.
  4670  * Duplicated here as edit-widgets doesn't depend on editor.
  4357  *
  4671  *
  4358  * @return {WPComponent} The component.
  4672  * @return {Component} The component.
  4359  */
  4673  */
  4360 
       
  4361 function UnsavedChangesWarning() {
  4674 function UnsavedChangesWarning() {
  4362   const isDirty = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4675   const isDirty = (0,external_wp_data_namespaceObject.useSelect)(select => {
  4363     const {
  4676     const {
  4364       getEditedWidgetAreas
  4677       getEditedWidgetAreas
  4365     } = select(store_store);
  4678     } = select(store_store);
  4366     const editedWidgetAreas = getEditedWidgetAreas();
  4679     const editedWidgetAreas = getEditedWidgetAreas();
  4367     return (editedWidgetAreas === null || editedWidgetAreas === void 0 ? void 0 : editedWidgetAreas.length) > 0;
  4680     return editedWidgetAreas?.length > 0;
  4368   }, []);
  4681   }, []);
  4369   (0,external_wp_element_namespaceObject.useEffect)(() => {
  4682   (0,external_wp_element_namespaceObject.useEffect)(() => {
  4370     /**
  4683     /**
  4371      * Warns the user if there are unsaved changes before leaving the editor.
  4684      * Warns the user if there are unsaved changes before leaving the editor.
  4372      *
  4685      *
  4373      * @param {Event} event `beforeunload` event.
  4686      * @param {Event} event `beforeunload` event.
  4374      *
  4687      *
  4375      * @return {?string} Warning prompt message, if unsaved changes exist.
  4688      * @return {string | undefined} Warning prompt message, if unsaved changes exist.
  4376      */
  4689      */
  4377     const warnIfUnsavedChanges = event => {
  4690     const warnIfUnsavedChanges = event => {
  4378       if (isDirty) {
  4691       if (isDirty) {
  4379         event.returnValue = (0,external_wp_i18n_namespaceObject.__)('You have unsaved changes. If you proceed, they will be lost.');
  4692         event.returnValue = (0,external_wp_i18n_namespaceObject.__)('You have unsaved changes. If you proceed, they will be lost.');
  4380         return event.returnValue;
  4693         return event.returnValue;
  4381       }
  4694       }
  4382     };
  4695     };
  4383 
       
  4384     window.addEventListener('beforeunload', warnIfUnsavedChanges);
  4696     window.addEventListener('beforeunload', warnIfUnsavedChanges);
  4385     return () => {
  4697     return () => {
  4386       window.removeEventListener('beforeunload', warnIfUnsavedChanges);
  4698       window.removeEventListener('beforeunload', warnIfUnsavedChanges);
  4387     };
  4699     };
  4388   }, [isDirty]);
  4700   }, [isDirty]);
  4389   return null;
  4701   return null;
  4390 }
  4702 }
  4391 
  4703 
  4392 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/welcome-guide/index.js
  4704 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/welcome-guide/index.js
  4393 
  4705 /**
  4394 
  4706  * WordPress dependencies
  4395 /**
  4707  */
  4396  * WordPress dependencies
  4708 
  4397  */
       
  4398 
  4709 
  4399 
  4710 
  4400 
  4711 
  4401 
  4712 
  4402 
  4713 
  4403 /**
  4714 /**
  4404  * Internal dependencies
  4715  * Internal dependencies
  4405  */
  4716  */
       
  4717 
       
  4718 
  4406 
  4719 
  4407 
  4720 
  4408 function WelcomeGuide() {
  4721 function WelcomeGuide() {
  4409   var _widgetAreas$filter$l;
  4722   var _widgetAreas$filter$l;
  4410 
       
  4411   const isActive = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'welcomeGuide'), []);
  4723   const isActive = (0,external_wp_data_namespaceObject.useSelect)(select => !!select(external_wp_preferences_namespaceObject.store).get('core/edit-widgets', 'welcomeGuide'), []);
  4412   const {
  4724   const {
  4413     toggle
  4725     toggle
  4414   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
  4726   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
  4415   const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas({
  4727   const widgetAreas = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).getWidgetAreas({
  4416     per_page: -1
  4728     per_page: -1
  4417   }), []);
  4729   }), []);
  4418 
       
  4419   if (!isActive) {
  4730   if (!isActive) {
  4420     return null;
  4731     return null;
  4421   }
  4732   }
  4422 
  4733   const isEntirelyBlockWidgets = widgetAreas?.every(widgetArea => widgetArea.id === 'wp_inactive_widgets' || widgetArea.widgets.every(widgetId => widgetId.startsWith('block-')));
  4423   const isEntirelyBlockWidgets = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.every(widgetArea => widgetArea.id === 'wp_inactive_widgets' || widgetArea.widgets.every(widgetId => widgetId.startsWith('block-')));
  4734   const numWidgetAreas = (_widgetAreas$filter$l = widgetAreas?.filter(widgetArea => widgetArea.id !== 'wp_inactive_widgets').length) !== null && _widgetAreas$filter$l !== void 0 ? _widgetAreas$filter$l : 0;
  4424   const numWidgetAreas = (_widgetAreas$filter$l = widgetAreas === null || widgetAreas === void 0 ? void 0 : widgetAreas.filter(widgetArea => widgetArea.id !== 'wp_inactive_widgets').length) !== null && _widgetAreas$filter$l !== void 0 ? _widgetAreas$filter$l : 0;
  4735   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
  4425   return (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
       
  4426     className: "edit-widgets-welcome-guide",
  4736     className: "edit-widgets-welcome-guide",
  4427     contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets'),
  4737     contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets'),
  4428     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
  4738     finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
  4429     onFinish: () => toggle('core/edit-widgets', 'welcomeGuide'),
  4739     onFinish: () => toggle('core/edit-widgets', 'welcomeGuide'),
  4430     pages: [{
  4740     pages: [{
  4431       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
  4741       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
  4432         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
  4742         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
  4433         animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
  4743         animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
  4434       }),
  4744       }),
  4435       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
  4745       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4436         className: "edit-widgets-welcome-guide__heading"
  4746         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  4437       }, (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')), isEntirelyBlockWidgets ? (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("p", {
  4747           className: "edit-widgets-welcome-guide__heading",
  4438         className: "edit-widgets-welcome-guide__text"
  4748           children: (0,external_wp_i18n_namespaceObject.__)('Welcome to block Widgets')
  4439       }, (0,external_wp_i18n_namespaceObject.sprintf)( // Translators: %s: Number of block areas in the current theme.
  4749         }), isEntirelyBlockWidgets ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4440       (0,external_wp_i18n_namespaceObject._n)('Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.', 'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.', numWidgetAreas), numWidgetAreas))) : (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("p", {
  4750           children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  4441         className: "edit-widgets-welcome-guide__text"
  4751             className: "edit-widgets-welcome-guide__text",
  4442       }, (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')), (0,external_wp_element_namespaceObject.createElement)("p", {
  4752             children: (0,external_wp_i18n_namespaceObject.sprintf)(
  4443         className: "edit-widgets-welcome-guide__text"
  4753             // Translators: %s: Number of block areas in the current theme.
  4444       }, (0,external_wp_element_namespaceObject.createElement)("strong", null, (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?')), ' ', (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
  4754             (0,external_wp_i18n_namespaceObject._n)('Your theme provides %s “block” area for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.', 'Your theme provides %s different “block” areas for you to add and edit content. Try adding a search bar, social icons, or other types of blocks here and see how they’ll look on your site.', numWidgetAreas), numWidgetAreas)
  4445         href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/')
  4755           })
  4446       }, (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.')))))
  4756         }) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
       
  4757           children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
  4758             className: "edit-widgets-welcome-guide__text",
       
  4759             children: (0,external_wp_i18n_namespaceObject.__)('You can now add any block to your site’s widget areas. Don’t worry, all of your favorite widgets still work flawlessly.')
       
  4760           }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
       
  4761             className: "edit-widgets-welcome-guide__text",
       
  4762             children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("strong", {
       
  4763               children: (0,external_wp_i18n_namespaceObject.__)('Want to stick with the old widgets?')
       
  4764             }), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
  4765               href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/plugins/classic-widgets/'),
       
  4766               children: (0,external_wp_i18n_namespaceObject.__)('Get the Classic Widgets plugin.')
       
  4767             })]
       
  4768           })]
       
  4769         })]
       
  4770       })
  4447     }, {
  4771     }, {
  4448       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
  4772       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
  4449         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
  4773         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
  4450         animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
  4774         animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
  4451       }),
  4775       }),
  4452       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
  4776       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4453         className: "edit-widgets-welcome-guide__heading"
  4777         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  4454       }, (0,external_wp_i18n_namespaceObject.__)('Make each block your own')), (0,external_wp_element_namespaceObject.createElement)("p", {
  4778           className: "edit-widgets-welcome-guide__heading",
  4455         className: "edit-widgets-welcome-guide__text"
  4779           children: (0,external_wp_i18n_namespaceObject.__)('Make each block your own')
  4456       }, (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.')))
  4780         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
       
  4781           className: "edit-widgets-welcome-guide__text",
       
  4782           children: (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.')
       
  4783         })]
       
  4784       })
  4457     }, {
  4785     }, {
  4458       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
  4786       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
  4459         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
  4787         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
  4460         animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
  4788         animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
  4461       }),
  4789       }),
  4462       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
  4790       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4463         className: "edit-widgets-welcome-guide__heading"
  4791         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  4464       }, (0,external_wp_i18n_namespaceObject.__)('Get to know the block library')), (0,external_wp_element_namespaceObject.createElement)("p", {
  4792           className: "edit-widgets-welcome-guide__heading",
  4465         className: "edit-widgets-welcome-guide__text"
  4793           children: (0,external_wp_i18n_namespaceObject.__)('Get to know the block library')
  4466       }, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), {
  4794         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
  4467         InserterIconImage: (0,external_wp_element_namespaceObject.createElement)("img", {
  4795           className: "edit-widgets-welcome-guide__text",
  4468           className: "edit-widgets-welcome-guide__inserter-icon",
  4796           children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), {
  4469           alt: (0,external_wp_i18n_namespaceObject.__)('inserter'),
  4797             InserterIconImage: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
  4470           src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
  4798               className: "edit-widgets-welcome-guide__inserter-icon",
  4471         })
  4799               alt: (0,external_wp_i18n_namespaceObject.__)('inserter'),
  4472       })))
  4800               src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
       
  4801             })
       
  4802           })
       
  4803         })]
       
  4804       })
  4473     }, {
  4805     }, {
  4474       image: (0,external_wp_element_namespaceObject.createElement)(WelcomeGuideImage, {
  4806       image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
  4475         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
  4807         nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
  4476         animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
  4808         animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
  4477       }),
  4809       }),
  4478       content: (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)("h1", {
  4810       content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
  4479         className: "edit-widgets-welcome-guide__heading"
  4811         children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
  4480       }, (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor')), (0,external_wp_element_namespaceObject.createElement)("p", {
  4812           className: "edit-widgets-welcome-guide__heading",
  4481         className: "edit-widgets-welcome-guide__text"
  4813           children: (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor')
  4482       }, (0,external_wp_i18n_namespaceObject.__)('New to the block editor? Want to learn more about using it? '), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.ExternalLink, {
  4814         }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
  4483         href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/support/article/wordpress-editor/')
  4815           className: "edit-widgets-welcome-guide__text",
  4484       }, (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide."))))
  4816           children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor? Want to learn more about using it? '), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
       
  4817             href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'),
       
  4818             children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")
       
  4819           })]
       
  4820         })]
       
  4821       })
  4485     }]
  4822     }]
  4486   });
  4823   });
  4487 }
  4824 }
  4488 
  4825 function WelcomeGuideImage({
  4489 function WelcomeGuideImage(_ref) {
  4826   nonAnimatedSrc,
  4490   let {
  4827   animatedSrc
  4491     nonAnimatedSrc,
  4828 }) {
  4492     animatedSrc
  4829   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", {
  4493   } = _ref;
  4830     className: "edit-widgets-welcome-guide__image",
  4494   return (0,external_wp_element_namespaceObject.createElement)("picture", {
  4831     children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
  4495     className: "edit-widgets-welcome-guide__image"
  4832       srcSet: nonAnimatedSrc,
  4496   }, (0,external_wp_element_namespaceObject.createElement)("source", {
  4833       media: "(prefers-reduced-motion: reduce)"
  4497     srcSet: nonAnimatedSrc,
  4834     }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
  4498     media: "(prefers-reduced-motion: reduce)"
  4835       src: animatedSrc,
  4499   }), (0,external_wp_element_namespaceObject.createElement)("img", {
  4836       width: "312",
  4500     src: animatedSrc,
  4837       height: "240",
  4501     width: "312",
  4838       alt: ""
  4502     height: "240",
  4839     })]
  4503     alt: ""
  4840   });
  4504   }));
       
  4505 }
  4841 }
  4506 
  4842 
  4507 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/index.js
  4843 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/components/layout/index.js
  4508 
       
  4509 
       
  4510 /**
  4844 /**
  4511  * WordPress dependencies
  4845  * WordPress dependencies
  4512  */
  4846  */
  4513 
  4847 
  4514 
  4848 
  4524 
  4858 
  4525 
  4859 
  4526 
  4860 
  4527 
  4861 
  4528 
  4862 
  4529 function Layout(_ref) {
  4863 function Layout({
  4530   let {
  4864   blockEditorSettings
  4531     blockEditorSettings,
  4865 }) {
  4532     onError
       
  4533   } = _ref;
       
  4534   const {
  4866   const {
  4535     createErrorNotice
  4867     createErrorNotice
  4536   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
  4868   } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
  4537 
       
  4538   function onPluginAreaError(name) {
  4869   function onPluginAreaError(name) {
  4539     createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)(
  4870     createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */
  4540     /* translators: %s: plugin name */
       
  4541     (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
  4871     (0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
  4542   }
  4872   }
  4543 
  4873   return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ErrorBoundary, {
  4544   return (0,external_wp_element_namespaceObject.createElement)(ErrorBoundary, {
  4874     children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(WidgetAreasBlockEditorProvider, {
  4545     onError: onError
  4875       blockEditorSettings: blockEditorSettings,
  4546   }, (0,external_wp_element_namespaceObject.createElement)(WidgetAreasBlockEditorProvider, {
  4876       children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout_interface, {
  4547     blockEditorSettings: blockEditorSettings
  4877         blockEditorSettings: blockEditorSettings
  4548   }, (0,external_wp_element_namespaceObject.createElement)(layout_interface, {
  4878       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Sidebar, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, {
  4549     blockEditorSettings: blockEditorSettings
  4879         onError: onPluginAreaError
  4550   }), (0,external_wp_element_namespaceObject.createElement)(Sidebar, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.Popover.Slot, null), (0,external_wp_element_namespaceObject.createElement)(external_wp_plugins_namespaceObject.PluginArea, {
  4880       }), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {})]
  4551     onError: onPluginAreaError
  4881     })
  4552   }), (0,external_wp_element_namespaceObject.createElement)(UnsavedChangesWarning, null), (0,external_wp_element_namespaceObject.createElement)(WelcomeGuide, null)));
  4882   });
  4553 }
  4883 }
  4554 
  4884 /* harmony default export */ const layout = (Layout);
  4555 /* harmony default export */ var layout = (Layout);
       
  4556 
  4885 
  4557 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/index.js
  4886 ;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-widgets/build-module/index.js
  4558 
  4887 /**
  4559 
  4888  * WordPress dependencies
  4560 /**
  4889  */
  4561  * WordPress dependencies
  4890 
  4562  */
  4891 
  4563 
  4892 
  4564 
  4893 
  4565 
  4894 
  4566 
  4895 
  4567 
  4896 
  4575 
  4904 
  4576 
  4905 
  4577 
  4906 
  4578 
  4907 
  4579 const disabledBlocks = ['core/more', 'core/freeform', 'core/template-part', ...(ALLOW_REUSABLE_BLOCKS ? [] : ['core/block'])];
  4908 const disabledBlocks = ['core/more', 'core/freeform', 'core/template-part', ...(ALLOW_REUSABLE_BLOCKS ? [] : ['core/block'])];
  4580 /**
  4909 
  4581  * Reinitializes the editor after the user chooses to reboot the editor after
       
  4582  * an unhandled error occurs, replacing previously mounted editor element using
       
  4583  * an initial state from prior to the crash.
       
  4584  *
       
  4585  * @param {Element} target   DOM node in which editor is rendered.
       
  4586  * @param {?Object} settings Editor settings object.
       
  4587  */
       
  4588 
       
  4589 function reinitializeEditor(target, settings) {
       
  4590   (0,external_wp_element_namespaceObject.unmountComponentAtNode)(target);
       
  4591   const reboot = reinitializeEditor.bind(null, target, settings);
       
  4592   (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(layout, {
       
  4593     blockEditorSettings: settings,
       
  4594     onError: reboot
       
  4595   }), target);
       
  4596 }
       
  4597 /**
  4910 /**
  4598  * Initializes the block editor in the widgets screen.
  4911  * Initializes the block editor in the widgets screen.
  4599  *
  4912  *
  4600  * @param {string} id       ID of the root element to render the screen in.
  4913  * @param {string} id       ID of the root element to render the screen in.
  4601  * @param {Object} settings Block editor settings.
  4914  * @param {Object} settings Block editor settings.
  4602  */
  4915  */
  4603 
  4916 function initializeEditor(id, settings) {
  4604 function initialize(id, settings) {
       
  4605   const target = document.getElementById(id);
  4917   const target = document.getElementById(id);
  4606   const reboot = reinitializeEditor.bind(null, target, settings);
  4918   const root = (0,external_wp_element_namespaceObject.createRoot)(target);
  4607 
       
  4608   const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
  4919   const coreBlocks = (0,external_wp_blockLibrary_namespaceObject.__experimentalGetCoreBlocks)().filter(block => {
  4609     return !(disabledBlocks.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
  4920     return !(disabledBlocks.includes(block.name) || block.name.startsWith('core/post') || block.name.startsWith('core/query') || block.name.startsWith('core/site') || block.name.startsWith('core/navigation'));
  4610   });
  4921   });
  4611 
       
  4612   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-widgets', {
  4922   (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-widgets', {
  4613     fixedToolbar: false,
  4923     fixedToolbar: false,
  4614     welcomeGuide: true,
  4924     welcomeGuide: true,
  4615     showBlockBreadcrumbs: true,
  4925     showBlockBreadcrumbs: true,
  4616     themeStyles: true
  4926     themeStyles: true
  4617   });
  4927   });
  4618 
  4928   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
  4619   (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).__experimentalReapplyBlockTypeFilters();
       
  4620 
       
  4621   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
  4929   (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)(coreBlocks);
  4622   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)();
  4930   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)();
  4623 
       
  4624   if (false) {}
  4931   if (false) {}
  4625 
       
  4626   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(settings);
  4932   (0,external_wp_widgets_namespaceObject.registerLegacyWidgetVariations)(settings);
  4627   registerBlock(widget_area_namespaceObject);
  4933   registerBlock(widget_area_namespaceObject);
  4628   (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)();
  4934   (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)();
  4629 
  4935   settings.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0,external_wp_coreData_namespaceObject.__experimentalFetchLinkSuggestions)(search, searchOptions, settings);
  4630   settings.__experimentalFetchLinkSuggestions = (search, searchOptions) => (0,external_wp_coreData_namespaceObject.__experimentalFetchLinkSuggestions)(search, searchOptions, settings); // As we are unregistering `core/freeform` to avoid the Classic block, we must
  4936 
       
  4937   // As we are unregistering `core/freeform` to avoid the Classic block, we must
  4631   // replace it with something as the default freeform content handler. Failure to
  4938   // replace it with something as the default freeform content handler. Failure to
  4632   // do this will result in errors in the default block parser.
  4939   // do this will result in errors in the default block parser.
  4633   // see: https://github.com/WordPress/gutenberg/issues/33097
  4940   // see: https://github.com/WordPress/gutenberg/issues/33097
  4634 
       
  4635 
       
  4636   (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html');
  4941   (0,external_wp_blocks_namespaceObject.setFreeformContentHandlerName)('core/html');
  4637   (0,external_wp_element_namespaceObject.render)((0,external_wp_element_namespaceObject.createElement)(layout, {
  4942   root.render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout, {
  4638     blockEditorSettings: settings,
  4943     blockEditorSettings: settings
  4639     onError: reboot
  4944   }));
  4640   }), target);
  4945   return root;
  4641 }
  4946 }
       
  4947 
       
  4948 /**
       
  4949  * Compatibility export under the old `initialize` name.
       
  4950  */
       
  4951 const initialize = initializeEditor;
       
  4952 function reinitializeEditor() {
       
  4953   external_wp_deprecated_default()('wp.editWidgets.reinitializeEditor', {
       
  4954     since: '6.2',
       
  4955     version: '6.3'
       
  4956   });
       
  4957 }
       
  4958 
  4642 /**
  4959 /**
  4643  * Function to register an individual block.
  4960  * Function to register an individual block.
  4644  *
  4961  *
  4645  * @param {Object} block The block to be registered.
  4962  * @param {Object} block The block to be registered.
  4646  *
  4963  */
  4647  */
       
  4648 
       
  4649 const registerBlock = block => {
  4964 const registerBlock = block => {
  4650   if (!block) {
  4965   if (!block) {
  4651     return;
  4966     return;
  4652   }
  4967   }
  4653 
       
  4654   const {
  4968   const {
  4655     metadata,
  4969     metadata,
  4656     settings,
  4970     settings,
  4657     name
  4971     name
  4658   } = block;
  4972   } = block;
  4659 
       
  4660   if (metadata) {
  4973   if (metadata) {
  4661     (0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({
  4974     (0,external_wp_blocks_namespaceObject.unstable__bootstrapServerSideBlockDefinitions)({
  4662       [name]: metadata
  4975       [name]: metadata
  4663     });
  4976     });
  4664   }
  4977   }
  4665 
       
  4666   (0,external_wp_blocks_namespaceObject.registerBlockType)(name, settings);
  4978   (0,external_wp_blocks_namespaceObject.registerBlockType)(name, settings);
  4667 };
  4979 };
  4668 
  4980 
  4669 }();
  4981 
  4670 (window.wp = window.wp || {}).editWidgets = __webpack_exports__;
  4982 (window.wp = window.wp || {}).editWidgets = __webpack_exports__;
  4671 /******/ })()
  4983 /******/ })()
  4672 ;
  4984 ;