: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
// Return early if there's no item.
scope = normalizeComplementaryAreaScope(scope);
item = normalizeComplementaryAreaName(scope, item);
const pinnedItems = registry.select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, 'pinnedItems', {
* Returns an action object used in signalling that a feature should be toggled.
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {string} featureName The feature name.
function toggleFeature(scope, featureName) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).toggleFeature`, {
alternative: `dispatch( 'core/preferences' ).toggle`
registry.dispatch(external_wp_preferences_namespaceObject.store).toggle(scope, featureName);
* Returns an action object used in signalling that a feature should be set to
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {string} featureName The feature name.
* @param {boolean} value The value to set.
* @return {Object} Action object.
function setFeatureValue(scope, featureName, value) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureValue`, {
alternative: `dispatch( 'core/preferences' ).set`
registry.dispatch(external_wp_preferences_namespaceObject.store).set(scope, featureName, !!value);
* Returns an action object used in signalling that defaults should be set for features.
* @param {string} scope The feature scope (e.g. core/edit-post).
* @param {Object<string, boolean>} defaults A key/value map of feature names to values.
* @return {Object} Action object.
function setFeatureDefaults(scope, defaults) {
external_wp_deprecated_default()(`dispatch( 'core/interface' ).setFeatureDefaults`, {
alternative: `dispatch( 'core/preferences' ).setDefaults`
registry.dispatch(external_wp_preferences_namespaceObject.store).setDefaults(scope, defaults);
* Returns an action object used in signalling that the user opened a modal.
* @param {string} name A string that uniquely identifies the modal.
* @return {Object} Action object.
function openModal(name) {
* Returns an action object signalling that the user closed a modal.
* @return {Object} Action object.
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/selectors.js
* Returns the complementary area that is active in a given scope.
* @param {Object} state Global application state.
* @param {string} scope Item scope.
* @return {string | null | undefined} The complementary area that is active in the given scope.
const getActiveComplementaryArea = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
scope = normalizeComplementaryAreaScope(scope);
const isComplementaryAreaVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
// Return `undefined` to indicate that the user has never toggled
// visibility, this is the vanilla default. Other code relies on this
// nuance in the return value.
if (isComplementaryAreaVisible === undefined) {
// Return `null` to indicate the user hid the complementary area.
if (isComplementaryAreaVisible === false) {
return state?.complementaryAreas?.[scope];
const isComplementaryAreaLoading = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope) => {
scope = normalizeComplementaryAreaScope(scope);
const isVisible = select(external_wp_preferences_namespaceObject.store).get(scope, 'isComplementaryAreaVisible');
const identifier = state?.complementaryAreas?.[scope];
return isVisible && identifier === undefined;
* Returns a boolean indicating if an item is pinned or not.
* @param {Object} state Global application state.
* @param {string} scope Scope.
* @param {string} item Item to check.
* @return {boolean} True if the item is pinned and false otherwise.
const isItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, item) => {
scope = normalizeComplementaryAreaScope(scope);
item = normalizeComplementaryAreaName(scope, item);
const pinnedItems = select(external_wp_preferences_namespaceObject.store).get(scope, 'pinnedItems');
return (_pinnedItems$item = pinnedItems?.[item]) !== null && _pinnedItems$item !== void 0 ? _pinnedItems$item : true;
* Returns a boolean indicating whether a feature is active for a particular
* @param {Object} state The store state.
* @param {string} scope The scope of the feature (e.g. core/edit-post).
* @param {string} featureName The name of the feature.
* @return {boolean} Is the feature enabled?
const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, scope, featureName) => {
external_wp_deprecated_default()(`select( 'core/interface' ).isFeatureActive( scope, featureName )`, {
alternative: `select( 'core/preferences' ).get( scope, featureName )`
return !!select(external_wp_preferences_namespaceObject.store).get(scope, featureName);
* Returns true if a modal is active, or false otherwise.
* @param {Object} state Global application state.
* @param {string} modalName A string that uniquely identifies the modal.
* @return {boolean} Whether the modal is active.
function isModalActive(state, modalName) {
return state.activeModal === modalName;
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/reducer.js
function complementaryAreas(state = {}, action) {
case 'SET_DEFAULT_COMPLEMENTARY_AREA':
// If there's already an area, don't overwrite it.
case 'ENABLE_COMPLEMENTARY_AREA':
* Reducer for storing the name of the open modal, or null if no modal is open.
* @param {Object} state Previous state.
* @param {Object} action Action object containing the `name` of the modal
* @return {Object} Updated state
function activeModal(state = null, action) {
/* harmony default export */ const store_reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/constants.js
* The identifier for the data store.
const STORE_NAME = 'core/interface';
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/store/index.js
* Store definition for the interface namespace.
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
actions: actions_namespaceObject,
selectors: selectors_namespaceObject
// Once we build a more generic persistence plugin that works across types of stores
// we'd be able to replace this with a register call.
(0,external_wp_data_namespaceObject.register)(store);
;// CONCATENATED MODULE: external ["wp","plugins"]
const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-context/index.js
/* harmony default export */ const complementary_area_context = ((0,external_wp_plugins_namespaceObject.withPluginContext)((context, ownProps) => {
icon: ownProps.icon || context.icon,
identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-toggle/index.js
function ComplementaryAreaToggle({
as = external_wp_components_namespaceObject.Button,
const ComponentToUse = as;
const isSelected = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).getActiveComplementaryArea(scope) === identifier, [identifier, scope]);
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ComponentToUse, {
icon: selectedIcon && isSelected ? selectedIcon : icon,
"aria-controls": identifier.replace('/', ':'),
disableComplementaryArea(scope);
enableComplementaryArea(scope, identifier);
/* harmony default export */ const complementary_area_toggle = (complementary_area_context(ComplementaryAreaToggle));
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-header/index.js
const ComplementaryAreaHeader = ({
const toggleButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "components-panel__header interface-complementary-area-header__small",
children: [smallScreenTitle && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", {
className: "interface-complementary-area-header__small-title",
children: smallScreenTitle
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: dist_clsx('components-panel__header', 'interface-complementary-area-header', className),
children: [children, toggleButton]
/* harmony default export */ const complementary_area_header = (ComplementaryAreaHeader);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/action-item/index.js
function ActionItemSlot({
as: Component = external_wp_components_namespaceObject.ButtonGroup,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Slot, {
bubblesVirtually: bubblesVirtually,
if (!external_wp_element_namespaceObject.Children.toArray(fills).length) {
// Special handling exists for backward compatibility.
// It ensures that menu items created by plugin authors aren't
// duplicated with automatically injected menu items coming
// from pinnable plugin sidebars.
// @see https://github.com/WordPress/gutenberg/issues/14457
const initializedByPlugins = [];
external_wp_element_namespaceObject.Children.forEach(fills, ({
__unstableExplicitMenuItem,
if (__unstableTarget && __unstableExplicitMenuItem) {
initializedByPlugins.push(__unstableTarget);
const children = external_wp_element_namespaceObject.Children.map(fills, child => {
if (!child.props.__unstableExplicitMenuItem && initializedByPlugins.includes(child.props.__unstableTarget)) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
as: Component = external_wp_components_namespaceObject.Button,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {
onClick: onClick || fpOnClick ? (...args) => {
(onClick || noop)(...args);
(fpOnClick || noop)(...args);
ActionItem.Slot = ActionItemSlot;
/* harmony default export */ const action_item = (ActionItem);
;// CONCATENATED MODULE: ./node_modules/@wordpress/interface/build-module/components/complementary-area-more-menu-item/index.js
const PluginsMenuItem = ({
// Menu item is marked with unstable prop for backward compatibility.
// They are removed so they don't leak to DOM elements.
// @see https://github.com/WordPress/gutenberg/issues/14457
__unstableExplicitMenuItem,
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
function ComplementaryAreaMoreMenuItem({
__unstableExplicitMenuItem,
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(complementary_area_toggle, {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(action_item, {