[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

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