: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
styles: "position:absolute;top:0;left:0;opacity:0;width:100%;height:100%"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/progress-bar/index.js
function UnforwardedProgressBar(props, ref) {
const isIndeterminate = !Number.isFinite(value);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(styles_Track, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Indicator, {
'--indicator-width': !isIndeterminate ? `${value}%` : undefined
isIndeterminate: isIndeterminate
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ProgressElement, {
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Loading …'),
* A simple horizontal progress bar component.
* Supports two modes: determinate and indeterminate. A progress bar is determinate
* when a specific progress value has been specified (from 0 to 100), and indeterminate
* when a value hasn't been specified.
* import { ProgressBar } from '@wordpress/components';
* const MyLoadingComponent = () => {
* return <ProgressBar />;
const ProgressBar = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedProgressBar);
/* harmony default export */ const progress_bar = (ProgressBar);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/terms.js
const ensureParentsAreDefined = terms => {
return terms.every(term => term.parent !== null);
* Returns terms in a tree form.
* @param flatTerms Array of terms in flat format.
* @return Terms in tree format.
function buildTermsTree(flatTerms) {
const flatTermsWithParentAndChildren = flatTerms.map(term => ({
// We use a custom type guard here to ensure that the parent property is
// defined on all terms. The type of the `parent` property is `number | null`
// and we need to ensure that it is `number`. This is because we use the
// `parent` property as a key in the `termsByParent` object.
if (!ensureParentsAreDefined(flatTermsWithParentAndChildren)) {
return flatTermsWithParentAndChildren;
const termsByParent = flatTermsWithParentAndChildren.reduce((acc, term) => {
const fillWithChildren = terms => {
return terms.map(term => {
const children = termsByParent[term.id];
children: children && children.length ? fillWithChildren(children) : []
return fillWithChildren(termsByParent['0'] || []);
;// CONCATENATED MODULE: external ["wp","htmlEntities"]
const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/tree-select/index.js
function getSelectOptions(tree, level = 0) {
return tree.flatMap(treeNode => [{
label: '\u00A0'.repeat(level * 3) + (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(treeNode.name)
}, ...getSelectOptions(treeNode.children || [], level + 1)]);
* TreeSelect component is used to generate select input fields.
* import { TreeSelect } from '@wordpress/components';
* import { useState } from '@wordpress/element';
* const MyTreeSelect = () => {
* const [ page, setPage ] = useState( 'p21' );
* noOptionLabel="No parent page"
* onChange={ ( newPage ) => setPage( newPage ) }
* { name: 'Descend 1 of page 1', id: 'p11' },
* { name: 'Descend 2 of page 1', id: 'p12' },
* name: 'Descend 1 of page 2',
* name: 'Descend 1 of Descend 1 of page 2',
function TreeSelect(props) {
} = useDeprecated36pxDefaultSizeProp(props);
const options = (0,external_wp_element_namespaceObject.useMemo)(() => {
return [noOptionLabel && {
}, ...getSelectOptions(tree)].filter(option => !!option);
}, [noOptionLabel, tree]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(SelectControl, {
/* harmony default export */ const tree_select = (TreeSelect);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/author-select.js
const termsTree = buildTermsTree(authorList);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tree_select, {
selectedId: selectedAuthorId !== undefined ? String(selectedAuthorId) : undefined,
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/category-select.js
function CategorySelect({
const termsTree = (0,external_wp_element_namespaceObject.useMemo)(() => {
return buildTermsTree(categoriesList);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tree_select, {
selectedId: selectedCategoryId !== undefined ? String(selectedCategoryId) : undefined,
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/query-controls/index.js
const DEFAULT_MIN_ITEMS = 1;
const DEFAULT_MAX_ITEMS = 100;
const MAX_CATEGORIES_SUGGESTIONS = 20;
function isSingleCategorySelection(props) {
return 'categoriesList' in props;
function isMultipleCategorySelection(props) {
return 'categorySuggestions' in props;
* Controls to query for posts.
* const MyQueryControls = () => (
* { ...{ maxItems, minItems, numberOfItems, order, orderBy } }
* onOrderByChange={ ( newOrderBy ) => {
* updateQuery( { orderBy: newOrderBy } )
* onOrderChange={ ( newOrder ) => {
* updateQuery( { order: newOrder } )
* categoriesList={ categories }
* selectedCategoryId={ category }
* onCategoryChange={ ( newCategory ) => {
* updateQuery( { category: newCategory } )
* onNumberOfItemsChange={ ( newNumberOfItems ) => {
* updateQuery( { numberOfItems: newNumberOfItems } )
__next40pxDefaultSize = false,
maxItems = DEFAULT_MAX_ITEMS,
minItems = DEFAULT_MIN_ITEMS,
// Props for single OR multiple category selection are not destructured here,
// but instead are destructured inline where necessary.
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(v_stack_component, {
className: "components-query-controls",
children: [onOrderChange && onOrderByChange && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(select_control, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Order by'),
value: `${orderBy}/${order}`,
label: (0,external_wp_i18n_namespaceObject.__)('Newest to oldest'),
label: (0,external_wp_i18n_namespaceObject.__)('Oldest to newest'),
/* translators: Label for ordering posts by title in ascending order. */
label: (0,external_wp_i18n_namespaceObject.__)('A → Z'),
/* translators: Label for ordering posts by title in descending order. */
label: (0,external_wp_i18n_namespaceObject.__)('Z → A'),
if (typeof value !== 'string') {
const [newOrderBy, newOrder] = value.split('/');
if (newOrder !== order) {
if (newOrderBy !== orderBy) {
onOrderByChange(newOrderBy);
}, "query-controls-order-select"), isSingleCategorySelection(props) && props.categoriesList && props.onCategoryChange && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CategorySelect, {
__next40pxDefaultSize: __next40pxDefaultSize,
categoriesList: props.categoriesList,
label: (0,external_wp_i18n_namespaceObject.__)('Category'),
noOptionLabel: (0,external_wp_i18n_namespaceObject._x)('All', 'categories'),
selectedCategoryId: props.selectedCategoryId,
onChange: props.onCategoryChange
}, "query-controls-category-select"), isMultipleCategorySelection(props) && props.categorySuggestions && props.onCategoryChange && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(form_token_field, {
__next40pxDefaultSize: __next40pxDefaultSize,
__nextHasNoMarginBottom: true,
label: (0,external_wp_i18n_namespaceObject.__)('Categories'),
value: props.selectedCategories && props.selectedCategories.map(item => ({
// Keeping the fallback to `item.value` for legacy reasons,
// even if items of `selectedCategories` should not have a
value: item.name || item.value
suggestions: Object.keys(props.categorySuggestions),
onChange: props.onCategoryChange,
maxSuggestions: MAX_CATEGORIES_SUGGESTIONS
}, "query-controls-categories-select"), onAuthorChange && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(AuthorSelect, {
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Author'),
noOptionLabel: (0,external_wp_i18n_namespaceObject._x)('All', 'authors'),
selectedAuthorId: selectedAuthorId,
}, "query-controls-author-select"), onNumberOfItemsChange && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(range_control, {
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: __next40pxDefaultSize,
label: (0,external_wp_i18n_namespaceObject.__)('Number of items'),
onChange: onNumberOfItemsChange,
}, "query-controls-range-control")]
/* harmony default export */ const query_controls = (QueryControls);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-group/context.js
// eslint-disable-next-line no-restricted-imports
const RadioGroupContext = (0,external_wp_element_namespaceObject.createContext)({
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-group/radio.js
// eslint-disable-next-line no-restricted-imports
function UnforwardedRadio({
} = (0,external_wp_element_namespaceObject.useContext)(RadioGroupContext);
const selectedValue = store?.useState('value');
const isChecked = selectedValue !== undefined && selectedValue === value;
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Radio, {
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_button, {
variant: isChecked ? 'primary' : 'secondary',
children: children || value
* @deprecated Use `RadioControl` or `ToggleGroupControl` instead.
const radio_Radio = (0,external_wp_element_namespaceObject.forwardRef)(UnforwardedRadio);
/* harmony default export */ const radio_group_radio = (radio_Radio);
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/radio-group/index.js
// eslint-disable-next-line no-restricted-imports