: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const arrowDown = /*#__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: "m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"
/* harmony default export */ const arrow_down = (arrowDown);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/layouts/definitions.js
// Layout definitions keyed by layout type.
// Provides a common definition of slugs, classnames, base styles, and spacing styles for each layout type.
// If making changes or additions to layout definitions, be sure to update the corresponding PHP definitions in
// `block-supports/layout.php` so that the server-side and client-side definitions match.
const LAYOUT_DEFINITIONS = {
className: 'is-layout-flow',
selector: ' > .alignleft',
'margin-inline-start': '0',
'margin-inline-end': '2em'
selector: ' > .alignright',
'margin-inline-start': '2em',
selector: ' > .aligncenter',
'margin-left': 'auto !important',
'margin-right': 'auto !important'
selector: ' > :first-child',
'margin-block-start': '0'
selector: ' > :last-child',
'margin-block-start': null,
className: 'is-layout-constrained',
selector: ' > .alignleft',
'margin-inline-start': '0',
'margin-inline-end': '2em'
selector: ' > .alignright',
'margin-inline-start': '2em',
selector: ' > .aligncenter',
'margin-left': 'auto !important',
'margin-right': 'auto !important'
selector: ' > :where(:not(.alignleft):not(.alignright):not(.alignfull))',
'max-width': 'var(--wp--style--global--content-size)',
'margin-left': 'auto !important',
'margin-right': 'auto !important'
selector: ' > .alignwide',
'max-width': 'var(--wp--style--global--wide-size)'
selector: ' > :first-child',
'margin-block-start': '0'
selector: ' > :last-child',
'margin-block-start': null,
className: 'is-layout-flex',
selector: ' > :is(*, div)',
// :is(*, div) instead of just * increases the specificity by 001.
className: 'is-layout-grid',
selector: ' > :is(*, div)',
// :is(*, div) instead of just * increases the specificity by 001.
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/layouts/utils.js
* Utility to generate the proper CSS selector for layout styles.
* @param {string} selectors CSS selector, also supports multiple comma-separated selectors.
* @param {string} append The string to append.
* @return {string} - CSS selector.
function appendSelectors(selectors, append = '') {
// Ideally we shouldn't need the `.editor-styles-wrapper` increased specificity here
// The problem though is that we have a `.editor-styles-wrapper p { margin: reset; }` style
// it's used to reset the default margin added by wp-admin to paragraphs
// so we need this to be higher speficity otherwise, it won't be applied to paragraphs inside containers
// When the post editor is fully iframed, this extra classname could be removed.
return selectors.split(',').map(subselector => `.editor-styles-wrapper ${subselector}${append ? ` ${append}` : ''}`).join(',');
* Get generated blockGap CSS rules based on layout definitions provided in theme.json
* Falsy values in the layout definition's spacingStyles rules will be swapped out
* with the provided `blockGapValue`.
* @param {string} selector The CSS selector to target for the generated rules.
* @param {Object} layoutDefinitions Layout definitions object.
* @param {string} layoutType The layout type (e.g. `default` or `flex`).
* @param {string} blockGapValue The current blockGap value to be applied.
* @return {string} The generated CSS rules.
function getBlockGapCSS(selector, layoutDefinitions = LAYOUT_DEFINITIONS, layoutType, blockGapValue) {
if (layoutDefinitions?.[layoutType]?.spacingStyles?.length && blockGapValue) {
layoutDefinitions[layoutType].spacingStyles.forEach(gapStyle => {
output += `${appendSelectors(selector, gapStyle.selector.trim())} { `;
output += Object.entries(gapStyle.rules).map(([cssProperty, value]) => `${cssProperty}: ${value ? value : blockGapValue}`).join('; ');
* Helper method to assign contextual info to clarify
* Besides checking if `contentSize` and `wideSize` have a
* value, we now show this information only if their values
* are not a `css var`. This needs to change when parsing
* @see https://github.com/WordPress/gutenberg/pull/34710#issuecomment-918000752
* @param {Object} layout The layout object.
* @return {Object} An object with contextual info per alignment.
function getAlignmentsInfo(layout) {
const alignmentInfo = {};
const sizeRegex = /^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;
if (sizeRegex.test(contentSize) && type === 'constrained') {
// translators: %s: container size (i.e. 600px etc)
alignmentInfo.none = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Max %s wide'), contentSize);
if (sizeRegex.test(wideSize)) {
// translators: %s: container size (i.e. 600px etc)
alignmentInfo.wide = (0,external_wp_i18n_namespaceObject.sprintf)((0,external_wp_i18n_namespaceObject.__)('Max %s wide'), wideSize);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-all.js
const sidesAll = /*#__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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"
/* harmony default export */ const sides_all = (sidesAll);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-horizontal.js
const sidesHorizontal = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
/* harmony default export */ const sides_horizontal = (sidesHorizontal);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-vertical.js
const sidesVertical = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "m7.5 19.5h9v-1.5h-9z"
/* harmony default export */ const sides_vertical = (sidesVertical);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-top.js
const sidesTop = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
/* harmony default export */ const sides_top = (sidesTop);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-right.js
const sidesRight = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
/* harmony default export */ const sides_right = (sidesRight);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-bottom.js
const sidesBottom = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "m16.5 19.5h-9v-1.5h9z",
/* harmony default export */ const sides_bottom = (sidesBottom);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/sides-left.js
const sidesLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(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: "m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
/* harmony default export */ const sides_left = (sidesLeft);
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/spacing-sizes-control/utils.js
const RANGE_CONTROL_MAX_SIZE = 8;
const ALL_SIDES = ['top', 'right', 'bottom', 'left'];
horizontal: sides_horizontal,
vertical: sides_vertical,
default: (0,external_wp_i18n_namespaceObject.__)('Spacing control'),
top: (0,external_wp_i18n_namespaceObject.__)('Top'),
bottom: (0,external_wp_i18n_namespaceObject.__)('Bottom'),
left: (0,external_wp_i18n_namespaceObject.__)('Left'),
right: (0,external_wp_i18n_namespaceObject.__)('Right'),
mixed: (0,external_wp_i18n_namespaceObject.__)('Mixed'),
vertical: (0,external_wp_i18n_namespaceObject.__)('Vertical'),
horizontal: (0,external_wp_i18n_namespaceObject.__)('Horizontal'),
axial: (0,external_wp_i18n_namespaceObject.__)('Horizontal & vertical'),
custom: (0,external_wp_i18n_namespaceObject.__)('Custom')
* Checks is given value is a spacing preset.
* @param {string} value Value to check
* @return {boolean} Return true if value is string in format var:preset|spacing|.
function isValueSpacingPreset(value) {
return value === '0' || value.includes('var:preset|spacing|');
* Converts a spacing preset into a custom value.
* @param {string} value Value to convert
* @param {Array} spacingSizes Array of the current spacing preset objects
* @return {string} Mapping of the spacing preset to its equivalent custom value.
function getCustomValueFromPreset(value, spacingSizes) {
if (!isValueSpacingPreset(value)) {
const slug = getSpacingPresetSlug(value);
const spacingSize = spacingSizes.find(size => String(size.slug) === slug);
return spacingSize?.size;
* Converts a custom value to preset value if one can be found.
* Returns value as-is if no match is found.
* @param {string} value Value to convert
* @param {Array} spacingSizes Array of the current spacing preset objects
* @return {string} The preset value if it can be found.
function getPresetValueFromCustomValue(value, spacingSizes) {
// Return value as-is if it is undefined or is already a preset, or '0';
if (!value || isValueSpacingPreset(value) || value === '0') {
const spacingMatch = spacingSizes.find(size => String(size.size) === String(value));
if (spacingMatch?.slug) {
return `var:preset|spacing|${spacingMatch.slug}`;
* Converts a spacing preset into a custom value.
* @param {string} value Value to convert.
* @return {string | undefined} CSS var string for given spacing preset value.