[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> commands.js (source)

   1  /******/ (() => { // webpackBootstrap
   2  /******/     "use strict";
   3  /******/     var __webpack_modules__ = ({});
   4  /************************************************************************/
   5  /******/     // The module cache
   6  /******/     var __webpack_module_cache__ = {};
   7  /******/     
   8  /******/     // The require function
   9  /******/ 	function __webpack_require__(moduleId) {
  10  /******/         // Check if module is in cache
  11  /******/         var cachedModule = __webpack_module_cache__[moduleId];
  12  /******/         if (cachedModule !== undefined) {
  13  /******/             return cachedModule.exports;
  14  /******/         }
  15  /******/         // Create a new module (and put it into the cache)
  16  /******/         var module = __webpack_module_cache__[moduleId] = {
  17  /******/             // no module.id needed
  18  /******/             // no module.loaded needed
  19  /******/             exports: {}
  20  /******/         };
  21  /******/     
  22  /******/         // Execute the module function
  23  /******/         __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  24  /******/     
  25  /******/         // Return the exports of the module
  26  /******/         return module.exports;
  27  /******/     }
  28  /******/     
  29  /************************************************************************/
  30  /******/     /* webpack/runtime/create fake namespace object */
  31  /******/     (() => {
  32  /******/         var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
  33  /******/         var leafPrototypes;
  34  /******/         // create a fake namespace object
  35  /******/         // mode & 1: value is a module id, require it
  36  /******/         // mode & 2: merge all properties of value into the ns
  37  /******/         // mode & 4: return value when already ns object
  38  /******/         // mode & 16: return value when it's Promise-like
  39  /******/         // mode & 8|1: behave like require
  40  /******/         __webpack_require__.t = function(value, mode) {
  41  /******/             if(mode & 1) value = this(value);
  42  /******/             if(mode & 8) return value;
  43  /******/             if(typeof value === 'object' && value) {
  44  /******/                 if((mode & 4) && value.__esModule) return value;
  45  /******/                 if((mode & 16) && typeof value.then === 'function') return value;
  46  /******/             }
  47  /******/             var ns = Object.create(null);
  48  /******/             __webpack_require__.r(ns);
  49  /******/             var def = {};
  50  /******/             leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
  51  /******/             for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
  52  /******/                 Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
  53  /******/             }
  54  /******/             def['default'] = () => (value);
  55  /******/             __webpack_require__.d(ns, def);
  56  /******/             return ns;
  57  /******/         };
  58  /******/     })();
  59  /******/     
  60  /******/     /* webpack/runtime/define property getters */
  61  /******/     (() => {
  62  /******/         // define getter functions for harmony exports
  63  /******/         __webpack_require__.d = (exports, definition) => {
  64  /******/             for(var key in definition) {
  65  /******/                 if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  66  /******/                     Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  67  /******/                 }
  68  /******/             }
  69  /******/         };
  70  /******/     })();
  71  /******/     
  72  /******/     /* webpack/runtime/hasOwnProperty shorthand */
  73  /******/     (() => {
  74  /******/         __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  75  /******/     })();
  76  /******/     
  77  /******/     /* webpack/runtime/make namespace object */
  78  /******/     (() => {
  79  /******/         // define __esModule on exports
  80  /******/         __webpack_require__.r = (exports) => {
  81  /******/             if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  82  /******/                 Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  83  /******/             }
  84  /******/             Object.defineProperty(exports, '__esModule', { value: true });
  85  /******/         };
  86  /******/     })();
  87  /******/     
  88  /******/     /* webpack/runtime/nonce */
  89  /******/     (() => {
  90  /******/         __webpack_require__.nc = undefined;
  91  /******/     })();
  92  /******/     
  93  /************************************************************************/
  94  var __webpack_exports__ = {};
  95  // ESM COMPAT FLAG
  96  __webpack_require__.r(__webpack_exports__);
  97  
  98  // EXPORTS
  99  __webpack_require__.d(__webpack_exports__, {
 100    CommandMenu: () => (/* reexport */ CommandMenu),
 101    privateApis: () => (/* reexport */ privateApis),
 102    store: () => (/* reexport */ store),
 103    useCommand: () => (/* reexport */ useCommand),
 104    useCommandLoader: () => (/* reexport */ useCommandLoader),
 105    useCommands: () => (/* reexport */ useCommands)
 106  });
 107  
 108  // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/actions.js
 109  var actions_namespaceObject = {};
 110  __webpack_require__.r(actions_namespaceObject);
 111  __webpack_require__.d(actions_namespaceObject, {
 112    close: () => (actions_close),
 113    open: () => (actions_open),
 114    registerCommand: () => (registerCommand),
 115    registerCommandLoader: () => (registerCommandLoader),
 116    unregisterCommand: () => (unregisterCommand),
 117    unregisterCommandLoader: () => (unregisterCommandLoader)
 118  });
 119  
 120  // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/selectors.js
 121  var selectors_namespaceObject = {};
 122  __webpack_require__.r(selectors_namespaceObject);
 123  __webpack_require__.d(selectors_namespaceObject, {
 124    getCommandLoaders: () => (getCommandLoaders),
 125    getCommands: () => (getCommands),
 126    getContext: () => (getContext),
 127    isOpen: () => (selectors_isOpen)
 128  });
 129  
 130  // NAMESPACE OBJECT: ./node_modules/@wordpress/commands/build-module/store/private-actions.js
 131  var private_actions_namespaceObject = {};
 132  __webpack_require__.r(private_actions_namespaceObject);
 133  __webpack_require__.d(private_actions_namespaceObject, {
 134    setContext: () => (setContext)
 135  });
 136  
 137  ;// external "ReactJSXRuntime"
 138  const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
 139  ;// ./node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
 140  var U=1,Y=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k=.99,m=/[\\\/_+.#"@\[\(\{&]/,B=/[\\\/_+.#"@\[\(\{&]/g,K=/[\s-]/,X=/[\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k;var T=`$A},$f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G(_,C,h,P,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)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return _=h&&h.length>0?`$_+" "+h.join(" ")}`:_,G(_,C,D(_),D(C),0,0,{})}
 141  
 142  ;// ./node_modules/@babel/runtime/helpers/esm/extends.js
 143  function _extends() {
 144    return _extends = Object.assign ? Object.assign.bind() : function (n) {
 145      for (var e = 1; e < arguments.length; e++) {
 146        var t = arguments[e];
 147        for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
 148      }
 149      return n;
 150    }, _extends.apply(null, arguments);
 151  }
 152  
 153  ;// external "React"
 154  const external_React_namespaceObject = window["React"];
 155  var external_React_namespaceObject_0 = /*#__PURE__*/__webpack_require__.t(external_React_namespaceObject, 2);
 156  ;// ./node_modules/@radix-ui/primitive/dist/index.mjs
 157  function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true  } = {}) {
 158      return function handleEvent(event) {
 159          originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
 160          if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
 161      };
 162  }
 163  
 164  
 165  
 166  
 167  
 168  ;// ./node_modules/@radix-ui/react-compose-refs/dist/index.mjs
 169  
 170  
 171  
 172  /**
 173   * Set a given ref to a given value
 174   * This utility takes care of different types of refs: callback refs and RefObject(s)
 175   */ function $6ed0406888f73fc4$var$setRef(ref, value) {
 176      if (typeof ref === 'function') ref(value);
 177      else if (ref !== null && ref !== undefined) ref.current = value;
 178  }
 179  /**
 180   * A utility to compose multiple refs together
 181   * Accepts callback refs and RefObject(s)
 182   */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
 183      return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
 184          )
 185      ;
 186  }
 187  /**
 188   * A custom hook that composes multiple refs
 189   * Accepts callback refs and RefObject(s)
 190   */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
 191      // eslint-disable-next-line react-hooks/exhaustive-deps
 192      return (0,external_React_namespaceObject.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
 193  }
 194  
 195  
 196  
 197  
 198  
 199  ;// ./node_modules/@radix-ui/react-context/dist/index.mjs
 200  
 201  
 202  
 203  function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
 204      const Context = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext);
 205      function Provider(props) {
 206          const { children: children , ...context } = props; // Only re-memoize when prop values change
 207          // eslint-disable-next-line react-hooks/exhaustive-deps
 208          const value = (0,external_React_namespaceObject.useMemo)(()=>context
 209          , Object.values(context));
 210          return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Context.Provider, {
 211              value: value
 212          }, children);
 213      }
 214      function useContext(consumerName) {
 215          const context = (0,external_React_namespaceObject.useContext)(Context);
 216          if (context) return context;
 217          if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
 218          throw new Error(`\`$consumerName}\` must be used within \`$rootComponentName}\``);
 219      }
 220      Provider.displayName = rootComponentName + 'Provider';
 221      return [
 222          Provider,
 223          useContext
 224      ];
 225  }
 226  /* -------------------------------------------------------------------------------------------------
 227   * createContextScope
 228   * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
 229      let defaultContexts = [];
 230      /* -----------------------------------------------------------------------------------------------
 231     * createContext
 232     * ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
 233          const BaseContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext);
 234          const index = defaultContexts.length;
 235          defaultContexts = [
 236              ...defaultContexts,
 237              defaultContext
 238          ];
 239          function Provider(props) {
 240              const { scope: scope , children: children , ...context } = props;
 241              const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
 242              // eslint-disable-next-line react-hooks/exhaustive-deps
 243              const value = (0,external_React_namespaceObject.useMemo)(()=>context
 244              , Object.values(context));
 245              return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Context.Provider, {
 246                  value: value
 247              }, children);
 248          }
 249          function useContext(consumerName, scope) {
 250              const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
 251              const context = (0,external_React_namespaceObject.useContext)(Context);
 252              if (context) return context;
 253              if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
 254              throw new Error(`\`$consumerName}\` must be used within \`$rootComponentName}\``);
 255          }
 256          Provider.displayName = rootComponentName + 'Provider';
 257          return [
 258              Provider,
 259              useContext
 260          ];
 261      }
 262      /* -----------------------------------------------------------------------------------------------
 263     * createScope
 264     * ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
 265          const scopeContexts = defaultContexts.map((defaultContext)=>{
 266              return /*#__PURE__*/ (0,external_React_namespaceObject.createContext)(defaultContext);
 267          });
 268          return function useScope(scope) {
 269              const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
 270              return (0,external_React_namespaceObject.useMemo)(()=>({
 271                      [`__scope$scopeName}`]: {
 272                          ...scope,
 273                          [scopeName]: contexts
 274                      }
 275                  })
 276              , [
 277                  scope,
 278                  contexts
 279              ]);
 280          };
 281      };
 282      createScope.scopeName = scopeName;
 283      return [
 284          $c512c27ab02ef895$export$fd42f52fd3ae1109,
 285          $c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
 286      ];
 287  }
 288  /* -------------------------------------------------------------------------------------------------
 289   * composeContextScopes
 290   * -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
 291      const baseScope = scopes[0];
 292      if (scopes.length === 1) return baseScope;
 293      const createScope1 = ()=>{
 294          const scopeHooks = scopes.map((createScope)=>({
 295                  useScope: createScope(),
 296                  scopeName: createScope.scopeName
 297              })
 298          );
 299          return function useComposedScopes(overrideScopes) {
 300              const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName  })=>{
 301                  // We are calling a hook inside a callback which React warns against to avoid inconsistent
 302                  // renders, however, scoping doesn't have render side effects so we ignore the rule.
 303                  // eslint-disable-next-line react-hooks/rules-of-hooks
 304                  const scopeProps = useScope(overrideScopes);
 305                  const currentScope = scopeProps[`__scope$scopeName}`];
 306                  return {
 307                      ...nextScopes,
 308                      ...currentScope
 309                  };
 310              }, {});
 311              return (0,external_React_namespaceObject.useMemo)(()=>({
 312                      [`__scope$baseScope.scopeName}`]: nextScopes1
 313                  })
 314              , [
 315                  nextScopes1
 316              ]);
 317          };
 318      };
 319      createScope1.scopeName = baseScope.scopeName;
 320      return createScope1;
 321  }
 322  
 323  
 324  
 325  
 326  
 327  ;// ./node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
 328  
 329  
 330  
 331  /**
 332   * On the server, React emits a warning when calling `useLayoutEffect`.
 333   * This is because neither `useLayoutEffect` nor `useEffect` run on the server.
 334   * We use this safe version which suppresses the warning by replacing it with a noop on the server.
 335   *
 336   * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
 337   */ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? external_React_namespaceObject.useLayoutEffect : ()=>{};
 338  
 339  
 340  
 341  
 342  
 343  ;// ./node_modules/@radix-ui/react-id/dist/index.mjs
 344  
 345  
 346  
 347  
 348  
 349  const $1746a345f3d73bb7$var$useReactId = external_React_namespaceObject_0['useId'.toString()] || (()=>undefined
 350  );
 351  let $1746a345f3d73bb7$var$count = 0;
 352  function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
 353      const [id, setId] = external_React_namespaceObject.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
 354      $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
 355          if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
 356          );
 357      }, [
 358          deterministicId
 359      ]);
 360      return deterministicId || (id ? `radix-$id}` : '');
 361  }
 362  
 363  
 364  
 365  
 366  
 367  ;// ./node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
 368  
 369  
 370  
 371  /**
 372   * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
 373   * prop or avoid re-executing effects when passed as a dependency
 374   */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
 375      const callbackRef = (0,external_React_namespaceObject.useRef)(callback);
 376      (0,external_React_namespaceObject.useEffect)(()=>{
 377          callbackRef.current = callback;
 378      }); // https://github.com/facebook/react/issues/19240
 379      return (0,external_React_namespaceObject.useMemo)(()=>(...args)=>{
 380              var _callbackRef$current;
 381              return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
 382          }
 383      , []);
 384  }
 385  
 386  
 387  
 388  
 389  
 390  ;// ./node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
 391  
 392  
 393  
 394  
 395  
 396  function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{}  }) {
 397      const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
 398          defaultProp: defaultProp,
 399          onChange: onChange
 400      });
 401      const isControlled = prop !== undefined;
 402      const value1 = isControlled ? prop : uncontrolledProp;
 403      const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
 404      const setValue = (0,external_React_namespaceObject.useCallback)((nextValue)=>{
 405          if (isControlled) {
 406              const setter = nextValue;
 407              const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
 408              if (value !== prop) handleChange(value);
 409          } else setUncontrolledProp(nextValue);
 410      }, [
 411          isControlled,
 412          prop,
 413          setUncontrolledProp,
 414          handleChange
 415      ]);
 416      return [
 417          value1,
 418          setValue
 419      ];
 420  }
 421  function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange  }) {
 422      const uncontrolledState = (0,external_React_namespaceObject.useState)(defaultProp);
 423      const [value] = uncontrolledState;
 424      const prevValueRef = (0,external_React_namespaceObject.useRef)(value);
 425      const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
 426      (0,external_React_namespaceObject.useEffect)(()=>{
 427          if (prevValueRef.current !== value) {
 428              handleChange(value);
 429              prevValueRef.current = value;
 430          }
 431      }, [
 432          value,
 433          prevValueRef,
 434          handleChange
 435      ]);
 436      return uncontrolledState;
 437  }
 438  
 439  
 440  
 441  
 442  
 443  ;// external "ReactDOM"
 444  const external_ReactDOM_namespaceObject = window["ReactDOM"];
 445  ;// ./node_modules/@radix-ui/react-slot/dist/index.mjs
 446  
 447  
 448  
 449  
 450  
 451  
 452  
 453  /* -------------------------------------------------------------------------------------------------
 454   * Slot
 455   * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 456      const { children: children , ...slotProps } = props;
 457      const childrenArray = external_React_namespaceObject.Children.toArray(children);
 458      const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
 459      if (slottable) {
 460          // the new element to render is the one passed as a child of `Slottable`
 461          const newElement = slottable.props.children;
 462          const newChildren = childrenArray.map((child)=>{
 463              if (child === slottable) {
 464                  // because the new element will be the one rendered, we are only interested
 465                  // in grabbing its children (`newElement.props.children`)
 466                  if (external_React_namespaceObject.Children.count(newElement) > 1) return external_React_namespaceObject.Children.only(null);
 467                  return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? newElement.props.children : null;
 468              } else return child;
 469          });
 470          return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
 471              ref: forwardedRef
 472          }), /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(newElement) ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(newElement, undefined, newChildren) : null);
 473      }
 474      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
 475          ref: forwardedRef
 476      }), children);
 477  });
 478  $5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
 479  /* -------------------------------------------------------------------------------------------------
 480   * SlotClone
 481   * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 482      const { children: children , ...slotProps } = props;
 483      if (/*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(children)) return /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(children, {
 484          ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
 485          ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
 486      });
 487      return external_React_namespaceObject.Children.count(children) > 1 ? external_React_namespaceObject.Children.only(null) : null;
 488  });
 489  $5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
 490  /* -------------------------------------------------------------------------------------------------
 491   * Slottable
 492   * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children  })=>{
 493      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, children);
 494  };
 495  /* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
 496      return /*#__PURE__*/ (0,external_React_namespaceObject.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
 497  }
 498  function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
 499      // all child props should override
 500      const overrideProps = {
 501          ...childProps
 502      };
 503      for(const propName in childProps){
 504          const slotPropValue = slotProps[propName];
 505          const childPropValue = childProps[propName];
 506          const isHandler = /^on[A-Z]/.test(propName);
 507          if (isHandler) {
 508              // if the handler exists on both, we compose them
 509              if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
 510                  childPropValue(...args);
 511                  slotPropValue(...args);
 512              };
 513              else if (slotPropValue) overrideProps[propName] = slotPropValue;
 514          } else if (propName === 'style') overrideProps[propName] = {
 515              ...slotPropValue,
 516              ...childPropValue
 517          };
 518          else if (propName === 'className') overrideProps[propName] = [
 519              slotPropValue,
 520              childPropValue
 521          ].filter(Boolean).join(' ');
 522      }
 523      return {
 524          ...slotProps,
 525          ...overrideProps
 526      };
 527  }
 528  const $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5e63c961fc1ce211$export$8c6ed5c666ac1360));
 529  
 530  
 531  
 532  
 533  
 534  ;// ./node_modules/@radix-ui/react-primitive/dist/index.mjs
 535  
 536  
 537  
 538  
 539  
 540  
 541  
 542  
 543  
 544  const $8927f6f2acc4f386$var$NODES = [
 545      'a',
 546      'button',
 547      'div',
 548      'form',
 549      'h2',
 550      'h3',
 551      'img',
 552      'input',
 553      'label',
 554      'li',
 555      'nav',
 556      'ol',
 557      'p',
 558      'span',
 559      'svg',
 560      'ul'
 561  ]; // Temporary while we await merge of this fix:
 562  // https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
 563  // prettier-ignore
 564  /* -------------------------------------------------------------------------------------------------
 565   * Primitive
 566   * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
 567      const Node = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 568          const { asChild: asChild , ...primitiveProps } = props;
 569          const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
 570          (0,external_React_namespaceObject.useEffect)(()=>{
 571              window[Symbol.for('radix-ui')] = true;
 572          }, []);
 573          return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(Comp, _extends({}, primitiveProps, {
 574              ref: forwardedRef
 575          }));
 576      });
 577      Node.displayName = `Primitive.$node}`;
 578      return {
 579          ...primitive,
 580          [node]: Node
 581      };
 582  }, {});
 583  /* -------------------------------------------------------------------------------------------------
 584   * Utils
 585   * -----------------------------------------------------------------------------------------------*/ /**
 586   * Flush custom event dispatch
 587   * https://github.com/radix-ui/primitives/pull/1378
 588   *
 589   * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
 590   *
 591   * Internally, React prioritises events in the following order:
 592   *  - discrete
 593   *  - continuous
 594   *  - default
 595   *
 596   * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
 597   *
 598   * `discrete` is an  important distinction as updates within these events are applied immediately.
 599   * React however, is not able to infer the priority of custom event types due to how they are detected internally.
 600   * Because of this, it's possible for updates from custom events to be unexpectedly batched when
 601   * dispatched by another `discrete` event.
 602   *
 603   * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
 604   * This utility should be used when dispatching a custom event from within another `discrete` event, this utility
 605   * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
 606   * For example:
 607   *
 608   * dispatching a known click 👎
 609   * target.dispatchEvent(new Event(‘click’))
 610   *
 611   * dispatching a custom type within a non-discrete event 👎
 612   * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
 613   *
 614   * dispatching a custom type within a `discrete` event 👍
 615   * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
 616   *
 617   * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's  not recommended to use
 618   * this utility with them. This is because it's possible for those handlers to be called implicitly during render
 619   * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
 620   */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
 621      if (target) (0,external_ReactDOM_namespaceObject.flushSync)(()=>target.dispatchEvent(event)
 622      );
 623  }
 624  /* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($8927f6f2acc4f386$export$250ffa63cdc0d034));
 625  
 626  
 627  
 628  
 629  
 630  ;// ./node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
 631  
 632  
 633  
 634  
 635  
 636  /**
 637   * Listens for when the escape key is down
 638   */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
 639      const onEscapeKeyDown = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEscapeKeyDownProp);
 640      (0,external_React_namespaceObject.useEffect)(()=>{
 641          const handleKeyDown = (event)=>{
 642              if (event.key === 'Escape') onEscapeKeyDown(event);
 643          };
 644          ownerDocument.addEventListener('keydown', handleKeyDown);
 645          return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)
 646          ;
 647      }, [
 648          onEscapeKeyDown,
 649          ownerDocument
 650      ]);
 651  }
 652  
 653  
 654  
 655  
 656  
 657  ;// ./node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
 658  
 659  
 660  
 661  
 662  
 663  
 664  
 665  
 666  
 667  
 668  
 669  
 670  
 671  
 672  
 673  /* -------------------------------------------------------------------------------------------------
 674   * DismissableLayer
 675   * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';
 676  const $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';
 677  const $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';
 678  const $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';
 679  let $5cb92bef7577960e$var$originalBodyPointerEvents;
 680  const $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,external_React_namespaceObject.createContext)({
 681      layers: new Set(),
 682      layersWithOutsidePointerEventsDisabled: new Set(),
 683      branches: new Set()
 684  });
 685  const $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 686      var _node$ownerDocument;
 687      const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;
 688      const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
 689      const [node1, setNode] = (0,external_React_namespaceObject.useState)(null);
 690      const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
 691      const [, force] = (0,external_React_namespaceObject.useState)({});
 692      const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setNode(node)
 693      );
 694      const layers = Array.from(context.layers);
 695      const [highestLayerWithOutsidePointerEventsDisabled] = [
 696          ...context.layersWithOutsidePointerEventsDisabled
 697      ].slice(-1); // prettier-ignore
 698      const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore
 699      const index = node1 ? layers.indexOf(node1) : -1;
 700      const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
 701      const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
 702      const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{
 703          const target = event.target;
 704          const isPointerDownOnBranch = [
 705              ...context.branches
 706          ].some((branch)=>branch.contains(target)
 707          );
 708          if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
 709          onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);
 710          onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
 711          if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
 712      }, ownerDocument);
 713      const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{
 714          const target = event.target;
 715          const isFocusInBranch = [
 716              ...context.branches
 717          ].some((branch)=>branch.contains(target)
 718          );
 719          if (isFocusInBranch) return;
 720          onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);
 721          onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);
 722          if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();
 723      }, ownerDocument);
 724      $addc16e1bbe58fd0$export$3a72a57244d6e765((event)=>{
 725          const isHighestLayer = index === context.layers.size - 1;
 726          if (!isHighestLayer) return;
 727          onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);
 728          if (!event.defaultPrevented && onDismiss) {
 729              event.preventDefault();
 730              onDismiss();
 731          }
 732      }, ownerDocument);
 733      (0,external_React_namespaceObject.useEffect)(()=>{
 734          if (!node1) return;
 735          if (disableOutsidePointerEvents) {
 736              if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
 737                  $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
 738                  ownerDocument.body.style.pointerEvents = 'none';
 739              }
 740              context.layersWithOutsidePointerEventsDisabled.add(node1);
 741          }
 742          context.layers.add(node1);
 743          $5cb92bef7577960e$var$dispatchUpdate();
 744          return ()=>{
 745              if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;
 746          };
 747      }, [
 748          node1,
 749          ownerDocument,
 750          disableOutsidePointerEvents,
 751          context
 752      ]);
 753      /**
 754     * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect
 755     * because a change to `disableOutsidePointerEvents` would remove this layer from the stack
 756     * and add it to the end again so the layering order wouldn't be _creation order_.
 757     * We only want them to be removed from context stacks when unmounted.
 758     */ (0,external_React_namespaceObject.useEffect)(()=>{
 759          return ()=>{
 760              if (!node1) return;
 761              context.layers.delete(node1);
 762              context.layersWithOutsidePointerEventsDisabled.delete(node1);
 763              $5cb92bef7577960e$var$dispatchUpdate();
 764          };
 765      }, [
 766          node1,
 767          context
 768      ]);
 769      (0,external_React_namespaceObject.useEffect)(()=>{
 770          const handleUpdate = ()=>force({})
 771          ;
 772          document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);
 773          return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)
 774          ;
 775      }, []);
 776      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, layerProps, {
 777          ref: composedRefs,
 778          style: {
 779              pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,
 780              ...props.style
 781          },
 782          onFocusCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusCapture, focusOutside.onFocusCapture),
 783          onBlurCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlurCapture, focusOutside.onBlurCapture),
 784          onPointerDownCapture: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
 785      }));
 786  });
 787  /*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {
 788      displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME
 789  });
 790  /* -------------------------------------------------------------------------------------------------
 791   * DismissableLayerBranch
 792   * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';
 793  const $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 794      const context = (0,external_React_namespaceObject.useContext)($5cb92bef7577960e$var$DismissableLayerContext);
 795      const ref = (0,external_React_namespaceObject.useRef)(null);
 796      const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
 797      (0,external_React_namespaceObject.useEffect)(()=>{
 798          const node = ref.current;
 799          if (node) {
 800              context.branches.add(node);
 801              return ()=>{
 802                  context.branches.delete(node);
 803              };
 804          }
 805      }, [
 806          context.branches
 807      ]);
 808      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, props, {
 809          ref: composedRefs
 810      }));
 811  });
 812  /*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {
 813      displayName: $5cb92bef7577960e$var$BRANCH_NAME
 814  });
 815  /* -----------------------------------------------------------------------------------------------*/ /**
 816   * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`
 817   * to mimic layer dismissing behaviour present in OS.
 818   * Returns props to pass to the node we want to check for outside events.
 819   */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
 820      const handlePointerDownOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onPointerDownOutside);
 821      const isPointerInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false);
 822      const handleClickRef = (0,external_React_namespaceObject.useRef)(()=>{});
 823      (0,external_React_namespaceObject.useEffect)(()=>{
 824          const handlePointerDown = (event)=>{
 825              if (event.target && !isPointerInsideReactTreeRef.current) {
 826                  const eventDetail = {
 827                      originalEvent: event
 828                  };
 829                  function handleAndDispatchPointerDownOutsideEvent() {
 830                      $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {
 831                          discrete: true
 832                      });
 833                  }
 834                  /**
 835           * On touch devices, we need to wait for a click event because browsers implement
 836           * a ~350ms delay between the time the user stops touching the display and when the
 837           * browser executres events. We need to ensure we don't reactivate pointer-events within
 838           * this timeframe otherwise the browser may execute events that should have been prevented.
 839           *
 840           * Additionally, this also lets us deal automatically with cancellations when a click event
 841           * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.
 842           *
 843           * This is why we also continuously remove the previous listener, because we cannot be
 844           * certain that it was raised, and therefore cleaned-up.
 845           */ if (event.pointerType === 'touch') {
 846                      ownerDocument.removeEventListener('click', handleClickRef.current);
 847                      handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;
 848                      ownerDocument.addEventListener('click', handleClickRef.current, {
 849                          once: true
 850                      });
 851                  } else handleAndDispatchPointerDownOutsideEvent();
 852              } else // We need to remove the event listener in case the outside click has been canceled.
 853              // See: https://github.com/radix-ui/primitives/issues/2171
 854              ownerDocument.removeEventListener('click', handleClickRef.current);
 855              isPointerInsideReactTreeRef.current = false;
 856          };
 857          /**
 858       * if this hook executes in a component that mounts via a `pointerdown` event, the event
 859       * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid
 860       * this by delaying the event listener registration on the document.
 861       * This is not React specific, but rather how the DOM works, ie:
 862       * ```
 863       * button.addEventListener('pointerdown', () => {
 864       *   console.log('I will log');
 865       *   document.addEventListener('pointerdown', () => {
 866       *     console.log('I will also log');
 867       *   })
 868       * });
 869       */ const timerId = window.setTimeout(()=>{
 870              ownerDocument.addEventListener('pointerdown', handlePointerDown);
 871          }, 0);
 872          return ()=>{
 873              window.clearTimeout(timerId);
 874              ownerDocument.removeEventListener('pointerdown', handlePointerDown);
 875              ownerDocument.removeEventListener('click', handleClickRef.current);
 876          };
 877      }, [
 878          ownerDocument,
 879          handlePointerDownOutside
 880      ]);
 881      return {
 882          // ensures we check React component tree (not just DOM tree)
 883          onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
 884      };
 885  }
 886  /**
 887   * Listens for when focus happens outside a react subtree.
 888   * Returns props to pass to the root (node) of the subtree we want to check.
 889   */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
 890      const handleFocusOutside = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onFocusOutside);
 891      const isFocusInsideReactTreeRef = (0,external_React_namespaceObject.useRef)(false);
 892      (0,external_React_namespaceObject.useEffect)(()=>{
 893          const handleFocus = (event)=>{
 894              if (event.target && !isFocusInsideReactTreeRef.current) {
 895                  const eventDetail = {
 896                      originalEvent: event
 897                  };
 898                  $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
 899                      discrete: false
 900                  });
 901              }
 902          };
 903          ownerDocument.addEventListener('focusin', handleFocus);
 904          return ()=>ownerDocument.removeEventListener('focusin', handleFocus)
 905          ;
 906      }, [
 907          ownerDocument,
 908          handleFocusOutside
 909      ]);
 910      return {
 911          onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true
 912          ,
 913          onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
 914      };
 915  }
 916  function $5cb92bef7577960e$var$dispatchUpdate() {
 917      const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);
 918      document.dispatchEvent(event);
 919  }
 920  function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete  }) {
 921      const target = detail.originalEvent.target;
 922      const event = new CustomEvent(name, {
 923          bubbles: false,
 924          cancelable: true,
 925          detail: detail
 926      });
 927      if (handler) target.addEventListener(name, handler, {
 928          once: true
 929      });
 930      if (discrete) $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event);
 931      else target.dispatchEvent(event);
 932  }
 933  const $5cb92bef7577960e$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($5cb92bef7577960e$export$177fb62ff3ec1f22));
 934  const $5cb92bef7577960e$export$aecb2ddcb55c95be = (/* unused pure expression or super */ null && ($5cb92bef7577960e$export$4d5eb2109db14228));
 935  
 936  
 937  
 938  
 939  
 940  ;// ./node_modules/@radix-ui/react-focus-scope/dist/index.mjs
 941  
 942  
 943  
 944  
 945  
 946  
 947  
 948  
 949  
 950  
 951  
 952  const $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';
 953  const $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';
 954  const $d3863c46a17e8a28$var$EVENT_OPTIONS = {
 955      bubbles: false,
 956      cancelable: true
 957  };
 958  /* -------------------------------------------------------------------------------------------------
 959   * FocusScope
 960   * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME = 'FocusScope';
 961  const $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
 962      const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;
 963      const [container1, setContainer] = (0,external_React_namespaceObject.useState)(null);
 964      const onMountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onMountAutoFocusProp);
 965      const onUnmountAutoFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onUnmountAutoFocusProp);
 966      const lastFocusedElementRef = (0,external_React_namespaceObject.useRef)(null);
 967      const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, (node)=>setContainer(node)
 968      );
 969      const focusScope = (0,external_React_namespaceObject.useRef)({
 970          paused: false,
 971          pause () {
 972              this.paused = true;
 973          },
 974          resume () {
 975              this.paused = false;
 976          }
 977      }).current; // Takes care of trapping focus if focus is moved outside programmatically for example
 978      (0,external_React_namespaceObject.useEffect)(()=>{
 979          if (trapped) {
 980              function handleFocusIn(event) {
 981                  if (focusScope.paused || !container1) return;
 982                  const target = event.target;
 983                  if (container1.contains(target)) lastFocusedElementRef.current = target;
 984                  else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
 985                      select: true
 986                  });
 987              }
 988              function handleFocusOut(event) {
 989                  if (focusScope.paused || !container1) return;
 990                  const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:
 991                  //
 992                  // 1. When the user switches app/tabs/windows/the browser itself loses focus.
 993                  // 2. In Google Chrome, when the focused element is removed from the DOM.
 994                  //
 995                  // We let the browser do its thing here because:
 996                  //
 997                  // 1. The browser already keeps a memory of what's focused for when the page gets refocused.
 998                  // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it
 999                  //    throws the CPU to 100%, so we avoid doing anything for this reason here too.
1000                  if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)
1001                  // that is outside the container, we move focus to the last valid focused element inside.
1002                  if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {
1003                      select: true
1004                  });
1005              } // When the focused element gets removed from the DOM, browsers move focus
1006              // back to the document.body. In this case, we move focus to the container
1007              // to keep focus trapped correctly.
1008              function handleMutations(mutations) {
1009                  const focusedElement = document.activeElement;
1010                  if (focusedElement !== document.body) return;
1011                  for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1);
1012              }
1013              document.addEventListener('focusin', handleFocusIn);
1014              document.addEventListener('focusout', handleFocusOut);
1015              const mutationObserver = new MutationObserver(handleMutations);
1016              if (container1) mutationObserver.observe(container1, {
1017                  childList: true,
1018                  subtree: true
1019              });
1020              return ()=>{
1021                  document.removeEventListener('focusin', handleFocusIn);
1022                  document.removeEventListener('focusout', handleFocusOut);
1023                  mutationObserver.disconnect();
1024              };
1025          }
1026      }, [
1027          trapped,
1028          container1,
1029          focusScope.paused
1030      ]);
1031      (0,external_React_namespaceObject.useEffect)(()=>{
1032          if (container1) {
1033              $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);
1034              const previouslyFocusedElement = document.activeElement;
1035              const hasFocusedCandidate = container1.contains(previouslyFocusedElement);
1036              if (!hasFocusedCandidate) {
1037                  const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
1038                  container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
1039                  container1.dispatchEvent(mountEvent);
1040                  if (!mountEvent.defaultPrevented) {
1041                      $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {
1042                          select: true
1043                      });
1044                      if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);
1045                  }
1046              }
1047              return ()=>{
1048                  container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.
1049                  // We need to delay the focus a little to get around it for now.
1050                  // See: https://github.com/facebook/react/issues/17894
1051                  setTimeout(()=>{
1052                      const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);
1053                      container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
1054                      container1.dispatchEvent(unmountEvent);
1055                      if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {
1056                          select: true
1057                      });
1058                       // we need to remove the listener after we `dispatchEvent`
1059                      container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
1060                      $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);
1061                  }, 0);
1062              };
1063          }
1064      }, [
1065          container1,
1066          onMountAutoFocus,
1067          onUnmountAutoFocus,
1068          focusScope
1069      ]); // Takes care of looping focus (when tabbing whilst at the edges)
1070      const handleKeyDown = (0,external_React_namespaceObject.useCallback)((event)=>{
1071          if (!loop && !trapped) return;
1072          if (focusScope.paused) return;
1073          const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;
1074          const focusedElement = document.activeElement;
1075          if (isTabKey && focusedElement) {
1076              const container = event.currentTarget;
1077              const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);
1078              const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges
1079              if (!hasTabbableElementsInside) {
1080                  if (focusedElement === container) event.preventDefault();
1081              } else {
1082                  if (!event.shiftKey && focusedElement === last) {
1083                      event.preventDefault();
1084                      if (loop) $d3863c46a17e8a28$var$focus(first, {
1085                          select: true
1086                      });
1087                  } else if (event.shiftKey && focusedElement === first) {
1088                      event.preventDefault();
1089                      if (loop) $d3863c46a17e8a28$var$focus(last, {
1090                          select: true
1091                      });
1092                  }
1093              }
1094          }
1095      }, [
1096          loop,
1097          trapped,
1098          focusScope.paused
1099      ]);
1100      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
1101          tabIndex: -1
1102      }, scopeProps, {
1103          ref: composedRefs,
1104          onKeyDown: handleKeyDown
1105      }));
1106  });
1107  /*#__PURE__*/ Object.assign($d3863c46a17e8a28$export$20e40289641fbbb6, {
1108      displayName: $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME
1109  });
1110  /* -------------------------------------------------------------------------------------------------
1111   * Utils
1112   * -----------------------------------------------------------------------------------------------*/ /**
1113   * Attempts focusing the first element in a list of candidates.
1114   * Stops when focus has actually moved.
1115   */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false  } = {}) {
1116      const previouslyFocusedElement = document.activeElement;
1117      for (const candidate of candidates){
1118          $d3863c46a17e8a28$var$focus(candidate, {
1119              select: select
1120          });
1121          if (document.activeElement !== previouslyFocusedElement) return;
1122      }
1123  }
1124  /**
1125   * Returns the first and last tabbable elements inside a container.
1126   */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {
1127      const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);
1128      const first = $d3863c46a17e8a28$var$findVisible(candidates, container);
1129      const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);
1130      return [
1131          first,
1132          last
1133      ];
1134  }
1135  /**
1136   * Returns a list of potential tabbable candidates.
1137   *
1138   * NOTE: This is only a close approximation. For example it doesn't take into account cases like when
1139   * elements are not visible. This cannot be worked out easily by just reading a property, but rather
1140   * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.
1141   *
1142   * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker
1143   * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1
1144   */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {
1145      const nodes = [];
1146      const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
1147          acceptNode: (node)=>{
1148              const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';
1149              if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the
1150              // runtime's understanding of tabbability, so this automatically accounts
1151              // for any kind of element that could be tabbed to.
1152              return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1153          }
1154      });
1155      while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it
1156      // hinders accessibility to have tab order different from visual order.
1157      return nodes;
1158  }
1159  /**
1160   * Returns the first visible element in a list.
1161   * NOTE: Only checks visibility up to the `container`.
1162   */ function $d3863c46a17e8a28$var$findVisible(elements, container) {
1163      for (const element of elements){
1164          // we stop checking if it's hidden at the `container` level (excluding)
1165          if (!$d3863c46a17e8a28$var$isHidden(element, {
1166              upTo: container
1167          })) return element;
1168      }
1169  }
1170  function $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo  }) {
1171      if (getComputedStyle(node).visibility === 'hidden') return true;
1172      while(node){
1173          // we stop at `upTo` (excluding it)
1174          if (upTo !== undefined && node === upTo) return false;
1175          if (getComputedStyle(node).display === 'none') return true;
1176          node = node.parentElement;
1177      }
1178      return false;
1179  }
1180  function $d3863c46a17e8a28$var$isSelectableInput(element) {
1181      return element instanceof HTMLInputElement && 'select' in element;
1182  }
1183  function $d3863c46a17e8a28$var$focus(element, { select: select = false  } = {}) {
1184      // only focus if that element is focusable
1185      if (element && element.focus) {
1186          const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users
1187          element.focus({
1188              preventScroll: true
1189          }); // only select if its not the same element, it supports selection and we need to select
1190          if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();
1191      }
1192  }
1193  /* -------------------------------------------------------------------------------------------------
1194   * FocusScope stack
1195   * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();
1196  function $d3863c46a17e8a28$var$createFocusScopesStack() {
1197      /** A stack of focus scopes, with the active one at the top */ let stack = [];
1198      return {
1199          add (focusScope) {
1200              // pause the currently active focus scope (at the top of the stack)
1201              const activeFocusScope = stack[0];
1202              if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();
1203               // remove in case it already exists (because we'll re-add it at the top of the stack)
1204              stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
1205              stack.unshift(focusScope);
1206          },
1207          remove (focusScope) {
1208              var _stack$;
1209              stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);
1210              (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();
1211          }
1212      };
1213  }
1214  function $d3863c46a17e8a28$var$arrayRemove(array, item) {
1215      const updatedArray = [
1216          ...array
1217      ];
1218      const index = updatedArray.indexOf(item);
1219      if (index !== -1) updatedArray.splice(index, 1);
1220      return updatedArray;
1221  }
1222  function $d3863c46a17e8a28$var$removeLinks(items) {
1223      return items.filter((item)=>item.tagName !== 'A'
1224      );
1225  }
1226  const $d3863c46a17e8a28$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($d3863c46a17e8a28$export$20e40289641fbbb6));
1227  
1228  
1229  
1230  
1231  
1232  ;// ./node_modules/@radix-ui/react-portal/dist/index.mjs
1233  
1234  
1235  
1236  
1237  
1238  
1239  
1240  
1241  
1242  /* -------------------------------------------------------------------------------------------------
1243   * Portal
1244   * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal';
1245  const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
1246      var _globalThis$document;
1247      const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;
1248      return container ? /*#__PURE__*/ external_ReactDOM_namespaceObject.createPortal(/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, portalProps, {
1249          ref: forwardedRef
1250      })), container) : null;
1251  });
1252  /*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, {
1253      displayName: $f1701beae083dbae$var$PORTAL_NAME
1254  });
1255  /* -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($f1701beae083dbae$export$602eac185826482c));
1256  
1257  
1258  
1259  
1260  
1261  ;// ./node_modules/@radix-ui/react-presence/dist/index.mjs
1262  
1263  
1264  
1265  
1266  
1267  
1268  
1269  
1270  
1271  
1272  function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
1273      return (0,external_React_namespaceObject.useReducer)((state, event)=>{
1274          const nextState = machine[state][event];
1275          return nextState !== null && nextState !== void 0 ? nextState : state;
1276      }, initialState);
1277  }
1278  
1279  
1280  const $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{
1281      const { present: present , children: children  } = props;
1282      const presence = $921a889cee6df7e8$var$usePresence(present);
1283      const child = typeof children === 'function' ? children({
1284          present: presence.isPresent
1285      }) : external_React_namespaceObject.Children.only(children);
1286      const ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
1287      const forceMount = typeof children === 'function';
1288      return forceMount || presence.isPresent ? /*#__PURE__*/ (0,external_React_namespaceObject.cloneElement)(child, {
1289          ref: ref
1290      }) : null;
1291  };
1292  $921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';
1293  /* -------------------------------------------------------------------------------------------------
1294   * usePresence
1295   * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {
1296      const [node1, setNode] = (0,external_React_namespaceObject.useState)();
1297      const stylesRef = (0,external_React_namespaceObject.useRef)({});
1298      const prevPresentRef = (0,external_React_namespaceObject.useRef)(present);
1299      const prevAnimationNameRef = (0,external_React_namespaceObject.useRef)('none');
1300      const initialState = present ? 'mounted' : 'unmounted';
1301      const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {
1302          mounted: {
1303              UNMOUNT: 'unmounted',
1304              ANIMATION_OUT: 'unmountSuspended'
1305          },
1306          unmountSuspended: {
1307              MOUNT: 'mounted',
1308              ANIMATION_END: 'unmounted'
1309          },
1310          unmounted: {
1311              MOUNT: 'mounted'
1312          }
1313      });
1314      (0,external_React_namespaceObject.useEffect)(()=>{
1315          const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
1316          prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';
1317      }, [
1318          state
1319      ]);
1320      $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
1321          const styles = stylesRef.current;
1322          const wasPresent = prevPresentRef.current;
1323          const hasPresentChanged = wasPresent !== present;
1324          if (hasPresentChanged) {
1325              const prevAnimationName = prevAnimationNameRef.current;
1326              const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
1327              if (present) send('MOUNT');
1328              else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run
1329              // so we unmount instantly
1330              send('UNMOUNT');
1331              else {
1332                  /**
1333           * When `present` changes to `false`, we check changes to animation-name to
1334           * determine whether an animation has started. We chose this approach (reading
1335           * computed styles) because there is no `animationrun` event and `animationstart`
1336           * fires after `animation-delay` has expired which would be too late.
1337           */ const isAnimating = prevAnimationName !== currentAnimationName;
1338                  if (wasPresent && isAnimating) send('ANIMATION_OUT');
1339                  else send('UNMOUNT');
1340              }
1341              prevPresentRef.current = present;
1342          }
1343      }, [
1344          present,
1345          send
1346      ]);
1347      $9f79659886946c16$export$e5c5a5f917a5871c(()=>{
1348          if (node1) {
1349              /**
1350         * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`
1351         * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we
1352         * make sure we only trigger ANIMATION_END for the currently active animation.
1353         */ const handleAnimationEnd = (event)=>{
1354                  const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
1355                  const isCurrentAnimation = currentAnimationName.includes(event.animationName);
1356                  if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied
1357                  // a frame after the animation ends, creating a flash of visible content.
1358                  // By manually flushing we ensure they sync within a frame, removing the flash.
1359                  (0,external_ReactDOM_namespaceObject.flushSync)(()=>send('ANIMATION_END')
1360                  );
1361              };
1362              const handleAnimationStart = (event)=>{
1363                  if (event.target === node1) // if animation occurred, store its name as the previous animation.
1364                  prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
1365              };
1366              node1.addEventListener('animationstart', handleAnimationStart);
1367              node1.addEventListener('animationcancel', handleAnimationEnd);
1368              node1.addEventListener('animationend', handleAnimationEnd);
1369              return ()=>{
1370                  node1.removeEventListener('animationstart', handleAnimationStart);
1371                  node1.removeEventListener('animationcancel', handleAnimationEnd);
1372                  node1.removeEventListener('animationend', handleAnimationEnd);
1373              };
1374          } else // Transition to the unmounted state if the node is removed prematurely.
1375          // We avoid doing so during cleanup as the node may change but still exist.
1376          send('ANIMATION_END');
1377      }, [
1378          node1,
1379          send
1380      ]);
1381      return {
1382          isPresent: [
1383              'mounted',
1384              'unmountSuspended'
1385          ].includes(state),
1386          ref: (0,external_React_namespaceObject.useCallback)((node)=>{
1387              if (node) stylesRef.current = getComputedStyle(node);
1388              setNode(node);
1389          }, [])
1390      };
1391  }
1392  /* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {
1393      return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';
1394  }
1395  
1396  
1397  
1398  
1399  
1400  ;// ./node_modules/@radix-ui/react-focus-guards/dist/index.mjs
1401  
1402  
1403  
1404  /** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;
1405  function $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) {
1406      $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
1407      return props.children;
1408  }
1409  /**
1410   * Injects a pair of focus guards at the edges of the whole DOM tree
1411   * to ensure `focusin` & `focusout` events can be caught consistently.
1412   */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
1413      (0,external_React_namespaceObject.useEffect)(()=>{
1414          var _edgeGuards$, _edgeGuards$2;
1415          const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');
1416          document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
1417          document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
1418          $3db38b7d1fb3fe6a$var$count++;
1419          return ()=>{
1420              if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()
1421              );
1422              $3db38b7d1fb3fe6a$var$count--;
1423          };
1424      }, []);
1425  }
1426  function $3db38b7d1fb3fe6a$var$createFocusGuard() {
1427      const element = document.createElement('span');
1428      element.setAttribute('data-radix-focus-guard', '');
1429      element.tabIndex = 0;
1430      element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';
1431      return element;
1432  }
1433  const $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 = (/* unused pure expression or super */ null && ($3db38b7d1fb3fe6a$export$ac5b58043b79449b));
1434  
1435  
1436  
1437  
1438  
1439  ;// ./node_modules/tslib/tslib.es6.mjs
1440  /******************************************************************************
1441  Copyright (c) Microsoft Corporation.
1442  
1443  Permission to use, copy, modify, and/or distribute this software for any
1444  purpose with or without fee is hereby granted.
1445  
1446  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1447  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1448  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1449  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1450  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1451  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1452  PERFORMANCE OF THIS SOFTWARE.
1453  ***************************************************************************** */
1454  /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1455  
1456  var extendStatics = function(d, b) {
1457    extendStatics = Object.setPrototypeOf ||
1458        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1459        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1460    return extendStatics(d, b);
1461  };
1462  
1463  function __extends(d, b) {
1464    if (typeof b !== "function" && b !== null)
1465        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1466    extendStatics(d, b);
1467    function __() { this.constructor = d; }
1468    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1469  }
1470  
1471  var __assign = function() {
1472    __assign = Object.assign || function __assign(t) {
1473        for (var s, i = 1, n = arguments.length; i < n; i++) {
1474            s = arguments[i];
1475            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1476        }
1477        return t;
1478    }
1479    return __assign.apply(this, arguments);
1480  }
1481  
1482  function __rest(s, e) {
1483    var t = {};
1484    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1485        t[p] = s[p];
1486    if (s != null && typeof Object.getOwnPropertySymbols === "function")
1487        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1488            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1489                t[p[i]] = s[p[i]];
1490        }
1491    return t;
1492  }
1493  
1494  function __decorate(decorators, target, key, desc) {
1495    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1496    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1497    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1498    return c > 3 && r && Object.defineProperty(target, key, r), r;
1499  }
1500  
1501  function __param(paramIndex, decorator) {
1502    return function (target, key) { decorator(target, key, paramIndex); }
1503  }
1504  
1505  function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
1506    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
1507    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
1508    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
1509    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
1510    var _, done = false;
1511    for (var i = decorators.length - 1; i >= 0; i--) {
1512        var context = {};
1513        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
1514        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
1515        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
1516        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
1517        if (kind === "accessor") {
1518            if (result === void 0) continue;
1519            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
1520            if (_ = accept(result.get)) descriptor.get = _;
1521            if (_ = accept(result.set)) descriptor.set = _;
1522            if (_ = accept(result.init)) initializers.unshift(_);
1523        }
1524        else if (_ = accept(result)) {
1525            if (kind === "field") initializers.unshift(_);
1526            else descriptor[key] = _;
1527        }
1528    }
1529    if (target) Object.defineProperty(target, contextIn.name, descriptor);
1530    done = true;
1531  };
1532  
1533  function __runInitializers(thisArg, initializers, value) {
1534    var useValue = arguments.length > 2;
1535    for (var i = 0; i < initializers.length; i++) {
1536        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
1537    }
1538    return useValue ? value : void 0;
1539  };
1540  
1541  function __propKey(x) {
1542    return typeof x === "symbol" ? x : "".concat(x);
1543  };
1544  
1545  function __setFunctionName(f, name, prefix) {
1546    if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
1547    return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
1548  };
1549  
1550  function __metadata(metadataKey, metadataValue) {
1551    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
1552  }
1553  
1554  function __awaiter(thisArg, _arguments, P, generator) {
1555    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1556    return new (P || (P = Promise))(function (resolve, reject) {
1557        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1558        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1559        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1560        step((generator = generator.apply(thisArg, _arguments || [])).next());
1561    });
1562  }
1563  
1564  function __generator(thisArg, body) {
1565    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
1566    return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1567    function verb(n) { return function (v) { return step([n, v]); }; }
1568    function step(op) {
1569        if (f) throw new TypeError("Generator is already executing.");
1570        while (g && (g = 0, op[0] && (_ = 0)), _) try {
1571            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1572            if (y = 0, t) op = [op[0] & 2, t.value];
1573            switch (op[0]) {
1574                case 0: case 1: t = op; break;
1575                case 4: _.label++; return { value: op[1], done: false };
1576                case 5: _.label++; y = op[1]; op = [0]; continue;
1577                case 7: op = _.ops.pop(); _.trys.pop(); continue;
1578                default:
1579                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1580                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1581                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1582                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1583                    if (t[2]) _.ops.pop();
1584                    _.trys.pop(); continue;
1585            }
1586            op = body.call(thisArg, _);
1587        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1588        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1589    }
1590  }
1591  
1592  var __createBinding = Object.create ? (function(o, m, k, k2) {
1593    if (k2 === undefined) k2 = k;
1594    var desc = Object.getOwnPropertyDescriptor(m, k);
1595    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1596        desc = { enumerable: true, get: function() { return m[k]; } };
1597    }
1598    Object.defineProperty(o, k2, desc);
1599  }) : (function(o, m, k, k2) {
1600    if (k2 === undefined) k2 = k;
1601    o[k2] = m[k];
1602  });
1603  
1604  function __exportStar(m, o) {
1605    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1606  }
1607  
1608  function __values(o) {
1609    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1610    if (m) return m.call(o);
1611    if (o && typeof o.length === "number") return {
1612        next: function () {
1613            if (o && i >= o.length) o = void 0;
1614            return { value: o && o[i++], done: !o };
1615        }
1616    };
1617    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1618  }
1619  
1620  function __read(o, n) {
1621    var m = typeof Symbol === "function" && o[Symbol.iterator];
1622    if (!m) return o;
1623    var i = m.call(o), r, ar = [], e;
1624    try {
1625        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1626    }
1627    catch (error) { e = { error: error }; }
1628    finally {
1629        try {
1630            if (r && !r.done && (m = i["return"])) m.call(i);
1631        }
1632        finally { if (e) throw e.error; }
1633    }
1634    return ar;
1635  }
1636  
1637  /** @deprecated */
1638  function __spread() {
1639    for (var ar = [], i = 0; i < arguments.length; i++)
1640        ar = ar.concat(__read(arguments[i]));
1641    return ar;
1642  }
1643  
1644  /** @deprecated */
1645  function __spreadArrays() {
1646    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1647    for (var r = Array(s), k = 0, i = 0; i < il; i++)
1648        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1649            r[k] = a[j];
1650    return r;
1651  }
1652  
1653  function __spreadArray(to, from, pack) {
1654    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1655        if (ar || !(i in from)) {
1656            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1657            ar[i] = from[i];
1658        }
1659    }
1660    return to.concat(ar || Array.prototype.slice.call(from));
1661  }
1662  
1663  function __await(v) {
1664    return this instanceof __await ? (this.v = v, this) : new __await(v);
1665  }
1666  
1667  function __asyncGenerator(thisArg, _arguments, generator) {
1668    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1669    var g = generator.apply(thisArg, _arguments || []), i, q = [];
1670    return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
1671    function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
1672    function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
1673    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1674    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1675    function fulfill(value) { resume("next", value); }
1676    function reject(value) { resume("throw", value); }
1677    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1678  }
1679  
1680  function __asyncDelegator(o) {
1681    var i, p;
1682    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1683    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
1684  }
1685  
1686  function __asyncValues(o) {
1687    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1688    var m = o[Symbol.asyncIterator], i;
1689    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1690    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1691    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1692  }
1693  
1694  function __makeTemplateObject(cooked, raw) {
1695    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1696    return cooked;
1697  };
1698  
1699  var __setModuleDefault = Object.create ? (function(o, v) {
1700    Object.defineProperty(o, "default", { enumerable: true, value: v });
1701  }) : function(o, v) {
1702    o["default"] = v;
1703  };
1704  
1705  var ownKeys = function(o) {
1706    ownKeys = Object.getOwnPropertyNames || function (o) {
1707      var ar = [];
1708      for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
1709      return ar;
1710    };
1711    return ownKeys(o);
1712  };
1713  
1714  function __importStar(mod) {
1715    if (mod && mod.__esModule) return mod;
1716    var result = {};
1717    if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
1718    __setModuleDefault(result, mod);
1719    return result;
1720  }
1721  
1722  function __importDefault(mod) {
1723    return (mod && mod.__esModule) ? mod : { default: mod };
1724  }
1725  
1726  function __classPrivateFieldGet(receiver, state, kind, f) {
1727    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1728    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1729    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1730  }
1731  
1732  function __classPrivateFieldSet(receiver, state, value, kind, f) {
1733    if (kind === "m") throw new TypeError("Private method is not writable");
1734    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1735    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1736    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1737  }
1738  
1739  function __classPrivateFieldIn(state, receiver) {
1740    if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1741    return typeof state === "function" ? receiver === state : state.has(receiver);
1742  }
1743  
1744  function __addDisposableResource(env, value, async) {
1745    if (value !== null && value !== void 0) {
1746      if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
1747      var dispose, inner;
1748      if (async) {
1749        if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
1750        dispose = value[Symbol.asyncDispose];
1751      }
1752      if (dispose === void 0) {
1753        if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
1754        dispose = value[Symbol.dispose];
1755        if (async) inner = dispose;
1756      }
1757      if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
1758      if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
1759      env.stack.push({ value: value, dispose: dispose, async: async });
1760    }
1761    else if (async) {
1762      env.stack.push({ async: true });
1763    }
1764    return value;
1765  }
1766  
1767  var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1768    var e = new Error(message);
1769    return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1770  };
1771  
1772  function __disposeResources(env) {
1773    function fail(e) {
1774      env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
1775      env.hasError = true;
1776    }
1777    var r, s = 0;
1778    function next() {
1779      while (r = env.stack.pop()) {
1780        try {
1781          if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
1782          if (r.dispose) {
1783            var result = r.dispose.call(r.value);
1784            if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
1785          }
1786          else s |= 1;
1787        }
1788        catch (e) {
1789          fail(e);
1790        }
1791      }
1792      if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
1793      if (env.hasError) throw env.error;
1794    }
1795    return next();
1796  }
1797  
1798  function __rewriteRelativeImportExtension(path, preserveJsx) {
1799    if (typeof path === "string" && /^\.\.?\//.test(path)) {
1800        return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
1801            return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
1802        });
1803    }
1804    return path;
1805  }
1806  
1807  /* harmony default export */ const tslib_es6 = ({
1808    __extends,
1809    __assign,
1810    __rest,
1811    __decorate,
1812    __param,
1813    __esDecorate,
1814    __runInitializers,
1815    __propKey,
1816    __setFunctionName,
1817    __metadata,
1818    __awaiter,
1819    __generator,
1820    __createBinding,
1821    __exportStar,
1822    __values,
1823    __read,
1824    __spread,
1825    __spreadArrays,
1826    __spreadArray,
1827    __await,
1828    __asyncGenerator,
1829    __asyncDelegator,
1830    __asyncValues,
1831    __makeTemplateObject,
1832    __importStar,
1833    __importDefault,
1834    __classPrivateFieldGet,
1835    __classPrivateFieldSet,
1836    __classPrivateFieldIn,
1837    __addDisposableResource,
1838    __disposeResources,
1839    __rewriteRelativeImportExtension,
1840  });
1841  
1842  ;// ./node_modules/react-remove-scroll-bar/dist/es2015/constants.js
1843  var zeroRightClassName = 'right-scroll-bar-position';
1844  var fullWidthClassName = 'width-before-scroll-bar';
1845  var noScrollbarsClassName = 'with-scroll-bars-hidden';
1846  /**
1847   * Name of a CSS variable containing the amount of "hidden" scrollbar
1848   * ! might be undefined ! use will fallback!
1849   */
1850  var removedBarSizeVariable = '--removed-body-scroll-bar-size';
1851  
1852  ;// ./node_modules/use-callback-ref/dist/es2015/assignRef.js
1853  /**
1854   * Assigns a value for a given ref, no matter of the ref format
1855   * @param {RefObject} ref - a callback function or ref object
1856   * @param value - a new value
1857   *
1858   * @see https://github.com/theKashey/use-callback-ref#assignref
1859   * @example
1860   * const refObject = useRef();
1861   * const refFn = (ref) => {....}
1862   *
1863   * assignRef(refObject, "refValue");
1864   * assignRef(refFn, "refValue");
1865   */
1866  function assignRef(ref, value) {
1867      if (typeof ref === 'function') {
1868          ref(value);
1869      }
1870      else if (ref) {
1871          ref.current = value;
1872      }
1873      return ref;
1874  }
1875  
1876  ;// ./node_modules/use-callback-ref/dist/es2015/useRef.js
1877  
1878  /**
1879   * creates a MutableRef with ref change callback
1880   * @param initialValue - initial ref value
1881   * @param {Function} callback - a callback to run when value changes
1882   *
1883   * @example
1884   * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
1885   * ref.current = 1;
1886   * // prints 0 -> 1
1887   *
1888   * @see https://reactjs.org/docs/hooks-reference.html#useref
1889   * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
1890   * @returns {MutableRefObject}
1891   */
1892  function useCallbackRef(initialValue, callback) {
1893      var ref = (0,external_React_namespaceObject.useState)(function () { return ({
1894          // value
1895          value: initialValue,
1896          // last callback
1897          callback: callback,
1898          // "memoized" public interface
1899          facade: {
1900              get current() {
1901                  return ref.value;
1902              },
1903              set current(value) {
1904                  var last = ref.value;
1905                  if (last !== value) {
1906                      ref.value = value;
1907                      ref.callback(value, last);
1908                  }
1909              },
1910          },
1911      }); })[0];
1912      // update callback
1913      ref.callback = callback;
1914      return ref.facade;
1915  }
1916  
1917  ;// ./node_modules/use-callback-ref/dist/es2015/useMergeRef.js
1918  
1919  
1920  
1921  var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? external_React_namespaceObject.useLayoutEffect : external_React_namespaceObject.useEffect;
1922  var currentValues = new WeakMap();
1923  /**
1924   * Merges two or more refs together providing a single interface to set their value
1925   * @param {RefObject|Ref} refs
1926   * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
1927   *
1928   * @see {@link mergeRefs} a version without buit-in memoization
1929   * @see https://github.com/theKashey/use-callback-ref#usemergerefs
1930   * @example
1931   * const Component = React.forwardRef((props, ref) => {
1932   *   const ownRef = useRef();
1933   *   const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
1934   *   return <div ref={domRef}>...</div>
1935   * }
1936   */
1937  function useMergeRefs(refs, defaultValue) {
1938      var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {
1939          return refs.forEach(function (ref) { return assignRef(ref, newValue); });
1940      });
1941      // handle refs changes - added or removed
1942      useIsomorphicLayoutEffect(function () {
1943          var oldValue = currentValues.get(callbackRef);
1944          if (oldValue) {
1945              var prevRefs_1 = new Set(oldValue);
1946              var nextRefs_1 = new Set(refs);
1947              var current_1 = callbackRef.current;
1948              prevRefs_1.forEach(function (ref) {
1949                  if (!nextRefs_1.has(ref)) {
1950                      assignRef(ref, null);
1951                  }
1952              });
1953              nextRefs_1.forEach(function (ref) {
1954                  if (!prevRefs_1.has(ref)) {
1955                      assignRef(ref, current_1);
1956                  }
1957              });
1958          }
1959          currentValues.set(callbackRef, refs);
1960      }, [refs]);
1961      return callbackRef;
1962  }
1963  
1964  ;// ./node_modules/use-sidecar/dist/es2015/medium.js
1965  
1966  function ItoI(a) {
1967      return a;
1968  }
1969  function innerCreateMedium(defaults, middleware) {
1970      if (middleware === void 0) { middleware = ItoI; }
1971      var buffer = [];
1972      var assigned = false;
1973      var medium = {
1974          read: function () {
1975              if (assigned) {
1976                  throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
1977              }
1978              if (buffer.length) {
1979                  return buffer[buffer.length - 1];
1980              }
1981              return defaults;
1982          },
1983          useMedium: function (data) {
1984              var item = middleware(data, assigned);
1985              buffer.push(item);
1986              return function () {
1987                  buffer = buffer.filter(function (x) { return x !== item; });
1988              };
1989          },
1990          assignSyncMedium: function (cb) {
1991              assigned = true;
1992              while (buffer.length) {
1993                  var cbs = buffer;
1994                  buffer = [];
1995                  cbs.forEach(cb);
1996              }
1997              buffer = {
1998                  push: function (x) { return cb(x); },
1999                  filter: function () { return buffer; },
2000              };
2001          },
2002          assignMedium: function (cb) {
2003              assigned = true;
2004              var pendingQueue = [];
2005              if (buffer.length) {
2006                  var cbs = buffer;
2007                  buffer = [];
2008                  cbs.forEach(cb);
2009                  pendingQueue = buffer;
2010              }
2011              var executeQueue = function () {
2012                  var cbs = pendingQueue;
2013                  pendingQueue = [];
2014                  cbs.forEach(cb);
2015              };
2016              var cycle = function () { return Promise.resolve().then(executeQueue); };
2017              cycle();
2018              buffer = {
2019                  push: function (x) {
2020                      pendingQueue.push(x);
2021                      cycle();
2022                  },
2023                  filter: function (filter) {
2024                      pendingQueue = pendingQueue.filter(filter);
2025                      return buffer;
2026                  },
2027              };
2028          },
2029      };
2030      return medium;
2031  }
2032  function createMedium(defaults, middleware) {
2033      if (middleware === void 0) { middleware = ItoI; }
2034      return innerCreateMedium(defaults, middleware);
2035  }
2036  // eslint-disable-next-line @typescript-eslint/ban-types
2037  function createSidecarMedium(options) {
2038      if (options === void 0) { options = {}; }
2039      var medium = innerCreateMedium(null);
2040      medium.options = __assign({ async: true, ssr: false }, options);
2041      return medium;
2042  }
2043  
2044  ;// ./node_modules/react-remove-scroll/dist/es2015/medium.js
2045  
2046  var effectCar = createSidecarMedium();
2047  
2048  ;// ./node_modules/react-remove-scroll/dist/es2015/UI.js
2049  
2050  
2051  
2052  
2053  
2054  var nothing = function () {
2055      return;
2056  };
2057  /**
2058   * Removes scrollbar from the page and contain the scroll within the Lock
2059   */
2060  var RemoveScroll = external_React_namespaceObject.forwardRef(function (props, parentRef) {
2061      var ref = external_React_namespaceObject.useRef(null);
2062      var _a = external_React_namespaceObject.useState({
2063          onScrollCapture: nothing,
2064          onWheelCapture: nothing,
2065          onTouchMoveCapture: nothing,
2066      }), callbacks = _a[0], setCallbacks = _a[1];
2067      var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
2068      var SideCar = sideCar;
2069      var containerRef = useMergeRefs([ref, parentRef]);
2070      var containerProps = __assign(__assign({}, rest), callbacks);
2071      return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null,
2072          enabled && (external_React_namespaceObject.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
2073          forwardProps ? (external_React_namespaceObject.cloneElement(external_React_namespaceObject.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (external_React_namespaceObject.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
2074  });
2075  RemoveScroll.defaultProps = {
2076      enabled: true,
2077      removeScrollBar: true,
2078      inert: false,
2079  };
2080  RemoveScroll.classNames = {
2081      fullWidth: fullWidthClassName,
2082      zeroRight: zeroRightClassName,
2083  };
2084  
2085  
2086  ;// ./node_modules/use-sidecar/dist/es2015/exports.js
2087  
2088  
2089  var SideCar = function (_a) {
2090      var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
2091      if (!sideCar) {
2092          throw new Error('Sidecar: please provide `sideCar` property to import the right car');
2093      }
2094      var Target = sideCar.read();
2095      if (!Target) {
2096          throw new Error('Sidecar medium not found');
2097      }
2098      return external_React_namespaceObject.createElement(Target, __assign({}, rest));
2099  };
2100  SideCar.isSideCarExport = true;
2101  function exportSidecar(medium, exported) {
2102      medium.useMedium(exported);
2103      return SideCar;
2104  }
2105  
2106  ;// ./node_modules/get-nonce/dist/es2015/index.js
2107  var currentNonce;
2108  var setNonce = function (nonce) {
2109      currentNonce = nonce;
2110  };
2111  var getNonce = function () {
2112      if (currentNonce) {
2113          return currentNonce;
2114      }
2115      if (true) {
2116          return __webpack_require__.nc;
2117      }
2118      return undefined;
2119  };
2120  
2121  ;// ./node_modules/react-style-singleton/dist/es2015/singleton.js
2122  
2123  function makeStyleTag() {
2124      if (!document)
2125          return null;
2126      var tag = document.createElement('style');
2127      tag.type = 'text/css';
2128      var nonce = getNonce();
2129      if (nonce) {
2130          tag.setAttribute('nonce', nonce);
2131      }
2132      return tag;
2133  }
2134  function injectStyles(tag, css) {
2135      // @ts-ignore
2136      if (tag.styleSheet) {
2137          // @ts-ignore
2138          tag.styleSheet.cssText = css;
2139      }
2140      else {
2141          tag.appendChild(document.createTextNode(css));
2142      }
2143  }
2144  function insertStyleTag(tag) {
2145      var head = document.head || document.getElementsByTagName('head')[0];
2146      head.appendChild(tag);
2147  }
2148  var stylesheetSingleton = function () {
2149      var counter = 0;
2150      var stylesheet = null;
2151      return {
2152          add: function (style) {
2153              if (counter == 0) {
2154                  if ((stylesheet = makeStyleTag())) {
2155                      injectStyles(stylesheet, style);
2156                      insertStyleTag(stylesheet);
2157                  }
2158              }
2159              counter++;
2160          },
2161          remove: function () {
2162              counter--;
2163              if (!counter && stylesheet) {
2164                  stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
2165                  stylesheet = null;
2166              }
2167          },
2168      };
2169  };
2170  
2171  ;// ./node_modules/react-style-singleton/dist/es2015/hook.js
2172  
2173  
2174  /**
2175   * creates a hook to control style singleton
2176   * @see {@link styleSingleton} for a safer component version
2177   * @example
2178   * ```tsx
2179   * const useStyle = styleHookSingleton();
2180   * ///
2181   * useStyle('body { overflow: hidden}');
2182   */
2183  var styleHookSingleton = function () {
2184      var sheet = stylesheetSingleton();
2185      return function (styles, isDynamic) {
2186          external_React_namespaceObject.useEffect(function () {
2187              sheet.add(styles);
2188              return function () {
2189                  sheet.remove();
2190              };
2191          }, [styles && isDynamic]);
2192      };
2193  };
2194  
2195  ;// ./node_modules/react-style-singleton/dist/es2015/component.js
2196  
2197  /**
2198   * create a Component to add styles on demand
2199   * - styles are added when first instance is mounted
2200   * - styles are removed when the last instance is unmounted
2201   * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
2202   */
2203  var styleSingleton = function () {
2204      var useStyle = styleHookSingleton();
2205      var Sheet = function (_a) {
2206          var styles = _a.styles, dynamic = _a.dynamic;
2207          useStyle(styles, dynamic);
2208          return null;
2209      };
2210      return Sheet;
2211  };
2212  
2213  ;// ./node_modules/react-style-singleton/dist/es2015/index.js
2214  
2215  
2216  
2217  
2218  ;// ./node_modules/react-remove-scroll-bar/dist/es2015/utils.js
2219  var zeroGap = {
2220      left: 0,
2221      top: 0,
2222      right: 0,
2223      gap: 0,
2224  };
2225  var parse = function (x) { return parseInt(x || '', 10) || 0; };
2226  var getOffset = function (gapMode) {
2227      var cs = window.getComputedStyle(document.body);
2228      var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
2229      var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
2230      var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
2231      return [parse(left), parse(top), parse(right)];
2232  };
2233  var getGapWidth = function (gapMode) {
2234      if (gapMode === void 0) { gapMode = 'margin'; }
2235      if (typeof window === 'undefined') {
2236          return zeroGap;
2237      }
2238      var offsets = getOffset(gapMode);
2239      var documentWidth = document.documentElement.clientWidth;
2240      var windowWidth = window.innerWidth;
2241      return {
2242          left: offsets[0],
2243          top: offsets[1],
2244          right: offsets[2],
2245          gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
2246      };
2247  };
2248  
2249  ;// ./node_modules/react-remove-scroll-bar/dist/es2015/component.js
2250  
2251  
2252  
2253  
2254  var Style = styleSingleton();
2255  var lockAttribute = 'data-scroll-locked';
2256  // important tip - once we measure scrollBar width and remove them
2257  // we could not repeat this operation
2258  // thus we are using style-singleton - only the first "yet correct" style will be applied.
2259  var getStyles = function (_a, allowRelative, gapMode, important) {
2260      var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
2261      if (gapMode === void 0) { gapMode = 'margin'; }
2262      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([
2263          allowRelative && "position: relative ".concat(important, ";"),
2264          gapMode === 'margin' &&
2265              "\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    "),
2266          gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
2267      ]
2268          .filter(Boolean)
2269          .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");
2270  };
2271  var getCurrentUseCounter = function () {
2272      var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
2273      return isFinite(counter) ? counter : 0;
2274  };
2275  var useLockAttribute = function () {
2276      external_React_namespaceObject.useEffect(function () {
2277          document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
2278          return function () {
2279              var newCounter = getCurrentUseCounter() - 1;
2280              if (newCounter <= 0) {
2281                  document.body.removeAttribute(lockAttribute);
2282              }
2283              else {
2284                  document.body.setAttribute(lockAttribute, newCounter.toString());
2285              }
2286          };
2287      }, []);
2288  };
2289  /**
2290   * Removes page scrollbar and blocks page scroll when mounted
2291   */
2292  var RemoveScrollBar = function (_a) {
2293      var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;
2294      useLockAttribute();
2295      /*
2296       gap will be measured on every component mount
2297       however it will be used only by the "first" invocation
2298       due to singleton nature of <Style
2299       */
2300      var gap = external_React_namespaceObject.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
2301      return external_React_namespaceObject.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
2302  };
2303  
2304  ;// ./node_modules/react-remove-scroll-bar/dist/es2015/index.js
2305  
2306  
2307  
2308  
2309  
2310  ;// ./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
2311  var passiveSupported = false;
2312  if (typeof window !== 'undefined') {
2313      try {
2314          var options = Object.defineProperty({}, 'passive', {
2315              get: function () {
2316                  passiveSupported = true;
2317                  return true;
2318              },
2319          });
2320          // @ts-ignore
2321          window.addEventListener('test', options, options);
2322          // @ts-ignore
2323          window.removeEventListener('test', options, options);
2324      }
2325      catch (err) {
2326          passiveSupported = false;
2327      }
2328  }
2329  var nonPassive = passiveSupported ? { passive: false } : false;
2330  
2331  ;// ./node_modules/react-remove-scroll/dist/es2015/handleScroll.js
2332  var alwaysContainsScroll = function (node) {
2333      // textarea will always _contain_ scroll inside self. It only can be hidden
2334      return node.tagName === 'TEXTAREA';
2335  };
2336  var elementCanBeScrolled = function (node, overflow) {
2337      var styles = window.getComputedStyle(node);
2338      return (
2339      // not-not-scrollable
2340      styles[overflow] !== 'hidden' &&
2341          // contains scroll inside self
2342          !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
2343  };
2344  var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
2345  var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
2346  var locationCouldBeScrolled = function (axis, node) {
2347      var current = node;
2348      do {
2349          // Skip over shadow root
2350          if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
2351              current = current.host;
2352          }
2353          var isScrollable = elementCouldBeScrolled(axis, current);
2354          if (isScrollable) {
2355              var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
2356              if (s > d) {
2357                  return true;
2358              }
2359          }
2360          current = current.parentNode;
2361      } while (current && current !== document.body);
2362      return false;
2363  };
2364  var getVScrollVariables = function (_a) {
2365      var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
2366      return [
2367          scrollTop,
2368          scrollHeight,
2369          clientHeight,
2370      ];
2371  };
2372  var getHScrollVariables = function (_a) {
2373      var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
2374      return [
2375          scrollLeft,
2376          scrollWidth,
2377          clientWidth,
2378      ];
2379  };
2380  var elementCouldBeScrolled = function (axis, node) {
2381      return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
2382  };
2383  var getScrollVariables = function (axis, node) {
2384      return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
2385  };
2386  var getDirectionFactor = function (axis, direction) {
2387      /**
2388       * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
2389       * and then increasingly negative as you scroll towards the end of the content.
2390       * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
2391       */
2392      return axis === 'h' && direction === 'rtl' ? -1 : 1;
2393  };
2394  var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
2395      var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
2396      var delta = directionFactor * sourceDelta;
2397      // find scrollable target
2398      var target = event.target;
2399      var targetInLock = endTarget.contains(target);
2400      var shouldCancelScroll = false;
2401      var isDeltaPositive = delta > 0;
2402      var availableScroll = 0;
2403      var availableScrollTop = 0;
2404      do {
2405          var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
2406          var elementScroll = scroll_1 - capacity - directionFactor * position;
2407          if (position || elementScroll) {
2408              if (elementCouldBeScrolled(axis, target)) {
2409                  availableScroll += elementScroll;
2410                  availableScrollTop += position;
2411              }
2412          }
2413          target = target.parentNode;
2414      } while (
2415      // portaled content
2416      (!targetInLock && target !== document.body) ||
2417          // self content
2418          (targetInLock && (endTarget.contains(target) || endTarget === target)));
2419      if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) {
2420          shouldCancelScroll = true;
2421      }
2422      else if (!isDeltaPositive &&
2423          ((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) {
2424          shouldCancelScroll = true;
2425      }
2426      return shouldCancelScroll;
2427  };
2428  
2429  ;// ./node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2430  
2431  
2432  
2433  
2434  
2435  
2436  var getTouchXY = function (event) {
2437      return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
2438  };
2439  var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
2440  var extractRef = function (ref) {
2441      return ref && 'current' in ref ? ref.current : ref;
2442  };
2443  var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
2444  var generateStyle = function (id) { return "\n  .block-interactivity-".concat(id, " {pointer-events: none;}\n  .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
2445  var idCounter = 0;
2446  var lockStack = [];
2447  function RemoveScrollSideCar(props) {
2448      var shouldPreventQueue = external_React_namespaceObject.useRef([]);
2449      var touchStartRef = external_React_namespaceObject.useRef([0, 0]);
2450      var activeAxis = external_React_namespaceObject.useRef();
2451      var id = external_React_namespaceObject.useState(idCounter++)[0];
2452      var Style = external_React_namespaceObject.useState(function () { return styleSingleton(); })[0];
2453      var lastProps = external_React_namespaceObject.useRef(props);
2454      external_React_namespaceObject.useEffect(function () {
2455          lastProps.current = props;
2456      }, [props]);
2457      external_React_namespaceObject.useEffect(function () {
2458          if (props.inert) {
2459              document.body.classList.add("block-interactivity-".concat(id));
2460              var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
2461              allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
2462              return function () {
2463                  document.body.classList.remove("block-interactivity-".concat(id));
2464                  allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
2465              };
2466          }
2467          return;
2468      }, [props.inert, props.lockRef.current, props.shards]);
2469      var shouldCancelEvent = external_React_namespaceObject.useCallback(function (event, parent) {
2470          if ('touches' in event && event.touches.length === 2) {
2471              return !lastProps.current.allowPinchZoom;
2472          }
2473          var touch = getTouchXY(event);
2474          var touchStart = touchStartRef.current;
2475          var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
2476          var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
2477          var currentAxis;
2478          var target = event.target;
2479          var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
2480          // allow horizontal touch move on Range inputs. They will not cause any scroll
2481          if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
2482              return false;
2483          }
2484          var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2485          if (!canBeScrolledInMainDirection) {
2486              return true;
2487          }
2488          if (canBeScrolledInMainDirection) {
2489              currentAxis = moveDirection;
2490          }
2491          else {
2492              currentAxis = moveDirection === 'v' ? 'h' : 'v';
2493              canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2494              // other axis might be not scrollable
2495          }
2496          if (!canBeScrolledInMainDirection) {
2497              return false;
2498          }
2499          if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
2500              activeAxis.current = currentAxis;
2501          }
2502          if (!currentAxis) {
2503              return true;
2504          }
2505          var cancelingAxis = activeAxis.current || currentAxis;
2506          return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
2507      }, []);
2508      var shouldPrevent = external_React_namespaceObject.useCallback(function (_event) {
2509          var event = _event;
2510          if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
2511              // not the last active
2512              return;
2513          }
2514          var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
2515          var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0];
2516          // self event, and should be canceled
2517          if (sourceEvent && sourceEvent.should) {
2518              if (event.cancelable) {
2519                  event.preventDefault();
2520              }
2521              return;
2522          }
2523          // outside or shard event
2524          if (!sourceEvent) {
2525              var shardNodes = (lastProps.current.shards || [])
2526                  .map(extractRef)
2527                  .filter(Boolean)
2528                  .filter(function (node) { return node.contains(event.target); });
2529              var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
2530              if (shouldStop) {
2531                  if (event.cancelable) {
2532                      event.preventDefault();
2533                  }
2534              }
2535          }
2536      }, []);
2537      var shouldCancel = external_React_namespaceObject.useCallback(function (name, delta, target, should) {
2538          var event = { name: name, delta: delta, target: target, should: should };
2539          shouldPreventQueue.current.push(event);
2540          setTimeout(function () {
2541              shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
2542          }, 1);
2543      }, []);
2544      var scrollTouchStart = external_React_namespaceObject.useCallback(function (event) {
2545          touchStartRef.current = getTouchXY(event);
2546          activeAxis.current = undefined;
2547      }, []);
2548      var scrollWheel = external_React_namespaceObject.useCallback(function (event) {
2549          shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2550      }, []);
2551      var scrollTouchMove = external_React_namespaceObject.useCallback(function (event) {
2552          shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2553      }, []);
2554      external_React_namespaceObject.useEffect(function () {
2555          lockStack.push(Style);
2556          props.setCallbacks({
2557              onScrollCapture: scrollWheel,
2558              onWheelCapture: scrollWheel,
2559              onTouchMoveCapture: scrollTouchMove,
2560          });
2561          document.addEventListener('wheel', shouldPrevent, nonPassive);
2562          document.addEventListener('touchmove', shouldPrevent, nonPassive);
2563          document.addEventListener('touchstart', scrollTouchStart, nonPassive);
2564          return function () {
2565              lockStack = lockStack.filter(function (inst) { return inst !== Style; });
2566              document.removeEventListener('wheel', shouldPrevent, nonPassive);
2567              document.removeEventListener('touchmove', shouldPrevent, nonPassive);
2568              document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
2569          };
2570      }, []);
2571      var removeScrollBar = props.removeScrollBar, inert = props.inert;
2572      return (external_React_namespaceObject.createElement(external_React_namespaceObject.Fragment, null,
2573          inert ? external_React_namespaceObject.createElement(Style, { styles: generateStyle(id) }) : null,
2574          removeScrollBar ? external_React_namespaceObject.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
2575  }
2576  
2577  ;// ./node_modules/react-remove-scroll/dist/es2015/sidecar.js
2578  
2579  
2580  
2581  /* harmony default export */ const sidecar = (exportSidecar(effectCar, RemoveScrollSideCar));
2582  
2583  ;// ./node_modules/react-remove-scroll/dist/es2015/Combination.js
2584  
2585  
2586  
2587  
2588  var ReactRemoveScroll = external_React_namespaceObject.forwardRef(function (props, ref) { return (external_React_namespaceObject.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: sidecar }))); });
2589  ReactRemoveScroll.classNames = RemoveScroll.classNames;
2590  /* harmony default export */ const Combination = (ReactRemoveScroll);
2591  
2592  ;// ./node_modules/aria-hidden/dist/es2015/index.js
2593  var getDefaultParent = function (originalTarget) {
2594      if (typeof document === 'undefined') {
2595          return null;
2596      }
2597      var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
2598      return sampleTarget.ownerDocument.body;
2599  };
2600  var counterMap = new WeakMap();
2601  var uncontrolledNodes = new WeakMap();
2602  var markerMap = {};
2603  var lockCount = 0;
2604  var unwrapHost = function (node) {
2605      return node && (node.host || unwrapHost(node.parentNode));
2606  };
2607  var correctTargets = function (parent, targets) {
2608      return targets
2609          .map(function (target) {
2610          if (parent.contains(target)) {
2611              return target;
2612          }
2613          var correctedTarget = unwrapHost(target);
2614          if (correctedTarget && parent.contains(correctedTarget)) {
2615              return correctedTarget;
2616          }
2617          console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
2618          return null;
2619      })
2620          .filter(function (x) { return Boolean(x); });
2621  };
2622  /**
2623   * Marks everything except given node(or nodes) as aria-hidden
2624   * @param {Element | Element[]} originalTarget - elements to keep on the page
2625   * @param [parentNode] - top element, defaults to document.body
2626   * @param {String} [markerName] - a special attribute to mark every node
2627   * @param {String} [controlAttribute] - html Attribute to control
2628   * @return {Undo} undo command
2629   */
2630  var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
2631      var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
2632      if (!markerMap[markerName]) {
2633          markerMap[markerName] = new WeakMap();
2634      }
2635      var markerCounter = markerMap[markerName];
2636      var hiddenNodes = [];
2637      var elementsToKeep = new Set();
2638      var elementsToStop = new Set(targets);
2639      var keep = function (el) {
2640          if (!el || elementsToKeep.has(el)) {
2641              return;
2642          }
2643          elementsToKeep.add(el);
2644          keep(el.parentNode);
2645      };
2646      targets.forEach(keep);
2647      var deep = function (parent) {
2648          if (!parent || elementsToStop.has(parent)) {
2649              return;
2650          }
2651          Array.prototype.forEach.call(parent.children, function (node) {
2652              if (elementsToKeep.has(node)) {
2653                  deep(node);
2654              }
2655              else {
2656                  try {
2657                      var attr = node.getAttribute(controlAttribute);
2658                      var alreadyHidden = attr !== null && attr !== 'false';
2659                      var counterValue = (counterMap.get(node) || 0) + 1;
2660                      var markerValue = (markerCounter.get(node) || 0) + 1;
2661                      counterMap.set(node, counterValue);
2662                      markerCounter.set(node, markerValue);
2663                      hiddenNodes.push(node);
2664                      if (counterValue === 1 && alreadyHidden) {
2665                          uncontrolledNodes.set(node, true);
2666                      }
2667                      if (markerValue === 1) {
2668                          node.setAttribute(markerName, 'true');
2669                      }
2670                      if (!alreadyHidden) {
2671                          node.setAttribute(controlAttribute, 'true');
2672                      }
2673                  }
2674                  catch (e) {
2675                      console.error('aria-hidden: cannot operate on ', node, e);
2676                  }
2677              }
2678          });
2679      };
2680      deep(parentNode);
2681      elementsToKeep.clear();
2682      lockCount++;
2683      return function () {
2684          hiddenNodes.forEach(function (node) {
2685              var counterValue = counterMap.get(node) - 1;
2686              var markerValue = markerCounter.get(node) - 1;
2687              counterMap.set(node, counterValue);
2688              markerCounter.set(node, markerValue);
2689              if (!counterValue) {
2690                  if (!uncontrolledNodes.has(node)) {
2691                      node.removeAttribute(controlAttribute);
2692                  }
2693                  uncontrolledNodes.delete(node);
2694              }
2695              if (!markerValue) {
2696                  node.removeAttribute(markerName);
2697              }
2698          });
2699          lockCount--;
2700          if (!lockCount) {
2701              // clear
2702              counterMap = new WeakMap();
2703              counterMap = new WeakMap();
2704              uncontrolledNodes = new WeakMap();
2705              markerMap = {};
2706          }
2707      };
2708  };
2709  /**
2710   * Marks everything except given node(or nodes) as aria-hidden
2711   * @param {Element | Element[]} originalTarget - elements to keep on the page
2712   * @param [parentNode] - top element, defaults to document.body
2713   * @param {String} [markerName] - a special attribute to mark every node
2714   * @return {Undo} undo command
2715   */
2716  var hideOthers = function (originalTarget, parentNode, markerName) {
2717      if (markerName === void 0) { markerName = 'data-aria-hidden'; }
2718      var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
2719      var activeParentNode = parentNode || getDefaultParent(originalTarget);
2720      if (!activeParentNode) {
2721          return function () { return null; };
2722      }
2723      // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
2724      targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
2725      return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
2726  };
2727  /**
2728   * Marks everything except given node(or nodes) as inert
2729   * @param {Element | Element[]} originalTarget - elements to keep on the page
2730   * @param [parentNode] - top element, defaults to document.body
2731   * @param {String} [markerName] - a special attribute to mark every node
2732   * @return {Undo} undo command
2733   */
2734  var inertOthers = function (originalTarget, parentNode, markerName) {
2735      if (markerName === void 0) { markerName = 'data-inert-ed'; }
2736      var activeParentNode = parentNode || getDefaultParent(originalTarget);
2737      if (!activeParentNode) {
2738          return function () { return null; };
2739      }
2740      return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');
2741  };
2742  /**
2743   * @returns if current browser supports inert
2744   */
2745  var supportsInert = function () {
2746      return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');
2747  };
2748  /**
2749   * Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way
2750   * @param {Element | Element[]} originalTarget - elements to keep on the page
2751   * @param [parentNode] - top element, defaults to document.body
2752   * @param {String} [markerName] - a special attribute to mark every node
2753   * @return {Undo} undo command
2754   */
2755  var suppressOthers = function (originalTarget, parentNode, markerName) {
2756      if (markerName === void 0) { markerName = 'data-suppressed'; }
2757      return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);
2758  };
2759  
2760  ;// ./node_modules/@radix-ui/react-dialog/dist/index.mjs
2761  
2762  
2763  
2764  
2765  
2766  
2767  
2768  
2769  
2770  
2771  
2772  
2773  
2774  
2775  
2776  
2777  
2778  
2779  
2780  
2781  
2782  
2783  
2784  
2785  
2786  
2787  
2788  
2789  
2790  
2791  
2792  
2793  
2794  /* -------------------------------------------------------------------------------------------------
2795   * Dialog
2796   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog';
2797  const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($5d3850c4d0b4e6c7$var$DIALOG_NAME);
2798  const [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME);
2799  const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{
2800      const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true  } = props;
2801      const triggerRef = (0,external_React_namespaceObject.useRef)(null);
2802      const contentRef = (0,external_React_namespaceObject.useRef)(null);
2803      const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
2804          prop: openProp,
2805          defaultProp: defaultOpen,
2806          onChange: onOpenChange
2807      });
2808      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogProvider, {
2809          scope: __scopeDialog,
2810          triggerRef: triggerRef,
2811          contentRef: contentRef,
2812          contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
2813          titleId: $1746a345f3d73bb7$export$f680877a34711e37(),
2814          descriptionId: $1746a345f3d73bb7$export$f680877a34711e37(),
2815          open: open,
2816          onOpenChange: setOpen,
2817          onOpenToggle: (0,external_React_namespaceObject.useCallback)(()=>setOpen((prevOpen)=>!prevOpen
2818              )
2819          , [
2820              setOpen
2821          ]),
2822          modal: modal
2823      }, children);
2824  };
2825  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$3ddf2d174ce01153, {
2826      displayName: $5d3850c4d0b4e6c7$var$DIALOG_NAME
2827  });
2828  /* -------------------------------------------------------------------------------------------------
2829   * DialogTrigger
2830   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TRIGGER_NAME = 'DialogTrigger';
2831  const $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2832      const { __scopeDialog: __scopeDialog , ...triggerProps } = props;
2833      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TRIGGER_NAME, __scopeDialog);
2834      const composedTriggerRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.triggerRef);
2835      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
2836          type: "button",
2837          "aria-haspopup": "dialog",
2838          "aria-expanded": context.open,
2839          "aria-controls": context.contentId,
2840          "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
2841      }, triggerProps, {
2842          ref: composedTriggerRef,
2843          onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle)
2844      }));
2845  });
2846  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$2e1e1122cf0cba88, {
2847      displayName: $5d3850c4d0b4e6c7$var$TRIGGER_NAME
2848  });
2849  /* -------------------------------------------------------------------------------------------------
2850   * DialogPortal
2851   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$PORTAL_NAME = 'DialogPortal';
2852  const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, {
2853      forceMount: undefined
2854  });
2855  const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{
2856      const { __scopeDialog: __scopeDialog , forceMount: forceMount , children: children , container: container  } = props;
2857      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
2858      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$PortalProvider, {
2859          scope: __scopeDialog,
2860          forceMount: forceMount
2861      }, external_React_namespaceObject.Children.map(children, (child)=>/*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
2862              present: forceMount || context.open
2863          }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($f1701beae083dbae$export$602eac185826482c, {
2864              asChild: true,
2865              container: container
2866          }, child))
2867      ));
2868  };
2869  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$dad7c95542bacce0, {
2870      displayName: $5d3850c4d0b4e6c7$var$PORTAL_NAME
2871  });
2872  /* -------------------------------------------------------------------------------------------------
2873   * DialogOverlay
2874   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay';
2875  const $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2876      const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
2877      const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props;
2878      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
2879      return context.modal ? /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
2880          present: forceMount || context.open
2881      }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogOverlayImpl, _extends({}, overlayProps, {
2882          ref: forwardedRef
2883      }))) : null;
2884  });
2885  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$bd1d06c79be19e17, {
2886      displayName: $5d3850c4d0b4e6c7$var$OVERLAY_NAME
2887  });
2888  const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2889      const { __scopeDialog: __scopeDialog , ...overlayProps } = props;
2890      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog);
2891      return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2892      // ie. when `Overlay` and `Content` are siblings
2893      (0,external_React_namespaceObject.createElement)(Combination, {
2894          as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
2895          allowPinchZoom: true,
2896          shards: [
2897              context.contentRef
2898          ]
2899      }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
2900          "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
2901      }, overlayProps, {
2902          ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
2903          ,
2904          style: {
2905              pointerEvents: 'auto',
2906              ...overlayProps.style
2907          }
2908      }))));
2909  });
2910  /* -------------------------------------------------------------------------------------------------
2911   * DialogContent
2912   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent';
2913  const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2914      const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
2915      const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
2916      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
2917      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
2918          present: forceMount || context.open
2919      }, context.modal ? /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentModal, _extends({}, contentProps, {
2920          ref: forwardedRef
2921      })) : /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentNonModal, _extends({}, contentProps, {
2922          ref: forwardedRef
2923      })));
2924  });
2925  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$b6d9565de1e068cf, {
2926      displayName: $5d3850c4d0b4e6c7$var$CONTENT_NAME
2927  });
2928  /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2929      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
2930      const contentRef = (0,external_React_namespaceObject.useRef)(null);
2931      const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
2932      (0,external_React_namespaceObject.useEffect)(()=>{
2933          const content = contentRef.current;
2934          if (content) return hideOthers(content);
2935      }, []);
2936      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
2937          ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed
2938          ,
2939          trapFocus: context.open,
2940          disableOutsidePointerEvents: true,
2941          onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
2942              var _context$triggerRef$c;
2943              event.preventDefault();
2944              (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
2945          }),
2946          onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{
2947              const originalEvent = event.detail.originalEvent;
2948              const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
2949              const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
2950              // it is effectively as if we right-clicked the `Overlay`.
2951              if (isRightClick) event.preventDefault();
2952          }) // When focus is trapped, a `focusout` event may still happen.
2953          ,
2954          onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
2955          )
2956      }));
2957  });
2958  /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2959      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
2960      const hasInteractedOutsideRef = (0,external_React_namespaceObject.useRef)(false);
2961      const hasPointerDownOutsideRef = (0,external_React_namespaceObject.useRef)(false);
2962      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
2963          ref: forwardedRef,
2964          trapFocus: false,
2965          disableOutsidePointerEvents: false,
2966          onCloseAutoFocus: (event)=>{
2967              var _props$onCloseAutoFoc;
2968              (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);
2969              if (!event.defaultPrevented) {
2970                  var _context$triggerRef$c2;
2971                  if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus
2972                  event.preventDefault();
2973              }
2974              hasInteractedOutsideRef.current = false;
2975              hasPointerDownOutsideRef.current = false;
2976          },
2977          onInteractOutside: (event)=>{
2978              var _props$onInteractOuts, _context$triggerRef$c3;
2979              (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
2980              if (!event.defaultPrevented) {
2981                  hasInteractedOutsideRef.current = true;
2982                  if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;
2983              } // Prevent dismissing when clicking the trigger.
2984              // As the trigger is already setup to close, without doing so would
2985              // cause it to close and immediately open.
2986              const target = event.target;
2987              const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);
2988              if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked
2989              // we will get the pointer down outside event on the trigger, but then a subsequent
2990              // focus outside event on the container, we ignore any focus outside event when we've
2991              // already had a pointer down outside event.
2992              if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();
2993          }
2994      }));
2995  });
2996  /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
2997      const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
2998      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog);
2999      const contentRef = (0,external_React_namespaceObject.useRef)(null);
3000      const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
3001      // the last element in the DOM (beacuse of the `Portal`)
3002      $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
3003      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($d3863c46a17e8a28$export$20e40289641fbbb6, {
3004          asChild: true,
3005          loop: true,
3006          trapped: trapFocus,
3007          onMountAutoFocus: onOpenAutoFocus,
3008          onUnmountAutoFocus: onCloseAutoFocus
3009      }, /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
3010          role: "dialog",
3011          id: context.contentId,
3012          "aria-describedby": context.descriptionId,
3013          "aria-labelledby": context.titleId,
3014          "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
3015      }, contentProps, {
3016          ref: composedRefs,
3017          onDismiss: ()=>context.onOpenChange(false)
3018      }))), false);
3019  });
3020  /* -------------------------------------------------------------------------------------------------
3021   * DialogTitle
3022   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TITLE_NAME = 'DialogTitle';
3023  const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
3024      const { __scopeDialog: __scopeDialog , ...titleProps } = props;
3025      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);
3026      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends({
3027          id: context.titleId
3028      }, titleProps, {
3029          ref: forwardedRef
3030      }));
3031  });
3032  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$16f7638e4a34b909, {
3033      displayName: $5d3850c4d0b4e6c7$var$TITLE_NAME
3034  });
3035  /* -------------------------------------------------------------------------------------------------
3036   * DialogDescription
3037   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME = 'DialogDescription';
3038  const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
3039      const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;
3040      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);
3041      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends({
3042          id: context.descriptionId
3043      }, descriptionProps, {
3044          ref: forwardedRef
3045      }));
3046  });
3047  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$94e94c2ec2c954d5, {
3048      displayName: $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME
3049  });
3050  /* -------------------------------------------------------------------------------------------------
3051   * DialogClose
3052   * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CLOSE_NAME = 'DialogClose';
3053  const $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ (0,external_React_namespaceObject.forwardRef)((props, forwardedRef)=>{
3054      const { __scopeDialog: __scopeDialog , ...closeProps } = props;
3055      const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CLOSE_NAME, __scopeDialog);
3056      return /*#__PURE__*/ (0,external_React_namespaceObject.createElement)($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
3057          type: "button"
3058      }, closeProps, {
3059          ref: forwardedRef,
3060          onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, ()=>context.onOpenChange(false)
3061          )
3062      }));
3063  });
3064  /*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac, {
3065      displayName: $5d3850c4d0b4e6c7$var$CLOSE_NAME
3066  });
3067  /* -----------------------------------------------------------------------------------------------*/ function $5d3850c4d0b4e6c7$var$getState(open) {
3068      return open ? 'open' : 'closed';
3069  }
3070  const $5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME = 'DialogTitleWarning';
3071  const [$5d3850c4d0b4e6c7$export$69b62a49393917d6, $5d3850c4d0b4e6c7$var$useWarningContext] = $c512c27ab02ef895$export$fd42f52fd3ae1109($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME, {
3072      contentName: $5d3850c4d0b4e6c7$var$CONTENT_NAME,
3073      titleName: $5d3850c4d0b4e6c7$var$TITLE_NAME,
3074      docsSlug: 'dialog'
3075  });
3076  const $5d3850c4d0b4e6c7$var$TitleWarning = ({ titleId: titleId  })=>{
3077      const titleWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME);
3078      const MESSAGE = `\`$titleWarningContext.contentName}\` requires a \`$titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
3079  
3080  If you want to hide the \`$titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
3081  
3082  For more information, see https://radix-ui.com/primitives/docs/components/$titleWarningContext.docsSlug}`;
3083      $67UHm$useEffect(()=>{
3084          if (titleId) {
3085              const hasTitle = document.getElementById(titleId);
3086              if (!hasTitle) throw new Error(MESSAGE);
3087          }
3088      }, [
3089          MESSAGE,
3090          titleId
3091      ]);
3092      return null;
3093  };
3094  const $5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';
3095  const $5d3850c4d0b4e6c7$var$DescriptionWarning = ({ contentRef: contentRef , descriptionId: descriptionId  })=>{
3096      const descriptionWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME);
3097      const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {$descriptionWarningContext.contentName}}.`;
3098      $67UHm$useEffect(()=>{
3099          var _contentRef$current;
3100          const describedById = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.getAttribute('aria-describedby'); // if we have an id and the user hasn't set aria-describedby={undefined}
3101          if (descriptionId && describedById) {
3102              const hasDescription = document.getElementById(descriptionId);
3103              if (!hasDescription) console.warn(MESSAGE);
3104          }
3105      }, [
3106          MESSAGE,
3107          contentRef,
3108          descriptionId
3109      ]);
3110      return null;
3111  };
3112  const $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153;
3113  const $5d3850c4d0b4e6c7$export$41fb9f06171c75f4 = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$2e1e1122cf0cba88));
3114  const $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0;
3115  const $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17;
3116  const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf;
3117  const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$16f7638e4a34b909));
3118  const $5d3850c4d0b4e6c7$export$393edc798c47379d = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$94e94c2ec2c954d5));
3119  const $5d3850c4d0b4e6c7$export$f39c2d165cd861fe = (/* unused pure expression or super */ null && ($5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac));
3120  
3121  
3122  
3123  
3124  
3125  ;// ./node_modules/cmdk/dist/index.mjs
3126  var V='[cmdk-group=""]',dist_X='[cmdk-group-items=""]',ge='[cmdk-group-heading=""]',dist_Y='[cmdk-item=""]',le=`$dist_Y}:not([aria-disabled="true"])`,Q="cmdk-item-select",M="data-value",Re=(r,o,n)=>W(r,o,n),ue=external_React_namespaceObject.createContext(void 0),dist_G=()=>external_React_namespaceObject.useContext(ue),de=external_React_namespaceObject.createContext(void 0),Z=()=>external_React_namespaceObject.useContext(de),fe=external_React_namespaceObject.createContext(void 0),me=external_React_namespaceObject.forwardRef((r,o)=>{let n=dist_k(()=>{var e,s;return{search:"",value:(s=(e=r.value)!=null?e:r.defaultValue)!=null?s:"",filtered:{count:0,items:new Map,groups:new Set}}}),u=dist_k(()=>new Set),c=dist_k(()=>new Map),d=dist_k(()=>new Map),f=dist_k(()=>new Set),p=pe(r),{label:v,children:b,value:l,onValueChange:y,filter:S,shouldFilter:C,loop:L,disablePointerSelection:ee=!1,vimBindings:j=!0,...H}=r,te=external_React_namespaceObject.useId(),$=external_React_namespaceObject.useId(),K=external_React_namespaceObject.useId(),x=external_React_namespaceObject.useRef(null),g=Me();T(()=>{if(l!==void 0){let e=l.trim();n.current.value=e,h.emit()}},[l]),T(()=>{g(6,re)},[]);let h=external_React_namespaceObject.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,s,i)=>{var a,m,R;if(!Object.is(n.current[e],s)){if(n.current[e]=s,e==="search")z(),q(),g(1,U);else if(e==="value"&&(i||g(5,re),((a=p.current)==null?void 0:a.value)!==void 0)){let E=s!=null?s:"";(R=(m=p.current).onValueChange)==null||R.call(m,E);return}h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),B=external_React_namespaceObject.useMemo(()=>({value:(e,s,i)=>{var a;s!==((a=d.current.get(e))==null?void 0:a.value)&&(d.current.set(e,{value:s,keywords:i}),n.current.filtered.items.set(e,ne(s,i)),g(2,()=>{q(),h.emit()}))},item:(e,s)=>(u.current.add(e),s&&(c.current.has(s)?c.current.get(s).add(e):c.current.set(s,new Set([e]))),g(3,()=>{z(),q(),n.current.value||U(),h.emit()}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let i=O();g(4,()=>{z(),(i==null?void 0:i.getAttribute("id"))===e&&U(),h.emit()})}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e)}),filter:()=>p.current.shouldFilter,label:v||r["aria-label"],disablePointerSelection:ee,listId:te,inputId:K,labelId:$,listInnerRef:x}),[]);function ne(e,s){var a,m;let i=(m=(a=p.current)==null?void 0:a.filter)!=null?m:Re;return e?i(e,n.current.search,s):0}function q(){if(!n.current.search||p.current.shouldFilter===!1)return;let e=n.current.filtered.items,s=[];n.current.filtered.groups.forEach(a=>{let m=c.current.get(a),R=0;m.forEach(E=>{let P=e.get(E);R=Math.max(P,R)}),s.push([a,R])});let i=x.current;A().sort((a,m)=>{var P,_;let R=a.getAttribute("id"),E=m.getAttribute("id");return((P=e.get(E))!=null?P:0)-((_=e.get(R))!=null?_:0)}).forEach(a=>{let m=a.closest(dist_X);m?m.appendChild(a.parentElement===m?a:a.closest(`$dist_X} > *`)):i.appendChild(a.parentElement===i?a:a.closest(`$dist_X} > *`))}),s.sort((a,m)=>m[1]-a[1]).forEach(a=>{let m=x.current.querySelector(`$V}[$M}="$encodeURIComponent(a[0])}"]`);m==null||m.parentElement.appendChild(m)})}function U(){let e=A().find(i=>i.getAttribute("aria-disabled")!=="true"),s=e==null?void 0:e.getAttribute(M);h.setState("value",s||void 0)}function z(){var s,i,a,m;if(!n.current.search||p.current.shouldFilter===!1){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let R of u.current){let E=(i=(s=d.current.get(R))==null?void 0:s.value)!=null?i:"",P=(m=(a=d.current.get(R))==null?void 0:a.keywords)!=null?m:[],_=ne(E,P);n.current.filtered.items.set(R,_),_>0&&e++}for(let[R,E]of c.current)for(let P of E)if(n.current.filtered.items.get(P)>0){n.current.filtered.groups.add(R);break}n.current.filtered.count=e}function re(){var s,i,a;let e=O();e&&(((s=e.parentElement)==null?void 0:s.firstChild)===e&&((a=(i=e.closest(V))==null?void 0:i.querySelector(ge))==null||a.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function O(){var e;return(e=x.current)==null?void 0:e.querySelector(`$dist_Y}[aria-selected="true"]`)}function A(){var e;return Array.from((e=x.current)==null?void 0:e.querySelectorAll(le))}function W(e){let i=A()[e];i&&h.setState("value",i.getAttribute(M))}function J(e){var R;let s=O(),i=A(),a=i.findIndex(E=>E===s),m=i[a+e];(R=p.current)!=null&&R.loop&&(m=a+e<0?i[i.length-1]:a+e===i.length?i[0]:i[a+e]),m&&h.setState("value",m.getAttribute(M))}function oe(e){let s=O(),i=s==null?void 0:s.closest(V),a;for(;i&&!a;)i=e>0?we(i,V):Ie(i,V),a=i==null?void 0:i.querySelector(le);a?h.setState("value",a.getAttribute(M)):J(e)}let ie=()=>W(A().length-1),ae=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?oe(1):J(1)},se=e=>{e.preventDefault(),e.metaKey?W(0):e.altKey?oe(-1):J(-1)};return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,tabIndex:-1,...H,"cmdk-root":"",onKeyDown:e=>{var s;if((s=H.onKeyDown)==null||s.call(H,e),!e.defaultPrevented)switch(e.key){case"n":case"j":{j&&e.ctrlKey&&ae(e);break}case"ArrowDown":{ae(e);break}case"p":case"k":{j&&e.ctrlKey&&se(e);break}case"ArrowUp":{se(e);break}case"Home":{e.preventDefault(),W(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":if(!e.nativeEvent.isComposing&&e.keyCode!==229){e.preventDefault();let i=O();if(i){let a=new Event(Q);i.dispatchEvent(a)}}}}},external_React_namespaceObject.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:De},v),F(r,e=>external_React_namespaceObject.createElement(de.Provider,{value:h},external_React_namespaceObject.createElement(ue.Provider,{value:B},e))))}),be=external_React_namespaceObject.forwardRef((r,o)=>{var K,x;let n=external_React_namespaceObject.useId(),u=external_React_namespaceObject.useRef(null),c=external_React_namespaceObject.useContext(fe),d=dist_G(),f=pe(r),p=(x=(K=f.current)==null?void 0:K.forceMount)!=null?x:c==null?void 0:c.forceMount;T(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let v=ve(n,u,[r.value,r.children,u],r.keywords),b=Z(),l=dist_D(g=>g.value&&g.value===v.current),y=dist_D(g=>p||d.filter()===!1?!0:g.search?g.filtered.items.get(n)>0:!0);external_React_namespaceObject.useEffect(()=>{let g=u.current;if(!(!g||r.disabled))return g.addEventListener(Q,S),()=>g.removeEventListener(Q,S)},[y,r.onSelect,r.disabled]);function S(){var g,h;C(),(h=(g=f.current).onSelect)==null||h.call(g,v.current)}function C(){b.setState("value",v.current,!0)}if(!y)return null;let{disabled:L,value:ee,onSelect:j,forceMount:H,keywords:te,...$}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([u,o]),...$,id:n,"cmdk-item":"",role:"option","aria-disabled":!!L,"aria-selected":!!l,"data-disabled":!!L,"data-selected":!!l,onPointerMove:L||d.disablePointerSelection?void 0:C,onClick:L?void 0:S},r.children)}),he=external_React_namespaceObject.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=external_React_namespaceObject.useId(),p=external_React_namespaceObject.useRef(null),v=external_React_namespaceObject.useRef(null),b=external_React_namespaceObject.useId(),l=dist_G(),y=dist_D(C=>c||l.filter()===!1?!0:C.search?C.filtered.groups.has(f):!0);T(()=>l.group(f),[]),ve(f,p,[r.value,r.heading,v]);let S=external_React_namespaceObject.useMemo(()=>({id:f,forceMount:c}),[c]);return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([p,o]),...d,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},n&&external_React_namespaceObject.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:b},n),F(r,C=>external_React_namespaceObject.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?b:void 0},external_React_namespaceObject.createElement(fe.Provider,{value:S},C))))}),ye=external_React_namespaceObject.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=external_React_namespaceObject.useRef(null),d=dist_D(f=>!f.search);return!n&&!d?null:external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([c,o]),...u,"cmdk-separator":"",role:"separator"})}),Ee=external_React_namespaceObject.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=Z(),f=dist_D(l=>l.search),p=dist_D(l=>l.value),v=dist_G(),b=external_React_namespaceObject.useMemo(()=>{var y;let l=(y=v.listInnerRef.current)==null?void 0:y.querySelector(`$dist_Y}[$M}="$encodeURIComponent(p)}"]`);return l==null?void 0:l.getAttribute("id")},[]);return external_React_namespaceObject.useEffect(()=>{r.value!=null&&d.setState("search",r.value)},[r.value]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":b,id:v.inputId,type:"text",value:c?r.value:f,onChange:l=>{c||d.setState("search",l.target.value),n==null||n(l.target.value)}})}),Se=external_React_namespaceObject.forwardRef((r,o)=>{let{children:n,label:u="Suggestions",...c}=r,d=external_React_namespaceObject.useRef(null),f=external_React_namespaceObject.useRef(null),p=dist_G();return external_React_namespaceObject.useEffect(()=>{if(f.current&&d.current){let v=f.current,b=d.current,l,y=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let S=v.offsetHeight;b.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(v),()=>{cancelAnimationFrame(l),y.unobserve(v)}}},[]),external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:N([d,o]),...c,"cmdk-list":"",role:"listbox","aria-label":u,id:p.listId},F(r,v=>external_React_namespaceObject.createElement("div",{ref:N([f,p.listInnerRef]),"cmdk-list-sizer":""},v)))}),Ce=external_React_namespaceObject.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9,{open:n,onOpenChange:u},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$602eac185826482c,{container:f},external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff,{"cmdk-overlay":"",className:c}),external_React_namespaceObject.createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2,{"aria-label":r.label,"cmdk-dialog":"",className:d},external_React_namespaceObject.createElement(me,{ref:o,...p}))))}),xe=external_React_namespaceObject.forwardRef((r,o)=>dist_D(u=>u.filtered.count===0)?external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Pe=external_React_namespaceObject.forwardRef((r,o)=>{let{progress:n,children:u,label:c="Loading...",...d}=r;return external_React_namespaceObject.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},F(r,f=>external_React_namespaceObject.createElement("div",{"aria-hidden":!0},f)))}),He=Object.assign(me,{List:Se,Item:be,Input:Ee,Group:he,Separator:ye,Dialog:Ce,Empty:xe,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling}}function Ie(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling}}function pe(r){let o=external_React_namespaceObject.useRef(r);return T(()=>{o.current=r}),o}var T=typeof window=="undefined"?external_React_namespaceObject.useEffect:external_React_namespaceObject.useLayoutEffect;function dist_k(r){let o=external_React_namespaceObject.useRef();return o.current===void 0&&(o.current=r()),o}function N(r){return o=>{r.forEach(n=>{typeof n=="function"?n(o):n!=null&&(n.current=o)})}}function dist_D(r){let o=Z(),n=()=>r(o.snapshot());return external_React_namespaceObject.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=external_React_namespaceObject.useRef(),d=dist_G();return T(()=>{var v;let f=(()=>{var b;for(let l of n){if(typeof l=="string")return l.trim();if(typeof l=="object"&&"current"in l)return l.current?(b=l.current.textContent)==null?void 0:b.trim():c.current}})(),p=u.map(b=>b.trim());d.value(r,f,p),(v=o.current)==null||v.setAttribute(M,f),c.current=f}),c}var Me=()=>{let[r,o]=external_React_namespaceObject.useState(),n=dist_k(()=>new Map);return T(()=>{n.current.forEach(u=>u()),n.current=new Map},[r]),(u,c)=>{n.current.set(u,c),o({})}};function Te(r){let o=r.type;return typeof o=="function"?o(r.props):"render"in o?o.render(r.props):r}function F({asChild:r,children:o},n){return r&&external_React_namespaceObject.isValidElement(o)?external_React_namespaceObject.cloneElement(Te(o),{ref:o.ref},n(o.props.children)):n(o)}var De={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};
3127  
3128  ;// ./node_modules/clsx/dist/clsx.mjs
3129  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
3130  ;// external ["wp","data"]
3131  const external_wp_data_namespaceObject = window["wp"]["data"];
3132  ;// external ["wp","element"]
3133  const external_wp_element_namespaceObject = window["wp"]["element"];
3134  ;// external ["wp","i18n"]
3135  const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
3136  ;// external ["wp","components"]
3137  const external_wp_components_namespaceObject = window["wp"]["components"];
3138  ;// external ["wp","keyboardShortcuts"]
3139  const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
3140  ;// ./node_modules/@wordpress/icons/build-module/icon/index.js
3141  
3142  var icon_default = (0,external_wp_element_namespaceObject.forwardRef)(
3143    ({ icon, size = 24, ...props }, ref) => {
3144      return (0,external_wp_element_namespaceObject.cloneElement)(icon, {
3145        width: size,
3146        height: size,
3147        ...props,
3148        ref
3149      });
3150    }
3151  );
3152  
3153  
3154  ;// external ["wp","primitives"]
3155  const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
3156  ;// ./node_modules/@wordpress/icons/build-module/library/search.js
3157  
3158  
3159  var search_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.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" }) });
3160  
3161  
3162  ;// ./node_modules/@wordpress/commands/build-module/store/reducer.js
3163  
3164  function commands(state = {}, action) {
3165    switch (action.type) {
3166      case "REGISTER_COMMAND":
3167        return {
3168          ...state,
3169          [action.name]: {
3170            name: action.name,
3171            label: action.label,
3172            searchLabel: action.searchLabel,
3173            context: action.context,
3174            callback: action.callback,
3175            icon: action.icon,
3176            keywords: action.keywords
3177          }
3178        };
3179      case "UNREGISTER_COMMAND": {
3180        const { [action.name]: _, ...remainingState } = state;
3181        return remainingState;
3182      }
3183    }
3184    return state;
3185  }
3186  function commandLoaders(state = {}, action) {
3187    switch (action.type) {
3188      case "REGISTER_COMMAND_LOADER":
3189        return {
3190          ...state,
3191          [action.name]: {
3192            name: action.name,
3193            context: action.context,
3194            hook: action.hook
3195          }
3196        };
3197      case "UNREGISTER_COMMAND_LOADER": {
3198        const { [action.name]: _, ...remainingState } = state;
3199        return remainingState;
3200      }
3201    }
3202    return state;
3203  }
3204  function isOpen(state = false, action) {
3205    switch (action.type) {
3206      case "OPEN":
3207        return true;
3208      case "CLOSE":
3209        return false;
3210    }
3211    return state;
3212  }
3213  function context(state = "root", action) {
3214    switch (action.type) {
3215      case "SET_CONTEXT":
3216        return action.context;
3217    }
3218    return state;
3219  }
3220  const reducer = (0,external_wp_data_namespaceObject.combineReducers)({
3221    commands,
3222    commandLoaders,
3223    isOpen,
3224    context
3225  });
3226  var reducer_default = reducer;
3227  
3228  
3229  ;// ./node_modules/@wordpress/commands/build-module/store/actions.js
3230  function registerCommand(config) {
3231    return {
3232      type: "REGISTER_COMMAND",
3233      ...config
3234    };
3235  }
3236  function unregisterCommand(name) {
3237    return {
3238      type: "UNREGISTER_COMMAND",
3239      name
3240    };
3241  }
3242  function registerCommandLoader(config) {
3243    return {
3244      type: "REGISTER_COMMAND_LOADER",
3245      ...config
3246    };
3247  }
3248  function unregisterCommandLoader(name) {
3249    return {
3250      type: "UNREGISTER_COMMAND_LOADER",
3251      name
3252    };
3253  }
3254  function actions_open() {
3255    return {
3256      type: "OPEN"
3257    };
3258  }
3259  function actions_close() {
3260    return {
3261      type: "CLOSE"
3262    };
3263  }
3264  
3265  
3266  ;// ./node_modules/@wordpress/commands/build-module/store/selectors.js
3267  
3268  const getCommands = (0,external_wp_data_namespaceObject.createSelector)(
3269    (state, contextual = false) => Object.values(state.commands).filter((command) => {
3270      const isContextual = command.context && command.context === state.context;
3271      return contextual ? isContextual : !isContextual;
3272    }),
3273    (state) => [state.commands, state.context]
3274  );
3275  const getCommandLoaders = (0,external_wp_data_namespaceObject.createSelector)(
3276    (state, contextual = false) => Object.values(state.commandLoaders).filter((loader) => {
3277      const isContextual = loader.context && loader.context === state.context;
3278      return contextual ? isContextual : !isContextual;
3279    }),
3280    (state) => [state.commandLoaders, state.context]
3281  );
3282  function selectors_isOpen(state) {
3283    return state.isOpen;
3284  }
3285  function getContext(state) {
3286    return state.context;
3287  }
3288  
3289  
3290  ;// ./node_modules/@wordpress/commands/build-module/store/private-actions.js
3291  function setContext(context) {
3292    return {
3293      type: "SET_CONTEXT",
3294      context
3295    };
3296  }
3297  
3298  
3299  ;// external ["wp","privateApis"]
3300  const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
3301  ;// ./node_modules/@wordpress/commands/build-module/lock-unlock.js
3302  
3303  const { lock, unlock } = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
3304    "I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
3305    "@wordpress/commands"
3306  );
3307  
3308  
3309  ;// ./node_modules/@wordpress/commands/build-module/store/index.js
3310  
3311  
3312  
3313  
3314  
3315  
3316  const STORE_NAME = "core/commands";
3317  const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
3318    reducer: reducer_default,
3319    actions: actions_namespaceObject,
3320    selectors: selectors_namespaceObject
3321  });
3322  (0,external_wp_data_namespaceObject.register)(store);
3323  unlock(store).registerPrivateActions(private_actions_namespaceObject);
3324  
3325  
3326  ;// ./node_modules/@wordpress/commands/build-module/components/command-menu.js
3327  
3328  
3329  
3330  
3331  
3332  
3333  
3334  
3335  
3336  
3337  const inputLabel = (0,external_wp_i18n_namespaceObject.__)("Search commands and settings");
3338  function CommandMenuLoader({ name, search, hook, setLoader, close }) {
3339    const { isLoading, commands = [] } = hook({ search }) ?? {};
3340    (0,external_wp_element_namespaceObject.useEffect)(() => {
3341      setLoader(name, isLoading);
3342    }, [setLoader, name, isLoading]);
3343    if (!commands.length) {
3344      return null;
3345    }
3346    return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: commands.map((command) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3347      He.Item,
3348      {
3349        value: command.searchLabel ?? command.label,
3350        keywords: command.keywords,
3351        onSelect: () => command.callback({ close }),
3352        id: command.name,
3353        children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
3354          external_wp_components_namespaceObject.__experimentalHStack,
3355          {
3356            alignment: "left",
3357            className: dist_clsx("commands-command-menu__item", {
3358              "has-icon": command.icon
3359            }),
3360            children: [
3361              command.icon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icon_default, { icon: command.icon }),
3362              /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3363                external_wp_components_namespaceObject.TextHighlight,
3364                {
3365                  text: command.label,
3366                  highlight: search
3367                }
3368              ) })
3369            ]
3370          }
3371        )
3372      },
3373      command.name
3374    )) });
3375  }
3376  function CommandMenuLoaderWrapper({ hook, search, setLoader, close }) {
3377    const currentLoaderRef = (0,external_wp_element_namespaceObject.useRef)(hook);
3378    const [key, setKey] = (0,external_wp_element_namespaceObject.useState)(0);
3379    (0,external_wp_element_namespaceObject.useEffect)(() => {
3380      if (currentLoaderRef.current !== hook) {
3381        currentLoaderRef.current = hook;
3382        setKey((prevKey) => prevKey + 1);
3383      }
3384    }, [hook]);
3385    return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3386      CommandMenuLoader,
3387      {
3388        hook: currentLoaderRef.current,
3389        search,
3390        setLoader,
3391        close
3392      },
3393      key
3394    );
3395  }
3396  function CommandMenuGroup({ isContextual, search, setLoader, close }) {
3397    const { commands, loaders } = (0,external_wp_data_namespaceObject.useSelect)(
3398      (select) => {
3399        const { getCommands, getCommandLoaders } = select(store);
3400        return {
3401          commands: getCommands(isContextual),
3402          loaders: getCommandLoaders(isContextual)
3403        };
3404      },
3405      [isContextual]
3406    );
3407    if (!commands.length && !loaders.length) {
3408      return null;
3409    }
3410    return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.Group, { children: [
3411      commands.map((command) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3412        He.Item,
3413        {
3414          value: command.searchLabel ?? command.label,
3415          keywords: command.keywords,
3416          onSelect: () => command.callback({ close }),
3417          id: command.name,
3418          children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
3419            external_wp_components_namespaceObject.__experimentalHStack,
3420            {
3421              alignment: "left",
3422              className: dist_clsx("commands-command-menu__item", {
3423                "has-icon": command.icon
3424              }),
3425              children: [
3426                command.icon && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(icon_default, { icon: command.icon }),
3427                /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3428                  external_wp_components_namespaceObject.TextHighlight,
3429                  {
3430                    text: command.label,
3431                    highlight: search
3432                  }
3433                ) })
3434              ]
3435            }
3436          )
3437        },
3438        command.name
3439      )),
3440      loaders.map((loader) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3441        CommandMenuLoaderWrapper,
3442        {
3443          hook: loader.hook,
3444          search,
3445          setLoader,
3446          close
3447        },
3448        loader.name
3449      ))
3450    ] });
3451  }
3452  function CommandInput({ isOpen, search, setSearch }) {
3453    const commandMenuInput = (0,external_wp_element_namespaceObject.useRef)();
3454    const _value = dist_D((state) => state.value);
3455    const selectedItemId = (0,external_wp_element_namespaceObject.useMemo)(() => {
3456      const item = document.querySelector(
3457        `[cmdk-item=""][data-value="$_value}"]`
3458      );
3459      return item?.getAttribute("id");
3460    }, [_value]);
3461    (0,external_wp_element_namespaceObject.useEffect)(() => {
3462      if (isOpen) {
3463        commandMenuInput.current.focus();
3464      }
3465    }, [isOpen]);
3466    return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3467      He.Input,
3468      {
3469        ref: commandMenuInput,
3470        value: search,
3471        onValueChange: setSearch,
3472        placeholder: inputLabel,
3473        "aria-activedescendant": selectedItemId,
3474        icon: search
3475      }
3476    );
3477  }
3478  function CommandMenu() {
3479    const { registerShortcut } = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
3480    const [search, setSearch] = (0,external_wp_element_namespaceObject.useState)("");
3481    const isOpen = (0,external_wp_data_namespaceObject.useSelect)(
3482      (select) => select(store).isOpen(),
3483      []
3484    );
3485    const { open, close } = (0,external_wp_data_namespaceObject.useDispatch)(store);
3486    const [loaders, setLoaders] = (0,external_wp_element_namespaceObject.useState)({});
3487    (0,external_wp_element_namespaceObject.useEffect)(() => {
3488      registerShortcut({
3489        name: "core/commands",
3490        category: "global",
3491        description: (0,external_wp_i18n_namespaceObject.__)("Open the command palette."),
3492        keyCombination: {
3493          modifier: "primary",
3494          character: "k"
3495        }
3496      });
3497    }, [registerShortcut]);
3498    (0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)(
3499      "core/commands",
3500      /** @type {import('react').KeyboardEventHandler} */
3501      (event) => {
3502        if (event.defaultPrevented) {
3503          return;
3504        }
3505        event.preventDefault();
3506        if (isOpen) {
3507          close();
3508        } else {
3509          open();
3510        }
3511      },
3512      {
3513        bindGlobal: true
3514      }
3515    );
3516    const setLoader = (0,external_wp_element_namespaceObject.useCallback)(
3517      (name, value) => setLoaders((current) => ({
3518        ...current,
3519        [name]: value
3520      })),
3521      []
3522    );
3523    const closeAndReset = () => {
3524      setSearch("");
3525      close();
3526    };
3527    if (!isOpen) {
3528      return false;
3529    }
3530    const onKeyDown = (event) => {
3531      if (
3532        // Ignore keydowns from IMEs
3533        event.nativeEvent.isComposing || // Workaround for Mac Safari where the final Enter/Backspace of an IME composition
3534        // is `isComposing=false`, even though it's technically still part of the composition.
3535        // These can only be detected by keyCode.
3536        event.keyCode === 229
3537      ) {
3538        event.preventDefault();
3539      }
3540    };
3541    const isLoading = Object.values(loaders).some(Boolean);
3542    return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3543      external_wp_components_namespaceObject.Modal,
3544      {
3545        className: "commands-command-menu",
3546        overlayClassName: "commands-command-menu__overlay",
3547        onRequestClose: closeAndReset,
3548        __experimentalHideHeader: true,
3549        contentLabel: (0,external_wp_i18n_namespaceObject.__)("Command palette"),
3550        children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { className: "commands-command-menu__container", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(He, { label: inputLabel, onKeyDown, children: [
3551          /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "commands-command-menu__header", children: [
3552            /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3553              icon_default,
3554              {
3555                className: "commands-command-menu__header-search-icon",
3556                icon: search_default
3557              }
3558            ),
3559            /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3560              CommandInput,
3561              {
3562                search,
3563                setSearch,
3564                isOpen
3565              }
3566            )
3567          ] }),
3568          /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(He.List, { label: (0,external_wp_i18n_namespaceObject.__)("Command suggestions"), children: [
3569            search && !isLoading && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(He.Empty, { children: (0,external_wp_i18n_namespaceObject.__)("No results found.") }),
3570            /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3571              CommandMenuGroup,
3572              {
3573                search,
3574                setLoader,
3575                close: closeAndReset,
3576                isContextual: true
3577              }
3578            ),
3579            search && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
3580              CommandMenuGroup,
3581              {
3582                search,
3583                setLoader,
3584                close: closeAndReset
3585              }
3586            )
3587          ] })
3588        ] }) })
3589      }
3590    );
3591  }
3592  
3593  
3594  ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-context.js
3595  
3596  
3597  
3598  
3599  function useCommandContext(context) {
3600    const { getContext } = (0,external_wp_data_namespaceObject.useSelect)(store);
3601    const initialContext = (0,external_wp_element_namespaceObject.useRef)(getContext());
3602    const { setContext } = unlock((0,external_wp_data_namespaceObject.useDispatch)(store));
3603    (0,external_wp_element_namespaceObject.useEffect)(() => {
3604      setContext(context);
3605    }, [context, setContext]);
3606    (0,external_wp_element_namespaceObject.useEffect)(() => {
3607      const initialContextRef = initialContext.current;
3608      return () => setContext(initialContextRef);
3609    }, [setContext]);
3610  }
3611  
3612  
3613  ;// ./node_modules/@wordpress/commands/build-module/private-apis.js
3614  
3615  
3616  const privateApis = {};
3617  lock(privateApis, {
3618    useCommandContext: useCommandContext
3619  });
3620  
3621  
3622  ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command.js
3623  
3624  
3625  
3626  function useCommand(command) {
3627    const { registerCommand, unregisterCommand } = (0,external_wp_data_namespaceObject.useDispatch)(store);
3628    const currentCallbackRef = (0,external_wp_element_namespaceObject.useRef)(command.callback);
3629    (0,external_wp_element_namespaceObject.useEffect)(() => {
3630      currentCallbackRef.current = command.callback;
3631    }, [command.callback]);
3632    (0,external_wp_element_namespaceObject.useEffect)(() => {
3633      if (command.disabled) {
3634        return;
3635      }
3636      registerCommand({
3637        name: command.name,
3638        context: command.context,
3639        label: command.label,
3640        searchLabel: command.searchLabel,
3641        icon: command.icon,
3642        keywords: command.keywords,
3643        callback: (...args) => currentCallbackRef.current(...args)
3644      });
3645      return () => {
3646        unregisterCommand(command.name);
3647      };
3648    }, [
3649      command.name,
3650      command.label,
3651      command.searchLabel,
3652      command.icon,
3653      command.context,
3654      command.keywords,
3655      command.disabled,
3656      registerCommand,
3657      unregisterCommand
3658    ]);
3659  }
3660  function useCommands(commands) {
3661    const { registerCommand, unregisterCommand } = (0,external_wp_data_namespaceObject.useDispatch)(store);
3662    const currentCallbacksRef = (0,external_wp_element_namespaceObject.useRef)({});
3663    (0,external_wp_element_namespaceObject.useEffect)(() => {
3664      if (!commands) {
3665        return;
3666      }
3667      commands.forEach((command) => {
3668        if (command.callback) {
3669          currentCallbacksRef.current[command.name] = command.callback;
3670        }
3671      });
3672    }, [commands]);
3673    (0,external_wp_element_namespaceObject.useEffect)(() => {
3674      if (!commands) {
3675        return;
3676      }
3677      commands.forEach((command) => {
3678        if (command.disabled) {
3679          return;
3680        }
3681        registerCommand({
3682          name: command.name,
3683          context: command.context,
3684          label: command.label,
3685          searchLabel: command.searchLabel,
3686          icon: command.icon,
3687          keywords: command.keywords,
3688          callback: (...args) => {
3689            const callback = currentCallbacksRef.current[command.name];
3690            if (callback) {
3691              callback(...args);
3692            }
3693          }
3694        });
3695      });
3696      return () => {
3697        commands.forEach((command) => {
3698          unregisterCommand(command.name);
3699        });
3700      };
3701    }, [commands, registerCommand, unregisterCommand]);
3702  }
3703  
3704  
3705  ;// ./node_modules/@wordpress/commands/build-module/hooks/use-command-loader.js
3706  
3707  
3708  
3709  function useCommandLoader(loader) {
3710    const { registerCommandLoader, unregisterCommandLoader } = (0,external_wp_data_namespaceObject.useDispatch)(store);
3711    (0,external_wp_element_namespaceObject.useEffect)(() => {
3712      if (loader.disabled) {
3713        return;
3714      }
3715      registerCommandLoader({
3716        name: loader.name,
3717        hook: loader.hook,
3718        context: loader.context
3719      });
3720      return () => {
3721        unregisterCommandLoader(loader.name);
3722      };
3723    }, [
3724      loader.name,
3725      loader.hook,
3726      loader.context,
3727      loader.disabled,
3728      registerCommandLoader,
3729      unregisterCommandLoader
3730    ]);
3731  }
3732  
3733  
3734  ;// ./node_modules/@wordpress/commands/build-module/index.js
3735  
3736  
3737  
3738  
3739  
3740  
3741  
3742  (window.wp = window.wp || {}).commands = __webpack_exports__;
3743  /******/ })()
3744  ;


Generated : Wed Oct 29 08:20:06 2025 Cross-referenced by PHPXref