: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'aria-labelledby': ariaLabelledby,
const [defaultDark, defaultLight] = (0,external_wp_element_namespaceObject.useMemo)(() => getDefaultColors(colorPalette), [colorPalette]);
const isUnset = value === 'unset';
const unsetOptionLabel = (0,external_wp_i18n_namespaceObject.__)('Unset');
const unsetOption = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_circular_option_picker.Option, {
tooltipText: unsetOptionLabel,
"aria-label": unsetOptionLabel,
className: "components-duotone-picker__color-indicator",
onChange(isUnset ? undefined : 'unset');
const duotoneOptions = duotonePalette.map(({
background: getGradientFromCSSColors(colors, '135deg'),
const tooltipText = name !== null && name !== void 0 ? name : (0,external_wp_i18n_namespaceObject.sprintf)(
// translators: %s: duotone code e.g: "dark-grayscale" or "7f7f7f-ffffff".
(0,external_wp_i18n_namespaceObject.__)('Duotone code: %s'), slug);
const label = name ? (0,external_wp_i18n_namespaceObject.sprintf)(
// translators: %s: The name of the option e.g: "Dark grayscale".
(0,external_wp_i18n_namespaceObject.__)('Duotone: %s'), name) : tooltipText;
const isSelected = es6_default()(colors, value);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_circular_option_picker.Option, {
tooltipText: tooltipText,
onChange(isSelected ? undefined : colors);
} else if (ariaLabelledby) {
'aria-labelledby': ariaLabelledby
'aria-label': (0,external_wp_i18n_namespaceObject.__)('Custom color picker.')
const options = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_circular_option_picker, {
actions: !!clearable && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_circular_option_picker.ButtonAction, {
onClick: () => onChange(undefined),
children: (0,external_wp_i18n_namespaceObject.__)('Clear')
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(spacer_component, {
paddingTop: options.length === 0 ? 0 : 4,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(v_stack_component, {
children: [!disableCustomColors && !disableCustomDuotone && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomDuotoneBar, {
value: isUnset ? undefined : value,
}), !disableCustomDuotone && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(color_list_picker, {
labels: [(0,external_wp_i18n_namespaceObject.__)('Shadows'), (0,external_wp_i18n_namespaceObject.__)('Highlights')],
value: isUnset ? undefined : value,
disableCustomColors: disableCustomColors,
newColors[0] = defaultDark;
newColors[1] = defaultLight;
const newValue = newColors.length >= 2 ? newColors : undefined;
// @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,
// but it's currently typed as a string[].
// See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035
/* harmony default export */ const duotone_picker = (DuotonePicker);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/external-link/index.js
function UnforwardedExternalLink(props, ref) {
const optimizedRel = [...new Set([...rel.split(' '), 'external', 'noreferrer', 'noopener'].filter(Boolean))].join(' ');
const classes = dist_clsx('components-external-link', className);
/* Anchor links are perceived as external links.
This constant helps check for on page anchor links,
to prevent them from being opened in the editor. */
const isInternalAnchor = !!href?.startsWith('#');
const onClickHandler = event => {
/* eslint-disable react/jsx-no-target-blank */
(0,external_ReactJSXRuntime_namespaceObject.jsxs)("a", {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "components-external-link__contents",
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("span", {
className: "components-external-link__icon",
"aria-label": /* translators: accessibility text */
(0,external_wp_i18n_namespaceObject.__)('(opens in a new tab)'),
/* eslint-enable react/jsx-no-target-blank */
* Link to an external resource.
* import { ExternalLink } from '@wordpress/components';
* const MyExternalLink = () => (
* <ExternalLink href="https://wordpress.org">WordPress.org</ExternalLink>
const ExternalLink = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedExternalLink);
/* harmony default export */ const external_link = (ExternalLink);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/utils.js
const VIDEO_EXTENSIONS = ['avi', 'mpg', 'mpeg', 'mov', 'mp4', 'm4v', 'ogg', 'ogv', 'webm', 'wmv'];
* Gets the extension of a file name.
* @param filename The file name.
* @return The extension of the file name.
function getExtension(filename = '') {
const parts = filename.split('.');
return parts[parts.length - 1];
* Checks if a file is a video.
* @param filename The file name.
* @return Whether the file is a video.
function isVideoType(filename = '') {
return filename.startsWith('data:video/') || VIDEO_EXTENSIONS.includes(getExtension(filename));
* Transforms a fraction value to a percentage value.
* @param fraction The fraction value.
* @return A percentage value.
function fractionToPercentage(fraction) {
return Math.round(fraction * 100);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/styles/focal-point-picker-style.js
function focal_point_picker_style_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
const MediaWrapper = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
styles: "background-color:transparent;display:flex;text-align:center;width:100%"
const MediaContainer = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("align-items:center;border-radius:", config_values.radiusBlockUi, ";cursor:pointer;display:inline-flex;justify-content:center;margin:auto;position:relative;height:100%;&:after{border-radius:inherit;bottom:0;box-shadow:inset 0 0 0 1px rgba( 0, 0, 0, 0.1 );content:'';left:0;pointer-events:none;position:absolute;right:0;top:0;}img,video{border-radius:inherit;box-sizing:border-box;display:block;height:auto;margin:0;max-height:100%;max-width:100%;pointer-events:none;user-select:none;width:auto;}" + ( true ? "" : 0));
const MediaPlaceholder = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("background:", COLORS.gray[100], ";border-radius:inherit;box-sizing:border-box;height:", INITIAL_BOUNDS.height, "px;max-width:280px;min-width:", INITIAL_BOUNDS.width, "px;width:100%;" + ( true ? "" : 0));
const focal_point_picker_style_StyledUnitControl = /*#__PURE__*/emotion_styled_base_browser_esm(unit_control, true ? {
var focal_point_picker_style_ref2 = true ? {
styles: "padding-bottom:1em"
const deprecatedBottomMargin = ({
return !__nextHasNoMarginBottom ? focal_point_picker_style_ref2 : undefined;
var focal_point_picker_style_ref = true ? {
styles: "padding-bottom:1em"
const extraHelpTextMargin = ({
return hasHelpText ? focal_point_picker_style_ref : undefined;
const ControlWrapper = /*#__PURE__*/emotion_styled_base_browser_esm(flex_component, true ? {
} : 0)("max-width:320px;padding-top:1em;", extraHelpTextMargin, " ", deprecatedBottomMargin, ";" + ( true ? "" : 0));
const GridView = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("left:50%;overflow:hidden;pointer-events:none;position:absolute;top:50%;transform:translate3d( -50%, -50%, 0 );z-index:1;@media not ( prefers-reduced-motion ){transition:opacity 100ms linear;}opacity:", ({
}) => showOverlay ? 1 : 0, ";" + ( true ? "" : 0));
const GridLine = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
styles: "background:rgba( 255, 255, 255, 0.4 );backdrop-filter:blur( 16px ) saturate( 180% );position:absolute;transform:translateZ( 0 )"
const GridLineX = /*#__PURE__*/emotion_styled_base_browser_esm(GridLine, true ? {
styles: "height:1px;left:1px;right:1px"
const GridLineY = /*#__PURE__*/emotion_styled_base_browser_esm(GridLine, true ? {
styles: "width:1px;top:1px;bottom:1px"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/controls.js
const TEXTCONTROL_MIN = 0;
const TEXTCONTROL_MAX = 100;
const controls_noop = () => {};
function FocalPointPickerControls({
onChange = controls_noop,
const valueX = fractionToPercentage(point.x);
const valueY = fractionToPercentage(point.y);
const handleChange = (value, axis) => {
if (value === undefined) {
const num = parseInt(value, 10);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ControlWrapper, {
className: "focal-point-picker__controls",
__nextHasNoMarginBottom: __nextHasNoMarginBottom,
hasHelpText: hasHelpText,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FocalPointUnitControl, {
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Left'),
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Focal point left position'),
value: [valueX, '%'].join(''),
onChange: next => handleChange(next, 'x'),
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FocalPointUnitControl, {
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Top'),
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Focal point top position'),
value: [valueY, '%'].join(''),
onChange: next => handleChange(next, 'y'),
function FocalPointUnitControl(props) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(focal_point_picker_style_StyledUnitControl, {
className: "focal-point-picker__controls-position-unit-control",
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/styles/focal-point-style.js
const PointerCircle = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)("background-color:transparent;cursor:grab;height:40px;margin:-20px 0 0 -20px;position:absolute;user-select:none;width:40px;will-change:transform;z-index:10000;background:rgba( 255, 255, 255, 0.4 );border:1px solid rgba( 255, 255, 255, 0.4 );border-radius:50%;backdrop-filter:blur( 16px ) saturate( 180% );box-shadow:rgb( 0 0 0 / 10% ) 0px 0px 8px;@media not ( prefers-reduced-motion ){transition:transform 100ms linear;}", ({
box-shadow: rgb( 0 0 0 / 12% ) 0px 0px 10px;
`, ";" + ( true ? "" : 0));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/focal-point.js
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PointerCircle, {
className: "components-focal-point-picker__icon_container",
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/grid.js
function FocalPointPickerGrid({
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(GridView, {
className: "components-focal-point-picker__grid",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GridLineX, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GridLineX, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GridLineY, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(GridLineY, {
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/focal-point-picker/media.js
// Exposing muted prop for test rendering purposes
// https://github.com/testing-library/react-testing-library/issues/470
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MediaPlaceholder, {
className: "components-focal-point-picker__media components-focal-point-picker__media--placeholder",
const isVideo = isVideoType(src);
return isVideo ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("video", {
className: "components-focal-point-picker__media components-focal-point-picker__media--video",