: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @returns {observable} A minimal observable of state changes.
* For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable
var outerSubscribe = subscribe;
* The minimal observable subscription method.
* @param {Object} observer Any object that can be used as an observer.
* The observer object should have a `next` method.
* @returns {subscription} An object with an `unsubscribe` method that can
* be used to unsubscribe the observable from the store, and prevent further
* emission of values from the observable.
subscribe: function subscribe(observer) {
if (typeof observer !== 'object' || observer === null) {
throw new Error( true ? formatProdErrorMessage(11) : 0);
function observeState() {
observer.next(getState());
var unsubscribe = outerSubscribe(observeState);
}, _ref[$$observable] = function () {
} // When a store is created, an "INIT" action is dispatched so that every
// reducer returns their initial state. This effectively populates
// the initial state tree.
replaceReducer: replaceReducer
}, _ref2[$$observable] = observable, _ref2;
* Creates a Redux store that holds the state tree.
* **We recommend using `configureStore` from the
* `@reduxjs/toolkit` package**, which replaces `createStore`:
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
* The only way to change the data in the store is to call `dispatch()` on it.
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
* @param {any} [preloadedState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`.
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
var legacy_createStore = (/* unused pure expression or super */ null && (createStore));
* Prints a warning in the console if it exists.
* @param {String} message The warning message.
function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
/* eslint-enable no-console */
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error(message);
} catch (e) {} // eslint-disable-line no-empty
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
var reducerKeys = Object.keys(reducers);
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
if (!isPlainObject(inputState)) {
return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
unexpectedKeys.forEach(function (key) {
unexpectedKeyCache[key] = true;
if (action && action.type === ActionTypes.REPLACE) return;
if (unexpectedKeys.length > 0) {
return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
function assertReducerShape(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, {
if (typeof initialState === 'undefined') {
throw new Error( true ? formatProdErrorMessage(12) : 0);
if (typeof reducer(undefined, {
type: ActionTypes.PROBE_UNKNOWN_ACTION()
throw new Error( true ? formatProdErrorMessage(13) : 0);
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* @param {Object} reducers An object whose values correspond to different
* reducer functions that need to be combined into one. One handy way to obtain
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
* undefined for any action. Instead, they should return their initial state
* if the state passed to them was undefined, and the current state for any
* @returns {Function} A reducer function that invokes every reducer inside the
* passed object, and builds a state object with the same shape.
function combineReducers(reducers) {
var reducerKeys = Object.keys(reducers);
for (var i = 0; i < reducerKeys.length; i++) {
var key = reducerKeys[i];
if (typeof reducers[key] === 'function') {
finalReducers[key] = reducers[key];
var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
assertReducerShape(finalReducers);
return function combination(state, action) {
if (shapeAssertionError) {
throw shapeAssertionError;
if (false) { var warningMessage; }
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
var _key = finalReducerKeys[_i];
var reducer = finalReducers[_key];
var previousStateForKey = state[_key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var actionType = action && action.type;
throw new Error( true ? formatProdErrorMessage(14) : 0);
nextState[_key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
return hasChanged ? nextState : state;
function bindActionCreator(actionCreator, dispatch) {
return dispatch(actionCreator.apply(this, arguments));
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
* For convenience, you can also pass an action creator as the first argument,
* and get a dispatch wrapped function in return.
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
* syntax. You may also pass a single function.
* @param {Function} dispatch The `dispatch` function available on your Redux
* @returns {Function|Object} The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
if (typeof actionCreators !== 'object' || actionCreators === null) {
throw new Error( true ? formatProdErrorMessage(16) : 0);
var boundActionCreators = {};
for (var key in actionCreators) {
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
return boundActionCreators;
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
* @param {...Function} funcs The functions to compose.
* @returns {Function} A function obtained by composing the argument functions
* from right to left. For example, compose(f, g, h) is identical to doing
* (...args) => f(g(h(...args))).
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
funcs[_key] = arguments[_key];
if (funcs.length === 0) {
if (funcs.length === 1) {
return funcs.reduce(function (a, b) {
return a(b.apply(void 0, arguments));
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
* See `redux-thunk` package as an example of the Redux middleware.
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
* Note that each middleware will be given the `dispatch` and `getState` functions
* @param {...Function} middlewares The middleware chain to be applied.
* @returns {Function} A store enhancer applying the middleware.
function applyMiddleware() {
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
return function (createStore) {
var store = createStore.apply(void 0, arguments);
var _dispatch = function dispatch() {
throw new Error( true ? formatProdErrorMessage(15) : 0);
getState: store.getState,
dispatch: function dispatch() {
return _dispatch.apply(void 0, arguments);
var chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
_dispatch = compose.apply(void 0, chain)(store.dispatch);
return _objectSpread2(_objectSpread2({}, store), {}, {
// EXTERNAL MODULE: ./node_modules/equivalent-key-map/equivalent-key-map.js
var equivalent_key_map = __webpack_require__(3249);
var equivalent_key_map_default = /*#__PURE__*/__webpack_require__.n(equivalent_key_map);
;// CONCATENATED MODULE: external ["wp","reduxRoutine"]
const external_wp_reduxRoutine_namespaceObject = window["wp"]["reduxRoutine"];
var external_wp_reduxRoutine_default = /*#__PURE__*/__webpack_require__.n(external_wp_reduxRoutine_namespaceObject);
;// CONCATENATED MODULE: external ["wp","compose"]
const external_wp_compose_namespaceObject = window["wp"]["compose"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/combine-reducers.js
function combine_reducers_combineReducers(reducers) {
const keys = Object.keys(reducers);
return function combinedReducer(state = {}, action) {
for (const key of keys) {
const reducer = reducers[key];
const prevStateForKey = state[key];
const nextStateForKey = reducer(prevStateForKey, action);
nextState[key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== prevStateForKey;
return hasChanged ? nextState : state;
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/factory.js
* Creates a selector function that takes additional curried argument with the
* registry `select` function. While a regular selector has signature
* ( state, ...selectorArgs ) => ( result )
* that allows to select data from the store's `state`, a registry selector
* ( select ) => ( state, ...selectorArgs ) => ( result )
* that supports also selecting from other registered stores.
* import { store as coreStore } from '@wordpress/core-data';
* import { store as editorStore } from '@wordpress/editor';
* const getCurrentPostId = createRegistrySelector( ( select ) => ( state ) => {
* return select( editorStore ).getCurrentPostId();
* const getPostEdits = createRegistrySelector( ( select ) => ( state ) => {
* // calling another registry selector just like any other function
* const postType = getCurrentPostType( state );
* const postId = getCurrentPostId( state );
* return select( coreStore ).getEntityRecordEdits( 'postType', postType, postId );
* Note how the `getCurrentPostId` selector can be called just like any other function,
* (it works even inside a regular non-registry selector) and we don't need to pass the
* registry as argument. The registry binding happens automatically when registering the selector
* @param {Function} registrySelector Function receiving a registry `select`
* function and returning a state selector.
* @return {Function} Registry selector that can be registered with a store.
function createRegistrySelector(registrySelector) {
const selectorsByRegistry = new WeakMap();
// Create a selector function that is bound to the registry referenced by `selector.registry`
// and that has the same API as a regular selector. Binding it in such a way makes it
// possible to call the selector directly from another selector.
const wrappedSelector = (...args) => {
let selector = selectorsByRegistry.get(wrappedSelector.registry);
// We want to make sure the cache persists even when new registry
// instances are created. For example patterns create their own editors
// with their own core/block-editor stores, so we should keep track of
// the cache for each registry instance.
selector = registrySelector(wrappedSelector.registry.select);
selectorsByRegistry.set(wrappedSelector.registry, selector);
return selector(...args);
* Flag indicating that the selector is a registry selector that needs the correct registry
* reference to be assigned to `selector.registry` to make it work correctly.
* be mapped as a registry selector.
wrappedSelector.isRegistrySelector = true;
* Creates a control function that takes additional curried argument with the `registry` object.
* While a regular control has signature
* ( action ) => ( iteratorOrPromise )
* where the control works with the `action` that it's bound to, a registry control has signature:
* ( registry ) => ( action ) => ( iteratorOrPromise )
* A registry control is typically used to select data or dispatch an action to a registered
* When registering a control created with `createRegistryControl` with a store, the store
* knows which calling convention to use when executing the control.
* @param {Function} registryControl Function receiving a registry object and returning a control.
* @return {Function} Registry control that can be registered with a store.
function createRegistryControl(registryControl) {
registryControl.isRegistryControl = true;
;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/controls.js
/** @typedef {import('./types').StoreDescriptor} StoreDescriptor */
const SELECT = '@@data/SELECT';
const RESOLVE_SELECT = '@@data/RESOLVE_SELECT';
const DISPATCH = '@@data/DISPATCH';
function isObject(object) {
return object !== null && typeof object === 'object';