: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const ancestorProperty = getPropertyName(id, true);
if (element[ancestorProperty])
const elementProperty = getPropertyName(id);
if (element[elementProperty])
if (!element.parentElement)
element = element.parentElement;
function markTreeOutside(id, elements) {
const ids = elements.map((el) => el == null ? void 0 : el.id);
_72E5EPFF_walkTreeOutside(
if (MKDDWKFK_isBackdrop(element, ...ids))
cleanups.unshift(markElement(element, id));
const isAnotherDialogAncestor = element.hasAttribute("data-dialog") && element.id !== id;
if (isAnotherDialogAncestor)
cleanups.unshift(markAncestor(ancestor, id));
const restoreAccessibilityTree = () => {
cleanups.forEach((fn) => fn());
return restoreAccessibilityTree;
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CLE7NTOY.js
// src/disclosure/disclosure-content.tsx
function afterTimeout(timeoutMs, cb) {
const timeoutId = setTimeout(cb, timeoutMs);
return () => clearTimeout(timeoutId);
function CLE7NTOY_afterPaint(cb) {
let raf = requestAnimationFrame(() => {
raf = requestAnimationFrame(cb);
return () => cancelAnimationFrame(raf);
function parseCSSTime(...times) {
return times.join(", ").split(", ").reduce((longestTime, currentTimeString) => {
const currentTime = parseFloat(currentTimeString || "0s") * 1e3;
if (currentTime > longestTime)
function isHidden(mounted, hidden, alwaysVisible) {
return !alwaysVisible && hidden !== false && (!mounted || !!hidden);
var useDisclosureContent = createHook(
var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, ["store", "alwaysVisible"]);
const context = useDisclosureProviderContext();
store = store || context;
const id = useId(props.id);
const [transition, setTransition] = (0,external_React_.useState)(null);
const open = store.useState("open");
const mounted = store.useState("mounted");
const animated = store.useState("animated");
const contentElement = store.useState("contentElement");
useSafeLayoutEffect(() => {
if (!(contentElement == null ? void 0 : contentElement.isConnected)) {
return CLE7NTOY_afterPaint(() => {
setTransition(open ? "enter" : "leave");
}, [animated, contentElement, open]);
useSafeLayoutEffect(() => {
if (transition === "enter" && !open)
if (transition === "leave" && open)
if (typeof animated === "number") {
const timeoutMs2 = animated;
return afterTimeout(timeoutMs2, store.stopAnimation);
} = getComputedStyle(contentElement);
const delay = parseCSSTime(transitionDelay, animationDelay);
const duration = parseCSSTime(transitionDuration, animationDuration);
const timeoutMs = delay + duration;
return afterTimeout(timeoutMs, store.stopAnimation);
}, [store, animated, contentElement, open, transition]);
(element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DialogScopedContextProvider, { value: store, children: element }),
const hidden = isHidden(mounted, props.hidden, alwaysVisible);
const style = hidden ? _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props.style), { display: "none" }) : props.style;
props = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
"data-enter": transition === "enter" ? "" : void 0,
"data-leave": transition === "leave" ? "" : void 0,
ref: useMergeRefs(id ? store.setContentElement : null, props.ref),
var DisclosureContentImpl = createComponent(
const htmlProps = useDisclosureContent(props);
return _3ORBWXWF_createElement("div", htmlProps);
var DisclosureContent = createComponent(
var _b = _a, { unmountOnHide } = _b, props = __objRest(_b, ["unmountOnHide"]);
const context = useDisclosureProviderContext();
const store = props.store || context;
const mounted = useStoreState(
(state) => !unmountOnHide || (state == null ? void 0 : state.mounted)
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(DisclosureContentImpl, _4R3V3JGP_spreadValues({}, props));
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/LWHPHW7Q.js
// src/dialog/dialog-backdrop.tsx
function DialogBackdrop({
const ref = (0,external_React_.useRef)(null);
const disclosure = useDisclosureStore({ disclosure: store });
const contentElement = store.useState("contentElement");
useSafeLayoutEffect(() => {
const backdrop2 = ref.current;
const dialog = contentElement;
backdrop2.style.zIndex = getComputedStyle(dialog).zIndex;
useSafeLayoutEffect(() => {
const id = contentElement == null ? void 0 : contentElement.id;
const backdrop2 = ref.current;
return markAncestor(backdrop2, id);
backdropProps = _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, backdropProps), { hidden });
const props = useDisclosureContent(_4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({
"data-backdrop": (contentElement == null ? void 0 : contentElement.id) || "",
ref: useMergeRefs(backdropProps == null ? void 0 : backdropProps.ref, ref),
style: _4R3V3JGP_spreadValues({
}, backdropProps == null ? void 0 : backdropProps.style)
if ((0,external_React_.isValidElement)(backdrop)) {
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Role, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { render: backdrop }));
const Component = typeof backdrop !== "boolean" ? backdrop : "div";
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Role, _4R3V3JGP_spreadProps(_4R3V3JGP_spreadValues({}, props), { render: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(Component, {}) }));
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/BULCTPRV.js
// src/dialog/utils/disable-accessibility-tree-outside.ts
function hideElementFromAccessibilityTree(element) {
return setAttribute(element, "aria-hidden", "true");
function disableAccessibilityTreeOutside(id, elements) {
const ids = elements.map((el) => el == null ? void 0 : el.id);
walkTreeOutside(id, elements, (element) => {
if (isBackdrop(element, ...ids))
cleanups.unshift(hideElementFromAccessibilityTree(element));
const restoreAccessibilityTree = () => {
cleanups.forEach((fn) => fn());
return restoreAccessibilityTree;
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/677M2CI3.js
// src/dialog/utils/supports-inert.ts
function supportsInert() {
return "inert" in HTMLElement.prototype;
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/TQYOGOE2.js
// src/dialog/utils/disable-tree.ts
function disableTree(element, ignoredElements) {
if (!("style" in element))
return setProperty(element, "inert", true);
const tabbableElements = getAllTabbableIn(element, true);
const enableElements = tabbableElements.map((element2) => {
if (ignoredElements == null ? void 0 : ignoredElements.some((el) => el && contains(el, element2)))
return setAttribute(element2, "tabindex", "-1");
hideElementFromAccessibilityTree(element),
function disableTreeOutside(id, elements) {
const ids = elements.map((el) => el == null ? void 0 : el.id);
_72E5EPFF_walkTreeOutside(id, elements, (element) => {
if (MKDDWKFK_isBackdrop(element, ...ids))
cleanups.unshift(disableTree(element, elements));
const restoreTreeOutside = () => {
cleanups.forEach((fn) => fn());
return restoreTreeOutside;
;// CONCATENATED MODULE: external "ReactDOM"
const external_ReactDOM_namespaceObject = window["ReactDOM"];
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/CS347UVZ.js
// src/dialog/utils/use-root-dialog.ts
const [updated, retry] = useForceUpdate();
const isRootDialog = (0,external_React_.useCallback)(() => {
const { body } = DLOEKDPY_getDocument(contentElement);
const id = body.getAttribute(attribute);
return !id || id === contentId;
}, [updated, enabled, contentElement, attribute, contentId]);
(0,external_React_.useEffect)(() => {
const { body } = DLOEKDPY_getDocument(contentElement);
body.setAttribute(attribute, contentId);
return () => body.removeAttribute(attribute);
const observer = new MutationObserver(() => (0,external_ReactDOM_namespaceObject.flushSync)(retry));
observer.observe(body, { attributeFilter: [attribute] });
return () => observer.disconnect();
}, [updated, enabled, contentId, contentElement, isRootDialog, attribute]);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/6BJGLK2C.js
// src/dialog/utils/use-prevent-body-scroll.ts
function getPaddingProperty(documentElement) {
const documentLeft = documentElement.getBoundingClientRect().left;
const scrollbarX = Math.round(documentLeft) + documentElement.scrollLeft;
return scrollbarX ? "paddingLeft" : "paddingRight";
function usePreventBodyScroll(contentElement, contentId, enabled) {
const isRootDialog = useRootDialog({
attribute: "data-dialog-prevent-body-scroll",
(0,external_React_.useEffect)(() => {
const doc = DLOEKDPY_getDocument(contentElement);
const win = getWindow(contentElement);
const { documentElement, body } = doc;
const cssScrollbarWidth = documentElement.style.getPropertyValue("--scrollbar-width");
const scrollbarWidth = cssScrollbarWidth ? parseInt(cssScrollbarWidth) : win.innerWidth - documentElement.clientWidth;
const setScrollbarWidthProperty = () => setCSSProperty(
const paddingProperty = getPaddingProperty(documentElement);
const setStyle = () => assignStyle(body, {
[paddingProperty]: `${scrollbarWidth}px`
const setIOSStyle = () => {
const { scrollX, scrollY, visualViewport } = win;
const offsetLeft = (_a = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a : 0;
const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0;
const restoreStyle = assignStyle(body, {
top: `${-(scrollY - Math.floor(offsetTop))}px`,
left: `${-(scrollX - Math.floor(offsetLeft))}px`,
[paddingProperty]: `${scrollbarWidth}px`
win.scrollTo(scrollX, scrollY);
const isIOS = isApple() && !isMac();
setScrollbarWidthProperty(),
isIOS ? setIOSStyle() : setStyle()
}, [isRootDialog, contentElement]);
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/IUB2BTEK.js
// src/dialog/utils/use-nested-dialogs.tsx
var NestedDialogsContext = (0,external_React_.createContext)({});
function useNestedDialogs(store) {
const context = (0,external_React_.useContext)(NestedDialogsContext);
const [dialogs, setDialogs] = (0,external_React_.useState)([]);
const add = (0,external_React_.useCallback)(
setDialogs((dialogs2) => [...dialogs2, dialog]);
return chain((_a = context.add) == null ? void 0 : _a.call(context, dialog), () => {
setDialogs((dialogs2) => dialogs2.filter((d) => d !== dialog));
useSafeLayoutEffect(() => {
return sync(store, ["open", "contentElement"], (state) => {
if (!state.contentElement)
return (_a = context.add) == null ? void 0 : _a.call(context, store);
const providerValue = (0,external_React_.useMemo)(() => ({ store, add }), [store, add]);
const wrapElement = (0,external_React_.useCallback)(
(element) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NestedDialogsContext.Provider, { value: providerValue, children: element }),
return { wrapElement, nestedDialogs: dialogs };
;// CONCATENATED MODULE: ./node_modules/@ariakit/react-core/esm/__chunks/OOBDFMJL.js
// src/dialog/utils/use-previous-mouse-down-ref.ts
function usePreviousMouseDownRef(enabled) {
const previousMouseDownRef = (0,external_React_.useRef)();
(0,external_React_.useEffect)(() => {
previousMouseDownRef.current = null;