--- a/wp/wp-includes/js/dist/data.js Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/js/dist/data.js Fri Sep 05 18:52:52 2025 +0200
@@ -525,8 +525,6 @@
/******/
/************************************************************************/
var __webpack_exports__ = {};
-// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
-(() => {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
@@ -599,779 +597,393 @@
persistence: () => (persistence)
});
-;// CONCATENATED MODULE: external ["wp","deprecated"]
+;// external ["wp","deprecated"]
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
-function _typeof(o) {
- "@babel/helpers - typeof";
-
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
- return typeof o;
- } : function (o) {
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
- }, _typeof(o);
-}
-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
-
-function _toPrimitive(input, hint) {
- if (_typeof(input) !== "object" || input === null) return input;
- var prim = input[Symbol.toPrimitive];
- if (prim !== undefined) {
- var res = prim.call(input, hint || "default");
- if (_typeof(res) !== "object") return res;
- throw new TypeError("@@toPrimitive must return a primitive value.");
- }
- return (hint === "string" ? String : Number)(input);
-}
-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
-
-
-function _toPropertyKey(arg) {
- var key = _toPrimitive(arg, "string");
- return _typeof(key) === "symbol" ? key : String(key);
-}
-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
-
-function _defineProperty(obj, key, value) {
- key = _toPropertyKey(key);
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
- return obj;
-}
-;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
-
-function ownKeys(e, r) {
- var t = Object.keys(e);
- if (Object.getOwnPropertySymbols) {
- var o = Object.getOwnPropertySymbols(e);
- r && (o = o.filter(function (r) {
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
- })), t.push.apply(t, o);
- }
- return t;
+;// ./node_modules/redux/dist/redux.mjs
+// src/utils/formatProdErrorMessage.ts
+function formatProdErrorMessage(code) {
+ return `Minified Redux error #${code}; visit https://redux.js.org/Errors?code=${code} for the full message or use the non-minified dev environment for full errors. `;
}
-function _objectSpread2(e) {
- for (var r = 1; r < arguments.length; r++) {
- var t = null != arguments[r] ? arguments[r] : {};
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
- _defineProperty(e, r, t[r]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
- });
- }
- return e;
-}
-;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
-
-
-/**
- * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
- *
- * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
- * during build.
- * @param {number} code
- */
-function formatProdErrorMessage(code) {
- return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
-}
-
-// Inlined version of the `symbol-observable` polyfill
-var $$observable = (function () {
- return typeof Symbol === 'function' && Symbol.observable || '@@observable';
-})();
-
-/**
- * These are private action types reserved by Redux.
- * For any unknown actions, you must return the current state.
- * If the current state is undefined, you must return the initial state.
- * Do not reference these action types directly in your code.
- */
-var randomString = function randomString() {
- return Math.random().toString(36).substring(7).split('').join('.');
+
+// src/utils/symbol-observable.ts
+var $$observable = /* @__PURE__ */ (() => typeof Symbol === "function" && Symbol.observable || "@@observable")();
+var symbol_observable_default = $$observable;
+
+// src/utils/actionTypes.ts
+var randomString = () => Math.random().toString(36).substring(7).split("").join(".");
+var ActionTypes = {
+ INIT: `@@redux/INIT${/* @__PURE__ */ randomString()}`,
+ REPLACE: `@@redux/REPLACE${/* @__PURE__ */ randomString()}`,
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`
};
-
-var ActionTypes = {
- INIT: "@@redux/INIT" + randomString(),
- REPLACE: "@@redux/REPLACE" + randomString(),
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
- }
-};
-
-/**
- * @param {any} obj The object to inspect.
- * @returns {boolean} True if the argument appears to be a plain object.
- */
+var actionTypes_default = ActionTypes;
+
+// src/utils/isPlainObject.ts
function isPlainObject(obj) {
- if (typeof obj !== 'object' || obj === null) return false;
- var proto = obj;
-
+ if (typeof obj !== "object" || obj === null)
+ return false;
+ let proto = obj;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
-
- return Object.getPrototypeOf(obj) === proto;
+ return Object.getPrototypeOf(obj) === proto || Object.getPrototypeOf(obj) === null;
}
-// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
+// src/utils/kindOf.ts
function miniKindOf(val) {
- if (val === void 0) return 'undefined';
- if (val === null) return 'null';
- var type = typeof val;
-
+ if (val === void 0)
+ return "undefined";
+ if (val === null)
+ return "null";
+ const type = typeof val;
switch (type) {
- case 'boolean':
- case 'string':
- case 'number':
- case 'symbol':
- case 'function':
- {
- return type;
- }
+ case "boolean":
+ case "string":
+ case "number":
+ case "symbol":
+ case "function": {
+ return type;
+ }
}
-
- if (Array.isArray(val)) return 'array';
- if (isDate(val)) return 'date';
- if (isError(val)) return 'error';
- var constructorName = ctorName(val);
-
+ if (Array.isArray(val))
+ return "array";
+ if (isDate(val))
+ return "date";
+ if (isError(val))
+ return "error";
+ const constructorName = ctorName(val);
switch (constructorName) {
- case 'Symbol':
- case 'Promise':
- case 'WeakMap':
- case 'WeakSet':
- case 'Map':
- case 'Set':
+ case "Symbol":
+ case "Promise":
+ case "WeakMap":
+ case "WeakSet":
+ case "Map":
+ case "Set":
return constructorName;
- } // other
-
-
- return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
-}
-
-function ctorName(val) {
- return typeof val.constructor === 'function' ? val.constructor.name : null;
+ }
+ return Object.prototype.toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, "");
}
-
+function ctorName(val) {
+ return typeof val.constructor === "function" ? val.constructor.name : null;
+}
function isError(val) {
- return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
+ return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
}
-
function isDate(val) {
- if (val instanceof Date) return true;
- return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
+ if (val instanceof Date)
+ return true;
+ return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
}
-
function kindOf(val) {
- var typeOfVal = typeof val;
-
+ let typeOfVal = typeof val;
if (false) {}
-
return typeOfVal;
}
-/**
- * @deprecated
- *
- * **We recommend using the `configureStore` method
- * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
- *
- * Redux Toolkit is our recommended approach for writing Redux logic today,
- * including store setup, reducers, data fetching, and more.
- *
- * **For more details, please read this Redux docs page:**
- * **https://redux.js.org/introduction/why-rtk-is-redux-today**
- *
- * `configureStore` from Redux Toolkit is an improved version of `createStore` that
- * simplifies setup and helps avoid common bugs.
- *
- * You should not be using the `redux` core package by itself today, except for learning purposes.
- * The `createStore` method from the core `redux` package will not be removed, but we encourage
- * all users to migrate to using Redux Toolkit for all Redux code.
- *
- * If you want to use `createStore` without this visual deprecation warning, use
- * the `legacy_createStore` import instead:
- *
- * `import { legacy_createStore as createStore} from 'redux'`
- *
- */
-
+// src/createStore.ts
function createStore(reducer, preloadedState, enhancer) {
- var _ref2;
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
+ if (typeof reducer !== "function") {
+ throw new Error( true ? formatProdErrorMessage(2) : 0);
+ }
+ if (typeof preloadedState === "function" && typeof enhancer === "function" || typeof enhancer === "function" && typeof arguments[3] === "function") {
throw new Error( true ? formatProdErrorMessage(0) : 0);
}
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
+ if (typeof preloadedState === "function" && typeof enhancer === "undefined") {
enhancer = preloadedState;
- preloadedState = undefined;
+ preloadedState = void 0;
}
-
- if (typeof enhancer !== 'undefined') {
- if (typeof enhancer !== 'function') {
+ if (typeof enhancer !== "undefined") {
+ if (typeof enhancer !== "function") {
throw new Error( true ? formatProdErrorMessage(1) : 0);
}
-
return enhancer(createStore)(reducer, preloadedState);
}
-
- if (typeof reducer !== 'function') {
- throw new Error( true ? formatProdErrorMessage(2) : 0);
- }
-
- var currentReducer = reducer;
- var currentState = preloadedState;
- var currentListeners = [];
- var nextListeners = currentListeners;
- var isDispatching = false;
- /**
- * This makes a shallow copy of currentListeners so we can use
- * nextListeners as a temporary list while dispatching.
- *
- * This prevents any bugs around consumers calling
- * subscribe/unsubscribe in the middle of a dispatch.
- */
-
+ let currentReducer = reducer;
+ let currentState = preloadedState;
+ let currentListeners = /* @__PURE__ */ new Map();
+ let nextListeners = currentListeners;
+ let listenerIdCounter = 0;
+ let isDispatching = false;
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
- nextListeners = currentListeners.slice();
+ nextListeners = /* @__PURE__ */ new Map();
+ currentListeners.forEach((listener, key) => {
+ nextListeners.set(key, listener);
+ });
}
}
- /**
- * Reads the state tree managed by the store.
- *
- * @returns {any} The current state tree of your application.
- */
-
-
function getState() {
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(3) : 0);
}
-
return currentState;
}
- /**
- * Adds a change listener. It will be called any time an action is dispatched,
- * and some part of the state tree may potentially have changed. You may then
- * call `getState()` to read the current state tree inside the callback.
- *
- * You may call `dispatch()` from a change listener, with the following
- * caveats:
- *
- * 1. The subscriptions are snapshotted just before every `dispatch()` call.
- * If you subscribe or unsubscribe while the listeners are being invoked, this
- * will not have any effect on the `dispatch()` that is currently in progress.
- * However, the next `dispatch()` call, whether nested or not, will use a more
- * recent snapshot of the subscription list.
- *
- * 2. The listener should not expect to see all state changes, as the state
- * might have been updated multiple times during a nested `dispatch()` before
- * the listener is called. It is, however, guaranteed that all subscribers
- * registered before the `dispatch()` started will be called with the latest
- * state by the time it exits.
- *
- * @param {Function} listener A callback to be invoked on every dispatch.
- * @returns {Function} A function to remove this change listener.
- */
-
-
function subscribe(listener) {
- if (typeof listener !== 'function') {
+ if (typeof listener !== "function") {
throw new Error( true ? formatProdErrorMessage(4) : 0);
}
-
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(5) : 0);
}
-
- var isSubscribed = true;
+ let isSubscribed = true;
ensureCanMutateNextListeners();
- nextListeners.push(listener);
+ const listenerId = listenerIdCounter++;
+ nextListeners.set(listenerId, listener);
return function unsubscribe() {
if (!isSubscribed) {
return;
}
-
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(6) : 0);
}
-
isSubscribed = false;
ensureCanMutateNextListeners();
- var index = nextListeners.indexOf(listener);
- nextListeners.splice(index, 1);
+ nextListeners.delete(listenerId);
currentListeners = null;
};
}
- /**
- * Dispatches an action. It is the only way to trigger a state change.
- *
- * The `reducer` function, used to create the store, will be called with the
- * current state tree and the given `action`. Its return value will
- * be considered the **next** state of the tree, and the change listeners
- * will be notified.
- *
- * The base implementation only supports plain object actions. If you want to
- * dispatch a Promise, an Observable, a thunk, or something else, you need to
- * wrap your store creating function into the corresponding middleware. For
- * example, see the documentation for the `redux-thunk` package. Even the
- * middleware will eventually dispatch plain object actions using this method.
- *
- * @param {Object} action A plain object representing “what changed”. It is
- * a good idea to keep actions serializable so you can record and replay user
- * sessions, or use the time travelling `redux-devtools`. An action must have
- * a `type` property which may not be `undefined`. It is a good idea to use
- * string constants for action types.
- *
- * @returns {Object} For convenience, the same action object you dispatched.
- *
- * Note that, if you use a custom middleware, it may wrap `dispatch()` to
- * return something else (for example, a Promise you can await).
- */
-
-
function dispatch(action) {
if (!isPlainObject(action)) {
throw new Error( true ? formatProdErrorMessage(7) : 0);
}
-
- if (typeof action.type === 'undefined') {
+ if (typeof action.type === "undefined") {
throw new Error( true ? formatProdErrorMessage(8) : 0);
}
-
+ if (typeof action.type !== "string") {
+ throw new Error( true ? formatProdErrorMessage(17) : 0);
+ }
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(9) : 0);
}
-
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
-
- var listeners = currentListeners = nextListeners;
-
- for (var i = 0; i < listeners.length; i++) {
- var listener = listeners[i];
+ const listeners = currentListeners = nextListeners;
+ listeners.forEach((listener) => {
listener();
- }
-
+ });
return action;
}
- /**
- * Replaces the reducer currently used by the store to calculate the state.
- *
- * You might need this if your app implements code splitting and you want to
- * load some of the reducers dynamically. You might also need this if you
- * implement a hot reloading mechanism for Redux.
- *
- * @param {Function} nextReducer The reducer for the store to use instead.
- * @returns {void}
- */
-
-
function replaceReducer(nextReducer) {
- if (typeof nextReducer !== 'function') {
+ if (typeof nextReducer !== "function") {
throw new Error( true ? formatProdErrorMessage(10) : 0);
}
-
- currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
- // Any reducers that existed in both the new and old rootReducer
- // will receive the previous state. This effectively populates
- // the new state tree with any relevant data from the old one.
-
+ currentReducer = nextReducer;
dispatch({
- type: ActionTypes.REPLACE
+ type: actionTypes_default.REPLACE
});
}
- /**
- * Interoperability point for observable/reactive libraries.
- * @returns {observable} A minimal observable of state changes.
- * For more information, see the observable proposal:
- * https://github.com/tc39/proposal-observable
- */
-
-
function observable() {
- var _ref;
-
- var outerSubscribe = subscribe;
- return _ref = {
+ const outerSubscribe = subscribe;
+ return {
/**
* The minimal observable subscription method.
- * @param {Object} observer Any object that can be used as an observer.
+ * @param 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
+ * @returns 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) {
+ subscribe(observer) {
+ if (typeof observer !== "object" || observer === null) {
throw new Error( true ? formatProdErrorMessage(11) : 0);
}
-
function observeState() {
- if (observer.next) {
- observer.next(getState());
+ const observerAsObserver = observer;
+ if (observerAsObserver.next) {
+ observerAsObserver.next(getState());
}
}
-
observeState();
- var unsubscribe = outerSubscribe(observeState);
+ const unsubscribe = outerSubscribe(observeState);
return {
- unsubscribe: unsubscribe
+ unsubscribe
};
+ },
+ [symbol_observable_default]() {
+ return this;
}
- }, _ref[$$observable] = function () {
- return this;
- }, _ref;
- } // 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.
-
-
+ };
+ }
dispatch({
- type: ActionTypes.INIT
+ type: actionTypes_default.INIT
});
- return _ref2 = {
- dispatch: dispatch,
- subscribe: subscribe,
- getState: getState,
- replaceReducer: replaceReducer
- }, _ref2[$$observable] = observable, _ref2;
+ const store = {
+ dispatch,
+ subscribe,
+ getState,
+ replaceReducer,
+ [symbol_observable_default]: observable
+ };
+ return store;
}
-/**
- * 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.
- * @returns {void}
- */
+function legacy_createStore(reducer, preloadedState, enhancer) {
+ return createStore(reducer, preloadedState, enhancer);
+}
+
+// src/utils/warning.ts
function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
+ if (typeof console !== "undefined" && typeof console.error === "function") {
console.error(message);
}
- /* eslint-enable no-console */
-
-
try {
- // 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
-
+ } catch (e) {
+ }
}
+// src/combineReducers.ts
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';
-
+ const reducerKeys = Object.keys(reducers);
+ const argumentName = action && action.type === actionTypes_default.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.';
+ 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('", "') + "\"");
+ 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) {
+ const unexpectedKeys = Object.keys(inputState).filter((key) => !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]);
+ unexpectedKeys.forEach((key) => {
unexpectedKeyCache[key] = true;
});
- if (action && action.type === ActionTypes.REPLACE) return;
-
+ if (action && action.type === actionTypes_default.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.");
+ 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, {
- type: ActionTypes.INIT
+ Object.keys(reducers).forEach((key) => {
+ const reducer = reducers[key];
+ const initialState = reducer(void 0, {
+ type: actionTypes_default.INIT
});
-
- if (typeof initialState === 'undefined') {
+ if (typeof initialState === "undefined") {
throw new Error( true ? formatProdErrorMessage(12) : 0);
}
-
- if (typeof reducer(undefined, {
- type: ActionTypes.PROBE_UNKNOWN_ACTION()
- }) === 'undefined') {
+ if (typeof reducer(void 0, {
+ type: actionTypes_default.PROBE_UNKNOWN_ACTION()
+ }) === "undefined") {
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
- * reducer functions.
- *
- * @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
- * unrecognized action.
- *
- * @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);
- var finalReducers = {};
-
- for (var i = 0; i < reducerKeys.length; i++) {
- var key = reducerKeys[i];
-
+ const reducerKeys = Object.keys(reducers);
+ const finalReducers = {};
+ for (let i = 0; i < reducerKeys.length; i++) {
+ const key = reducerKeys[i];
if (false) {}
-
- if (typeof reducers[key] === 'function') {
+ 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
- // keys multiple times.
-
- var unexpectedKeyCache;
-
+ const finalReducerKeys = Object.keys(finalReducers);
+ let unexpectedKeyCache;
if (false) {}
-
- var shapeAssertionError;
-
+ let shapeAssertionError;
try {
assertReducerShape(finalReducers);
} catch (e) {
shapeAssertionError = e;
}
-
- return function combination(state, action) {
- if (state === void 0) {
- state = {};
- }
-
+ return function combination(state = {}, action) {
if (shapeAssertionError) {
throw shapeAssertionError;
}
-
- if (false) { var warningMessage; }
-
- var hasChanged = false;
- var nextState = {};
-
- 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;
+ if (false) {}
+ let hasChanged = false;
+ const nextState = {};
+ for (let i = 0; i < finalReducerKeys.length; i++) {
+ const key = finalReducerKeys[i];
+ const reducer = finalReducers[key];
+ const previousStateForKey = state[key];
+ const nextStateForKey = reducer(previousStateForKey, action);
+ if (typeof nextStateForKey === "undefined") {
+ const actionType = action && action.type;
throw new Error( true ? formatProdErrorMessage(14) : 0);
}
-
- nextState[_key] = nextStateForKey;
+ nextState[key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
-
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
return hasChanged ? nextState : state;
};
}
+// src/bindActionCreators.ts
function bindActionCreator(actionCreator, dispatch) {
- return function () {
- return dispatch(actionCreator.apply(this, arguments));
+ return function(...args) {
+ return dispatch(actionCreator.apply(this, args));
};
}
-/**
- * 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
- * store.
- *
- * @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.
- */
-
-
function bindActionCreators(actionCreators, dispatch) {
- if (typeof actionCreators === 'function') {
+ if (typeof actionCreators === "function") {
return bindActionCreator(actionCreators, dispatch);
}
-
- if (typeof actionCreators !== 'object' || actionCreators === null) {
+ 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') {
+ const boundActionCreators = {};
+ for (const key in actionCreators) {
+ const 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))).
- */
-function compose() {
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
+// src/compose.ts
+function compose(...funcs) {
+ if (funcs.length === 0) {
+ return (arg) => arg;
}
-
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
- }
-
if (funcs.length === 1) {
return funcs[0];
}
-
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(void 0, arguments));
- };
- });
+ return funcs.reduce((a, b) => (...args) => a(b(...args)));
}
-/**
- * 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
- * as named arguments.
- *
- * @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) {
- return function () {
- var store = createStore.apply(void 0, arguments);
-
- var _dispatch = function dispatch() {
- throw new Error( true ? formatProdErrorMessage(15) : 0);
- };
-
- var middlewareAPI = {
- 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), {}, {
- dispatch: _dispatch
- });
+// src/applyMiddleware.ts
+function applyMiddleware(...middlewares) {
+ return (createStore2) => (reducer, preloadedState) => {
+ const store = createStore2(reducer, preloadedState);
+ let dispatch = () => {
+ throw new Error( true ? formatProdErrorMessage(15) : 0);
+ };
+ const middlewareAPI = {
+ getState: store.getState,
+ dispatch: (action, ...args) => dispatch(action, ...args)
+ };
+ const chain = middlewares.map((middleware) => middleware(middlewareAPI));
+ dispatch = compose(...chain)(store.dispatch);
+ return {
+ ...store,
+ dispatch
};
};
}
-
-
+// src/utils/isAction.ts
+function isAction(action) {
+ return isPlainObject(action) && "type" in action && typeof action.type === "string";
+}
+
+//# sourceMappingURL=redux.mjs.map
// 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"]
+;// 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"]
+;// external ["wp","compose"]
const external_wp_compose_namespaceObject = window["wp"]["compose"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/combine-reducers.js
+;// ./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) {
@@ -1388,7 +1000,11 @@
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/factory.js
+;// ./node_modules/@wordpress/data/build-module/factory.js
+/**
+ * Internal dependencies
+ */
+
/**
* Creates a selector function that takes additional curried argument with the
* registry `select` function. While a regular selector has signature
@@ -1424,10 +1040,10 @@
* registry as argument. The registry binding happens automatically when registering the selector
* with a store.
*
- * @param {Function} registrySelector Function receiving a registry `select`
- * function and returning a state selector.
+ * @param registrySelector Function receiving a registry `select`
+ * function and returning a state selector.
*
- * @return {Function} Registry selector that can be registered with a store.
+ * @return Registry selector that can be registered with a store.
*/
function createRegistrySelector(registrySelector) {
const selectorsByRegistry = new WeakMap();
@@ -1451,8 +1067,6 @@
* 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.
- *
- * @type {boolean}
*/
wrappedSelector.isRegistrySelector = true;
return wrappedSelector;
@@ -1474,16 +1088,16 @@
* 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.
+ * @param registryControl Function receiving a registry object and returning a control.
*
- * @return {Function} Registry control that can be registered with a store.
+ * @return Registry control that can be registered with a store.
*/
function createRegistryControl(registryControl) {
registryControl.isRegistryControl = true;
return registryControl;
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/controls.js
+;// ./node_modules/@wordpress/data/build-module/controls.js
/**
* Internal dependencies
*/
@@ -1617,9 +1231,9 @@
}) => registry.dispatch(storeKey)[actionName](...args))
};
-;// CONCATENATED MODULE: external ["wp","privateApis"]
+;// external ["wp","privateApis"]
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/lock-unlock.js
+;// ./node_modules/@wordpress/data/build-module/lock-unlock.js
/**
* WordPress dependencies
*/
@@ -1629,12 +1243,12 @@
unlock
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/data');
-;// CONCATENATED MODULE: ./node_modules/is-promise/index.mjs
+;// ./node_modules/is-promise/index.mjs
function isPromise(obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/promise-middleware.js
+;// ./node_modules/@wordpress/data/build-module/promise-middleware.js
/**
* External dependencies
*/
@@ -1657,7 +1271,7 @@
};
/* harmony default export */ const promise_middleware = (promiseMiddleware);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js
+;// ./node_modules/@wordpress/data/build-module/resolvers-cache-middleware.js
/** @typedef {import('./registry').WPDataRegistry} WPDataRegistry */
/**
@@ -1701,7 +1315,7 @@
};
/* harmony default export */ const resolvers_cache_middleware = (createResolversCacheMiddleware);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/thunk-middleware.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/thunk-middleware.js
function createThunkMiddleware(args) {
return () => next => action => {
if (typeof action === 'function') {
@@ -1711,7 +1325,7 @@
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/utils.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/utils.js
/**
* External dependencies
*/
@@ -1762,7 +1376,7 @@
return idx === len ? args : args.slice(0, idx);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/reducer.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/reducer.js
/**
* External dependencies
*/
@@ -1888,7 +1502,7 @@
};
/* harmony default export */ const metadata_reducer = (isResolved);
-;// CONCATENATED MODULE: ./node_modules/rememo/rememo.js
+;// ./node_modules/rememo/rememo.js
/** @typedef {(...args: any[]) => *[]} GetDependants */
@@ -2186,7 +1800,7 @@
return /** @type {S & EnhancedSelector} */ (callSelector);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/selectors.js
/**
* WordPress dependencies
*/
@@ -2381,7 +1995,7 @@
return selectorsByStatus;
}, state => [state]);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/metadata/actions.js
/**
* Returns an action object used in signalling that selector resolution has
* started.
@@ -2535,7 +2149,7 @@
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/redux-store/index.js
+;// ./node_modules/@wordpress/data/build-module/redux-store/index.js
/**
* External dependencies
*/
@@ -2752,7 +2366,7 @@
};
// Expose normalization method on the bound selector
- // in order that it can be called when fullfilling
+ // in order that it can be called when fulfilling
// the resolver.
boundSelector.__unstableNormalizeArgs = selector.__unstableNormalizeArgs;
const resolver = resolvers[selectorName];
@@ -3067,7 +2681,7 @@
return args;
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/store/index.js
+;// ./node_modules/@wordpress/data/build-module/store/index.js
const coreDataStore = {
name: 'core/data',
instantiate(registry) {
@@ -3096,11 +2710,11 @@
};
/* harmony default export */ const store = (coreDataStore);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/utils/emitter.js
+;// ./node_modules/@wordpress/data/build-module/utils/emitter.js
/**
* Create an event emitter.
*
- * @return {import("../types").DataEmitter} Emitter.
+ * @return The event emitter.
*/
function createEmitter() {
let isPaused = false;
@@ -3139,7 +2753,7 @@
};
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/registry.js
+;// ./node_modules/@wordpress/data/build-module/registry.js
/**
* WordPress dependencies
*/
@@ -3189,7 +2803,7 @@
* configurations.
*
* @param {Object} storeConfigs Initial store configurations.
- * @param {Object?} parent Parent registry.
+ * @param {?Object} parent Parent registry.
*
* @return {WPDataRegistry} Data registry.
*/
@@ -3500,14 +3114,14 @@
return registryWithPlugins;
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/default-registry.js
+;// ./node_modules/@wordpress/data/build-module/default-registry.js
/**
* Internal dependencies
*/
/* harmony default export */ const default_registry = (createRegistry());
-;// CONCATENATED MODULE: ./node_modules/is-plain-object/dist/is-plain-object.mjs
+;// ./node_modules/is-plain-object/dist/is-plain-object.mjs
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
@@ -3546,7 +3160,7 @@
// EXTERNAL MODULE: ./node_modules/deepmerge/dist/cjs.js
var cjs = __webpack_require__(66);
var cjs_default = /*#__PURE__*/__webpack_require__.n(cjs);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js
+;// ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/object.js
let objectStorage;
const storage = {
getItem(key) {
@@ -3567,7 +3181,7 @@
};
/* harmony default export */ const object = (storage);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js
+;// ./node_modules/@wordpress/data/build-module/plugins/persistence/storage/default.js
/**
* Internal dependencies
*/
@@ -3585,7 +3199,7 @@
}
/* harmony default export */ const storage_default = (default_storage);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js
+;// ./node_modules/@wordpress/data/build-module/plugins/persistence/index.js
/**
* External dependencies
*/
@@ -3789,17 +3403,17 @@
persistencePlugin.__unstableMigrate = () => {};
/* harmony default export */ const persistence = (persistencePlugin);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/plugins/index.js
-
-
-;// CONCATENATED MODULE: external ["wp","priorityQueue"]
+;// ./node_modules/@wordpress/data/build-module/plugins/index.js
+
+
+;// external ["wp","priorityQueue"]
const external_wp_priorityQueue_namespaceObject = window["wp"]["priorityQueue"];
-;// CONCATENATED MODULE: external ["wp","element"]
+;// external ["wp","element"]
const external_wp_element_namespaceObject = window["wp"]["element"];
-;// CONCATENATED MODULE: external ["wp","isShallowEqual"]
+;// external ["wp","isShallowEqual"]
const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"];
var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/context.js
+;// ./node_modules/@wordpress/data/build-module/components/registry-provider/context.js
/**
* WordPress dependencies
*/
@@ -3820,7 +3434,7 @@
* children components. Used along with the RegistryProvider.
*
* You can read more about the react context api here:
- * https://reactjs.org/docs/context.html#contextprovider
+ * https://react.dev/learn/passing-data-deeply-with-context#step-3-provide-the-context
*
* @example
* ```js
@@ -3857,7 +3471,7 @@
*/
/* harmony default export */ const context = (Provider);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js
+;// ./node_modules/@wordpress/data/build-module/components/registry-provider/use-registry.js
/**
* WordPress dependencies
*/
@@ -3911,7 +3525,7 @@
return (0,external_wp_element_namespaceObject.useContext)(Context);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/context.js
+;// ./node_modules/@wordpress/data/build-module/components/async-mode-provider/context.js
/**
* WordPress dependencies
*/
@@ -3960,7 +3574,7 @@
*/
/* harmony default export */ const async_mode_provider_context = (context_Provider);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/async-mode-provider/use-async-mode.js
+;// ./node_modules/@wordpress/data/build-module/components/async-mode-provider/use-async-mode.js
/**
* WordPress dependencies
*/
@@ -3974,7 +3588,7 @@
return (0,external_wp_element_namespaceObject.useContext)(context_Context);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-select/index.js
+;// ./node_modules/@wordpress/data/build-module/components/use-select/index.js
/**
* WordPress dependencies
*/
@@ -3988,6 +3602,15 @@
const renderQueue = (0,external_wp_priorityQueue_namespaceObject.createQueue)();
+function warnOnUnstableReference(a, b) {
+ if (!a || !b) {
+ return;
+ }
+ const keys = typeof a === 'object' && typeof b === 'object' ? Object.keys(a).filter(k => a[k] !== b[k]) : [];
+
+ // eslint-disable-next-line no-console
+ console.warn('The `useSelect` hook returns different values when called with the same state and parameters.\n' + 'This can lead to unnecessary re-renders and performance issues if not fixed.\n\n' + 'Non-equal value keys: %s\n\n', keys.join(', '));
+}
/**
* @typedef {import('../../types').StoreDescriptor<C>} StoreDescriptor
@@ -4111,7 +3734,15 @@
current: null
};
const mapResult = registry.__unstableMarkListeningStores(() => mapSelect(select, registry), listeningStores);
- if (false) {}
+ if (true) {
+ if (!didWarnUnstableReference) {
+ const secondMapResult = mapSelect(select, registry);
+ if (!external_wp_isShallowEqual_default()(mapResult, secondMapResult)) {
+ warnOnUnstableReference(mapResult, secondMapResult);
+ didWarnUnstableReference = true;
+ }
+ }
+ }
if (!subscriber) {
for (const name of listeningStores.current) {
storeStatesOnMount.set(name, getStoreState(name));
@@ -4152,17 +3783,16 @@
};
};
}
-function useStaticSelect(storeName) {
+function _useStaticSelect(storeName) {
return useRegistry().select(storeName);
}
-function useMappingSelect(suspense, mapSelect, deps) {
+function _useMappingSelect(suspense, mapSelect, deps) {
const registry = useRegistry();
const isAsync = useAsyncMode();
const store = (0,external_wp_element_namespaceObject.useMemo)(() => Store(registry, suspense), [registry, suspense]);
// These are "pass-through" dependencies from the parent hook,
// and the parent should catch any hook rule violations.
- // eslint-disable-next-line react-hooks/exhaustive-deps
const selector = (0,external_wp_element_namespaceObject.useCallback)(mapSelect, deps);
const {
subscribe,
@@ -4177,7 +3807,7 @@
* Custom react hook for retrieving props from registered selectors.
*
* In general, this custom React hook follows the
- * [rules of hooks](https://reactjs.org/docs/hooks-rules.html).
+ * [rules of hooks](https://react.dev/reference/rules/rules-of-hooks).
*
* @template {MapSelect | StoreDescriptor<any>} T
* @param {T} mapSelect Function called on every state change. The returned value is
@@ -4248,11 +3878,9 @@
throw new Error(`Switching useSelect from ${prevMode} to ${nextMode} is not allowed`);
}
- /* eslint-disable react-hooks/rules-of-hooks */
// `staticSelectMode` is not allowed to change during the hook instance's,
// lifetime, so the rules of hooks are not really violated.
- return staticSelectMode ? useStaticSelect(mapSelect) : useMappingSelect(false, mapSelect, deps);
- /* eslint-enable react-hooks/rules-of-hooks */
+ return staticSelectMode ? _useStaticSelect(mapSelect) : _useMappingSelect(false, mapSelect, deps);
}
/**
@@ -4275,12 +3903,12 @@
* @return {ReturnType<T>} Data object returned by the `mapSelect` function.
*/
function useSuspenseSelect(mapSelect, deps) {
- return useMappingSelect(true, mapSelect, deps);
+ return _useMappingSelect(true, mapSelect, deps);
}
-;// CONCATENATED MODULE: external "ReactJSXRuntime"
+;// external "ReactJSXRuntime"
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-select/index.js
+;// ./node_modules/@wordpress/data/build-module/components/with-select/index.js
/**
* WordPress dependencies
*/
@@ -4344,7 +3972,7 @@
}), 'withSelect');
/* harmony default export */ const with_select = (withSelect);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch-with-map.js
+;// ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch-with-map.js
/**
* WordPress dependencies
*/
@@ -4372,24 +4000,24 @@
*/
const useDispatchWithMap = (dispatchMap, deps) => {
const registry = useRegistry();
- const currentDispatchMap = (0,external_wp_element_namespaceObject.useRef)(dispatchMap);
+ const currentDispatchMapRef = (0,external_wp_element_namespaceObject.useRef)(dispatchMap);
(0,external_wp_compose_namespaceObject.useIsomorphicLayoutEffect)(() => {
- currentDispatchMap.current = dispatchMap;
+ currentDispatchMapRef.current = dispatchMap;
});
return (0,external_wp_element_namespaceObject.useMemo)(() => {
- const currentDispatchProps = currentDispatchMap.current(registry.dispatch, registry);
+ const currentDispatchProps = currentDispatchMapRef.current(registry.dispatch, registry);
return Object.fromEntries(Object.entries(currentDispatchProps).map(([propName, dispatcher]) => {
if (typeof dispatcher !== 'function') {
// eslint-disable-next-line no-console
console.warn(`Property ${propName} returned from dispatchMap in useDispatchWithMap must be a function.`);
}
- return [propName, (...args) => currentDispatchMap.current(registry.dispatch, registry)[propName](...args)];
+ return [propName, (...args) => currentDispatchMapRef.current(registry.dispatch, registry)[propName](...args)];
}));
}, [registry, ...deps]);
};
/* harmony default export */ const use_dispatch_with_map = (useDispatchWithMap);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js
+;// ./node_modules/@wordpress/data/build-module/components/with-dispatch/index.js
/**
* WordPress dependencies
*/
@@ -4494,7 +4122,7 @@
}, 'withDispatch');
/* harmony default export */ const with_dispatch = (withDispatch);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/with-registry/index.js
+;// ./node_modules/@wordpress/data/build-module/components/with-registry/index.js
/**
* WordPress dependencies
*/
@@ -4522,7 +4150,7 @@
}), 'withRegistry');
/* harmony default export */ const with_registry = (withRegistry);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js
+;// ./node_modules/@wordpress/data/build-module/components/use-dispatch/use-dispatch.js
/**
* Internal dependencies
*/
@@ -4591,7 +4219,7 @@
};
/* harmony default export */ const use_dispatch = (useDispatch);
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/dispatch.js
+;// ./node_modules/@wordpress/data/build-module/dispatch.js
/**
* Internal dependencies
*/
@@ -4621,7 +4249,7 @@
return default_registry.dispatch(storeNameOrDescriptor);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/select.js
+;// ./node_modules/@wordpress/data/build-module/select.js
/**
* Internal dependencies
*/
@@ -4651,7 +4279,7 @@
return default_registry.select(storeNameOrDescriptor);
}
-;// CONCATENATED MODULE: ./node_modules/@wordpress/data/build-module/index.js
+;// ./node_modules/@wordpress/data/build-module/index.js
/**
* Internal dependencies
*/
@@ -4837,8 +4465,6 @@
*/
const register = default_registry.register;
-})();
-
(window.wp = window.wp || {}).data = __webpack_exports__;
/******/ })()
;
\ No newline at end of file