| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
1 var wp; 2 (wp ||= {}).commands = (() => { 3 var __create = Object.create; 4 var __defProp = Object.defineProperty; 5 var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 6 var __getOwnPropNames = Object.getOwnPropertyNames; 7 var __getProtoOf = Object.getPrototypeOf; 8 var __hasOwnProp = Object.prototype.hasOwnProperty; 9 var __commonJS = (cb, mod) => function __require() { 10 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; 11 }; 12 var __export = (target, all) => { 13 for (var name in all) 14 __defProp(target, name, { get: all[name], enumerable: true }); 15 }; 16 var __copyProps = (to, from, except, desc) => { 17 if (from && typeof from === "object" || typeof from === "function") { 18 for (let key of __getOwnPropNames(from)) 19 if (!__hasOwnProp.call(to, key) && key !== except) 20 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 21 } 22 return to; 23 }; 24 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( 25 // If the importer is in node compatibility mode or this is not an ESM 26 // file that has been converted to a CommonJS file using a Babel- 27 // compatible transform (i.e. "__esModule" has not been set), then set 28 // "default" to the CommonJS "module.exports" for node compatibility. 29 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, 30 mod 31 )); 32 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); 33 34 // vendor-external:react 35 var require_react = __commonJS({ 36 "vendor-external:react"(exports, module) { 37 module.exports = window.React; 38 } 39 }); 40 41 // vendor-external:react/jsx-runtime 42 var require_jsx_runtime = __commonJS({ 43 "vendor-external:react/jsx-runtime"(exports, module) { 44 module.exports = window.ReactJSXRuntime; 45 } 46 }); 47 48 // vendor-external:react-dom 49 var require_react_dom = __commonJS({ 50 "vendor-external:react-dom"(exports, module) { 51 module.exports = window.ReactDOM; 52 } 53 }); 54 55 // package-external:@wordpress/data 56 var require_data = __commonJS({ 57 "package-external:@wordpress/data"(exports, module) { 58 module.exports = window.wp.data; 59 } 60 }); 61 62 // package-external:@wordpress/element 63 var require_element = __commonJS({ 64 "package-external:@wordpress/element"(exports, module) { 65 module.exports = window.wp.element; 66 } 67 }); 68 69 // package-external:@wordpress/i18n 70 var require_i18n = __commonJS({ 71 "package-external:@wordpress/i18n"(exports, module) { 72 module.exports = window.wp.i18n; 73 } 74 }); 75 76 // package-external:@wordpress/components 77 var require_components = __commonJS({ 78 "package-external:@wordpress/components"(exports, module) { 79 module.exports = window.wp.components; 80 } 81 }); 82 83 // package-external:@wordpress/keyboard-shortcuts 84 var require_keyboard_shortcuts = __commonJS({ 85 "package-external:@wordpress/keyboard-shortcuts"(exports, module) { 86 module.exports = window.wp.keyboardShortcuts; 87 } 88 }); 89 90 // package-external:@wordpress/primitives 91 var require_primitives = __commonJS({ 92 "package-external:@wordpress/primitives"(exports, module) { 93 module.exports = window.wp.primitives; 94 } 95 }); 96 97 // package-external:@wordpress/private-apis 98 var require_private_apis = __commonJS({ 99 "package-external:@wordpress/private-apis"(exports, module) { 100 module.exports = window.wp.privateApis; 101 } 102 }); 103 104 // package-external:@wordpress/preferences 105 var require_preferences = __commonJS({ 106 "package-external:@wordpress/preferences"(exports, module) { 107 module.exports = window.wp.preferences; 108 } 109 }); 110 111 // packages/commands/build-module/index.mjs 112 var index_exports = {}; 113 __export(index_exports, { 114 CommandMenu: () => CommandMenu, 115 privateApis: () => privateApis, 116 store: () => store, 117 useCommand: () => useCommand, 118 useCommandLoader: () => useCommandLoader, 119 useCommands: () => useCommands 120 }); 121 122 // node_modules/cmdk/dist/chunk-NZJY6EH4.mjs 123 var U = 1; 124 var Y = 0.9; 125 var H = 0.8; 126 var J = 0.17; 127 var p = 0.1; 128 var u = 0.999; 129 var $ = 0.9999; 130 var k = 0.99; 131 var m = /[\\\/_+.#"@\[\(\{&]/; 132 var B = /[\\\/_+.#"@\[\(\{&]/g; 133 var K = /[\s-]/; 134 var X = /[\s-]/g; 135 function G(_, C, h, P2, A, f, O) { 136 if (f === C.length) return A === _.length ? U : k; 137 var T2 = `$A},$f}`; 138 if (O[T2] !== void 0) return O[T2]; 139 for (var L2 = P2.charAt(f), c = h.indexOf(L2, A), S = 0, E, N2, R, M; c >= 0; ) E = G(_, C, h, P2, c + 1, f + 1, O), E > S && (c === A ? E *= U : m.test(_.charAt(c - 1)) ? (E *= H, R = _.slice(A, c - 1).match(B), R && A > 0 && (E *= Math.pow(u, R.length))) : K.test(_.charAt(c - 1)) ? (E *= Y, M = _.slice(A, c - 1).match(X), M && A > 0 && (E *= Math.pow(u, M.length))) : (E *= J, A > 0 && (E *= Math.pow(u, c - A))), _.charAt(c) !== C.charAt(f) && (E *= $)), (E < p && h.charAt(c - 1) === P2.charAt(f + 1) || P2.charAt(f + 1) === P2.charAt(f) && h.charAt(c - 1) !== P2.charAt(f)) && (N2 = G(_, C, h, P2, c + 1, f + 2, O), N2 * p > E && (E = N2 * p)), E > S && (S = E), c = h.indexOf(L2, c + 1); 140 return O[T2] = S, S; 141 } 142 function D(_) { 143 return _.toLowerCase().replace(X, " "); 144 } 145 function W(_, C, h) { 146 return _ = h && h.length > 0 ? `$_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {}); 147 } 148 149 // node_modules/@radix-ui/react-dialog/dist/index.mjs 150 var React24 = __toESM(require_react(), 1); 151 152 // node_modules/@radix-ui/primitive/dist/index.mjs 153 var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement); 154 function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) { 155 return function handleEvent(event) { 156 originalEventHandler?.(event); 157 if (checkForDefaultPrevented === false || !event.defaultPrevented) { 158 return ourEventHandler?.(event); 159 } 160 }; 161 } 162 163 // node_modules/@radix-ui/react-compose-refs/dist/index.mjs 164 var React = __toESM(require_react(), 1); 165 function setRef(ref, value) { 166 if (typeof ref === "function") { 167 return ref(value); 168 } else if (ref !== null && ref !== void 0) { 169 ref.current = value; 170 } 171 } 172 function composeRefs(...refs) { 173 return (node) => { 174 let hasCleanup = false; 175 const cleanups = refs.map((ref) => { 176 const cleanup = setRef(ref, node); 177 if (!hasCleanup && typeof cleanup == "function") { 178 hasCleanup = true; 179 } 180 return cleanup; 181 }); 182 if (hasCleanup) { 183 return () => { 184 for (let i = 0; i < cleanups.length; i++) { 185 const cleanup = cleanups[i]; 186 if (typeof cleanup == "function") { 187 cleanup(); 188 } else { 189 setRef(refs[i], null); 190 } 191 } 192 }; 193 } 194 }; 195 } 196 function useComposedRefs(...refs) { 197 return React.useCallback(composeRefs(...refs), refs); 198 } 199 200 // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs 201 var React2 = __toESM(require_react(), 1); 202 var import_jsx_runtime = __toESM(require_jsx_runtime(), 1); 203 function createContext2(rootComponentName, defaultContext) { 204 const Context = React2.createContext(defaultContext); 205 const Provider = (props) => { 206 const { children, ...context2 } = props; 207 const value = React2.useMemo(() => context2, Object.values(context2)); 208 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children }); 209 }; 210 Provider.displayName = rootComponentName + "Provider"; 211 function useContext22(consumerName) { 212 const context2 = React2.useContext(Context); 213 if (context2) return context2; 214 if (defaultContext !== void 0) return defaultContext; 215 throw new Error(`\`$consumerName}\` must be used within \`$rootComponentName}\``); 216 } 217 return [Provider, useContext22]; 218 } 219 function createContextScope(scopeName, createContextScopeDeps = []) { 220 let defaultContexts = []; 221 function createContext32(rootComponentName, defaultContext) { 222 const BaseContext = React2.createContext(defaultContext); 223 const index = defaultContexts.length; 224 defaultContexts = [...defaultContexts, defaultContext]; 225 const Provider = (props) => { 226 const { scope, children, ...context2 } = props; 227 const Context = scope?.[scopeName]?.[index] || BaseContext; 228 const value = React2.useMemo(() => context2, Object.values(context2)); 229 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children }); 230 }; 231 Provider.displayName = rootComponentName + "Provider"; 232 function useContext22(consumerName, scope) { 233 const Context = scope?.[scopeName]?.[index] || BaseContext; 234 const context2 = React2.useContext(Context); 235 if (context2) return context2; 236 if (defaultContext !== void 0) return defaultContext; 237 throw new Error(`\`$consumerName}\` must be used within \`$rootComponentName}\``); 238 } 239 return [Provider, useContext22]; 240 } 241 const createScope = () => { 242 const scopeContexts = defaultContexts.map((defaultContext) => { 243 return React2.createContext(defaultContext); 244 }); 245 return function useScope(scope) { 246 const contexts = scope?.[scopeName] || scopeContexts; 247 return React2.useMemo( 248 () => ({ [`__scope$scopeName}`]: { ...scope, [scopeName]: contexts } }), 249 [scope, contexts] 250 ); 251 }; 252 }; 253 createScope.scopeName = scopeName; 254 return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)]; 255 } 256 function composeContextScopes(...scopes) { 257 const baseScope = scopes[0]; 258 if (scopes.length === 1) return baseScope; 259 const createScope = () => { 260 const scopeHooks = scopes.map((createScope2) => ({ 261 useScope: createScope2(), 262 scopeName: createScope2.scopeName 263 })); 264 return function useComposedScopes(overrideScopes) { 265 const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => { 266 const scopeProps = useScope(overrideScopes); 267 const currentScope = scopeProps[`__scope$scopeName}`]; 268 return { ...nextScopes2, ...currentScope }; 269 }, {}); 270 return React2.useMemo(() => ({ [`__scope$baseScope.scopeName}`]: nextScopes }), [nextScopes]); 271 }; 272 }; 273 createScope.scopeName = baseScope.scopeName; 274 return createScope; 275 } 276 277 // node_modules/@radix-ui/react-id/dist/index.mjs 278 var React4 = __toESM(require_react(), 1); 279 280 // node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs 281 var React3 = __toESM(require_react(), 1); 282 var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => { 283 }; 284 285 // node_modules/@radix-ui/react-id/dist/index.mjs 286 var useReactId = React4[" useId ".trim().toString()] || (() => void 0); 287 var count = 0; 288 function useId(deterministicId) { 289 const [id, setId] = React4.useState(useReactId()); 290 useLayoutEffect2(() => { 291 if (!deterministicId) setId((reactId) => reactId ?? String(count++)); 292 }, [deterministicId]); 293 return deterministicId || (id ? `radix-$id}` : ""); 294 } 295 296 // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs 297 var React5 = __toESM(require_react(), 1); 298 var React22 = __toESM(require_react(), 1); 299 var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2; 300 function useControllableState({ 301 prop, 302 defaultProp, 303 onChange = () => { 304 }, 305 caller 306 }) { 307 const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({ 308 defaultProp, 309 onChange 310 }); 311 const isControlled = prop !== void 0; 312 const value = isControlled ? prop : uncontrolledProp; 313 if (true) { 314 const isControlledRef = React5.useRef(prop !== void 0); 315 React5.useEffect(() => { 316 const wasControlled = isControlledRef.current; 317 if (wasControlled !== isControlled) { 318 const from = wasControlled ? "controlled" : "uncontrolled"; 319 const to = isControlled ? "controlled" : "uncontrolled"; 320 console.warn( 321 `$caller} is changing from $from} to $to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.` 322 ); 323 } 324 isControlledRef.current = isControlled; 325 }, [isControlled, caller]); 326 } 327 const setValue = React5.useCallback( 328 (nextValue) => { 329 if (isControlled) { 330 const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue; 331 if (value2 !== prop) { 332 onChangeRef.current?.(value2); 333 } 334 } else { 335 setUncontrolledProp(nextValue); 336 } 337 }, 338 [isControlled, prop, setUncontrolledProp, onChangeRef] 339 ); 340 return [value, setValue]; 341 } 342 function useUncontrolledState({ 343 defaultProp, 344 onChange 345 }) { 346 const [value, setValue] = React5.useState(defaultProp); 347 const prevValueRef = React5.useRef(value); 348 const onChangeRef = React5.useRef(onChange); 349 useInsertionEffect(() => { 350 onChangeRef.current = onChange; 351 }, [onChange]); 352 React5.useEffect(() => { 353 if (prevValueRef.current !== value) { 354 onChangeRef.current?.(value); 355 prevValueRef.current = value; 356 } 357 }, [value, prevValueRef]); 358 return [value, setValue, onChangeRef]; 359 } 360 function isFunction(value) { 361 return typeof value === "function"; 362 } 363 364 // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs 365 var React10 = __toESM(require_react(), 1); 366 367 // node_modules/@radix-ui/react-primitive/dist/index.mjs 368 var React7 = __toESM(require_react(), 1); 369 var ReactDOM = __toESM(require_react_dom(), 1); 370 371 // node_modules/@radix-ui/react-slot/dist/index.mjs 372 var React6 = __toESM(require_react(), 1); 373 var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1); 374 // @__NO_SIDE_EFFECTS__ 375 function createSlot(ownerName) { 376 const SlotClone = /* @__PURE__ */ createSlotClone(ownerName); 377 const Slot2 = React6.forwardRef((props, forwardedRef) => { 378 const { children, ...slotProps } = props; 379 const childrenArray = React6.Children.toArray(children); 380 const slottable = childrenArray.find(isSlottable); 381 if (slottable) { 382 const newElement = slottable.props.children; 383 const newChildren = childrenArray.map((child) => { 384 if (child === slottable) { 385 if (React6.Children.count(newElement) > 1) return React6.Children.only(null); 386 return React6.isValidElement(newElement) ? newElement.props.children : null; 387 } else { 388 return child; 389 } 390 }); 391 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null }); 392 } 393 return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children }); 394 }); 395 Slot2.displayName = `$ownerName}.Slot`; 396 return Slot2; 397 } 398 // @__NO_SIDE_EFFECTS__ 399 function createSlotClone(ownerName) { 400 const SlotClone = React6.forwardRef((props, forwardedRef) => { 401 const { children, ...slotProps } = props; 402 if (React6.isValidElement(children)) { 403 const childrenRef = getElementRef(children); 404 const props2 = mergeProps(slotProps, children.props); 405 if (children.type !== React6.Fragment) { 406 props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef; 407 } 408 return React6.cloneElement(children, props2); 409 } 410 return React6.Children.count(children) > 1 ? React6.Children.only(null) : null; 411 }); 412 SlotClone.displayName = `$ownerName}.SlotClone`; 413 return SlotClone; 414 } 415 var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable"); 416 function isSlottable(child) { 417 return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER; 418 } 419 function mergeProps(slotProps, childProps) { 420 const overrideProps = { ...childProps }; 421 for (const propName in childProps) { 422 const slotPropValue = slotProps[propName]; 423 const childPropValue = childProps[propName]; 424 const isHandler = /^on[A-Z]/.test(propName); 425 if (isHandler) { 426 if (slotPropValue && childPropValue) { 427 overrideProps[propName] = (...args) => { 428 const result = childPropValue(...args); 429 slotPropValue(...args); 430 return result; 431 }; 432 } else if (slotPropValue) { 433 overrideProps[propName] = slotPropValue; 434 } 435 } else if (propName === "style") { 436 overrideProps[propName] = { ...slotPropValue, ...childPropValue }; 437 } else if (propName === "className") { 438 overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "); 439 } 440 } 441 return { ...slotProps, ...overrideProps }; 442 } 443 function getElementRef(element) { 444 let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; 445 let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 446 if (mayWarn) { 447 return element.ref; 448 } 449 getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; 450 mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 451 if (mayWarn) { 452 return element.props.ref; 453 } 454 return element.props.ref || element.ref; 455 } 456 457 // node_modules/@radix-ui/react-primitive/dist/index.mjs 458 var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1); 459 var NODES = [ 460 "a", 461 "button", 462 "div", 463 "form", 464 "h2", 465 "h3", 466 "img", 467 "input", 468 "label", 469 "li", 470 "nav", 471 "ol", 472 "p", 473 "select", 474 "span", 475 "svg", 476 "ul" 477 ]; 478 var Primitive = NODES.reduce((primitive, node) => { 479 const Slot2 = createSlot(`Primitive.$node}`); 480 const Node2 = React7.forwardRef((props, forwardedRef) => { 481 const { asChild, ...primitiveProps } = props; 482 const Comp = asChild ? Slot2 : node; 483 if (typeof window !== "undefined") { 484 window[/* @__PURE__ */ Symbol.for("radix-ui")] = true; 485 } 486 return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef }); 487 }); 488 Node2.displayName = `Primitive.$node}`; 489 return { ...primitive, [node]: Node2 }; 490 }, {}); 491 function dispatchDiscreteCustomEvent(target, event) { 492 if (target) ReactDOM.flushSync(() => target.dispatchEvent(event)); 493 } 494 495 // node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs 496 var React8 = __toESM(require_react(), 1); 497 function useCallbackRef(callback) { 498 const callbackRef = React8.useRef(callback); 499 React8.useEffect(() => { 500 callbackRef.current = callback; 501 }); 502 return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []); 503 } 504 505 // node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs 506 var React9 = __toESM(require_react(), 1); 507 function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) { 508 const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp); 509 React9.useEffect(() => { 510 const handleKeyDown = (event) => { 511 if (event.key === "Escape") { 512 onEscapeKeyDown(event); 513 } 514 }; 515 ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true }); 516 return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true }); 517 }, [onEscapeKeyDown, ownerDocument]); 518 } 519 520 // node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs 521 var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1); 522 var DISMISSABLE_LAYER_NAME = "DismissableLayer"; 523 var CONTEXT_UPDATE = "dismissableLayer.update"; 524 var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside"; 525 var FOCUS_OUTSIDE = "dismissableLayer.focusOutside"; 526 var originalBodyPointerEvents; 527 var DismissableLayerContext = React10.createContext({ 528 layers: /* @__PURE__ */ new Set(), 529 layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(), 530 branches: /* @__PURE__ */ new Set() 531 }); 532 var DismissableLayer = React10.forwardRef( 533 (props, forwardedRef) => { 534 const { 535 disableOutsidePointerEvents = false, 536 onEscapeKeyDown, 537 onPointerDownOutside, 538 onFocusOutside, 539 onInteractOutside, 540 onDismiss, 541 ...layerProps 542 } = props; 543 const context2 = React10.useContext(DismissableLayerContext); 544 const [node, setNode] = React10.useState(null); 545 const ownerDocument = node?.ownerDocument ?? globalThis?.document; 546 const [, force] = React10.useState({}); 547 const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2)); 548 const layers = Array.from(context2.layers); 549 const [highestLayerWithOutsidePointerEventsDisabled] = [...context2.layersWithOutsidePointerEventsDisabled].slice(-1); 550 const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); 551 const index = node ? layers.indexOf(node) : -1; 552 const isBodyPointerEventsDisabled = context2.layersWithOutsidePointerEventsDisabled.size > 0; 553 const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex; 554 const pointerDownOutside = usePointerDownOutside((event) => { 555 const target = event.target; 556 const isPointerDownOnBranch = [...context2.branches].some((branch) => branch.contains(target)); 557 if (!isPointerEventsEnabled || isPointerDownOnBranch) return; 558 onPointerDownOutside?.(event); 559 onInteractOutside?.(event); 560 if (!event.defaultPrevented) onDismiss?.(); 561 }, ownerDocument); 562 const focusOutside = useFocusOutside((event) => { 563 const target = event.target; 564 const isFocusInBranch = [...context2.branches].some((branch) => branch.contains(target)); 565 if (isFocusInBranch) return; 566 onFocusOutside?.(event); 567 onInteractOutside?.(event); 568 if (!event.defaultPrevented) onDismiss?.(); 569 }, ownerDocument); 570 useEscapeKeydown((event) => { 571 const isHighestLayer = index === context2.layers.size - 1; 572 if (!isHighestLayer) return; 573 onEscapeKeyDown?.(event); 574 if (!event.defaultPrevented && onDismiss) { 575 event.preventDefault(); 576 onDismiss(); 577 } 578 }, ownerDocument); 579 React10.useEffect(() => { 580 if (!node) return; 581 if (disableOutsidePointerEvents) { 582 if (context2.layersWithOutsidePointerEventsDisabled.size === 0) { 583 originalBodyPointerEvents = ownerDocument.body.style.pointerEvents; 584 ownerDocument.body.style.pointerEvents = "none"; 585 } 586 context2.layersWithOutsidePointerEventsDisabled.add(node); 587 } 588 context2.layers.add(node); 589 dispatchUpdate(); 590 return () => { 591 if (disableOutsidePointerEvents && context2.layersWithOutsidePointerEventsDisabled.size === 1) { 592 ownerDocument.body.style.pointerEvents = originalBodyPointerEvents; 593 } 594 }; 595 }, [node, ownerDocument, disableOutsidePointerEvents, context2]); 596 React10.useEffect(() => { 597 return () => { 598 if (!node) return; 599 context2.layers.delete(node); 600 context2.layersWithOutsidePointerEventsDisabled.delete(node); 601 dispatchUpdate(); 602 }; 603 }, [node, context2]); 604 React10.useEffect(() => { 605 const handleUpdate = () => force({}); 606 document.addEventListener(CONTEXT_UPDATE, handleUpdate); 607 return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate); 608 }, []); 609 return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)( 610 Primitive.div, 611 { 612 ...layerProps, 613 ref: composedRefs, 614 style: { 615 pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0, 616 ...props.style 617 }, 618 onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture), 619 onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture), 620 onPointerDownCapture: composeEventHandlers( 621 props.onPointerDownCapture, 622 pointerDownOutside.onPointerDownCapture 623 ) 624 } 625 ); 626 } 627 ); 628 DismissableLayer.displayName = DISMISSABLE_LAYER_NAME; 629 var BRANCH_NAME = "DismissableLayerBranch"; 630 var DismissableLayerBranch = React10.forwardRef((props, forwardedRef) => { 631 const context2 = React10.useContext(DismissableLayerContext); 632 const ref = React10.useRef(null); 633 const composedRefs = useComposedRefs(forwardedRef, ref); 634 React10.useEffect(() => { 635 const node = ref.current; 636 if (node) { 637 context2.branches.add(node); 638 return () => { 639 context2.branches.delete(node); 640 }; 641 } 642 }, [context2.branches]); 643 return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Primitive.div, { ...props, ref: composedRefs }); 644 }); 645 DismissableLayerBranch.displayName = BRANCH_NAME; 646 function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) { 647 const handlePointerDownOutside = useCallbackRef(onPointerDownOutside); 648 const isPointerInsideReactTreeRef = React10.useRef(false); 649 const handleClickRef = React10.useRef(() => { 650 }); 651 React10.useEffect(() => { 652 const handlePointerDown = (event) => { 653 if (event.target && !isPointerInsideReactTreeRef.current) { 654 let handleAndDispatchPointerDownOutsideEvent2 = function() { 655 handleAndDispatchCustomEvent( 656 POINTER_DOWN_OUTSIDE, 657 handlePointerDownOutside, 658 eventDetail, 659 { discrete: true } 660 ); 661 }; 662 var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2; 663 const eventDetail = { originalEvent: event }; 664 if (event.pointerType === "touch") { 665 ownerDocument.removeEventListener("click", handleClickRef.current); 666 handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2; 667 ownerDocument.addEventListener("click", handleClickRef.current, { once: true }); 668 } else { 669 handleAndDispatchPointerDownOutsideEvent2(); 670 } 671 } else { 672 ownerDocument.removeEventListener("click", handleClickRef.current); 673 } 674 isPointerInsideReactTreeRef.current = false; 675 }; 676 const timerId = window.setTimeout(() => { 677 ownerDocument.addEventListener("pointerdown", handlePointerDown); 678 }, 0); 679 return () => { 680 window.clearTimeout(timerId); 681 ownerDocument.removeEventListener("pointerdown", handlePointerDown); 682 ownerDocument.removeEventListener("click", handleClickRef.current); 683 }; 684 }, [ownerDocument, handlePointerDownOutside]); 685 return { 686 // ensures we check React component tree (not just DOM tree) 687 onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true 688 }; 689 } 690 function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) { 691 const handleFocusOutside = useCallbackRef(onFocusOutside); 692 const isFocusInsideReactTreeRef = React10.useRef(false); 693 React10.useEffect(() => { 694 const handleFocus = (event) => { 695 if (event.target && !isFocusInsideReactTreeRef.current) { 696 const eventDetail = { originalEvent: event }; 697 handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, { 698 discrete: false 699 }); 700 } 701 }; 702 ownerDocument.addEventListener("focusin", handleFocus); 703 return () => ownerDocument.removeEventListener("focusin", handleFocus); 704 }, [ownerDocument, handleFocusOutside]); 705 return { 706 onFocusCapture: () => isFocusInsideReactTreeRef.current = true, 707 onBlurCapture: () => isFocusInsideReactTreeRef.current = false 708 }; 709 } 710 function dispatchUpdate() { 711 const event = new CustomEvent(CONTEXT_UPDATE); 712 document.dispatchEvent(event); 713 } 714 function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) { 715 const target = detail.originalEvent.target; 716 const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail }); 717 if (handler) target.addEventListener(name, handler, { once: true }); 718 if (discrete) { 719 dispatchDiscreteCustomEvent(target, event); 720 } else { 721 target.dispatchEvent(event); 722 } 723 } 724 725 // node_modules/@radix-ui/react-focus-scope/dist/index.mjs 726 var React11 = __toESM(require_react(), 1); 727 var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1); 728 var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount"; 729 var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount"; 730 var EVENT_OPTIONS = { bubbles: false, cancelable: true }; 731 var FOCUS_SCOPE_NAME = "FocusScope"; 732 var FocusScope = React11.forwardRef((props, forwardedRef) => { 733 const { 734 loop = false, 735 trapped = false, 736 onMountAutoFocus: onMountAutoFocusProp, 737 onUnmountAutoFocus: onUnmountAutoFocusProp, 738 ...scopeProps 739 } = props; 740 const [container, setContainer] = React11.useState(null); 741 const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp); 742 const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp); 743 const lastFocusedElementRef = React11.useRef(null); 744 const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node)); 745 const focusScope = React11.useRef({ 746 paused: false, 747 pause() { 748 this.paused = true; 749 }, 750 resume() { 751 this.paused = false; 752 } 753 }).current; 754 React11.useEffect(() => { 755 if (trapped) { 756 let handleFocusIn2 = function(event) { 757 if (focusScope.paused || !container) return; 758 const target = event.target; 759 if (container.contains(target)) { 760 lastFocusedElementRef.current = target; 761 } else { 762 focus(lastFocusedElementRef.current, { select: true }); 763 } 764 }, handleFocusOut2 = function(event) { 765 if (focusScope.paused || !container) return; 766 const relatedTarget = event.relatedTarget; 767 if (relatedTarget === null) return; 768 if (!container.contains(relatedTarget)) { 769 focus(lastFocusedElementRef.current, { select: true }); 770 } 771 }, handleMutations2 = function(mutations) { 772 const focusedElement = document.activeElement; 773 if (focusedElement !== document.body) return; 774 for (const mutation of mutations) { 775 if (mutation.removedNodes.length > 0) focus(container); 776 } 777 }; 778 var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2; 779 document.addEventListener("focusin", handleFocusIn2); 780 document.addEventListener("focusout", handleFocusOut2); 781 const mutationObserver = new MutationObserver(handleMutations2); 782 if (container) mutationObserver.observe(container, { childList: true, subtree: true }); 783 return () => { 784 document.removeEventListener("focusin", handleFocusIn2); 785 document.removeEventListener("focusout", handleFocusOut2); 786 mutationObserver.disconnect(); 787 }; 788 } 789 }, [trapped, container, focusScope.paused]); 790 React11.useEffect(() => { 791 if (container) { 792 focusScopesStack.add(focusScope); 793 const previouslyFocusedElement = document.activeElement; 794 const hasFocusedCandidate = container.contains(previouslyFocusedElement); 795 if (!hasFocusedCandidate) { 796 const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS); 797 container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); 798 container.dispatchEvent(mountEvent); 799 if (!mountEvent.defaultPrevented) { 800 focusFirst(removeLinks(getTabbableCandidates(container)), { select: true }); 801 if (document.activeElement === previouslyFocusedElement) { 802 focus(container); 803 } 804 } 805 } 806 return () => { 807 container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus); 808 setTimeout(() => { 809 const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS); 810 container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); 811 container.dispatchEvent(unmountEvent); 812 if (!unmountEvent.defaultPrevented) { 813 focus(previouslyFocusedElement ?? document.body, { select: true }); 814 } 815 container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus); 816 focusScopesStack.remove(focusScope); 817 }, 0); 818 }; 819 } 820 }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]); 821 const handleKeyDown = React11.useCallback( 822 (event) => { 823 if (!loop && !trapped) return; 824 if (focusScope.paused) return; 825 const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey; 826 const focusedElement = document.activeElement; 827 if (isTabKey && focusedElement) { 828 const container2 = event.currentTarget; 829 const [first, last] = getTabbableEdges(container2); 830 const hasTabbableElementsInside = first && last; 831 if (!hasTabbableElementsInside) { 832 if (focusedElement === container2) event.preventDefault(); 833 } else { 834 if (!event.shiftKey && focusedElement === last) { 835 event.preventDefault(); 836 if (loop) focus(first, { select: true }); 837 } else if (event.shiftKey && focusedElement === first) { 838 event.preventDefault(); 839 if (loop) focus(last, { select: true }); 840 } 841 } 842 } 843 }, 844 [loop, trapped, focusScope.paused] 845 ); 846 return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown }); 847 }); 848 FocusScope.displayName = FOCUS_SCOPE_NAME; 849 function focusFirst(candidates, { select = false } = {}) { 850 const previouslyFocusedElement = document.activeElement; 851 for (const candidate of candidates) { 852 focus(candidate, { select }); 853 if (document.activeElement !== previouslyFocusedElement) return; 854 } 855 } 856 function getTabbableEdges(container) { 857 const candidates = getTabbableCandidates(container); 858 const first = findVisible(candidates, container); 859 const last = findVisible(candidates.reverse(), container); 860 return [first, last]; 861 } 862 function getTabbableCandidates(container) { 863 const nodes = []; 864 const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { 865 acceptNode: (node) => { 866 const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden"; 867 if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; 868 return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP; 869 } 870 }); 871 while (walker.nextNode()) nodes.push(walker.currentNode); 872 return nodes; 873 } 874 function findVisible(elements, container) { 875 for (const element of elements) { 876 if (!isHidden(element, { upTo: container })) return element; 877 } 878 } 879 function isHidden(node, { upTo }) { 880 if (getComputedStyle(node).visibility === "hidden") return true; 881 while (node) { 882 if (upTo !== void 0 && node === upTo) return false; 883 if (getComputedStyle(node).display === "none") return true; 884 node = node.parentElement; 885 } 886 return false; 887 } 888 function isSelectableInput(element) { 889 return element instanceof HTMLInputElement && "select" in element; 890 } 891 function focus(element, { select = false } = {}) { 892 if (element && element.focus) { 893 const previouslyFocusedElement = document.activeElement; 894 element.focus({ preventScroll: true }); 895 if (element !== previouslyFocusedElement && isSelectableInput(element) && select) 896 element.select(); 897 } 898 } 899 var focusScopesStack = createFocusScopesStack(); 900 function createFocusScopesStack() { 901 let stack = []; 902 return { 903 add(focusScope) { 904 const activeFocusScope = stack[0]; 905 if (focusScope !== activeFocusScope) { 906 activeFocusScope?.pause(); 907 } 908 stack = arrayRemove(stack, focusScope); 909 stack.unshift(focusScope); 910 }, 911 remove(focusScope) { 912 stack = arrayRemove(stack, focusScope); 913 stack[0]?.resume(); 914 } 915 }; 916 } 917 function arrayRemove(array, item) { 918 const updatedArray = [...array]; 919 const index = updatedArray.indexOf(item); 920 if (index !== -1) { 921 updatedArray.splice(index, 1); 922 } 923 return updatedArray; 924 } 925 function removeLinks(items) { 926 return items.filter((item) => item.tagName !== "A"); 927 } 928 929 // node_modules/@radix-ui/react-portal/dist/index.mjs 930 var React12 = __toESM(require_react(), 1); 931 var import_react_dom = __toESM(require_react_dom(), 1); 932 var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1); 933 var PORTAL_NAME = "Portal"; 934 var Portal = React12.forwardRef((props, forwardedRef) => { 935 const { container: containerProp, ...portalProps } = props; 936 const [mounted, setMounted] = React12.useState(false); 937 useLayoutEffect2(() => setMounted(true), []); 938 const container = containerProp || mounted && globalThis?.document?.body; 939 return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null; 940 }); 941 Portal.displayName = PORTAL_NAME; 942 943 // node_modules/@radix-ui/react-presence/dist/index.mjs 944 var React23 = __toESM(require_react(), 1); 945 var React13 = __toESM(require_react(), 1); 946 function useStateMachine(initialState, machine) { 947 return React13.useReducer((state, event) => { 948 const nextState = machine[state][event]; 949 return nextState ?? state; 950 }, initialState); 951 } 952 var Presence = (props) => { 953 const { present, children } = props; 954 const presence = usePresence(present); 955 const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children); 956 const ref = useComposedRefs(presence.ref, getElementRef2(child)); 957 const forceMount = typeof children === "function"; 958 return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null; 959 }; 960 Presence.displayName = "Presence"; 961 function usePresence(present) { 962 const [node, setNode] = React23.useState(); 963 const stylesRef = React23.useRef(null); 964 const prevPresentRef = React23.useRef(present); 965 const prevAnimationNameRef = React23.useRef("none"); 966 const initialState = present ? "mounted" : "unmounted"; 967 const [state, send] = useStateMachine(initialState, { 968 mounted: { 969 UNMOUNT: "unmounted", 970 ANIMATION_OUT: "unmountSuspended" 971 }, 972 unmountSuspended: { 973 MOUNT: "mounted", 974 ANIMATION_END: "unmounted" 975 }, 976 unmounted: { 977 MOUNT: "mounted" 978 } 979 }); 980 React23.useEffect(() => { 981 const currentAnimationName = getAnimationName(stylesRef.current); 982 prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none"; 983 }, [state]); 984 useLayoutEffect2(() => { 985 const styles = stylesRef.current; 986 const wasPresent = prevPresentRef.current; 987 const hasPresentChanged = wasPresent !== present; 988 if (hasPresentChanged) { 989 const prevAnimationName = prevAnimationNameRef.current; 990 const currentAnimationName = getAnimationName(styles); 991 if (present) { 992 send("MOUNT"); 993 } else if (currentAnimationName === "none" || styles?.display === "none") { 994 send("UNMOUNT"); 995 } else { 996 const isAnimating = prevAnimationName !== currentAnimationName; 997 if (wasPresent && isAnimating) { 998 send("ANIMATION_OUT"); 999 } else { 1000 send("UNMOUNT"); 1001 } 1002 } 1003 prevPresentRef.current = present; 1004 } 1005 }, [present, send]); 1006 useLayoutEffect2(() => { 1007 if (node) { 1008 let timeoutId; 1009 const ownerWindow = node.ownerDocument.defaultView ?? window; 1010 const handleAnimationEnd = (event) => { 1011 const currentAnimationName = getAnimationName(stylesRef.current); 1012 const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName)); 1013 if (event.target === node && isCurrentAnimation) { 1014 send("ANIMATION_END"); 1015 if (!prevPresentRef.current) { 1016 const currentFillMode = node.style.animationFillMode; 1017 node.style.animationFillMode = "forwards"; 1018 timeoutId = ownerWindow.setTimeout(() => { 1019 if (node.style.animationFillMode === "forwards") { 1020 node.style.animationFillMode = currentFillMode; 1021 } 1022 }); 1023 } 1024 } 1025 }; 1026 const handleAnimationStart = (event) => { 1027 if (event.target === node) { 1028 prevAnimationNameRef.current = getAnimationName(stylesRef.current); 1029 } 1030 }; 1031 node.addEventListener("animationstart", handleAnimationStart); 1032 node.addEventListener("animationcancel", handleAnimationEnd); 1033 node.addEventListener("animationend", handleAnimationEnd); 1034 return () => { 1035 ownerWindow.clearTimeout(timeoutId); 1036 node.removeEventListener("animationstart", handleAnimationStart); 1037 node.removeEventListener("animationcancel", handleAnimationEnd); 1038 node.removeEventListener("animationend", handleAnimationEnd); 1039 }; 1040 } else { 1041 send("ANIMATION_END"); 1042 } 1043 }, [node, send]); 1044 return { 1045 isPresent: ["mounted", "unmountSuspended"].includes(state), 1046 ref: React23.useCallback((node2) => { 1047 stylesRef.current = node2 ? getComputedStyle(node2) : null; 1048 setNode(node2); 1049 }, []) 1050 }; 1051 } 1052 function getAnimationName(styles) { 1053 return styles?.animationName || "none"; 1054 } 1055 function getElementRef2(element) { 1056 let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; 1057 let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 1058 if (mayWarn) { 1059 return element.ref; 1060 } 1061 getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; 1062 mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; 1063 if (mayWarn) { 1064 return element.props.ref; 1065 } 1066 return element.props.ref || element.ref; 1067 } 1068 1069 // node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs 1070 var React14 = __toESM(require_react(), 1); 1071 var count2 = 0; 1072 function useFocusGuards() { 1073 React14.useEffect(() => { 1074 const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]"); 1075 document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard()); 1076 document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard()); 1077 count2++; 1078 return () => { 1079 if (count2 === 1) { 1080 document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove()); 1081 } 1082 count2--; 1083 }; 1084 }, []); 1085 } 1086 function createFocusGuard() { 1087 const element = document.createElement("span"); 1088 element.setAttribute("data-radix-focus-guard", ""); 1089 element.tabIndex = 0; 1090 element.style.outline = "none"; 1091 element.style.opacity = "0"; 1092 element.style.position = "fixed"; 1093 element.style.pointerEvents = "none"; 1094 return element; 1095 } 1096 1097 // node_modules/tslib/tslib.es6.mjs 1098 var __assign = function() { 1099 __assign = Object.assign || function __assign2(t2) { 1100 for (var s, i = 1, n = arguments.length; i < n; i++) { 1101 s = arguments[i]; 1102 for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t2[p2] = s[p2]; 1103 } 1104 return t2; 1105 }; 1106 return __assign.apply(this, arguments); 1107 }; 1108 function __rest(s, e) { 1109 var t2 = {}; 1110 for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0) 1111 t2[p2] = s[p2]; 1112 if (s != null && typeof Object.getOwnPropertySymbols === "function") 1113 for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) { 1114 if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i])) 1115 t2[p2[i]] = s[p2[i]]; 1116 } 1117 return t2; 1118 } 1119 function __spreadArray(to, from, pack) { 1120 if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { 1121 if (ar || !(i in from)) { 1122 if (!ar) ar = Array.prototype.slice.call(from, 0, i); 1123 ar[i] = from[i]; 1124 } 1125 } 1126 return to.concat(ar || Array.prototype.slice.call(from)); 1127 } 1128 1129 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js 1130 var React21 = __toESM(require_react()); 1131 1132 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js 1133 var React17 = __toESM(require_react()); 1134 1135 // node_modules/react-remove-scroll-bar/dist/es2015/constants.js 1136 var zeroRightClassName = "right-scroll-bar-position"; 1137 var fullWidthClassName = "width-before-scroll-bar"; 1138 var noScrollbarsClassName = "with-scroll-bars-hidden"; 1139 var removedBarSizeVariable = "--removed-body-scroll-bar-size"; 1140 1141 // node_modules/use-callback-ref/dist/es2015/assignRef.js 1142 function assignRef(ref, value) { 1143 if (typeof ref === "function") { 1144 ref(value); 1145 } else if (ref) { 1146 ref.current = value; 1147 } 1148 return ref; 1149 } 1150 1151 // node_modules/use-callback-ref/dist/es2015/useRef.js 1152 var import_react = __toESM(require_react()); 1153 function useCallbackRef2(initialValue, callback) { 1154 var ref = (0, import_react.useState)(function() { 1155 return { 1156 // value 1157 value: initialValue, 1158 // last callback 1159 callback, 1160 // "memoized" public interface 1161 facade: { 1162 get current() { 1163 return ref.value; 1164 }, 1165 set current(value) { 1166 var last = ref.value; 1167 if (last !== value) { 1168 ref.value = value; 1169 ref.callback(value, last); 1170 } 1171 } 1172 } 1173 }; 1174 })[0]; 1175 ref.callback = callback; 1176 return ref.facade; 1177 } 1178 1179 // node_modules/use-callback-ref/dist/es2015/useMergeRef.js 1180 var React15 = __toESM(require_react()); 1181 var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React15.useLayoutEffect : React15.useEffect; 1182 var currentValues = /* @__PURE__ */ new WeakMap(); 1183 function useMergeRefs(refs, defaultValue) { 1184 var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) { 1185 return refs.forEach(function(ref) { 1186 return assignRef(ref, newValue); 1187 }); 1188 }); 1189 useIsomorphicLayoutEffect(function() { 1190 var oldValue = currentValues.get(callbackRef); 1191 if (oldValue) { 1192 var prevRefs_1 = new Set(oldValue); 1193 var nextRefs_1 = new Set(refs); 1194 var current_1 = callbackRef.current; 1195 prevRefs_1.forEach(function(ref) { 1196 if (!nextRefs_1.has(ref)) { 1197 assignRef(ref, null); 1198 } 1199 }); 1200 nextRefs_1.forEach(function(ref) { 1201 if (!prevRefs_1.has(ref)) { 1202 assignRef(ref, current_1); 1203 } 1204 }); 1205 } 1206 currentValues.set(callbackRef, refs); 1207 }, [refs]); 1208 return callbackRef; 1209 } 1210 1211 // node_modules/use-sidecar/dist/es2015/medium.js 1212 function ItoI(a) { 1213 return a; 1214 } 1215 function innerCreateMedium(defaults, middleware) { 1216 if (middleware === void 0) { 1217 middleware = ItoI; 1218 } 1219 var buffer = []; 1220 var assigned = false; 1221 var medium = { 1222 read: function() { 1223 if (assigned) { 1224 throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`."); 1225 } 1226 if (buffer.length) { 1227 return buffer[buffer.length - 1]; 1228 } 1229 return defaults; 1230 }, 1231 useMedium: function(data) { 1232 var item = middleware(data, assigned); 1233 buffer.push(item); 1234 return function() { 1235 buffer = buffer.filter(function(x) { 1236 return x !== item; 1237 }); 1238 }; 1239 }, 1240 assignSyncMedium: function(cb) { 1241 assigned = true; 1242 while (buffer.length) { 1243 var cbs = buffer; 1244 buffer = []; 1245 cbs.forEach(cb); 1246 } 1247 buffer = { 1248 push: function(x) { 1249 return cb(x); 1250 }, 1251 filter: function() { 1252 return buffer; 1253 } 1254 }; 1255 }, 1256 assignMedium: function(cb) { 1257 assigned = true; 1258 var pendingQueue = []; 1259 if (buffer.length) { 1260 var cbs = buffer; 1261 buffer = []; 1262 cbs.forEach(cb); 1263 pendingQueue = buffer; 1264 } 1265 var executeQueue = function() { 1266 var cbs2 = pendingQueue; 1267 pendingQueue = []; 1268 cbs2.forEach(cb); 1269 }; 1270 var cycle = function() { 1271 return Promise.resolve().then(executeQueue); 1272 }; 1273 cycle(); 1274 buffer = { 1275 push: function(x) { 1276 pendingQueue.push(x); 1277 cycle(); 1278 }, 1279 filter: function(filter) { 1280 pendingQueue = pendingQueue.filter(filter); 1281 return buffer; 1282 } 1283 }; 1284 } 1285 }; 1286 return medium; 1287 } 1288 function createSidecarMedium(options) { 1289 if (options === void 0) { 1290 options = {}; 1291 } 1292 var medium = innerCreateMedium(null); 1293 medium.options = __assign({ async: true, ssr: false }, options); 1294 return medium; 1295 } 1296 1297 // node_modules/use-sidecar/dist/es2015/exports.js 1298 var React16 = __toESM(require_react()); 1299 var SideCar = function(_a) { 1300 var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]); 1301 if (!sideCar) { 1302 throw new Error("Sidecar: please provide `sideCar` property to import the right car"); 1303 } 1304 var Target = sideCar.read(); 1305 if (!Target) { 1306 throw new Error("Sidecar medium not found"); 1307 } 1308 return React16.createElement(Target, __assign({}, rest)); 1309 }; 1310 SideCar.isSideCarExport = true; 1311 function exportSidecar(medium, exported) { 1312 medium.useMedium(exported); 1313 return SideCar; 1314 } 1315 1316 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/medium.js 1317 var effectCar = createSidecarMedium(); 1318 1319 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/UI.js 1320 var nothing = function() { 1321 return; 1322 }; 1323 var RemoveScroll = React17.forwardRef(function(props, parentRef) { 1324 var ref = React17.useRef(null); 1325 var _a = React17.useState({ 1326 onScrollCapture: nothing, 1327 onWheelCapture: nothing, 1328 onTouchMoveCapture: nothing 1329 }), callbacks = _a[0], setCallbacks = _a[1]; 1330 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"]); 1331 var SideCar2 = sideCar; 1332 var containerRef = useMergeRefs([ref, parentRef]); 1333 var containerProps = __assign(__assign({}, rest), callbacks); 1334 return React17.createElement( 1335 React17.Fragment, 1336 null, 1337 enabled && React17.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), 1338 forwardProps ? React17.cloneElement(React17.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React17.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children) 1339 ); 1340 }); 1341 RemoveScroll.defaultProps = { 1342 enabled: true, 1343 removeScrollBar: true, 1344 inert: false 1345 }; 1346 RemoveScroll.classNames = { 1347 fullWidth: fullWidthClassName, 1348 zeroRight: zeroRightClassName 1349 }; 1350 1351 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js 1352 var React20 = __toESM(require_react()); 1353 1354 // node_modules/react-remove-scroll-bar/dist/es2015/component.js 1355 var React19 = __toESM(require_react()); 1356 1357 // node_modules/react-style-singleton/dist/es2015/hook.js 1358 var React18 = __toESM(require_react()); 1359 1360 // node_modules/get-nonce/dist/es2015/index.js 1361 var currentNonce; 1362 var getNonce = function() { 1363 if (currentNonce) { 1364 return currentNonce; 1365 } 1366 if (typeof __webpack_nonce__ !== "undefined") { 1367 return __webpack_nonce__; 1368 } 1369 return void 0; 1370 }; 1371 1372 // node_modules/react-style-singleton/dist/es2015/singleton.js 1373 function makeStyleTag() { 1374 if (!document) 1375 return null; 1376 var tag = document.createElement("style"); 1377 tag.type = "text/css"; 1378 var nonce = getNonce(); 1379 if (nonce) { 1380 tag.setAttribute("nonce", nonce); 1381 } 1382 return tag; 1383 } 1384 function injectStyles(tag, css) { 1385 if (tag.styleSheet) { 1386 tag.styleSheet.cssText = css; 1387 } else { 1388 tag.appendChild(document.createTextNode(css)); 1389 } 1390 } 1391 function insertStyleTag(tag) { 1392 var head = document.head || document.getElementsByTagName("head")[0]; 1393 head.appendChild(tag); 1394 } 1395 var stylesheetSingleton = function() { 1396 var counter = 0; 1397 var stylesheet = null; 1398 return { 1399 add: function(style) { 1400 if (counter == 0) { 1401 if (stylesheet = makeStyleTag()) { 1402 injectStyles(stylesheet, style); 1403 insertStyleTag(stylesheet); 1404 } 1405 } 1406 counter++; 1407 }, 1408 remove: function() { 1409 counter--; 1410 if (!counter && stylesheet) { 1411 stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet); 1412 stylesheet = null; 1413 } 1414 } 1415 }; 1416 }; 1417 1418 // node_modules/react-style-singleton/dist/es2015/hook.js 1419 var styleHookSingleton = function() { 1420 var sheet = stylesheetSingleton(); 1421 return function(styles, isDynamic) { 1422 React18.useEffect(function() { 1423 sheet.add(styles); 1424 return function() { 1425 sheet.remove(); 1426 }; 1427 }, [styles && isDynamic]); 1428 }; 1429 }; 1430 1431 // node_modules/react-style-singleton/dist/es2015/component.js 1432 var styleSingleton = function() { 1433 var useStyle = styleHookSingleton(); 1434 var Sheet = function(_a) { 1435 var styles = _a.styles, dynamic = _a.dynamic; 1436 useStyle(styles, dynamic); 1437 return null; 1438 }; 1439 return Sheet; 1440 }; 1441 1442 // node_modules/react-remove-scroll-bar/dist/es2015/utils.js 1443 var zeroGap = { 1444 left: 0, 1445 top: 0, 1446 right: 0, 1447 gap: 0 1448 }; 1449 var parse = function(x) { 1450 return parseInt(x || "", 10) || 0; 1451 }; 1452 var getOffset = function(gapMode) { 1453 var cs = window.getComputedStyle(document.body); 1454 var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"]; 1455 var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"]; 1456 var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"]; 1457 return [parse(left), parse(top), parse(right)]; 1458 }; 1459 var getGapWidth = function(gapMode) { 1460 if (gapMode === void 0) { 1461 gapMode = "margin"; 1462 } 1463 if (typeof window === "undefined") { 1464 return zeroGap; 1465 } 1466 var offsets = getOffset(gapMode); 1467 var documentWidth = document.documentElement.clientWidth; 1468 var windowWidth = window.innerWidth; 1469 return { 1470 left: offsets[0], 1471 top: offsets[1], 1472 right: offsets[2], 1473 gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]) 1474 }; 1475 }; 1476 1477 // node_modules/react-remove-scroll-bar/dist/es2015/component.js 1478 var Style = styleSingleton(); 1479 var lockAttribute = "data-scroll-locked"; 1480 var getStyles = function(_a, allowRelative, gapMode, important) { 1481 var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap; 1482 if (gapMode === void 0) { 1483 gapMode = "margin"; 1484 } 1485 return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([ 1486 allowRelative && "position: relative ".concat(important, ";"), 1487 gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "), 1488 gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";") 1489 ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n"); 1490 }; 1491 var getCurrentUseCounter = function() { 1492 var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10); 1493 return isFinite(counter) ? counter : 0; 1494 }; 1495 var useLockAttribute = function() { 1496 React19.useEffect(function() { 1497 document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString()); 1498 return function() { 1499 var newCounter = getCurrentUseCounter() - 1; 1500 if (newCounter <= 0) { 1501 document.body.removeAttribute(lockAttribute); 1502 } else { 1503 document.body.setAttribute(lockAttribute, newCounter.toString()); 1504 } 1505 }; 1506 }, []); 1507 }; 1508 var RemoveScrollBar = function(_a) { 1509 var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b; 1510 useLockAttribute(); 1511 var gap = React19.useMemo(function() { 1512 return getGapWidth(gapMode); 1513 }, [gapMode]); 1514 return React19.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") }); 1515 }; 1516 1517 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js 1518 var passiveSupported = false; 1519 if (typeof window !== "undefined") { 1520 try { 1521 options = Object.defineProperty({}, "passive", { 1522 get: function() { 1523 passiveSupported = true; 1524 return true; 1525 } 1526 }); 1527 window.addEventListener("test", options, options); 1528 window.removeEventListener("test", options, options); 1529 } catch (err) { 1530 passiveSupported = false; 1531 } 1532 } 1533 var options; 1534 var nonPassive = passiveSupported ? { passive: false } : false; 1535 1536 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js 1537 var alwaysContainsScroll = function(node) { 1538 return node.tagName === "TEXTAREA"; 1539 }; 1540 var elementCanBeScrolled = function(node, overflow) { 1541 if (!(node instanceof Element)) { 1542 return false; 1543 } 1544 var styles = window.getComputedStyle(node); 1545 return ( 1546 // not-not-scrollable 1547 styles[overflow] !== "hidden" && // contains scroll inside self 1548 !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible") 1549 ); 1550 }; 1551 var elementCouldBeVScrolled = function(node) { 1552 return elementCanBeScrolled(node, "overflowY"); 1553 }; 1554 var elementCouldBeHScrolled = function(node) { 1555 return elementCanBeScrolled(node, "overflowX"); 1556 }; 1557 var locationCouldBeScrolled = function(axis, node) { 1558 var ownerDocument = node.ownerDocument; 1559 var current = node; 1560 do { 1561 if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) { 1562 current = current.host; 1563 } 1564 var isScrollable = elementCouldBeScrolled(axis, current); 1565 if (isScrollable) { 1566 var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2]; 1567 if (scrollHeight > clientHeight) { 1568 return true; 1569 } 1570 } 1571 current = current.parentNode; 1572 } while (current && current !== ownerDocument.body); 1573 return false; 1574 }; 1575 var getVScrollVariables = function(_a) { 1576 var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight; 1577 return [ 1578 scrollTop, 1579 scrollHeight, 1580 clientHeight 1581 ]; 1582 }; 1583 var getHScrollVariables = function(_a) { 1584 var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth; 1585 return [ 1586 scrollLeft, 1587 scrollWidth, 1588 clientWidth 1589 ]; 1590 }; 1591 var elementCouldBeScrolled = function(axis, node) { 1592 return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node); 1593 }; 1594 var getScrollVariables = function(axis, node) { 1595 return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node); 1596 }; 1597 var getDirectionFactor = function(axis, direction) { 1598 return axis === "h" && direction === "rtl" ? -1 : 1; 1599 }; 1600 var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) { 1601 var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction); 1602 var delta = directionFactor * sourceDelta; 1603 var target = event.target; 1604 var targetInLock = endTarget.contains(target); 1605 var shouldCancelScroll = false; 1606 var isDeltaPositive = delta > 0; 1607 var availableScroll = 0; 1608 var availableScrollTop = 0; 1609 do { 1610 if (!target) { 1611 break; 1612 } 1613 var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2]; 1614 var elementScroll = scroll_1 - capacity - directionFactor * position; 1615 if (position || elementScroll) { 1616 if (elementCouldBeScrolled(axis, target)) { 1617 availableScroll += elementScroll; 1618 availableScrollTop += position; 1619 } 1620 } 1621 var parent_1 = target.parentNode; 1622 target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1; 1623 } while ( 1624 // portaled content 1625 !targetInLock && target !== document.body || // self content 1626 targetInLock && (endTarget.contains(target) || endTarget === target) 1627 ); 1628 if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) { 1629 shouldCancelScroll = true; 1630 } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) { 1631 shouldCancelScroll = true; 1632 } 1633 return shouldCancelScroll; 1634 }; 1635 1636 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/SideEffect.js 1637 var getTouchXY = function(event) { 1638 return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0]; 1639 }; 1640 var getDeltaXY = function(event) { 1641 return [event.deltaX, event.deltaY]; 1642 }; 1643 var extractRef = function(ref) { 1644 return ref && "current" in ref ? ref.current : ref; 1645 }; 1646 var deltaCompare = function(x, y) { 1647 return x[0] === y[0] && x[1] === y[1]; 1648 }; 1649 var generateStyle = function(id) { 1650 return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); 1651 }; 1652 var idCounter = 0; 1653 var lockStack = []; 1654 function RemoveScrollSideCar(props) { 1655 var shouldPreventQueue = React20.useRef([]); 1656 var touchStartRef = React20.useRef([0, 0]); 1657 var activeAxis = React20.useRef(); 1658 var id = React20.useState(idCounter++)[0]; 1659 var Style2 = React20.useState(styleSingleton)[0]; 1660 var lastProps = React20.useRef(props); 1661 React20.useEffect(function() { 1662 lastProps.current = props; 1663 }, [props]); 1664 React20.useEffect(function() { 1665 if (props.inert) { 1666 document.body.classList.add("block-interactivity-".concat(id)); 1667 var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean); 1668 allow_1.forEach(function(el) { 1669 return el.classList.add("allow-interactivity-".concat(id)); 1670 }); 1671 return function() { 1672 document.body.classList.remove("block-interactivity-".concat(id)); 1673 allow_1.forEach(function(el) { 1674 return el.classList.remove("allow-interactivity-".concat(id)); 1675 }); 1676 }; 1677 } 1678 return; 1679 }, [props.inert, props.lockRef.current, props.shards]); 1680 var shouldCancelEvent = React20.useCallback(function(event, parent) { 1681 if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) { 1682 return !lastProps.current.allowPinchZoom; 1683 } 1684 var touch = getTouchXY(event); 1685 var touchStart = touchStartRef.current; 1686 var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0]; 1687 var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1]; 1688 var currentAxis; 1689 var target = event.target; 1690 var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v"; 1691 if ("touches" in event && moveDirection === "h" && target.type === "range") { 1692 return false; 1693 } 1694 var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target); 1695 if (!canBeScrolledInMainDirection) { 1696 return true; 1697 } 1698 if (canBeScrolledInMainDirection) { 1699 currentAxis = moveDirection; 1700 } else { 1701 currentAxis = moveDirection === "v" ? "h" : "v"; 1702 canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target); 1703 } 1704 if (!canBeScrolledInMainDirection) { 1705 return false; 1706 } 1707 if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) { 1708 activeAxis.current = currentAxis; 1709 } 1710 if (!currentAxis) { 1711 return true; 1712 } 1713 var cancelingAxis = activeAxis.current || currentAxis; 1714 return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true); 1715 }, []); 1716 var shouldPrevent = React20.useCallback(function(_event) { 1717 var event = _event; 1718 if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) { 1719 return; 1720 } 1721 var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event); 1722 var sourceEvent = shouldPreventQueue.current.filter(function(e) { 1723 return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); 1724 })[0]; 1725 if (sourceEvent && sourceEvent.should) { 1726 if (event.cancelable) { 1727 event.preventDefault(); 1728 } 1729 return; 1730 } 1731 if (!sourceEvent) { 1732 var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) { 1733 return node.contains(event.target); 1734 }); 1735 var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation; 1736 if (shouldStop) { 1737 if (event.cancelable) { 1738 event.preventDefault(); 1739 } 1740 } 1741 } 1742 }, []); 1743 var shouldCancel = React20.useCallback(function(name, delta, target, should) { 1744 var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) }; 1745 shouldPreventQueue.current.push(event); 1746 setTimeout(function() { 1747 shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) { 1748 return e !== event; 1749 }); 1750 }, 1); 1751 }, []); 1752 var scrollTouchStart = React20.useCallback(function(event) { 1753 touchStartRef.current = getTouchXY(event); 1754 activeAxis.current = void 0; 1755 }, []); 1756 var scrollWheel = React20.useCallback(function(event) { 1757 shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); 1758 }, []); 1759 var scrollTouchMove = React20.useCallback(function(event) { 1760 shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current)); 1761 }, []); 1762 React20.useEffect(function() { 1763 lockStack.push(Style2); 1764 props.setCallbacks({ 1765 onScrollCapture: scrollWheel, 1766 onWheelCapture: scrollWheel, 1767 onTouchMoveCapture: scrollTouchMove 1768 }); 1769 document.addEventListener("wheel", shouldPrevent, nonPassive); 1770 document.addEventListener("touchmove", shouldPrevent, nonPassive); 1771 document.addEventListener("touchstart", scrollTouchStart, nonPassive); 1772 return function() { 1773 lockStack = lockStack.filter(function(inst) { 1774 return inst !== Style2; 1775 }); 1776 document.removeEventListener("wheel", shouldPrevent, nonPassive); 1777 document.removeEventListener("touchmove", shouldPrevent, nonPassive); 1778 document.removeEventListener("touchstart", scrollTouchStart, nonPassive); 1779 }; 1780 }, []); 1781 var removeScrollBar = props.removeScrollBar, inert = props.inert; 1782 return React20.createElement( 1783 React20.Fragment, 1784 null, 1785 inert ? React20.createElement(Style2, { styles: generateStyle(id) }) : null, 1786 removeScrollBar ? React20.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null 1787 ); 1788 } 1789 function getOutermostShadowParent(node) { 1790 var shadowParent = null; 1791 while (node !== null) { 1792 if (node instanceof ShadowRoot) { 1793 shadowParent = node.host; 1794 node = node.host; 1795 } 1796 node = node.parentNode; 1797 } 1798 return shadowParent; 1799 } 1800 1801 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/sidecar.js 1802 var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar); 1803 1804 // node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/Combination.js 1805 var ReactRemoveScroll = React21.forwardRef(function(props, ref) { 1806 return React21.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default })); 1807 }); 1808 ReactRemoveScroll.classNames = RemoveScroll.classNames; 1809 var Combination_default = ReactRemoveScroll; 1810 1811 // node_modules/aria-hidden/dist/es2015/index.js 1812 var getDefaultParent = function(originalTarget) { 1813 if (typeof document === "undefined") { 1814 return null; 1815 } 1816 var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget; 1817 return sampleTarget.ownerDocument.body; 1818 }; 1819 var counterMap = /* @__PURE__ */ new WeakMap(); 1820 var uncontrolledNodes = /* @__PURE__ */ new WeakMap(); 1821 var markerMap = {}; 1822 var lockCount = 0; 1823 var unwrapHost = function(node) { 1824 return node && (node.host || unwrapHost(node.parentNode)); 1825 }; 1826 var correctTargets = function(parent, targets) { 1827 return targets.map(function(target) { 1828 if (parent.contains(target)) { 1829 return target; 1830 } 1831 var correctedTarget = unwrapHost(target); 1832 if (correctedTarget && parent.contains(correctedTarget)) { 1833 return correctedTarget; 1834 } 1835 console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing"); 1836 return null; 1837 }).filter(function(x) { 1838 return Boolean(x); 1839 }); 1840 }; 1841 var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) { 1842 var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]); 1843 if (!markerMap[markerName]) { 1844 markerMap[markerName] = /* @__PURE__ */ new WeakMap(); 1845 } 1846 var markerCounter = markerMap[markerName]; 1847 var hiddenNodes = []; 1848 var elementsToKeep = /* @__PURE__ */ new Set(); 1849 var elementsToStop = new Set(targets); 1850 var keep = function(el) { 1851 if (!el || elementsToKeep.has(el)) { 1852 return; 1853 } 1854 elementsToKeep.add(el); 1855 keep(el.parentNode); 1856 }; 1857 targets.forEach(keep); 1858 var deep = function(parent) { 1859 if (!parent || elementsToStop.has(parent)) { 1860 return; 1861 } 1862 Array.prototype.forEach.call(parent.children, function(node) { 1863 if (elementsToKeep.has(node)) { 1864 deep(node); 1865 } else { 1866 try { 1867 var attr = node.getAttribute(controlAttribute); 1868 var alreadyHidden = attr !== null && attr !== "false"; 1869 var counterValue = (counterMap.get(node) || 0) + 1; 1870 var markerValue = (markerCounter.get(node) || 0) + 1; 1871 counterMap.set(node, counterValue); 1872 markerCounter.set(node, markerValue); 1873 hiddenNodes.push(node); 1874 if (counterValue === 1 && alreadyHidden) { 1875 uncontrolledNodes.set(node, true); 1876 } 1877 if (markerValue === 1) { 1878 node.setAttribute(markerName, "true"); 1879 } 1880 if (!alreadyHidden) { 1881 node.setAttribute(controlAttribute, "true"); 1882 } 1883 } catch (e) { 1884 console.error("aria-hidden: cannot operate on ", node, e); 1885 } 1886 } 1887 }); 1888 }; 1889 deep(parentNode); 1890 elementsToKeep.clear(); 1891 lockCount++; 1892 return function() { 1893 hiddenNodes.forEach(function(node) { 1894 var counterValue = counterMap.get(node) - 1; 1895 var markerValue = markerCounter.get(node) - 1; 1896 counterMap.set(node, counterValue); 1897 markerCounter.set(node, markerValue); 1898 if (!counterValue) { 1899 if (!uncontrolledNodes.has(node)) { 1900 node.removeAttribute(controlAttribute); 1901 } 1902 uncontrolledNodes.delete(node); 1903 } 1904 if (!markerValue) { 1905 node.removeAttribute(markerName); 1906 } 1907 }); 1908 lockCount--; 1909 if (!lockCount) { 1910 counterMap = /* @__PURE__ */ new WeakMap(); 1911 counterMap = /* @__PURE__ */ new WeakMap(); 1912 uncontrolledNodes = /* @__PURE__ */ new WeakMap(); 1913 markerMap = {}; 1914 } 1915 }; 1916 }; 1917 var hideOthers = function(originalTarget, parentNode, markerName) { 1918 if (markerName === void 0) { 1919 markerName = "data-aria-hidden"; 1920 } 1921 var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]); 1922 var activeParentNode = parentNode || getDefaultParent(originalTarget); 1923 if (!activeParentNode) { 1924 return function() { 1925 return null; 1926 }; 1927 } 1928 targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script"))); 1929 return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden"); 1930 }; 1931 1932 // node_modules/@radix-ui/react-dialog/dist/index.mjs 1933 var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1); 1934 var DIALOG_NAME = "Dialog"; 1935 var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME); 1936 var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME); 1937 var Dialog = (props) => { 1938 const { 1939 __scopeDialog, 1940 children, 1941 open: openProp, 1942 defaultOpen, 1943 onOpenChange, 1944 modal = true 1945 } = props; 1946 const triggerRef = React24.useRef(null); 1947 const contentRef = React24.useRef(null); 1948 const [open2, setOpen] = useControllableState({ 1949 prop: openProp, 1950 defaultProp: defaultOpen ?? false, 1951 onChange: onOpenChange, 1952 caller: DIALOG_NAME 1953 }); 1954 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 1955 DialogProvider, 1956 { 1957 scope: __scopeDialog, 1958 triggerRef, 1959 contentRef, 1960 contentId: useId(), 1961 titleId: useId(), 1962 descriptionId: useId(), 1963 open: open2, 1964 onOpenChange: setOpen, 1965 onOpenToggle: React24.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]), 1966 modal, 1967 children 1968 } 1969 ); 1970 }; 1971 Dialog.displayName = DIALOG_NAME; 1972 var TRIGGER_NAME = "DialogTrigger"; 1973 var DialogTrigger = React24.forwardRef( 1974 (props, forwardedRef) => { 1975 const { __scopeDialog, ...triggerProps } = props; 1976 const context2 = useDialogContext(TRIGGER_NAME, __scopeDialog); 1977 const composedTriggerRef = useComposedRefs(forwardedRef, context2.triggerRef); 1978 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 1979 Primitive.button, 1980 { 1981 type: "button", 1982 "aria-haspopup": "dialog", 1983 "aria-expanded": context2.open, 1984 "aria-controls": context2.contentId, 1985 "data-state": getState(context2.open), 1986 ...triggerProps, 1987 ref: composedTriggerRef, 1988 onClick: composeEventHandlers(props.onClick, context2.onOpenToggle) 1989 } 1990 ); 1991 } 1992 ); 1993 DialogTrigger.displayName = TRIGGER_NAME; 1994 var PORTAL_NAME2 = "DialogPortal"; 1995 var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, { 1996 forceMount: void 0 1997 }); 1998 var DialogPortal = (props) => { 1999 const { __scopeDialog, forceMount, children, container } = props; 2000 const context2 = useDialogContext(PORTAL_NAME2, __scopeDialog); 2001 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 }) })) }); 2002 }; 2003 DialogPortal.displayName = PORTAL_NAME2; 2004 var OVERLAY_NAME = "DialogOverlay"; 2005 var DialogOverlay = React24.forwardRef( 2006 (props, forwardedRef) => { 2007 const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog); 2008 const { forceMount = portalContext.forceMount, ...overlayProps } = props; 2009 const context2 = useDialogContext(OVERLAY_NAME, props.__scopeDialog); 2010 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; 2011 } 2012 ); 2013 DialogOverlay.displayName = OVERLAY_NAME; 2014 var Slot = createSlot("DialogOverlay.RemoveScroll"); 2015 var DialogOverlayImpl = React24.forwardRef( 2016 (props, forwardedRef) => { 2017 const { __scopeDialog, ...overlayProps } = props; 2018 const context2 = useDialogContext(OVERLAY_NAME, __scopeDialog); 2019 return ( 2020 // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll` 2021 // ie. when `Overlay` and `Content` are siblings 2022 /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context2.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2023 Primitive.div, 2024 { 2025 "data-state": getState(context2.open), 2026 ...overlayProps, 2027 ref: forwardedRef, 2028 style: { pointerEvents: "auto", ...overlayProps.style } 2029 } 2030 ) }) 2031 ); 2032 } 2033 ); 2034 var CONTENT_NAME = "DialogContent"; 2035 var DialogContent = React24.forwardRef( 2036 (props, forwardedRef) => { 2037 const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog); 2038 const { forceMount = portalContext.forceMount, ...contentProps } = props; 2039 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog); 2040 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 }) }); 2041 } 2042 ); 2043 DialogContent.displayName = CONTENT_NAME; 2044 var DialogContentModal = React24.forwardRef( 2045 (props, forwardedRef) => { 2046 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog); 2047 const contentRef = React24.useRef(null); 2048 const composedRefs = useComposedRefs(forwardedRef, context2.contentRef, contentRef); 2049 React24.useEffect(() => { 2050 const content = contentRef.current; 2051 if (content) return hideOthers(content); 2052 }, []); 2053 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2054 DialogContentImpl, 2055 { 2056 ...props, 2057 ref: composedRefs, 2058 trapFocus: context2.open, 2059 disableOutsidePointerEvents: true, 2060 onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => { 2061 event.preventDefault(); 2062 context2.triggerRef.current?.focus(); 2063 }), 2064 onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => { 2065 const originalEvent = event.detail.originalEvent; 2066 const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true; 2067 const isRightClick = originalEvent.button === 2 || ctrlLeftClick; 2068 if (isRightClick) event.preventDefault(); 2069 }), 2070 onFocusOutside: composeEventHandlers( 2071 props.onFocusOutside, 2072 (event) => event.preventDefault() 2073 ) 2074 } 2075 ); 2076 } 2077 ); 2078 var DialogContentNonModal = React24.forwardRef( 2079 (props, forwardedRef) => { 2080 const context2 = useDialogContext(CONTENT_NAME, props.__scopeDialog); 2081 const hasInteractedOutsideRef = React24.useRef(false); 2082 const hasPointerDownOutsideRef = React24.useRef(false); 2083 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2084 DialogContentImpl, 2085 { 2086 ...props, 2087 ref: forwardedRef, 2088 trapFocus: false, 2089 disableOutsidePointerEvents: false, 2090 onCloseAutoFocus: (event) => { 2091 props.onCloseAutoFocus?.(event); 2092 if (!event.defaultPrevented) { 2093 if (!hasInteractedOutsideRef.current) context2.triggerRef.current?.focus(); 2094 event.preventDefault(); 2095 } 2096 hasInteractedOutsideRef.current = false; 2097 hasPointerDownOutsideRef.current = false; 2098 }, 2099 onInteractOutside: (event) => { 2100 props.onInteractOutside?.(event); 2101 if (!event.defaultPrevented) { 2102 hasInteractedOutsideRef.current = true; 2103 if (event.detail.originalEvent.type === "pointerdown") { 2104 hasPointerDownOutsideRef.current = true; 2105 } 2106 } 2107 const target = event.target; 2108 const targetIsTrigger = context2.triggerRef.current?.contains(target); 2109 if (targetIsTrigger) event.preventDefault(); 2110 if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) { 2111 event.preventDefault(); 2112 } 2113 } 2114 } 2115 ); 2116 } 2117 ); 2118 var DialogContentImpl = React24.forwardRef( 2119 (props, forwardedRef) => { 2120 const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props; 2121 const context2 = useDialogContext(CONTENT_NAME, __scopeDialog); 2122 const contentRef = React24.useRef(null); 2123 const composedRefs = useComposedRefs(forwardedRef, contentRef); 2124 useFocusGuards(); 2125 return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [ 2126 /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2127 FocusScope, 2128 { 2129 asChild: true, 2130 loop: true, 2131 trapped: trapFocus, 2132 onMountAutoFocus: onOpenAutoFocus, 2133 onUnmountAutoFocus: onCloseAutoFocus, 2134 children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2135 DismissableLayer, 2136 { 2137 role: "dialog", 2138 id: context2.contentId, 2139 "aria-describedby": context2.descriptionId, 2140 "aria-labelledby": context2.titleId, 2141 "data-state": getState(context2.open), 2142 ...contentProps, 2143 ref: composedRefs, 2144 onDismiss: () => context2.onOpenChange(false) 2145 } 2146 ) 2147 } 2148 ), 2149 /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [ 2150 /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TitleWarning, { titleId: context2.titleId }), 2151 /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DescriptionWarning, { contentRef, descriptionId: context2.descriptionId }) 2152 ] }) 2153 ] }); 2154 } 2155 ); 2156 var TITLE_NAME = "DialogTitle"; 2157 var DialogTitle = React24.forwardRef( 2158 (props, forwardedRef) => { 2159 const { __scopeDialog, ...titleProps } = props; 2160 const context2 = useDialogContext(TITLE_NAME, __scopeDialog); 2161 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.h2, { id: context2.titleId, ...titleProps, ref: forwardedRef }); 2162 } 2163 ); 2164 DialogTitle.displayName = TITLE_NAME; 2165 var DESCRIPTION_NAME = "DialogDescription"; 2166 var DialogDescription = React24.forwardRef( 2167 (props, forwardedRef) => { 2168 const { __scopeDialog, ...descriptionProps } = props; 2169 const context2 = useDialogContext(DESCRIPTION_NAME, __scopeDialog); 2170 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.p, { id: context2.descriptionId, ...descriptionProps, ref: forwardedRef }); 2171 } 2172 ); 2173 DialogDescription.displayName = DESCRIPTION_NAME; 2174 var CLOSE_NAME = "DialogClose"; 2175 var DialogClose = React24.forwardRef( 2176 (props, forwardedRef) => { 2177 const { __scopeDialog, ...closeProps } = props; 2178 const context2 = useDialogContext(CLOSE_NAME, __scopeDialog); 2179 return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( 2180 Primitive.button, 2181 { 2182 type: "button", 2183 ...closeProps, 2184 ref: forwardedRef, 2185 onClick: composeEventHandlers(props.onClick, () => context2.onOpenChange(false)) 2186 } 2187 ); 2188 } 2189 ); 2190 DialogClose.displayName = CLOSE_NAME; 2191 function getState(open2) { 2192 return open2 ? "open" : "closed"; 2193 } 2194 var TITLE_WARNING_NAME = "DialogTitleWarning"; 2195 var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, { 2196 contentName: CONTENT_NAME, 2197 titleName: TITLE_NAME, 2198 docsSlug: "dialog" 2199 }); 2200 var TitleWarning = ({ titleId }) => { 2201 const titleWarningContext = useWarningContext(TITLE_WARNING_NAME); 2202 const MESSAGE = `\`$titleWarningContext.contentName}\` requires a \`$titleWarningContext.titleName}\` for the component to be accessible for screen reader users. 2203 2204 If you want to hide the \`$titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component. 2205 2206 For more information, see https://radix-ui.com/primitives/docs/components/$titleWarningContext.docsSlug}`; 2207 React24.useEffect(() => { 2208 if (titleId) { 2209 const hasTitle = document.getElementById(titleId); 2210 if (!hasTitle) console.error(MESSAGE); 2211 } 2212 }, [MESSAGE, titleId]); 2213 return null; 2214 }; 2215 var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning"; 2216 var DescriptionWarning = ({ contentRef, descriptionId }) => { 2217 const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME); 2218 const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {$descriptionWarningContext.contentName}}.`; 2219 React24.useEffect(() => { 2220 const describedById = contentRef.current?.getAttribute("aria-describedby"); 2221 if (descriptionId && describedById) { 2222 const hasDescription = document.getElementById(descriptionId); 2223 if (!hasDescription) console.warn(MESSAGE); 2224 } 2225 }, [MESSAGE, contentRef, descriptionId]); 2226 return null; 2227 }; 2228 var Root = Dialog; 2229 var Portal2 = DialogPortal; 2230 var Overlay = DialogOverlay; 2231 var Content = DialogContent; 2232 2233 // node_modules/cmdk/dist/index.mjs 2234 var t = __toESM(require_react(), 1); 2235 var N = '[cmdk-group=""]'; 2236 var Y2 = '[cmdk-group-items=""]'; 2237 var be = '[cmdk-group-heading=""]'; 2238 var le = '[cmdk-item=""]'; 2239 var ce = `$le}:not([aria-disabled="true"])`; 2240 var Z = "cmdk-item-select"; 2241 var T = "data-value"; 2242 var Re = (r2, o, n) => W(r2, o, n); 2243 var ue = t.createContext(void 0); 2244 var K2 = () => t.useContext(ue); 2245 var de = t.createContext(void 0); 2246 var ee = () => t.useContext(de); 2247 var fe = t.createContext(void 0); 2248 var me = t.forwardRef((r2, o) => { 2249 let n = L(() => { 2250 var e, a; 2251 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() } }; 2252 }), 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(); 2253 k2(() => { 2254 if (R !== void 0) { 2255 let e = R.trim(); 2256 n.current.value = e, E.emit(); 2257 } 2258 }, [R]), k2(() => { 2259 v(6, ne); 2260 }, []); 2261 let E = t.useMemo(() => ({ subscribe: (e) => (f.current.add(e), () => f.current.delete(e)), snapshot: () => n.current, setState: (e, a, s) => { 2262 var i, l, g, y; 2263 if (!Object.is(n.current[e], a)) { 2264 if (n.current[e] = a, e === "search") J2(), z(), v(1, W2); 2265 else if (e === "value") { 2266 if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) { 2267 let h = document.getElementById(_); 2268 h ? h.focus() : (i = document.getElementById($2)) == null || i.focus(); 2269 } 2270 if (v(7, () => { 2271 var h; 2272 n.current.selectedItemId = (h = M()) == null ? void 0 : h.id, E.emit(); 2273 }), s || v(5, ne), ((l = p2.current) == null ? void 0 : l.value) !== void 0) { 2274 let h = a != null ? a : ""; 2275 (y = (g = p2.current).onValueChange) == null || y.call(g, h); 2276 return; 2277 } 2278 } 2279 E.emit(); 2280 } 2281 }, emit: () => { 2282 f.current.forEach((e) => e()); 2283 } }), []), U2 = t.useMemo(() => ({ value: (e, a, s) => { 2284 var i; 2285 a !== ((i = d.current.get(e)) == null ? void 0 : i.value) && (d.current.set(e, { value: a, keywords: s }), n.current.filtered.items.set(e, te(a, s)), v(2, () => { 2286 z(), E.emit(); 2287 })); 2288 }, item: (e, a) => (u2.current.add(e), a && (c.current.has(a) ? c.current.get(a).add(e) : c.current.set(a, /* @__PURE__ */ new Set([e]))), v(3, () => { 2289 J2(), z(), n.current.value || W2(), E.emit(); 2290 }), () => { 2291 d.current.delete(e), u2.current.delete(e), n.current.filtered.items.delete(e); 2292 let s = M(); 2293 v(4, () => { 2294 J2(), (s == null ? void 0 : s.getAttribute("id")) === e && W2(), E.emit(); 2295 }); 2296 }), group: (e) => (c.current.has(e) || c.current.set(e, /* @__PURE__ */ new Set()), () => { 2297 d.current.delete(e), c.current.delete(e); 2298 }), filter: () => p2.current.shouldFilter, label: b || r2["aria-label"], getDisablePointerSelection: () => p2.current.disablePointerSelection, listId: $2, inputId: _, labelId: q, listInnerRef: I }), []); 2299 function te(e, a) { 2300 var i, l; 2301 let s = (l = (i = p2.current) == null ? void 0 : i.filter) != null ? l : Re; 2302 return e ? s(e, n.current.search, a) : 0; 2303 } 2304 function z() { 2305 if (!n.current.search || p2.current.shouldFilter === false) return; 2306 let e = n.current.filtered.items, a = []; 2307 n.current.filtered.groups.forEach((i) => { 2308 let l = c.current.get(i), g = 0; 2309 l.forEach((y) => { 2310 let h = e.get(y); 2311 g = Math.max(h, g); 2312 }), a.push([i, g]); 2313 }); 2314 let s = I.current; 2315 V().sort((i, l) => { 2316 var h, F; 2317 let g = i.getAttribute("id"), y = l.getAttribute("id"); 2318 return ((h = e.get(y)) != null ? h : 0) - ((F = e.get(g)) != null ? F : 0); 2319 }).forEach((i) => { 2320 let l = i.closest(Y2); 2321 l ? l.appendChild(i.parentElement === l ? i : i.closest(`$Y2} > *`)) : s.appendChild(i.parentElement === s ? i : i.closest(`$Y2} > *`)); 2322 }), a.sort((i, l) => l[1] - i[1]).forEach((i) => { 2323 var g; 2324 let l = (g = I.current) == null ? void 0 : g.querySelector(`$N}[$T}="$encodeURIComponent(i[0])}"]`); 2325 l == null || l.parentElement.appendChild(l); 2326 }); 2327 } 2328 function W2() { 2329 let e = V().find((s) => s.getAttribute("aria-disabled") !== "true"), a = e == null ? void 0 : e.getAttribute(T); 2330 E.setState("value", a || void 0); 2331 } 2332 function J2() { 2333 var a, s, i, l; 2334 if (!n.current.search || p2.current.shouldFilter === false) { 2335 n.current.filtered.count = u2.current.size; 2336 return; 2337 } 2338 n.current.filtered.groups = /* @__PURE__ */ new Set(); 2339 let e = 0; 2340 for (let g of u2.current) { 2341 let y = (s = (a = d.current.get(g)) == null ? void 0 : a.value) != null ? s : "", h = (l = (i = d.current.get(g)) == null ? void 0 : i.keywords) != null ? l : [], F = te(y, h); 2342 n.current.filtered.items.set(g, F), F > 0 && e++; 2343 } 2344 for (let [g, y] of c.current) for (let h of y) if (n.current.filtered.items.get(h) > 0) { 2345 n.current.filtered.groups.add(g); 2346 break; 2347 } 2348 n.current.filtered.count = e; 2349 } 2350 function ne() { 2351 var a, s, i; 2352 let e = M(); 2353 e && (((a = e.parentElement) == null ? void 0 : a.firstChild) === e && ((i = (s = e.closest(N)) == null ? void 0 : s.querySelector(be)) == null || i.scrollIntoView({ block: "nearest" })), e.scrollIntoView({ block: "nearest" })); 2354 } 2355 function M() { 2356 var e; 2357 return (e = I.current) == null ? void 0 : e.querySelector(`$le}[aria-selected="true"]`); 2358 } 2359 function V() { 2360 var e; 2361 return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []); 2362 } 2363 function X2(e) { 2364 let s = V()[e]; 2365 s && E.setState("value", s.getAttribute(T)); 2366 } 2367 function Q(e) { 2368 var g; 2369 let a = M(), s = V(), i = s.findIndex((y) => y === a), l = s[i + e]; 2370 (g = p2.current) != null && g.loop && (l = i + e < 0 ? s[s.length - 1] : i + e === s.length ? s[0] : s[i + e]), l && E.setState("value", l.getAttribute(T)); 2371 } 2372 function re(e) { 2373 let a = M(), s = a == null ? void 0 : a.closest(N), i; 2374 for (; s && !i; ) s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce); 2375 i ? E.setState("value", i.getAttribute(T)) : Q(e); 2376 } 2377 let oe = () => X2(V().length - 1), ie = (e) => { 2378 e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1); 2379 }, se = (e) => { 2380 e.preventDefault(), e.metaKey ? X2(0) : e.altKey ? re(-1) : Q(-1); 2381 }; 2382 return t.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => { 2383 var s; 2384 (s = O.onKeyDown) == null || s.call(O, e); 2385 let a = e.nativeEvent.isComposing || e.keyCode === 229; 2386 if (!(e.defaultPrevented || a)) switch (e.key) { 2387 case "n": 2388 case "j": { 2389 j && e.ctrlKey && ie(e); 2390 break; 2391 } 2392 case "ArrowDown": { 2393 ie(e); 2394 break; 2395 } 2396 case "p": 2397 case "k": { 2398 j && e.ctrlKey && se(e); 2399 break; 2400 } 2401 case "ArrowUp": { 2402 se(e); 2403 break; 2404 } 2405 case "Home": { 2406 e.preventDefault(), X2(0); 2407 break; 2408 } 2409 case "End": { 2410 e.preventDefault(), oe(); 2411 break; 2412 } 2413 case "Enter": { 2414 e.preventDefault(); 2415 let i = M(); 2416 if (i) { 2417 let l = new Event(Z); 2418 i.dispatchEvent(l); 2419 } 2420 } 2421 } 2422 } }, 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)))); 2423 }); 2424 var he = t.forwardRef((r2, o) => { 2425 var _, I; 2426 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; 2427 k2(() => { 2428 if (!p2) return d.item(n, c == null ? void 0 : c.id); 2429 }, [p2]); 2430 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); 2431 t.useEffect(() => { 2432 let v = u2.current; 2433 if (!(!v || r2.disabled)) return v.addEventListener(Z, C), () => v.removeEventListener(Z, C); 2434 }, [x, r2.onSelect, r2.disabled]); 2435 function C() { 2436 var v, E; 2437 S(), (E = (v = f.current).onSelect) == null || E.call(v, b.current); 2438 } 2439 function S() { 2440 m2.setState("value", b.current, true); 2441 } 2442 if (!x) return null; 2443 let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r2; 2444 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); 2445 }); 2446 var Ee = t.forwardRef((r2, o) => { 2447 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); 2448 k2(() => R.group(f), []), ve(f, p2, [r2.value, r2.heading, b]); 2449 let C = t.useMemo(() => ({ id: f, forceMount: c }), [c]); 2450 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)))); 2451 }); 2452 var ye = t.forwardRef((r2, o) => { 2453 let { alwaysRender: n, ...u2 } = r2, c = t.useRef(null), d = P((f) => !f.search); 2454 return !n && !d ? null : t.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" }); 2455 }); 2456 var Se = t.forwardRef((r2, o) => { 2457 let { onValueChange: n, ...u2 } = r2, c = r2.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2(); 2458 return t.useEffect(() => { 2459 r2.value != null && d.setState("search", r2.value); 2460 }, [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) => { 2461 c || d.setState("search", m2.target.value), n == null || n(m2.target.value); 2462 } }); 2463 }); 2464 var Ce = t.forwardRef((r2, o) => { 2465 let { children: n, label: u2 = "Suggestions", ...c } = r2, d = t.useRef(null), f = t.useRef(null), p2 = P((m2) => m2.selectedItemId), b = K2(); 2466 return t.useEffect(() => { 2467 if (f.current && d.current) { 2468 let m2 = f.current, R = d.current, x, C = new ResizeObserver(() => { 2469 x = requestAnimationFrame(() => { 2470 let S = m2.offsetHeight; 2471 R.style.setProperty("--cmdk-list-height", S.toFixed(1) + "px"); 2472 }); 2473 }); 2474 return C.observe(m2), () => { 2475 cancelAnimationFrame(x), C.unobserve(m2); 2476 }; 2477 } 2478 }, []), 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))); 2479 }); 2480 var xe = t.forwardRef((r2, o) => { 2481 let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r2; 2482 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 })))); 2483 }); 2484 var Ie = t.forwardRef((r2, o) => P((u2) => u2.filtered.count === 0) ? t.createElement(Primitive.div, { ref: o, ...r2, "cmdk-empty": "", role: "presentation" }) : null); 2485 var Pe = t.forwardRef((r2, o) => { 2486 let { progress: n, children: u2, label: c = "Loading...", ...d } = r2; 2487 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))); 2488 }); 2489 var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe }); 2490 function we(r2, o) { 2491 let n = r2.nextElementSibling; 2492 for (; n; ) { 2493 if (n.matches(o)) return n; 2494 n = n.nextElementSibling; 2495 } 2496 } 2497 function De(r2, o) { 2498 let n = r2.previousElementSibling; 2499 for (; n; ) { 2500 if (n.matches(o)) return n; 2501 n = n.previousElementSibling; 2502 } 2503 } 2504 function pe(r2) { 2505 let o = t.useRef(r2); 2506 return k2(() => { 2507 o.current = r2; 2508 }), o; 2509 } 2510 var k2 = typeof window == "undefined" ? t.useEffect : t.useLayoutEffect; 2511 function L(r2) { 2512 let o = t.useRef(); 2513 return o.current === void 0 && (o.current = r2()), o; 2514 } 2515 function P(r2) { 2516 let o = ee(), n = () => r2(o.snapshot()); 2517 return t.useSyncExternalStore(o.subscribe, n, n); 2518 } 2519 function ve(r2, o, n, u2 = []) { 2520 let c = t.useRef(), d = K2(); 2521 return k2(() => { 2522 var b; 2523 let f = (() => { 2524 var m2; 2525 for (let R of n) { 2526 if (typeof R == "string") return R.trim(); 2527 if (typeof R == "object" && "current" in R) return R.current ? (m2 = R.current.textContent) == null ? void 0 : m2.trim() : c.current; 2528 } 2529 })(), p2 = u2.map((m2) => m2.trim()); 2530 d.value(r2, f, p2), (b = o.current) == null || b.setAttribute(T, f), c.current = f; 2531 }), c; 2532 } 2533 var ke = () => { 2534 let [r2, o] = t.useState(), n = L(() => /* @__PURE__ */ new Map()); 2535 return k2(() => { 2536 n.current.forEach((u2) => u2()), n.current = /* @__PURE__ */ new Map(); 2537 }, [r2]), (u2, c) => { 2538 n.current.set(u2, c), o({}); 2539 }; 2540 }; 2541 function Me(r2) { 2542 let o = r2.type; 2543 return typeof o == "function" ? o(r2.props) : "render" in o ? o.render(r2.props) : r2; 2544 } 2545 function B2({ asChild: r2, children: o }, n) { 2546 return r2 && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o); 2547 } 2548 var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" }; 2549 2550 // node_modules/clsx/dist/clsx.mjs 2551 function r(e) { 2552 var t2, f, n = ""; 2553 if ("string" == typeof e || "number" == typeof e) n += e; 2554 else if ("object" == typeof e) if (Array.isArray(e)) { 2555 var o = e.length; 2556 for (t2 = 0; t2 < o; t2++) e[t2] && (f = r(e[t2])) && (n && (n += " "), n += f); 2557 } else for (f in e) e[f] && (n && (n += " "), n += f); 2558 return n; 2559 } 2560 function clsx() { 2561 for (var e, t2, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t2 = r(e)) && (n && (n += " "), n += t2); 2562 return n; 2563 } 2564 var clsx_default = clsx; 2565 2566 // packages/commands/build-module/components/command-menu.mjs 2567 var import_data5 = __toESM(require_data(), 1); 2568 var import_element3 = __toESM(require_element(), 1); 2569 var import_i18n = __toESM(require_i18n(), 1); 2570 var import_components = __toESM(require_components(), 1); 2571 var import_keyboard_shortcuts = __toESM(require_keyboard_shortcuts(), 1); 2572 2573 // packages/icons/build-module/icon/index.mjs 2574 var import_element = __toESM(require_element(), 1); 2575 var icon_default = (0, import_element.forwardRef)( 2576 ({ icon, size = 24, ...props }, ref) => { 2577 return (0, import_element.cloneElement)(icon, { 2578 width: size, 2579 height: size, 2580 ...props, 2581 ref 2582 }); 2583 } 2584 ); 2585 2586 // packages/icons/build-module/library/arrow-right.mjs 2587 var import_primitives = __toESM(require_primitives(), 1); 2588 var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1); 2589 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", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime8.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" }) }); 2590 2591 // packages/icons/build-module/library/search.mjs 2592 var import_primitives2 = __toESM(require_primitives(), 1); 2593 var import_jsx_runtime9 = __toESM(require_jsx_runtime(), 1); 2594 var search_default = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_primitives2.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime9.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" }) }); 2595 2596 // packages/commands/build-module/store/index.mjs 2597 var import_data3 = __toESM(require_data(), 1); 2598 2599 // packages/commands/build-module/store/reducer.mjs 2600 var import_data = __toESM(require_data(), 1); 2601 function commands(state = {}, action) { 2602 switch (action.type) { 2603 case "REGISTER_COMMAND": 2604 return { 2605 ...state, 2606 [action.name]: { 2607 name: action.name, 2608 label: action.label, 2609 searchLabel: action.searchLabel, 2610 context: action.context, 2611 category: action.category, 2612 callback: action.callback, 2613 icon: action.icon, 2614 keywords: action.keywords 2615 } 2616 }; 2617 case "UNREGISTER_COMMAND": { 2618 const { [action.name]: _, ...remainingState } = state; 2619 return remainingState; 2620 } 2621 } 2622 return state; 2623 } 2624 function commandLoaders(state = {}, action) { 2625 switch (action.type) { 2626 case "REGISTER_COMMAND_LOADER": 2627 return { 2628 ...state, 2629 [action.name]: { 2630 name: action.name, 2631 context: action.context, 2632 category: action.category, 2633 hook: action.hook 2634 } 2635 }; 2636 case "UNREGISTER_COMMAND_LOADER": { 2637 const { [action.name]: _, ...remainingState } = state; 2638 return remainingState; 2639 } 2640 } 2641 return state; 2642 } 2643 function isOpen(state = false, action) { 2644 switch (action.type) { 2645 case "OPEN": 2646 return true; 2647 case "CLOSE": 2648 return false; 2649 } 2650 return state; 2651 } 2652 function context(state = "root", action) { 2653 switch (action.type) { 2654 case "SET_CONTEXT": 2655 return action.context; 2656 } 2657 return state; 2658 } 2659 function loaderStates(state = {}, action) { 2660 switch (action.type) { 2661 case "SET_LOADER_LOADING": 2662 return { 2663 ...state, 2664 [action.name]: action.isLoading 2665 }; 2666 } 2667 return state; 2668 } 2669 var reducer = (0, import_data.combineReducers)({ 2670 commands, 2671 commandLoaders, 2672 isOpen, 2673 context, 2674 loaderStates 2675 }); 2676 var reducer_default = reducer; 2677 2678 // packages/commands/build-module/store/actions.mjs 2679 var actions_exports = {}; 2680 __export(actions_exports, { 2681 close: () => close, 2682 open: () => open, 2683 registerCommand: () => registerCommand, 2684 registerCommandLoader: () => registerCommandLoader, 2685 unregisterCommand: () => unregisterCommand, 2686 unregisterCommandLoader: () => unregisterCommandLoader 2687 }); 2688 var REGISTERABLE_CATEGORIES = /* @__PURE__ */ new Set([ 2689 "command", 2690 "view", 2691 "edit", 2692 "action" 2693 ]); 2694 function registerCommand(config) { 2695 let { category } = config; 2696 if (!category || !REGISTERABLE_CATEGORIES.has(category)) { 2697 category = "action"; 2698 } 2699 return { 2700 type: "REGISTER_COMMAND", 2701 ...config, 2702 category 2703 }; 2704 } 2705 function unregisterCommand(name) { 2706 return { 2707 type: "UNREGISTER_COMMAND", 2708 name 2709 }; 2710 } 2711 function registerCommandLoader(config) { 2712 let { category } = config; 2713 if (!category || !REGISTERABLE_CATEGORIES.has(category)) { 2714 category = "action"; 2715 } 2716 return { 2717 type: "REGISTER_COMMAND_LOADER", 2718 ...config, 2719 category 2720 }; 2721 } 2722 function unregisterCommandLoader(name) { 2723 return { 2724 type: "UNREGISTER_COMMAND_LOADER", 2725 name 2726 }; 2727 } 2728 function open() { 2729 return { 2730 type: "OPEN" 2731 }; 2732 } 2733 function close() { 2734 return { 2735 type: "CLOSE" 2736 }; 2737 } 2738 2739 // packages/commands/build-module/store/selectors.mjs 2740 var selectors_exports = {}; 2741 __export(selectors_exports, { 2742 getCommandLoaders: () => getCommandLoaders, 2743 getCommands: () => getCommands, 2744 getContext: () => getContext, 2745 isOpen: () => isOpen2 2746 }); 2747 var import_data2 = __toESM(require_data(), 1); 2748 var getCommands = (0, import_data2.createSelector)( 2749 (state, contextual = false) => Object.values(state.commands).filter((command) => { 2750 const isContextual = command.context && command.context === state.context; 2751 return contextual ? isContextual : !isContextual; 2752 }), 2753 (state) => [state.commands, state.context] 2754 ); 2755 var getCommandLoaders = (0, import_data2.createSelector)( 2756 (state, contextual = false) => Object.values(state.commandLoaders).filter((loader) => { 2757 const isContextual = loader.context && loader.context === state.context; 2758 return contextual ? isContextual : !isContextual; 2759 }), 2760 (state) => [state.commandLoaders, state.context] 2761 ); 2762 function isOpen2(state) { 2763 return state.isOpen; 2764 } 2765 function getContext(state) { 2766 return state.context; 2767 } 2768 2769 // packages/commands/build-module/store/private-actions.mjs 2770 var private_actions_exports = {}; 2771 __export(private_actions_exports, { 2772 setContext: () => setContext, 2773 setLoaderLoading: () => setLoaderLoading 2774 }); 2775 function setContext(context2) { 2776 return { 2777 type: "SET_CONTEXT", 2778 context: context2 2779 }; 2780 } 2781 function setLoaderLoading(name, isLoading2) { 2782 return { 2783 type: "SET_LOADER_LOADING", 2784 name, 2785 isLoading: isLoading2 2786 }; 2787 } 2788 2789 // packages/commands/build-module/store/private-selectors.mjs 2790 var private_selectors_exports = {}; 2791 __export(private_selectors_exports, { 2792 isLoading: () => isLoading 2793 }); 2794 function isLoading(state) { 2795 return Object.values(state.loaderStates).some(Boolean); 2796 } 2797 2798 // packages/commands/build-module/lock-unlock.mjs 2799 var import_private_apis = __toESM(require_private_apis(), 1); 2800 var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)( 2801 "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.", 2802 "@wordpress/commands" 2803 ); 2804 2805 // packages/commands/build-module/store/index.mjs 2806 var STORE_NAME = "core/commands"; 2807 var store = (0, import_data3.createReduxStore)(STORE_NAME, { 2808 reducer: reducer_default, 2809 actions: actions_exports, 2810 selectors: selectors_exports 2811 }); 2812 (0, import_data3.register)(store); 2813 unlock(store).registerPrivateActions(private_actions_exports); 2814 unlock(store).registerPrivateSelectors(private_selectors_exports); 2815 2816 // packages/commands/build-module/components/use-recent-commands.mjs 2817 var import_data4 = __toESM(require_data(), 1); 2818 var import_preferences = __toESM(require_preferences(), 1); 2819 var import_element2 = __toESM(require_element(), 1); 2820 var MAX_RECENTLY_SAVED = 30; 2821 var MAX_RECENTLY_DISPLAYED = 5; 2822 var EMPTY_ARRAY = []; 2823 var EMPTY_SET = /* @__PURE__ */ new Set(); 2824 function recordUsage(name) { 2825 const current = (0, import_data4.select)(import_preferences.store).get( 2826 "core/commands", 2827 "recentlyUsed" 2828 ) ?? []; 2829 const next = [name, ...current.filter((n) => n !== name)].slice( 2830 0, 2831 MAX_RECENTLY_SAVED 2832 ); 2833 (0, import_data4.dispatch)(import_preferences.store).set("core/commands", "recentlyUsed", next); 2834 } 2835 function useLoaderCollector(hook, name, filterNames, onResolved) { 2836 const { setLoaderLoading: setLoaderLoading2 } = unlock((0, import_data4.useDispatch)(store)); 2837 const { isLoading: loading, commands: commands2 = [] } = hook({ search: "" }) ?? {}; 2838 (0, import_element2.useEffect)(() => { 2839 setLoaderLoading2(name, loading); 2840 }, [setLoaderLoading2, name, loading]); 2841 const filtered = filterNames ? commands2.filter((c) => filterNames.has(c.name)) : commands2; 2842 (0, import_element2.useEffect)(() => { 2843 onResolved(name, filtered); 2844 }, [onResolved, name, filtered]); 2845 (0, import_element2.useEffect)(() => { 2846 return () => onResolved(name, []); 2847 }, [onResolved, name]); 2848 } 2849 function useRecentCommands() { 2850 const { 2851 contextualCommands, 2852 staticCommands, 2853 contextualLoaders, 2854 staticLoaders, 2855 recentlyUsedNames = EMPTY_ARRAY 2856 } = (0, import_data4.useSelect)((select) => { 2857 const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store); 2858 return { 2859 contextualCommands: getCommands2(true), 2860 staticCommands: getCommands2(false), 2861 contextualLoaders: getCommandLoaders2(true), 2862 staticLoaders: getCommandLoaders2(false), 2863 recentlyUsedNames: select(import_preferences.store).get( 2864 "core/commands", 2865 "recentlyUsed" 2866 ) 2867 }; 2868 }, []); 2869 const [resolvedMap, setResolvedMap] = (0, import_element2.useState)(() => /* @__PURE__ */ new Map()); 2870 const onResolved = (0, import_element2.useCallback)((loaderName, cmds) => { 2871 setResolvedMap((prev) => { 2872 const prevCmds = prev.get(loaderName); 2873 if (prevCmds && prevCmds.length === cmds.length && prevCmds.every((c, i) => c.name === cmds[i].name)) { 2874 return prev; 2875 } 2876 const next = new Map(prev); 2877 next.set(loaderName, cmds); 2878 return next; 2879 }); 2880 }, []); 2881 const { recentNames, recentSet } = (0, import_element2.useMemo)(() => { 2882 const names = recentlyUsedNames.slice(0, MAX_RECENTLY_DISPLAYED); 2883 return { recentNames: names, recentSet: new Set(names) }; 2884 }, [recentlyUsedNames]); 2885 if (!recentlyUsedNames.length) { 2886 return { 2887 commands: [], 2888 loaders: [], 2889 recentSet: EMPTY_SET, 2890 onResolved 2891 }; 2892 } 2893 const allStaticCommands = [...contextualCommands, ...staticCommands]; 2894 const loaders = [...contextualLoaders, ...staticLoaders]; 2895 const allByName = /* @__PURE__ */ new Map(); 2896 allStaticCommands.forEach((c) => allByName.set(c.name, c)); 2897 for (const cmds of resolvedMap.values()) { 2898 cmds.forEach((c) => { 2899 if (!allByName.has(c.name)) { 2900 allByName.set(c.name, c); 2901 } 2902 }); 2903 } 2904 const commands2 = recentNames.map((n) => allByName.get(n)).filter(Boolean); 2905 return { commands: commands2, loaders, recentSet, onResolved }; 2906 } 2907 2908 // packages/commands/build-module/components/command-menu.mjs 2909 var import_jsx_runtime10 = __toESM(require_jsx_runtime(), 1); 2910 var { withIgnoreIMEEvents } = unlock(import_components.privateApis); 2911 var ITEM_ID_PREFIX = "command-palette-item-"; 2912 var inputLabel = (0, import_i18n.__)("Search commands and settings"); 2913 var CATEGORY_ICONS = { 2914 view: arrow_right_default 2915 }; 2916 var CATEGORY_LABELS = { 2917 command: (0, import_i18n.__)("Command"), 2918 view: (0, import_i18n.__)("View"), 2919 edit: (0, import_i18n.__)("Edit"), 2920 action: (0, import_i18n.__)("Action"), 2921 workflow: (0, import_i18n.__)("Workflow") 2922 }; 2923 function isValidIcon(icon) { 2924 return !!icon && (typeof icon === "string" || (0, import_element3.isValidElement)(icon) || typeof icon === "function" || icon instanceof import_element3.Component); 2925 } 2926 function CommandItem({ command, search, category, valuePrefix }) { 2927 const { close: close2 } = (0, import_data5.useDispatch)(store); 2928 const commandCategory = category ?? command.category; 2929 const label = command.searchLabel ?? command.label; 2930 const value = valuePrefix ? `$valuePrefix}$command.name}` : label; 2931 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 2932 _e.Item, 2933 { 2934 id: `$ITEM_ID_PREFIX}$value.toLowerCase()}`, 2935 value, 2936 keywords: valuePrefix ? [...command.keywords ?? [], label] : command.keywords, 2937 onSelect: () => { 2938 recordUsage(command.name); 2939 command.callback({ close: close2 }); 2940 }, 2941 children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)( 2942 import_components.__experimentalHStack, 2943 { 2944 alignment: "left", 2945 className: clsx_default("commands-command-menu__item", { 2946 "has-icon": CATEGORY_ICONS[commandCategory] || command.icon 2947 }), 2948 children: [ 2949 CATEGORY_ICONS[commandCategory] ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(icon_default, { icon: CATEGORY_ICONS[commandCategory] }) : isValidIcon(command.icon) && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(icon_default, { icon: command.icon }), 2950 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-label", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 2951 import_components.TextHighlight, 2952 { 2953 text: command.label, 2954 highlight: search 2955 } 2956 ) }), 2957 CATEGORY_LABELS[commandCategory] && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "commands-command-menu__item-category", children: CATEGORY_LABELS[commandCategory] }) 2958 ] 2959 } 2960 ) 2961 }, 2962 command.name 2963 ); 2964 } 2965 function CommandMenuLoader({ name, search, hook, category, valuePrefix }) { 2966 const { setLoaderLoading: setLoaderLoading2 } = unlock((0, import_data5.useDispatch)(store)); 2967 const { isLoading: loading, commands: commands2 = [] } = hook({ search }) ?? {}; 2968 (0, import_element3.useEffect)(() => { 2969 setLoaderLoading2(name, loading); 2970 }, [setLoaderLoading2, name, loading]); 2971 if (!commands2.length) { 2972 return null; 2973 } 2974 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_jsx_runtime10.Fragment, { children: commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 2975 CommandItem, 2976 { 2977 command, 2978 search, 2979 category: command.category ?? category, 2980 valuePrefix 2981 }, 2982 command.name 2983 )) }); 2984 } 2985 function CommandMenuLoaderWrapper({ hook, ...props }) { 2986 const currentLoaderRef = (0, import_element3.useRef)(hook); 2987 const [key, setKey] = (0, import_element3.useState)(0); 2988 (0, import_element3.useEffect)(() => { 2989 if (currentLoaderRef.current !== hook) { 2990 currentLoaderRef.current = hook; 2991 setKey((prevKey) => prevKey + 1); 2992 } 2993 }, [hook]); 2994 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 2995 CommandMenuLoader, 2996 { 2997 hook: currentLoaderRef.current, 2998 ...props 2999 }, 3000 key 3001 ); 3002 } 3003 function CommandList({ search, commands: commands2, loaders, valuePrefix }) { 3004 return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [ 3005 commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3006 CommandItem, 3007 { 3008 command, 3009 search, 3010 valuePrefix 3011 }, 3012 command.name 3013 )), 3014 loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3015 CommandMenuLoaderWrapper, 3016 { 3017 name: loader.name, 3018 search, 3019 hook: loader.hook, 3020 category: loader.category, 3021 valuePrefix 3022 }, 3023 loader.name 3024 )) 3025 ] }); 3026 } 3027 function RecentLoaderRunner({ hook, name, filterNames, onResolved }) { 3028 useLoaderCollector(hook, name, filterNames, onResolved); 3029 return null; 3030 } 3031 function RecentGroup() { 3032 const { commands: commands2, loaders, recentSet, onResolved } = useRecentCommands(); 3033 if (!commands2.length && !loaders.length) { 3034 return null; 3035 } 3036 return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Recent"), children: [ 3037 loaders.map((loader) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3038 RecentLoaderRunner, 3039 { 3040 name: loader.name, 3041 hook: loader.hook, 3042 filterNames: recentSet, 3043 onResolved 3044 }, 3045 loader.name 3046 )), 3047 commands2.map((command) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3048 CommandItem, 3049 { 3050 command, 3051 search: "", 3052 valuePrefix: "recent-" 3053 }, 3054 command.name 3055 )) 3056 ] }); 3057 } 3058 function SuggestionsGroup() { 3059 const { commands: commands2, loaders } = (0, import_data5.useSelect)((select) => { 3060 const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store); 3061 return { 3062 commands: getCommands2(true), 3063 loaders: getCommandLoaders2(true) 3064 }; 3065 }, []); 3066 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 }) }); 3067 } 3068 function ResultsGroup({ search }) { 3069 const { commands: commands2, contextualCommands, loaders, contextualLoaders } = (0, import_data5.useSelect)((select) => { 3070 const { getCommands: getCommands2, getCommandLoaders: getCommandLoaders2 } = select(store); 3071 return { 3072 commands: getCommands2(false), 3073 contextualCommands: getCommands2(true), 3074 loaders: getCommandLoaders2(false), 3075 contextualLoaders: getCommandLoaders2(true) 3076 }; 3077 }, []); 3078 return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.Group, { heading: (0, import_i18n.__)("Results"), children: [ 3079 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3080 CommandList, 3081 { 3082 search, 3083 commands: commands2, 3084 loaders 3085 } 3086 ), 3087 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3088 CommandList, 3089 { 3090 search, 3091 commands: contextualCommands, 3092 loaders: contextualLoaders 3093 } 3094 ) 3095 ] }); 3096 } 3097 function CommandInput({ search, setSearch }) { 3098 const commandMenuInput = (0, import_element3.useRef)(); 3099 const _value = P((state) => state.value); 3100 const selectedItemId = _value ? `$ITEM_ID_PREFIX}$_value}` : null; 3101 (0, import_element3.useEffect)(() => { 3102 commandMenuInput.current.focus(); 3103 }, []); 3104 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3105 _e.Input, 3106 { 3107 ref: commandMenuInput, 3108 value: search, 3109 onValueChange: setSearch, 3110 placeholder: inputLabel, 3111 "aria-activedescendant": selectedItemId 3112 } 3113 ); 3114 } 3115 function CommandMenu() { 3116 const { registerShortcut } = (0, import_data5.useDispatch)(import_keyboard_shortcuts.store); 3117 const [search, setSearch] = (0, import_element3.useState)(""); 3118 const { isOpen: paletteIsOpen, loadersLoading } = (0, import_data5.useSelect)( 3119 (select) => ({ 3120 isOpen: select(store).isOpen(), 3121 loadersLoading: unlock(select(store)).isLoading() 3122 }), 3123 [] 3124 ); 3125 const { open: open2, close: close2 } = (0, import_data5.useDispatch)(store); 3126 (0, import_element3.useEffect)(() => { 3127 registerShortcut({ 3128 name: "core/commands", 3129 category: "global", 3130 description: (0, import_i18n.__)("Open the command palette."), 3131 keyCombination: { 3132 modifier: "primary", 3133 character: "k" 3134 } 3135 }); 3136 }, [registerShortcut]); 3137 (0, import_keyboard_shortcuts.useShortcut)( 3138 "core/commands", 3139 /** @type {React.KeyboardEventHandler} */ 3140 withIgnoreIMEEvents((event) => { 3141 if (event.defaultPrevented) { 3142 return; 3143 } 3144 event.preventDefault(); 3145 if (paletteIsOpen) { 3146 close2(); 3147 } else { 3148 open2(); 3149 } 3150 }), 3151 { 3152 bindGlobal: true 3153 } 3154 ); 3155 const closeAndReset = () => { 3156 setSearch(""); 3157 close2(); 3158 }; 3159 if (!paletteIsOpen) { 3160 return false; 3161 } 3162 return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3163 import_components.Modal, 3164 { 3165 className: "commands-command-menu", 3166 overlayClassName: "commands-command-menu__overlay", 3167 onRequestClose: closeAndReset, 3168 __experimentalHideHeader: true, 3169 size: "medium", 3170 contentLabel: (0, import_i18n.__)("Command palette"), 3171 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: [ 3172 /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "commands-command-menu__header", children: [ 3173 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3174 icon_default, 3175 { 3176 className: "commands-command-menu__header-search-icon", 3177 icon: search_default 3178 } 3179 ), 3180 /* @__PURE__ */ (0, import_jsx_runtime10.jsx)( 3181 CommandInput, 3182 { 3183 search, 3184 setSearch 3185 } 3186 ) 3187 ] }), 3188 /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(_e.List, { label: (0, import_i18n.__)("Command suggestions"), children: [ 3189 search && !loadersLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(_e.Empty, { children: (0, import_i18n.__)("No results found.") }), 3190 !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RecentGroup, {}), 3191 !search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SuggestionsGroup, {}), 3192 search && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ResultsGroup, { search }) 3193 ] }) 3194 ] }) }) 3195 } 3196 ); 3197 } 3198 3199 // packages/commands/build-module/hooks/use-command-context.mjs 3200 var import_element4 = __toESM(require_element(), 1); 3201 var import_data6 = __toESM(require_data(), 1); 3202 function useCommandContext(context2) { 3203 const { getContext: getContext2 } = (0, import_data6.useSelect)(store); 3204 const initialContext = (0, import_element4.useRef)(getContext2()); 3205 const { setContext: setContext2 } = unlock((0, import_data6.useDispatch)(store)); 3206 (0, import_element4.useEffect)(() => { 3207 setContext2(context2); 3208 }, [context2, setContext2]); 3209 (0, import_element4.useEffect)(() => { 3210 const initialContextRef = initialContext.current; 3211 return () => setContext2(initialContextRef); 3212 }, [setContext2]); 3213 } 3214 3215 // packages/commands/build-module/private-apis.mjs 3216 var privateApis = {}; 3217 lock(privateApis, { 3218 useCommandContext 3219 }); 3220 3221 // packages/commands/build-module/hooks/use-command.mjs 3222 var import_element5 = __toESM(require_element(), 1); 3223 var import_data7 = __toESM(require_data(), 1); 3224 function useCommand(command) { 3225 const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data7.useDispatch)(store); 3226 const currentCallbackRef = (0, import_element5.useRef)(command.callback); 3227 (0, import_element5.useEffect)(() => { 3228 currentCallbackRef.current = command.callback; 3229 }, [command.callback]); 3230 (0, import_element5.useEffect)(() => { 3231 if (command.disabled) { 3232 return; 3233 } 3234 registerCommand2({ 3235 name: command.name, 3236 context: command.context, 3237 category: command.category, 3238 label: command.label, 3239 searchLabel: command.searchLabel, 3240 icon: command.icon, 3241 keywords: command.keywords, 3242 callback: (...args) => currentCallbackRef.current(...args) 3243 }); 3244 return () => { 3245 unregisterCommand2(command.name); 3246 }; 3247 }, [ 3248 command.name, 3249 command.label, 3250 command.searchLabel, 3251 command.icon, 3252 command.context, 3253 command.category, 3254 command.keywords, 3255 command.disabled, 3256 registerCommand2, 3257 unregisterCommand2 3258 ]); 3259 } 3260 function useCommands(commands2) { 3261 const { registerCommand: registerCommand2, unregisterCommand: unregisterCommand2 } = (0, import_data7.useDispatch)(store); 3262 const currentCallbacksRef = (0, import_element5.useRef)({}); 3263 (0, import_element5.useEffect)(() => { 3264 if (!commands2) { 3265 return; 3266 } 3267 commands2.forEach((command) => { 3268 if (command.callback) { 3269 currentCallbacksRef.current[command.name] = command.callback; 3270 } 3271 }); 3272 }, [commands2]); 3273 (0, import_element5.useEffect)(() => { 3274 if (!commands2) { 3275 return; 3276 } 3277 commands2.forEach((command) => { 3278 if (command.disabled) { 3279 return; 3280 } 3281 registerCommand2({ 3282 name: command.name, 3283 context: command.context, 3284 category: command.category, 3285 label: command.label, 3286 searchLabel: command.searchLabel, 3287 icon: command.icon, 3288 keywords: command.keywords, 3289 callback: (...args) => { 3290 const callback = currentCallbacksRef.current[command.name]; 3291 if (callback) { 3292 callback(...args); 3293 } 3294 } 3295 }); 3296 }); 3297 return () => { 3298 commands2.forEach((command) => { 3299 unregisterCommand2(command.name); 3300 }); 3301 }; 3302 }, [commands2, registerCommand2, unregisterCommand2]); 3303 } 3304 3305 // packages/commands/build-module/hooks/use-command-loader.mjs 3306 var import_element6 = __toESM(require_element(), 1); 3307 var import_data8 = __toESM(require_data(), 1); 3308 function useCommandLoader(loader) { 3309 const { registerCommandLoader: registerCommandLoader2, unregisterCommandLoader: unregisterCommandLoader2 } = (0, import_data8.useDispatch)(store); 3310 (0, import_element6.useEffect)(() => { 3311 if (loader.disabled) { 3312 return; 3313 } 3314 registerCommandLoader2({ 3315 name: loader.name, 3316 hook: loader.hook, 3317 context: loader.context, 3318 category: loader.category 3319 }); 3320 return () => { 3321 unregisterCommandLoader2(loader.name); 3322 }; 3323 }, [ 3324 loader.name, 3325 loader.hook, 3326 loader.context, 3327 loader.category, 3328 loader.disabled, 3329 registerCommandLoader2, 3330 unregisterCommandLoader2 3331 ]); 3332 } 3333 return __toCommonJS(index_exports); 3334 })();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated : Sun Jul 19 08:20:17 2026 | Cross-referenced by PHPXref |