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


Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref