: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* harmony default export */ const colors_values = ((/* unused pure expression or super */ null && (COLORS)));
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
styles: "border-radius:2px;box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none"
return /*#__PURE__*/emotion_react_browser_esm_css("grid-template-rows:repeat( 3, calc( ", size, "px / 3 ) );width:", size, "px;" + ( true ? "" : 0), true ? "" : 0);
const Root = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
} : 0)(rootBase, ";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;", rootSize, ";" + ( true ? "" : 0));
const Row = /*#__PURE__*/emotion_styled_base_browser_esm("div", true ? {
styles: "box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )"
const boxShadow = isActive ? `0 0 0 2px ${COLORS.gray[900]}` : null;
const pointColor = isActive ? COLORS.gray[900] : COLORS.gray[400];
const pointColorHover = isActive ? COLORS.gray[900] : COLORS.theme.accent;
return /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:", boxShadow, ";color:", pointColor, ";*:hover>&{color:", pointColorHover, ";}" + ( true ? "" : 0), true ? "" : 0);
const pointBase = props => {
return /*#__PURE__*/emotion_react_browser_esm_css("background:currentColor;box-sizing:border-box;display:grid;margin:auto;@media not ( prefers-reduced-motion ){transition:all 120ms linear;}", pointActive(props), ";" + ( true ? "" : 0), true ? "" : 0);
const Point = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
} : 0)("height:6px;width:6px;", pointBase, ";" + ( true ? "" : 0));
const Cell = /*#__PURE__*/emotion_styled_base_browser_esm("span", true ? {
styles: "appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0"
;// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/alignment-matrix-control/cell.js
const tooltipText = ALIGNMENT_LABEL[value];
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(tooltip, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(CompositeItem, {
render: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Cell, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(visually_hidden_component, {
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Point, {
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/Y6GYTNQ2.js
// src/collection/collection-store.ts
function useCollectionStoreProps(store, update, props) {
useUpdateEffect(update, [props.store]);
useStoreProps(store, props, "items", "setItems");
function useCollectionStore(props = {}) {
const [store, update] = useStore(Core.createCollectionStore, props);
return useCollectionStoreProps(store, update, props);
;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/22K762VQ.js
// src/collection/collection-store.ts
function isElementPreceding(a, b) {
b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING
function sortBasedOnDOMPosition(items) {
const pairs = items.map((item, index) => [index, item]);
let isOrderDifferent = false;
pairs.sort(([indexA, a], [indexB, b]) => {
const elementA = a.element;
const elementB = b.element;
if (elementA === elementB)
if (!elementA || !elementB)
if (isElementPreceding(elementA, elementB)) {
return pairs.map(([_, item]) => item);
function getCommonParent(items) {
const firstItem = items.find((item) => !!item.element);
const lastItem = [...items].reverse().find((item) => !!item.element);
let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;
while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {
const parent = parentElement;
if (lastItem && parent.contains(lastItem.element)) {
parentElement = parentElement.parentElement;
return DLOEKDPY_getDocument(parentElement).body;
function getPrivateStore(store) {
return store == null ? void 0 : store.__unstablePrivateStore;
function createCollectionStore(props = {}) {
throwOnConflictingProps(props, props.store);
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
const items = defaultValue(
syncState == null ? void 0 : syncState.items,
const itemsMap = new Map(items.map((item) => [item.id, item]));
renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])
const syncPrivateStore = getPrivateStore(props.store);
const privateStore = createStore(
{ items, renderedItems: initialState.renderedItems },
const collection = createStore(initialState, props.store);
const sortItems = (renderedItems) => {
const sortedItems = sortBasedOnDOMPosition(renderedItems);
privateStore.setState("renderedItems", sortedItems);
collection.setState("renderedItems", sortedItems);
setup(collection, () => init(privateStore));
setup(privateStore, () => {
return batch(privateStore, ["items"], (state) => {
collection.setState("items", state.items);
setup(privateStore, () => {
return batch(privateStore, ["renderedItems"], (state) => {
let raf = requestAnimationFrame(() => {
const { renderedItems } = collection.getState();
if (state.renderedItems === renderedItems)
sortItems(state.renderedItems);
if (typeof IntersectionObserver !== "function") {
return () => cancelAnimationFrame(raf);
const ioCallback = () => {
cancelAnimationFrame(raf);
raf = requestAnimationFrame(() => sortItems(state.renderedItems));
const root = getCommonParent(state.renderedItems);
const observer = new IntersectionObserver(ioCallback, { root });
for (const item of state.renderedItems) {
observer.observe(item.element);
cancelAnimationFrame(raf);
const mergeItem = (item, setItems, canDeleteFromMap = false) => {
const index = items2.findIndex(({ id }) => id === item.id);
const nextItems = items2.slice();
prevItem = items2[index];
const nextItem = _chunks_4R3V3JGP_spreadValues(_chunks_4R3V3JGP_spreadValues({}, prevItem), item);
nextItems[index] = nextItem;
itemsMap.set(item.id, nextItem);
itemsMap.set(item.id, item);
const unmergeItem = () => {
itemsMap.delete(item.id);
return items2.filter(({ id }) => id !== item.id);
const index = items2.findIndex(({ id }) => id === item.id);
const nextItems = items2.slice();
nextItems[index] = prevItem;
itemsMap.set(item.id, prevItem);
const registerItem = (item) => mergeItem(
(getItems) => privateStore.setState("items", getItems),
return _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, collection), {
renderItem: (item) => chain(
(getItems) => privateStore.setState("renderedItems", getItems)
let item = itemsMap.get(id);
const { items: items2 } = collection.getState();
item = items2.find((item2) => item2.id === id);
// @ts-expect-error Internal
__unstablePrivateStore: privateStore
;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js
if (Array.isArray(arg)) {
return typeof arg !== "undefined" ? [arg] : [];
function addItemToArray(array, item, index = -1) {
return [...array.slice(0, index), item, ...array.slice(index)];
function flatten2DArray(array) {
for (const row of array) {
function reverseArray(array) {
return array.slice().reverse();
;// CONCATENATED MODULE: ./node_modules/@ariakit/core/esm/__chunks/IERTEJ3A.js
// src/composite/composite-store.ts
var IERTEJ3A_NULL_ITEM = { id: null };
function IERTEJ3A_findFirstEnabledItem(items, excludeId) {
return items.find((item) => {
return !item.disabled && item.id !== excludeId;
function getEnabledItems(items, excludeId) {
return items.filter((item) => {
return !item.disabled && item.id !== excludeId;
function getOppositeOrientation(orientation) {
if (orientation === "vertical")
if (orientation === "horizontal")
function getItemsInRow(items, rowId) {
return items.filter((item) => item.rowId === rowId);
function IERTEJ3A_flipItems(items, activeId, shouldInsertNullItem = false) {
const index = items.findIndex((item) => item.id === activeId);
...items.slice(index + 1),
...shouldInsertNullItem ? [IERTEJ3A_NULL_ITEM] : [],
function IERTEJ3A_groupItemsByRows(items) {
for (const item of items) {
const row = rows.find((currentRow) => {
return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;
function getMaxRowLength(array) {
for (const { length } of array) {
if (length > maxLength) {
function createEmptyItem(rowId) {
function normalizeRows(rows, activeId, focusShift) {
const maxLength = getMaxRowLength(rows);
for (const row of rows) {
for (let i = 0; i < maxLength; i += 1) {
if (!item || focusShift && item.disabled) {
const previousItem = isFirst && focusShift ? IERTEJ3A_findFirstEnabledItem(row) : row[i - 1];
row[i] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);
function verticalizeItems(items) {
const rows = IERTEJ3A_groupItemsByRows(items);
const maxLength = getMaxRowLength(rows);
for (let i = 0; i < maxLength; i += 1) {
for (const row of rows) {
verticalized.push(_chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, item), {
// If there's no rowId, it means that it's not a grid composite, but
// a single row instead. So, instead of verticalizing it, that is,
// assigning a different rowId based on the column index, we keep it
// undefined so they will be part of the same row. This is useful
// when using up/down on one-dimensional composites.
rowId: item.rowId ? `${i}` : void 0
function createCompositeStore(props = {}) {
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
const collection = createCollectionStore(props);
const activeId = defaultValue(
syncState == null ? void 0 : syncState.activeId,
const initialState = _chunks_4R3V3JGP_spreadProps(_chunks_4R3V3JGP_spreadValues({}, collection.getState()), {
baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),
includesBaseElement: defaultValue(
props.includesBaseElement,
syncState == null ? void 0 : syncState.includesBaseElement,
moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),
orientation: defaultValue(
syncState == null ? void 0 : syncState.orientation,
rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),
virtualFocus: defaultValue(
syncState == null ? void 0 : syncState.virtualFocus,
focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),
focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
const composite = createStore(initialState, collection, props.store);
() => sync(composite, ["renderedItems", "activeId"], (state) => {
composite.setState("activeId", (activeId2) => {
if (activeId2 !== void 0)
return (_a2 = IERTEJ3A_findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;
const getNextId = (items, orientation, hasNullItem, skip) => {
const { activeId: activeId2, rtl, focusLoop, focusWrap, includesBaseElement } = composite.getState();
const isHorizontal = orientation !== "vertical";
const isRTL = rtl && isHorizontal;
const allItems = isRTL ? reverseArray(items) : items;
return (_a2 = IERTEJ3A_findFirstEnabledItem(allItems)) == null ? void 0 : _a2.id;