: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
name: 'core/editor/undo',
description: (0,external_wp_i18n_namespaceObject.__)('Undo your last changes.'),
name: 'core/editor/redo',
description: (0,external_wp_i18n_namespaceObject.__)('Redo your last undo.'),
modifier: 'primaryShift',
// Disable on Apple OS because it conflicts with the browser's
// history shortcut. It's a fine alias for both Windows and Linux.
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
// Linux, we keep it as the default for consistency.
aliases: (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? [] : [{
name: 'core/editor/toggle-list-view',
description: (0,external_wp_i18n_namespaceObject.__)('Open the List View.'),
name: 'core/editor/toggle-distraction-free',
description: (0,external_wp_i18n_namespaceObject.__)('Toggle distraction free mode.'),
modifier: 'primaryShift',
name: 'core/editor/toggle-sidebar',
description: (0,external_wp_i18n_namespaceObject.__)('Show or hide the Settings sidebar.'),
modifier: 'primaryShift',
name: 'core/editor/keyboard-shortcuts',
description: (0,external_wp_i18n_namespaceObject.__)('Display these keyboard shortcuts.'),
name: 'core/editor/next-region',
description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the next part of the editor.'),
name: 'core/editor/previous-region',
description: (0,external_wp_i18n_namespaceObject.__)('Navigate to the previous part of the editor.'),
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_blockEditor_namespaceObject.BlockEditorKeyboardShortcuts.Register, {});
/* harmony default export */ const register_shortcuts = (EditorKeyboardShortcutsRegister);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/redo.js
const redo_redo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"
/* harmony default export */ const library_redo = (redo_redo);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/undo.js
const undo_undo = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"
/* harmony default export */ const library_undo = (undo_undo);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/redo.js
function EditorHistoryRedo(props, ref) {
const shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y');
const hasRedo = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).hasEditorRedo(), []);
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo
/* translators: button label text should, if possible, be under 16 characters. */,
label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
// If there are no redo levels we don't want to actually disable this
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
"aria-disabled": !hasRedo,
onClick: hasRedo ? redo : undefined,
className: "editor-history__redo"
/** @typedef {import('react').Ref<HTMLElement>} Ref */
* Renders the redo button for the editor history.
* @param {Object} props - Props.
* @param {Ref} ref - Forwarded ref.
* @return {Component} The component to be rendered.
/* harmony default export */ const editor_history_redo = ((0,external_wp_element_namespaceObject.forwardRef)(EditorHistoryRedo));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-history/undo.js
function EditorHistoryUndo(props, ref) {
const hasUndo = (0,external_wp_data_namespaceObject.useSelect)(select => select(store_store).hasEditorUndo(), []);
} = (0,external_wp_data_namespaceObject.useDispatch)(store_store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo
/* translators: button label text should, if possible, be under 16 characters. */,
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z')
// If there are no undo levels we don't want to actually disable this
// button, because it will remove focus for keyboard users.
// See: https://github.com/WordPress/gutenberg/issues/3486
"aria-disabled": !hasUndo,
onClick: hasUndo ? undo : undefined,
className: "editor-history__undo"
/** @typedef {import('react').Ref<HTMLElement>} Ref */
* Renders the undo button for the editor history.
* @param {Object} props - Props.
* @param {Ref} ref - Forwarded ref.
* @return {Component} The component to be rendered.
/* harmony default export */ const editor_history_undo = ((0,external_wp_element_namespaceObject.forwardRef)(EditorHistoryUndo));
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/template-validation-notice/index.js
function TemplateValidationNotice() {
const [showConfirmDialog, setShowConfirmDialog] = (0,external_wp_element_namespaceObject.useState)(false);
const isValid = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(external_wp_blockEditor_namespaceObject.store).isValidTemplate();
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
className: "editor-template-validation-notice",
label: (0,external_wp_i18n_namespaceObject.__)('Keep it as is'),
onClick: () => setTemplateValidity(true)
label: (0,external_wp_i18n_namespaceObject.__)('Reset the template'),
onClick: () => setShowConfirmDialog(true)
children: (0,external_wp_i18n_namespaceObject.__)('The content of your post doesn’t match the template assigned to your post type.')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalConfirmDialog, {
isOpen: showConfirmDialog,
confirmButtonText: (0,external_wp_i18n_namespaceObject.__)('Reset'),
setShowConfirmDialog(false);
onCancel: () => setShowConfirmDialog(false),
children: (0,external_wp_i18n_namespaceObject.__)('Resetting the template may result in loss of content, do you want to continue?')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-notices/index.js
* This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible
* @return {JSX.Element} The rendered EditorNotices component.
function EditorNotices() {
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
notices: select(external_wp_notices_namespaceObject.store).getNotices()
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const dismissibleNotices = notices.filter(({
}) => isDismissible && type === 'default');
const nonDismissibleNotices = notices.filter(({
}) => !isDismissible && type === 'default');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NoticeList, {
notices: nonDismissibleNotices,
className: "components-editor-notices__pinned"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NoticeList, {
notices: dismissibleNotices,
className: "components-editor-notices__dismissible",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(TemplateValidationNotice, {})
/* harmony default export */ const editor_notices = (EditorNotices);
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/editor-snackbars/index.js
// Last three notices. Slices from the tail end of the list.
const MAX_VISIBLE_NOTICES = -3;
* Renders the editor snackbars component.
* @return {JSX.Element} The rendered component.
function EditorSnackbars() {
const notices = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_notices_namespaceObject.store).getNotices(), []);
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const snackbarNotices = notices.filter(({
}) => type === 'snackbar').slice(MAX_VISIBLE_NOTICES);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SnackbarList, {
notices: snackbarNotices,
className: "components-editor-notices__snackbar",
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-record-item.js
function EntityRecordItem({
// Handle templates that might use default descriptive titles.
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
if ('postType' !== kind || 'wp_template' !== name) {
entityRecordTitle: title,
hasPostMetaChanges: unlock(select(store_store)).hasPostMetaChanges(name, key)
const template = select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord(kind, name, key);
entityRecordTitle: select(store_store).__experimentalGetTemplateInfo(template).title,
hasPostMetaChanges: unlock(select(store_store)).hasPostMetaChanges(name, key)
}, [name, kind, title, key]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelRow, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CheckboxControl, {
__nextHasNoMarginBottom: true,
label: (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(entityRecordTitle) || (0,external_wp_i18n_namespaceObject.__)('Untitled'),
}), hasPostMetaChanges && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
className: "entities-saved-states__changes",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
children: (0,external_wp_i18n_namespaceObject.__)('Post Meta.')
;// CONCATENATED MODULE: ./node_modules/@wordpress/editor/build-module/components/entities-saved-states/entity-type-list.js
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function getEntityDescription(entity, count) {
return 1 === count ? (0,external_wp_i18n_namespaceObject.__)('This change will affect your whole site.') : (0,external_wp_i18n_namespaceObject.__)('These changes will affect your whole site.');
return (0,external_wp_i18n_namespaceObject.__)('This change will affect pages and posts that use this template.');
return (0,external_wp_i18n_namespaceObject.__)('The following has been modified.');
function GlobalStylesDescription({
user: currentEditorGlobalStyles
} = (0,external_wp_element_namespaceObject.useContext)(GlobalStylesContext);
const savedRecord = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_coreData_namespaceObject.store).getEntityRecord(record.kind, record.name, record.key), [record.kind, record.name, record.key]);
const globalStylesChanges = getGlobalStylesChanges(currentEditorGlobalStyles, savedRecord, {
return globalStylesChanges.length ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("ul", {
className: "entities-saved-states__changes",
children: globalStylesChanges.map(change => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("li", {
function EntityDescription({
if ('globalStyles' === record?.name) {
const description = getEntityDescription(record?.name, count);
return description ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.PanelRow, {
function EntityTypeList({
const count = list.length;
const firstRecord = list[0];