PluginProbe
Gutenberg / 24.1.0
Gutenberg v24.1.0
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/commands/index.js +248 -980 23.5.0 → 24.1.0 View file →
@@ -1,4 +1,5 @@
1 +(function() {
1 2 var wp;
2 3 (wp ||= {}).commands = (() => {
3 4 var __create = Object.create;
4 5 var __defProp = Object.defineProperty;
@@ -86,8 +87,15 @@
86 87 module.exports = window.wp.keyboardShortcuts;
87 88 }
88 89 });
89 90
91 + // package-external:@wordpress/keycodes
92 + var require_keycodes = __commonJS({
93 + "package-external:@wordpress/keycodes"(exports, module) {
94 + module.exports = window.wp.keycodes;
95 + }
96 + });
97 +
90 98 // package-external:@wordpress/primitives
91 99 var require_primitives = __commonJS({
92 100 "package-external:@wordpress/primitives"(exports, module) {
93 101 module.exports = window.wp.primitives;
@@ -146,11 +154,11 @@
146 154 return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
147 155 }
148 156
149 157 // node_modules/@radix-ui/react-dialog/dist/index.mjs
150 - var React37 = __toESM(require_react(), 1);
158 + var React24 = __toESM(require_react(), 1);
151 159
152 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.mjs
160 + // node_modules/@radix-ui/primitive/dist/index.mjs
153 161 var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
154 162 function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
155 163 return function handleEvent(event) {
156 164 originalEventHandler?.(event);
@@ -159,9 +167,9 @@
159 167 }
160 168 };
161 169 }
162 170
163 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
171 + // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
164 172 var React = __toESM(require_react(), 1);
165 173 function setRef(ref, value) {
166 174 if (typeof ref === "function") {
167 175 return ref(value);
@@ -273,17 +281,17 @@
273 281 createScope.scopeName = baseScope.scopeName;
274 282 return createScope;
275 283 }
276 284
277 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
285 + // node_modules/@radix-ui/react-id/dist/index.mjs
278 286 var React4 = __toESM(require_react(), 1);
279 287
280 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
288 + // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
281 289 var React3 = __toESM(require_react(), 1);
282 290 var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
283 291 };
284 292
285 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-id/dist/index.mjs
293 + // node_modules/@radix-ui/react-id/dist/index.mjs
286 294 var useReactId = React4[" useId ".trim().toString()] || (() => void 0);
287 295 var count = 0;
288 296 function useId(deterministicId) {
289 297 const [id, setId] = React4.useState(useReactId());
@@ -361,85 +369,35 @@
361 369 return typeof value === "function";
362 370 }
363 371
364 372 // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
365 - var React11 = __toESM(require_react(), 1);
373 + var React10 = __toESM(require_react(), 1);
366 374
367 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive/dist/index.mjs
368 - var canUseDOM2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
369 - function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
370 - return function handleEvent(event) {
371 - originalEventHandler?.(event);
372 - if (checkForDefaultPrevented === false || !event.defaultPrevented) {
373 - return ourEventHandler?.(event);
374 - }
375 - };
376 - }
377 -
378 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
379 - var React8 = __toESM(require_react(), 1);
375 + // node_modules/@radix-ui/react-primitive/dist/index.mjs
376 + var React7 = __toESM(require_react(), 1);
380 377 var ReactDOM = __toESM(require_react_dom(), 1);
381 378
382 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
383 - var React7 = __toESM(require_react(), 1);
384 -
385 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
379 + // node_modules/@radix-ui/react-slot/dist/index.mjs
386 380 var React6 = __toESM(require_react(), 1);
387 - function setRef2(ref, value) {
388 - if (typeof ref === "function") {
389 - return ref(value);
390 - } else if (ref !== null && ref !== void 0) {
391 - ref.current = value;
392 - }
393 - }
394 - function composeRefs2(...refs) {
395 - return (node) => {
396 - let hasCleanup = false;
397 - const cleanups = refs.map((ref) => {
398 - const cleanup = setRef2(ref, node);
399 - if (!hasCleanup && typeof cleanup == "function") {
400 - hasCleanup = true;
401 - }
402 - return cleanup;
403 - });
404 - if (hasCleanup) {
405 - return () => {
406 - for (let i = 0; i < cleanups.length; i++) {
407 - const cleanup = cleanups[i];
408 - if (typeof cleanup == "function") {
409 - cleanup();
410 - } else {
411 - setRef2(refs[i], null);
412 - }
413 - }
414 - };
415 - }
416 - };
417 - }
418 - function useComposedRefs2(...refs) {
419 - return React6.useCallback(composeRefs2(...refs), refs);
420 - }
421 -
422 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs
423 381 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
424 382 // @__NO_SIDE_EFFECTS__
425 383 function createSlot(ownerName) {
426 384 const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
427 - const Slot2 = React7.forwardRef((props, forwardedRef) => {
385 + const Slot2 = React6.forwardRef((props, forwardedRef) => {
428 386 const { children, ...slotProps } = props;
429 - const childrenArray = React7.Children.toArray(children);
387 + const childrenArray = React6.Children.toArray(children);
430 388 const slottable = childrenArray.find(isSlottable);
431 389 if (slottable) {
432 390 const newElement = slottable.props.children;
433 391 const newChildren = childrenArray.map((child) => {
434 392 if (child === slottable) {
435 - if (React7.Children.count(newElement) > 1) return React7.Children.only(null);
436 - return React7.isValidElement(newElement) ? newElement.props.children : null;
393 + if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
394 + return React6.isValidElement(newElement) ? newElement.props.children : null;
437 395 } else {
438 396 return child;
439 397 }
440 398 });
441 - return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React7.isValidElement(newElement) ? React7.cloneElement(newElement, void 0, newChildren) : null });
399 + return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
442 400 }
443 401 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
444 402 });
445 403 Slot2.displayName = `${ownerName}.Slot`;
@@ -446,19 +404,19 @@
446 404 return Slot2;
447 405 }
448 406 // @__NO_SIDE_EFFECTS__
449 407 function createSlotClone(ownerName) {
450 - const SlotClone = React7.forwardRef((props, forwardedRef) => {
408 + const SlotClone = React6.forwardRef((props, forwardedRef) => {
451 409 const { children, ...slotProps } = props;
452 - if (React7.isValidElement(children)) {
410 + if (React6.isValidElement(children)) {
453 411 const childrenRef = getElementRef(children);
454 412 const props2 = mergeProps(slotProps, children.props);
455 - if (children.type !== React7.Fragment) {
456 - props2.ref = forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef;
413 + if (children.type !== React6.Fragment) {
414 + props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
457 415 }
458 - return React7.cloneElement(children, props2);
416 + return React6.cloneElement(children, props2);
459 417 }
460 - return React7.Children.count(children) > 1 ? React7.Children.only(null) : null;
418 + return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
461 419 });
462 420 SlotClone.displayName = `${ownerName}.SlotClone`;
463 421 return SlotClone;
464 422 }
@@ -463,9 +421,9 @@
463 421 return SlotClone;
464 422 }
465 423 var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
466 424 function isSlottable(child) {
467 - return React7.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
425 + return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
468 426 }
469 427 function mergeProps(slotProps, childProps) {
470 428 const overrideProps = { ...childProps };
471 429 for (const propName in childProps) {
@@ -503,9 +461,9 @@
503 461 }
504 462 return element.props.ref || element.ref;
505 463 }
506 464
507 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs
465 + // node_modules/@radix-ui/react-primitive/dist/index.mjs
508 466 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
509 467 var NODES = [
510 468 "a",
511 469 "button",
@@ -526,9 +484,9 @@
526 484 "ul"
527 485 ];
528 486 var Primitive = NODES.reduce((primitive, node) => {
529 487 const Slot2 = createSlot(`Primitive.${node}`);
530 - const Node2 = React8.forwardRef((props, forwardedRef) => {
488 + const Node2 = React7.forwardRef((props, forwardedRef) => {
531 489 const { asChild, ...primitiveProps } = props;
532 490 const Comp = asChild ? Slot2 : node;
533 491 if (typeof window !== "undefined") {
534 492 window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
@@ -541,23 +499,23 @@
541 499 function dispatchDiscreteCustomEvent(target, event) {
542 500 if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
543 501 }
544 502
545 - // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
546 - var React9 = __toESM(require_react(), 1);
503 + // node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
504 + var React8 = __toESM(require_react(), 1);
547 505 function useCallbackRef(callback) {
548 - const callbackRef = React9.useRef(callback);
549 - React9.useEffect(() => {
506 + const callbackRef = React8.useRef(callback);
507 + React8.useEffect(() => {
550 508 callbackRef.current = callback;
551 509 });
552 - return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
510 + return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
553 511 }
554 512
555 513 // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
556 - var React10 = __toESM(require_react(), 1);
514 + var React9 = __toESM(require_react(), 1);
557 515 function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
558 516 const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
559 - React10.useEffect(() => {
517 + React9.useEffect(() => {
560 518 const handleKeyDown = (event) => {
561 519 if (event.key === "Escape") {
562 520 onEscapeKeyDown(event);
563 521 }
@@ -573,14 +531,14 @@
573 531 var CONTEXT_UPDATE = "dismissableLayer.update";
574 532 var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
575 533 var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
576 534 var originalBodyPointerEvents;
577 - var DismissableLayerContext = React11.createContext({
535 + var DismissableLayerContext = React10.createContext({
578 536 layers: /* @__PURE__ */ new Set(),
579 537 layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
580 538 branches: /* @__PURE__ */ new Set()
581 539 });
582 - var DismissableLayer = React11.forwardRef(
540 + var DismissableLayer = React10.forwardRef(
583 541 (props, forwardedRef) => {
584 542 const {
585 543 disableOutsidePointerEvents = false,
586 544 onEscapeKeyDown,
@@ -589,13 +547,13 @@
589 547 onInteractOutside,
590 548 onDismiss,
591 549 ...layerProps
592 550 } = props;
593 - const context2 = React11.useContext(DismissableLayerContext);
594 - const [node, setNode] = React11.useState(null);
551 + const context2 = React10.useContext(DismissableLayerContext);
552 + const [node, setNode] = React10.useState(null);
595 553 const ownerDocument = node?.ownerDocument ?? globalThis?.document;
596 - const [, force] = React11.useState({});
597 - const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
554 + const [, force] = React10.useState({});
555 + const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
598 556 const layers = Array.from(context2.layers);
599 557 const [highestLayerWithOutsidePointerEventsDisabled] = [...context2.layersWithOutsidePointerEventsDisabled].slice(-1);
600 558 const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
601 559 const index = node ? layers.indexOf(node) : -1;
@@ -625,9 +583,9 @@
625 583 event.preventDefault();
626 584 onDismiss();
627 585 }
628 586 }, ownerDocument);
629 - React11.useEffect(() => {
587 + React10.useEffect(() => {
630 588 if (!node) return;
631 589 if (disableOutsidePointerEvents) {
632 590 if (context2.layersWithOutsidePointerEventsDisabled.size === 0) {
633 591 originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
@@ -642,9 +600,9 @@
642 600 ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
643 601 }
644 602 };
645 603 }, [node, ownerDocument, disableOutsidePointerEvents, context2]);
646 - React11.useEffect(() => {
604 + React10.useEffect(() => {
647 605 return () => {
648 606 if (!node) return;
649 607 context2.layers.delete(node);
650 608 context2.layersWithOutsidePointerEventsDisabled.delete(node);
@@ -650,9 +608,9 @@
650 608 context2.layersWithOutsidePointerEventsDisabled.delete(node);
651 609 dispatchUpdate();
652 610 };
653 611 }, [node, context2]);
654 - React11.useEffect(() => {
612 + React10.useEffect(() => {
655 613 const handleUpdate = () => force({});
656 614 document.addEventListener(CONTEXT_UPDATE, handleUpdate);
657 615 return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
658 616 }, []);
@@ -664,11 +622,11 @@
664 622 style: {
665 623 pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
666 624 ...props.style
667 625 },
668 - onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
669 - onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
670 - onPointerDownCapture: composeEventHandlers2(
626 + onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
627 + onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
628 + onPointerDownCapture: composeEventHandlers(
671 629 props.onPointerDownCapture,
672 630 pointerDownOutside.onPointerDownCapture
673 631 )
674 632 }
@@ -676,13 +634,13 @@
676 634 }
677 635 );
678 636 DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
679 637 var BRANCH_NAME = "DismissableLayerBranch";
680 - var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
681 - const context2 = React11.useContext(DismissableLayerContext);
682 - const ref = React11.useRef(null);
683 - const composedRefs = useComposedRefs2(forwardedRef, ref);
684 - React11.useEffect(() => {
638 + var DismissableLayerBranch = React10.forwardRef((props, forwardedRef) => {
639 + const context2 = React10.useContext(DismissableLayerContext);
640 + const ref = React10.useRef(null);
641 + const composedRefs = useComposedRefs(forwardedRef, ref);
642 + React10.useEffect(() => {
685 643 const node = ref.current;
686 644 if (node) {
687 645 context2.branches.add(node);
688 646 return () => {
@@ -694,12 +652,12 @@
694 652 });
695 653 DismissableLayerBranch.displayName = BRANCH_NAME;
696 654 function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
697 655 const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
698 - const isPointerInsideReactTreeRef = React11.useRef(false);
699 - const handleClickRef = React11.useRef(() => {
656 + const isPointerInsideReactTreeRef = React10.useRef(false);
657 + const handleClickRef = React10.useRef(() => {
700 658 });
701 - React11.useEffect(() => {
659 + React10.useEffect(() => {
702 660 const handlePointerDown = (event) => {
703 661 if (event.target && !isPointerInsideReactTreeRef.current) {
704 662 let handleAndDispatchPointerDownOutsideEvent2 = function() {
705 663 handleAndDispatchCustomEvent(
@@ -738,10 +696,10 @@
738 696 };
739 697 }
740 698 function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
741 699 const handleFocusOutside = useCallbackRef(onFocusOutside);
742 - const isFocusInsideReactTreeRef = React11.useRef(false);
743 - React11.useEffect(() => {
700 + const isFocusInsideReactTreeRef = React10.useRef(false);
701 + React10.useEffect(() => {
744 702 const handleFocus = (event) => {
745 703 if (event.target && !isFocusInsideReactTreeRef.current) {
746 704 const eventDetail = { originalEvent: event };
747 705 handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
@@ -772,189 +730,15 @@
772 730 }
773 731 }
774 732
775 733 // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
776 - var React16 = __toESM(require_react(), 1);
777 -
778 - // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
779 - var React12 = __toESM(require_react(), 1);
780 - function setRef3(ref, value) {
781 - if (typeof ref === "function") {
782 - return ref(value);
783 - } else if (ref !== null && ref !== void 0) {
784 - ref.current = value;
785 - }
786 - }
787 - function composeRefs3(...refs) {
788 - return (node) => {
789 - let hasCleanup = false;
790 - const cleanups = refs.map((ref) => {
791 - const cleanup = setRef3(ref, node);
792 - if (!hasCleanup && typeof cleanup == "function") {
793 - hasCleanup = true;
794 - }
795 - return cleanup;
796 - });
797 - if (hasCleanup) {
798 - return () => {
799 - for (let i = 0; i < cleanups.length; i++) {
800 - const cleanup = cleanups[i];
801 - if (typeof cleanup == "function") {
802 - cleanup();
803 - } else {
804 - setRef3(refs[i], null);
805 - }
806 - }
807 - };
808 - }
809 - };
810 - }
811 - function useComposedRefs3(...refs) {
812 - return React12.useCallback(composeRefs3(...refs), refs);
813 - }
814 -
815 - // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
816 - var React14 = __toESM(require_react(), 1);
817 - var ReactDOM2 = __toESM(require_react_dom(), 1);
818 -
819 - // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs
820 - var React13 = __toESM(require_react(), 1);
734 + var React11 = __toESM(require_react(), 1);
821 735 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
822 - // @__NO_SIDE_EFFECTS__
823 - function createSlot2(ownerName) {
824 - const SlotClone = /* @__PURE__ */ createSlotClone2(ownerName);
825 - const Slot2 = React13.forwardRef((props, forwardedRef) => {
826 - const { children, ...slotProps } = props;
827 - const childrenArray = React13.Children.toArray(children);
828 - const slottable = childrenArray.find(isSlottable2);
829 - if (slottable) {
830 - const newElement = slottable.props.children;
831 - const newChildren = childrenArray.map((child) => {
832 - if (child === slottable) {
833 - if (React13.Children.count(newElement) > 1) return React13.Children.only(null);
834 - return React13.isValidElement(newElement) ? newElement.props.children : null;
835 - } else {
836 - return child;
837 - }
838 - });
839 - return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React13.isValidElement(newElement) ? React13.cloneElement(newElement, void 0, newChildren) : null });
840 - }
841 - return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
842 - });
843 - Slot2.displayName = `${ownerName}.Slot`;
844 - return Slot2;
845 - }
846 - // @__NO_SIDE_EFFECTS__
847 - function createSlotClone2(ownerName) {
848 - const SlotClone = React13.forwardRef((props, forwardedRef) => {
849 - const { children, ...slotProps } = props;
850 - if (React13.isValidElement(children)) {
851 - const childrenRef = getElementRef2(children);
852 - const props2 = mergeProps2(slotProps, children.props);
853 - if (children.type !== React13.Fragment) {
854 - props2.ref = forwardedRef ? composeRefs3(forwardedRef, childrenRef) : childrenRef;
855 - }
856 - return React13.cloneElement(children, props2);
857 - }
858 - return React13.Children.count(children) > 1 ? React13.Children.only(null) : null;
859 - });
860 - SlotClone.displayName = `${ownerName}.SlotClone`;
861 - return SlotClone;
862 - }
863 - var SLOTTABLE_IDENTIFIER2 = /* @__PURE__ */ Symbol("radix.slottable");
864 - function isSlottable2(child) {
865 - return React13.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
866 - }
867 - function mergeProps2(slotProps, childProps) {
868 - const overrideProps = { ...childProps };
869 - for (const propName in childProps) {
870 - const slotPropValue = slotProps[propName];
871 - const childPropValue = childProps[propName];
872 - const isHandler = /^on[A-Z]/.test(propName);
873 - if (isHandler) {
874 - if (slotPropValue && childPropValue) {
875 - overrideProps[propName] = (...args) => {
876 - const result = childPropValue(...args);
877 - slotPropValue(...args);
878 - return result;
879 - };
880 - } else if (slotPropValue) {
881 - overrideProps[propName] = slotPropValue;
882 - }
883 - } else if (propName === "style") {
884 - overrideProps[propName] = { ...slotPropValue, ...childPropValue };
885 - } else if (propName === "className") {
886 - overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
887 - }
888 - }
889 - return { ...slotProps, ...overrideProps };
890 - }
891 - function getElementRef2(element) {
892 - let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
893 - let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
894 - if (mayWarn) {
895 - return element.ref;
896 - }
897 - getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
898 - mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
899 - if (mayWarn) {
900 - return element.props.ref;
901 - }
902 - return element.props.ref || element.ref;
903 - }
904 -
905 - // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs
906 - var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
907 - var NODES2 = [
908 - "a",
909 - "button",
910 - "div",
911 - "form",
912 - "h2",
913 - "h3",
914 - "img",
915 - "input",
916 - "label",
917 - "li",
918 - "nav",
919 - "ol",
920 - "p",
921 - "select",
922 - "span",
923 - "svg",
924 - "ul"
925 - ];
926 - var Primitive2 = NODES2.reduce((primitive, node) => {
927 - const Slot2 = createSlot2(`Primitive.${node}`);
928 - const Node2 = React14.forwardRef((props, forwardedRef) => {
929 - const { asChild, ...primitiveProps } = props;
930 - const Comp = asChild ? Slot2 : node;
931 - if (typeof window !== "undefined") {
932 - window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
933 - }
934 - return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
935 - });
936 - Node2.displayName = `Primitive.${node}`;
937 - return { ...primitive, [node]: Node2 };
938 - }, {});
939 -
940 - // node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
941 - var React15 = __toESM(require_react(), 1);
942 - function useCallbackRef2(callback) {
943 - const callbackRef = React15.useRef(callback);
944 - React15.useEffect(() => {
945 - callbackRef.current = callback;
946 - });
947 - return React15.useMemo(() => (...args) => callbackRef.current?.(...args), []);
948 - }
949 -
950 - // node_modules/@radix-ui/react-focus-scope/dist/index.mjs
951 - var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
952 736 var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
953 737 var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
954 738 var EVENT_OPTIONS = { bubbles: false, cancelable: true };
955 739 var FOCUS_SCOPE_NAME = "FocusScope";
956 - var FocusScope = React16.forwardRef((props, forwardedRef) => {
740 + var FocusScope = React11.forwardRef((props, forwardedRef) => {
957 741 const {
958 742 loop = false,
959 743 trapped = false,
960 744 onMountAutoFocus: onMountAutoFocusProp,
@@ -960,14 +744,14 @@
960 744 onMountAutoFocus: onMountAutoFocusProp,
961 745 onUnmountAutoFocus: onUnmountAutoFocusProp,
962 746 ...scopeProps
963 747 } = props;
964 - const [container, setContainer] = React16.useState(null);
965 - const onMountAutoFocus = useCallbackRef2(onMountAutoFocusProp);
966 - const onUnmountAutoFocus = useCallbackRef2(onUnmountAutoFocusProp);
967 - const lastFocusedElementRef = React16.useRef(null);
968 - const composedRefs = useComposedRefs3(forwardedRef, (node) => setContainer(node));
969 - const focusScope = React16.useRef({
748 + const [container, setContainer] = React11.useState(null);
749 + const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
750 + const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
751 + const lastFocusedElementRef = React11.useRef(null);
752 + const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
753 + const focusScope = React11.useRef({
970 754 paused: false,
971 755 pause() {
972 756 this.paused = true;
973 757 },
@@ -974,9 +758,9 @@
974 758 resume() {
975 759 this.paused = false;
976 760 }
977 761 }).current;
978 - React16.useEffect(() => {
762 + React11.useEffect(() => {
979 763 if (trapped) {
980 764 let handleFocusIn2 = function(event) {
981 765 if (focusScope.paused || !container) return;
982 766 const target = event.target;
@@ -1010,9 +794,9 @@
1010 794 mutationObserver.disconnect();
1011 795 };
1012 796 }
1013 797 }, [trapped, container, focusScope.paused]);
1014 - React16.useEffect(() => {
798 + React11.useEffect(() => {
1015 799 if (container) {
1016 800 focusScopesStack.add(focusScope);
1017 801 const previouslyFocusedElement = document.activeElement;
1018 802 const hasFocusedCandidate = container.contains(previouslyFocusedElement);
@@ -1041,9 +825,9 @@
1041 825 }, 0);
1042 826 };
1043 827 }
1044 828 }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
1045 - const handleKeyDown = React16.useCallback(
829 + const handleKeyDown = React11.useCallback(
1046 830 (event) => {
1047 831 if (!loop && !trapped) return;
1048 832 if (focusScope.paused) return;
1049 833 const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
@@ -1066,9 +850,9 @@
1066 850 }
1067 851 },
1068 852 [loop, trapped, focusScope.paused]
1069 853 );
1070 - return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive2.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
854 + return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
1071 855 });
1072 856 FocusScope.displayName = FOCUS_SCOPE_NAME;
1073 857 function focusFirst(candidates, { select = false } = {}) {
1074 858 const previouslyFocusedElement = document.activeElement;
@@ -1150,238 +934,26 @@
1150 934 return items.filter((item) => item.tagName !== "A");
1151 935 }
1152 936
1153 937 // node_modules/@radix-ui/react-portal/dist/index.mjs
1154 - var React21 = __toESM(require_react(), 1);
938 + var React12 = __toESM(require_react(), 1);
1155 939 var import_react_dom = __toESM(require_react_dom(), 1);
1156 -
1157 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
1158 - var React19 = __toESM(require_react(), 1);
1159 - var ReactDOM3 = __toESM(require_react_dom(), 1);
1160 -
1161 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
1162 - var React18 = __toESM(require_react(), 1);
1163 -
1164 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1165 - var React17 = __toESM(require_react(), 1);
1166 - function setRef4(ref, value) {
1167 - if (typeof ref === "function") {
1168 - return ref(value);
1169 - } else if (ref !== null && ref !== void 0) {
1170 - ref.current = value;
1171 - }
1172 - }
1173 - function composeRefs4(...refs) {
1174 - return (node) => {
1175 - let hasCleanup = false;
1176 - const cleanups = refs.map((ref) => {
1177 - const cleanup = setRef4(ref, node);
1178 - if (!hasCleanup && typeof cleanup == "function") {
1179 - hasCleanup = true;
1180 - }
1181 - return cleanup;
1182 - });
1183 - if (hasCleanup) {
1184 - return () => {
1185 - for (let i = 0; i < cleanups.length; i++) {
1186 - const cleanup = cleanups[i];
1187 - if (typeof cleanup == "function") {
1188 - cleanup();
1189 - } else {
1190 - setRef4(refs[i], null);
1191 - }
1192 - }
1193 - };
1194 - }
1195 - };
1196 - }
1197 -
1198 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs
1199 - var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
1200 - // @__NO_SIDE_EFFECTS__
1201 - function createSlot3(ownerName) {
1202 - const SlotClone = /* @__PURE__ */ createSlotClone3(ownerName);
1203 - const Slot2 = React18.forwardRef((props, forwardedRef) => {
1204 - const { children, ...slotProps } = props;
1205 - const childrenArray = React18.Children.toArray(children);
1206 - const slottable = childrenArray.find(isSlottable3);
1207 - if (slottable) {
1208 - const newElement = slottable.props.children;
1209 - const newChildren = childrenArray.map((child) => {
1210 - if (child === slottable) {
1211 - if (React18.Children.count(newElement) > 1) return React18.Children.only(null);
1212 - return React18.isValidElement(newElement) ? newElement.props.children : null;
1213 - } else {
1214 - return child;
1215 - }
1216 - });
1217 - return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React18.isValidElement(newElement) ? React18.cloneElement(newElement, void 0, newChildren) : null });
1218 - }
1219 - return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
1220 - });
1221 - Slot2.displayName = `${ownerName}.Slot`;
1222 - return Slot2;
1223 - }
1224 - // @__NO_SIDE_EFFECTS__
1225 - function createSlotClone3(ownerName) {
1226 - const SlotClone = React18.forwardRef((props, forwardedRef) => {
1227 - const { children, ...slotProps } = props;
1228 - if (React18.isValidElement(children)) {
1229 - const childrenRef = getElementRef3(children);
1230 - const props2 = mergeProps3(slotProps, children.props);
1231 - if (children.type !== React18.Fragment) {
1232 - props2.ref = forwardedRef ? composeRefs4(forwardedRef, childrenRef) : childrenRef;
1233 - }
1234 - return React18.cloneElement(children, props2);
1235 - }
1236 - return React18.Children.count(children) > 1 ? React18.Children.only(null) : null;
1237 - });
1238 - SlotClone.displayName = `${ownerName}.SlotClone`;
1239 - return SlotClone;
1240 - }
1241 - var SLOTTABLE_IDENTIFIER3 = /* @__PURE__ */ Symbol("radix.slottable");
1242 - function isSlottable3(child) {
1243 - return React18.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER3;
1244 - }
1245 - function mergeProps3(slotProps, childProps) {
1246 - const overrideProps = { ...childProps };
1247 - for (const propName in childProps) {
1248 - const slotPropValue = slotProps[propName];
1249 - const childPropValue = childProps[propName];
1250 - const isHandler = /^on[A-Z]/.test(propName);
1251 - if (isHandler) {
1252 - if (slotPropValue && childPropValue) {
1253 - overrideProps[propName] = (...args) => {
1254 - const result = childPropValue(...args);
1255 - slotPropValue(...args);
1256 - return result;
1257 - };
1258 - } else if (slotPropValue) {
1259 - overrideProps[propName] = slotPropValue;
1260 - }
1261 - } else if (propName === "style") {
1262 - overrideProps[propName] = { ...slotPropValue, ...childPropValue };
1263 - } else if (propName === "className") {
1264 - overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
1265 - }
1266 - }
1267 - return { ...slotProps, ...overrideProps };
1268 - }
1269 - function getElementRef3(element) {
1270 - let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1271 - let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1272 - if (mayWarn) {
1273 - return element.ref;
1274 - }
1275 - getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1276 - mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1277 - if (mayWarn) {
1278 - return element.props.ref;
1279 - }
1280 - return element.props.ref || element.ref;
1281 - }
1282 -
1283 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs
1284 - var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
1285 - var NODES3 = [
1286 - "a",
1287 - "button",
1288 - "div",
1289 - "form",
1290 - "h2",
1291 - "h3",
1292 - "img",
1293 - "input",
1294 - "label",
1295 - "li",
1296 - "nav",
1297 - "ol",
1298 - "p",
1299 - "select",
1300 - "span",
1301 - "svg",
1302 - "ul"
1303 - ];
1304 - var Primitive3 = NODES3.reduce((primitive, node) => {
1305 - const Slot2 = createSlot3(`Primitive.${node}`);
1306 - const Node2 = React19.forwardRef((props, forwardedRef) => {
1307 - const { asChild, ...primitiveProps } = props;
1308 - const Comp = asChild ? Slot2 : node;
1309 - if (typeof window !== "undefined") {
1310 - window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
1311 - }
1312 - return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
1313 - });
1314 - Node2.displayName = `Primitive.${node}`;
1315 - return { ...primitive, [node]: Node2 };
1316 - }, {});
1317 -
1318 - // node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1319 - var React20 = __toESM(require_react(), 1);
1320 - var useLayoutEffect22 = globalThis?.document ? React20.useLayoutEffect : () => {
1321 - };
1322 -
1323 - // node_modules/@radix-ui/react-portal/dist/index.mjs
1324 - var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
940 + var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
1325 941 var PORTAL_NAME = "Portal";
1326 - var Portal = React21.forwardRef((props, forwardedRef) => {
942 + var Portal = React12.forwardRef((props, forwardedRef) => {
1327 943 const { container: containerProp, ...portalProps } = props;
1328 - const [mounted, setMounted] = React21.useState(false);
1329 - useLayoutEffect22(() => setMounted(true), []);
944 + const [mounted, setMounted] = React12.useState(false);
945 + useLayoutEffect2(() => setMounted(true), []);
1330 946 const container = containerProp || mounted && globalThis?.document?.body;
1331 - return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Primitive3.div, { ...portalProps, ref: forwardedRef }), container) : null;
947 + return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
1332 948 });
1333 949 Portal.displayName = PORTAL_NAME;
1334 950
1335 951 // node_modules/@radix-ui/react-presence/dist/index.mjs
1336 - var React25 = __toESM(require_react(), 1);
1337 -
1338 - // node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
1339 952 var React23 = __toESM(require_react(), 1);
1340 - function setRef5(ref, value) {
1341 - if (typeof ref === "function") {
1342 - return ref(value);
1343 - } else if (ref !== null && ref !== void 0) {
1344 - ref.current = value;
1345 - }
1346 - }
1347 - function composeRefs5(...refs) {
1348 - return (node) => {
1349 - let hasCleanup = false;
1350 - const cleanups = refs.map((ref) => {
1351 - const cleanup = setRef5(ref, node);
1352 - if (!hasCleanup && typeof cleanup == "function") {
1353 - hasCleanup = true;
1354 - }
1355 - return cleanup;
1356 - });
1357 - if (hasCleanup) {
1358 - return () => {
1359 - for (let i = 0; i < cleanups.length; i++) {
1360 - const cleanup = cleanups[i];
1361 - if (typeof cleanup == "function") {
1362 - cleanup();
1363 - } else {
1364 - setRef5(refs[i], null);
1365 - }
1366 - }
1367 - };
1368 - }
1369 - };
1370 - }
1371 - function useComposedRefs4(...refs) {
1372 - return React23.useCallback(composeRefs5(...refs), refs);
1373 - }
1374 -
1375 - // node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
1376 - var React24 = __toESM(require_react(), 1);
1377 - var useLayoutEffect23 = globalThis?.document ? React24.useLayoutEffect : () => {
1378 - };
1379 -
1380 - // node_modules/@radix-ui/react-presence/dist/index.mjs
1381 - var React26 = __toESM(require_react(), 1);
953 + var React13 = __toESM(require_react(), 1);
1382 954 function useStateMachine(initialState, machine) {
1383 - return React26.useReducer((state, event) => {
955 + return React13.useReducer((state, event) => {
1384 956 const nextState = machine[state][event];
1385 957 return nextState ?? state;
1386 958 }, initialState);
1387 959 }
@@ -1387,19 +959,19 @@
1387 959 }
1388 960 var Presence = (props) => {
1389 961 const { present, children } = props;
1390 962 const presence = usePresence(present);
1391 - const child = typeof children === "function" ? children({ present: presence.isPresent }) : React25.Children.only(children);
1392 - const ref = useComposedRefs4(presence.ref, getElementRef4(child));
963 + const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
964 + const ref = useComposedRefs(presence.ref, getElementRef2(child));
1393 965 const forceMount = typeof children === "function";
1394 - return forceMount || presence.isPresent ? React25.cloneElement(child, { ref }) : null;
966 + return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
1395 967 };
1396 968 Presence.displayName = "Presence";
1397 969 function usePresence(present) {
1398 - const [node, setNode] = React25.useState();
1399 - const stylesRef = React25.useRef(null);
1400 - const prevPresentRef = React25.useRef(present);
1401 - const prevAnimationNameRef = React25.useRef("none");
970 + const [node, setNode] = React23.useState();
971 + const stylesRef = React23.useRef(null);
972 + const prevPresentRef = React23.useRef(present);
973 + const prevAnimationNameRef = React23.useRef("none");
1402 974 const initialState = present ? "mounted" : "unmounted";
1403 975 const [state, send] = useStateMachine(initialState, {
1404 976 mounted: {
1405 977 UNMOUNT: "unmounted",
@@ -1412,13 +984,13 @@
1412 984 unmounted: {
1413 985 MOUNT: "mounted"
1414 986 }
1415 987 });
1416 - React25.useEffect(() => {
988 + React23.useEffect(() => {
1417 989 const currentAnimationName = getAnimationName(stylesRef.current);
1418 990 prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1419 991 }, [state]);
1420 - useLayoutEffect23(() => {
992 + useLayoutEffect2(() => {
1421 993 const styles = stylesRef.current;
1422 994 const wasPresent = prevPresentRef.current;
1423 995 const hasPresentChanged = wasPresent !== present;
1424 996 if (hasPresentChanged) {
@@ -1438,9 +1010,9 @@
1438 1010 }
1439 1011 prevPresentRef.current = present;
1440 1012 }
1441 1013 }, [present, send]);
1442 - useLayoutEffect23(() => {
1014 + useLayoutEffect2(() => {
1443 1015 if (node) {
1444 1016 let timeoutId;
1445 1017 const ownerWindow = node.ownerDocument.defaultView ?? window;
1446 1018 const handleAnimationEnd = (event) => {
@@ -1478,9 +1050,9 @@
1478 1050 }
1479 1051 }, [node, send]);
1480 1052 return {
1481 1053 isPresent: ["mounted", "unmountSuspended"].includes(state),
1482 - ref: React25.useCallback((node2) => {
1054 + ref: React23.useCallback((node2) => {
1483 1055 stylesRef.current = node2 ? getComputedStyle(node2) : null;
1484 1056 setNode(node2);
1485 1057 }, [])
1486 1058 };
@@ -1487,9 +1059,9 @@
1487 1059 }
1488 1060 function getAnimationName(styles) {
1489 1061 return styles?.animationName || "none";
1490 1062 }
1491 - function getElementRef4(element) {
1063 + function getElementRef2(element) {
1492 1064 let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1493 1065 let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1494 1066 if (mayWarn) {
1495 1067 return element.ref;
@@ -1501,138 +1073,13 @@
1501 1073 }
1502 1074 return element.props.ref || element.ref;
1503 1075 }
1504 1076
1505 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
1506 - var React28 = __toESM(require_react(), 1);
1507 - var ReactDOM5 = __toESM(require_react_dom(), 1);
1508 -
1509 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
1510 - var React27 = __toESM(require_react(), 1);
1511 - var import_jsx_runtime11 = __toESM(require_jsx_runtime(), 1);
1512 - // @__NO_SIDE_EFFECTS__
1513 - function createSlot4(ownerName) {
1514 - const SlotClone = /* @__PURE__ */ createSlotClone4(ownerName);
1515 - const Slot2 = React27.forwardRef((props, forwardedRef) => {
1516 - const { children, ...slotProps } = props;
1517 - const childrenArray = React27.Children.toArray(children);
1518 - const slottable = childrenArray.find(isSlottable4);
1519 - if (slottable) {
1520 - const newElement = slottable.props.children;
1521 - const newChildren = childrenArray.map((child) => {
1522 - if (child === slottable) {
1523 - if (React27.Children.count(newElement) > 1) return React27.Children.only(null);
1524 - return React27.isValidElement(newElement) ? newElement.props.children : null;
1525 - } else {
1526 - return child;
1527 - }
1528 - });
1529 - return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React27.isValidElement(newElement) ? React27.cloneElement(newElement, void 0, newChildren) : null });
1530 - }
1531 - return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
1532 - });
1533 - Slot2.displayName = `${ownerName}.Slot`;
1534 - return Slot2;
1535 - }
1536 - // @__NO_SIDE_EFFECTS__
1537 - function createSlotClone4(ownerName) {
1538 - const SlotClone = React27.forwardRef((props, forwardedRef) => {
1539 - const { children, ...slotProps } = props;
1540 - if (React27.isValidElement(children)) {
1541 - const childrenRef = getElementRef5(children);
1542 - const props2 = mergeProps4(slotProps, children.props);
1543 - if (children.type !== React27.Fragment) {
1544 - props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
1545 - }
1546 - return React27.cloneElement(children, props2);
1547 - }
1548 - return React27.Children.count(children) > 1 ? React27.Children.only(null) : null;
1549 - });
1550 - SlotClone.displayName = `${ownerName}.SlotClone`;
1551 - return SlotClone;
1552 - }
1553 - var SLOTTABLE_IDENTIFIER4 = /* @__PURE__ */ Symbol("radix.slottable");
1554 - function isSlottable4(child) {
1555 - return React27.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER4;
1556 - }
1557 - function mergeProps4(slotProps, childProps) {
1558 - const overrideProps = { ...childProps };
1559 - for (const propName in childProps) {
1560 - const slotPropValue = slotProps[propName];
1561 - const childPropValue = childProps[propName];
1562 - const isHandler = /^on[A-Z]/.test(propName);
1563 - if (isHandler) {
1564 - if (slotPropValue && childPropValue) {
1565 - overrideProps[propName] = (...args) => {
1566 - const result = childPropValue(...args);
1567 - slotPropValue(...args);
1568 - return result;
1569 - };
1570 - } else if (slotPropValue) {
1571 - overrideProps[propName] = slotPropValue;
1572 - }
1573 - } else if (propName === "style") {
1574 - overrideProps[propName] = { ...slotPropValue, ...childPropValue };
1575 - } else if (propName === "className") {
1576 - overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
1577 - }
1578 - }
1579 - return { ...slotProps, ...overrideProps };
1580 - }
1581 - function getElementRef5(element) {
1582 - let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1583 - let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1584 - if (mayWarn) {
1585 - return element.ref;
1586 - }
1587 - getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1588 - mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1589 - if (mayWarn) {
1590 - return element.props.ref;
1591 - }
1592 - return element.props.ref || element.ref;
1593 - }
1594 -
1595 - // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs
1596 - var import_jsx_runtime12 = __toESM(require_jsx_runtime(), 1);
1597 - var NODES4 = [
1598 - "a",
1599 - "button",
1600 - "div",
1601 - "form",
1602 - "h2",
1603 - "h3",
1604 - "img",
1605 - "input",
1606 - "label",
1607 - "li",
1608 - "nav",
1609 - "ol",
1610 - "p",
1611 - "select",
1612 - "span",
1613 - "svg",
1614 - "ul"
1615 - ];
1616 - var Primitive4 = NODES4.reduce((primitive, node) => {
1617 - const Slot2 = createSlot4(`Primitive.${node}`);
1618 - const Node2 = React28.forwardRef((props, forwardedRef) => {
1619 - const { asChild, ...primitiveProps } = props;
1620 - const Comp = asChild ? Slot2 : node;
1621 - if (typeof window !== "undefined") {
1622 - window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
1623 - }
1624 - return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
1625 - });
1626 - Node2.displayName = `Primitive.${node}`;
1627 - return { ...primitive, [node]: Node2 };
1628 - }, {});
1629 -
1630 1077 // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
1631 - var React29 = __toESM(require_react(), 1);
1078 + var React14 = __toESM(require_react(), 1);
1632 1079 var count2 = 0;
1633 1080 function useFocusGuards() {
1634 - React29.useEffect(() => {
1081 + React14.useEffect(() => {
1635 1082 const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
1636 1083 document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
1637 1084 document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
1638 1085 count2++;
@@ -1687,12 +1134,12 @@
1687 1134 return to.concat(ar || Array.prototype.slice.call(from));
1688 1135 }
1689 1136
1690 1137 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
1691 - var React36 = __toESM(require_react());
1138 + var React21 = __toESM(require_react());
1692 1139
1693 1140 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
1694 - var React32 = __toESM(require_react());
1141 + var React17 = __toESM(require_react());
1695 1142
1696 1143 // node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1697 1144 var zeroRightClassName = "right-scroll-bar-position";
1698 1145 var fullWidthClassName = "width-before-scroll-bar";
@@ -1710,9 +1157,9 @@
1710 1157 }
1711 1158
1712 1159 // node_modules/use-callback-ref/dist/es2015/useRef.js
1713 1160 var import_react = __toESM(require_react());
1714 - function useCallbackRef3(initialValue, callback) {
1161 + function useCallbackRef2(initialValue, callback) {
1715 1162 var ref = (0, import_react.useState)(function() {
1716 1163 return {
1717 1164 // value
1718 1165 value: initialValue,
@@ -1737,13 +1184,13 @@
1737 1184 return ref.facade;
1738 1185 }
1739 1186
1740 1187 // node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1741 - var React30 = __toESM(require_react());
1742 - var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React30.useLayoutEffect : React30.useEffect;
1188 + var React15 = __toESM(require_react());
1189 + var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect;
1743 1190 var currentValues = /* @__PURE__ */ new WeakMap();
1744 1191 function useMergeRefs(refs, defaultValue) {
1745 - var callbackRef = useCallbackRef3(defaultValue || null, function(newValue) {
1192 + var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
1746 1193 return refs.forEach(function(ref) {
1747 1194 return assignRef(ref, newValue);
1748 1195 });
1749 1196 });
@@ -1855,9 +1302,9 @@
1855 1302 return medium;
1856 1303 }
1857 1304
1858 1305 // node_modules/use-sidecar/dist/es2015/exports.js
1859 - var React31 = __toESM(require_react());
1306 + var React16 = __toESM(require_react());
1860 1307 var SideCar = function(_a) {
1861 1308 var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
1862 1309 if (!sideCar) {
1863 1310 throw new Error("Sidecar: please provide `sideCar` property to import the right car");
@@ -1865,9 +1312,9 @@
1865 1312 var Target = sideCar.read();
1866 1313 if (!Target) {
1867 1314 throw new Error("Sidecar medium not found");
1868 1315 }
1869 - return React31.createElement(Target, __assign({}, rest));
1316 + return React16.createElement(Target, __assign({}, rest));
1870 1317 };
1871 1318 SideCar.isSideCarExport = true;
1872 1319 function exportSidecar(medium, exported) {
1873 1320 medium.useMedium(exported);
@@ -1880,11 +1327,11 @@
1880 1327 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js
1881 1328 var nothing = function() {
1882 1329 return;
1883 1330 };
1884 - var RemoveScroll = React32.forwardRef(function(props, parentRef) {
1885 - var ref = React32.useRef(null);
1886 - var _a = React32.useState({
1331 + var RemoveScroll = React17.forwardRef(function(props, parentRef) {
1332 + var ref = React17.useRef(null);
1333 + var _a = React17.useState({
1887 1334 onScrollCapture: nothing,
1888 1335 onWheelCapture: nothing,
1889 1336 onTouchMoveCapture: nothing
1890 1337 }), callbacks = _a[0], setCallbacks = _a[1];
@@ -1891,13 +1338,13 @@
1891 1338 var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
1892 1339 var SideCar2 = sideCar;
1893 1340 var containerRef = useMergeRefs([ref, parentRef]);
1894 1341 var containerProps = __assign(__assign({}, rest), callbacks);
1895 - return React32.createElement(
1896 - React32.Fragment,
1342 + return React17.createElement(
1343 + React17.Fragment,
1897 1344 null,
1898 - enabled && React32.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1899 - forwardProps ? React32.cloneElement(React32.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React32.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1345 + enabled && React17.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
1346 + forwardProps ? React17.cloneElement(React17.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React17.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
1900 1347 );
1901 1348 });
1902 1349 RemoveScroll.defaultProps = {
1903 1350 enabled: true,
@@ -1909,15 +1356,15 @@
1909 1356 zeroRight: zeroRightClassName
1910 1357 };
1911 1358
1912 1359 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
1913 - var React35 = __toESM(require_react());
1360 + var React20 = __toESM(require_react());
1914 1361
1915 1362 // node_modules/react-remove-scroll-bar/dist/es2015/component.js
1916 - var React34 = __toESM(require_react());
1363 + var React19 = __toESM(require_react());
1917 1364
1918 1365 // node_modules/react-style-singleton/dist/es2015/hook.js
1919 - var React33 = __toESM(require_react());
1366 + var React18 = __toESM(require_react());
1920 1367
1921 1368 // node_modules/get-nonce/dist/es2015/index.js
1922 1369 var currentNonce;
1923 1370 var getNonce = function() {
@@ -1979,9 +1426,9 @@
1979 1426 // node_modules/react-style-singleton/dist/es2015/hook.js
1980 1427 var styleHookSingleton = function() {
1981 1428 var sheet = stylesheetSingleton();
1982 1429 return function(styles, isDynamic) {
1983 - React33.useEffect(function() {
1430 + React18.useEffect(function() {
1984 1431 sheet.add(styles);
1985 1432 return function() {
1986 1433 sheet.remove();
1987 1434 };
@@ -2053,9 +1500,9 @@
2053 1500 var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
2054 1501 return isFinite(counter) ? counter : 0;
2055 1502 };
2056 1503 var useLockAttribute = function() {
2057 - React34.useEffect(function() {
1504 + React19.useEffect(function() {
2058 1505 document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
2059 1506 return function() {
2060 1507 var newCounter = getCurrentUseCounter() - 1;
2061 1508 if (newCounter <= 0) {
@@ -2068,12 +1515,12 @@
2068 1515 };
2069 1516 var RemoveScrollBar = function(_a) {
2070 1517 var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
2071 1518 useLockAttribute();
2072 - var gap = React34.useMemo(function() {
1519 + var gap = React19.useMemo(function() {
2073 1520 return getGapWidth(gapMode);
2074 1521 }, [gapMode]);
2075 - return React34.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
1522 + return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
2076 1523 };
2077 1524
2078 1525 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2079 1526 var passiveSupported = false;
@@ -2212,18 +1659,18 @@
2212 1659 };
2213 1660 var idCounter = 0;
2214 1661 var lockStack = [];
2215 1662 function RemoveScrollSideCar(props) {
2216 - var shouldPreventQueue = React35.useRef([]);
2217 - var touchStartRef = React35.useRef([0, 0]);
2218 - var activeAxis = React35.useRef();
2219 - var id = React35.useState(idCounter++)[0];
2220 - var Style2 = React35.useState(styleSingleton)[0];
2221 - var lastProps = React35.useRef(props);
2222 - React35.useEffect(function() {
1663 + var shouldPreventQueue = React20.useRef([]);
1664 + var touchStartRef = React20.useRef([0, 0]);
1665 + var activeAxis = React20.useRef();
1666 + var id = React20.useState(idCounter++)[0];
1667 + var Style2 = React20.useState(styleSingleton)[0];
1668 + var lastProps = React20.useRef(props);
1669 + React20.useEffect(function() {
2223 1670 lastProps.current = props;
2224 1671 }, [props]);
2225 - React35.useEffect(function() {
1672 + React20.useEffect(function() {
2226 1673 if (props.inert) {
2227 1674 document.body.classList.add("block-interactivity-".concat(id));
2228 1675 var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
2229 1676 allow_1.forEach(function(el) {
@@ -2237,9 +1684,9 @@
2237 1684 };
2238 1685 }
2239 1686 return;
2240 1687 }, [props.inert, props.lockRef.current, props.shards]);
2241 - var shouldCancelEvent = React35.useCallback(function(event, parent) {
1688 + var shouldCancelEvent = React20.useCallback(function(event, parent) {
2242 1689 if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
2243 1690 return !lastProps.current.allowPinchZoom;
2244 1691 }
2245 1692 var touch = getTouchXY(event);
@@ -2273,9 +1720,9 @@
2273 1720 }
2274 1721 var cancelingAxis = activeAxis.current || currentAxis;
2275 1722 return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
2276 1723 }, []);
2277 - var shouldPrevent = React35.useCallback(function(_event) {
1724 + var shouldPrevent = React20.useCallback(function(_event) {
2278 1725 var event = _event;
2279 1726 if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
2280 1727 return;
2281 1728 }
@@ -2300,9 +1747,9 @@
2300 1747 }
2301 1748 }
2302 1749 }
2303 1750 }, []);
2304 - var shouldCancel = React35.useCallback(function(name, delta, target, should) {
1751 + var shouldCancel = React20.useCallback(function(name, delta, target, should) {
2305 1752 var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
2306 1753 shouldPreventQueue.current.push(event);
2307 1754 setTimeout(function() {
2308 1755 shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
@@ -2309,19 +1756,19 @@
2309 1756 return e !== event;
2310 1757 });
2311 1758 }, 1);
2312 1759 }, []);
2313 - var scrollTouchStart = React35.useCallback(function(event) {
1760 + var scrollTouchStart = React20.useCallback(function(event) {
2314 1761 touchStartRef.current = getTouchXY(event);
2315 1762 activeAxis.current = void 0;
2316 1763 }, []);
2317 - var scrollWheel = React35.useCallback(function(event) {
1764 + var scrollWheel = React20.useCallback(function(event) {
2318 1765 shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2319 1766 }, []);
2320 - var scrollTouchMove = React35.useCallback(function(event) {
1767 + var scrollTouchMove = React20.useCallback(function(event) {
2321 1768 shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2322 1769 }, []);
2323 - React35.useEffect(function() {
1770 + React20.useEffect(function() {
2324 1771 lockStack.push(Style2);
2325 1772 props.setCallbacks({
2326 1773 onScrollCapture: scrollWheel,
2327 1774 onWheelCapture: scrollWheel,
@@ -2339,13 +1786,13 @@
2339 1786 document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
2340 1787 };
2341 1788 }, []);
2342 1789 var removeScrollBar = props.removeScrollBar, inert = props.inert;
2343 - return React35.createElement(
2344 - React35.Fragment,
1790 + return React20.createElement(
1791 + React20.Fragment,
2345 1792 null,
2346 - inert ? React35.createElement(Style2, { styles: generateStyle(id) }) : null,
2347 - removeScrollBar ? React35.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
1793 + inert ? React20.createElement(Style2, { styles: generateStyle(id) }) : null,
1794 + removeScrollBar ? React20.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
2348 1795 );
2349 1796 }
2350 1797 function getOutermostShadowParent(node) {
2351 1798 var shadowParent = null;
@@ -2362,10 +1809,10 @@
2362 1809 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js
2363 1810 var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
2364 1811
2365 1812 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js
2366 - var ReactRemoveScroll = React36.forwardRef(function(props, ref) {
2367 - return React36.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
1813 + var ReactRemoveScroll = React21.forwardRef(function(props, ref) {
1814 + return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
2368 1815 });
2369 1816 ReactRemoveScroll.classNames = RemoveScroll.classNames;
2370 1817 var Combination_default = ReactRemoveScroll;
2371 1818
@@ -2490,9 +1937,9 @@
2490 1937 return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
2491 1938 };
2492 1939
2493 1940 // node_modules/@radix-ui/react-dialog/dist/index.mjs
2494 - var import_jsx_runtime13 = __toESM(require_jsx_runtime(), 1);
1941 + var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
2495 1942 var DIALOG_NAME = "Dialog";
2496 1943 var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
2497 1944 var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
2498 1945 var Dialog = (props) => {
@@ -2503,10 +1950,10 @@
2503 1950 defaultOpen,
2504 1951 onOpenChange,
2505 1952 modal = true
2506 1953 } = props;
2507 - const triggerRef = React37.useRef(null);
2508 - const contentRef = React37.useRef(null);
1954 + const triggerRef = React24.useRef(null);
1955 + const contentRef = React24.useRef(null);
2509 1956 const [open2, setOpen] = useControllableState({
2510 1957 prop: openProp,
2511 1958 defaultProp: defaultOpen ?? false,
2512 1959 onChange: onOpenChange,
@@ -2511,9 +1958,9 @@
2511 1958 defaultProp: defaultOpen ?? false,
2512 1959 onChange: onOpenChange,
2513 1960 caller: DIALOG_NAME
2514 1961 });
2515 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1962 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2516 1963 DialogProvider,
2517 1964 {
2518 1965 scope: __scopeDialog,
2519 1966 triggerRef,
@@ -2522,9 +1969,9 @@
2522 1969 titleId: useId(),
2523 1970 descriptionId: useId(),
2524 1971 open: open2,
2525 1972 onOpenChange: setOpen,
2526 - onOpenToggle: React37.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
1973 + onOpenToggle: React24.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
2527 1974 modal,
2528 1975 children
2529 1976 }
2530 1977 );
@@ -2530,15 +1977,15 @@
2530 1977 );
2531 1978 };
2532 1979 Dialog.displayName = DIALOG_NAME;
2533 1980 var TRIGGER_NAME = "DialogTrigger";
2534 - var DialogTrigger = React37.forwardRef(
1981 + var DialogTrigger = React24.forwardRef(
2535 1982 (props, forwardedRef) => {
2536 1983 const { __scopeDialog, ...triggerProps } = props;
2537 1984 const context2 = useDialogContext(TRIGGER_NAME, __scopeDialog);
2538 1985 const composedTriggerRef = useComposedRefs(forwardedRef, context2.triggerRef);
2539 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2540 - Primitive4.button,
1986 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1987 + Primitive.button,
2541 1988 {
2542 1989 type: "button",
2543 1990 "aria-haspopup": "dialog",
2544 1991 "aria-expanded": context2.open,
@@ -2558,23 +2005,23 @@
2558 2005 });
2559 2006 var DialogPortal = (props) => {
2560 2007 const { __scopeDialog, forceMount, children, container } = props;
2561 2008 const context2 = useDialogContext(PORTAL_NAME2, __scopeDialog);
2562 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React37.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { asChild: true, container, children: child }) })) });
2009 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React24.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Portal, { asChild: true, container, children: child }) })) });
2563 2010 };
2564 2011 DialogPortal.displayName = PORTAL_NAME2;
2565 2012 var OVERLAY_NAME = "DialogOverlay";
2566 - var DialogOverlay = React37.forwardRef(
2013 + var DialogOverlay = React24.forwardRef(
2567 2014 (props, forwardedRef) => {
2568 2015 const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
2569 2016 const { forceMount = portalContext.forceMount, ...overlayProps } = props;
2570 2017 const context2 = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
2571 - return context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2018 + return context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2572 2019 }
2573 2020 );
2574 2021 DialogOverlay.displayName = OVERLAY_NAME;
2575 - var Slot = createSlot4("DialogOverlay.RemoveScroll");
2576 - var DialogOverlayImpl = React37.forwardRef(
2022 + var Slot = createSlot("DialogOverlay.RemoveScroll");
2023 + var DialogOverlayImpl = React24.forwardRef(
2577 2024 (props, forwardedRef) => {
2578 2025 const { __scopeDialog, ...overlayProps } = props;
2579 2026 const context2 = useDialogContext(OVERLAY_NAME, __scopeDialog);
2580 2027 return (
@@ -2579,10 +2026,10 @@
2579 2026 const context2 = useDialogContext(OVERLAY_NAME, __scopeDialog);
2580 2027 return (
2581 2028 // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2582 2029 // ie. when `Overlay` and `Content` are siblings
2583 - /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context2.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2584 - Primitive4.div,
2030 + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context2.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2031 + Primitive.div,
2585 2032 {
2586 2033 "data-state": getState(context2.open),
2587 2034 ...overlayProps,
2588 2035 ref: forwardedRef,
@@ -2592,27 +2039,27 @@
2592 2039 );
2593 2040 }
2594 2041 );
2595 2042 var CONTENT_NAME = "DialogContent";
2596 - var DialogContent = React37.forwardRef(
2043 + var DialogContent = React24.forwardRef(
2597 2044 (props, forwardedRef) => {
2598 2045 const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
2599 2046 const { forceMount = portalContext.forceMount, ...contentProps } = props;
2600 2047 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2601 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Presence, { present: forceMount || context2.open, children: context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2048 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || context2.open, children: context2.modal ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2602 2049 }
2603 2050 );
2604 2051 DialogContent.displayName = CONTENT_NAME;
2605 - var DialogContentModal = React37.forwardRef(
2052 + var DialogContentModal = React24.forwardRef(
2606 2053 (props, forwardedRef) => {
2607 2054 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2608 - const contentRef = React37.useRef(null);
2055 + const contentRef = React24.useRef(null);
2609 2056 const composedRefs = useComposedRefs(forwardedRef, context2.contentRef, contentRef);
2610 - React37.useEffect(() => {
2057 + React24.useEffect(() => {
2611 2058 const content = contentRef.current;
2612 2059 if (content) return hideOthers(content);
2613 2060 }, []);
2614 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2061 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2615 2062 DialogContentImpl,
2616 2063 {
2617 2064 ...props,
2618 2065 ref: composedRefs,
@@ -2635,14 +2082,14 @@
2635 2082 }
2636 2083 );
2637 2084 }
2638 2085 );
2639 - var DialogContentNonModal = React37.forwardRef(
2086 + var DialogContentNonModal = React24.forwardRef(
2640 2087 (props, forwardedRef) => {
2641 2088 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog);
2642 - const hasInteractedOutsideRef = React37.useRef(false);
2643 - const hasPointerDownOutsideRef = React37.useRef(false);
2644 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2089 + const hasInteractedOutsideRef = React24.useRef(false);
2090 + const hasPointerDownOutsideRef = React24.useRef(false);
2091 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2645 2092 DialogContentImpl,
2646 2093 {
2647 2094 ...props,
2648 2095 ref: forwardedRef,
@@ -2675,17 +2122,17 @@
2675 2122 }
2676 2123 );
2677 2124 }
2678 2125 );
2679 - var DialogContentImpl = React37.forwardRef(
2126 + var DialogContentImpl = React24.forwardRef(
2680 2127 (props, forwardedRef) => {
2681 2128 const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2682 2129 const context2 = useDialogContext(CONTENT_NAME, __scopeDialog);
2683 - const contentRef = React37.useRef(null);
2130 + const contentRef = React24.useRef(null);
2684 2131 const composedRefs = useComposedRefs(forwardedRef, contentRef);
2685 2132 useFocusGuards();
2686 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
2687 - /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2133 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2134 + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2688 2135 FocusScope,
2689 2136 {
2690 2137 asChild: true,
2691 2138 loop: true,
@@ -2691,9 +2138,9 @@
2691 2138 loop: true,
2692 2139 trapped: trapFocus,
2693 2140 onMountAutoFocus: onOpenAutoFocus,
2694 2141 onUnmountAutoFocus: onCloseAutoFocus,
2695 - children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2142 + children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2696 2143 DismissableLayer,
2697 2144 {
2698 2145 role: "dialog",
2699 2146 id: context2.contentId,
@@ -2706,40 +2153,40 @@
2706 2153 }
2707 2154 )
2708 2155 }
2709 2156 ),
2710 - /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
2711 - /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TitleWarning, { titleId: context2.titleId }),
2712 - /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DescriptionWarning, { contentRef, descriptionId: context2.descriptionId })
2157 + /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
2158 + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TitleWarning, { titleId: context2.titleId }),
2159 + /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DescriptionWarning, { contentRef, descriptionId: context2.descriptionId })
2713 2160 ] })
2714 2161 ] });
2715 2162 }
2716 2163 );
2717 2164 var TITLE_NAME = "DialogTitle";
2718 - var DialogTitle = React37.forwardRef(
2165 + var DialogTitle = React24.forwardRef(
2719 2166 (props, forwardedRef) => {
2720 2167 const { __scopeDialog, ...titleProps } = props;
2721 2168 const context2 = useDialogContext(TITLE_NAME, __scopeDialog);
2722 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.h2, { id: context2.titleId, ...titleProps, ref: forwardedRef });
2169 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.h2, { id: context2.titleId, ...titleProps, ref: forwardedRef });
2723 2170 }
2724 2171 );
2725 2172 DialogTitle.displayName = TITLE_NAME;
2726 2173 var DESCRIPTION_NAME = "DialogDescription";
2727 - var DialogDescription = React37.forwardRef(
2174 + var DialogDescription = React24.forwardRef(
2728 2175 (props, forwardedRef) => {
2729 2176 const { __scopeDialog, ...descriptionProps } = props;
2730 2177 const context2 = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
2731 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Primitive4.p, { id: context2.descriptionId, ...descriptionProps, ref: forwardedRef });
2178 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.p, { id: context2.descriptionId, ...descriptionProps, ref: forwardedRef });
2732 2179 }
2733 2180 );
2734 2181 DialogDescription.displayName = DESCRIPTION_NAME;
2735 2182 var CLOSE_NAME = "DialogClose";
2736 - var DialogClose = React37.forwardRef(
2183 + var DialogClose = React24.forwardRef(
2737 2184 (props, forwardedRef) => {
2738 2185 const { __scopeDialog, ...closeProps } = props;
2739 2186 const context2 = useDialogContext(CLOSE_NAME, __scopeDialog);
2740 - return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2741 - Primitive4.button,
2187 + return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2188 + Primitive.button,
2742 2189 {
2743 2190 type: "button",
2744 2191 ...closeProps,
2745 2192 ref: forwardedRef,
@@ -2764,9 +2211,9 @@
2764 2211
2765 2212 If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2766 2213
2767 2214 For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2768 - React37.useEffect(() => {
2215 + React24.useEffect(() => {
2769 2216 if (titleId) {
2770 2217 const hasTitle = document.getElementById(titleId);
2771 2218 if (!hasTitle) console.error(MESSAGE);
2772 2219 }
@@ -2776,9 +2223,9 @@
2776 2223 var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2777 2224 var DescriptionWarning = ({ contentRef, descriptionId }) => {
2778 2225 const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2779 2226 const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2780 - React37.useEffect(() => {
2227 + React24.useEffect(() => {
2781 2228 const describedById = contentRef.current?.getAttribute("aria-describedby");
2782 2229 if (descriptionId && describedById) {
2783 2230 const hasDescription = document.getElementById(descriptionId);
2784 2231 if (!hasDescription) console.warn(MESSAGE);
@@ -2792,204 +2239,8 @@
2792 2239 var Content = DialogContent;
2793 2240
2794 2241 // node_modules/cmdk/dist/index.mjs
2795 2242 var t = __toESM(require_react(), 1);
2796 -
2797 - // node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
2798 - var React40 = __toESM(require_react(), 1);
2799 - var ReactDOM6 = __toESM(require_react_dom(), 1);
2800 -
2801 - // node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
2802 - var React39 = __toESM(require_react(), 1);
2803 -
2804 - // node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
2805 - var React38 = __toESM(require_react(), 1);
2806 - function setRef6(ref, value) {
2807 - if (typeof ref === "function") {
2808 - return ref(value);
2809 - } else if (ref !== null && ref !== void 0) {
2810 - ref.current = value;
2811 - }
2812 - }
2813 - function composeRefs6(...refs) {
2814 - return (node) => {
2815 - let hasCleanup = false;
2816 - const cleanups = refs.map((ref) => {
2817 - const cleanup = setRef6(ref, node);
2818 - if (!hasCleanup && typeof cleanup == "function") {
2819 - hasCleanup = true;
2820 - }
2821 - return cleanup;
2822 - });
2823 - if (hasCleanup) {
2824 - return () => {
2825 - for (let i = 0; i < cleanups.length; i++) {
2826 - const cleanup = cleanups[i];
2827 - if (typeof cleanup == "function") {
2828 - cleanup();
2829 - } else {
2830 - setRef6(refs[i], null);
2831 - }
2832 - }
2833 - };
2834 - }
2835 - };
2836 - }
2837 -
2838 - // node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.mjs
2839 - var import_jsx_runtime14 = __toESM(require_jsx_runtime(), 1);
2840 - var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
2841 - var use = React39[" use ".trim().toString()];
2842 - function isPromiseLike(value) {
2843 - return typeof value === "object" && value !== null && "then" in value;
2844 - }
2845 - function isLazyComponent(element) {
2846 - return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
2847 - }
2848 - // @__NO_SIDE_EFFECTS__
2849 - function createSlot5(ownerName) {
2850 - const SlotClone = /* @__PURE__ */ createSlotClone5(ownerName);
2851 - const Slot2 = React39.forwardRef((props, forwardedRef) => {
2852 - let { children, ...slotProps } = props;
2853 - if (isLazyComponent(children) && typeof use === "function") {
2854 - children = use(children._payload);
2855 - }
2856 - const childrenArray = React39.Children.toArray(children);
2857 - const slottable = childrenArray.find(isSlottable5);
2858 - if (slottable) {
2859 - const newElement = slottable.props.children;
2860 - const newChildren = childrenArray.map((child) => {
2861 - if (child === slottable) {
2862 - if (React39.Children.count(newElement) > 1) return React39.Children.only(null);
2863 - return React39.isValidElement(newElement) ? newElement.props.children : null;
2864 - } else {
2865 - return child;
2866 - }
2867 - });
2868 - return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, void 0, newChildren) : null });
2869 - }
2870 - return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
2871 - });
2872 - Slot2.displayName = `${ownerName}.Slot`;
2873 - return Slot2;
2874 - }
2875 - // @__NO_SIDE_EFFECTS__
2876 - function createSlotClone5(ownerName) {
2877 - const SlotClone = React39.forwardRef((props, forwardedRef) => {
2878 - let { children, ...slotProps } = props;
2879 - if (isLazyComponent(children) && typeof use === "function") {
2880 - children = use(children._payload);
2881 - }
2882 - if (React39.isValidElement(children)) {
2883 - const childrenRef = getElementRef6(children);
2884 - const props2 = mergeProps5(slotProps, children.props);
2885 - if (children.type !== React39.Fragment) {
2886 - props2.ref = forwardedRef ? composeRefs6(forwardedRef, childrenRef) : childrenRef;
2887 - }
2888 - return React39.cloneElement(children, props2);
2889 - }
2890 - return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
2891 - });
2892 - SlotClone.displayName = `${ownerName}.SlotClone`;
2893 - return SlotClone;
2894 - }
2895 - var SLOTTABLE_IDENTIFIER5 = /* @__PURE__ */ Symbol("radix.slottable");
2896 - function isSlottable5(child) {
2897 - return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER5;
2898 - }
2899 - function mergeProps5(slotProps, childProps) {
2900 - const overrideProps = { ...childProps };
2901 - for (const propName in childProps) {
2902 - const slotPropValue = slotProps[propName];
2903 - const childPropValue = childProps[propName];
2904 - const isHandler = /^on[A-Z]/.test(propName);
2905 - if (isHandler) {
2906 - if (slotPropValue && childPropValue) {
2907 - overrideProps[propName] = (...args) => {
2908 - const result = childPropValue(...args);
2909 - slotPropValue(...args);
2910 - return result;
2911 - };
2912 - } else if (slotPropValue) {
2913 - overrideProps[propName] = slotPropValue;
2914 - }
2915 - } else if (propName === "style") {
2916 - overrideProps[propName] = { ...slotPropValue, ...childPropValue };
2917 - } else if (propName === "className") {
2918 - overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
2919 - }
2920 - }
2921 - return { ...slotProps, ...overrideProps };
2922 - }
2923 - function getElementRef6(element) {
2924 - let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
2925 - let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2926 - if (mayWarn) {
2927 - return element.ref;
2928 - }
2929 - getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
2930 - mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
2931 - if (mayWarn) {
2932 - return element.props.ref;
2933 - }
2934 - return element.props.ref || element.ref;
2935 - }
2936 -
2937 - // node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs
2938 - var import_jsx_runtime15 = __toESM(require_jsx_runtime(), 1);
2939 - var NODES5 = [
2940 - "a",
2941 - "button",
2942 - "div",
2943 - "form",
2944 - "h2",
2945 - "h3",
2946 - "img",
2947 - "input",
2948 - "label",
2949 - "li",
2950 - "nav",
2951 - "ol",
2952 - "p",
2953 - "select",
2954 - "span",
2955 - "svg",
2956 - "ul"
2957 - ];
2958 - var Primitive5 = NODES5.reduce((primitive, node) => {
2959 - const Slot2 = createSlot5(`Primitive.${node}`);
2960 - const Node2 = React40.forwardRef((props, forwardedRef) => {
2961 - const { asChild, ...primitiveProps } = props;
2962 - const Comp = asChild ? Slot2 : node;
2963 - if (typeof window !== "undefined") {
2964 - window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
2965 - }
2966 - return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
2967 - });
2968 - Node2.displayName = `Primitive.${node}`;
2969 - return { ...primitive, [node]: Node2 };
2970 - }, {});
2971 -
2972 - // node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
2973 - var React42 = __toESM(require_react(), 1);
2974 -
2975 - // node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
2976 - var React41 = __toESM(require_react(), 1);
2977 - var useLayoutEffect24 = globalThis?.document ? React41.useLayoutEffect : () => {
2978 - };
2979 -
2980 - // node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.mjs
2981 - var useReactId2 = React42[" useId ".trim().toString()] || (() => void 0);
2982 - var count3 = 0;
2983 - function useId2(deterministicId) {
2984 - const [id, setId] = React42.useState(useReactId2());
2985 - useLayoutEffect24(() => {
2986 - if (!deterministicId) setId((reactId) => reactId ?? String(count3++));
2987 - }, [deterministicId]);
2988 - return deterministicId || (id ? `radix-${id}` : "");
2989 - }
2990 -
2991 - // node_modules/cmdk/dist/index.mjs
2992 2243 var N = '[cmdk-group=""]';
2993 2244 var Y2 = '[cmdk-group-items=""]';
2994 2245 var be = '[cmdk-group-heading=""]';
2995 2246 var le = '[cmdk-item=""]';
@@ -3005,9 +2256,9 @@
3005 2256 var me = t.forwardRef((r2, o) => {
3006 2257 let n = L(() => {
3007 2258 var e, a;
3008 2259 return { search: "", value: (a = (e = r2.value) != null ? e : r2.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
3009 - }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r2, $2 = useId2(), q = useId2(), _ = useId2(), I = t.useRef(null), v = ke();
2260 + }), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r2), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r2, $2 = useId(), q = useId(), _ = useId(), I = t.useRef(null), v = ke();
3010 2261 k2(() => {
3011 2262 if (R !== void 0) {
3012 2263 let e = R.trim();
3013 2264 n.current.value = e, E.emit();
@@ -3135,9 +2386,9 @@
3135 2386 e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
3136 2387 }, se = (e) => {
3137 2388 e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1);
3138 2389 };
3139 - return t.createElement(Primitive5.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
2390 + return t.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
3140 2391 var s;
3141 2392 (s = O.onKeyDown) == null || s.call(O, e);
3142 2393 let a = e.nativeEvent.isComposing || e.keyCode === 229;
3143 2394 if (!(e.defaultPrevented || a)) switch (e.key) {
@@ -3179,9 +2430,9 @@
3179 2430 } }, t.createElement("label", { "cmdk-label": "", htmlFor: U2.inputId, id: U2.labelId, style: Te }, b), B2(r2, (e) => t.createElement(de.Provider, { value: E }, t.createElement(ue.Provider, { value: U2 }, e))));
3180 2431 });
3181 2432 var he = t.forwardRef((r2, o) => {
3182 2433 var _, I;
3183 - let n = useId2(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r2), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
2434 + let n = useId(), u2 = t.useRef(null), c = t.useContext(fe), d = K2(), f = pe(r2), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
3184 2435 k2(() => {
3185 2436 if (!p2) return d.item(n, c == null ? void 0 : c.id);
3186 2437 }, [p2]);
3187 2438 let b = ve(n, u2, [r2.value, r2.children, u2], r2.keywords), m2 = ee(), R = P((v) => v.value && v.value === b.current), x = P((v) => p2 || d.filter() === false ? true : v.search ? v.filtered.items.get(n) > 0 : true);
@@ -3197,25 +2448,25 @@
3197 2448 m2.setState("value", b.current, true);
3198 2449 }
3199 2450 if (!x) return null;
3200 2451 let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r2;
3201 - return t.createElement(Primitive5.div, { ref: composeRefs6(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
2452 + return t.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r2.children);
3202 2453 });
3203 2454 var Ee = t.forwardRef((r2, o) => {
3204 - let { heading: n, children: u2, forceMount: c, ...d } = r2, f = useId2(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
2455 + let { heading: n, children: u2, forceMount: c, ...d } = r2, f = useId(), p2 = t.useRef(null), b = t.useRef(null), m2 = useId(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
3205 2456 k2(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b]);
3206 2457 let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]);
3207 - return t.createElement(Primitive5.div, { ref: composeRefs6(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r2, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
2458 + return t.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r2, (S) => t.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t.createElement(fe.Provider, { value: C }, S))));
3208 2459 });
3209 2460 var ye = t.forwardRef((r2, o) => {
3210 2461 let { alwaysRender: n, ...u2 } = r2, c = t.useRef(null), d = P((f) => !f.search);
3211 - return !n && !d ? null : t.createElement(Primitive5.div, { ref: composeRefs6(c, o), ...u2, "cmdk-separator": "", role: "separator" });
2462 + return !n && !d ? null : t.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
3212 2463 });
3213 2464 var Se = t.forwardRef((r2, o) => {
3214 2465 let { onValueChange: n, ...u2 } = r2, c = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
3215 2466 return t.useEffect(() => {
3216 2467 r2.value != null && d.setState("search", r2.value);
3217 - }, [r2.value]), t.createElement(Primitive5.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r2.value : f, onChange: (m2) => {
2468 + }, [r2.value]), t.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r2.value : f, onChange: (m2) => {
3218 2469 c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
3219 2470 } });
3220 2471 });
3221 2472 var Ce = t.forwardRef((r2, o) => {
@@ -3231,18 +2482,18 @@
3231 2482 return C.observe(m2), () => {
3232 2483 cancelAnimationFrame(x), C.unobserve(m2);
3233 2484 };
3234 2485 }
3235 - }, []), t.createElement(Primitive5.div, { ref: composeRefs6(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r2, (m2) => t.createElement("div", { ref: composeRefs6(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
2486 + }, []), t.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r2, (m2) => t.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
3236 2487 });
3237 2488 var xe = t.forwardRef((r2, o) => {
3238 2489 let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2;
3239 2490 return t.createElement(Root, { open: n, onOpenChange: u2 }, t.createElement(Portal2, { container: f }, t.createElement(Overlay, { "cmdk-overlay": "", className: c }), t.createElement(Content, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, t.createElement(me, { ref: o, ...p2 }))));
3240 2491 });
3241 - var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive5.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null);
2492 + var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null);
3242 2493 var Pe = t.forwardRef((r2, o) => {
3243 2494 let { progress: n, children: u2, label: c = "Loading...", ...d } = r2;
3244 - return t.createElement(Primitive5.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r2, (f) => t.createElement("div", { "aria-hidden": true }, f)));
2495 + return t.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r2, (f) => t.createElement("div", { "aria-hidden": true }, f)));
3245 2496 });
3246 2497 var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
3247 2498 function we(r2, o) {
3248 2499 let n = r2.nextElementSibling;
@@ -3325,17 +2576,24 @@
3325 2576 var import_element3 = __toESM(require_element(), 1);
3326 2577 var import_i18n = __toESM(require_i18n(), 1);
3327 2578 var import_components = __toESM(require_components(), 1);
3328 2579 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1);
2580 + var import_keycodes = __toESM(require_keycodes(), 1);
3329 2581
3330 2582 // packages/icons/build-module/icon/index.mjs
3331 2583 var import_element = __toESM(require_element(), 1);
3332 2584 var icon_default = (0, import_element.forwardRef)(
3333 - ({ icon, size = 24, ...props }, ref) => {
2585 + ({ icon, size = 24, style, ...props }, ref) => {
2586 + const intrinsicStyle = icon.props.style;
2587 + const mergedStyle = intrinsicStyle || style ? { ...intrinsicStyle, ...style } : void 0;
3334 2588 return (0, import_element.cloneElement)(icon, {
3335 2589 width: size,
3336 2590 height: size,
3337 2591 ...props,
2592 + // Merge styles so the icon's intrinsic style (e.g. `fill: none` on
2593 + // stroke-based icons) is preserved unless the consumer overrides
2594 + // the same property explicitly.
2595 + ...mergedStyle ? { style: mergedStyle } : {},
3338 2596 ref
3339 2597 });
3340 2598 }
3341 2599 );
@@ -3341,15 +2599,15 @@
3341 2599 );
3342 2600
3343 2601 // packages/icons/build-module/library/arrow-right.mjs
3344 2602 var import_primitives = __toESM(require_primitives(), 1);
3345 - var import_jsx_runtime16 = __toESM(require_jsx_runtime(), 1);
3346 - var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_primitives.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" }) });
2603 + var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
2604 + var arrow_right_default = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_primitives.Path, { d: "M4 12L19 12M14 17L19 12L14 7", vectorEffect: "non-scaling-stroke" }) });
3347 2605
3348 2606 // packages/icons/build-module/library/search.mjs
3349 2607 var import_primitives2 = __toESM(require_primitives(), 1);
3350 - var import_jsx_runtime17 = __toESM(require_jsx_runtime(), 1);
3351 - var search_default = /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_primitives2.Path, { d: "M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z" }) });
2608 + var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1);
2609 + var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: { fill: "none" }, stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives2.Path, { d: "M5 19L9.28769 14.7123M18.25 11C18.25 13.8995 15.8995 16.25 13 16.25C10.1005 16.25 7.75 13.8995 7.75 11C7.75 8.10051 10.1005 5.75 13 5.75C15.8995 5.75 18.25 8.10051 18.25 11Z", vectorEffect: "non-scaling-stroke" }) });
3352 2610
3353 2611 // packages/commands/build-module/store/index.mjs
3354 2612 var import_data3 = __toESM(require_data(), 1);
3355 2613
@@ -3662,13 +2920,12 @@
3662 2920 return { commands: commands2, loaders, recentSet, onResolved };
3663 2921 }
3664 2922
3665 2923 // packages/commands/build-module/components/command-menu.mjs
3666 - var import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
3667 - var { withIgnoreIMEEvents } = unlock(import_components.privateApis);
2924 + var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1);
3668 2925 var ITEM_ID_PREFIX = "command-palette-item-";
3669 2926 var inputLabel = (0, import_i18n.__)("Search commands and settings");
3670 - var CATEGORY_ICONS = {
2927 + var CATEGORY_FALLBACK_ICONS = {
3671 2928 view: arrow_right_default
3672 2929 };
3673 2930 var CATEGORY_LABELS = {
3674 2931 command: (0, import_i18n.__)("Command"),
@@ -3682,11 +2939,12 @@
3682 2939 }
3683 2940 function CommandItem({ command, search, category, valuePrefix }) {
3684 2941 const { close: close2 } = (0, import_data5.useDispatch)(store);
3685 2942 const commandCategory = category ?? command.category;
2943 + const icon = command.icon ?? CATEGORY_FALLBACK_ICONS[commandCategory];
3686 2944 const label = command.searchLabel ?? command.label;
3687 2945 const value = valuePrefix ? `${valuePrefix}${command.name}` : label;
3688 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2946 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3689 2947 _e.Item,
3690 2948 {
3691 2949 id: `${ITEM_ID_PREFIX}${value.toLowerCase()}`,
3692 2950 value,
@@ -3694,18 +2952,18 @@
3694 2952 onSelect: () => {
3695 2953 recordUsage(command.name);
3696 2954 command.callback({ close: close2 });
3697 2955 },
3698 - children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2956 + children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
3699 2957 import_components.__experimentalHStack,
3700 2958 {
3701 2959 alignment: "left",
3702 2960 className: clsx_default("commands-command-menu__item", {
3703 - "has-icon": CATEGORY_ICONS[commandCategory] || command.icon
2961 + "has-icon": !!icon
3704 2962 }),
3705 2963 children: [
3706 - CATEGORY_ICONS[commandCategory] ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(icon_default, { icon: CATEGORY_ICONS[commandCategory] }) : isValidIcon(command.icon) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(icon_default, { icon: command.icon }),
3707 - /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "commands-command-menu__item-label", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2964 + isValidIcon(icon) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(icon_default, { icon }),
2965 + /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-label", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3708 2966 import_components.TextHighlight,
3709 2967 {
3710 2968 text: command.label,
3711 2969 highlight: search
@@ -3710,9 +2968,9 @@
3710 2968 text: command.label,
3711 2969 highlight: search
3712 2970 }
3713 2971 ) }),
3714 - CATEGORY_LABELS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[commandCategory] })
2972 + CATEGORY_LABELS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[commandCategory] })
3715 2973 ]
3716 2974 }
3717 2975 )
3718 2976 },
@@ -3727,9 +2985,9 @@
3727 2985 }, [setLoaderLoading2, name, loading]);
3728 2986 if (!commands2.length) {
3729 2987 return null;
3730 2988 }
3731 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2989 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3732 2990 CommandItem,
3733 2991 {
3734 2992 command,
3735 2993 search,
@@ -3747,9 +3005,9 @@
3747 3005 currentLoaderRef.current = hook;
3748 3006 setKey((prevKey) => prevKey + 1);
3749 3007 }
3750 3008 }, [hook]);
3751 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3009 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3752 3010 CommandMenuLoader,
3753 3011 {
3754 3012 hook: currentLoaderRef.current,
3755 3013 ...props
@@ -3757,10 +3015,10 @@
3757 3015 key
3758 3016 );
3759 3017 }
3760 3018 function CommandList({ search, commands: commands2, loaders, valuePrefix }) {
3761 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3762 - commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3019 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
3020 + commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3763 3021 CommandItem,
3764 3022 {
3765 3023 command,
3766 3024 search,
@@ -3767,9 +3025,9 @@
3767 3025 valuePrefix
3768 3026 },
3769 3027 command.name
3770 3028 )),
3771 - loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3029 + loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3772 3030 CommandMenuLoaderWrapper,
3773 3031 {
3774 3032 name: loader.name,
3775 3033 search,
@@ -3789,10 +3047,10 @@
3789 3047 const { commands: commands2, loaders, recentSet, onResolved } = useRecentCommands();
3790 3048 if (!commands2.length && !loaders.length) {
3791 3049 return null;
3792 3050 }
3793 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Recent"), children: [
3794 - loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3051 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Recent"), children: [
3052 + loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3795 3053 RecentLoaderRunner,
3796 3054 {
3797 3055 name: loader.name,
3798 3056 hook: loader.hook,
@@ -3800,9 +3058,9 @@
3800 3058 onResolved
3801 3059 },
3802 3060 loader.name
3803 3061 )),
3804 - commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3062 + commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3805 3063 CommandItem,
3806 3064 {
3807 3065 command,
3808 3066 search: "",
@@ -3819,9 +3077,9 @@
3819 3077 commands: getCommands2(true),
3820 3078 loaders: getCommandLoaders2(true)
3821 3079 };
3822 3080 }, []);
3823 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(_e.Group, { heading: (0, import_i18n.__)("Suggestions"), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CommandList, { search: "", commands: commands2, loaders }) });
3081 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(_e.Group, { heading: (0, import_i18n.__)("Suggestions"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CommandList, { search: "", commands: commands2, loaders }) });
3824 3082 }
3825 3083 function ResultsGroup({ search }) {
3826 3084 const { commands: commands2, contextualCommands, loaders, contextualLoaders } = (0, import_data5.useSelect)((select) => {
3827 3085 const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store);
@@ -3831,10 +3089,10 @@
3831 3089 loaders: getCommandLoaders2(false),
3832 3090 contextualLoaders: getCommandLoaders2(true)
3833 3091 };
3834 3092 }, []);
3835 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Results"), children: [
3836 - /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3093 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Results"), children: [
3094 + /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3837 3095 CommandList,
3838 3096 {
3839 3097 search,
3840 3098 commands: commands2,
@@ -3840,9 +3098,9 @@
3840 3098 commands: commands2,
3841 3099 loaders
3842 3100 }
3843 3101 ),
3844 - /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3102 + /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3845 3103 CommandList,
3846 3104 {
3847 3105 search,
3848 3106 commands: contextualCommands,
@@ -3857,9 +3115,9 @@
3857 3115 const selectedItemId = _value ? `${ITEM_ID_PREFIX}${_value}` : null;
3858 3116 (0, import_element3.useEffect)(() => {
3859 3117 commandMenuInput.current.focus();
3860 3118 }, []);
3861 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3119 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3862 3120 _e.Input,
3863 3121 {
3864 3122 ref: commandMenuInput,
3865 3123 value: search,
@@ -3893,9 +3151,9 @@
3893 3151 }, [registerShortcut]);
3894 3152 (0, import_keyboard_shortcuts.useShortcut)(
3895 3153 "core/commands",
3896 3154 /** @type {React.KeyboardEventHandler} */
3897 - withIgnoreIMEEvents((event) => {
3155 + (0, import_keycodes.withIgnoreIMEEvents)((event) => {
3898 3156 if (event.defaultPrevented) {
3899 3157 return;
3900 3158 }
3901 3159 event.preventDefault();
@@ -3915,9 +3173,9 @@
3915 3173 };
3916 3174 if (!paletteIsOpen) {
3917 3175 return false;
3918 3176 }
3919 - return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3177 + return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3920 3178 import_components.Modal,
3921 3179 {
3922 3180 className: "commands-command-menu",
3923 3181 overlayClassName: "commands-command-menu__overlay",
@@ -3924,11 +3182,11 @@
3924 3182 onRequestClose: closeAndReset,
3925 3183 __experimentalHideHeader: true,
3926 3184 size: "medium",
3927 3185 contentLabel: (0, import_i18n.__)("Command palette"),
3928 - children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "commands-command-menu__container", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e, { label: inputLabel, loop: true, children: [
3929 - /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "commands-command-menu__header", children: [
3930 - /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3186 + children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "commands-command-menu__container", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e, { label: inputLabel, loop: true, children: [
3187 + /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "commands-command-menu__header", children: [
3188 + /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3931 3189 icon_default,
3932 3190 {
3933 3191 className: "commands-command-menu__header-search-icon",
3934 3192 icon: search_default
@@ -3933,9 +3191,9 @@
3933 3191 className: "commands-command-menu__header-search-icon",
3934 3192 icon: search_default
3935 3193 }
3936 3194 ),
3937 - /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3195 + /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
3938 3196 CommandInput,
3939 3197 {
3940 3198 search,
3941 3199 setSearch
@@ -3941,13 +3199,13 @@
3941 3199 setSearch
3942 3200 }
3943 3201 )
3944 3202 ] }),
3945 - /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(_e.List, { label: (0, import_i18n.__)("Command suggestions"), children: [
3946 - search && !loadersLoading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }),
3947 - !search && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RecentGroup, {}),
3948 - !search && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SuggestionsGroup, {}),
3949 - search && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ResultsGroup, { search })
3203 + /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.List, { label: (0, import_i18n.__)("Command suggestions"), children: [
3204 + search && !loadersLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }),
3205 + !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RecentGroup, {}),
3206 + !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SuggestionsGroup, {}),
3207 + search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ResultsGroup, { search })
3950 3208 ] })
3951 3209 ] }) })
3952 3210 }
3953 3211 );
@@ -4063,15 +3321,23 @@
4063 3321 var import_element6 = __toESM(require_element(), 1);
4064 3322 var import_data8 = __toESM(require_data(), 1);
4065 3323 function useCommandLoader(loader) {
4066 3324 const { registerCommandLoader: registerCommandLoader2, unregisterCommandLoader: unregisterCommandLoader2 } = (0, import_data8.useDispatch)(store);
3325 + const currentHookRef = (0, import_element6.useRef)(loader.hook);
4067 3326 (0, import_element6.useEffect)(() => {
3327 + currentHookRef.current = loader.hook;
3328 + }, [loader.hook]);
3329 + const hook = (0, import_element6.useCallback)(
3330 + (...args) => currentHookRef.current(...args),
3331 + []
3332 + );
3333 + (0, import_element6.useEffect)(() => {
4068 3334 if (loader.disabled) {
4069 3335 return;
4070 3336 }
4071 3337 registerCommandLoader2({
4072 3338 name: loader.name,
4073 - hook: loader.hook,
3339 + hook,
4074 3340 context: loader.context,
4075 3341 category: loader.category
4076 3342 });
4077 3343 return () => {
@@ -4078,9 +3344,9 @@
4078 3344 unregisterCommandLoader2(loader.name);
4079 3345 };
4080 3346 }, [
4081 3347 loader.name,
4082 - loader.hook,
3348 + hook,
4083 3349 loader.context,
4084 3350 loader.category,
4085 3351 loader.disabled,
4086 3352 registerCommandLoader2,
@@ -4087,6 +3353,8 @@
4087 3353 unregisterCommandLoader2
4088 3354 ]);
4089 3355 }
4090 3356 return __toCommonJS(index_exports);
3357 +})();
3358 +(window.wp ||= {}).commands = wp.commands;
4091 3359 })();
4092 3360 //# sourceMappingURL=index.js.map