[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

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


Generated : Sat Apr 27 08:20:02 2024 Cross-referenced by PHPXref