[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/js/dist/ -> block-editor.js (source)

   1  this["wp"] = this["wp"] || {}; this["wp"]["blockEditor"] =
   2  /******/ (function(modules) { // webpackBootstrap
   3  /******/     // The module cache
   4  /******/     var installedModules = {};
   5  /******/
   6  /******/     // The require function
   7  /******/ 	function __webpack_require__(moduleId) {
   8  /******/
   9  /******/         // Check if module is in cache
  10  /******/         if(installedModules[moduleId]) {
  11  /******/             return installedModules[moduleId].exports;
  12  /******/         }
  13  /******/         // Create a new module (and put it into the cache)
  14  /******/         var module = installedModules[moduleId] = {
  15  /******/             i: moduleId,
  16  /******/             l: false,
  17  /******/             exports: {}
  18  /******/         };
  19  /******/
  20  /******/         // Execute the module function
  21  /******/         modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22  /******/
  23  /******/         // Flag the module as loaded
  24  /******/         module.l = true;
  25  /******/
  26  /******/         // Return the exports of the module
  27  /******/         return module.exports;
  28  /******/     }
  29  /******/
  30  /******/
  31  /******/     // expose the modules object (__webpack_modules__)
  32  /******/     __webpack_require__.m = modules;
  33  /******/
  34  /******/     // expose the module cache
  35  /******/     __webpack_require__.c = installedModules;
  36  /******/
  37  /******/     // define getter function for harmony exports
  38  /******/     __webpack_require__.d = function(exports, name, getter) {
  39  /******/         if(!__webpack_require__.o(exports, name)) {
  40  /******/             Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41  /******/         }
  42  /******/     };
  43  /******/
  44  /******/     // define __esModule on exports
  45  /******/     __webpack_require__.r = function(exports) {
  46  /******/         if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47  /******/             Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48  /******/         }
  49  /******/         Object.defineProperty(exports, '__esModule', { value: true });
  50  /******/     };
  51  /******/
  52  /******/     // create a fake namespace object
  53  /******/     // mode & 1: value is a module id, require it
  54  /******/     // mode & 2: merge all properties of value into the ns
  55  /******/     // mode & 4: return value when already ns object
  56  /******/     // mode & 8|1: behave like require
  57  /******/     __webpack_require__.t = function(value, mode) {
  58  /******/         if(mode & 1) value = __webpack_require__(value);
  59  /******/         if(mode & 8) return value;
  60  /******/         if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61  /******/         var ns = Object.create(null);
  62  /******/         __webpack_require__.r(ns);
  63  /******/         Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64  /******/         if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65  /******/         return ns;
  66  /******/     };
  67  /******/
  68  /******/     // getDefaultExport function for compatibility with non-harmony modules
  69  /******/     __webpack_require__.n = function(module) {
  70  /******/         var getter = module && module.__esModule ?
  71  /******/ 			function getDefault() { return module['default']; } :
  72  /******/ 			function getModuleExports() { return module; };
  73  /******/         __webpack_require__.d(getter, 'a', getter);
  74  /******/         return getter;
  75  /******/     };
  76  /******/
  77  /******/     // Object.prototype.hasOwnProperty.call
  78  /******/     __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79  /******/
  80  /******/     // __webpack_public_path__
  81  /******/     __webpack_require__.p = "";
  82  /******/
  83  /******/
  84  /******/     // Load entry module and return exports
  85  /******/     return __webpack_require__(__webpack_require__.s = 438);
  86  /******/ })
  87  /************************************************************************/
  88  /******/ ([
  89  /* 0 */
  90  /***/ (function(module, exports) {
  91  
  92  (function() { module.exports = this["wp"]["element"]; }());
  93  
  94  /***/ }),
  95  /* 1 */
  96  /***/ (function(module, exports) {
  97  
  98  (function() { module.exports = this["wp"]["i18n"]; }());
  99  
 100  /***/ }),
 101  /* 2 */
 102  /***/ (function(module, exports) {
 103  
 104  (function() { module.exports = this["lodash"]; }());
 105  
 106  /***/ }),
 107  /* 3 */
 108  /***/ (function(module, exports) {
 109  
 110  (function() { module.exports = this["wp"]["components"]; }());
 111  
 112  /***/ }),
 113  /* 4 */
 114  /***/ (function(module, exports) {
 115  
 116  (function() { module.exports = this["wp"]["data"]; }());
 117  
 118  /***/ }),
 119  /* 5 */
 120  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 121  
 122  "use strict";
 123  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
 124  function _defineProperty(obj, key, value) {
 125    if (key in obj) {
 126      Object.defineProperty(obj, key, {
 127        value: value,
 128        enumerable: true,
 129        configurable: true,
 130        writable: true
 131      });
 132    } else {
 133      obj[key] = value;
 134    }
 135  
 136    return obj;
 137  }
 138  
 139  /***/ }),
 140  /* 6 */
 141  /***/ (function(module, exports) {
 142  
 143  (function() { module.exports = this["wp"]["primitives"]; }());
 144  
 145  /***/ }),
 146  /* 7 */,
 147  /* 8 */
 148  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 149  
 150  "use strict";
 151  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
 152  function _extends() {
 153    _extends = Object.assign || function (target) {
 154      for (var i = 1; i < arguments.length; i++) {
 155        var source = arguments[i];
 156  
 157        for (var key in source) {
 158          if (Object.prototype.hasOwnProperty.call(source, key)) {
 159            target[key] = source[key];
 160          }
 161        }
 162      }
 163  
 164      return target;
 165    };
 166  
 167    return _extends.apply(this, arguments);
 168  }
 169  
 170  /***/ }),
 171  /* 9 */
 172  /***/ (function(module, exports) {
 173  
 174  (function() { module.exports = this["wp"]["compose"]; }());
 175  
 176  /***/ }),
 177  /* 10 */
 178  /***/ (function(module, exports) {
 179  
 180  (function() { module.exports = this["wp"]["blocks"]; }());
 181  
 182  /***/ }),
 183  /* 11 */
 184  /***/ (function(module, exports, __webpack_require__) {
 185  
 186  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
 187    Copyright (c) 2017 Jed Watson.
 188    Licensed under the MIT License (MIT), see
 189    http://jedwatson.github.io/classnames
 190  */
 191  /* global define */
 192  
 193  (function () {
 194      'use strict';
 195  
 196      var hasOwn = {}.hasOwnProperty;
 197  
 198  	function classNames () {
 199          var classes = [];
 200  
 201          for (var i = 0; i < arguments.length; i++) {
 202              var arg = arguments[i];
 203              if (!arg) continue;
 204  
 205              var argType = typeof arg;
 206  
 207              if (argType === 'string' || argType === 'number') {
 208                  classes.push(arg);
 209              } else if (Array.isArray(arg) && arg.length) {
 210                  var inner = classNames.apply(null, arg);
 211                  if (inner) {
 212                      classes.push(inner);
 213                  }
 214              } else if (argType === 'object') {
 215                  for (var key in arg) {
 216                      if (hasOwn.call(arg, key) && arg[key]) {
 217                          classes.push(key);
 218                      }
 219                  }
 220              }
 221          }
 222  
 223          return classes.join(' ');
 224      }
 225  
 226      if ( true && module.exports) {
 227          classNames.default = classNames;
 228          module.exports = classNames;
 229      } else if (true) {
 230          // register as 'classnames', consistent with npm package name
 231          !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
 232              return classNames;
 233          }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
 234                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
 235      } else {}
 236  }());
 237  
 238  
 239  /***/ }),
 240  /* 12 */
 241  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 242  
 243  "use strict";
 244  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
 245  function _assertThisInitialized(self) {
 246    if (self === void 0) {
 247      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
 248    }
 249  
 250    return self;
 251  }
 252  
 253  /***/ }),
 254  /* 13 */
 255  /***/ (function(module, exports) {
 256  
 257  (function() { module.exports = this["React"]; }());
 258  
 259  /***/ }),
 260  /* 14 */
 261  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 262  
 263  "use strict";
 264  
 265  // EXPORTS
 266  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
 267  
 268  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
 269  var arrayWithHoles = __webpack_require__(38);
 270  
 271  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
 272  function _iterableToArrayLimit(arr, i) {
 273    if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
 274    var _arr = [];
 275    var _n = true;
 276    var _d = false;
 277    var _e = undefined;
 278  
 279    try {
 280      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
 281        _arr.push(_s.value);
 282  
 283        if (i && _arr.length === i) break;
 284      }
 285    } catch (err) {
 286      _d = true;
 287      _e = err;
 288    } finally {
 289      try {
 290        if (!_n && _i["return"] != null) _i["return"]();
 291      } finally {
 292        if (_d) throw _e;
 293      }
 294    }
 295  
 296    return _arr;
 297  }
 298  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 299  var unsupportedIterableToArray = __webpack_require__(29);
 300  
 301  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
 302  var nonIterableRest = __webpack_require__(39);
 303  
 304  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
 305  
 306  
 307  
 308  
 309  function _slicedToArray(arr, i) {
 310    return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
 311  }
 312  
 313  /***/ }),
 314  /* 15 */
 315  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 316  
 317  "use strict";
 318  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
 319  /* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
 320  
 321  function _objectWithoutProperties(source, excluded) {
 322    if (source == null) return {};
 323    var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
 324    var key, i;
 325  
 326    if (Object.getOwnPropertySymbols) {
 327      var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
 328  
 329      for (i = 0; i < sourceSymbolKeys.length; i++) {
 330        key = sourceSymbolKeys[i];
 331        if (excluded.indexOf(key) >= 0) continue;
 332        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
 333        target[key] = source[key];
 334      }
 335    }
 336  
 337    return target;
 338  }
 339  
 340  /***/ }),
 341  /* 16 */
 342  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 343  
 344  "use strict";
 345  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
 346  function _getPrototypeOf(o) {
 347    _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
 348      return o.__proto__ || Object.getPrototypeOf(o);
 349    };
 350    return _getPrototypeOf(o);
 351  }
 352  
 353  /***/ }),
 354  /* 17 */
 355  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 356  
 357  "use strict";
 358  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 359  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectSpread2; });
 360  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
 361  function _defineProperty(obj, key, value) {
 362    if (key in obj) {
 363      Object.defineProperty(obj, key, {
 364        value: value,
 365        enumerable: true,
 366        configurable: true,
 367        writable: true
 368      });
 369    } else {
 370      obj[key] = value;
 371    }
 372  
 373    return obj;
 374  }
 375  
 376  function ownKeys(object, enumerableOnly) {
 377    var keys = Object.keys(object);
 378  
 379    if (Object.getOwnPropertySymbols) {
 380      var symbols = Object.getOwnPropertySymbols(object);
 381      if (enumerableOnly) symbols = symbols.filter(function (sym) {
 382        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
 383      });
 384      keys.push.apply(keys, symbols);
 385    }
 386  
 387    return keys;
 388  }
 389  
 390  function _objectSpread2(target) {
 391    for (var i = 1; i < arguments.length; i++) {
 392      var source = arguments[i] != null ? arguments[i] : {};
 393  
 394      if (i % 2) {
 395        ownKeys(Object(source), true).forEach(function (key) {
 396          _defineProperty(target, key, source[key]);
 397        });
 398      } else if (Object.getOwnPropertyDescriptors) {
 399        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
 400      } else {
 401        ownKeys(Object(source)).forEach(function (key) {
 402          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
 403        });
 404      }
 405    }
 406  
 407    return target;
 408  }
 409  
 410  function _objectWithoutPropertiesLoose(source, excluded) {
 411    if (source == null) return {};
 412    var target = {};
 413    var sourceKeys = Object.keys(source);
 414    var key, i;
 415  
 416    for (i = 0; i < sourceKeys.length; i++) {
 417      key = sourceKeys[i];
 418      if (excluded.indexOf(key) >= 0) continue;
 419      target[key] = source[key];
 420    }
 421  
 422    return target;
 423  }
 424  
 425  function _unsupportedIterableToArray(o, minLen) {
 426    if (!o) return;
 427    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
 428    var n = Object.prototype.toString.call(o).slice(8, -1);
 429    if (n === "Object" && o.constructor) n = o.constructor.name;
 430    if (n === "Map" || n === "Set") return Array.from(o);
 431    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
 432  }
 433  
 434  function _arrayLikeToArray(arr, len) {
 435    if (len == null || len > arr.length) len = arr.length;
 436  
 437    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
 438  
 439    return arr2;
 440  }
 441  
 442  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
 443    var it;
 444  
 445    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
 446      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
 447        if (it) o = it;
 448        var i = 0;
 449        return function () {
 450          if (i >= o.length) return {
 451            done: true
 452          };
 453          return {
 454            done: false,
 455            value: o[i++]
 456          };
 457        };
 458      }
 459  
 460      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 461    }
 462  
 463    it = o[Symbol.iterator]();
 464    return it.next.bind(it);
 465  }
 466  
 467  
 468  
 469  
 470  /***/ }),
 471  /* 18 */
 472  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 473  
 474  "use strict";
 475  
 476  // EXPORTS
 477  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
 478  
 479  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
 480  var arrayLikeToArray = __webpack_require__(26);
 481  
 482  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
 483  
 484  function _arrayWithoutHoles(arr) {
 485    if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
 486  }
 487  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
 488  var iterableToArray = __webpack_require__(35);
 489  
 490  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
 491  var unsupportedIterableToArray = __webpack_require__(29);
 492  
 493  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
 494  function _nonIterableSpread() {
 495    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 496  }
 497  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
 498  
 499  
 500  
 501  
 502  function _toConsumableArray(arr) {
 503    return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
 504  }
 505  
 506  /***/ }),
 507  /* 19 */
 508  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 509  
 510  "use strict";
 511  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
 512  function _defineProperties(target, props) {
 513    for (var i = 0; i < props.length; i++) {
 514      var descriptor = props[i];
 515      descriptor.enumerable = descriptor.enumerable || false;
 516      descriptor.configurable = true;
 517      if ("value" in descriptor) descriptor.writable = true;
 518      Object.defineProperty(target, descriptor.key, descriptor);
 519    }
 520  }
 521  
 522  function _createClass(Constructor, protoProps, staticProps) {
 523    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
 524    if (staticProps) _defineProperties(Constructor, staticProps);
 525    return Constructor;
 526  }
 527  
 528  /***/ }),
 529  /* 20 */
 530  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 531  
 532  "use strict";
 533  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
 534  function _classCallCheck(instance, Constructor) {
 535    if (!(instance instanceof Constructor)) {
 536      throw new TypeError("Cannot call a class as a function");
 537    }
 538  }
 539  
 540  /***/ }),
 541  /* 21 */
 542  /***/ (function(module, exports) {
 543  
 544  (function() { module.exports = this["wp"]["keycodes"]; }());
 545  
 546  /***/ }),
 547  /* 22 */
 548  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 549  
 550  "use strict";
 551  
 552  // EXPORTS
 553  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
 554  
 555  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
 556  function _setPrototypeOf(o, p) {
 557    _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
 558      o.__proto__ = p;
 559      return o;
 560    };
 561  
 562    return _setPrototypeOf(o, p);
 563  }
 564  // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
 565  
 566  function _inherits(subClass, superClass) {
 567    if (typeof superClass !== "function" && superClass !== null) {
 568      throw new TypeError("Super expression must either be null or a function");
 569    }
 570  
 571    subClass.prototype = Object.create(superClass && superClass.prototype, {
 572      constructor: {
 573        value: subClass,
 574        writable: true,
 575        configurable: true
 576      }
 577    });
 578    if (superClass) _setPrototypeOf(subClass, superClass);
 579  }
 580  
 581  /***/ }),
 582  /* 23 */
 583  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 584  
 585  "use strict";
 586  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
 587  /* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(40);
 588  /* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
 589  
 590  
 591  function _possibleConstructorReturn(self, call) {
 592    if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
 593      return call;
 594    }
 595  
 596    return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
 597  }
 598  
 599  /***/ }),
 600  /* 24 */
 601  /***/ (function(module, exports) {
 602  
 603  (function() { module.exports = this["regeneratorRuntime"]; }());
 604  
 605  /***/ }),
 606  /* 25 */
 607  /***/ (function(module, exports) {
 608  
 609  (function() { module.exports = this["wp"]["richText"]; }());
 610  
 611  /***/ }),
 612  /* 26 */
 613  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 614  
 615  "use strict";
 616  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
 617  function _arrayLikeToArray(arr, len) {
 618    if (len == null || len > arr.length) len = arr.length;
 619  
 620    for (var i = 0, arr2 = new Array(len); i < len; i++) {
 621      arr2[i] = arr[i];
 622    }
 623  
 624    return arr2;
 625  }
 626  
 627  /***/ }),
 628  /* 27 */,
 629  /* 28 */
 630  /***/ (function(module, exports, __webpack_require__) {
 631  
 632  /**
 633   * Copyright (c) 2013-present, Facebook, Inc.
 634   *
 635   * This source code is licensed under the MIT license found in the
 636   * LICENSE file in the root directory of this source tree.
 637   */
 638  
 639  if (false) { var throwOnDirectAccess, ReactIs; } else {
 640    // By explicitly using `prop-types` you are opting into new production behavior.
 641    // http://fb.me/prop-types-in-prod
 642    module.exports = __webpack_require__(138)();
 643  }
 644  
 645  
 646  /***/ }),
 647  /* 29 */
 648  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 649  
 650  "use strict";
 651  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
 652  /* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(26);
 653  
 654  function _unsupportedIterableToArray(o, minLen) {
 655    if (!o) return;
 656    if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 657    var n = Object.prototype.toString.call(o).slice(8, -1);
 658    if (n === "Object" && o.constructor) n = o.constructor.name;
 659    if (n === "Map" || n === "Set") return Array.from(o);
 660    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
 661  }
 662  
 663  /***/ }),
 664  /* 30 */
 665  /***/ (function(module, exports) {
 666  
 667  (function() { module.exports = this["wp"]["dom"]; }());
 668  
 669  /***/ }),
 670  /* 31 */
 671  /***/ (function(module, exports) {
 672  
 673  (function() { module.exports = this["wp"]["url"]; }());
 674  
 675  /***/ }),
 676  /* 32 */
 677  /***/ (function(module, exports) {
 678  
 679  (function() { module.exports = this["wp"]["hooks"]; }());
 680  
 681  /***/ }),
 682  /* 33 */,
 683  /* 34 */,
 684  /* 35 */
 685  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 686  
 687  "use strict";
 688  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
 689  function _iterableToArray(iter) {
 690    if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
 691  }
 692  
 693  /***/ }),
 694  /* 36 */,
 695  /* 37 */
 696  /***/ (function(module, exports) {
 697  
 698  (function() { module.exports = this["wp"]["deprecated"]; }());
 699  
 700  /***/ }),
 701  /* 38 */
 702  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 703  
 704  "use strict";
 705  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
 706  function _arrayWithHoles(arr) {
 707    if (Array.isArray(arr)) return arr;
 708  }
 709  
 710  /***/ }),
 711  /* 39 */
 712  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 713  
 714  "use strict";
 715  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
 716  function _nonIterableRest() {
 717    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
 718  }
 719  
 720  /***/ }),
 721  /* 40 */
 722  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 723  
 724  "use strict";
 725  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
 726  function _typeof(obj) {
 727    "@babel/helpers - typeof";
 728  
 729    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
 730      _typeof = function _typeof(obj) {
 731        return typeof obj;
 732      };
 733    } else {
 734      _typeof = function _typeof(obj) {
 735        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
 736      };
 737    }
 738  
 739    return _typeof(obj);
 740  }
 741  
 742  /***/ }),
 743  /* 41 */
 744  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 745  
 746  "use strict";
 747  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
 748  function _objectWithoutPropertiesLoose(source, excluded) {
 749    if (source == null) return {};
 750    var target = {};
 751    var sourceKeys = Object.keys(source);
 752    var key, i;
 753  
 754    for (i = 0; i < sourceKeys.length; i++) {
 755      key = sourceKeys[i];
 756      if (excluded.indexOf(key) >= 0) continue;
 757      target[key] = source[key];
 758    }
 759  
 760    return target;
 761  }
 762  
 763  /***/ }),
 764  /* 42 */
 765  /***/ (function(module, __webpack_exports__, __webpack_require__) {
 766  
 767  "use strict";
 768  
 769  
 770  var LEAF_KEY, hasWeakMap;
 771  
 772  /**
 773   * Arbitrary value used as key for referencing cache object in WeakMap tree.
 774   *
 775   * @type {Object}
 776   */
 777  LEAF_KEY = {};
 778  
 779  /**
 780   * Whether environment supports WeakMap.
 781   *
 782   * @type {boolean}
 783   */
 784  hasWeakMap = typeof WeakMap !== 'undefined';
 785  
 786  /**
 787   * Returns the first argument as the sole entry in an array.
 788   *
 789   * @param {*} value Value to return.
 790   *
 791   * @return {Array} Value returned as entry in array.
 792   */
 793  function arrayOf( value ) {
 794      return [ value ];
 795  }
 796  
 797  /**
 798   * Returns true if the value passed is object-like, or false otherwise. A value
 799   * is object-like if it can support property assignment, e.g. object or array.
 800   *
 801   * @param {*} value Value to test.
 802   *
 803   * @return {boolean} Whether value is object-like.
 804   */
 805  function isObjectLike( value ) {
 806      return !! value && 'object' === typeof value;
 807  }
 808  
 809  /**
 810   * Creates and returns a new cache object.
 811   *
 812   * @return {Object} Cache object.
 813   */
 814  function createCache() {
 815      var cache = {
 816          clear: function() {
 817              cache.head = null;
 818          },
 819      };
 820  
 821      return cache;
 822  }
 823  
 824  /**
 825   * Returns true if entries within the two arrays are strictly equal by
 826   * reference from a starting index.
 827   *
 828   * @param {Array}  a         First array.
 829   * @param {Array}  b         Second array.
 830   * @param {number} fromIndex Index from which to start comparison.
 831   *
 832   * @return {boolean} Whether arrays are shallowly equal.
 833   */
 834  function isShallowEqual( a, b, fromIndex ) {
 835      var i;
 836  
 837      if ( a.length !== b.length ) {
 838          return false;
 839      }
 840  
 841      for ( i = fromIndex; i < a.length; i++ ) {
 842          if ( a[ i ] !== b[ i ] ) {
 843              return false;
 844          }
 845      }
 846  
 847      return true;
 848  }
 849  
 850  /**
 851   * Returns a memoized selector function. The getDependants function argument is
 852   * called before the memoized selector and is expected to return an immutable
 853   * reference or array of references on which the selector depends for computing
 854   * its own return value. The memoize cache is preserved only as long as those
 855   * dependant references remain the same. If getDependants returns a different
 856   * reference(s), the cache is cleared and the selector value regenerated.
 857   *
 858   * @param {Function} selector      Selector function.
 859   * @param {Function} getDependants Dependant getter returning an immutable
 860   *                                 reference or array of reference used in
 861   *                                 cache bust consideration.
 862   *
 863   * @return {Function} Memoized selector.
 864   */
 865  /* harmony default export */ __webpack_exports__["a"] = (function( selector, getDependants ) {
 866      var rootCache, getCache;
 867  
 868      // Use object source as dependant if getter not provided
 869      if ( ! getDependants ) {
 870          getDependants = arrayOf;
 871      }
 872  
 873      /**
 874       * Returns the root cache. If WeakMap is supported, this is assigned to the
 875       * root WeakMap cache set, otherwise it is a shared instance of the default
 876       * cache object.
 877       *
 878       * @return {(WeakMap|Object)} Root cache object.
 879       */
 880  	function getRootCache() {
 881          return rootCache;
 882      }
 883  
 884      /**
 885       * Returns the cache for a given dependants array. When possible, a WeakMap
 886       * will be used to create a unique cache for each set of dependants. This
 887       * is feasible due to the nature of WeakMap in allowing garbage collection
 888       * to occur on entries where the key object is no longer referenced. Since
 889       * WeakMap requires the key to be an object, this is only possible when the
 890       * dependant is object-like. The root cache is created as a hierarchy where
 891       * each top-level key is the first entry in a dependants set, the value a
 892       * WeakMap where each key is the next dependant, and so on. This continues
 893       * so long as the dependants are object-like. If no dependants are object-
 894       * like, then the cache is shared across all invocations.
 895       *
 896       * @see isObjectLike
 897       *
 898       * @param {Array} dependants Selector dependants.
 899       *
 900       * @return {Object} Cache object.
 901       */
 902  	function getWeakMapCache( dependants ) {
 903          var caches = rootCache,
 904              isUniqueByDependants = true,
 905              i, dependant, map, cache;
 906  
 907          for ( i = 0; i < dependants.length; i++ ) {
 908              dependant = dependants[ i ];
 909  
 910              // Can only compose WeakMap from object-like key.
 911              if ( ! isObjectLike( dependant ) ) {
 912                  isUniqueByDependants = false;
 913                  break;
 914              }
 915  
 916              // Does current segment of cache already have a WeakMap?
 917              if ( caches.has( dependant ) ) {
 918                  // Traverse into nested WeakMap.
 919                  caches = caches.get( dependant );
 920              } else {
 921                  // Create, set, and traverse into a new one.
 922                  map = new WeakMap();
 923                  caches.set( dependant, map );
 924                  caches = map;
 925              }
 926          }
 927  
 928          // We use an arbitrary (but consistent) object as key for the last item
 929          // in the WeakMap to serve as our running cache.
 930          if ( ! caches.has( LEAF_KEY ) ) {
 931              cache = createCache();
 932              cache.isUniqueByDependants = isUniqueByDependants;
 933              caches.set( LEAF_KEY, cache );
 934          }
 935  
 936          return caches.get( LEAF_KEY );
 937      }
 938  
 939      // Assign cache handler by availability of WeakMap
 940      getCache = hasWeakMap ? getWeakMapCache : getRootCache;
 941  
 942      /**
 943       * Resets root memoization cache.
 944       */
 945  	function clear() {
 946          rootCache = hasWeakMap ? new WeakMap() : createCache();
 947      }
 948  
 949      // eslint-disable-next-line jsdoc/check-param-names
 950      /**
 951       * The augmented selector call, considering first whether dependants have
 952       * changed before passing it to underlying memoize function.
 953       *
 954       * @param {Object} source    Source object for derivation.
 955       * @param {...*}   extraArgs Additional arguments to pass to selector.
 956       *
 957       * @return {*} Selector result.
 958       */
 959  	function callSelector( /* source, ...extraArgs */ ) {
 960          var len = arguments.length,
 961              cache, node, i, args, dependants;
 962  
 963          // Create copy of arguments (avoid leaking deoptimization).
 964          args = new Array( len );
 965          for ( i = 0; i < len; i++ ) {
 966              args[ i ] = arguments[ i ];
 967          }
 968  
 969          dependants = getDependants.apply( null, args );
 970          cache = getCache( dependants );
 971  
 972          // If not guaranteed uniqueness by dependants (primitive type or lack
 973          // of WeakMap support), shallow compare against last dependants and, if
 974          // references have changed, destroy cache to recalculate result.
 975          if ( ! cache.isUniqueByDependants ) {
 976              if ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {
 977                  cache.clear();
 978              }
 979  
 980              cache.lastDependants = dependants;
 981          }
 982  
 983          node = cache.head;
 984          while ( node ) {
 985              // Check whether node arguments match arguments
 986              if ( ! isShallowEqual( node.args, args, 1 ) ) {
 987                  node = node.next;
 988                  continue;
 989              }
 990  
 991              // At this point we can assume we've found a match
 992  
 993              // Surface matched node to head if not already
 994              if ( node !== cache.head ) {
 995                  // Adjust siblings to point to each other.
 996                  node.prev.next = node.next;
 997                  if ( node.next ) {
 998                      node.next.prev = node.prev;
 999                  }
1000  
1001                  node.next = cache.head;
1002                  node.prev = null;
1003                  cache.head.prev = node;
1004                  cache.head = node;
1005              }
1006  
1007              // Return immediately
1008              return node.val;
1009          }
1010  
1011          // No cached value found. Continue to insertion phase:
1012  
1013          node = {
1014              // Generate the result from original function
1015              val: selector.apply( null, args ),
1016          };
1017  
1018          // Avoid including the source object in the cache.
1019          args[ 0 ] = null;
1020          node.args = args;
1021  
1022          // Don't need to check whether node is already head, since it would
1023          // have been returned above already if it was
1024  
1025          // Shift existing head down list
1026          if ( cache.head ) {
1027              cache.head.prev = node;
1028              node.next = cache.head;
1029          }
1030  
1031          cache.head = node;
1032  
1033          return node.val;
1034      }
1035  
1036      callSelector.getDependants = getDependants;
1037      callSelector.clear = clear;
1038      clear();
1039  
1040      return callSelector;
1041  });
1042  
1043  
1044  /***/ }),
1045  /* 43 */,
1046  /* 44 */
1047  /***/ (function(module, exports) {
1048  
1049  (function() { module.exports = this["wp"]["blob"]; }());
1050  
1051  /***/ }),
1052  /* 45 */,
1053  /* 46 */
1054  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1055  
1056  "use strict";
1057  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useLiveRef; });
1058  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
1059  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1060  /* harmony import */ var _useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59);
1061  
1062  
1063  
1064  /**
1065   * A `React.Ref` that keeps track of the passed `value`.
1066   */
1067  
1068  function useLiveRef(value) {
1069    var ref = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(value);
1070    Object(_useIsomorphicEffect_js__WEBPACK_IMPORTED_MODULE_1__[/* useIsomorphicEffect */ "a"])(function () {
1071      ref.current = value;
1072    });
1073    return ref;
1074  }
1075  
1076  
1077  
1078  
1079  /***/ }),
1080  /* 47 */
1081  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1082  
1083  "use strict";
1084  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
1085  /**
1086   * Returns `element.ownerDocument || window.document`.
1087   */
1088  function getDocument(element) {
1089    return element ? element.ownerDocument || element : window.document;
1090  }
1091  
1092  
1093  
1094  
1095  /***/ }),
1096  /* 48 */
1097  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1098  
1099  "use strict";
1100  
1101  // EXPORTS
1102  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createHook; });
1103  
1104  // EXTERNAL MODULE: external {"this":"React"}
1105  var external_this_React_ = __webpack_require__(13);
1106  
1107  // EXTERNAL MODULE: ./node_modules/reakit-system/es/SystemContext.js
1108  var SystemContext = __webpack_require__(74);
1109  
1110  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js
1111  
1112  
1113  
1114  /**
1115   * React custom hook that returns the value of any token defined in the
1116   * SystemContext. It's mainly used internally in [`useOptions`](#useoptions)
1117   * and [`useProps`](#useprops).
1118   *
1119   * @example
1120   * import { SystemProvider, useToken } from "reakit-system";
1121   *
1122   * const system = {
1123   *   token: "value",
1124   * };
1125   *
1126   * function Component(props) {
1127   *   const token = useToken("token", "default value");
1128   *   return <div {...props}>{token}</div>;
1129   * }
1130   *
1131   * function App() {
1132   *   return (
1133   *     <SystemProvider unstable_system={system}>
1134   *       <Component />
1135   *     </SystemProvider>
1136   *   );
1137   * }
1138   */
1139  
1140  function useToken(token, defaultValue) {
1141    Object(external_this_React_["useDebugValue"])(token);
1142    var context = Object(external_this_React_["useContext"])(SystemContext["a" /* SystemContext */]);
1143    return context[token] != null ? context[token] : defaultValue;
1144  }
1145  
1146  
1147  
1148  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js
1149  
1150  
1151  
1152  
1153  /**
1154   * React custom hook that returns the props returned by a given
1155   * `use${name}Props` in the SystemContext.
1156   *
1157   * @example
1158   * import { SystemProvider, useProps } from "reakit-system";
1159   *
1160   * const system = {
1161   *   useAProps(options, htmlProps) {
1162   *     return {
1163   *       ...htmlProps,
1164   *       href: options.url,
1165   *     };
1166   *   },
1167   * };
1168   *
1169   * function A({ url, ...htmlProps }) {
1170   *   const props = useProps("A", { url }, htmlProps);
1171   *   return <a {...props} />;
1172   * }
1173   *
1174   * function App() {
1175   *   return (
1176   *     <SystemProvider unstable_system={system}>
1177   *       <A url="url">It will convert url into href in useAProps</A>
1178   *     </SystemProvider>
1179   *   );
1180   * }
1181   */
1182  
1183  function useProps(name, options, htmlProps) {
1184    if (options === void 0) {
1185      options = {};
1186    }
1187  
1188    if (htmlProps === void 0) {
1189      htmlProps = {};
1190    }
1191  
1192    var hookName = "use" + name + "Props";
1193    Object(external_this_React_["useDebugValue"])(hookName);
1194    var useHook = useToken(hookName);
1195  
1196    if (useHook) {
1197      return useHook(options, htmlProps);
1198    }
1199  
1200    return htmlProps;
1201  }
1202  
1203  
1204  
1205  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1206  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
1207  
1208  // CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js
1209  
1210  
1211  
1212  
1213  
1214  /**
1215   * React custom hook that returns the options returned by a given
1216   * `use${name}Options` in the SystemContext.
1217   *
1218   * @example
1219   * import React from "react";
1220   * import { SystemProvider, useOptions } from "reakit-system";
1221   *
1222   * const system = {
1223   *   useAOptions(options, htmlProps) {
1224   *     return {
1225   *       ...options,
1226   *       url: htmlProps.href,
1227   *     };
1228   *   },
1229   * };
1230   *
1231   * function A({ url, ...htmlProps }) {
1232   *   const options = useOptions("A", { url }, htmlProps);
1233   *   return <a href={options.url} {...htmlProps} />;
1234   * }
1235   *
1236   * function App() {
1237   *   return (
1238   *     <SystemProvider unstable_system={system}>
1239   *       <A href="url">
1240   *         It will convert href into url in useAOptions and then url into href in A
1241   *       </A>
1242   *     </SystemProvider>
1243   *   );
1244   * }
1245   */
1246  
1247  function useOptions(name, options, htmlProps) {
1248    if (options === void 0) {
1249      options = {};
1250    }
1251  
1252    if (htmlProps === void 0) {
1253      htmlProps = {};
1254    }
1255  
1256    var hookName = "use" + name + "Options";
1257    Object(external_this_React_["useDebugValue"])(hookName);
1258    var useHook = useToken(hookName);
1259  
1260    if (useHook) {
1261      return Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, options), useHook(options, htmlProps));
1262    }
1263  
1264    return options;
1265  }
1266  
1267  
1268  
1269  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1270  var shallowEqual = __webpack_require__(56);
1271  
1272  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js
1273  /**
1274   * Transforms `arg` into an array if it's not already.
1275   *
1276   * @example
1277   * import { toArray } from "reakit-utils";
1278   *
1279   * toArray("a"); // ["a"]
1280   * toArray(["a"]); // ["a"]
1281   */
1282  function toArray(arg) {
1283    if (Array.isArray(arg)) {
1284      return arg;
1285    }
1286  
1287    return typeof arg !== "undefined" ? [arg] : [];
1288  }
1289  
1290  
1291  
1292  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js
1293  
1294  
1295  
1296  
1297  
1298  
1299  
1300  
1301  
1302  /**
1303   * Creates a React custom hook that will return component props.
1304   *
1305   * @example
1306   * import { createHook } from "reakit-system";
1307   *
1308   * const useA = createHook({
1309   *   name: "A",
1310   *   keys: ["url"], // custom props/options keys
1311   *   useProps(options, htmlProps) {
1312   *     return {
1313   *       ...htmlProps,
1314   *       href: options.url,
1315   *     };
1316   *   },
1317   * });
1318   *
1319   * function A({ url, ...htmlProps }) {
1320   *   const props = useA({ url }, htmlProps);
1321   *   return <a {...props} />;
1322   * }
1323   *
1324   * @param options
1325   */
1326  function createHook(options) {
1327    var _options$useState, _composedHooks$;
1328  
1329    var composedHooks = toArray(options.compose);
1330  
1331    var __useOptions = function __useOptions(hookOptions, htmlProps) {
1332      // Call the current hook's useOptions first
1333      if (options.useOptions) {
1334        hookOptions = options.useOptions(hookOptions, htmlProps);
1335      } // If there's name, call useOptions from the system context
1336  
1337  
1338      if (options.name) {
1339        hookOptions = useOptions(options.name, hookOptions, htmlProps);
1340      } // Run composed hooks useOptions
1341  
1342  
1343      if (options.compose) {
1344        for (var _iterator = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step; !(_step = _iterator()).done;) {
1345          var hook = _step.value;
1346          hookOptions = hook.__useOptions(hookOptions, htmlProps);
1347        }
1348      }
1349  
1350      return hookOptions;
1351    };
1352  
1353    var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) {
1354      if (hookOptions === void 0) {
1355        hookOptions = {};
1356      }
1357  
1358      if (htmlProps === void 0) {
1359        htmlProps = {};
1360      }
1361  
1362      if (unstable_ignoreUseOptions === void 0) {
1363        unstable_ignoreUseOptions = false;
1364      }
1365  
1366      // This won't execute when useHook was called from within another useHook
1367      if (!unstable_ignoreUseOptions) {
1368        hookOptions = __useOptions(hookOptions, htmlProps);
1369      } // Call the current hook's useProps
1370  
1371  
1372      if (options.useProps) {
1373        htmlProps = options.useProps(hookOptions, htmlProps);
1374      } // If there's name, call useProps from the system context
1375  
1376  
1377      if (options.name) {
1378        htmlProps = useProps(options.name, hookOptions, htmlProps);
1379      }
1380  
1381      if (options.compose) {
1382        if (options.useComposeOptions) {
1383          hookOptions = options.useComposeOptions(hookOptions, htmlProps);
1384        }
1385  
1386        if (options.useComposeProps) {
1387          htmlProps = options.useComposeProps(hookOptions, htmlProps);
1388        } else {
1389          for (var _iterator2 = Object(_rollupPluginBabelHelpers_0c84a174["c" /* b */])(composedHooks), _step2; !(_step2 = _iterator2()).done;) {
1390            var hook = _step2.value;
1391            htmlProps = hook(hookOptions, htmlProps, true);
1392          }
1393        }
1394      } // Remove undefined values from htmlProps
1395  
1396  
1397      var finalHTMLProps = {};
1398      var definedHTMLProps = htmlProps || {};
1399  
1400      for (var prop in definedHTMLProps) {
1401        if (definedHTMLProps[prop] !== undefined) {
1402          finalHTMLProps[prop] = definedHTMLProps[prop];
1403        }
1404      }
1405  
1406      return finalHTMLProps;
1407    };
1408  
1409    useHook.__useOptions = __useOptions;
1410    var composedKeys = composedHooks.reduce(function (keys, hook) {
1411      keys.push.apply(keys, hook.__keys || []);
1412      return keys;
1413    }, []); // It's used by createComponent to split option props (keys) and html props
1414  
1415    useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []);
1416    useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual["a" /* shallowEqual */];
1417  
1418    if (false) {}
1419  
1420    return useHook;
1421  }
1422  
1423  
1424  
1425  
1426  /***/ }),
1427  /* 49 */
1428  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1429  
1430  "use strict";
1431  
1432  // EXPORTS
1433  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createComponent; });
1434  
1435  // EXTERNAL MODULE: external {"this":"React"}
1436  var external_this_React_ = __webpack_require__(13);
1437  
1438  // EXTERNAL MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js
1439  var _rollupPluginBabelHelpers_0c84a174 = __webpack_require__(55);
1440  
1441  // EXTERNAL MODULE: ./node_modules/reakit-system/es/useCreateElement.js
1442  var useCreateElement = __webpack_require__(78);
1443  
1444  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js
1445  /**
1446   * Splits an object (`props`) into a tuple where the first item is an object
1447   * with the passed `keys`, and the second item is an object with these keys
1448   * omitted.
1449   *
1450   * @example
1451   * import { splitProps } from "reakit-utils";
1452   *
1453   * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }]
1454   */
1455  function splitProps(props, keys) {
1456    var propsKeys = Object.keys(props);
1457    var picked = {};
1458    var omitted = {};
1459  
1460    for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) {
1461      var key = _propsKeys[_i];
1462  
1463      if (keys.indexOf(key) >= 0) {
1464        picked[key] = props[key];
1465      } else {
1466        omitted[key] = props[key];
1467      }
1468    }
1469  
1470    return [picked, omitted];
1471  }
1472  
1473  
1474  
1475  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/shallowEqual.js
1476  var shallowEqual = __webpack_require__(56);
1477  
1478  // CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js
1479  
1480  
1481  
1482  
1483  
1484  
1485  
1486  function forwardRef(component) {
1487    return /*#__PURE__*/Object(external_this_React_["forwardRef"])(component);
1488  }
1489  
1490  function memo(component, propsAreEqual) {
1491    return /*#__PURE__*/Object(external_this_React_["memo"])(component, propsAreEqual);
1492  }
1493  
1494  /**
1495   * Creates a React component.
1496   *
1497   * @example
1498   * import { createComponent } from "reakit-system";
1499   *
1500   * const A = createComponent({ as: "a" });
1501   *
1502   * @param options
1503   */
1504  function createComponent(_ref) {
1505    var type = _ref.as,
1506        useHook = _ref.useHook,
1507        shouldMemo = _ref.memo,
1508        _ref$propsAreEqual = _ref.propsAreEqual,
1509        propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual,
1510        _ref$keys = _ref.keys,
1511        keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys,
1512        _ref$useCreateElement = _ref.useCreateElement,
1513        useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement["a" /* useCreateElement */] : _ref$useCreateElement;
1514  
1515    var Comp = function Comp(_ref2, ref) {
1516      var _ref2$as = _ref2.as,
1517          as = _ref2$as === void 0 ? type : _ref2$as,
1518          props = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_ref2, ["as"]);
1519  
1520      if (useHook) {
1521        var _as$render;
1522  
1523        var _splitProps = splitProps(props, keys),
1524            _options = _splitProps[0],
1525            htmlProps = _splitProps[1];
1526  
1527        var _useHook = useHook(_options, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1528          ref: ref
1529        }, htmlProps)),
1530            wrapElement = _useHook.wrapElement,
1531            elementProps = Object(_rollupPluginBabelHelpers_0c84a174["b" /* a */])(_useHook, ["wrapElement"]); // @ts-ignore
1532  
1533  
1534        var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys;
1535        var asOptions = asKeys && splitProps(props, asKeys)[0];
1536        var allProps = asOptions ? Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])(Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({}, elementProps), asOptions) : elementProps;
1537  
1538        var _element = useCreateElement$1(as, allProps);
1539  
1540        if (wrapElement) {
1541          return wrapElement(_element);
1542        }
1543  
1544        return _element;
1545      }
1546  
1547      return useCreateElement$1(as, Object(_rollupPluginBabelHelpers_0c84a174["a" /* _ */])({
1548        ref: ref
1549      }, props));
1550    };
1551  
1552    if (false) {}
1553  
1554    Comp = forwardRef(Comp);
1555  
1556    if (shouldMemo) {
1557      Comp = memo(Comp, propsAreEqual);
1558    }
1559  
1560    Comp.__keys = keys;
1561    Comp.unstable_propsAreEqual = propsAreEqual || shallowEqual["a" /* shallowEqual */];
1562    return Comp;
1563  }
1564  
1565  
1566  
1567  
1568  /***/ }),
1569  /* 50 */
1570  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1571  
1572  "use strict";
1573  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
1574  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
1575    try {
1576      var info = gen[key](arg);
1577      var value = info.value;
1578    } catch (error) {
1579      reject(error);
1580      return;
1581    }
1582  
1583    if (info.done) {
1584      resolve(value);
1585    } else {
1586      Promise.resolve(value).then(_next, _throw);
1587    }
1588  }
1589  
1590  function _asyncToGenerator(fn) {
1591    return function () {
1592      var self = this,
1593          args = arguments;
1594      return new Promise(function (resolve, reject) {
1595        var gen = fn.apply(self, args);
1596  
1597        function _next(value) {
1598          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
1599        }
1600  
1601        function _throw(err) {
1602          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
1603        }
1604  
1605        _next(undefined);
1606      });
1607    };
1608  }
1609  
1610  /***/ }),
1611  /* 51 */
1612  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1613  
1614  "use strict";
1615  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findFirstEnabledItem; });
1616  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return flatten; });
1617  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return groupItems; });
1618  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findEnabledItemById; });
1619  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getCurrentId; });
1620  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return reverse; });
1621  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return useCompositeState; });
1622  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
1623  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
1624  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
1625  /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59);
1626  /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62);
1627  /* harmony import */ var reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(61);
1628  /* harmony import */ var _Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
1629  
1630  
1631  
1632  
1633  
1634  
1635  
1636  function reverse(array) {
1637    return array.slice().reverse();
1638  }
1639  
1640  function isElementPreceding(element1, element2) {
1641    return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING);
1642  }
1643  
1644  function findDOMIndex(items, item) {
1645    return items.findIndex(function (currentItem) {
1646      if (!currentItem.ref.current || !item.ref.current) {
1647        return false;
1648      }
1649  
1650      return isElementPreceding(item.ref.current, currentItem.ref.current);
1651    });
1652  }
1653  
1654  function findFirstEnabledItem(items, excludeId) {
1655    if (excludeId) {
1656      return items.find(function (item) {
1657        return !item.disabled && item.id !== excludeId;
1658      });
1659    }
1660  
1661    return items.find(function (item) {
1662      return !item.disabled;
1663    });
1664  }
1665  
1666  function findEnabledItemById(items, id) {
1667    if (!id) return undefined;
1668    return items === null || items === void 0 ? void 0 : items.find(function (item) {
1669      return item.id === id && !item.disabled;
1670    });
1671  }
1672  
1673  function groupItems(items) {
1674    var groups = [[]];
1675  
1676    var _loop = function _loop() {
1677      var item = _step.value;
1678      var group = groups.find(function (g) {
1679        return !g[0] || g[0].groupId === item.groupId;
1680      });
1681  
1682      if (group) {
1683        group.push(item);
1684      } else {
1685        groups.push([item]);
1686      }
1687    };
1688  
1689    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(items), _step; !(_step = _iterator()).done;) {
1690      _loop();
1691    }
1692  
1693    return groups;
1694  }
1695  
1696  function getMaxLength(rows) {
1697    var maxLength = 0;
1698  
1699    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(rows), _step; !(_step = _iterator()).done;) {
1700      var length = _step.value.length;
1701  
1702      if (length > maxLength) {
1703        maxLength = length;
1704      }
1705    }
1706  
1707    return maxLength;
1708  }
1709  
1710  /**
1711   * Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
1712   */
1713  
1714  function verticalizeItems(items) {
1715    var groups = groupItems(items);
1716    var maxLength = getMaxLength(groups);
1717    var verticalized = [];
1718  
1719    for (var i = 0; i < maxLength; i += 1) {
1720      for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
1721        var group = _step.value;
1722  
1723        if (group[i]) {
1724          verticalized.push(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, group[i]), {}, {
1725            // If there's no groupId, it means that it's not a grid composite,
1726            // but a single row instead. So, instead of verticalizing it, that
1727            // is, assigning a different groupId based on the column index, we
1728            // keep it undefined so they will be part of the same group.
1729            // It's useful when using up/down on one-dimensional composites.
1730            groupId: group[i].groupId ? "" + i : undefined
1731          }));
1732        }
1733      }
1734    }
1735  
1736    return verticalized;
1737  }
1738  
1739  function flatten(grid) {
1740    var flattened = [];
1741  
1742    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(grid), _step; !(_step = _iterator()).done;) {
1743      var row = _step.value;
1744      flattened.push.apply(flattened, row);
1745    }
1746  
1747    return flattened;
1748  }
1749  
1750  /**
1751   * Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
1752   */
1753  
1754  function fillGroups(groups) {
1755    var maxLength = getMaxLength(groups);
1756  
1757    for (var _iterator = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* b */ "c"])(groups), _step; !(_step = _iterator()).done;) {
1758      var group = _step.value;
1759  
1760      if (group.length < maxLength) {
1761        for (var i = 0; i < maxLength; i += 1) {
1762          if (!group[i]) {
1763            group[i] = {
1764              id: "__EMPTY_ITEM__",
1765              disabled: true,
1766              ref: {
1767                current: null
1768              },
1769              groupId: group[i - 1].groupId
1770            };
1771          }
1772        }
1773      }
1774    }
1775  
1776    return groups;
1777  }
1778  
1779  function getCurrentId(options, passedId) {
1780    var _findFirstEnabledItem;
1781  
1782    if (passedId || passedId === null) {
1783      return passedId;
1784    }
1785  
1786    if (options.currentId || options.currentId === null) {
1787      return options.currentId;
1788    }
1789  
1790    return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id;
1791  }
1792  
1793  var nullItem = {
1794    id: null,
1795    ref: {
1796      current: null
1797    }
1798  };
1799  function placeItemsAfter(items, id, shouldInsertNullItem) {
1800    var index = items.findIndex(function (item) {
1801      return item.id === id;
1802    });
1803    return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index));
1804  }
1805  
1806  function getItemsInGroup(items, groupId) {
1807    return items.filter(function (item) {
1808      return item.groupId === groupId;
1809    });
1810  }
1811  
1812  var map = {
1813    horizontal: "vertical",
1814    vertical: "horizontal"
1815  };
1816  function getOppositeOrientation(orientation) {
1817    return orientation && map[orientation];
1818  }
1819  
1820  function addItemAtIndex(array, item, index) {
1821    if (!(index in array)) {
1822      return [].concat(array, [item]);
1823    }
1824  
1825    return [].concat(array.slice(0, index), [item], array.slice(index));
1826  }
1827  
1828  function sortBasedOnDOMPosition(items) {
1829    var copy = items.slice();
1830    var isOrderDifferent = false;
1831    copy.sort(function (a, b) {
1832      var elementA = a.ref.current;
1833      var elementB = b.ref.current;
1834  
1835      if (elementA && elementB && isElementPreceding(elementA, elementB)) {
1836        isOrderDifferent = true;
1837        return -1;
1838      }
1839  
1840      return 0;
1841    });
1842  
1843    if (isOrderDifferent) {
1844      return copy;
1845    }
1846  
1847    return items;
1848  }
1849  
1850  function reducer(state, action) {
1851    var virtual = state.unstable_virtual,
1852        rtl = state.rtl,
1853        orientation = state.orientation,
1854        items = state.items,
1855        groups = state.groups,
1856        currentId = state.currentId,
1857        loop = state.loop,
1858        wrap = state.wrap,
1859        pastIds = state.pastIds,
1860        moves = state.unstable_moves,
1861        initialVirtual = state.initialVirtual,
1862        initialRTL = state.initialRTL,
1863        initialOrientation = state.initialOrientation,
1864        initialCurrentId = state.initialCurrentId,
1865        initialLoop = state.initialLoop,
1866        initialWrap = state.initialWrap,
1867        hasSetCurrentId = state.hasSetCurrentId;
1868  
1869    switch (action.type) {
1870      case "registerGroup":
1871        {
1872          var _group = action.group; // If there are no groups yet, just add it as the first one
1873  
1874          if (groups.length === 0) {
1875            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1876              groups: [_group]
1877            });
1878          } // Finds the group index based on DOM position
1879  
1880  
1881          var index = findDOMIndex(groups, _group);
1882          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1883            groups: addItemAtIndex(groups, _group, index)
1884          });
1885        }
1886  
1887      case "unregisterGroup":
1888        {
1889          var _id = action.id;
1890          var nextGroups = groups.filter(function (group) {
1891            return group.id !== _id;
1892          }); // The group isn't registered, so do nothing
1893  
1894          if (nextGroups.length === groups.length) {
1895            return state;
1896          }
1897  
1898          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1899            groups: nextGroups
1900          });
1901        }
1902  
1903      case "registerItem":
1904        {
1905          var _item = action.item; // Finds the item group based on the DOM hierarchy
1906  
1907          var _group2 = groups.find(function (r) {
1908            var _r$ref$current;
1909  
1910            return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current);
1911          }); // Group will be null if it's a one-dimensional composite
1912  
1913  
1914          var nextItem = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
1915            groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id
1916          }, _item);
1917  
1918          var _index = findDOMIndex(items, nextItem);
1919  
1920          var nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1921            items: addItemAtIndex(items, nextItem, _index)
1922          });
1923  
1924          if (!hasSetCurrentId && !moves && initialCurrentId === undefined) {
1925            var _findFirstEnabledItem;
1926  
1927            // Sets currentId to the first enabled item. This runs whenever an item
1928            // is registered because the first enabled item may be registered
1929            // asynchronously.
1930            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, nextState), {}, {
1931              currentId: (_findFirstEnabledItem = findFirstEnabledItem(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id
1932            });
1933          }
1934  
1935          return nextState;
1936        }
1937  
1938      case "unregisterItem":
1939        {
1940          var _id2 = action.id;
1941          var nextItems = items.filter(function (item) {
1942            return item.id !== _id2;
1943          }); // The item isn't registered, so do nothing
1944  
1945          if (nextItems.length === items.length) {
1946            return state;
1947          } // Filters out the item that is being removed from the pastIds list
1948  
1949  
1950          var nextPastIds = pastIds.filter(function (pastId) {
1951            return pastId !== _id2;
1952          });
1953  
1954          var _nextState = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1955            pastIds: nextPastIds,
1956            items: nextItems
1957          }); // If the current item is the item that is being removed, focus pastId
1958  
1959  
1960          if (currentId && currentId === _id2) {
1961            var nextId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
1962              currentId: nextPastIds[0]
1963            }));
1964            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState), {}, {
1965              currentId: nextId
1966            });
1967          }
1968  
1969          return _nextState;
1970        }
1971  
1972      case "move":
1973        {
1974          var _id3 = action.id; // move() does nothing
1975  
1976          if (_id3 === undefined) {
1977            return state;
1978          } // Removes the current item and the item that is receiving focus from the
1979          // pastIds list
1980  
1981  
1982          var filteredPastIds = pastIds.filter(function (pastId) {
1983            return pastId !== currentId && pastId !== _id3;
1984          }); // If there's a currentId, add it to the pastIds list so it can be focused
1985          // if the new item gets removed or disabled
1986  
1987          var _nextPastIds = currentId ? [currentId].concat(filteredPastIds) : filteredPastIds;
1988  
1989          var _nextState2 = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
1990            pastIds: _nextPastIds
1991          }); // move(null) will focus the composite element itself, not an item
1992  
1993  
1994          if (_id3 === null) {
1995            return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
1996              unstable_moves: moves + 1,
1997              currentId: getCurrentId(_nextState2, _id3)
1998            });
1999          }
2000  
2001          var _item2 = findEnabledItemById(items, _id3);
2002  
2003          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState2), {}, {
2004            unstable_moves: _item2 ? moves + 1 : moves,
2005            currentId: getCurrentId(_nextState2, _item2 === null || _item2 === void 0 ? void 0 : _item2.id)
2006          });
2007        }
2008  
2009      case "next":
2010        {
2011          // If there's no item focused, we just move the first one
2012          if (currentId == null) {
2013            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2014              type: "first"
2015            }));
2016          } // RTL doesn't make sense on vertical navigation
2017  
2018  
2019          var isHorizontal = orientation !== "vertical";
2020          var isRTL = rtl && isHorizontal;
2021          var allItems = isRTL ? reverse(items) : items;
2022          var currentItem = allItems.find(function (item) {
2023            return item.id === currentId;
2024          }); // If there's no item focused, we just move the first one
2025  
2026          if (!currentItem) {
2027            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2028              type: "first"
2029            }));
2030          }
2031  
2032          var isGrid = !!currentItem.groupId;
2033          var currentIndex = allItems.indexOf(currentItem);
2034  
2035          var _nextItems = allItems.slice(currentIndex + 1);
2036  
2037          var nextItemsInGroup = getItemsInGroup(_nextItems, currentItem.groupId); // Home, End
2038  
2039          if (action.allTheWay) {
2040            // We reverse so we can get the last enabled item in the group. If it's
2041            // RTL, nextItems and nextItemsInGroup are already reversed and don't
2042            // have the items before the current one anymore. So we have to get
2043            // items in group again with allItems.
2044            var _nextItem2 = findFirstEnabledItem(isRTL ? getItemsInGroup(allItems, currentItem.groupId) : reverse(nextItemsInGroup));
2045  
2046            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2047              type: "move",
2048              id: _nextItem2 === null || _nextItem2 === void 0 ? void 0 : _nextItem2.id
2049            }));
2050          }
2051  
2052          var oppositeOrientation = getOppositeOrientation( // If it's a grid and orientation is not set, it's a next/previous
2053          // call, which is inherently horizontal. up/down will call next with
2054          // orientation set to vertical by default (see below on up/down cases).
2055          isGrid ? orientation || "horizontal" : orientation);
2056          var canLoop = loop && loop !== oppositeOrientation;
2057          var canWrap = isGrid && wrap && wrap !== oppositeOrientation;
2058          var hasNullItem = // `previous` and `up` will set action.hasNullItem, but when calling
2059          // next directly, hasNullItem will only be true if it's not a grid and
2060          // loop is set to true, which means that pressing right or down keys on
2061          // grids will never focus the composite element. On one-dimensional
2062          // composites that don't loop, pressing right or down keys also doesn't
2063          // focus the composite element.
2064          action.hasNullItem || !isGrid && canLoop && initialCurrentId === null;
2065  
2066          if (canLoop) {
2067            var loopItems = canWrap && !hasNullItem ? allItems : getItemsInGroup(allItems, currentItem.groupId); // Turns [0, 1, current, 3, 4] into [3, 4, 0, 1]
2068  
2069            var sortedItems = placeItemsAfter(loopItems, currentId, hasNullItem);
2070  
2071            var _nextItem3 = findFirstEnabledItem(sortedItems, currentId);
2072  
2073            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2074              type: "move",
2075              id: _nextItem3 === null || _nextItem3 === void 0 ? void 0 : _nextItem3.id
2076            }));
2077          }
2078  
2079          if (canWrap) {
2080            var _nextItem4 = findFirstEnabledItem( // We can use nextItems, which contains all the next items, including
2081            // items from other groups, to wrap between groups. However, if there
2082            // is a null item (the composite element), we'll only use the next
2083            // items in the group. So moving next from the last item will focus
2084            // the composite element (null). On grid composites, horizontal
2085            // navigation never focuses the composite element, only vertical.
2086            hasNullItem ? nextItemsInGroup : _nextItems, currentId);
2087  
2088            var _nextId = hasNullItem ? (_nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id) || null : _nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id;
2089  
2090            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2091              type: "move",
2092              id: _nextId
2093            }));
2094          }
2095  
2096          var _nextItem = findFirstEnabledItem(nextItemsInGroup, currentId);
2097  
2098          if (!_nextItem && hasNullItem) {
2099            return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2100              type: "move",
2101              id: null
2102            }));
2103          }
2104  
2105          return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2106            type: "move",
2107            id: _nextItem === null || _nextItem === void 0 ? void 0 : _nextItem.id
2108          }));
2109        }
2110  
2111      case "previous":
2112        {
2113          // If currentId is initially set to null, the composite element will be
2114          // focusable while navigating with arrow keys. But, if it's a grid, we
2115          // don't want to focus the composite element with horizontal navigation.
2116          var _isGrid = !!groups.length;
2117  
2118          var _hasNullItem = !_isGrid && initialCurrentId === null;
2119  
2120          var _nextState3 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2121            items: reverse(items)
2122          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2123            type: "next",
2124            hasNullItem: _hasNullItem
2125          }));
2126  
2127          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState3), {}, {
2128            items: items
2129          });
2130        }
2131  
2132      case "down":
2133        {
2134          // First, we make sure groups have the same number of items by filling it
2135          // with disabled fake items. Then, we reorganize the items list so
2136          // [1-1, 1-2, 2-1, 2-2] becomes [1-1, 2-1, 1-2, 2-2].
2137          var verticalItems = verticalizeItems(flatten(fillGroups(groupItems(items))));
2138  
2139          var _canLoop = loop && loop !== "horizontal"; // Pressing down arrow key will only focus the composite element if loop
2140          // is true or vertical.
2141  
2142  
2143          var _hasNullItem2 = _canLoop && initialCurrentId === null;
2144  
2145          var _nextState4 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2146            orientation: "vertical",
2147            items: verticalItems
2148          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2149            type: "next",
2150            hasNullItem: _hasNullItem2
2151          }));
2152  
2153          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState4), {}, {
2154            orientation: orientation,
2155            items: items
2156          });
2157        }
2158  
2159      case "up":
2160        {
2161          var _verticalItems = verticalizeItems(reverse(flatten(fillGroups(groupItems(items))))); // If currentId is initially set to null, we'll always focus the
2162          // composite element when the up arrow key is pressed in the first row.
2163  
2164  
2165          var _hasNullItem3 = initialCurrentId === null;
2166  
2167          var _nextState5 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2168            orientation: "vertical",
2169            items: _verticalItems
2170          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2171            type: "next",
2172            hasNullItem: _hasNullItem3
2173          }));
2174  
2175          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState5), {}, {
2176            orientation: orientation,
2177            items: items
2178          });
2179        }
2180  
2181      case "first":
2182        {
2183          var firstItem = findFirstEnabledItem(items);
2184          return reducer(state, Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2185            type: "move",
2186            id: firstItem === null || firstItem === void 0 ? void 0 : firstItem.id
2187          }));
2188        }
2189  
2190      case "last":
2191        {
2192          var _nextState6 = reducer(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2193            items: reverse(items)
2194          }), Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, action), {}, {
2195            type: "first"
2196          }));
2197  
2198          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, _nextState6), {}, {
2199            items: items
2200          });
2201        }
2202  
2203      case "sort":
2204        {
2205          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2206            items: sortBasedOnDOMPosition(items),
2207            groups: sortBasedOnDOMPosition(groups)
2208          });
2209        }
2210  
2211      case "setVirtual":
2212        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2213          unstable_virtual: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.virtual, virtual)
2214        });
2215  
2216      case "setRTL":
2217        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2218          rtl: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.rtl, rtl)
2219        });
2220  
2221      case "setOrientation":
2222        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2223          orientation: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.orientation, orientation)
2224        });
2225  
2226      case "setCurrentId":
2227        {
2228          var nextCurrentId = getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2229            currentId: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.currentId, currentId)
2230          }));
2231          return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2232            currentId: nextCurrentId,
2233            hasSetCurrentId: true
2234          });
2235        }
2236  
2237      case "setLoop":
2238        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2239          loop: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.loop, loop)
2240        });
2241  
2242      case "setWrap":
2243        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2244          wrap: Object(reakit_utils_applyState__WEBPACK_IMPORTED_MODULE_4__[/* applyState */ "a"])(action.wrap, wrap)
2245        });
2246  
2247      case "reset":
2248        return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2249          unstable_virtual: initialVirtual,
2250          rtl: initialRTL,
2251          orientation: initialOrientation,
2252          currentId: getCurrentId(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, state), {}, {
2253            currentId: initialCurrentId
2254          })),
2255          loop: initialLoop,
2256          wrap: initialWrap,
2257          unstable_moves: 0,
2258          pastIds: []
2259        });
2260  
2261      default:
2262        throw new Error();
2263    }
2264  }
2265  
2266  function useAction(fn) {
2267    return Object(react__WEBPACK_IMPORTED_MODULE_1__["useCallback"])(fn, []);
2268  }
2269  
2270  function useIsUnmountedRef() {
2271    var isUnmountedRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(false);
2272    Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_2__[/* useIsomorphicEffect */ "a"])(function () {
2273      return function () {
2274        isUnmountedRef.current = true;
2275      };
2276    }, []);
2277    return isUnmountedRef;
2278  }
2279  
2280  function useCompositeState(initialState) {
2281    if (initialState === void 0) {
2282      initialState = {};
2283    }
2284  
2285    var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_3__[/* useSealedState */ "a"])(initialState),
2286        _useSealedState$unsta = _useSealedState.unstable_virtual,
2287        virtual = _useSealedState$unsta === void 0 ? false : _useSealedState$unsta,
2288        _useSealedState$rtl = _useSealedState.rtl,
2289        rtl = _useSealedState$rtl === void 0 ? false : _useSealedState$rtl,
2290        orientation = _useSealedState.orientation,
2291        currentId = _useSealedState.currentId,
2292        _useSealedState$loop = _useSealedState.loop,
2293        loop = _useSealedState$loop === void 0 ? false : _useSealedState$loop,
2294        _useSealedState$wrap = _useSealedState.wrap,
2295        wrap = _useSealedState$wrap === void 0 ? false : _useSealedState$wrap,
2296        sealed = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_useSealedState, ["unstable_virtual", "rtl", "orientation", "currentId", "loop", "wrap"]);
2297  
2298    var _React$useReducer = Object(react__WEBPACK_IMPORTED_MODULE_1__["useReducer"])(reducer, {
2299      unstable_virtual: virtual,
2300      rtl: rtl,
2301      orientation: orientation,
2302      items: [],
2303      groups: [],
2304      currentId: currentId,
2305      loop: loop,
2306      wrap: wrap,
2307      unstable_moves: 0,
2308      pastIds: [],
2309      initialVirtual: virtual,
2310      initialRTL: rtl,
2311      initialOrientation: orientation,
2312      initialCurrentId: currentId,
2313      initialLoop: loop,
2314      initialWrap: wrap
2315    }),
2316        _React$useReducer$ = _React$useReducer[0],
2317        pastIds = _React$useReducer$.pastIds,
2318        initialVirtual = _React$useReducer$.initialVirtual,
2319        initialRTL = _React$useReducer$.initialRTL,
2320        initialOrientation = _React$useReducer$.initialOrientation,
2321        initialCurrentId = _React$useReducer$.initialCurrentId,
2322        initialLoop = _React$useReducer$.initialLoop,
2323        initialWrap = _React$useReducer$.initialWrap,
2324        hasSetCurrentId = _React$useReducer$.hasSetCurrentId,
2325        state = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_React$useReducer$, ["pastIds", "initialVirtual", "initialRTL", "initialOrientation", "initialCurrentId", "initialLoop", "initialWrap", "hasSetCurrentId"]),
2326        dispatch = _React$useReducer[1];
2327  
2328    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(false),
2329        hasActiveWidget = _React$useState[0],
2330        setHasActiveWidget = _React$useState[1];
2331  
2332    var idState = Object(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"])(sealed); // register/unregister may be called when this component is unmounted. We
2333    // store the unmounted state here so we don't update the state if it's true.
2334    // This only happens in a very specific situation.
2335    // See https://github.com/reakit/reakit/issues/650
2336  
2337    var isUnmountedRef = useIsUnmountedRef();
2338    return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, idState), state), {}, {
2339      unstable_hasActiveWidget: hasActiveWidget,
2340      unstable_setHasActiveWidget: setHasActiveWidget,
2341      registerItem: useAction(function (item) {
2342        if (isUnmountedRef.current) return;
2343        dispatch({
2344          type: "registerItem",
2345          item: item
2346        });
2347      }),
2348      unregisterItem: useAction(function (id) {
2349        if (isUnmountedRef.current) return;
2350        dispatch({
2351          type: "unregisterItem",
2352          id: id
2353        });
2354      }),
2355      registerGroup: useAction(function (group) {
2356        if (isUnmountedRef.current) return;
2357        dispatch({
2358          type: "registerGroup",
2359          group: group
2360        });
2361      }),
2362      unregisterGroup: useAction(function (id) {
2363        if (isUnmountedRef.current) return;
2364        dispatch({
2365          type: "unregisterGroup",
2366          id: id
2367        });
2368      }),
2369      move: useAction(function (id) {
2370        return dispatch({
2371          type: "move",
2372          id: id
2373        });
2374      }),
2375      next: useAction(function (allTheWay) {
2376        return dispatch({
2377          type: "next",
2378          allTheWay: allTheWay
2379        });
2380      }),
2381      previous: useAction(function (allTheWay) {
2382        return dispatch({
2383          type: "previous",
2384          allTheWay: allTheWay
2385        });
2386      }),
2387      up: useAction(function (allTheWay) {
2388        return dispatch({
2389          type: "up",
2390          allTheWay: allTheWay
2391        });
2392      }),
2393      down: useAction(function (allTheWay) {
2394        return dispatch({
2395          type: "down",
2396          allTheWay: allTheWay
2397        });
2398      }),
2399      first: useAction(function () {
2400        return dispatch({
2401          type: "first"
2402        });
2403      }),
2404      last: useAction(function () {
2405        return dispatch({
2406          type: "last"
2407        });
2408      }),
2409      unstable_sort: useAction(function () {
2410        return dispatch({
2411          type: "sort"
2412        });
2413      }),
2414      unstable_setVirtual: useAction(function (value) {
2415        return dispatch({
2416          type: "setVirtual",
2417          virtual: value
2418        });
2419      }),
2420      setRTL: useAction(function (value) {
2421        return dispatch({
2422          type: "setRTL",
2423          rtl: value
2424        });
2425      }),
2426      setOrientation: useAction(function (value) {
2427        return dispatch({
2428          type: "setOrientation",
2429          orientation: value
2430        });
2431      }),
2432      setCurrentId: useAction(function (value) {
2433        return dispatch({
2434          type: "setCurrentId",
2435          currentId: value
2436        });
2437      }),
2438      setLoop: useAction(function (value) {
2439        return dispatch({
2440          type: "setLoop",
2441          loop: value
2442        });
2443      }),
2444      setWrap: useAction(function (value) {
2445        return dispatch({
2446          type: "setWrap",
2447          wrap: value
2448        });
2449      }),
2450      reset: useAction(function () {
2451        return dispatch({
2452          type: "reset"
2453        });
2454      })
2455    });
2456  }
2457  var keys = [].concat(_Id_IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"].__keys, ["unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "unstable_moves", "unstable_hasActiveWidget", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "unstable_sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "reset", "unstable_setHasActiveWidget"]);
2458  useCompositeState.__keys = keys;
2459  
2460  
2461  
2462  
2463  /***/ }),
2464  /* 52 */
2465  /***/ (function(module, exports) {
2466  
2467  (function() { module.exports = this["wp"]["keyboardShortcuts"]; }());
2468  
2469  /***/ }),
2470  /* 53 */
2471  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2472  
2473  "use strict";
2474  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isSelfTarget; });
2475  /**
2476   * Returns `true` if `event.target` and `event.currentTarget` are the same.
2477   */
2478  function isSelfTarget(event) {
2479    return event.target === event.currentTarget;
2480  }
2481  
2482  
2483  
2484  
2485  /***/ }),
2486  /* 54 */
2487  /***/ (function(module, exports) {
2488  
2489  (function() { module.exports = this["wp"]["a11y"]; }());
2490  
2491  /***/ }),
2492  /* 55 */
2493  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2494  
2495  "use strict";
2496  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
2497  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _objectWithoutPropertiesLoose; });
2498  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _createForOfIteratorHelperLoose; });
2499  function _defineProperty(obj, key, value) {
2500    if (key in obj) {
2501      Object.defineProperty(obj, key, {
2502        value: value,
2503        enumerable: true,
2504        configurable: true,
2505        writable: true
2506      });
2507    } else {
2508      obj[key] = value;
2509    }
2510  
2511    return obj;
2512  }
2513  
2514  function ownKeys(object, enumerableOnly) {
2515    var keys = Object.keys(object);
2516  
2517    if (Object.getOwnPropertySymbols) {
2518      var symbols = Object.getOwnPropertySymbols(object);
2519      if (enumerableOnly) symbols = symbols.filter(function (sym) {
2520        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2521      });
2522      keys.push.apply(keys, symbols);
2523    }
2524  
2525    return keys;
2526  }
2527  
2528  function _objectSpread2(target) {
2529    for (var i = 1; i < arguments.length; i++) {
2530      var source = arguments[i] != null ? arguments[i] : {};
2531  
2532      if (i % 2) {
2533        ownKeys(Object(source), true).forEach(function (key) {
2534          _defineProperty(target, key, source[key]);
2535        });
2536      } else if (Object.getOwnPropertyDescriptors) {
2537        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2538      } else {
2539        ownKeys(Object(source)).forEach(function (key) {
2540          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2541        });
2542      }
2543    }
2544  
2545    return target;
2546  }
2547  
2548  function _objectWithoutPropertiesLoose(source, excluded) {
2549    if (source == null) return {};
2550    var target = {};
2551    var sourceKeys = Object.keys(source);
2552    var key, i;
2553  
2554    for (i = 0; i < sourceKeys.length; i++) {
2555      key = sourceKeys[i];
2556      if (excluded.indexOf(key) >= 0) continue;
2557      target[key] = source[key];
2558    }
2559  
2560    return target;
2561  }
2562  
2563  function _unsupportedIterableToArray(o, minLen) {
2564    if (!o) return;
2565    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2566    var n = Object.prototype.toString.call(o).slice(8, -1);
2567    if (n === "Object" && o.constructor) n = o.constructor.name;
2568    if (n === "Map" || n === "Set") return Array.from(o);
2569    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2570  }
2571  
2572  function _arrayLikeToArray(arr, len) {
2573    if (len == null || len > arr.length) len = arr.length;
2574  
2575    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
2576  
2577    return arr2;
2578  }
2579  
2580  function _createForOfIteratorHelperLoose(o, allowArrayLike) {
2581    var it;
2582  
2583    if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
2584      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
2585        if (it) o = it;
2586        var i = 0;
2587        return function () {
2588          if (i >= o.length) return {
2589            done: true
2590          };
2591          return {
2592            done: false,
2593            value: o[i++]
2594          };
2595        };
2596      }
2597  
2598      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2599    }
2600  
2601    it = o[Symbol.iterator]();
2602    return it.next.bind(it);
2603  }
2604  
2605  
2606  
2607  
2608  /***/ }),
2609  /* 56 */
2610  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2611  
2612  "use strict";
2613  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return shallowEqual; });
2614  /**
2615   * Compares two objects.
2616   *
2617   * @example
2618   * import { shallowEqual } from "reakit-utils";
2619   *
2620   * shallowEqual({ a: "a" }, {}); // false
2621   * shallowEqual({ a: "a" }, { b: "b" }); // false
2622   * shallowEqual({ a: "a" }, { a: "a" }); // true
2623   * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false
2624   */
2625  function shallowEqual(objA, objB) {
2626    if (objA === objB) return true;
2627    if (!objA) return false;
2628    if (!objB) return false;
2629    if (typeof objA !== "object") return false;
2630    if (typeof objB !== "object") return false;
2631    var aKeys = Object.keys(objA);
2632    var bKeys = Object.keys(objB);
2633    var length = aKeys.length;
2634    if (bKeys.length !== length) return false;
2635  
2636    for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) {
2637      var key = _aKeys[_i];
2638  
2639      if (objA[key] !== objB[key]) {
2640        return false;
2641      }
2642    }
2643  
2644    return true;
2645  }
2646  
2647  
2648  
2649  
2650  /***/ }),
2651  /* 57 */
2652  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2653  
2654  "use strict";
2655  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getActiveElement; });
2656  /* harmony import */ var _getDocument_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47);
2657  
2658  
2659  /**
2660   * Returns `element.ownerDocument.activeElement`.
2661   */
2662  
2663  function getActiveElement(element) {
2664    return Object(_getDocument_js__WEBPACK_IMPORTED_MODULE_0__[/* getDocument */ "a"])(element).activeElement;
2665  }
2666  
2667  
2668  
2669  
2670  /***/ }),
2671  /* 58 */,
2672  /* 59 */
2673  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2674  
2675  "use strict";
2676  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useIsomorphicEffect; });
2677  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2678  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2679  
2680  
2681  /**
2682   * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side
2683   * rendering.
2684   */
2685  
2686  var useIsomorphicEffect = typeof window === "undefined" ? react__WEBPACK_IMPORTED_MODULE_0__["useEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"];
2687  
2688  
2689  
2690  
2691  /***/ }),
2692  /* 60 */
2693  /***/ (function(module, exports, __webpack_require__) {
2694  
2695  /**
2696   * Memize options object.
2697   *
2698   * @typedef MemizeOptions
2699   *
2700   * @property {number} [maxSize] Maximum size of the cache.
2701   */
2702  
2703  /**
2704   * Internal cache entry.
2705   *
2706   * @typedef MemizeCacheNode
2707   *
2708   * @property {?MemizeCacheNode|undefined} [prev] Previous node.
2709   * @property {?MemizeCacheNode|undefined} [next] Next node.
2710   * @property {Array<*>}                   args   Function arguments for cache
2711   *                                               entry.
2712   * @property {*}                          val    Function result.
2713   */
2714  
2715  /**
2716   * Properties of the enhanced function for controlling cache.
2717   *
2718   * @typedef MemizeMemoizedFunction
2719   *
2720   * @property {()=>void} clear Clear the cache.
2721   */
2722  
2723  /**
2724   * Accepts a function to be memoized, and returns a new memoized function, with
2725   * optional options.
2726   *
2727   * @template {Function} F
2728   *
2729   * @param {F}             fn        Function to memoize.
2730   * @param {MemizeOptions} [options] Options object.
2731   *
2732   * @return {F & MemizeMemoizedFunction} Memoized function.
2733   */
2734  function memize( fn, options ) {
2735      var size = 0;
2736  
2737      /** @type {?MemizeCacheNode|undefined} */
2738      var head;
2739  
2740      /** @type {?MemizeCacheNode|undefined} */
2741      var tail;
2742  
2743      options = options || {};
2744  
2745  	function memoized( /* ...args */ ) {
2746          var node = head,
2747              len = arguments.length,
2748              args, i;
2749  
2750          searchCache: while ( node ) {
2751              // Perform a shallow equality test to confirm that whether the node
2752              // under test is a candidate for the arguments passed. Two arrays
2753              // are shallowly equal if their length matches and each entry is
2754              // strictly equal between the two sets. Avoid abstracting to a
2755              // function which could incur an arguments leaking deoptimization.
2756  
2757              // Check whether node arguments match arguments length
2758              if ( node.args.length !== arguments.length ) {
2759                  node = node.next;
2760                  continue;
2761              }
2762  
2763              // Check whether node arguments match arguments values
2764              for ( i = 0; i < len; i++ ) {
2765                  if ( node.args[ i ] !== arguments[ i ] ) {
2766                      node = node.next;
2767                      continue searchCache;
2768                  }
2769              }
2770  
2771              // At this point we can assume we've found a match
2772  
2773              // Surface matched node to head if not already
2774              if ( node !== head ) {
2775                  // As tail, shift to previous. Must only shift if not also
2776                  // head, since if both head and tail, there is no previous.
2777                  if ( node === tail ) {
2778                      tail = node.prev;
2779                  }
2780  
2781                  // Adjust siblings to point to each other. If node was tail,
2782                  // this also handles new tail's empty `next` assignment.
2783                  /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;
2784                  if ( node.next ) {
2785                      node.next.prev = node.prev;
2786                  }
2787  
2788                  node.next = head;
2789                  node.prev = null;
2790                  /** @type {MemizeCacheNode} */ ( head ).prev = node;
2791                  head = node;
2792              }
2793  
2794              // Return immediately
2795              return node.val;
2796          }
2797  
2798          // No cached value found. Continue to insertion phase:
2799  
2800          // Create a copy of arguments (avoid leaking deoptimization)
2801          args = new Array( len );
2802          for ( i = 0; i < len; i++ ) {
2803              args[ i ] = arguments[ i ];
2804          }
2805  
2806          node = {
2807              args: args,
2808  
2809              // Generate the result from original function
2810              val: fn.apply( null, args ),
2811          };
2812  
2813          // Don't need to check whether node is already head, since it would
2814          // have been returned above already if it was
2815  
2816          // Shift existing head down list
2817          if ( head ) {
2818              head.prev = node;
2819              node.next = head;
2820          } else {
2821              // If no head, follows that there's no tail (at initial or reset)
2822              tail = node;
2823          }
2824  
2825          // Trim tail if we're reached max size and are pending cache insertion
2826          if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {
2827              tail = /** @type {MemizeCacheNode} */ ( tail ).prev;
2828              /** @type {MemizeCacheNode} */ ( tail ).next = null;
2829          } else {
2830              size++;
2831          }
2832  
2833          head = node;
2834  
2835          return node.val;
2836      }
2837  
2838      memoized.clear = function() {
2839          head = null;
2840          tail = null;
2841          size = 0;
2842      };
2843  
2844      if ( false ) {}
2845  
2846      // Ignore reason: There's not a clear solution to create an intersection of
2847      // the function with additional properties, where the goal is to retain the
2848      // function signature of the incoming argument and add control properties
2849      // on the return value.
2850  
2851      // @ts-ignore
2852      return memoized;
2853  }
2854  
2855  module.exports = memize;
2856  
2857  
2858  /***/ }),
2859  /* 61 */
2860  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2861  
2862  "use strict";
2863  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyState; });
2864  function isUpdater(argument) {
2865    return typeof argument === "function";
2866  }
2867  /**
2868   * Receives a `setState` argument and calls it with `currentValue` if it's a
2869   * function. Otherwise return the argument as the new value.
2870   *
2871   * @example
2872   * import { applyState } from "reakit-utils";
2873   *
2874   * applyState((value) => value + 1, 1); // 2
2875   * applyState(2, 1); // 2
2876   */
2877  
2878  
2879  function applyState(argument, currentValue) {
2880    if (isUpdater(argument)) {
2881      return argument(currentValue);
2882    }
2883  
2884    return argument;
2885  }
2886  
2887  
2888  
2889  
2890  /***/ }),
2891  /* 62 */
2892  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2893  
2894  "use strict";
2895  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSealedState; });
2896  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2897  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2898  
2899  
2900  /**
2901   * React custom hook that returns the very first value passed to `initialState`,
2902   * even if it changes between re-renders.
2903   */
2904  function useSealedState(initialState) {
2905    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(initialState),
2906        sealed = _React$useState[0];
2907  
2908    return sealed;
2909  }
2910  
2911  
2912  
2913  
2914  /***/ }),
2915  /* 63 */
2916  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2917  
2918  "use strict";
2919  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useForkRef; });
2920  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2921  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2922  
2923  
2924  // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js
2925  
2926  function setRef(ref, value) {
2927    if (value === void 0) {
2928      value = null;
2929    }
2930  
2931    if (!ref) return;
2932  
2933    if (typeof ref === "function") {
2934      ref(value);
2935    } else {
2936      ref.current = value;
2937    }
2938  }
2939  /**
2940   * Merges up to two React Refs into a single memoized function React Ref so you
2941   * can pass it to an element.
2942   *
2943   * @example
2944   * import React from "react";
2945   * import { useForkRef } from "reakit-utils";
2946   *
2947   * const Component = React.forwardRef((props, ref) => {
2948   *   const internalRef = React.useRef();
2949   *   return <div {...props} ref={useForkRef(internalRef, ref)} />;
2950   * });
2951   */
2952  
2953  
2954  function useForkRef(refA, refB) {
2955    return Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () {
2956      if (refA == null && refB == null) {
2957        return null;
2958      }
2959  
2960      return function (value) {
2961        setRef(refA, value);
2962        setRef(refB, value);
2963      };
2964    }, [refA, refB]);
2965  }
2966  
2967  
2968  
2969  
2970  /***/ }),
2971  /* 64 */
2972  /***/ (function(module, exports) {
2973  
2974  (function() { module.exports = this["wp"]["isShallowEqual"]; }());
2975  
2976  /***/ }),
2977  /* 65 */
2978  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2979  
2980  "use strict";
2981  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useIdState; });
2982  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
2983  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2984  /* harmony import */ var reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62);
2985  /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68);
2986  
2987  
2988  
2989  
2990  function unstable_useIdState(initialState) {
2991    if (initialState === void 0) {
2992      initialState = {};
2993    }
2994  
2995    var _useSealedState = Object(reakit_utils_useSealedState__WEBPACK_IMPORTED_MODULE_1__[/* useSealedState */ "a"])(initialState),
2996        initialBaseId = _useSealedState.baseId;
2997  
2998    var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_2__[/* unstable_IdContext */ "a"]);
2999    var idCountRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
3000  
3001    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(function () {
3002      return initialBaseId || generateId();
3003    }),
3004        baseId = _React$useState[0],
3005        setBaseId = _React$useState[1];
3006  
3007    return {
3008      baseId: baseId,
3009      unstable_setBaseId: setBaseId,
3010      unstable_idCountRef: idCountRef
3011    };
3012  }
3013  var keys = ["baseId", "unstable_setBaseId", "unstable_idCountRef"];
3014  unstable_useIdState.__keys = keys;
3015  
3016  
3017  
3018  
3019  /***/ }),
3020  /* 66 */
3021  /***/ (function(module, exports, __webpack_require__) {
3022  
3023  var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.1
3024  // https://github.com/bgrins/TinyColor
3025  // Brian Grinstead, MIT License
3026  
3027  (function(Math) {
3028  
3029  var trimLeft = /^\s+/,
3030      trimRight = /\s+$/,
3031      tinyCounter = 0,
3032      mathRound = Math.round,
3033      mathMin = Math.min,
3034      mathMax = Math.max,
3035      mathRandom = Math.random;
3036  
3037  function tinycolor (color, opts) {
3038  
3039      color = (color) ? color : '';
3040      opts = opts || { };
3041  
3042      // If input is already a tinycolor, return itself
3043      if (color instanceof tinycolor) {
3044         return color;
3045      }
3046      // If we are called as a function, call using new instead
3047      if (!(this instanceof tinycolor)) {
3048          return new tinycolor(color, opts);
3049      }
3050  
3051      var rgb = inputToRGB(color);
3052      this._originalInput = color,
3053      this._r = rgb.r,
3054      this._g = rgb.g,
3055      this._b = rgb.b,
3056      this._a = rgb.a,
3057      this._roundA = mathRound(100*this._a) / 100,
3058      this._format = opts.format || rgb.format;
3059      this._gradientType = opts.gradientType;
3060  
3061      // Don't let the range of [0,255] come back in [0,1].
3062      // Potentially lose a little bit of precision here, but will fix issues where
3063      // .5 gets interpreted as half of the total, instead of half of 1
3064      // If it was supposed to be 128, this was already taken care of by `inputToRgb`
3065      if (this._r < 1) { this._r = mathRound(this._r); }
3066      if (this._g < 1) { this._g = mathRound(this._g); }
3067      if (this._b < 1) { this._b = mathRound(this._b); }
3068  
3069      this._ok = rgb.ok;
3070      this._tc_id = tinyCounter++;
3071  }
3072  
3073  tinycolor.prototype = {
3074      isDark: function() {
3075          return this.getBrightness() < 128;
3076      },
3077      isLight: function() {
3078          return !this.isDark();
3079      },
3080      isValid: function() {
3081          return this._ok;
3082      },
3083      getOriginalInput: function() {
3084        return this._originalInput;
3085      },
3086      getFormat: function() {
3087          return this._format;
3088      },
3089      getAlpha: function() {
3090          return this._a;
3091      },
3092      getBrightness: function() {
3093          //http://www.w3.org/TR/AERT#color-contrast
3094          var rgb = this.toRgb();
3095          return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
3096      },
3097      getLuminance: function() {
3098          //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
3099          var rgb = this.toRgb();
3100          var RsRGB, GsRGB, BsRGB, R, G, B;
3101          RsRGB = rgb.r/255;
3102          GsRGB = rgb.g/255;
3103          BsRGB = rgb.b/255;
3104  
3105          if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
3106          if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
3107          if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
3108          return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
3109      },
3110      setAlpha: function(value) {
3111          this._a = boundAlpha(value);
3112          this._roundA = mathRound(100*this._a) / 100;
3113          return this;
3114      },
3115      toHsv: function() {
3116          var hsv = rgbToHsv(this._r, this._g, this._b);
3117          return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
3118      },
3119      toHsvString: function() {
3120          var hsv = rgbToHsv(this._r, this._g, this._b);
3121          var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
3122          return (this._a == 1) ?
3123            "hsv("  + h + ", " + s + "%, " + v + "%)" :
3124            "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
3125      },
3126      toHsl: function() {
3127          var hsl = rgbToHsl(this._r, this._g, this._b);
3128          return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
3129      },
3130      toHslString: function() {
3131          var hsl = rgbToHsl(this._r, this._g, this._b);
3132          var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
3133          return (this._a == 1) ?
3134            "hsl("  + h + ", " + s + "%, " + l + "%)" :
3135            "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
3136      },
3137      toHex: function(allow3Char) {
3138          return rgbToHex(this._r, this._g, this._b, allow3Char);
3139      },
3140      toHexString: function(allow3Char) {
3141          return '#' + this.toHex(allow3Char);
3142      },
3143      toHex8: function(allow4Char) {
3144          return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
3145      },
3146      toHex8String: function(allow4Char) {
3147          return '#' + this.toHex8(allow4Char);
3148      },
3149      toRgb: function() {
3150          return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
3151      },
3152      toRgbString: function() {
3153          return (this._a == 1) ?
3154            "rgb("  + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
3155            "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
3156      },
3157      toPercentageRgb: function() {
3158          return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
3159      },
3160      toPercentageRgbString: function() {
3161          return (this._a == 1) ?
3162            "rgb("  + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
3163            "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
3164      },
3165      toName: function() {
3166          if (this._a === 0) {
3167              return "transparent";
3168          }
3169  
3170          if (this._a < 1) {
3171              return false;
3172          }
3173  
3174          return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
3175      },
3176      toFilter: function(secondColor) {
3177          var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
3178          var secondHex8String = hex8String;
3179          var gradientType = this._gradientType ? "GradientType = 1, " : "";
3180  
3181          if (secondColor) {
3182              var s = tinycolor(secondColor);
3183              secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
3184          }
3185  
3186          return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
3187      },
3188      toString: function(format) {
3189          var formatSet = !!format;
3190          format = format || this._format;
3191  
3192          var formattedString = false;
3193          var hasAlpha = this._a < 1 && this._a >= 0;
3194          var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
3195  
3196          if (needsAlphaFormat) {
3197              // Special case for "transparent", all other non-alpha formats
3198              // will return rgba when there is transparency.
3199              if (format === "name" && this._a === 0) {
3200                  return this.toName();
3201              }
3202              return this.toRgbString();
3203          }
3204          if (format === "rgb") {
3205              formattedString = this.toRgbString();
3206          }
3207          if (format === "prgb") {
3208              formattedString = this.toPercentageRgbString();
3209          }
3210          if (format === "hex" || format === "hex6") {
3211              formattedString = this.toHexString();
3212          }
3213          if (format === "hex3") {
3214              formattedString = this.toHexString(true);
3215          }
3216          if (format === "hex4") {
3217              formattedString = this.toHex8String(true);
3218          }
3219          if (format === "hex8") {
3220              formattedString = this.toHex8String();
3221          }
3222          if (format === "name") {
3223              formattedString = this.toName();
3224          }
3225          if (format === "hsl") {
3226              formattedString = this.toHslString();
3227          }
3228          if (format === "hsv") {
3229              formattedString = this.toHsvString();
3230          }
3231  
3232          return formattedString || this.toHexString();
3233      },
3234      clone: function() {
3235          return tinycolor(this.toString());
3236      },
3237  
3238      _applyModification: function(fn, args) {
3239          var color = fn.apply(null, [this].concat([].slice.call(args)));
3240          this._r = color._r;
3241          this._g = color._g;
3242          this._b = color._b;
3243          this.setAlpha(color._a);
3244          return this;
3245      },
3246      lighten: function() {
3247          return this._applyModification(lighten, arguments);
3248      },
3249      brighten: function() {
3250          return this._applyModification(brighten, arguments);
3251      },
3252      darken: function() {
3253          return this._applyModification(darken, arguments);
3254      },
3255      desaturate: function() {
3256          return this._applyModification(desaturate, arguments);
3257      },
3258      saturate: function() {
3259          return this._applyModification(saturate, arguments);
3260      },
3261      greyscale: function() {
3262          return this._applyModification(greyscale, arguments);
3263      },
3264      spin: function() {
3265          return this._applyModification(spin, arguments);
3266      },
3267  
3268      _applyCombination: function(fn, args) {
3269          return fn.apply(null, [this].concat([].slice.call(args)));
3270      },
3271      analogous: function() {
3272          return this._applyCombination(analogous, arguments);
3273      },
3274      complement: function() {
3275          return this._applyCombination(complement, arguments);
3276      },
3277      monochromatic: function() {
3278          return this._applyCombination(monochromatic, arguments);
3279      },
3280      splitcomplement: function() {
3281          return this._applyCombination(splitcomplement, arguments);
3282      },
3283      triad: function() {
3284          return this._applyCombination(triad, arguments);
3285      },
3286      tetrad: function() {
3287          return this._applyCombination(tetrad, arguments);
3288      }
3289  };
3290  
3291  // If input is an object, force 1 into "1.0" to handle ratios properly
3292  // String input requires "1.0" as input, so 1 will be treated as 1
3293  tinycolor.fromRatio = function(color, opts) {
3294      if (typeof color == "object") {
3295          var newColor = {};
3296          for (var i in color) {
3297              if (color.hasOwnProperty(i)) {
3298                  if (i === "a") {
3299                      newColor[i] = color[i];
3300                  }
3301                  else {
3302                      newColor[i] = convertToPercentage(color[i]);
3303                  }
3304              }
3305          }
3306          color = newColor;
3307      }
3308  
3309      return tinycolor(color, opts);
3310  };
3311  
3312  // Given a string or object, convert that input to RGB
3313  // Possible string inputs:
3314  //
3315  //     "red"
3316  //     "#f00" or "f00"
3317  //     "#ff0000" or "ff0000"
3318  //     "#ff000000" or "ff000000"
3319  //     "rgb 255 0 0" or "rgb (255, 0, 0)"
3320  //     "rgb 1.0 0 0" or "rgb (1, 0, 0)"
3321  //     "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
3322  //     "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
3323  //     "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
3324  //     "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
3325  //     "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
3326  //
3327  function inputToRGB(color) {
3328  
3329      var rgb = { r: 0, g: 0, b: 0 };
3330      var a = 1;
3331      var s = null;
3332      var v = null;
3333      var l = null;
3334      var ok = false;
3335      var format = false;
3336  
3337      if (typeof color == "string") {
3338          color = stringInputToObject(color);
3339      }
3340  
3341      if (typeof color == "object") {
3342          if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
3343              rgb = rgbToRgb(color.r, color.g, color.b);
3344              ok = true;
3345              format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
3346          }
3347          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
3348              s = convertToPercentage(color.s);
3349              v = convertToPercentage(color.v);
3350              rgb = hsvToRgb(color.h, s, v);
3351              ok = true;
3352              format = "hsv";
3353          }
3354          else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
3355              s = convertToPercentage(color.s);
3356              l = convertToPercentage(color.l);
3357              rgb = hslToRgb(color.h, s, l);
3358              ok = true;
3359              format = "hsl";
3360          }
3361  
3362          if (color.hasOwnProperty("a")) {
3363              a = color.a;
3364          }
3365      }
3366  
3367      a = boundAlpha(a);
3368  
3369      return {
3370          ok: ok,
3371          format: color.format || format,
3372          r: mathMin(255, mathMax(rgb.r, 0)),
3373          g: mathMin(255, mathMax(rgb.g, 0)),
3374          b: mathMin(255, mathMax(rgb.b, 0)),
3375          a: a
3376      };
3377  }
3378  
3379  
3380  // Conversion Functions
3381  // --------------------
3382  
3383  // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
3384  // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
3385  
3386  // `rgbToRgb`
3387  // Handle bounds / percentage checking to conform to CSS color spec
3388  // <http://www.w3.org/TR/css3-color/>
3389  // *Assumes:* r, g, b in [0, 255] or [0, 1]
3390  // *Returns:* { r, g, b } in [0, 255]
3391  function rgbToRgb(r, g, b){
3392      return {
3393          r: bound01(r, 255) * 255,
3394          g: bound01(g, 255) * 255,
3395          b: bound01(b, 255) * 255
3396      };
3397  }
3398  
3399  // `rgbToHsl`
3400  // Converts an RGB color value to HSL.
3401  // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
3402  // *Returns:* { h, s, l } in [0,1]
3403  function rgbToHsl(r, g, b) {
3404  
3405      r = bound01(r, 255);
3406      g = bound01(g, 255);
3407      b = bound01(b, 255);
3408  
3409      var max = mathMax(r, g, b), min = mathMin(r, g, b);
3410      var h, s, l = (max + min) / 2;
3411  
3412      if(max == min) {
3413          h = s = 0; // achromatic
3414      }
3415      else {
3416          var d = max - min;
3417          s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
3418          switch(max) {
3419              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
3420              case g: h = (b - r) / d + 2; break;
3421              case b: h = (r - g) / d + 4; break;
3422          }
3423  
3424          h /= 6;
3425      }
3426  
3427      return { h: h, s: s, l: l };
3428  }
3429  
3430  // `hslToRgb`
3431  // Converts an HSL color value to RGB.
3432  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
3433  // *Returns:* { r, g, b } in the set [0, 255]
3434  function hslToRgb(h, s, l) {
3435      var r, g, b;
3436  
3437      h = bound01(h, 360);
3438      s = bound01(s, 100);
3439      l = bound01(l, 100);
3440  
3441      function hue2rgb(p, q, t) {
3442          if(t < 0) t += 1;
3443          if(t > 1) t -= 1;
3444          if(t < 1/6) return p + (q - p) * 6 * t;
3445          if(t < 1/2) return q;
3446          if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
3447          return p;
3448      }
3449  
3450      if(s === 0) {
3451          r = g = b = l; // achromatic
3452      }
3453      else {
3454          var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
3455          var p = 2 * l - q;
3456          r = hue2rgb(p, q, h + 1/3);
3457          g = hue2rgb(p, q, h);
3458          b = hue2rgb(p, q, h - 1/3);
3459      }
3460  
3461      return { r: r * 255, g: g * 255, b: b * 255 };
3462  }
3463  
3464  // `rgbToHsv`
3465  // Converts an RGB color value to HSV
3466  // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
3467  // *Returns:* { h, s, v } in [0,1]
3468  function rgbToHsv(r, g, b) {
3469  
3470      r = bound01(r, 255);
3471      g = bound01(g, 255);
3472      b = bound01(b, 255);
3473  
3474      var max = mathMax(r, g, b), min = mathMin(r, g, b);
3475      var h, s, v = max;
3476  
3477      var d = max - min;
3478      s = max === 0 ? 0 : d / max;
3479  
3480      if(max == min) {
3481          h = 0; // achromatic
3482      }
3483      else {
3484          switch(max) {
3485              case r: h = (g - b) / d + (g < b ? 6 : 0); break;
3486              case g: h = (b - r) / d + 2; break;
3487              case b: h = (r - g) / d + 4; break;
3488          }
3489          h /= 6;
3490      }
3491      return { h: h, s: s, v: v };
3492  }
3493  
3494  // `hsvToRgb`
3495  // Converts an HSV color value to RGB.
3496  // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
3497  // *Returns:* { r, g, b } in the set [0, 255]
3498   function hsvToRgb(h, s, v) {
3499  
3500      h = bound01(h, 360) * 6;
3501      s = bound01(s, 100);
3502      v = bound01(v, 100);
3503  
3504      var i = Math.floor(h),
3505          f = h - i,
3506          p = v * (1 - s),
3507          q = v * (1 - f * s),
3508          t = v * (1 - (1 - f) * s),
3509          mod = i % 6,
3510          r = [v, q, p, p, t, v][mod],
3511          g = [t, v, v, q, p, p][mod],
3512          b = [p, p, t, v, v, q][mod];
3513  
3514      return { r: r * 255, g: g * 255, b: b * 255 };
3515  }
3516  
3517  // `rgbToHex`
3518  // Converts an RGB color to hex
3519  // Assumes r, g, and b are contained in the set [0, 255]
3520  // Returns a 3 or 6 character hex
3521  function rgbToHex(r, g, b, allow3Char) {
3522  
3523      var hex = [
3524          pad2(mathRound(r).toString(16)),
3525          pad2(mathRound(g).toString(16)),
3526          pad2(mathRound(b).toString(16))
3527      ];
3528  
3529      // Return a 3 character hex if possible
3530      if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
3531          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
3532      }
3533  
3534      return hex.join("");
3535  }
3536  
3537  // `rgbaToHex`
3538  // Converts an RGBA color plus alpha transparency to hex
3539  // Assumes r, g, b are contained in the set [0, 255] and
3540  // a in [0, 1]. Returns a 4 or 8 character rgba hex
3541  function rgbaToHex(r, g, b, a, allow4Char) {
3542  
3543      var hex = [
3544          pad2(mathRound(r).toString(16)),
3545          pad2(mathRound(g).toString(16)),
3546          pad2(mathRound(b).toString(16)),
3547          pad2(convertDecimalToHex(a))
3548      ];
3549  
3550      // Return a 4 character hex if possible
3551      if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
3552          return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
3553      }
3554  
3555      return hex.join("");
3556  }
3557  
3558  // `rgbaToArgbHex`
3559  // Converts an RGBA color to an ARGB Hex8 string
3560  // Rarely used, but required for "toFilter()"
3561  function rgbaToArgbHex(r, g, b, a) {
3562  
3563      var hex = [
3564          pad2(convertDecimalToHex(a)),
3565          pad2(mathRound(r).toString(16)),
3566          pad2(mathRound(g).toString(16)),
3567          pad2(mathRound(b).toString(16))
3568      ];
3569  
3570      return hex.join("");
3571  }
3572  
3573  // `equals`
3574  // Can be called with any tinycolor input
3575  tinycolor.equals = function (color1, color2) {
3576      if (!color1 || !color2) { return false; }
3577      return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
3578  };
3579  
3580  tinycolor.random = function() {
3581      return tinycolor.fromRatio({
3582          r: mathRandom(),
3583          g: mathRandom(),
3584          b: mathRandom()
3585      });
3586  };
3587  
3588  
3589  // Modification Functions
3590  // ----------------------
3591  // Thanks to less.js for some of the basics here
3592  // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
3593  
3594  function desaturate(color, amount) {
3595      amount = (amount === 0) ? 0 : (amount || 10);
3596      var hsl = tinycolor(color).toHsl();
3597      hsl.s -= amount / 100;
3598      hsl.s = clamp01(hsl.s);
3599      return tinycolor(hsl);
3600  }
3601  
3602  function saturate(color, amount) {
3603      amount = (amount === 0) ? 0 : (amount || 10);
3604      var hsl = tinycolor(color).toHsl();
3605      hsl.s += amount / 100;
3606      hsl.s = clamp01(hsl.s);
3607      return tinycolor(hsl);
3608  }
3609  
3610  function greyscale(color) {
3611      return tinycolor(color).desaturate(100);
3612  }
3613  
3614  function lighten (color, amount) {
3615      amount = (amount === 0) ? 0 : (amount || 10);
3616      var hsl = tinycolor(color).toHsl();
3617      hsl.l += amount / 100;
3618      hsl.l = clamp01(hsl.l);
3619      return tinycolor(hsl);
3620  }
3621  
3622  function brighten(color, amount) {
3623      amount = (amount === 0) ? 0 : (amount || 10);
3624      var rgb = tinycolor(color).toRgb();
3625      rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
3626      rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
3627      rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
3628      return tinycolor(rgb);
3629  }
3630  
3631  function darken (color, amount) {
3632      amount = (amount === 0) ? 0 : (amount || 10);
3633      var hsl = tinycolor(color).toHsl();
3634      hsl.l -= amount / 100;
3635      hsl.l = clamp01(hsl.l);
3636      return tinycolor(hsl);
3637  }
3638  
3639  // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
3640  // Values outside of this range will be wrapped into this range.
3641  function spin(color, amount) {
3642      var hsl = tinycolor(color).toHsl();
3643      var hue = (hsl.h + amount) % 360;
3644      hsl.h = hue < 0 ? 360 + hue : hue;
3645      return tinycolor(hsl);
3646  }
3647  
3648  // Combination Functions
3649  // ---------------------
3650  // Thanks to jQuery xColor for some of the ideas behind these
3651  // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
3652  
3653  function complement(color) {
3654      var hsl = tinycolor(color).toHsl();
3655      hsl.h = (hsl.h + 180) % 360;
3656      return tinycolor(hsl);
3657  }
3658  
3659  function triad(color) {
3660      var hsl = tinycolor(color).toHsl();
3661      var h = hsl.h;
3662      return [
3663          tinycolor(color),
3664          tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
3665          tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
3666      ];
3667  }
3668  
3669  function tetrad(color) {
3670      var hsl = tinycolor(color).toHsl();
3671      var h = hsl.h;
3672      return [
3673          tinycolor(color),
3674          tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
3675          tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
3676          tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
3677      ];
3678  }
3679  
3680  function splitcomplement(color) {
3681      var hsl = tinycolor(color).toHsl();
3682      var h = hsl.h;
3683      return [
3684          tinycolor(color),
3685          tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
3686          tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
3687      ];
3688  }
3689  
3690  function analogous(color, results, slices) {
3691      results = results || 6;
3692      slices = slices || 30;
3693  
3694      var hsl = tinycolor(color).toHsl();
3695      var part = 360 / slices;
3696      var ret = [tinycolor(color)];
3697  
3698      for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
3699          hsl.h = (hsl.h + part) % 360;
3700          ret.push(tinycolor(hsl));
3701      }
3702      return ret;
3703  }
3704  
3705  function monochromatic(color, results) {
3706      results = results || 6;
3707      var hsv = tinycolor(color).toHsv();
3708      var h = hsv.h, s = hsv.s, v = hsv.v;
3709      var ret = [];
3710      var modification = 1 / results;
3711  
3712      while (results--) {
3713          ret.push(tinycolor({ h: h, s: s, v: v}));
3714          v = (v + modification) % 1;
3715      }
3716  
3717      return ret;
3718  }
3719  
3720  // Utility Functions
3721  // ---------------------
3722  
3723  tinycolor.mix = function(color1, color2, amount) {
3724      amount = (amount === 0) ? 0 : (amount || 50);
3725  
3726      var rgb1 = tinycolor(color1).toRgb();
3727      var rgb2 = tinycolor(color2).toRgb();
3728  
3729      var p = amount / 100;
3730  
3731      var rgba = {
3732          r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
3733          g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
3734          b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
3735          a: ((rgb2.a - rgb1.a) * p) + rgb1.a
3736      };
3737  
3738      return tinycolor(rgba);
3739  };
3740  
3741  
3742  // Readability Functions
3743  // ---------------------
3744  // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
3745  
3746  // `contrast`
3747  // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
3748  tinycolor.readability = function(color1, color2) {
3749      var c1 = tinycolor(color1);
3750      var c2 = tinycolor(color2);
3751      return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
3752  };
3753  
3754  // `isReadable`
3755  // Ensure that foreground and background color combinations meet WCAG2 guidelines.
3756  // The third argument is an optional Object.
3757  //      the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
3758  //      the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
3759  // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
3760  
3761  // *Example*
3762  //    tinycolor.isReadable("#000", "#111") => false
3763  //    tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
3764  tinycolor.isReadable = function(color1, color2, wcag2) {
3765      var readability = tinycolor.readability(color1, color2);
3766      var wcag2Parms, out;
3767  
3768      out = false;
3769  
3770      wcag2Parms = validateWCAG2Parms(wcag2);
3771      switch (wcag2Parms.level + wcag2Parms.size) {
3772          case "AAsmall":
3773          case "AAAlarge":
3774              out = readability >= 4.5;
3775              break;
3776          case "AAlarge":
3777              out = readability >= 3;
3778              break;
3779          case "AAAsmall":
3780              out = readability >= 7;
3781              break;
3782      }
3783      return out;
3784  
3785  };
3786  
3787  // `mostReadable`
3788  // Given a base color and a list of possible foreground or background
3789  // colors for that base, returns the most readable color.
3790  // Optionally returns Black or White if the most readable color is unreadable.
3791  // *Example*
3792  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
3793  //    tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString();  // "#ffffff"
3794  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
3795  //    tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
3796  tinycolor.mostReadable = function(baseColor, colorList, args) {
3797      var bestColor = null;
3798      var bestScore = 0;
3799      var readability;
3800      var includeFallbackColors, level, size ;
3801      args = args || {};
3802      includeFallbackColors = args.includeFallbackColors ;
3803      level = args.level;
3804      size = args.size;
3805  
3806      for (var i= 0; i < colorList.length ; i++) {
3807          readability = tinycolor.readability(baseColor, colorList[i]);
3808          if (readability > bestScore) {
3809              bestScore = readability;
3810              bestColor = tinycolor(colorList[i]);
3811          }
3812      }
3813  
3814      if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
3815          return bestColor;
3816      }
3817      else {
3818          args.includeFallbackColors=false;
3819          return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
3820      }
3821  };
3822  
3823  
3824  // Big List of Colors
3825  // ------------------
3826  // <http://www.w3.org/TR/css3-color/#svg-color>
3827  var names = tinycolor.names = {
3828      aliceblue: "f0f8ff",
3829      antiquewhite: "faebd7",
3830      aqua: "0ff",
3831      aquamarine: "7fffd4",
3832      azure: "f0ffff",
3833      beige: "f5f5dc",
3834      bisque: "ffe4c4",
3835      black: "000",
3836      blanchedalmond: "ffebcd",
3837      blue: "00f",
3838      blueviolet: "8a2be2",
3839      brown: "a52a2a",
3840      burlywood: "deb887",
3841      burntsienna: "ea7e5d",
3842      cadetblue: "5f9ea0",
3843      chartreuse: "7fff00",
3844      chocolate: "d2691e",
3845      coral: "ff7f50",
3846      cornflowerblue: "6495ed",
3847      cornsilk: "fff8dc",
3848      crimson: "dc143c",
3849      cyan: "0ff",
3850      darkblue: "00008b",
3851      darkcyan: "008b8b",
3852      darkgoldenrod: "b8860b",
3853      darkgray: "a9a9a9",
3854      darkgreen: "006400",
3855      darkgrey: "a9a9a9",
3856      darkkhaki: "bdb76b",
3857      darkmagenta: "8b008b",
3858      darkolivegreen: "556b2f",
3859      darkorange: "ff8c00",
3860      darkorchid: "9932cc",
3861      darkred: "8b0000",
3862      darksalmon: "e9967a",
3863      darkseagreen: "8fbc8f",
3864      darkslateblue: "483d8b",
3865      darkslategray: "2f4f4f",
3866      darkslategrey: "2f4f4f",
3867      darkturquoise: "00ced1",
3868      darkviolet: "9400d3",
3869      deeppink: "ff1493",
3870      deepskyblue: "00bfff",
3871      dimgray: "696969",
3872      dimgrey: "696969",
3873      dodgerblue: "1e90ff",
3874      firebrick: "b22222",
3875      floralwhite: "fffaf0",
3876      forestgreen: "228b22",
3877      fuchsia: "f0f",
3878      gainsboro: "dcdcdc",
3879      ghostwhite: "f8f8ff",
3880      gold: "ffd700",
3881      goldenrod: "daa520",
3882      gray: "808080",
3883      green: "008000",
3884      greenyellow: "adff2f",
3885      grey: "808080",
3886      honeydew: "f0fff0",
3887      hotpink: "ff69b4",
3888      indianred: "cd5c5c",
3889      indigo: "4b0082",
3890      ivory: "fffff0",
3891      khaki: "f0e68c",
3892      lavender: "e6e6fa",
3893      lavenderblush: "fff0f5",
3894      lawngreen: "7cfc00",
3895      lemonchiffon: "fffacd",
3896      lightblue: "add8e6",
3897      lightcoral: "f08080",
3898      lightcyan: "e0ffff",
3899      lightgoldenrodyellow: "fafad2",
3900      lightgray: "d3d3d3",
3901      lightgreen: "90ee90",
3902      lightgrey: "d3d3d3",
3903      lightpink: "ffb6c1",
3904      lightsalmon: "ffa07a",
3905      lightseagreen: "20b2aa",
3906      lightskyblue: "87cefa",
3907      lightslategray: "789",
3908      lightslategrey: "789",
3909      lightsteelblue: "b0c4de",
3910      lightyellow: "ffffe0",
3911      lime: "0f0",
3912      limegreen: "32cd32",
3913      linen: "faf0e6",
3914      magenta: "f0f",
3915      maroon: "800000",
3916      mediumaquamarine: "66cdaa",
3917      mediumblue: "0000cd",
3918      mediumorchid: "ba55d3",
3919      mediumpurple: "9370db",
3920      mediumseagreen: "3cb371",
3921      mediumslateblue: "7b68ee",
3922      mediumspringgreen: "00fa9a",
3923      mediumturquoise: "48d1cc",
3924      mediumvioletred: "c71585",
3925      midnightblue: "191970",
3926      mintcream: "f5fffa",
3927      mistyrose: "ffe4e1",
3928      moccasin: "ffe4b5",
3929      navajowhite: "ffdead",
3930      navy: "000080",
3931      oldlace: "fdf5e6",
3932      olive: "808000",
3933      olivedrab: "6b8e23",
3934      orange: "ffa500",
3935      orangered: "ff4500",
3936      orchid: "da70d6",
3937      palegoldenrod: "eee8aa",
3938      palegreen: "98fb98",
3939      paleturquoise: "afeeee",
3940      palevioletred: "db7093",
3941      papayawhip: "ffefd5",
3942      peachpuff: "ffdab9",
3943      peru: "cd853f",
3944      pink: "ffc0cb",
3945      plum: "dda0dd",
3946      powderblue: "b0e0e6",
3947      purple: "800080",
3948      rebeccapurple: "663399",
3949      red: "f00",
3950      rosybrown: "bc8f8f",
3951      royalblue: "4169e1",
3952      saddlebrown: "8b4513",
3953      salmon: "fa8072",
3954      sandybrown: "f4a460",
3955      seagreen: "2e8b57",
3956      seashell: "fff5ee",
3957      sienna: "a0522d",
3958      silver: "c0c0c0",
3959      skyblue: "87ceeb",
3960      slateblue: "6a5acd",
3961      slategray: "708090",
3962      slategrey: "708090",
3963      snow: "fffafa",
3964      springgreen: "00ff7f",
3965      steelblue: "4682b4",
3966      tan: "d2b48c",
3967      teal: "008080",
3968      thistle: "d8bfd8",
3969      tomato: "ff6347",
3970      turquoise: "40e0d0",
3971      violet: "ee82ee",
3972      wheat: "f5deb3",
3973      white: "fff",
3974      whitesmoke: "f5f5f5",
3975      yellow: "ff0",
3976      yellowgreen: "9acd32"
3977  };
3978  
3979  // Make it easy to access colors via `hexNames[hex]`
3980  var hexNames = tinycolor.hexNames = flip(names);
3981  
3982  
3983  // Utilities
3984  // ---------
3985  
3986  // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
3987  function flip(o) {
3988      var flipped = { };
3989      for (var i in o) {
3990          if (o.hasOwnProperty(i)) {
3991              flipped[o[i]] = i;
3992          }
3993      }
3994      return flipped;
3995  }
3996  
3997  // Return a valid alpha value [0,1] with all invalid values being set to 1
3998  function boundAlpha(a) {
3999      a = parseFloat(a);
4000  
4001      if (isNaN(a) || a < 0 || a > 1) {
4002          a = 1;
4003      }
4004  
4005      return a;
4006  }
4007  
4008  // Take input from [0, n] and return it as [0, 1]
4009  function bound01(n, max) {
4010      if (isOnePointZero(n)) { n = "100%"; }
4011  
4012      var processPercent = isPercentage(n);
4013      n = mathMin(max, mathMax(0, parseFloat(n)));
4014  
4015      // Automatically convert percentage into number
4016      if (processPercent) {
4017          n = parseInt(n * max, 10) / 100;
4018      }
4019  
4020      // Handle floating point rounding errors
4021      if ((Math.abs(n - max) < 0.000001)) {
4022          return 1;
4023      }
4024  
4025      // Convert into [0, 1] range if it isn't already
4026      return (n % max) / parseFloat(max);
4027  }
4028  
4029  // Force a number between 0 and 1
4030  function clamp01(val) {
4031      return mathMin(1, mathMax(0, val));
4032  }
4033  
4034  // Parse a base-16 hex value into a base-10 integer
4035  function parseIntFromHex(val) {
4036      return parseInt(val, 16);
4037  }
4038  
4039  // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
4040  // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
4041  function isOnePointZero(n) {
4042      return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
4043  }
4044  
4045  // Check to see if string passed in is a percentage
4046  function isPercentage(n) {
4047      return typeof n === "string" && n.indexOf('%') != -1;
4048  }
4049  
4050  // Force a hex value to have 2 characters
4051  function pad2(c) {
4052      return c.length == 1 ? '0' + c : '' + c;
4053  }
4054  
4055  // Replace a decimal with it's percentage value
4056  function convertToPercentage(n) {
4057      if (n <= 1) {
4058          n = (n * 100) + "%";
4059      }
4060  
4061      return n;
4062  }
4063  
4064  // Converts a decimal to a hex value
4065  function convertDecimalToHex(d) {
4066      return Math.round(parseFloat(d) * 255).toString(16);
4067  }
4068  // Converts a hex value to a decimal
4069  function convertHexToDecimal(h) {
4070      return (parseIntFromHex(h) / 255);
4071  }
4072  
4073  var matchers = (function() {
4074  
4075      // <http://www.w3.org/TR/css3-values/#integers>
4076      var CSS_INTEGER = "[-\\+]?\\d+%?";
4077  
4078      // <http://www.w3.org/TR/css3-values/#number-value>
4079      var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
4080  
4081      // Allow positive/negative integer/number.  Don't capture the either/or, just the entire outcome.
4082      var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
4083  
4084      // Actual matching.
4085      // Parentheses and commas are optional, but not required.
4086      // Whitespace can take the place of commas or opening paren
4087      var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
4088      var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
4089  
4090      return {
4091          CSS_UNIT: new RegExp(CSS_UNIT),
4092          rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
4093          rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
4094          hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
4095          hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
4096          hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
4097          hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
4098          hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
4099          hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
4100          hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
4101          hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
4102      };
4103  })();
4104  
4105  // `isValidCSSUnit`
4106  // Take in a single string / number and check to see if it looks like a CSS unit
4107  // (see `matchers` above for definition).
4108  function isValidCSSUnit(color) {
4109      return !!matchers.CSS_UNIT.exec(color);
4110  }
4111  
4112  // `stringInputToObject`
4113  // Permissive string parsing.  Take in a number of formats, and output an object
4114  // based on detected format.  Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
4115  function stringInputToObject(color) {
4116  
4117      color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
4118      var named = false;
4119      if (names[color]) {
4120          color = names[color];
4121          named = true;
4122      }
4123      else if (color == 'transparent') {
4124          return { r: 0, g: 0, b: 0, a: 0, format: "name" };
4125      }
4126  
4127      // Try to match string input using regular expressions.
4128      // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
4129      // Just return an object and let the conversion functions handle that.
4130      // This way the result will be the same whether the tinycolor is initialized with string or object.
4131      var match;
4132      if ((match = matchers.rgb.exec(color))) {
4133          return { r: match[1], g: match[2], b: match[3] };
4134      }
4135      if ((match = matchers.rgba.exec(color))) {
4136          return { r: match[1], g: match[2], b: match[3], a: match[4] };
4137      }
4138      if ((match = matchers.hsl.exec(color))) {
4139          return { h: match[1], s: match[2], l: match[3] };
4140      }
4141      if ((match = matchers.hsla.exec(color))) {
4142          return { h: match[1], s: match[2], l: match[3], a: match[4] };
4143      }
4144      if ((match = matchers.hsv.exec(color))) {
4145          return { h: match[1], s: match[2], v: match[3] };
4146      }
4147      if ((match = matchers.hsva.exec(color))) {
4148          return { h: match[1], s: match[2], v: match[3], a: match[4] };
4149      }
4150      if ((match = matchers.hex8.exec(color))) {
4151          return {
4152              r: parseIntFromHex(match[1]),
4153              g: parseIntFromHex(match[2]),
4154              b: parseIntFromHex(match[3]),
4155              a: convertHexToDecimal(match[4]),
4156              format: named ? "name" : "hex8"
4157          };
4158      }
4159      if ((match = matchers.hex6.exec(color))) {
4160          return {
4161              r: parseIntFromHex(match[1]),
4162              g: parseIntFromHex(match[2]),
4163              b: parseIntFromHex(match[3]),
4164              format: named ? "name" : "hex"
4165          };
4166      }
4167      if ((match = matchers.hex4.exec(color))) {
4168          return {
4169              r: parseIntFromHex(match[1] + '' + match[1]),
4170              g: parseIntFromHex(match[2] + '' + match[2]),
4171              b: parseIntFromHex(match[3] + '' + match[3]),
4172              a: convertHexToDecimal(match[4] + '' + match[4]),
4173              format: named ? "name" : "hex8"
4174          };
4175      }
4176      if ((match = matchers.hex3.exec(color))) {
4177          return {
4178              r: parseIntFromHex(match[1] + '' + match[1]),
4179              g: parseIntFromHex(match[2] + '' + match[2]),
4180              b: parseIntFromHex(match[3] + '' + match[3]),
4181              format: named ? "name" : "hex"
4182          };
4183      }
4184  
4185      return false;
4186  }
4187  
4188  function validateWCAG2Parms(parms) {
4189      // return valid WCAG2 parms for isReadable.
4190      // If input parms are invalid, return {"level":"AA", "size":"small"}
4191      var level, size;
4192      parms = parms || {"level":"AA", "size":"small"};
4193      level = (parms.level || "AA").toUpperCase();
4194      size = (parms.size || "small").toLowerCase();
4195      if (level !== "AA" && level !== "AAA") {
4196          level = "AA";
4197      }
4198      if (size !== "small" && size !== "large") {
4199          size = "small";
4200      }
4201      return {"level":level, "size":size};
4202  }
4203  
4204  // Node: Export function
4205  if ( true && module.exports) {
4206      module.exports = tinycolor;
4207  }
4208  // AMD/requirejs: Define the module
4209  else if (true) {
4210      !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return tinycolor;}).call(exports, __webpack_require__, exports, module),
4211                  __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
4212  }
4213  // Browser: Expose to window
4214  else {}
4215  
4216  })(Math);
4217  
4218  
4219  /***/ }),
4220  /* 67 */
4221  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4222  
4223  "use strict";
4224  /* unused harmony export Box */
4225  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useBox; });
4226  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4227  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
4228  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
4229  /* harmony import */ var reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(56);
4230  
4231  
4232  
4233  
4234  
4235  var useBox = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
4236    name: "Box",
4237    keys: ["unstable_system"],
4238    propsAreEqual: function propsAreEqual(prev, next) {
4239      var prevSystem = prev.unstable_system,
4240          prevProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(prev, ["unstable_system"]);
4241  
4242      var nextSystem = next.unstable_system,
4243          nextProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(next, ["unstable_system"]);
4244  
4245      if (prevSystem !== nextSystem && !Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevSystem, nextSystem)) {
4246        return false;
4247      }
4248  
4249      return Object(reakit_utils_shallowEqual__WEBPACK_IMPORTED_MODULE_3__[/* shallowEqual */ "a"])(prevProps, nextProps);
4250    }
4251  });
4252  var Box = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
4253    as: "div",
4254    useHook: useBox
4255  });
4256  
4257  
4258  
4259  
4260  /***/ }),
4261  /* 68 */
4262  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4263  
4264  "use strict";
4265  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_IdContext; });
4266  /* unused harmony export unstable_IdProvider */
4267  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4268  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4269  
4270  
4271  var defaultPrefix = "id";
4272  function generateRandomString(prefix) {
4273    if (prefix === void 0) {
4274      prefix = defaultPrefix;
4275    }
4276  
4277    return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6);
4278  }
4279  
4280  var unstable_IdContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(generateRandomString);
4281  function unstable_IdProvider(_ref) {
4282    var children = _ref.children,
4283        _ref$prefix = _ref.prefix,
4284        prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix;
4285    var count = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(0);
4286    var generateId = Object(react__WEBPACK_IMPORTED_MODULE_0__["useCallback"])(function (localPrefix) {
4287      if (localPrefix === void 0) {
4288        localPrefix = prefix;
4289      }
4290  
4291      return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current;
4292    }, [prefix]);
4293    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(unstable_IdContext.Provider, {
4294      value: generateId
4295    }, children);
4296  }
4297  
4298  
4299  
4300  
4301  /***/ }),
4302  /* 69 */
4303  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4304  
4305  "use strict";
4306  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hasFocusWithin; });
4307  /* harmony import */ var _getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
4308  
4309  
4310  
4311  /**
4312   * Checks if `element` has focus.
4313   *
4314   * @example
4315   * import { hasFocusWithin } from "reakit-utils";
4316   *
4317   * hasFocusWithin(document.getElementById("id"));
4318   */
4319  
4320  function hasFocusWithin(element) {
4321    var activeElement = Object(_getActiveElement_js__WEBPACK_IMPORTED_MODULE_0__[/* getActiveElement */ "a"])(element);
4322    if (!activeElement) return false;
4323    if (element.contains(activeElement)) return true;
4324    var activeDescendant = activeElement.getAttribute("aria-activedescendant");
4325    if (!activeDescendant) return false;
4326    return activeDescendant === element.id || !!element.querySelector("#" + activeDescendant);
4327  }
4328  
4329  
4330  
4331  
4332  /***/ }),
4333  /* 70 */
4334  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4335  
4336  "use strict";
4337  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isButton; });
4338  var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"];
4339  /**
4340   * Checks whether `element` is a native HTML button element or not.
4341   *
4342   * @example
4343   * import { isButton } from "reakit-utils";
4344   *
4345   * isButton(document.querySelector("button")); // true
4346   * isButton(document.querySelector("input[type='button']")); // true
4347   * isButton(document.querySelector("div")); // false
4348   * isButton(document.querySelector("input[type='text']")); // false
4349   *
4350   * @returns {boolean}
4351   */
4352  
4353  function isButton(element) {
4354    if (element.tagName === "BUTTON") return true;
4355  
4356    if (element.tagName === "INPUT") {
4357      var input = element;
4358      return buttonInputTypes.indexOf(input.type) !== -1;
4359    }
4360  
4361    return false;
4362  }
4363  
4364  
4365  
4366  
4367  /***/ }),
4368  /* 71 */
4369  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4370  
4371  "use strict";
4372  
4373  // EXPORTS
4374  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ensureFocus; });
4375  __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getClosestFocusable; });
4376  
4377  // UNUSED EXPORTS: getAllFocusableIn, getAllTabbableIn, getFirstFocusableIn, getFirstTabbableIn, getLastTabbableIn, getNextTabbableIn, getPreviousTabbableIn, isFocusable, isTabbable
4378  
4379  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js
4380  /**
4381   * Ponyfill for `Element.prototype.matches`
4382   *
4383   * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
4384   */
4385  function matches(element, selectors) {
4386    if ("matches" in element) return element.matches(selectors);
4387    if ("msMatchesSelector" in element) return element.msMatchesSelector(selectors);
4388    return element.webkitMatchesSelector(selectors);
4389  }
4390  
4391  
4392  
4393  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/closest.js
4394  
4395  
4396  /**
4397   * Ponyfill for `Element.prototype.closest`
4398   *
4399   * @example
4400   * import { closest } from "reakit-utils";
4401   *
4402   * closest(document.getElementById("id"), "div");
4403   * // same as
4404   * document.getElementById("id").closest("div");
4405   */
4406  function closest(element, selectors) {
4407    if ("closest" in element) return element.closest(selectors);
4408  
4409    do {
4410      if (matches(element, selectors)) return element;
4411      element = element.parentElement || element.parentNode;
4412    } while (element !== null && element.nodeType === 1);
4413  
4414    return null;
4415  }
4416  
4417  
4418  
4419  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getActiveElement.js
4420  var getActiveElement = __webpack_require__(57);
4421  
4422  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js
4423  
4424  
4425  
4426  
4427  
4428  /** @module tabbable */
4429  var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), " + "textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], " + "iframe, object, embed, area[href], audio[controls], video[controls], " + "[contenteditable]:not([contenteditable='false'])";
4430  
4431  function isVisible(element) {
4432    return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
4433  }
4434  
4435  function hasNegativeTabIndex(element) {
4436    var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
4437    return tabIndex < 0;
4438  }
4439  /**
4440   * Checks whether `element` is focusable or not.
4441   *
4442   * @memberof tabbable
4443   *
4444   * @example
4445   * import { isFocusable } from "reakit-utils";
4446   *
4447   * isFocusable(document.querySelector("input")); // true
4448   * isFocusable(document.querySelector("input[tabindex='-1']")); // true
4449   * isFocusable(document.querySelector("input[hidden]")); // false
4450   * isFocusable(document.querySelector("input:disabled")); // false
4451   */
4452  
4453  
4454  function isFocusable(element) {
4455    return matches(element, selector) && isVisible(element);
4456  }
4457  /**
4458   * Checks whether `element` is tabbable or not.
4459   *
4460   * @memberof tabbable
4461   *
4462   * @example
4463   * import { isTabbable } from "reakit-utils";
4464   *
4465   * isTabbable(document.querySelector("input")); // true
4466   * isTabbable(document.querySelector("input[tabindex='-1']")); // false
4467   * isTabbable(document.querySelector("input[hidden]")); // false
4468   * isTabbable(document.querySelector("input:disabled")); // false
4469   */
4470  
4471  function isTabbable(element) {
4472    return isFocusable(element) && !hasNegativeTabIndex(element);
4473  }
4474  /**
4475   * Returns all the focusable elements in `container`.
4476   *
4477   * @memberof tabbable
4478   *
4479   * @param {Element} container
4480   *
4481   * @returns {Element[]}
4482   */
4483  
4484  function getAllFocusableIn(container) {
4485    var allFocusable = Array.from(container.querySelectorAll(selector));
4486    allFocusable.unshift(container);
4487    return allFocusable.filter(isFocusable);
4488  }
4489  /**
4490   * Returns the first focusable element in `container`.
4491   *
4492   * @memberof tabbable
4493   *
4494   * @param {Element} container
4495   *
4496   * @returns {Element|null}
4497   */
4498  
4499  function getFirstFocusableIn(container) {
4500    var allFocusable = getAllFocusableIn(container);
4501    return allFocusable.length ? allFocusable[0] : null;
4502  }
4503  /**
4504   * Returns all the tabbable elements in `container`, including the container
4505   * itself.
4506   *
4507   * @memberof tabbable
4508   *
4509   * @param {Element} container
4510   * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones.
4511   *
4512   * @returns {Element[]}
4513   */
4514  
4515  function getAllTabbableIn(container, fallbackToFocusable) {
4516    var allFocusable = Array.from(container.querySelectorAll(selector));
4517    var allTabbable = allFocusable.filter(isTabbable);
4518  
4519    if (isTabbable(container)) {
4520      allTabbable.unshift(container);
4521    }
4522  
4523    if (!allTabbable.length && fallbackToFocusable) {
4524      return allFocusable;
4525    }
4526  
4527    return allTabbable;
4528  }
4529  /**
4530   * Returns the first tabbable element in `container`, including the container
4531   * itself if it's tabbable.
4532   *
4533   * @memberof tabbable
4534   *
4535   * @param {Element} container
4536   * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones.
4537   *
4538   * @returns {Element|null}
4539   */
4540  
4541  function getFirstTabbableIn(container, fallbackToFocusable) {
4542    var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable),
4543        first = _getAllTabbableIn[0];
4544  
4545    return first || null;
4546  }
4547  /**
4548   * Returns the last tabbable element in `container`, including the container
4549   * itself if it's tabbable.
4550   *
4551   * @memberof tabbable
4552   *
4553   * @param {Element} container
4554   * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones.
4555   *
4556   * @returns {Element|null}
4557   */
4558  
4559  function getLastTabbableIn(container, fallbackToFocusable) {
4560    var allTabbable = getAllTabbableIn(container, fallbackToFocusable);
4561    return allTabbable[allTabbable.length - 1] || null;
4562  }
4563  /**
4564   * Returns the next tabbable element in `container`.
4565   *
4566   * @memberof tabbable
4567   *
4568   * @param {Element} container
4569   * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones.
4570   *
4571   * @returns {Element|null}
4572   */
4573  
4574  function getNextTabbableIn(container, fallbackToFocusable) {
4575    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4576    var allFocusable = getAllFocusableIn(container);
4577    var index = allFocusable.indexOf(activeElement);
4578    var slice = allFocusable.slice(index + 1);
4579    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4580  }
4581  /**
4582   * Returns the previous tabbable element in `container`.
4583   *
4584   * @memberof tabbable
4585   *
4586   * @param {Element} container
4587   * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones.
4588   *
4589   * @returns {Element|null}
4590   */
4591  
4592  function getPreviousTabbableIn(container, fallbackToFocusable) {
4593    var activeElement = Object(getActiveElement["a" /* getActiveElement */])(container);
4594    var allFocusable = getAllFocusableIn(container).reverse();
4595    var index = allFocusable.indexOf(activeElement);
4596    var slice = allFocusable.slice(index + 1);
4597    return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null);
4598  }
4599  /**
4600   * Returns the closest focusable element.
4601   *
4602   * @memberof tabbable
4603   *
4604   * @param {Element} container
4605   *
4606   * @returns {Element|null}
4607   */
4608  
4609  function getClosestFocusable(element) {
4610    while (element && !isFocusable(element)) {
4611      element = closest(element, selector);
4612    }
4613  
4614    return element;
4615  }
4616  
4617  function defaultIsActive(element) {
4618    return Object(getActiveElement["a" /* getActiveElement */])(element) === element;
4619  }
4620  
4621  /**
4622   * Ensures `element` will receive focus if it's not already.
4623   *
4624   * @memberof tabbable
4625   *
4626   * @example
4627   * import { ensureFocus } from "reakit-utils";
4628   *
4629   * ensureFocus(document.activeElement); // does nothing
4630   *
4631   * const element = document.querySelector("input");
4632   *
4633   * ensureFocus(element); // focuses element
4634   * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump
4635   *
4636   * function isActive(el) {
4637   *   return el.dataset.active === "true";
4638   * }
4639   *
4640   * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing
4641   *
4642   * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed.
4643   */
4644  function ensureFocus(element, _temp) {
4645    var _ref = _temp === void 0 ? {} : _temp,
4646        _ref$isActive = _ref.isActive,
4647        isActive = _ref$isActive === void 0 ? defaultIsActive : _ref$isActive,
4648        preventScroll = _ref.preventScroll;
4649  
4650    if (isActive(element)) return -1;
4651    element.focus({
4652      preventScroll: preventScroll
4653    });
4654    if (isActive(element)) return -1;
4655    return requestAnimationFrame(function () {
4656      element.focus({
4657        preventScroll: preventScroll
4658      });
4659    });
4660  }
4661  
4662  
4663  
4664  
4665  /***/ }),
4666  /* 72 */
4667  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4668  
4669  "use strict";
4670  
4671  // EXPORTS
4672  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ isPortalEvent; });
4673  
4674  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js
4675  /**
4676   * Similar to `Element.prototype.contains`.
4677   */
4678  function contains(parent, child) {
4679    return parent === child || parent.contains(child);
4680  }
4681  
4682  
4683  
4684  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js
4685  
4686  
4687  /**
4688   * Returns `true` if `event` has been fired within a React Portal element.
4689   */
4690  
4691  function isPortalEvent(event) {
4692    return !contains(event.currentTarget, event.target);
4693  }
4694  
4695  
4696  
4697  
4698  /***/ }),
4699  /* 73 */
4700  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4701  
4702  "use strict";
4703  /* unused harmony export Tabbable */
4704  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useTabbable; });
4705  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
4706  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
4707  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
4708  /* harmony import */ var _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
4709  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
4710  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
4711  /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63);
4712  /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(70);
4713  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80);
4714  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46);
4715  /* harmony import */ var reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59);
4716  /* harmony import */ var reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(69);
4717  /* harmony import */ var reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(72);
4718  /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(57);
4719  /* harmony import */ var reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(71);
4720  
4721  
4722  
4723  
4724  
4725  
4726  
4727  
4728  
4729  
4730  
4731  
4732  
4733  
4734  
4735  
4736  function isUA(string) {
4737    if (typeof window === "undefined") return false;
4738    return window.navigator.userAgent.indexOf(string) !== -1;
4739  }
4740  
4741  var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox"));
4742  
4743  function focusIfNeeded(element) {
4744    if (!Object(reakit_utils_hasFocusWithin__WEBPACK_IMPORTED_MODULE_10__[/* hasFocusWithin */ "a"])(element)) {
4745      element.focus();
4746    }
4747  } // Safari and Firefox on MacOS don't focus on buttons on mouse down like other
4748  // browsers/platforms. Instead, they focus on the closest focusable ancestor
4749  // element, which is ultimately the body element. So we make sure to give focus
4750  // to the tabbable element on mouse down so it works consistently across
4751  // browsers.
4752  // istanbul ignore next
4753  
4754  
4755  function useFocusOnMouseDown() {
4756    if (!isSafariOrFirefoxOnMac) return undefined;
4757  
4758    var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(null),
4759        tabbable = _React$useState[0],
4760        scheduleFocus = _React$useState[1];
4761  
4762    Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
4763      if (!tabbable) return;
4764      focusIfNeeded(tabbable);
4765      scheduleFocus(null);
4766    }, [tabbable]);
4767    var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4768      var element = event.currentTarget;
4769      if (Object(reakit_utils_isPortalEvent__WEBPACK_IMPORTED_MODULE_11__[/* isPortalEvent */ "a"])(event)) return;
4770      if (!Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_6__[/* isButton */ "a"])(element)) return;
4771      var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_12__[/* getActiveElement */ "a"])(element);
4772      if (!activeElement) return;
4773      var activeElementIsBody = activeElement.tagName === "BODY";
4774      var focusableAncestor = Object(reakit_utils_tabbable__WEBPACK_IMPORTED_MODULE_13__[/* getClosestFocusable */ "b"])(element.parentElement);
4775  
4776      if (activeElement === focusableAncestor || activeElementIsBody && !focusableAncestor) {
4777        // When the active element is the focusable ancestor, it'll not emit
4778        // focus/blur events. After all, it's already focused. So we can't
4779        // listen to those events to focus this tabbable element.
4780        // When the active element is body and there's no focusable ancestor,
4781        // we also don't have any other event to listen to since body never
4782        // emits focus/blur events on itself.
4783        // In both of these cases, we have to schedule focus on this tabbable
4784        // element.
4785        scheduleFocus(element);
4786      } else if (focusableAncestor) {
4787        // Clicking (mouse down) on the tabbable element on Safari and Firefox
4788        // on MacOS will fire focus on the focusable ancestor element if
4789        // there's any and if it's not the current active element. So we wait
4790        // for this event to happen before moving focus to this element.
4791        // Instead of moving focus right away, we have to schedule it,
4792        // otherwise it's gonna prevent drag events from happening.
4793        var onFocus = function onFocus() {
4794          return scheduleFocus(element);
4795        };
4796  
4797        focusableAncestor.addEventListener("focusin", onFocus, {
4798          once: true
4799        });
4800      } else {
4801        // Finally, if there's no focsuable ancestor and there's another
4802        // element with focus, we wait for that element to get blurred before
4803        // focusing this one.
4804        var onBlur = function onBlur() {
4805          return focusIfNeeded(element);
4806        };
4807  
4808        activeElement.addEventListener("blur", onBlur, {
4809          once: true
4810        });
4811      }
4812    }, []);
4813    return onMouseDown;
4814  }
4815  
4816  function isNativeTabbable(element) {
4817    return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "AUDIO" || element.tagName === "VIDEO";
4818  }
4819  
4820  var useTabbable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
4821    name: "Tabbable",
4822    compose: _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__[/* useBox */ "a"],
4823    keys: ["disabled", "focusable"],
4824    useOptions: function useOptions(options, _ref) {
4825      var disabled = _ref.disabled;
4826      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4827        disabled: disabled
4828      }, options);
4829    },
4830    useProps: function useProps(options, _ref2) {
4831      var htmlRef = _ref2.ref,
4832          htmlTabIndex = _ref2.tabIndex,
4833          htmlOnClick = _ref2.onClick,
4834          htmlOnMouseDown = _ref2.onMouseDown,
4835          htmlStyle = _ref2.style,
4836          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["ref", "tabIndex", "onClick", "onMouseDown", "style"]);
4837  
4838      var ref = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
4839      var onClickRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnClick);
4840      var onMouseDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_8__[/* useLiveRef */ "a"])(htmlOnMouseDown);
4841      var trulyDisabled = options.disabled && !options.focusable;
4842  
4843      var _React$useState2 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(true),
4844          nativeTabbable = _React$useState2[0],
4845          setNativeTabbable = _React$useState2[1];
4846  
4847      var tabIndex = nativeTabbable ? htmlTabIndex : htmlTabIndex || 0;
4848      var style = options.disabled ? Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4849        pointerEvents: "none"
4850      }, htmlStyle) : htmlStyle;
4851      var focusOnMouseDown = useFocusOnMouseDown();
4852      Object(reakit_utils_useIsomorphicEffect__WEBPACK_IMPORTED_MODULE_9__[/* useIsomorphicEffect */ "a"])(function () {
4853        var tabbable = ref.current;
4854  
4855        if (!tabbable) {
4856           false ? undefined : void 0;
4857          return;
4858        }
4859  
4860        if (!isNativeTabbable(tabbable)) {
4861          setNativeTabbable(false);
4862        }
4863      }, []);
4864      var onClick = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4865        var _onClickRef$current;
4866  
4867        if (options.disabled) {
4868          event.stopPropagation();
4869          event.preventDefault();
4870          return;
4871        }
4872  
4873        (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event);
4874      }, [options.disabled]);
4875      var onMouseDown = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
4876        var _onMouseDownRef$curre;
4877  
4878        if (options.disabled) {
4879          event.stopPropagation();
4880          event.preventDefault();
4881          return;
4882        }
4883  
4884        (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event);
4885        if (event.defaultPrevented) return;
4886        focusOnMouseDown === null || focusOnMouseDown === void 0 ? void 0 : focusOnMouseDown(event);
4887      }, [options.disabled, focusOnMouseDown]);
4888      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
4889        ref: Object(reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[/* useForkRef */ "a"])(ref, htmlRef),
4890        style: style,
4891        tabIndex: !trulyDisabled ? tabIndex : undefined,
4892        disabled: trulyDisabled && nativeTabbable ? true : undefined,
4893        "aria-disabled": options.disabled ? true : undefined,
4894        onClick: onClick,
4895        onMouseDown: onMouseDown
4896      }, htmlProps);
4897    }
4898  });
4899  var Tabbable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
4900    as: "div",
4901    useHook: useTabbable
4902  });
4903  
4904  
4905  
4906  
4907  /***/ }),
4908  /* 74 */
4909  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4910  
4911  "use strict";
4912  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SystemContext; });
4913  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4914  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4915  
4916  
4917  var SystemContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
4918  
4919  
4920  
4921  
4922  /***/ }),
4923  /* 75 */
4924  /***/ (function(module, exports) {
4925  
4926  (function() { module.exports = this["wp"]["htmlEntities"]; }());
4927  
4928  /***/ }),
4929  /* 76 */,
4930  /* 77 */,
4931  /* 78 */
4932  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4933  
4934  "use strict";
4935  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useCreateElement; });
4936  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
4937  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4938  /* harmony import */ var _SystemContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74);
4939  /* harmony import */ var _rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55);
4940  
4941  
4942  
4943  
4944  function isRenderProp(children) {
4945    return typeof children === "function";
4946  }
4947  
4948  /**
4949   * Custom hook that will call `children` if it's a function. If
4950   * `useCreateElement` has been passed to the context, it'll be used instead.
4951   *
4952   * @example
4953   * import React from "react";
4954   * import { SystemProvider, useCreateElement } from "reakit-system";
4955   *
4956   * const system = {
4957   *   useCreateElement(type, props, children = props.children) {
4958   *     // very similar to what `useCreateElement` does already
4959   *     if (typeof children === "function") {
4960   *       const { children: _, ...rest } = props;
4961   *       return children(rest);
4962   *     }
4963   *     return React.createElement(type, props, children);
4964   *   },
4965   * };
4966   *
4967   * function Component(props) {
4968   *   return useCreateElement("div", props);
4969   * }
4970   *
4971   * function App() {
4972   *   return (
4973   *     <SystemProvider unstable_system={system}>
4974   *       <Component url="url">{({ url }) => <a href={url}>link</a>}</Component>
4975   *     </SystemProvider>
4976   *   );
4977   * }
4978   */
4979  
4980  var useCreateElement = function useCreateElement(type, props, children) {
4981    if (children === void 0) {
4982      children = props.children;
4983    }
4984  
4985    var context = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_SystemContext_js__WEBPACK_IMPORTED_MODULE_1__[/* SystemContext */ "a"]);
4986  
4987    if (context.useCreateElement) {
4988      return context.useCreateElement(type, props, children);
4989    }
4990  
4991    if (typeof type === "string" && isRenderProp(children)) {
4992      var _ = props.children,
4993          rest = Object(_rollupPluginBabelHelpers_0c84a174_js__WEBPACK_IMPORTED_MODULE_2__[/* a */ "b"])(props, ["children"]);
4994  
4995      return children(rest);
4996    }
4997  
4998    return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])(type, props, children);
4999  };
5000  
5001  
5002  
5003  
5004  /***/ }),
5005  /* 79 */,
5006  /* 80 */
5007  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5008  
5009  "use strict";
5010  
5011  // UNUSED EXPORTS: warning, useWarning
5012  
5013  // EXTERNAL MODULE: ./node_modules/reakit-warning/es/warning.js
5014  var warning = __webpack_require__(106);
5015  
5016  // EXTERNAL MODULE: external {"this":"React"}
5017  var external_this_React_ = __webpack_require__(13);
5018  
5019  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js
5020  /**
5021   * Checks whether `arg` is an object or not.
5022   *
5023   * @returns {boolean}
5024   */
5025  function isObject(arg) {
5026    return typeof arg === "object" && arg != null;
5027  }
5028  
5029  
5030  
5031  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js
5032  
5033  
5034  
5035  
5036  
5037  function isRefObject(ref) {
5038    return isObject(ref) && "current" in ref;
5039  }
5040  /**
5041   * Logs `messages` to the console using `console.warn` based on a `condition`.
5042   * This should be used inside components.
5043   */
5044  
5045  
5046  function useWarning(condition) {
5047    for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5048      messages[_key - 1] = arguments[_key];
5049    }
5050  
5051    if (false) {}
5052  }
5053  
5054  
5055  
5056  // CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js
5057  
5058  
5059  
5060  
5061  
5062  
5063  
5064  /***/ }),
5065  /* 81 */
5066  /***/ (function(module, exports) {
5067  
5068  (function() { module.exports = this["wp"]["viewport"]; }());
5069  
5070  /***/ }),
5071  /* 82 */
5072  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5073  
5074  "use strict";
5075  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createOnKeyDown; });
5076  /**
5077   * Returns an `onKeyDown` handler to be passed to a component.
5078   *
5079   * @param options
5080   */
5081  function createOnKeyDown(_temp) {
5082    var _ref = _temp === void 0 ? {} : _temp,
5083        keyMap = _ref.keyMap,
5084        onKey = _ref.onKey,
5085        stopPropagation = _ref.stopPropagation,
5086        onKeyDown = _ref.onKeyDown,
5087        _ref$shouldKeyDown = _ref.shouldKeyDown,
5088        shouldKeyDown = _ref$shouldKeyDown === void 0 ? function () {
5089      return true;
5090    } : _ref$shouldKeyDown,
5091        _ref$preventDefault = _ref.preventDefault,
5092        preventDefault = _ref$preventDefault === void 0 ? true : _ref$preventDefault;
5093  
5094    return function (event) {
5095      if (!keyMap) return;
5096      var finalKeyMap = typeof keyMap === "function" ? keyMap(event) : keyMap;
5097      var shouldPreventDefault = typeof preventDefault === "function" ? preventDefault(event) : preventDefault;
5098      var shouldStopPropagation = typeof stopPropagation === "function" ? stopPropagation(event) : stopPropagation;
5099  
5100      if (event.key in finalKeyMap) {
5101        var action = finalKeyMap[event.key];
5102  
5103        if (typeof action === "function" && shouldKeyDown(event)) {
5104          if (shouldPreventDefault) event.preventDefault();
5105          if (shouldStopPropagation) event.stopPropagation();
5106          if (onKey) onKey(event);
5107          action(event); // Prevent onKeyDown from being called twice for the same keys
5108  
5109          return;
5110        }
5111      }
5112  
5113      if (onKeyDown && "current" in onKeyDown) {
5114        var _onKeyDown$current;
5115  
5116        (_onKeyDown$current = onKeyDown.current) === null || _onKeyDown$current === void 0 ? void 0 : _onKeyDown$current.call(onKeyDown, event);
5117      } else {
5118        onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
5119      }
5120    };
5121  }
5122  
5123  
5124  
5125  
5126  /***/ }),
5127  /* 83 */,
5128  /* 84 */
5129  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5130  
5131  "use strict";
5132  /* unused harmony export Clickable */
5133  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useClickable; });
5134  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
5135  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
5136  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
5137  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
5138  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
5139  /* harmony import */ var reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70);
5140  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
5141  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(46);
5142  /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(53);
5143  /* harmony import */ var _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(73);
5144  
5145  
5146  
5147  
5148  
5149  
5150  
5151  
5152  
5153  
5154  
5155  
5156  
5157  
5158  
5159  
5160  
5161  
5162  function isNativeClick(event) {
5163    var element = event.currentTarget;
5164    if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet
5165  
5166    return Object(reakit_utils_isButton__WEBPACK_IMPORTED_MODULE_4__[/* isButton */ "a"])(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT";
5167  }
5168  
5169  var useClickable = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
5170    name: "Clickable",
5171    compose: _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_8__[/* useTabbable */ "a"],
5172    keys: ["unstable_clickOnEnter", "unstable_clickOnSpace"],
5173    useOptions: function useOptions(_ref) {
5174      var _ref$unstable_clickOn = _ref.unstable_clickOnEnter,
5175          unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn,
5176          _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace,
5177          unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2,
5178          options = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]);
5179  
5180      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5181        unstable_clickOnEnter: unstable_clickOnEnter,
5182        unstable_clickOnSpace: unstable_clickOnSpace
5183      }, options);
5184    },
5185    useProps: function useProps(options, _ref2) {
5186      var htmlOnKeyDown = _ref2.onKeyDown,
5187          htmlOnKeyUp = _ref2.onKeyUp,
5188          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref2, ["onKeyDown", "onKeyUp"]);
5189  
5190      var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false),
5191          active = _React$useState[0],
5192          setActive = _React$useState[1];
5193  
5194      var onKeyDownRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyDown);
5195      var onKeyUpRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_6__[/* useLiveRef */ "a"])(htmlOnKeyUp);
5196      var onKeyDown = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
5197        var _onKeyDownRef$current;
5198  
5199        (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event);
5200        if (event.defaultPrevented) return;
5201        if (options.disabled) return;
5202        if (event.metaKey) return;
5203        if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_7__[/* isSelfTarget */ "a"])(event)) return;
5204        var isEnter = options.unstable_clickOnEnter && event.key === "Enter";
5205        var isSpace = options.unstable_clickOnSpace && event.key === " ";
5206  
5207        if (isEnter || isSpace) {
5208          if (isNativeClick(event)) return;
5209          event.preventDefault();
5210  
5211          if (isEnter) {
5212            event.currentTarget.click();
5213          } else if (isSpace) {
5214            setActive(true);
5215          }
5216        }
5217      }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]);
5218      var onKeyUp = Object(react__WEBPACK_IMPORTED_MODULE_3__["useCallback"])(function (event) {
5219        var _onKeyUpRef$current;
5220  
5221        (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event);
5222        if (event.defaultPrevented) return;
5223        if (options.disabled) return;
5224        if (event.metaKey) return;
5225        var isSpace = options.unstable_clickOnSpace && event.key === " ";
5226  
5227        if (active && isSpace) {
5228          setActive(false);
5229          event.currentTarget.click();
5230        }
5231      }, [options.disabled, options.unstable_clickOnSpace, active]);
5232      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5233        "data-active": active || undefined,
5234        onKeyDown: onKeyDown,
5235        onKeyUp: onKeyUp
5236      }, htmlProps);
5237    }
5238  });
5239  var Clickable = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
5240    as: "button",
5241    memo: true,
5242    useHook: useClickable
5243  });
5244  
5245  
5246  
5247  
5248  /***/ }),
5249  /* 85 */,
5250  /* 86 */,
5251  /* 87 */,
5252  /* 88 */,
5253  /* 89 */,
5254  /* 90 */,
5255  /* 91 */,
5256  /* 92 */,
5257  /* 93 */
5258  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5259  
5260  "use strict";
5261  /* unused harmony export unstable_Id */
5262  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return unstable_useId; });
5263  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
5264  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
5265  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
5266  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
5267  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
5268  /* harmony import */ var _IdProvider_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68);
5269  /* harmony import */ var _IdState_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65);
5270  
5271  
5272  
5273  
5274  
5275  
5276  
5277  
5278  var unstable_useId = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
5279    useState: _IdState_js__WEBPACK_IMPORTED_MODULE_5__[/* unstable_useIdState */ "a"],
5280    keys: ["id"],
5281    useOptions: function useOptions(options, htmlProps) {
5282      var generateId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useContext"])(_IdProvider_js__WEBPACK_IMPORTED_MODULE_4__[/* unstable_IdContext */ "a"]);
5283  
5284      var _React$useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(function () {
5285        // This comes from useIdState
5286        if (options.unstable_idCountRef) {
5287          options.unstable_idCountRef.current += 1;
5288          return "-" + options.unstable_idCountRef.current;
5289        } // If there's no useIdState, we check if `baseId` was passed (as a prop,
5290        // not from useIdState).
5291  
5292  
5293        if (options.baseId) {
5294          return "-" + generateId("");
5295        }
5296  
5297        return "";
5298      }),
5299          suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState.
5300      // If there's neither, then it'll fallback to Context's generateId.
5301      // This generateId can result in a sequential ID (if there's a Provider)
5302      // or a random string (without Provider).
5303  
5304  
5305      var baseId = Object(react__WEBPACK_IMPORTED_MODULE_3__["useMemo"])(function () {
5306        return options.baseId || generateId();
5307      }, [options.baseId, generateId]);
5308      var id = htmlProps.id || options.id || "" + baseId + suffix;
5309      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
5310        id: id
5311      });
5312    },
5313    useProps: function useProps(options, htmlProps) {
5314      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({
5315        id: options.id
5316      }, htmlProps);
5317    }
5318  });
5319  var unstable_Id = Object(reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__[/* createComponent */ "a"])({
5320    as: "div",
5321    useHook: unstable_useId
5322  });
5323  
5324  
5325  
5326  
5327  /***/ }),
5328  /* 94 */
5329  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5330  
5331  "use strict";
5332  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return fireEvent; });
5333  /* harmony import */ var _createEvent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(122);
5334  
5335  
5336  
5337  /**
5338   * Creates and dispatches `Event` in a way that also works on IE 11.
5339   *
5340   * @example
5341   * import { fireEvent } from "reakit-utils";
5342   *
5343   * fireEvent(document.getElementById("id"), "blur", {
5344   *   bubbles: true,
5345   *   cancelable: true,
5346   * });
5347   */
5348  
5349  function fireEvent(element, type, eventInit) {
5350    return element.dispatchEvent(Object(_createEvent_js__WEBPACK_IMPORTED_MODULE_0__[/* createEvent */ "a"])(element, type, eventInit));
5351  }
5352  
5353  
5354  
5355  
5356  /***/ }),
5357  /* 95 */
5358  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5359  
5360  "use strict";
5361  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isTextField; });
5362  /**
5363   * Check whether the given element is a text field, where text field is defined
5364   * by the ability to select within the input, or that it is contenteditable.
5365   */
5366  function isTextField(element) {
5367    try {
5368      var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;
5369      var isTextArea = element.tagName === "TEXTAREA";
5370      var isContentEditable = element.contentEditable === "true";
5371      return isTextInput || isTextArea || isContentEditable || false;
5372    } catch (error) {
5373      // Safari throws an exception when trying to get `selectionStart`
5374      // on non-text <input> elements (which, understandably, don't
5375      // have the text selection API). We catch this via a try/catch
5376      // block, as opposed to a more explicit check of the element's
5377      // input types, because of Safari's non-standard behavior. This
5378      // also means we don't have to worry about the list of input
5379      // types that support `selectionStart` changing as the HTML spec
5380      // evolves over time.
5381      return false;
5382    }
5383  }
5384  
5385  
5386  
5387  
5388  /***/ }),
5389  /* 96 */
5390  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5391  
5392  "use strict";
5393  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return setTextFieldValue; });
5394  function setTextFieldValue(element, value) {
5395    element.value = value;
5396  }
5397  
5398  
5399  
5400  
5401  /***/ }),
5402  /* 97 */
5403  /***/ (function(module, exports, __webpack_require__) {
5404  
5405  "use strict";
5406  
5407  exports.__esModule = true;
5408  var TextareaAutosize_1 = __webpack_require__(172);
5409  exports["default"] = TextareaAutosize_1["default"];
5410  
5411  
5412  /***/ }),
5413  /* 98 */,
5414  /* 99 */,
5415  /* 100 */
5416  /***/ (function(module, exports) {
5417  
5418  (function() { module.exports = this["wp"]["notices"]; }());
5419  
5420  /***/ }),
5421  /* 101 */,
5422  /* 102 */
5423  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5424  
5425  "use strict";
5426  
5427  // EXPORTS
5428  __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ fireKeyboardEvent; });
5429  
5430  // EXTERNAL MODULE: ./node_modules/reakit-utils/es/getDocument.js
5431  var getDocument = __webpack_require__(47);
5432  
5433  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDefaultView.js
5434  
5435  
5436  /**
5437   * Returns `element.ownerDocument.defaultView || window`.
5438   */
5439  
5440  function getDefaultView(element) {
5441    return Object(getDocument["a" /* getDocument */])(element).defaultView || window;
5442  }
5443  
5444  
5445  
5446  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/createKeyboardEvent.js
5447  
5448  
5449  
5450  /**
5451   * Creates a `KeyboardEvent` in a way that also works on IE 11.
5452   *
5453   * @example
5454   * import { createKeyboardEvent } from "reakit-utils";
5455   *
5456   * const el = document.getElementById("id");
5457   * el.dispatchEvent(createKeyboardEvent(el, "keydown", { key: "ArrowDown" }));
5458   */
5459  
5460  function createKeyboardEvent(element, type, eventInit) {
5461    if (eventInit === void 0) {
5462      eventInit = {};
5463    }
5464  
5465    if (typeof KeyboardEvent === "function") {
5466      return new KeyboardEvent(type, eventInit);
5467    } // IE 11 doesn't support Event constructors
5468  
5469  
5470    var event = Object(getDocument["a" /* getDocument */])(element).createEvent("KeyboardEvent");
5471    event.initKeyboardEvent(type, eventInit.bubbles, eventInit.cancelable, getDefaultView(element), eventInit.key, eventInit.location, eventInit.ctrlKey, eventInit.altKey, eventInit.shiftKey, eventInit.metaKey);
5472    return event;
5473  }
5474  
5475  
5476  
5477  // CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireKeyboardEvent.js
5478  
5479  
5480  
5481  
5482  /**
5483   * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11.
5484   *
5485   * @example
5486   * import { fireKeyboardEvent } from "reakit-utils";
5487   *
5488   * fireKeyboardEvent(document.getElementById("id"), "keydown", {
5489   *   key: "ArrowDown",
5490   *   shiftKey: true,
5491   * });
5492   */
5493  
5494  function fireKeyboardEvent(element, type, eventInit) {
5495    return element.dispatchEvent(createKeyboardEvent(element, type, eventInit));
5496  }
5497  
5498  
5499  
5500  
5501  /***/ }),
5502  /* 103 */,
5503  /* 104 */,
5504  /* 105 */,
5505  /* 106 */
5506  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5507  
5508  "use strict";
5509  /* unused harmony export warning */
5510  
5511  
5512  /**
5513   * Logs `messages` to the console using `console.warn` based on a `condition`.
5514   *
5515   * @example
5516   * import { warning } from "reakit-warning";
5517   *
5518   * warning(true, "a", "b"); // console.warn("a", "\n", "b")
5519   * warning(false, "a", "b"); // does nothing
5520   */
5521  
5522  function warning(condition) {
5523    if (false) { var warns, _len, messages, _key, _console; }
5524  }
5525  
5526  
5527  
5528  
5529  /***/ }),
5530  /* 107 */,
5531  /* 108 */,
5532  /* 109 */,
5533  /* 110 */
5534  /***/ (function(module, exports, __webpack_require__) {
5535  
5536  "use strict";
5537  
5538  
5539  function flattenIntoMap( map, effects ) {
5540      var i;
5541      if ( Array.isArray( effects ) ) {
5542          for ( i = 0; i < effects.length; i++ ) {
5543              flattenIntoMap( map, effects[ i ] );
5544          }
5545      } else {
5546          for ( i in effects ) {
5547              map[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );
5548          }
5549      }
5550  }
5551  
5552  function refx( effects ) {
5553      var map = {},
5554          middleware;
5555  
5556      flattenIntoMap( map, effects );
5557  
5558      middleware = function( store ) {
5559          return function( next ) {
5560              return function( action ) {
5561                  var handlers = map[ action.type ],
5562                      result = next( action ),
5563                      i, handlerAction;
5564  
5565                  if ( handlers ) {
5566                      for ( i = 0; i < handlers.length; i++ ) {
5567                          handlerAction = handlers[ i ]( action, store );
5568                          if ( handlerAction ) {
5569                              store.dispatch( handlerAction );
5570                          }
5571                      }
5572                  }
5573  
5574                  return result;
5575              };
5576          };
5577      };
5578  
5579      middleware.effects = map;
5580  
5581      return middleware;
5582  }
5583  
5584  module.exports = refx;
5585  
5586  
5587  /***/ }),
5588  /* 111 */,
5589  /* 112 */,
5590  /* 113 */
5591  /***/ (function(module, exports, __webpack_require__) {
5592  
5593  "use strict";
5594  
5595  
5596  Object.defineProperty(exports, '__esModule', { value: true });
5597  
5598  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
5599  
5600  var _extends = _interopDefault(__webpack_require__(169));
5601  var _objectWithoutPropertiesLoose = _interopDefault(__webpack_require__(170));
5602  var React = __webpack_require__(13);
5603  var React__default = _interopDefault(React);
5604  var _inheritsLoose = _interopDefault(__webpack_require__(145));
5605  var _assertThisInitialized = _interopDefault(__webpack_require__(171));
5606  
5607  var is = {
5608    arr: Array.isArray,
5609    obj: function obj(a) {
5610      return Object.prototype.toString.call(a) === '[object Object]';
5611    },
5612    fun: function fun(a) {
5613      return typeof a === 'function';
5614    },
5615    str: function str(a) {
5616      return typeof a === 'string';
5617    },
5618    num: function num(a) {
5619      return typeof a === 'number';
5620    },
5621    und: function und(a) {
5622      return a === void 0;
5623    },
5624    nul: function nul(a) {
5625      return a === null;
5626    },
5627    set: function set(a) {
5628      return a instanceof Set;
5629    },
5630    map: function map(a) {
5631      return a instanceof Map;
5632    },
5633    equ: function equ(a, b) {
5634      if (typeof a !== typeof b) return false;
5635      if (is.str(a) || is.num(a)) return a === b;
5636      if (is.obj(a) && is.obj(b) && Object.keys(a).length + Object.keys(b).length === 0) return true;
5637      var i;
5638  
5639      for (i in a) {
5640        if (!(i in b)) return false;
5641      }
5642  
5643      for (i in b) {
5644        if (a[i] !== b[i]) return false;
5645      }
5646  
5647      return is.und(i) ? a === b : true;
5648    }
5649  };
5650  function merge(target, lowercase) {
5651    if (lowercase === void 0) {
5652      lowercase = true;
5653    }
5654  
5655    return function (object) {
5656      return (is.arr(object) ? object : Object.keys(object)).reduce(function (acc, element) {
5657        var key = lowercase ? element[0].toLowerCase() + element.substring(1) : element;
5658        acc[key] = target(key);
5659        return acc;
5660      }, target);
5661    };
5662  }
5663  function useForceUpdate() {
5664    var _useState = React.useState(false),
5665        f = _useState[1];
5666  
5667    var forceUpdate = React.useCallback(function () {
5668      return f(function (v) {
5669        return !v;
5670      });
5671    }, []);
5672    return forceUpdate;
5673  }
5674  function withDefault(value, defaultValue) {
5675    return is.und(value) || is.nul(value) ? defaultValue : value;
5676  }
5677  function toArray(a) {
5678    return !is.und(a) ? is.arr(a) ? a : [a] : [];
5679  }
5680  function callProp(obj) {
5681    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
5682      args[_key - 1] = arguments[_key];
5683    }
5684  
5685    return is.fun(obj) ? obj.apply(void 0, args) : obj;
5686  }
5687  
5688  function getForwardProps(props) {
5689    var to = props.to,
5690        from = props.from,
5691        config = props.config,
5692        onStart = props.onStart,
5693        onRest = props.onRest,
5694        onFrame = props.onFrame,
5695        children = props.children,
5696        reset = props.reset,
5697        reverse = props.reverse,
5698        force = props.force,
5699        immediate = props.immediate,
5700        delay = props.delay,
5701        attach = props.attach,
5702        destroyed = props.destroyed,
5703        interpolateTo = props.interpolateTo,
5704        ref = props.ref,
5705        lazy = props.lazy,
5706        forward = _objectWithoutPropertiesLoose(props, ["to", "from", "config", "onStart", "onRest", "onFrame", "children", "reset", "reverse", "force", "immediate", "delay", "attach", "destroyed", "interpolateTo", "ref", "lazy"]);
5707  
5708    return forward;
5709  }
5710  
5711  function interpolateTo(props) {
5712    var forward = getForwardProps(props);
5713    if (is.und(forward)) return _extends({
5714      to: forward
5715    }, props);
5716    var rest = Object.keys(props).reduce(function (a, k) {
5717      var _extends2;
5718  
5719      return !is.und(forward[k]) ? a : _extends({}, a, (_extends2 = {}, _extends2[k] = props[k], _extends2));
5720    }, {});
5721    return _extends({
5722      to: forward
5723    }, rest);
5724  }
5725  function handleRef(ref, forward) {
5726    if (forward) {
5727      // If it's a function, assume it's a ref callback
5728      if (is.fun(forward)) forward(ref);else if (is.obj(forward)) {
5729        forward.current = ref;
5730      }
5731    }
5732  
5733    return ref;
5734  }
5735  
5736  var Animated =
5737  /*#__PURE__*/
5738  function () {
5739    function Animated() {
5740      this.payload = void 0;
5741      this.children = [];
5742    }
5743  
5744    var _proto = Animated.prototype;
5745  
5746    _proto.getAnimatedValue = function getAnimatedValue() {
5747      return this.getValue();
5748    };
5749  
5750    _proto.getPayload = function getPayload() {
5751      return this.payload || this;
5752    };
5753  
5754    _proto.attach = function attach() {};
5755  
5756    _proto.detach = function detach() {};
5757  
5758    _proto.getChildren = function getChildren() {
5759      return this.children;
5760    };
5761  
5762    _proto.addChild = function addChild(child) {
5763      if (this.children.length === 0) this.attach();
5764      this.children.push(child);
5765    };
5766  
5767    _proto.removeChild = function removeChild(child) {
5768      var index = this.children.indexOf(child);
5769      this.children.splice(index, 1);
5770      if (this.children.length === 0) this.detach();
5771    };
5772  
5773    return Animated;
5774  }();
5775  var AnimatedArray =
5776  /*#__PURE__*/
5777  function (_Animated) {
5778    _inheritsLoose(AnimatedArray, _Animated);
5779  
5780    function AnimatedArray() {
5781      var _this;
5782  
5783      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5784        args[_key] = arguments[_key];
5785      }
5786  
5787      _this = _Animated.call.apply(_Animated, [this].concat(args)) || this;
5788      _this.payload = [];
5789  
5790      _this.attach = function () {
5791        return _this.payload.forEach(function (p) {
5792          return p instanceof Animated && p.addChild(_assertThisInitialized(_this));
5793        });
5794      };
5795  
5796      _this.detach = function () {
5797        return _this.payload.forEach(function (p) {
5798          return p instanceof Animated && p.removeChild(_assertThisInitialized(_this));
5799        });
5800      };
5801  
5802      return _this;
5803    }
5804  
5805    return AnimatedArray;
5806  }(Animated);
5807  var AnimatedObject =
5808  /*#__PURE__*/
5809  function (_Animated2) {
5810    _inheritsLoose(AnimatedObject, _Animated2);
5811  
5812    function AnimatedObject() {
5813      var _this2;
5814  
5815      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
5816        args[_key3] = arguments[_key3];
5817      }
5818  
5819      _this2 = _Animated2.call.apply(_Animated2, [this].concat(args)) || this;
5820      _this2.payload = {};
5821  
5822      _this2.attach = function () {
5823        return Object.values(_this2.payload).forEach(function (s) {
5824          return s instanceof Animated && s.addChild(_assertThisInitialized(_this2));
5825        });
5826      };
5827  
5828      _this2.detach = function () {
5829        return Object.values(_this2.payload).forEach(function (s) {
5830          return s instanceof Animated && s.removeChild(_assertThisInitialized(_this2));
5831        });
5832      };
5833  
5834      return _this2;
5835    }
5836  
5837    var _proto2 = AnimatedObject.prototype;
5838  
5839    _proto2.getValue = function getValue(animated) {
5840      if (animated === void 0) {
5841        animated = false;
5842      }
5843  
5844      var payload = {};
5845  
5846      for (var _key4 in this.payload) {
5847        var value = this.payload[_key4];
5848        if (animated && !(value instanceof Animated)) continue;
5849        payload[_key4] = value instanceof Animated ? value[animated ? 'getAnimatedValue' : 'getValue']() : value;
5850      }
5851  
5852      return payload;
5853    };
5854  
5855    _proto2.getAnimatedValue = function getAnimatedValue() {
5856      return this.getValue(true);
5857    };
5858  
5859    return AnimatedObject;
5860  }(Animated);
5861  
5862  var applyAnimatedValues;
5863  function injectApplyAnimatedValues(fn, transform) {
5864    applyAnimatedValues = {
5865      fn: fn,
5866      transform: transform
5867    };
5868  }
5869  var colorNames;
5870  function injectColorNames(names) {
5871    colorNames = names;
5872  }
5873  var requestFrame = function requestFrame(cb) {
5874    return typeof window !== 'undefined' ? window.requestAnimationFrame(cb) : -1;
5875  };
5876  var cancelFrame = function cancelFrame(id) {
5877    typeof window !== 'undefined' && window.cancelAnimationFrame(id);
5878  };
5879  function injectFrame(raf, caf) {
5880    requestFrame = raf;
5881    cancelFrame = caf;
5882  }
5883  var interpolation;
5884  function injectStringInterpolator(fn) {
5885    interpolation = fn;
5886  }
5887  var now = function now() {
5888    return Date.now();
5889  };
5890  function injectNow(nowFn) {
5891    now = nowFn;
5892  }
5893  var defaultElement;
5894  function injectDefaultElement(el) {
5895    defaultElement = el;
5896  }
5897  var animatedApi = function animatedApi(node) {
5898    return node.current;
5899  };
5900  function injectAnimatedApi(fn) {
5901    animatedApi = fn;
5902  }
5903  var createAnimatedStyle;
5904  function injectCreateAnimatedStyle(factory) {
5905    createAnimatedStyle = factory;
5906  }
5907  var manualFrameloop;
5908  function injectManualFrameloop(callback) {
5909    manualFrameloop = callback;
5910  }
5911  
5912  var Globals = /*#__PURE__*/Object.freeze({
5913    get applyAnimatedValues () { return applyAnimatedValues; },
5914    injectApplyAnimatedValues: injectApplyAnimatedValues,
5915    get colorNames () { return colorNames; },
5916    injectColorNames: injectColorNames,
5917    get requestFrame () { return requestFrame; },
5918    get cancelFrame () { return cancelFrame; },
5919    injectFrame: injectFrame,
5920    get interpolation () { return interpolation; },
5921    injectStringInterpolator: injectStringInterpolator,
5922    get now () { return now; },
5923    injectNow: injectNow,
5924    get defaultElement () { return defaultElement; },
5925    injectDefaultElement: injectDefaultElement,
5926    get animatedApi () { return animatedApi; },
5927    injectAnimatedApi: injectAnimatedApi,
5928    get createAnimatedStyle () { return createAnimatedStyle; },
5929    injectCreateAnimatedStyle: injectCreateAnimatedStyle,
5930    get manualFrameloop () { return manualFrameloop; },
5931    injectManualFrameloop: injectManualFrameloop
5932  });
5933  
5934  /**
5935   * Wraps the `style` property with `AnimatedStyle`.
5936   */
5937  
5938  var AnimatedProps =
5939  /*#__PURE__*/
5940  function (_AnimatedObject) {
5941    _inheritsLoose(AnimatedProps, _AnimatedObject);
5942  
5943    function AnimatedProps(props, callback) {
5944      var _this;
5945  
5946      _this = _AnimatedObject.call(this) || this;
5947      _this.update = void 0;
5948      _this.payload = !props.style ? props : _extends({}, props, {
5949        style: createAnimatedStyle(props.style)
5950      });
5951      _this.update = callback;
5952  
5953      _this.attach();
5954  
5955      return _this;
5956    }
5957  
5958    return AnimatedProps;
5959  }(AnimatedObject);
5960  
5961  var isFunctionComponent = function isFunctionComponent(val) {
5962    return is.fun(val) && !(val.prototype instanceof React__default.Component);
5963  };
5964  
5965  var createAnimatedComponent = function createAnimatedComponent(Component) {
5966    var AnimatedComponent = React.forwardRef(function (props, ref) {
5967      var forceUpdate = useForceUpdate();
5968      var mounted = React.useRef(true);
5969      var propsAnimated = React.useRef(null);
5970      var node = React.useRef(null);
5971      var attachProps = React.useCallback(function (props) {
5972        var oldPropsAnimated = propsAnimated.current;
5973  
5974        var callback = function callback() {
5975          var didUpdate = false;
5976  
5977          if (node.current) {
5978            didUpdate = applyAnimatedValues.fn(node.current, propsAnimated.current.getAnimatedValue());
5979          }
5980  
5981          if (!node.current || didUpdate === false) {
5982            // If no referenced node has been found, or the update target didn't have a
5983            // native-responder, then forceUpdate the animation ...
5984            forceUpdate();
5985          }
5986        };
5987  
5988        propsAnimated.current = new AnimatedProps(props, callback);
5989        oldPropsAnimated && oldPropsAnimated.detach();
5990      }, []);
5991      React.useEffect(function () {
5992        return function () {
5993          mounted.current = false;
5994          propsAnimated.current && propsAnimated.current.detach();
5995        };
5996      }, []);
5997      React.useImperativeHandle(ref, function () {
5998        return animatedApi(node, mounted, forceUpdate);
5999      });
6000      attachProps(props);
6001  
6002      var _getValue = propsAnimated.current.getValue(),
6003          scrollTop = _getValue.scrollTop,
6004          scrollLeft = _getValue.scrollLeft,
6005          animatedProps = _objectWithoutPropertiesLoose(_getValue, ["scrollTop", "scrollLeft"]); // Functions cannot have refs, see:
6006      // See: https://github.com/react-spring/react-spring/issues/569
6007  
6008  
6009      var refFn = isFunctionComponent(Component) ? undefined : function (childRef) {
6010        return node.current = handleRef(childRef, ref);
6011      };
6012      return React__default.createElement(Component, _extends({}, animatedProps, {
6013        ref: refFn
6014      }));
6015    });
6016    return AnimatedComponent;
6017  };
6018  
6019  var active = false;
6020  var controllers = new Set();
6021  
6022  var update = function update() {
6023    if (!active) return false;
6024    var time = now();
6025  
6026    for (var _iterator = controllers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
6027      var _ref;
6028  
6029      if (_isArray) {
6030        if (_i >= _iterator.length) break;
6031        _ref = _iterator[_i++];
6032      } else {
6033        _i = _iterator.next();
6034        if (_i.done) break;
6035        _ref = _i.value;
6036      }
6037  
6038      var controller = _ref;
6039      var isActive = false;
6040  
6041      for (var configIdx = 0; configIdx < controller.configs.length; configIdx++) {
6042        var config = controller.configs[configIdx];
6043        var endOfAnimation = void 0,
6044            lastTime = void 0;
6045  
6046        for (var valIdx = 0; valIdx < config.animatedValues.length; valIdx++) {
6047          var animation = config.animatedValues[valIdx]; // If an animation is done, skip, until all of them conclude
6048  
6049          if (animation.done) continue;
6050          var from = config.fromValues[valIdx];
6051          var to = config.toValues[valIdx];
6052          var position = animation.lastPosition;
6053          var isAnimated = to instanceof Animated;
6054          var velocity = Array.isArray(config.initialVelocity) ? config.initialVelocity[valIdx] : config.initialVelocity;
6055          if (isAnimated) to = to.getValue(); // Conclude animation if it's either immediate, or from-values match end-state
6056  
6057          if (config.immediate) {
6058            animation.setValue(to);
6059            animation.done = true;
6060            continue;
6061          } // Break animation when string values are involved
6062  
6063  
6064          if (typeof from === 'string' || typeof to === 'string') {
6065            animation.setValue(to);
6066            animation.done = true;
6067            continue;
6068          }
6069  
6070          if (config.duration !== void 0) {
6071            /** Duration easing */
6072            position = from + config.easing((time - animation.startTime) / config.duration) * (to - from);
6073            endOfAnimation = time >= animation.startTime + config.duration;
6074          } else if (config.decay) {
6075            /** Decay easing */
6076            position = from + velocity / (1 - 0.998) * (1 - Math.exp(-(1 - 0.998) * (time - animation.startTime)));
6077            endOfAnimation = Math.abs(animation.lastPosition - position) < 0.1;
6078            if (endOfAnimation) to = position;
6079          } else {
6080            /** Spring easing */
6081            lastTime = animation.lastTime !== void 0 ? animation.lastTime : time;
6082            velocity = animation.lastVelocity !== void 0 ? animation.lastVelocity : config.initialVelocity; // If we lost a lot of frames just jump to the end.
6083  
6084            if (time > lastTime + 64) lastTime = time; // http://gafferongames.com/game-physics/fix-your-timestep/
6085  
6086            var numSteps = Math.floor(time - lastTime);
6087  
6088            for (var i = 0; i < numSteps; ++i) {
6089              var force = -config.tension * (position - to);
6090              var damping = -config.friction * velocity;
6091              var acceleration = (force + damping) / config.mass;
6092              velocity = velocity + acceleration * 1 / 1000;
6093              position = position + velocity * 1 / 1000;
6094            } // Conditions for stopping the spring animation
6095  
6096  
6097            var isOvershooting = config.clamp && config.tension !== 0 ? from < to ? position > to : position < to : false;
6098            var isVelocity = Math.abs(velocity) <= config.precision;
6099            var isDisplacement = config.tension !== 0 ? Math.abs(to - position) <= config.precision : true;
6100            endOfAnimation = isOvershooting || isVelocity && isDisplacement;
6101            animation.lastVelocity = velocity;
6102            animation.lastTime = time;
6103          } // Trails aren't done until their parents conclude
6104  
6105  
6106          if (isAnimated && !config.toValues[valIdx].done) endOfAnimation = false;
6107  
6108          if (endOfAnimation) {
6109            // Ensure that we end up with a round value
6110            if (animation.value !== to) position = to;
6111            animation.done = true;
6112          } else isActive = true;
6113  
6114          animation.setValue(position);
6115          animation.lastPosition = position;
6116        } // Keep track of updated values only when necessary
6117  
6118  
6119        if (controller.props.onFrame) controller.values[config.name] = config.interpolation.getValue();
6120      } // Update callbacks in the end of the frame
6121  
6122  
6123      if (controller.props.onFrame) controller.props.onFrame(controller.values); // Either call onEnd or next frame
6124  
6125      if (!isActive) {
6126        controllers.delete(controller);
6127        controller.stop(true);
6128      }
6129    } // Loop over as long as there are controllers ...
6130  
6131  
6132    if (controllers.size) {
6133      if (manualFrameloop) manualFrameloop();else requestFrame(update);
6134    } else {
6135      active = false;
6136    }
6137  
6138    return active;
6139  };
6140  
6141  var start = function start(controller) {
6142    if (!controllers.has(controller)) controllers.add(controller);
6143  
6144    if (!active) {
6145      active = true;
6146      if (manualFrameloop) requestFrame(manualFrameloop);else requestFrame(update);
6147    }
6148  };
6149  
6150  var stop = function stop(controller) {
6151    if (controllers.has(controller)) controllers.delete(controller);
6152  };
6153  
6154  function createInterpolator(range, output, extrapolate) {
6155    if (typeof range === 'function') {
6156      return range;
6157    }
6158  
6159    if (Array.isArray(range)) {
6160      return createInterpolator({
6161        range: range,
6162        output: output,
6163        extrapolate: extrapolate
6164      });
6165    }
6166  
6167    if (interpolation && typeof range.output[0] === 'string') {
6168      return interpolation(range);
6169    }
6170  
6171    var config = range;
6172    var outputRange = config.output;
6173    var inputRange = config.range || [0, 1];
6174    var extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';
6175    var extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';
6176  
6177    var easing = config.easing || function (t) {
6178      return t;
6179    };
6180  
6181    return function (input) {
6182      var range = findRange(input, inputRange);
6183      return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);
6184    };
6185  }
6186  
6187  function interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {
6188    var result = map ? map(input) : input; // Extrapolate
6189  
6190    if (result < inputMin) {
6191      if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;
6192    }
6193  
6194    if (result > inputMax) {
6195      if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;
6196    }
6197  
6198    if (outputMin === outputMax) return outputMin;
6199    if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax; // Input Range
6200  
6201    if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin); // Easing
6202  
6203    result = easing(result); // Output Range
6204  
6205    if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;
6206    return result;
6207  }
6208  
6209  function findRange(input, inputRange) {
6210    for (var i = 1; i < inputRange.length - 1; ++i) {
6211      if (inputRange[i] >= input) break;
6212    }
6213  
6214    return i - 1;
6215  }
6216  
6217  var AnimatedInterpolation =
6218  /*#__PURE__*/
6219  function (_AnimatedArray) {
6220    _inheritsLoose(AnimatedInterpolation, _AnimatedArray);
6221  
6222    function AnimatedInterpolation(parents, range, output, extrapolate) {
6223      var _this;
6224  
6225      _this = _AnimatedArray.call(this) || this;
6226      _this.calc = void 0;
6227      _this.payload = parents instanceof AnimatedArray && !(parents instanceof AnimatedInterpolation) ? parents.getPayload() : Array.isArray(parents) ? parents : [parents];
6228      _this.calc = createInterpolator(range, output, extrapolate);
6229      return _this;
6230    }
6231  
6232    var _proto = AnimatedInterpolation.prototype;
6233  
6234    _proto.getValue = function getValue() {
6235      return this.calc.apply(this, this.payload.map(function (value) {
6236        return value.getValue();
6237      }));
6238    };
6239  
6240    _proto.updateConfig = function updateConfig(range, output, extrapolate) {
6241      this.calc = createInterpolator(range, output, extrapolate);
6242    };
6243  
6244    _proto.interpolate = function interpolate(range, output, extrapolate) {
6245      return new AnimatedInterpolation(this, range, output, extrapolate);
6246    };
6247  
6248    return AnimatedInterpolation;
6249  }(AnimatedArray);
6250  
6251  var interpolate$1 = function interpolate(parents, range, output) {
6252    return parents && new AnimatedInterpolation(parents, range, output);
6253  };
6254  
6255  var config = {
6256    default: {
6257      tension: 170,
6258      friction: 26
6259    },
6260    gentle: {
6261      tension: 120,
6262      friction: 14
6263    },
6264    wobbly: {
6265      tension: 180,
6266      friction: 12
6267    },
6268    stiff: {
6269      tension: 210,
6270      friction: 20
6271    },
6272    slow: {
6273      tension: 280,
6274      friction: 60
6275    },
6276    molasses: {
6277      tension: 280,
6278      friction: 120
6279    }
6280  };
6281  
6282  /** API
6283   *  useChain(references, timeSteps, timeFrame)
6284   */
6285  
6286  function useChain(refs, timeSteps, timeFrame) {
6287    if (timeFrame === void 0) {
6288      timeFrame = 1000;
6289    }
6290  
6291    var previous = React.useRef();
6292    React.useEffect(function () {
6293      if (is.equ(refs, previous.current)) refs.forEach(function (_ref) {
6294        var current = _ref.current;
6295        return current && current.start();
6296      });else if (timeSteps) {
6297        refs.forEach(function (_ref2, index) {
6298          var current = _ref2.current;
6299  
6300          if (current) {
6301            var ctrls = current.controllers;
6302  
6303            if (ctrls.length) {
6304              var t = timeFrame * timeSteps[index];
6305              ctrls.forEach(function (ctrl) {
6306                ctrl.queue = ctrl.queue.map(function (e) {
6307                  return _extends({}, e, {
6308                    delay: e.delay + t
6309                  });
6310                });
6311                ctrl.start();
6312              });
6313            }
6314          }
6315        });
6316      } else refs.reduce(function (q, _ref3, rI) {
6317        var current = _ref3.current;
6318        return q = q.then(function () {
6319          return current.start();
6320        });
6321      }, Promise.resolve());
6322      previous.current = refs;
6323    });
6324  }
6325  
6326  /**
6327   * Animated works by building a directed acyclic graph of dependencies
6328   * transparently when you render your Animated components.
6329   *
6330   *               new Animated.Value(0)
6331   *     .interpolate()        .interpolate()    new Animated.Value(1)
6332   *         opacity               translateY      scale
6333   *          style                         transform
6334   *         View#234                         style
6335   *                                         View#123
6336   *
6337   * A) Top Down phase
6338   * When an AnimatedValue is updated, we recursively go down through this
6339   * graph in order to find leaf nodes: the views that we flag as needing
6340   * an update.
6341   *
6342   * B) Bottom Up phase
6343   * When a view is flagged as needing an update, we recursively go back up
6344   * in order to build the new value that it needs. The reason why we need
6345   * this two-phases process is to deal with composite props such as
6346   * transform which can receive values from multiple parents.
6347   */
6348  function addAnimatedStyles(node, styles) {
6349    if ('update' in node) {
6350      styles.add(node);
6351    } else {
6352      node.getChildren().forEach(function (child) {
6353        return addAnimatedStyles(child, styles);
6354      });
6355    }
6356  }
6357  
6358  var AnimatedValue =
6359  /*#__PURE__*/
6360  function (_Animated) {
6361    _inheritsLoose(AnimatedValue, _Animated);
6362  
6363    function AnimatedValue(_value) {
6364      var _this;
6365  
6366      _this = _Animated.call(this) || this;
6367      _this.animatedStyles = new Set();
6368      _this.value = void 0;
6369      _this.startPosition = void 0;
6370      _this.lastPosition = void 0;
6371      _this.lastVelocity = void 0;
6372      _this.startTime = void 0;
6373      _this.lastTime = void 0;
6374      _this.done = false;
6375  
6376      _this.setValue = function (value, flush) {
6377        if (flush === void 0) {
6378          flush = true;
6379        }
6380  
6381        _this.value = value;
6382        if (flush) _this.flush();
6383      };
6384  
6385      _this.value = _value;
6386      _this.startPosition = _value;
6387      _this.lastPosition = _value;
6388      return _this;
6389    }
6390  
6391    var _proto = AnimatedValue.prototype;
6392  
6393    _proto.flush = function flush() {
6394      if (this.animatedStyles.size === 0) {
6395        addAnimatedStyles(this, this.animatedStyles);
6396      }
6397  
6398      this.animatedStyles.forEach(function (animatedStyle) {
6399        return animatedStyle.update();
6400      });
6401    };
6402  
6403    _proto.clearStyles = function clearStyles() {
6404      this.animatedStyles.clear();
6405    };
6406  
6407    _proto.getValue = function getValue() {
6408      return this.value;
6409    };
6410  
6411    _proto.interpolate = function interpolate(range, output, extrapolate) {
6412      return new AnimatedInterpolation(this, range, output, extrapolate);
6413    };
6414  
6415    return AnimatedValue;
6416  }(Animated);
6417  
6418  var AnimatedValueArray =
6419  /*#__PURE__*/
6420  function (_AnimatedArray) {
6421    _inheritsLoose(AnimatedValueArray, _AnimatedArray);
6422  
6423    function AnimatedValueArray(values) {
6424      var _this;
6425  
6426      _this = _AnimatedArray.call(this) || this;
6427      _this.payload = values.map(function (n) {
6428        return new AnimatedValue(n);
6429      });
6430      return _this;
6431    }
6432  
6433    var _proto = AnimatedValueArray.prototype;
6434  
6435    _proto.setValue = function setValue(value, flush) {
6436      var _this2 = this;
6437  
6438      if (flush === void 0) {
6439        flush = true;
6440      }
6441  
6442      if (Array.isArray(value)) {
6443        if (value.length === this.payload.length) {
6444          value.forEach(function (v, i) {
6445            return _this2.payload[i].setValue(v, flush);
6446          });
6447        }
6448      } else {
6449        this.payload.forEach(function (p) {
6450          return p.setValue(value, flush);
6451        });
6452      }
6453    };
6454  
6455    _proto.getValue = function getValue() {
6456      return this.payload.map(function (v) {
6457        return v.getValue();
6458      });
6459    };
6460  
6461    _proto.interpolate = function interpolate(range, output) {
6462      return new AnimatedInterpolation(this, range, output);
6463    };
6464  
6465    return AnimatedValueArray;
6466  }(AnimatedArray);
6467  
6468  var G = 0;
6469  
6470  var Controller =
6471  /*#__PURE__*/
6472  function () {
6473    function Controller() {
6474      var _this = this;
6475  
6476      this.id = void 0;
6477      this.idle = true;
6478      this.hasChanged = false;
6479      this.guid = 0;
6480      this.local = 0;
6481      this.props = {};
6482      this.merged = {};
6483      this.animations = {};
6484      this.interpolations = {};
6485      this.values = {};
6486      this.configs = [];
6487      this.listeners = [];
6488      this.queue = [];
6489      this.localQueue = void 0;
6490  
6491      this.getValues = function () {
6492        return _this.interpolations;
6493      };
6494  
6495      this.id = G++;
6496    }
6497    /** update(props)
6498     *  This function filters input props and creates an array of tasks which are executed in .start()
6499     *  Each task is allowed to carry a delay, which means it can execute asnychroneously */
6500  
6501  
6502    var _proto = Controller.prototype;
6503  
6504    _proto.update = function update$$1(args) {
6505      //this._id = n + this.id
6506      if (!args) return this; // Extract delay and the to-prop from props
6507  
6508      var _ref = interpolateTo(args),
6509          _ref$delay = _ref.delay,
6510          delay = _ref$delay === void 0 ? 0 : _ref$delay,
6511          to = _ref.to,
6512          props = _objectWithoutPropertiesLoose(_ref, ["delay", "to"]);
6513  
6514      if (is.arr(to) || is.fun(to)) {
6515        // If config is either a function or an array queue it up as is
6516        this.queue.push(_extends({}, props, {
6517          delay: delay,
6518          to: to
6519        }));
6520      } else if (to) {
6521        // Otherwise go through each key since it could be delayed individually
6522        var ops = {};
6523        Object.entries(to).forEach(function (_ref2) {
6524          var _to;
6525  
6526          var k = _ref2[0],
6527              v = _ref2[1];
6528  
6529          // Fetch delay and create an entry, consisting of the to-props, the delay, and basic props
6530          var entry = _extends({
6531            to: (_to = {}, _to[k] = v, _to),
6532            delay: callProp(delay, k)
6533          }, props);
6534  
6535          var previous = ops[entry.delay] && ops[entry.delay].to;
6536          ops[entry.delay] = _extends({}, ops[entry.delay], entry, {
6537            to: _extends({}, previous, entry.to)
6538          });
6539        });
6540        this.queue = Object.values(ops);
6541      } // Sort queue, so that async calls go last
6542  
6543  
6544      this.queue = this.queue.sort(function (a, b) {
6545        return a.delay - b.delay;
6546      }); // Diff the reduced props immediately (they'll contain the from-prop and some config)
6547  
6548      this.diff(props);
6549      return this;
6550    }
6551    /** start(onEnd)
6552     *  This function either executes a queue, if present, or starts the frameloop, which animates */
6553    ;
6554  
6555    _proto.start = function start$$1(onEnd) {
6556      var _this2 = this;
6557  
6558      // If a queue is present we must excecute it
6559      if (this.queue.length) {
6560        this.idle = false; // Updates can interrupt trailing queues, in that case we just merge values
6561  
6562        if (this.localQueue) {
6563          this.localQueue.forEach(function (_ref3) {
6564            var _ref3$from = _ref3.from,
6565                from = _ref3$from === void 0 ? {} : _ref3$from,
6566                _ref3$to = _ref3.to,
6567                to = _ref3$to === void 0 ? {} : _ref3$to;
6568            if (is.obj(from)) _this2.merged = _extends({}, from, _this2.merged);
6569            if (is.obj(to)) _this2.merged = _extends({}, _this2.merged, to);
6570          });
6571        } // The guid helps us tracking frames, a new queue over an old one means an override
6572        // We discard async calls in that caseÍ
6573  
6574  
6575        var local = this.local = ++this.guid;
6576        var queue = this.localQueue = this.queue;
6577        this.queue = []; // Go through each entry and execute it
6578  
6579        queue.forEach(function (_ref4, index) {
6580          var delay = _ref4.delay,
6581              props = _objectWithoutPropertiesLoose(_ref4, ["delay"]);
6582  
6583          var cb = function cb(finished) {
6584            if (index === queue.length - 1 && local === _this2.guid && finished) {
6585              _this2.idle = true;
6586              if (_this2.props.onRest) _this2.props.onRest(_this2.merged);
6587            }
6588  
6589            if (onEnd) onEnd();
6590          }; // Entries can be delayed, ansyc or immediate
6591  
6592  
6593          var async = is.arr(props.to) || is.fun(props.to);
6594  
6595          if (delay) {
6596            setTimeout(function () {
6597              if (local === _this2.guid) {
6598                if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
6599              }
6600            }, delay);
6601          } else if (async) _this2.runAsync(props, cb);else _this2.diff(props).start(cb);
6602        });
6603      } // Otherwise we kick of the frameloop
6604      else {
6605          if (is.fun(onEnd)) this.listeners.push(onEnd);
6606          if (this.props.onStart) this.props.onStart();
6607  
6608          start(this);
6609        }
6610  
6611      return this;
6612    };
6613  
6614    _proto.stop = function stop$$1(finished) {
6615      this.listeners.forEach(function (onEnd) {
6616        return onEnd(finished);
6617      });
6618      this.listeners = [];
6619      return this;
6620    }
6621    /** Pause sets onEnd listeners free, but also removes the controller from the frameloop */
6622    ;
6623  
6624    _proto.pause = function pause(finished) {
6625      this.stop(true);
6626      if (finished) stop(this);
6627      return this;
6628    };
6629  
6630    _proto.runAsync = function runAsync(_ref5, onEnd) {
6631      var _this3 = this;
6632  
6633      var delay = _ref5.delay,
6634          props = _objectWithoutPropertiesLoose(_ref5, ["delay"]);
6635  
6636      var local = this.local; // If "to" is either a function or an array it will be processed async, therefor "to" should be empty right now
6637      // If the view relies on certain values "from" has to be present
6638  
6639      var queue = Promise.resolve(undefined);
6640  
6641      if (is.arr(props.to)) {
6642        var _loop = function _loop(i) {
6643          var index = i;
6644  
6645          var fresh = _extends({}, props, interpolateTo(props.to[index]));
6646  
6647          if (is.arr(fresh.config)) fresh.config = fresh.config[index];
6648          queue = queue.then(function () {
6649            //this.stop()
6650            if (local === _this3.guid) return new Promise(function (r) {
6651              return _this3.diff(fresh).start(r);
6652            });
6653          });
6654        };
6655  
6656        for (var i = 0; i < props.to.length; i++) {
6657          _loop(i);
6658        }
6659      } else if (is.fun(props.to)) {
6660        var index = 0;
6661        var last;
6662        queue = queue.then(function () {
6663          return props.to( // next(props)
6664          function (p) {
6665            var fresh = _extends({}, props, interpolateTo(p));
6666  
6667            if (is.arr(fresh.config)) fresh.config = fresh.config[index];
6668            index++; //this.stop()
6669  
6670            if (local === _this3.guid) return last = new Promise(function (r) {
6671              return _this3.diff(fresh).start(r);
6672            });
6673            return;
6674          }, // cancel()
6675          function (finished) {
6676            if (finished === void 0) {
6677              finished = true;
6678            }
6679  
6680            return _this3.stop(finished);
6681          }).then(function () {
6682            return last;
6683          });
6684        });
6685      }
6686  
6687      queue.then(onEnd);
6688    };
6689  
6690    _proto.diff = function diff(props) {
6691      var _this4 = this;
6692  
6693      this.props = _extends({}, this.props, props);
6694      var _this$props = this.props,
6695          _this$props$from = _this$props.from,
6696          from = _this$props$from === void 0 ? {} : _this$props$from,
6697          _this$props$to = _this$props.to,
6698          to = _this$props$to === void 0 ? {} : _this$props$to,
6699          _this$props$config = _this$props.config,
6700          config = _this$props$config === void 0 ? {} : _this$props$config,
6701          reverse = _this$props.reverse,
6702          attach = _this$props.attach,
6703          reset = _this$props.reset,
6704          immediate = _this$props.immediate; // Reverse values when requested
6705  
6706      if (reverse) {
6707        var _ref6 = [to, from];
6708        from = _ref6[0];
6709        to = _ref6[1];
6710      } // This will collect all props that were ever set, reset merged props when necessary
6711  
6712  
6713      this.merged = _extends({}, from, this.merged, to);
6714      this.hasChanged = false; // Attachment handling, trailed springs can "attach" themselves to a previous spring
6715  
6716      var target = attach && attach(this); // Reduces input { name: value } pairs into animated values
6717  
6718      this.animations = Object.entries(this.merged).reduce(function (acc, _ref7) {
6719        var name = _ref7[0],
6720            value = _ref7[1];
6721        // Issue cached entries, except on reset
6722        var entry = acc[name] || {}; // Figure out what the value is supposed to be
6723  
6724        var isNumber = is.num(value);
6725        var isString = is.str(value) && !value.startsWith('#') && !/\d/.test(value) && !colorNames[value];
6726        var isArray = is.arr(value);
6727        var isInterpolation = !isNumber && !isArray && !isString;
6728        var fromValue = !is.und(from[name]) ? from[name] : value;
6729        var toValue = isNumber || isArray ? value : isString ? value : 1;
6730        var toConfig = callProp(config, name);
6731        if (target) toValue = target.animations[name].parent;
6732        var parent = entry.parent,
6733            interpolation$$1 = entry.interpolation,
6734            toValues = toArray(target ? toValue.getPayload() : toValue),
6735            animatedValues;
6736        var newValue = value;
6737        if (isInterpolation) newValue = interpolation({
6738          range: [0, 1],
6739          output: [value, value]
6740        })(1);
6741        var currentValue = interpolation$$1 && interpolation$$1.getValue(); // Change detection flags
6742  
6743        var isFirst = is.und(parent);
6744        var isActive = !isFirst && entry.animatedValues.some(function (v) {
6745          return !v.done;
6746        });
6747        var currentValueDiffersFromGoal = !is.equ(newValue, currentValue);
6748        var hasNewGoal = !is.equ(newValue, entry.previous);
6749        var hasNewConfig = !is.equ(toConfig, entry.config); // Change animation props when props indicate a new goal (new value differs from previous one)
6750        // and current values differ from it. Config changes trigger a new update as well (though probably shouldn't?)
6751  
6752        if (reset || hasNewGoal && currentValueDiffersFromGoal || hasNewConfig) {
6753          var _extends2;
6754  
6755          // Convert regular values into animated values, ALWAYS re-use if possible
6756          if (isNumber || isString) parent = interpolation$$1 = entry.parent || new AnimatedValue(fromValue);else if (isArray) parent = interpolation$$1 = entry.parent || new AnimatedValueArray(fromValue);else if (isInterpolation) {
6757            var prev = entry.interpolation && entry.interpolation.calc(entry.parent.value);
6758            prev = prev !== void 0 && !reset ? prev : fromValue;
6759  
6760            if (entry.parent) {
6761              parent = entry.parent;
6762              parent.setValue(0, false);
6763            } else parent = new AnimatedValue(0);
6764  
6765            var range = {
6766              output: [prev, value]
6767            };
6768  
6769            if (entry.interpolation) {
6770              interpolation$$1 = entry.interpolation;
6771              entry.interpolation.updateConfig(range);
6772            } else interpolation$$1 = parent.interpolate(range);
6773          }
6774          toValues = toArray(target ? toValue.getPayload() : toValue);
6775          animatedValues = toArray(parent.getPayload());
6776          if (reset && !isInterpolation) parent.setValue(fromValue, false);
6777          _this4.hasChanged = true; // Reset animated values
6778  
6779          animatedValues.forEach(function (value) {
6780            value.startPosition = value.value;
6781            value.lastPosition = value.value;
6782            value.lastVelocity = isActive ? value.lastVelocity : undefined;
6783            value.lastTime = isActive ? value.lastTime : undefined;
6784            value.startTime = now();
6785            value.done = false;
6786            value.animatedStyles.clear();
6787          }); // Set immediate values
6788  
6789          if (callProp(immediate, name)) {
6790            parent.setValue(isInterpolation ? toValue : value, false);
6791          }
6792  
6793          return _extends({}, acc, (_extends2 = {}, _extends2[name] = _extends({}, entry, {
6794            name: name,
6795            parent: parent,
6796            interpolation: interpolation$$1,
6797            animatedValues: animatedValues,
6798            toValues: toValues,
6799            previous: newValue,
6800            config: toConfig,
6801            fromValues: toArray(parent.getValue()),
6802            immediate: callProp(immediate, name),
6803            initialVelocity: withDefault(toConfig.velocity, 0),
6804            clamp: withDefault(toConfig.clamp, false),
6805            precision: withDefault(toConfig.precision, 0.01),
6806            tension: withDefault(toConfig.tension, 170),
6807            friction: withDefault(toConfig.friction, 26),
6808            mass: withDefault(toConfig.mass, 1),
6809            duration: toConfig.duration,
6810            easing: withDefault(toConfig.easing, function (t) {
6811              return t;
6812            }),
6813            decay: toConfig.decay
6814          }), _extends2));
6815        } else {
6816          if (!currentValueDiffersFromGoal) {
6817            var _extends3;
6818  
6819            // So ... the current target value (newValue) appears to be different from the previous value,
6820            // which normally constitutes an update, but the actual value (currentValue) matches the target!
6821            // In order to resolve this without causing an animation update we silently flag the animation as done,
6822            // which it technically is. Interpolations also needs a config update with their target set to 1.
6823            if (isInterpolation) {
6824              parent.setValue(1, false);
6825              interpolation$$1.updateConfig({
6826                output: [newValue, newValue]
6827              });
6828            }
6829  
6830            parent.done = true;
6831            _this4.hasChanged = true;
6832            return _extends({}, acc, (_extends3 = {}, _extends3[name] = _extends({}, acc[name], {
6833              previous: newValue
6834            }), _extends3));
6835          }
6836  
6837          return acc;
6838        }
6839      }, this.animations);
6840  
6841      if (this.hasChanged) {
6842        // Make animations available to frameloop
6843        this.configs = Object.values(this.animations);
6844        this.values = {};
6845        this.interpolations = {};
6846  
6847        for (var key in this.animations) {
6848          this.interpolations[key] = this.animations[key].interpolation;
6849          this.values[key] = this.animations[key].interpolation.getValue();
6850        }
6851      }
6852  
6853      return this;
6854    };
6855  
6856    _proto.destroy = function destroy() {
6857      this.stop();
6858      this.props = {};
6859      this.merged = {};
6860      this.animations = {};
6861      this.interpolations = {};
6862      this.values = {};
6863      this.configs = [];
6864      this.local = 0;
6865    };
6866  
6867    return Controller;
6868  }();
6869  
6870  /** API
6871   * const props = useSprings(number, [{ ... }, { ... }, ...])
6872   * const [props, set] = useSprings(number, (i, controller) => ({ ... }))
6873   */
6874  
6875  var useSprings = function useSprings(length, props) {
6876    var mounted = React.useRef(false);
6877    var ctrl = React.useRef();
6878    var isFn = is.fun(props); // The controller maintains the animation values, starts and stops animations
6879  
6880    var _useMemo = React.useMemo(function () {
6881      // Remove old controllers
6882      if (ctrl.current) {
6883        ctrl.current.map(function (c) {
6884          return c.destroy();
6885        });
6886        ctrl.current = undefined;
6887      }
6888  
6889      var ref;
6890      return [new Array(length).fill().map(function (_, i) {
6891        var ctrl = new Controller();
6892        var newProps = isFn ? callProp(props, i, ctrl) : props[i];
6893        if (i === 0) ref = newProps.ref;
6894        ctrl.update(newProps);
6895        if (!ref) ctrl.start();
6896        return ctrl;
6897      }), ref];
6898    }, [length]),
6899        controllers = _useMemo[0],
6900        ref = _useMemo[1];
6901  
6902    ctrl.current = controllers; // The hooks reference api gets defined here ...
6903  
6904    var api = React.useImperativeHandle(ref, function () {
6905      return {
6906        start: function start() {
6907          return Promise.all(ctrl.current.map(function (c) {
6908            return new Promise(function (r) {
6909              return c.start(r);
6910            });
6911          }));
6912        },
6913        stop: function stop(finished) {
6914          return ctrl.current.forEach(function (c) {
6915            return c.stop(finished);
6916          });
6917        },
6918  
6919        get controllers() {
6920          return ctrl.current;
6921        }
6922  
6923      };
6924    }); // This function updates the controllers
6925  
6926    var updateCtrl = React.useMemo(function () {
6927      return function (updateProps) {
6928        return ctrl.current.map(function (c, i) {
6929          c.update(isFn ? callProp(updateProps, i, c) : updateProps[i]);
6930          if (!ref) c.start();
6931        });
6932      };
6933    }, [length]); // Update controller if props aren't functional
6934  
6935    React.useEffect(function () {
6936      if (mounted.current) {
6937        if (!isFn) updateCtrl(props);
6938      } else if (!ref) ctrl.current.forEach(function (c) {
6939        return c.start();
6940      });
6941    }); // Update mounted flag and destroy controller on unmount
6942  
6943    React.useEffect(function () {
6944      return mounted.current = true, function () {
6945        return ctrl.current.forEach(function (c) {
6946          return c.destroy();
6947        });
6948      };
6949    }, []); // Return animated props, or, anim-props + the update-setter above
6950  
6951    var propValues = ctrl.current.map(function (c) {
6952      return c.getValues();
6953    });
6954    return isFn ? [propValues, updateCtrl, function (finished) {
6955      return ctrl.current.forEach(function (c) {
6956        return c.pause(finished);
6957      });
6958    }] : propValues;
6959  };
6960  
6961  /** API
6962   * const props = useSpring({ ... })
6963   * const [props, set] = useSpring(() => ({ ... }))
6964   */
6965  
6966  var useSpring = function useSpring(props) {
6967    var isFn = is.fun(props);
6968  
6969    var _useSprings = useSprings(1, isFn ? props : [props]),
6970        result = _useSprings[0],
6971        set = _useSprings[1],
6972        pause = _useSprings[2];
6973  
6974    return isFn ? [result[0], set, pause] : result;
6975  };
6976  
6977  /** API
6978   * const trails = useTrail(number, { ... })
6979   * const [trails, set] = useTrail(number, () => ({ ... }))
6980   */
6981  
6982  var useTrail = function useTrail(length, props) {
6983    var mounted = React.useRef(false);
6984    var isFn = is.fun(props);
6985    var updateProps = callProp(props);
6986    var instances = React.useRef();
6987  
6988    var _useSprings = useSprings(length, function (i, ctrl) {
6989      if (i === 0) instances.current = [];
6990      instances.current.push(ctrl);
6991      return _extends({}, updateProps, {
6992        config: callProp(updateProps.config, i),
6993        attach: i > 0 && function () {
6994          return instances.current[i - 1];
6995        }
6996      });
6997    }),
6998        result = _useSprings[0],
6999        set = _useSprings[1],
7000        pause = _useSprings[2]; // Set up function to update controller
7001  
7002  
7003    var updateCtrl = React.useMemo(function () {
7004      return function (props) {
7005        return set(function (i, ctrl) {
7006          var last = props.reverse ? i === 0 : length - 1 === i;
7007          var attachIdx = props.reverse ? i + 1 : i - 1;
7008          var attachController = instances.current[attachIdx];
7009          return _extends({}, props, {
7010            config: callProp(props.config || updateProps.config, i),
7011            attach: attachController && function () {
7012              return attachController;
7013            }
7014          });
7015        });
7016      };
7017    }, [length, updateProps.reverse]); // Update controller if props aren't functional
7018  
7019    React.useEffect(function () {
7020      return void (mounted.current && !isFn && updateCtrl(props));
7021    }); // Update mounted flag and destroy controller on unmount
7022  
7023    React.useEffect(function () {
7024      return void (mounted.current = true);
7025    }, []);
7026    return isFn ? [result, updateCtrl, pause] : result;
7027  };
7028  
7029  /** API
7030   * const transitions = useTransition(items, itemKeys, { ... })
7031   * const [transitions, update] = useTransition(items, itemKeys, () => ({ ... }))
7032   */
7033  
7034  var guid = 0;
7035  var ENTER = 'enter';
7036  var LEAVE = 'leave';
7037  var UPDATE = 'update';
7038  
7039  var mapKeys = function mapKeys(items, keys) {
7040    return (typeof keys === 'function' ? items.map(keys) : toArray(keys)).map(String);
7041  };
7042  
7043  var get = function get(props) {
7044    var items = props.items,
7045        _props$keys = props.keys,
7046        keys = _props$keys === void 0 ? function (item) {
7047      return item;
7048    } : _props$keys,
7049        rest = _objectWithoutPropertiesLoose(props, ["items", "keys"]);
7050  
7051    items = toArray(items !== void 0 ? items : null);
7052    return _extends({
7053      items: items,
7054      keys: mapKeys(items, keys)
7055    }, rest);
7056  };
7057  
7058  function useTransition(input, keyTransform, config) {
7059    var props = _extends({
7060      items: input,
7061      keys: keyTransform || function (i) {
7062        return i;
7063      }
7064    }, config);
7065  
7066    var _get = get(props),
7067        _get$lazy = _get.lazy,
7068        lazy = _get$lazy === void 0 ? false : _get$lazy,
7069        _get$unique = _get.unique,
7070        _get$reset = _get.reset,
7071        reset = _get$reset === void 0 ? false : _get$reset,
7072        enter = _get.enter,
7073        leave = _get.leave,
7074        update = _get.update,
7075        onDestroyed = _get.onDestroyed,
7076        keys = _get.keys,
7077        items = _get.items,
7078        onFrame = _get.onFrame,
7079        _onRest = _get.onRest,
7080        onStart = _get.onStart,
7081        ref = _get.ref,
7082        extra = _objectWithoutPropertiesLoose(_get, ["lazy", "unique", "reset", "enter", "leave", "update", "onDestroyed", "keys", "items", "onFrame", "onRest", "onStart", "ref"]);
7083  
7084    var forceUpdate = useForceUpdate();
7085    var mounted = React.useRef(false);
7086    var state = React.useRef({
7087      mounted: false,
7088      first: true,
7089      deleted: [],
7090      current: {},
7091      transitions: [],
7092      prevProps: {},
7093      paused: !!props.ref,
7094      instances: !mounted.current && new Map(),
7095      forceUpdate: forceUpdate
7096    });
7097    React.useImperativeHandle(props.ref, function () {
7098      return {
7099        start: function start() {
7100          return Promise.all(Array.from(state.current.instances).map(function (_ref) {
7101            var c = _ref[1];
7102            return new Promise(function (r) {
7103              return c.start(r);
7104            });
7105          }));
7106        },
7107        stop: function stop(finished) {
7108          return Array.from(state.current.instances).forEach(function (_ref2) {
7109            var c = _ref2[1];
7110            return c.stop(finished);
7111          });
7112        },
7113  
7114        get controllers() {
7115          return Array.from(state.current.instances).map(function (_ref3) {
7116            var c = _ref3[1];
7117            return c;
7118          });
7119        }
7120  
7121      };
7122    }); // Update state
7123  
7124    state.current = diffItems(state.current, props);
7125  
7126    if (state.current.changed) {
7127      // Update state
7128      state.current.transitions.forEach(function (transition) {
7129        var slot = transition.slot,
7130            from = transition.from,
7131            to = transition.to,
7132            config = transition.config,
7133            trail = transition.trail,
7134            key = transition.key,
7135            item = transition.item;
7136        if (!state.current.instances.has(key)) state.current.instances.set(key, new Controller()); // update the map object
7137  
7138        var ctrl = state.current.instances.get(key);
7139  
7140        var newProps = _extends({}, extra, {
7141          to: to,
7142          from: from,
7143          config: config,
7144          ref: ref,
7145          onRest: function onRest(values) {
7146            if (state.current.mounted) {
7147              if (transition.destroyed) {
7148                // If no ref is given delete destroyed items immediately
7149                if (!ref && !lazy) cleanUp(state, key);
7150                if (onDestroyed) onDestroyed(item);
7151              } // A transition comes to rest once all its springs conclude
7152  
7153  
7154              var curInstances = Array.from(state.current.instances);
7155              var active = curInstances.some(function (_ref4) {
7156                var c = _ref4[1];
7157                return !c.idle;
7158              });
7159              if (!active && (ref || lazy) && state.current.deleted.length > 0) cleanUp(state);
7160              if (_onRest) _onRest(item, slot, values);
7161            }
7162          },
7163          onStart: onStart && function () {
7164            return onStart(item, slot);
7165          },
7166          onFrame: onFrame && function (values) {
7167            return onFrame(item, slot, values);
7168          },
7169          delay: trail,
7170          reset: reset && slot === ENTER // Update controller
7171  
7172        });
7173  
7174        ctrl.update(newProps);
7175        if (!state.current.paused) ctrl.start();
7176      });
7177    }
7178  
7179    React.useEffect(function () {
7180      state.current.mounted = mounted.current = true;
7181      return function () {
7182        state.current.mounted = mounted.current = false;
7183        Array.from(state.current.instances).map(function (_ref5) {
7184          var c = _ref5[1];
7185          return c.destroy();
7186        });
7187        state.current.instances.clear();
7188      };
7189    }, []);
7190    return state.current.transitions.map(function (_ref6) {
7191      var item = _ref6.item,
7192          slot = _ref6.slot,
7193          key = _ref6.key;
7194      return {
7195        item: item,
7196        key: key,
7197        state: slot,
7198        props: state.current.instances.get(key).getValues()
7199      };
7200    });
7201  }
7202  
7203  function cleanUp(state, filterKey) {
7204    var deleted = state.current.deleted;
7205  
7206    var _loop = function _loop() {
7207      if (_isArray) {
7208        if (_i >= _iterator.length) return "break";
7209        _ref8 = _iterator[_i++];
7210      } else {
7211        _i = _iterator.next();
7212        if (_i.done) return "break";
7213        _ref8 = _i.value;
7214      }
7215  
7216      var _ref7 = _ref8;
7217      var key = _ref7.key;
7218  
7219      var filter = function filter(t) {
7220        return t.key !== key;
7221      };
7222  
7223      if (is.und(filterKey) || filterKey === key) {
7224        state.current.instances.delete(key);
7225        state.current.transitions = state.current.transitions.filter(filter);
7226        state.current.deleted = state.current.deleted.filter(filter);
7227      }
7228    };
7229  
7230    for (var _iterator = deleted, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
7231      var _ref8;
7232  
7233      var _ret = _loop();
7234  
7235      if (_ret === "break") break;
7236    }
7237  
7238    state.current.forceUpdate();
7239  }
7240  
7241  function diffItems(_ref9, props) {
7242    var first = _ref9.first,
7243        prevProps = _ref9.prevProps,
7244        state = _objectWithoutPropertiesLoose(_ref9, ["first", "prevProps"]);
7245  
7246    var _get2 = get(props),
7247        items = _get2.items,
7248        keys = _get2.keys,
7249        initial = _get2.initial,
7250        from = _get2.from,
7251        enter = _get2.enter,
7252        leave = _get2.leave,
7253        update = _get2.update,
7254        _get2$trail = _get2.trail,
7255        trail = _get2$trail === void 0 ? 0 : _get2$trail,
7256        unique = _get2.unique,
7257        config = _get2.config,
7258        _get2$order = _get2.order,
7259        order = _get2$order === void 0 ? [ENTER, LEAVE, UPDATE] : _get2$order;
7260  
7261    var _get3 = get(prevProps),
7262        _keys = _get3.keys,
7263        _items = _get3.items;
7264  
7265    var current = _extends({}, state.current);
7266  
7267    var deleted = [].concat(state.deleted); // Compare next keys with current keys
7268  
7269    var currentKeys = Object.keys(current);
7270    var currentSet = new Set(currentKeys);
7271    var nextSet = new Set(keys);
7272    var added = keys.filter(function (item) {
7273      return !currentSet.has(item);
7274    });
7275    var removed = state.transitions.filter(function (item) {
7276      return !item.destroyed && !nextSet.has(item.originalKey);
7277    }).map(function (i) {
7278      return i.originalKey;
7279    });
7280    var updated = keys.filter(function (item) {
7281      return currentSet.has(item);
7282    });
7283    var delay = -trail;
7284  
7285    while (order.length) {
7286      var changeType = order.shift();
7287  
7288      switch (changeType) {
7289        case ENTER:
7290          {
7291            added.forEach(function (key, index) {
7292              // In unique mode, remove fading out transitions if their key comes in again
7293              if (unique && deleted.find(function (d) {
7294                return d.originalKey === key;
7295              })) deleted = deleted.filter(function (t) {
7296                return t.originalKey !== key;
7297              });
7298              var keyIndex = keys.indexOf(key);
7299              var item = items[keyIndex];
7300              var slot = first && initial !== void 0 ? 'initial' : ENTER;
7301              current[key] = {
7302                slot: slot,
7303                originalKey: key,
7304                key: unique ? String(key) : guid++,
7305                item: item,
7306                trail: delay = delay + trail,
7307                config: callProp(config, item, slot),
7308                from: callProp(first ? initial !== void 0 ? initial || {} : from : from, item),
7309                to: callProp(enter, item)
7310              };
7311            });
7312            break;
7313          }
7314  
7315        case LEAVE:
7316          {
7317            removed.forEach(function (key) {
7318              var keyIndex = _keys.indexOf(key);
7319  
7320              var item = _items[keyIndex];
7321              var slot = LEAVE;
7322              deleted.unshift(_extends({}, current[key], {
7323                slot: slot,
7324                destroyed: true,
7325                left: _keys[Math.max(0, keyIndex - 1)],
7326                right: _keys[Math.min(_keys.length, keyIndex + 1)],
7327                trail: delay = delay + trail,
7328                config: callProp(config, item, slot),
7329                to: callProp(leave, item)
7330              }));
7331              delete current[key];
7332            });
7333            break;
7334          }
7335  
7336        case UPDATE:
7337          {
7338            updated.forEach(function (key) {
7339              var keyIndex = keys.indexOf(key);
7340              var item = items[keyIndex];
7341              var slot = UPDATE;
7342              current[key] = _extends({}, current[key], {
7343                item: item,
7344                slot: slot,
7345                trail: delay = delay + trail,
7346                config: callProp(config, item, slot),
7347                to: callProp(update, item)
7348              });
7349            });
7350            break;
7351          }
7352      }
7353    }
7354  
7355    var out = keys.map(function (key) {
7356      return current[key];
7357    }); // This tries to restore order for deleted items by finding their last known siblings
7358    // only using the left sibling to keep order placement consistent for all deleted items
7359  
7360    deleted.forEach(function (_ref10) {
7361      var left = _ref10.left,
7362          right = _ref10.right,
7363          item = _objectWithoutPropertiesLoose(_ref10, ["left", "right"]);
7364  
7365      var pos; // Was it the element on the left, if yes, move there ...
7366  
7367      if ((pos = out.findIndex(function (t) {
7368        return t.originalKey === left;
7369      })) !== -1) pos += 1; // And if nothing else helps, move it to the start ¯\_(ツ)_/¯
7370  
7371      pos = Math.max(0, pos);
7372      out = [].concat(out.slice(0, pos), [item], out.slice(pos));
7373    });
7374    return _extends({}, state, {
7375      changed: added.length || removed.length || updated.length,
7376      first: first && added.length === 0,
7377      transitions: out,
7378      current: current,
7379      deleted: deleted,
7380      prevProps: props
7381    });
7382  }
7383  
7384  var AnimatedStyle =
7385  /*#__PURE__*/
7386  function (_AnimatedObject) {
7387    _inheritsLoose(AnimatedStyle, _AnimatedObject);
7388  
7389    function AnimatedStyle(style) {
7390      var _this;
7391  
7392      if (style === void 0) {
7393        style = {};
7394      }
7395  
7396      _this = _AnimatedObject.call(this) || this;
7397  
7398      if (style.transform && !(style.transform instanceof Animated)) {
7399        style = applyAnimatedValues.transform(style);
7400      }
7401  
7402      _this.payload = style;
7403      return _this;
7404    }
7405  
7406    return AnimatedStyle;
7407  }(AnimatedObject);
7408  
7409  // http://www.w3.org/TR/css3-color/#svg-color
7410  var colors = {
7411    transparent: 0x00000000,
7412    aliceblue: 0xf0f8ffff,
7413    antiquewhite: 0xfaebd7ff,
7414    aqua: 0x00ffffff,
7415    aquamarine: 0x7fffd4ff,
7416    azure: 0xf0ffffff,
7417    beige: 0xf5f5dcff,
7418    bisque: 0xffe4c4ff,
7419    black: 0x000000ff,
7420    blanchedalmond: 0xffebcdff,
7421    blue: 0x0000ffff,
7422    blueviolet: 0x8a2be2ff,
7423    brown: 0xa52a2aff,
7424    burlywood: 0xdeb887ff,
7425    burntsienna: 0xea7e5dff,
7426    cadetblue: 0x5f9ea0ff,
7427    chartreuse: 0x7fff00ff,
7428    chocolate: 0xd2691eff,
7429    coral: 0xff7f50ff,
7430    cornflowerblue: 0x6495edff,
7431    cornsilk: 0xfff8dcff,
7432    crimson: 0xdc143cff,
7433    cyan: 0x00ffffff,
7434    darkblue: 0x00008bff,
7435    darkcyan: 0x008b8bff,
7436    darkgoldenrod: 0xb8860bff,
7437    darkgray: 0xa9a9a9ff,
7438    darkgreen: 0x006400ff,
7439    darkgrey: 0xa9a9a9ff,
7440    darkkhaki: 0xbdb76bff,
7441    darkmagenta: 0x8b008bff,
7442    darkolivegreen: 0x556b2fff,
7443    darkorange: 0xff8c00ff,
7444    darkorchid: 0x9932ccff,
7445    darkred: 0x8b0000ff,
7446    darksalmon: 0xe9967aff,
7447    darkseagreen: 0x8fbc8fff,
7448    darkslateblue: 0x483d8bff,
7449    darkslategray: 0x2f4f4fff,
7450    darkslategrey: 0x2f4f4fff,
7451    darkturquoise: 0x00ced1ff,
7452    darkviolet: 0x9400d3ff,
7453    deeppink: 0xff1493ff,
7454    deepskyblue: 0x00bfffff,
7455    dimgray: 0x696969ff,
7456    dimgrey: 0x696969ff,
7457    dodgerblue: 0x1e90ffff,
7458    firebrick: 0xb22222ff,
7459    floralwhite: 0xfffaf0ff,
7460    forestgreen: 0x228b22ff,
7461    fuchsia: 0xff00ffff,
7462    gainsboro: 0xdcdcdcff,
7463    ghostwhite: 0xf8f8ffff,
7464    gold: 0xffd700ff,
7465    goldenrod: 0xdaa520ff,
7466    gray: 0x808080ff,
7467    green: 0x008000ff,
7468    greenyellow: 0xadff2fff,
7469    grey: 0x808080ff,
7470    honeydew: 0xf0fff0ff,
7471    hotpink: 0xff69b4ff,
7472    indianred: 0xcd5c5cff,
7473    indigo: 0x4b0082ff,
7474    ivory: 0xfffff0ff,
7475    khaki: 0xf0e68cff,
7476    lavender: 0xe6e6faff,
7477    lavenderblush: 0xfff0f5ff,
7478    lawngreen: 0x7cfc00ff,
7479    lemonchiffon: 0xfffacdff,
7480    lightblue: 0xadd8e6ff,
7481    lightcoral: 0xf08080ff,
7482    lightcyan: 0xe0ffffff,
7483    lightgoldenrodyellow: 0xfafad2ff,
7484    lightgray: 0xd3d3d3ff,
7485    lightgreen: 0x90ee90ff,
7486    lightgrey: 0xd3d3d3ff,
7487    lightpink: 0xffb6c1ff,
7488    lightsalmon: 0xffa07aff,
7489    lightseagreen: 0x20b2aaff,
7490    lightskyblue: 0x87cefaff,
7491    lightslategray: 0x778899ff,
7492    lightslategrey: 0x778899ff,
7493    lightsteelblue: 0xb0c4deff,
7494    lightyellow: 0xffffe0ff,
7495    lime: 0x00ff00ff,
7496    limegreen: 0x32cd32ff,
7497    linen: 0xfaf0e6ff,
7498    magenta: 0xff00ffff,
7499    maroon: 0x800000ff,
7500    mediumaquamarine: 0x66cdaaff,
7501    mediumblue: 0x0000cdff,
7502    mediumorchid: 0xba55d3ff,
7503    mediumpurple: 0x9370dbff,
7504    mediumseagreen: 0x3cb371ff,
7505    mediumslateblue: 0x7b68eeff,
7506    mediumspringgreen: 0x00fa9aff,
7507    mediumturquoise: 0x48d1ccff,
7508    mediumvioletred: 0xc71585ff,
7509    midnightblue: 0x191970ff,
7510    mintcream: 0xf5fffaff,
7511    mistyrose: 0xffe4e1ff,
7512    moccasin: 0xffe4b5ff,
7513    navajowhite: 0xffdeadff,
7514    navy: 0x000080ff,
7515    oldlace: 0xfdf5e6ff,
7516    olive: 0x808000ff,
7517    olivedrab: 0x6b8e23ff,
7518    orange: 0xffa500ff,
7519    orangered: 0xff4500ff,
7520    orchid: 0xda70d6ff,
7521    palegoldenrod: 0xeee8aaff,
7522    palegreen: 0x98fb98ff,
7523    paleturquoise: 0xafeeeeff,
7524    palevioletred: 0xdb7093ff,
7525    papayawhip: 0xffefd5ff,
7526    peachpuff: 0xffdab9ff,
7527    peru: 0xcd853fff,
7528    pink: 0xffc0cbff,
7529    plum: 0xdda0ddff,
7530    powderblue: 0xb0e0e6ff,
7531    purple: 0x800080ff,
7532    rebeccapurple: 0x663399ff,
7533    red: 0xff0000ff,
7534    rosybrown: 0xbc8f8fff,
7535    royalblue: 0x4169e1ff,
7536    saddlebrown: 0x8b4513ff,
7537    salmon: 0xfa8072ff,
7538    sandybrown: 0xf4a460ff,
7539    seagreen: 0x2e8b57ff,
7540    seashell: 0xfff5eeff,
7541    sienna: 0xa0522dff,
7542    silver: 0xc0c0c0ff,
7543    skyblue: 0x87ceebff,
7544    slateblue: 0x6a5acdff,
7545    slategray: 0x708090ff,
7546    slategrey: 0x708090ff,
7547    snow: 0xfffafaff,
7548    springgreen: 0x00ff7fff,
7549    steelblue: 0x4682b4ff,
7550    tan: 0xd2b48cff,
7551    teal: 0x008080ff,
7552    thistle: 0xd8bfd8ff,
7553    tomato: 0xff6347ff,
7554    turquoise: 0x40e0d0ff,
7555    violet: 0xee82eeff,
7556    wheat: 0xf5deb3ff,
7557    white: 0xffffffff,
7558    whitesmoke: 0xf5f5f5ff,
7559    yellow: 0xffff00ff,
7560    yellowgreen: 0x9acd32ff
7561  };
7562  
7563  // const INTEGER = '[-+]?\\d+';
7564  var NUMBER = '[-+]?\\d*\\.?\\d+';
7565  var PERCENTAGE = NUMBER + '%';
7566  
7567  function call() {
7568    for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {
7569      parts[_key] = arguments[_key];
7570    }
7571  
7572    return '\\(\\s*(' + parts.join(')\\s*,\\s*(') + ')\\s*\\)';
7573  }
7574  
7575  var rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));
7576  var rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));
7577  var hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));
7578  var hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
7579  var hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7580  var hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7581  var hex6 = /^#([0-9a-fA-F]{6})$/;
7582  var hex8 = /^#([0-9a-fA-F]{8})$/;
7583  
7584  /*
7585  https://github.com/react-community/normalize-css-color
7586  
7587  BSD 3-Clause License
7588  
7589  Copyright (c) 2016, React Community
7590  All rights reserved.
7591  
7592  Redistribution and use in source and binary forms, with or without
7593  modification, are permitted provided that the following conditions are met:
7594  
7595  * Redistributions of source code must retain the above copyright notice, this
7596    list of conditions and the following disclaimer.
7597  
7598  * Redistributions in binary form must reproduce the above copyright notice,
7599    this list of conditions and the following disclaimer in the documentation
7600    and/or other materials provided with the distribution.
7601  
7602  * Neither the name of the copyright holder nor the names of its
7603    contributors may be used to endorse or promote products derived from
7604    this software without specific prior written permission.
7605  
7606  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
7607  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7608  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7609  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
7610  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7611  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
7612  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
7613  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7614  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
7615  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7616  */
7617  function normalizeColor(color) {
7618    var match;
7619  
7620    if (typeof color === 'number') {
7621      return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;
7622    } // Ordered based on occurrences on Facebook codebase
7623  
7624  
7625    if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;
7626    if (colors.hasOwnProperty(color)) return colors[color];
7627  
7628    if (match = rgb.exec(color)) {
7629      return (parse255(match[1]) << 24 | // r
7630      parse255(match[2]) << 16 | // g
7631      parse255(match[3]) << 8 | // b
7632      0x000000ff) >>> // a
7633      0;
7634    }
7635  
7636    if (match = rgba.exec(color)) {
7637      return (parse255(match[1]) << 24 | // r
7638      parse255(match[2]) << 16 | // g
7639      parse255(match[3]) << 8 | // b
7640      parse1(match[4])) >>> // a
7641      0;
7642    }
7643  
7644    if (match = hex3.exec(color)) {
7645      return parseInt(match[1] + match[1] + // r
7646      match[2] + match[2] + // g
7647      match[3] + match[3] + // b
7648      'ff', // a
7649      16) >>> 0;
7650    } // https://drafts.csswg.org/css-color-4/#hex-notation
7651  
7652  
7653    if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;
7654  
7655    if (match = hex4.exec(color)) {
7656      return parseInt(match[1] + match[1] + // r
7657      match[2] + match[2] + // g
7658      match[3] + match[3] + // b
7659      match[4] + match[4], // a
7660      16) >>> 0;
7661    }
7662  
7663    if (match = hsl.exec(color)) {
7664      return (hslToRgb(parse360(match[1]), // h
7665      parsePercentage(match[2]), // s
7666      parsePercentage(match[3]) // l
7667      ) | 0x000000ff) >>> // a
7668      0;
7669    }
7670  
7671    if (match = hsla.exec(color)) {
7672      return (hslToRgb(parse360(match[1]), // h
7673      parsePercentage(match[2]), // s
7674      parsePercentage(match[3]) // l
7675      ) | parse1(match[4])) >>> // a
7676      0;
7677    }
7678  
7679    return null;
7680  }
7681  
7682  function hue2rgb(p, q, t) {
7683    if (t < 0) t += 1;
7684    if (t > 1) t -= 1;
7685    if (t < 1 / 6) return p + (q - p) * 6 * t;
7686    if (t < 1 / 2) return q;
7687    if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
7688    return p;
7689  }
7690  
7691  function hslToRgb(h, s, l) {
7692    var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
7693    var p = 2 * l - q;
7694    var r = hue2rgb(p, q, h + 1 / 3);
7695    var g = hue2rgb(p, q, h);
7696    var b = hue2rgb(p, q, h - 1 / 3);
7697    return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
7698  }
7699  
7700  function parse255(str) {
7701    var int = parseInt(str, 10);
7702    if (int < 0) return 0;
7703    if (int > 255) return 255;
7704    return int;
7705  }
7706  
7707  function parse360(str) {
7708    var int = parseFloat(str);
7709    return (int % 360 + 360) % 360 / 360;
7710  }
7711  
7712  function parse1(str) {
7713    var num = parseFloat(str);
7714    if (num < 0) return 0;
7715    if (num > 1) return 255;
7716    return Math.round(num * 255);
7717  }
7718  
7719  function parsePercentage(str) {
7720    // parseFloat conveniently ignores the final %
7721    var int = parseFloat(str);
7722    if (int < 0) return 0;
7723    if (int > 100) return 1;
7724    return int / 100;
7725  }
7726  
7727  function colorToRgba(input) {
7728    var int32Color = normalizeColor(input);
7729    if (int32Color === null) return input;
7730    int32Color = int32Color || 0;
7731    var r = (int32Color & 0xff000000) >>> 24;
7732    var g = (int32Color & 0x00ff0000) >>> 16;
7733    var b = (int32Color & 0x0000ff00) >>> 8;
7734    var a = (int32Color & 0x000000ff) / 255;
7735    return "rgba(" + r + ", " + g + ", " + b + ", " + a + ")";
7736  } // Problem: https://github.com/animatedjs/animated/pull/102
7737  // Solution: https://stackoverflow.com/questions/638565/parsing-scientific-notation-sensibly/658662
7738  
7739  
7740  var stringShapeRegex = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; // Covers rgb, rgba, hsl, hsla
7741  // Taken from https://gist.github.com/olmokramer/82ccce673f86db7cda5e
7742  
7743  var colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi; // Covers color names (transparent, blue, etc.)
7744  
7745  var colorNamesRegex = new RegExp("(" + Object.keys(colors).join('|') + ")", 'g');
7746  /**
7747   * Supports string shapes by extracting numbers so new values can be computed,
7748   * and recombines those values into new strings of the same shape.  Supports
7749   * things like:
7750   *
7751   *   rgba(123, 42, 99, 0.36)           // colors
7752   *   -45deg                            // values with units
7753   *   0 2px 2px 0px rgba(0, 0, 0, 0.12) // box shadows
7754   */
7755  
7756  var createStringInterpolator = function createStringInterpolator(config) {
7757    // Replace colors with rgba
7758    var outputRange = config.output.map(function (rangeValue) {
7759      return rangeValue.replace(colorRegex, colorToRgba);
7760    }).map(function (rangeValue) {
7761      return rangeValue.replace(colorNamesRegex, colorToRgba);
7762    });
7763    var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {
7764      return [];
7765    });
7766    outputRange.forEach(function (value) {
7767      value.match(stringShapeRegex).forEach(function (number, i) {
7768        return outputRanges[i].push(+number);
7769      });
7770    });
7771    var interpolations = outputRange[0].match(stringShapeRegex).map(function (_value, i) {
7772      return createInterpolator(_extends({}, config, {
7773        output: outputRanges[i]
7774      }));
7775    });
7776    return function (input) {
7777      var i = 0;
7778      return outputRange[0] // 'rgba(0, 100, 200, 0)'
7779      // ->
7780      // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'
7781      .replace(stringShapeRegex, function () {
7782        return interpolations[i++](input);
7783      }) // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to
7784      // round the opacity (4th column).
7785      .replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, function (_, p1, p2, p3, p4) {
7786        return "rgba(" + Math.round(p1) + ", " + Math.round(p2) + ", " + Math.round(p3) + ", " + p4 + ")";
7787      });
7788    };
7789  };
7790  
7791  var isUnitlessNumber = {
7792    animationIterationCount: true,
7793    borderImageOutset: true,
7794    borderImageSlice: true,
7795    borderImageWidth: true,
7796    boxFlex: true,
7797    boxFlexGroup: true,
7798    boxOrdinalGroup: true,
7799    columnCount: true,
7800    columns: true,
7801    flex: true,
7802    flexGrow: true,
7803    flexPositive: true,
7804    flexShrink: true,
7805    flexNegative: true,
7806    flexOrder: true,
7807    gridRow: true,
7808    gridRowEnd: true,
7809    gridRowSpan: true,
7810    gridRowStart: true,
7811    gridColumn: true,
7812    gridColumnEnd: true,
7813    gridColumnSpan: true,
7814    gridColumnStart: true,
7815    fontWeight: true,
7816    lineClamp: true,
7817    lineHeight: true,
7818    opacity: true,
7819    order: true,
7820    orphans: true,
7821    tabSize: true,
7822    widows: true,
7823    zIndex: true,
7824    zoom: true,
7825    // SVG-related properties
7826    fillOpacity: true,
7827    floodOpacity: true,
7828    stopOpacity: true,
7829    strokeDasharray: true,
7830    strokeDashoffset: true,
7831    strokeMiterlimit: true,
7832    strokeOpacity: true,
7833    strokeWidth: true
7834  };
7835  
7836  var prefixKey = function prefixKey(prefix, key) {
7837    return prefix + key.charAt(0).toUpperCase() + key.substring(1);
7838  };
7839  
7840  var prefixes = ['Webkit', 'Ms', 'Moz', 'O'];
7841  isUnitlessNumber = Object.keys(isUnitlessNumber).reduce(function (acc, prop) {
7842    prefixes.forEach(function (prefix) {
7843      return acc[prefixKey(prefix, prop)] = acc[prop];
7844    });
7845    return acc;
7846  }, isUnitlessNumber);
7847  
7848  function dangerousStyleValue(name, value, isCustomProperty) {
7849    if (value == null || typeof value === 'boolean' || value === '') return '';
7850    if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
7851  
7852    return ('' + value).trim();
7853  }
7854  
7855  var attributeCache = {};
7856  injectCreateAnimatedStyle(function (style) {
7857    return new AnimatedStyle(style);
7858  });
7859  injectDefaultElement('div');
7860  injectStringInterpolator(createStringInterpolator);
7861  injectColorNames(colors);
7862  injectApplyAnimatedValues(function (instance, props) {
7863    if (instance.nodeType && instance.setAttribute !== undefined) {
7864      var style = props.style,
7865          children = props.children,
7866          scrollTop = props.scrollTop,
7867          scrollLeft = props.scrollLeft,
7868          attributes = _objectWithoutPropertiesLoose(props, ["style", "children", "scrollTop", "scrollLeft"]);
7869  
7870      var filter = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';
7871      if (scrollTop !== void 0) instance.scrollTop = scrollTop;
7872      if (scrollLeft !== void 0) instance.scrollLeft = scrollLeft; // Set textContent, if children is an animatable value
7873  
7874      if (children !== void 0) instance.textContent = children; // Set styles ...
7875  
7876      for (var styleName in style) {
7877        if (!style.hasOwnProperty(styleName)) continue;
7878        var isCustomProperty = styleName.indexOf('--') === 0;
7879        var styleValue = dangerousStyleValue(styleName, style[styleName], isCustomProperty);
7880        if (styleName === 'float') styleName = 'cssFloat';
7881        if (isCustomProperty) instance.style.setProperty(styleName, styleValue);else instance.style[styleName] = styleValue;
7882      } // Set attributes ...
7883  
7884  
7885      for (var name in attributes) {
7886        // Attributes are written in dash case
7887        var dashCase = filter ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, function (n) {
7888          return '-' + n.toLowerCase();
7889        }));
7890        if (typeof instance.getAttribute(dashCase) !== 'undefined') instance.setAttribute(dashCase, attributes[name]);
7891      }
7892  
7893      return;
7894    } else return false;
7895  }, function (style) {
7896    return style;
7897  });
7898  
7899  var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
7900  'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
7901  // Extend animated with all the available THREE elements
7902  var apply = merge(createAnimatedComponent, false);
7903  var extendedAnimated = apply(domElements);
7904  
7905  exports.apply = apply;
7906  exports.config = config;
7907  exports.update = update;
7908  exports.animated = extendedAnimated;
7909  exports.a = extendedAnimated;
7910  exports.interpolate = interpolate$1;
7911  exports.Globals = Globals;
7912  exports.useSpring = useSpring;
7913  exports.useTrail = useTrail;
7914  exports.useTransition = useTransition;
7915  exports.useChain = useChain;
7916  exports.useSprings = useSprings;
7917  
7918  
7919  /***/ }),
7920  /* 114 */,
7921  /* 115 */,
7922  /* 116 */,
7923  /* 117 */,
7924  /* 118 */,
7925  /* 119 */
7926  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7927  
7928  "use strict";
7929  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Composite; });
7930  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useComposite; });
7931  /* harmony import */ var _rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
7932  /* harmony import */ var reakit_system_createComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
7933  /* harmony import */ var reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(48);
7934  /* harmony import */ var _Box_Box_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67);
7935  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
7936  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
7937  /* harmony import */ var reakit_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63);
7938  /* harmony import */ var reakit_warning__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80);
7939  /* harmony import */ var reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46);
7940  /* harmony import */ var reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(53);
7941  /* harmony import */ var reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(57);
7942  /* harmony import */ var _Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(73);
7943  /* harmony import */ var reakit_system_useCreateElement__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(78);
7944  /* harmony import */ var reakit_utils_createOnKeyDown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82);
7945  /* harmony import */ var reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47);
7946  /* harmony import */ var reakit_utils_fireEvent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(94);
7947  /* harmony import */ var reakit_utils_fireKeyboardEvent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(102);
7948  /* harmony import */ var _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(51);
7949  
7950  
7951  
7952  
7953  
7954  
7955  
7956  
7957  
7958  
7959  
7960  
7961  
7962  
7963  
7964  
7965  
7966  
7967  
7968  
7969  
7970  
7971  
7972  
7973  
7974  
7975  
7976  
7977  var isIE11 = typeof window !== "undefined" && "msCrypto" in window;
7978  function getNextActiveElementOnBlur(event) {
7979    // IE 11 doesn't support event.relatedTarget on blur.
7980    // document.activeElement points the the next active element.
7981    // On modern browsers, document.activeElement points to the current target.
7982    if (isIE11) {
7983      var activeElement = Object(reakit_utils_getActiveElement__WEBPACK_IMPORTED_MODULE_9__[/* getActiveElement */ "a"])(event.target);
7984      return activeElement;
7985    }
7986  
7987    return event.relatedTarget;
7988  }
7989  
7990  var validCompositeRoles = ["combobox", "grid", "tablist", "listbox", "menu", "menubar", "toolbar", "radiogroup", "tree", "treegrid"];
7991  var isIE11$1 = typeof window !== "undefined" && "msCrypto" in window;
7992  
7993  function canProxyKeyboardEvent(event) {
7994    if (!Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event)) return false;
7995    if (event.metaKey) return false;
7996    if (event.key === "Tab") return false;
7997    return true;
7998  }
7999  
8000  function useKeyboardEventProxy(virtual, currentItem, htmlEventHandler) {
8001    var eventHandlerRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlEventHandler);
8002    return Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
8003      var _eventHandlerRef$curr;
8004  
8005      if (virtual && canProxyKeyboardEvent(event)) {
8006        var currentElement = currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current;
8007  
8008        if (currentElement) {
8009          Object(reakit_utils_fireKeyboardEvent__WEBPACK_IMPORTED_MODULE_15__[/* fireKeyboardEvent */ "a"])(currentElement, event.type, event); // The event will be triggered on the composite item and then
8010          // propagated up to this composite element again, so we can pretend
8011          // that it wasn't called on this component in the first place.
8012  
8013          if (event.currentTarget.contains(currentElement)) {
8014            event.stopPropagation();
8015            event.preventDefault();
8016            return;
8017          }
8018        }
8019      }
8020  
8021      (_eventHandlerRef$curr = eventHandlerRef.current) === null || _eventHandlerRef$curr === void 0 ? void 0 : _eventHandlerRef$curr.call(eventHandlerRef, event);
8022    }, [virtual, currentItem]);
8023  } // istanbul ignore next
8024  
8025  
8026  function useActiveElementRef(elementRef) {
8027    var activeElementRef = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
8028    Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
8029      var document = Object(reakit_utils_getDocument__WEBPACK_IMPORTED_MODULE_13__[/* getDocument */ "a"])(elementRef.current);
8030  
8031      var onFocus = function onFocus(event) {
8032        var target = event.target;
8033        activeElementRef.current = target;
8034      };
8035  
8036      document.addEventListener("focus", onFocus, true);
8037      return function () {
8038        document.removeEventListener("focus", onFocus, true);
8039      };
8040    }, []);
8041    return activeElementRef;
8042  }
8043  
8044  function findFirstEnabledItemInTheLastRow(items) {
8045    return Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["a"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["b"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* r */ "f"])(Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__["c"])(items))));
8046  }
8047  
8048  function isItem(items, element) {
8049    return items === null || items === void 0 ? void 0 : items.some(function (item) {
8050      return !!element && item.ref.current === element;
8051    });
8052  }
8053  
8054  var useComposite = Object(reakit_system_createHook__WEBPACK_IMPORTED_MODULE_2__[/* createHook */ "a"])({
8055    name: "Composite",
8056    compose: [_Tabbable_Tabbable_js__WEBPACK_IMPORTED_MODULE_10__[/* useTabbable */ "a"]],
8057    useState: _CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* u */ "g"],
8058    useOptions: function useOptions(options) {
8059      return Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])(Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* a */ "b"])({}, options), {}, {
8060        currentId: Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* g */ "e"])(options)
8061      });
8062    },
8063    useProps: function useProps(options, _ref) {
8064      var htmlRef = _ref.ref,
8065          htmlOnFocus = _ref.onFocus,
8066          htmlOnBlur = _ref.onBlur,
8067          htmlOnKeyDown = _ref.onKeyDown,
8068          htmlOnKeyUp = _ref.onKeyUp,
8069          htmlProps = Object(_rollupPluginBabelHelpers_1f0bf8c2_js__WEBPACK_IMPORTED_MODULE_0__[/* _ */ "a"])(_ref, ["ref", "onFocus", "onBlur", "onKeyDown", "onKeyUp"]);
8070  
8071      var ref = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(null);
8072      var currentItem = Object(_CompositeState_3a25dcee_js__WEBPACK_IMPORTED_MODULE_16__[/* f */ "d"])(options.items, options.currentId);
8073      var previousItem = Object(react__WEBPACK_IMPORTED_MODULE_4__["useRef"])(undefined);
8074      var onFocusRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnFocus);
8075      var onBlurRef = Object(reakit_utils_useLiveRef__WEBPACK_IMPORTED_MODULE_7__[/* useLiveRef */ "a"])(htmlOnBlur); // IE 11 doesn't support event.relatedTarget, so we use the active element
8076      // ref instead.
8077  
8078      var activeElementRef = isIE11$1 ? useActiveElementRef(ref) : undefined;
8079      Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
8080        var element = ref.current;
8081  
8082        if (!element) {
8083           false ? undefined : void 0;
8084          return;
8085        }
8086  
8087        if (options.unstable_moves && !currentItem) {
8088          // If composite.move(null) has been called, the composite container
8089          // will receive focus.
8090          element.focus();
8091        }
8092      }, [options.unstable_moves, currentItem]);
8093      var onKeyDown = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyDown);
8094      var onKeyUp = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyUp);
8095      var onFocus = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
8096        var _onFocusRef$current2;
8097  
8098        if (options.unstable_virtual) {
8099          // IE11 doesn't support event.relatedTarget, so we use the active
8100          // element ref instead.
8101          var previousActiveElement = (activeElementRef === null || activeElementRef === void 0 ? void 0 : activeElementRef.current) || event.relatedTarget;
8102          var previousActiveElementWasItem = isItem(options.items, previousActiveElement);
8103  
8104          if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event) && !previousActiveElementWasItem) {
8105            var _onFocusRef$current, _currentItem$ref$curr;
8106  
8107            // This means that the composite element has been focused while the
8108            // composite item has not. For example, by clicking on the
8109            // composite element without touching any item, or by tabbing into
8110            // the composite element. In this case, we want to trigger focus on
8111            // the item, just like it would happen with roving tabindex.
8112            // When it receives focus, the composite item will put focus back
8113            // on the composite element, in which case hasItemWithFocus will be
8114            // true.
8115            (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event);
8116            currentItem === null || currentItem === void 0 ? void 0 : (_currentItem$ref$curr = currentItem.ref.current) === null || _currentItem$ref$curr === void 0 ? void 0 : _currentItem$ref$curr.focus();
8117            return;
8118          }
8119  
8120          if (previousActiveElementWasItem) {
8121            // Composite has been focused as a result of an item receiving
8122            // focus. The composite item will move focus back to the composite
8123            // container. In this case, we don't want to propagate this
8124            // additional event nor call the onFocus handler passed to
8125            // <Composite onFocus={...} /> (htmlOnFocus). Unless users add DOM
8126            // event handlers to the composite element directly, this will be
8127            // like this event has never existed.
8128            event.stopPropagation();
8129            return;
8130          }
8131        } else if (Object(reakit_utils_isSelfTarget__WEBPACK_IMPORTED_MODULE_8__[/* isSelfTarget */ "a"])(event)) {
8132          var _options$setCurrentId;
8133  
8134          // When the roving tabindex composite gets intentionally focused (for
8135          // example, by clicking directly on it, and not on an item), we make
8136          // sure to set the current id to null (which means the composite
8137          // itself is focused).
8138          (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, null);
8139        }
8140  
8141        (_onFocusRef$current2 = onFocusRef.current) === null || _onFocusRef$current2 === void 0 ? void 0 : _onFocusRef$current2.call(onFocusRef, event);
8142      }, [options.unstable_virtual, options.items, currentItem, options.setCurrentId]);
8143      var onBlur = Object(react__WEBPACK_IMPORTED_MODULE_4__["useCallback"])(function (event) {
8144        var _onBlurRef$current;
8145  
8146        // When virtual is set to true, we move focus from the composite
8147        // container (this component) to th