: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/******/ (() => { // webpackBootstrap
/******/ // The require scope
/******/ var __webpack_require__ = {};
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ /* webpack/runtime/make namespace object */
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/************************************************************************/
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
actions: () => (/* binding */ actions),
addAction: () => (/* binding */ addAction),
addFilter: () => (/* binding */ addFilter),
applyFilters: () => (/* binding */ applyFilters),
createHooks: () => (/* reexport */ build_module_createHooks),
currentAction: () => (/* binding */ currentAction),
currentFilter: () => (/* binding */ currentFilter),
defaultHooks: () => (/* binding */ defaultHooks),
didAction: () => (/* binding */ didAction),
didFilter: () => (/* binding */ didFilter),
doAction: () => (/* binding */ doAction),
doingAction: () => (/* binding */ doingAction),
doingFilter: () => (/* binding */ doingFilter),
filters: () => (/* binding */ filters),
hasAction: () => (/* binding */ hasAction),
hasFilter: () => (/* binding */ hasFilter),
removeAction: () => (/* binding */ removeAction),
removeAllActions: () => (/* binding */ removeAllActions),
removeAllFilters: () => (/* binding */ removeAllFilters),
removeFilter: () => (/* binding */ removeFilter)
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/validateNamespace.js
* Validate a namespace string.
* @param {string} namespace The namespace to validate - should take the form
* `vendor/plugin/function`.
* @return {boolean} Whether the namespace is valid.
function validateNamespace(namespace) {
if ('string' !== typeof namespace || '' === namespace) {
// eslint-disable-next-line no-console
console.error('The namespace must be a non-empty string.');
if (!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(namespace)) {
// eslint-disable-next-line no-console
console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');
/* harmony default export */ const build_module_validateNamespace = (validateNamespace);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/validateHookName.js
* Validate a hookName string.
* @param {string} hookName The hook name to validate. Should be a non empty string containing
* only numbers, letters, dashes, periods and underscores. Also,
* the hook name cannot begin with `__`.
* @return {boolean} Whether the hook name is valid.
function validateHookName(hookName) {
if ('string' !== typeof hookName || '' === hookName) {
// eslint-disable-next-line no-console
console.error('The hook name must be a non-empty string.');
if (/^__/.test(hookName)) {
// eslint-disable-next-line no-console
console.error('The hook name cannot begin with `__`.');
if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {
// eslint-disable-next-line no-console
console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');
/* harmony default export */ const build_module_validateHookName = (validateHookName);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createAddHook.js
* Adds the hook to the appropriate hooks container.
* @param {string} hookName Name of hook to add
* @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.
* @param {import('.').Callback} callback Function to call when the hook is run
* @param {number} [priority=10] Priority of this hook
* Returns a function which, when invoked, will add a hook.
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @return {AddHook} Function that adds a new hook.
function createAddHook(hooks, storeKey) {
return function addHook(hookName, namespace, callback, priority = 10) {
const hooksStore = hooks[storeKey];
if (!build_module_validateHookName(hookName)) {
if (!build_module_validateNamespace(namespace)) {
if ('function' !== typeof callback) {
// eslint-disable-next-line no-console
console.error('The hook callback must be a function.');
// Validate numeric priority
if ('number' !== typeof priority) {
// eslint-disable-next-line no-console
console.error('If specified, the hook priority must be a number.');
if (hooksStore[hookName]) {
// Find the correct insert index of the new hook.
const handlers = hooksStore[hookName].handlers;
for (i = handlers.length; i > 0; i--) {
if (priority >= handlers[i - 1].priority) {
if (i === handlers.length) {
// If append, operate via direct assignment.
// Otherwise, insert before index via splice.
handlers.splice(i, 0, handler);
// We may also be currently executing this hook. If the callback
// we're adding would come after the current callback, there's no
// problem; otherwise we need to increase the execution index of
// any other runs by 1 to account for the added element.
hooksStore.__current.forEach(hookInfo => {
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
// This is the first hook of its type.
if (hookName !== 'hookAdded') {
hooks.doAction('hookAdded', hookName, namespace, callback, priority);
/* harmony default export */ const build_module_createAddHook = (createAddHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js
* Removes the specified callback (or all callbacks) from the hook with a given hookName
* @param {string} hookName The name of the hook to modify.
* @param {string} namespace The unique namespace identifying the callback in the
* form `vendor/plugin/function`.
* @return {number | undefined} The number of callbacks removed.
* Returns a function which, when invoked, will remove a specified hook or all
* hooks by the given name.
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName,
* without regard to namespace. Used to create
* `removeAll*` functions.
* @return {RemoveHook} Function that removes hooks.
function createRemoveHook(hooks, storeKey, removeAll = false) {
return function removeHook(hookName, namespace) {
const hooksStore = hooks[storeKey];
if (!build_module_validateHookName(hookName)) {
if (!removeAll && !build_module_validateNamespace(namespace)) {
// Bail if no hooks exist by this name.
if (!hooksStore[hookName]) {
handlersRemoved = hooksStore[hookName].handlers.length;
runs: hooksStore[hookName].runs,
// Try to find the specified callback to remove.
const handlers = hooksStore[hookName].handlers;
for (let i = handlers.length - 1; i >= 0; i--) {
if (handlers[i].namespace === namespace) {
// This callback may also be part of a hook that is
// currently executing. If the callback we're removing
// comes after the current callback, there's no problem;
// otherwise we need to decrease the execution index of any
// other runs by 1 to account for the removed element.
hooksStore.__current.forEach(hookInfo => {
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {
if (hookName !== 'hookRemoved') {
hooks.doAction('hookRemoved', hookName, namespace);
/* harmony default export */ const build_module_createRemoveHook = (createRemoveHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createHasHook.js
* Returns whether any handlers are attached for the given hookName and optional namespace.
* @param {string} hookName The name of the hook to check for.
* @param {string} [namespace] Optional. The unique namespace identifying the callback
* in the form `vendor/plugin/function`.
* @return {boolean} Whether there are handlers that are attached to the given hook.
* Returns a function which, when invoked, will return whether any handlers are
* attached to a particular hook.
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @return {HasHook} Function that returns whether any handlers are
* attached to a particular hook and optional namespace.
function createHasHook(hooks, storeKey) {
return function hasHook(hookName, namespace) {
const hooksStore = hooks[storeKey];
// Use the namespace if provided.
if ('undefined' !== typeof namespace) {
return hookName in hooksStore && hooksStore[hookName].handlers.some(hook => hook.namespace === namespace);
return hookName in hooksStore;
/* harmony default export */ const build_module_createHasHook = (createHasHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createRunHook.js
* Returns a function which, when invoked, will execute all callbacks
* registered to a hook of the specified type, optionally returning the final
* value of the call chain.
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to
* return its first argument.
* @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks.
function createRunHook(hooks, storeKey, returnFirstArg = false) {
return function runHooks(hookName, ...args) {
const hooksStore = hooks[storeKey];
if (!hooksStore[hookName]) {
hooksStore[hookName].runs++;
const handlers = hooksStore[hookName].handlers;
// The following code is stripped from production builds.
if (!handlers || !handlers.length) {
return returnFirstArg ? args[0] : undefined;
hooksStore.__current.push(hookInfo);
while (hookInfo.currentIndex < handlers.length) {
const handler = handlers[hookInfo.currentIndex];
const result = handler.callback.apply(null, args);
hooksStore.__current.pop();
/* harmony default export */ const build_module_createRunHook = (createRunHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createCurrentHook.js
* Returns a function which, when invoked, will return the name of the
* currently running hook, or `null` if no hook of the given type is currently
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @return {() => string | null} Function that returns the current hook name or null.
function createCurrentHook(hooks, storeKey) {
return function currentHook() {
var _hooksStore$__current;
const hooksStore = hooks[storeKey];
return (_hooksStore$__current = hooksStore.__current[hooksStore.__current.length - 1]?.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;
/* harmony default export */ const build_module_createCurrentHook = (createCurrentHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createDoingHook.js
* Returns whether a hook is currently being executed.
* @param {string} [hookName] The name of the hook to check for. If
* omitted, will check for any hook being executed.
* @return {boolean} Whether the hook is being executed.
* Returns a function which, when invoked, will return whether a hook is
* currently being executed.
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @return {DoingHook} Function that returns whether a hook is currently
function createDoingHook(hooks, storeKey) {
return function doingHook(hookName) {
const hooksStore = hooks[storeKey];
// If the hookName was not passed, check for any current hook.
if ('undefined' === typeof hookName) {
return 'undefined' !== typeof hooksStore.__current[0];
// Return the __current hook.
return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;
/* harmony default export */ const build_module_createDoingHook = (createDoingHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createDidHook.js
* Returns the number of times an action has been fired.
* @param {string} hookName The hook name to check.
* @return {number | undefined} The number of times the hook has run.
* Returns a function which, when invoked, will return the number of times a
* @param {import('.').Hooks} hooks Hooks instance.
* @param {import('.').StoreKey} storeKey
* @return {DidHook} Function that returns a hook's call count.
function createDidHook(hooks, storeKey) {
return function didHook(hookName) {
const hooksStore = hooks[storeKey];
if (!build_module_validateHookName(hookName)) {
return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;
/* harmony default export */ const build_module_createDidHook = (createDidHook);
;// CONCATENATED MODULE: ./node_modules/@wordpress/hooks/build-module/createHooks.js
* Internal class for constructing hooks. Use `createHooks()` function
* Note, it is necessary to expose this class to make its type public.
/** @type {import('.').Store} actions */
this.actions = Object.create(null);
this.actions.__current = [];
/** @type {import('.').Store} filters */
this.filters = Object.create(null);
this.filters.__current = [];
this.addAction = build_module_createAddHook(this, 'actions');
this.addFilter = build_module_createAddHook(this, 'filters');