: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
children: (0,external_wp_i18n_namespaceObject.__)('Use featured image')
const renderMediaUploadChecked = () => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
children: (0,external_wp_i18n_namespaceObject.__)('Media Library')
const libraryButton = mediaLibraryButton !== null && mediaLibraryButton !== void 0 ? mediaLibraryButton : defaultButton;
const uploadMediaLibraryButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(media_upload, {
addToGallery: addToGallery,
gallery: multiple && onlyAllowsImages(),
allowedTypes: allowedTypes,
value: Array.isArray(value) ? value.map(({
if (mediaUpload && isAppender) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [renderDropZone(), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormFileUpload, {
const content = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: dist_clsx('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button'),
children: (0,external_wp_i18n_namespaceObject.__)('Upload')
}), uploadMediaLibraryButton, renderUrlSelectionUI(), renderFeaturedImageToggle(), renderCancelLink()]
return renderPlaceholder(content);
const content = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [renderDropZone(), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FormFileUpload, {
className: dist_clsx('block-editor-media-placeholder__button', 'block-editor-media-placeholder__upload-button'),
children: (0,external_wp_i18n_namespaceObject.__)('Upload')
}), uploadMediaLibraryButton, renderUrlSelectionUI(), renderFeaturedImageToggle(), renderCancelLink()]
return renderPlaceholder(content);
return renderPlaceholder(uploadMediaLibraryButton);
if (disableMediaButtons) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(check, {
children: renderDropZone()
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(check, {
fallback: renderPlaceholder(renderUrlSelectionUI()),
children: renderMediaUploadChecked()
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-placeholder/README.md
/* harmony default export */ const media_placeholder = ((0,external_wp_components_namespaceObject.withFilters)('editor.MediaPlaceholder')(MediaPlaceholder));
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/panel-color-settings/index.js
const PanelColorSettings = ({
const settings = colorSettings.map(setting => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(panel_color_gradient_settings, {
disableCustomGradients: true,
/* harmony default export */ const panel_color_settings = (PanelColorSettings);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar/index.js
const format_toolbar_POPOVER_PROPS = {
placement: 'bottom-start'
const FormatToolbar = () => {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [['bold', 'italic', 'link', 'unknown'].map(format => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
name: `RichText.ToolbarControls.${format}`
}, format)), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
name: "RichText.ToolbarControls",
const allProps = fills.map(([{
const hasActive = allProps.some(({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarItem, {
children: toggleProps => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.DropdownMenu, {
/* translators: button label text should, if possible, be under 16 characters. */,
label: (0,external_wp_i18n_namespaceObject.__)('More'),
className: dist_clsx(toggleProps.className, {
describedBy: (0,external_wp_i18n_namespaceObject.__)('Displays more block tools')
controls: orderBy(fills.map(([{
popoverProps: format_toolbar_POPOVER_PROPS
/* harmony default export */ const format_toolbar = (FormatToolbar);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/format-toolbar-container.js
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Popover, {
className: "block-editor-rich-text__inline-format-toolbar",
__unstableSlotName: "block-toolbar",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NavigableToolbar, {
className: "block-editor-rich-text__inline-format-toolbar-group"
/* translators: accessibility text for the inline format toolbar */,
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Format tools'),
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarGroup, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(format_toolbar, {})
const FormatToolbarContainer = ({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InlineToolbar, {
popoverAnchor: editableContentElement
// Render regular toolbar.
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(block_controls, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(format_toolbar, {})
/* harmony default export */ const format_toolbar_container = (FormatToolbarContainer);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-mark-persistent.js
function useMarkPersistent({
const previousText = (0,external_wp_element_namespaceObject.useRef)();
const hasActiveFormats = !!value.activeFormats?.length;
__unstableMarkLastChangeAsPersistent
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
// Must be set synchronously to make sure it applies to the last change.
(0,external_wp_element_namespaceObject.useLayoutEffect)(() => {
if (!previousText.current) {
previousText.current = value.text;
// Text input, so don't create an undo level for every character.
// Create an undo level after 1 second of no input.
if (previousText.current !== value.text) {
const timeout = window.setTimeout(() => {
__unstableMarkLastChangeAsPersistent();
previousText.current = value.text;
window.clearTimeout(timeout);
__unstableMarkLastChangeAsPersistent();
}, [html, hasActiveFormats]);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/use-format-types.js
function formatTypesSelector(select) {
return select(external_wp_richText_namespaceObject.store).getFormatTypes();
* Set of all interactive content tags.
* @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content
const interactiveContentTags = new Set(['a', 'audio', 'button', 'details', 'embed', 'iframe', 'input', 'label', 'select', 'textarea', 'video']);
function prefixSelectKeys(selected, prefix) {
if (typeof selected !== 'object') {
return Object.fromEntries(Object.entries(selected).map(([key, value]) => [`${prefix}.${key}`, value]));
function getPrefixedSelectKeys(selected, prefix) {
return Object.keys(selected).filter(key => key.startsWith(prefix + '.')).reduce((accumulator, key) => {
accumulator[key.slice(prefix.length + 1)] = selected[key];
* This hook provides RichText with the `formatTypes` and its derived props from
* experimental format type settings.
* @param {Object} $0 Options
* @param {string} $0.clientId Block client ID.
* @param {string} $0.identifier Block attribute.
* @param {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formattings or not.
* @param {Array} $0.allowedFormats Allowed formats
function useFormatTypes({
withoutInteractiveFormatting,
const allFormatTypes = (0,external_wp_data_namespaceObject.useSelect)(formatTypesSelector, []);
const formatTypes = (0,external_wp_element_namespaceObject.useMemo)(() => {
return allFormatTypes.filter(({
if (allowedFormats && !allowedFormats.includes(name)) {
if (withoutInteractiveFormatting && (interactive || interactiveContentTags.has(tagName))) {
}, [allFormatTypes, allowedFormats, withoutInteractiveFormatting]);
const keyedSelected = (0,external_wp_data_namespaceObject.useSelect)(select => formatTypes.reduce((accumulator, type) => {
if (!type.__experimentalGetPropsForEditableTreePreparation) {
...prefixSelectKeys(type.__experimentalGetPropsForEditableTreePreparation(select, {
richTextIdentifier: identifier,
}, {}), [formatTypes, clientId, identifier]);
const dispatch = (0,external_wp_data_namespaceObject.useDispatch)();
const prepareHandlers = [];
const valueHandlers = [];
const changeHandlers = [];
for (const key in keyedSelected) {
dependencies.push(keyedSelected[key]);
formatTypes.forEach(type => {
if (type.__experimentalCreatePrepareEditableTree) {
const handler = type.__experimentalCreatePrepareEditableTree(getPrefixedSelectKeys(keyedSelected, type.name), {
richTextIdentifier: identifier,
if (type.__experimentalCreateOnChangeEditableValue) {
valueHandlers.push(handler);
prepareHandlers.push(handler);
if (type.__experimentalCreateOnChangeEditableValue) {
if (type.__experimentalGetPropsForEditableTreeChangeHandler) {
dispatchers = type.__experimentalGetPropsForEditableTreeChangeHandler(dispatch, {
richTextIdentifier: identifier,
const selected = getPrefixedSelectKeys(keyedSelected, type.name);
changeHandlers.push(type.__experimentalCreateOnChangeEditableValue({
...(typeof selected === 'object' ? selected : {}),
richTextIdentifier: identifier,
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/event-listeners/before-input-rules.js
* When typing over a selection, the selection will we wrapped by a matching
* character pair. The second character is optional, it defaults to the first
* @type {string[]} Array of character pairs.
const wrapSelectionSettings = ['`', '"', "'", '“”', '‘’'];
/* harmony default export */ const before_input_rules = (props => element => {
function onInput(event) {
// Only run the rules when inserting text.
if (inputType !== 'insertText') {
if ((0,external_wp_richText_namespaceObject.isCollapsed)(value)) {
const pair = (0,external_wp_hooks_namespaceObject.applyFilters)('blockEditor.wrapSelectionSettings', wrapSelectionSettings).find(([startChar, endChar]) => startChar === data || endChar === data);
const [startChar, endChar = startChar] = pair;
const start = value.start;
const end = value.end + startChar.length;
let newValue = (0,external_wp_richText_namespaceObject.insert)(value, startChar, start, start);
newValue = (0,external_wp_richText_namespaceObject.insert)(newValue, endChar, end, end);
__unstableMarkLastChangeAsPersistent,
__unstableMarkAutomaticChange
} = registry.dispatch(store);
__unstableMarkLastChangeAsPersistent();
__unstableMarkAutomaticChange();
for (const key in event) {
const newEvent = new defaultView.InputEvent('input', init);
// Dispatch an `input` event with the new data. This will trigger the
// Postpone the `input` to the next event loop tick so that the dispatch
// doesn't happen synchronously in the middle of `beforeinput` dispatch.
// This is closer to how native `input` event would be timed, and also
// makes sure that the `input` event is dispatched only after the `onChange`
// call few lines above has fully updated the data store state and rerendered
// all affected components.
window.queueMicrotask(() => {
event.target.dispatchEvent(newEvent);
element.addEventListener('beforeinput', onInput);
element.removeEventListener('beforeinput', onInput);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/prevent-event-discovery.js
function preventEventDiscovery(value) {
const searchText = 'tales of gutenberg';
const addText = ' 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️';